/* Custom Stylesheet - Puskesmas Sekarjaya (Sederhana & Rapi) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #0d7c66;
    --primary-hover: #0a6352;
    --secondary-color: #0284c7;
    --dark-navy: #1e293b;
    --light-bg: #f8fafc;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--light-bg);
    color: #334155;
}

/* Topbar Header */
.top-header {
    background: #1e293b; /* Retained Navy */
    color: #cbd5e1;
    font-size: 0.8125rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 0;
}

.top-header-inner {
    min-height: 36px;
}

/* Icon accents - Green/Teal */
.top-header .icon-accent {
    color: #14b8a6;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.top-info-item {
    color: #cbd5e1;
    font-weight: 500;
}

.top-info-item a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.top-info-item a:hover {
    color: #ffffff;
}

/* Address Styling - Max 2 lines clamp */
.top-address {
    max-width: 380px;
}

.top-address .address-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    font-size: 0.8rem;
    color: #cbd5e1;
}

/* Divider between desktop items */
.top-divider {
    width: 1px;
    height: 14px;
    background-color: rgba(255, 255, 255, 0.18);
    margin: 0 2px;
}

/* Phone & Email Blocks */
.top-phone, .top-email {
    white-space: nowrap;
    font-size: 0.8rem;
}

/* UGD 24 Jam Badge - Small & Small Padding */
.badge-ugd {
    background-color: #0d7c66; /* Retained Teal/Green */
    color: #ffffff;
    font-size: 0.725rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.2px;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Admin Login Button - Far Right & Proportional */
.btn-admin-login {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-admin-login:hover {
    background: #0d7c66;
    color: #ffffff;
    border-color: #0d7c66;
}

/* Responsive Layout Adjustments */
@media (max-width: 991.98px) {
    .top-header {
        padding: 8px 0;
    }
    .top-address {
        max-width: 100%;
    }
    .top-header-left {
        width: 100%;
    }
    .top-header-right {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 6px;
        margin-top: 2px;
    }
}

@media (max-width: 575.98px) {
    .top-address .address-text {
        font-size: 0.75rem;
    }
    .top-phone, .top-email {
        font-size: 0.75rem;
    }
    .badge-ugd {
        font-size: 0.7rem;
        padding: 2.5px 7px;
    }
    .btn-admin-login {
        font-size: 0.7rem;
        padding: 2.5px 8px;
    }
}

/* Navbar */
.main-navbar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 0;
}
.navbar-brand-text h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin: 0;
}
.navbar-brand-text small {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
}
.nav-link {
    font-weight: 600;
    color: #475569 !important;
    padding: 8px 14px !important;
    font-size: 0.95rem;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: #0d7c66;
    color: #ffffff;
    padding: 50px 0;
}
.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
}
.hero-subtitle {
    font-size: 1.05rem;
    color: #e2e8f0;
    margin-bottom: 20px;
}
.btn-hero-primary {
    background-color: #ffffff;
    color: #0d7c66;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 6px;
    border: none;
}
.btn-hero-primary:hover {
    background-color: #e2e8f0;
    color: #0a6352;
}
.btn-hero-outline {
    background: transparent;
    color: #ffffff;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 6px;
    border: 1px solid #ffffff;
}
.btn-hero-outline:hover {
    background: #ffffff;
    color: #0d7c66;
}

/* Section Header */
.section-title-wrap {
    margin-bottom: 30px;
}
.section-subtitle {
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 4px;
}
.section-title {
    font-weight: 700;
    color: var(--dark-navy);
    font-size: 1.75rem;
}

/* Page Banner */
.page-banner {
    background: #e2e8f0;
    color: #0f172a;
    padding: 35px 0;
    border-bottom: 1px solid #cbd5e1;
    margin-bottom: 30px;
}
.page-banner h1 {
    font-weight: 700;
    font-size: 1.8rem;
    margin: 0;
}
.breadcrumb-custom .breadcrumb-item a {
    color: #0d7c66;
    text-decoration: none;
}
.breadcrumb-custom .breadcrumb-item.active {
    color: #64748b;
}

/* Cards & Tables */
.card, .quick-info-card, .service-card, .doctor-card, .news-card {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.quick-info-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #e6f4f1;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 12px;
}

/* Footer */
footer {
    background: #0f172a;
    color: #94a3b8;
    font-size: 0.9rem;
    padding-top: 50px;
}
footer h5 {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 15px;
}
footer a {
    color: #cbd5e1;
    text-decoration: none;
}
footer a:hover {
    color: #38bdf8;
}
.footer-bottom {
    background: #090d16;
    padding: 15px 0;
    margin-top: 35px;
    font-size: 0.85rem;
}

/* Admin Layout */
.admin-sidebar {
    min-height: 100vh;
    background: #0f172a;
    color: #cbd5e1;
    width: 250px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}
.admin-sidebar .sidebar-brand {
    padding: 18px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.admin-sidebar .nav-link {
    color: #94a3b8 !important;
    padding: 10px 18px !important;
    border-radius: 6px;
    margin: 4px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
    background: var(--primary-color);
    color: #ffffff !important;
}

.admin-wrapper {
    margin-left: 250px;
    padding: 25px;
    min-height: 100vh;
}
.admin-topbar {
    background: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stat-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* ==========================================================================
   Tiket Antrian Pasien Styling (Web & Print)
   ========================================================================== */

/* Container for Ticket Page */
.ticket-wrapper {
    max-width: 440px;
    margin: 0 auto;
}

/* Modern Ticket Card */
.ticket-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-top: 5px solid #0d7c66;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06);
    padding: 24px 28px;
    text-align: center;
    position: relative;
}

/* Header Tiket */
.ticket-header {
    margin-bottom: 12px;
}

.ticket-logo {
    width: 44px;
    height: 44px;
    background: #e6f4f1;
    color: #0d7c66;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.ticket-header-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ticket-header-subtitle {
    font-size: 0.75rem;
    font-weight: 700;
    color: #0d7c66;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Separator Line */
.ticket-divider {
    border-top: 2px dashed #cbd5e1;
    margin: 14px 0;
}

/* Nomor Antrian Section */
.ticket-number-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 10px;
    margin: 10px 0;
    border: 1px dashed #cbd5e1;
}

.ticket-number-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.ticket-number-value {
    font-size: 3.8rem;
    font-weight: 800;
    color: #0d7c66;
    line-height: 1.1;
    letter-spacing: 3px;
    margin: 4px 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Table Details */
.ticket-details-table {
    width: 100%;
    margin-bottom: 10px;
    text-align: left;
}

.ticket-details-table td {
    padding: 4px 0;
    font-size: 0.875rem;
    vertical-align: top;
}

.ticket-details-table td.label-col {
    color: #64748b;
    font-weight: 500;
    width: 40%;
}

.ticket-details-table td.value-col {
    color: #1e293b;
    font-weight: 600;
}

/* Footer Info Tiket */
.ticket-footer-note {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}

/* ==========================================================================
   PRINT MEDIA RULES (@media print)
   Khusus Cetak Tiket: HANYA TIKET ANTRIAN YANG DICETAK
   ========================================================================== */
@media print {
    @page {
        size: auto;
        margin: 5mm;
    }

    /* Sembunyikan seluruh elemen halaman website */
    html, body {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body * {
        visibility: hidden !important;
    }

    /* Sembunyikan navbar, topbar, footer, tombol, dan elemen non-tiket secara eksplisit */
    .top-header,
    .main-navbar,
    footer,
    .alert,
    .d-print-none,
    nav,
    header,
    .page-banner,
    .breadcrumb {
        display: none !important;
    }

    /* Tampilkan HANYA kartu tiket antrian */
    #printableTicket,
    #printableTicket * {
        visibility: visible !important;
    }

    #printableTicket {
        position: absolute !important;
        left: 50% !important;
        top: 20px !important;
        transform: translateX(-50%) !important;
        width: 320px !important;
        max-width: 100% !important;
        padding: 16px 20px !important;
        border: 2px solid #000000 !important;
        border-radius: 8px !important;
        background: #ffffff !important;
        color: #000000 !important;
        box-shadow: none !important;
    }

    .ticket-logo {
        background: none !important;
        border: 1px solid #000000 !important;
        color: #000000 !important;
    }

    .ticket-header-title {
        color: #000000 !important;
        font-size: 1.1rem !important;
        font-weight: 800 !important;
    }

    .ticket-header-subtitle {
        color: #333333 !important;
        font-size: 0.75rem !important;
        font-weight: 700 !important;
    }

    .ticket-divider {
        border-top: 1px dashed #000000 !important;
        margin: 10px 0 !important;
    }

    .ticket-number-box {
        background: #ffffff !important;
        border: 1.5px dashed #000000 !important;
        padding: 8px 5px !important;
        margin: 8px 0 !important;
    }

    .ticket-number-label {
        color: #333333 !important;
        font-size: 0.75rem !important;
        font-weight: 700 !important;
    }

    .ticket-number-value {
        color: #000000 !important;
        font-size: 3.5rem !important;
        font-weight: 900 !important;
        line-height: 1 !important;
    }

    .ticket-details-table td {
        font-size: 0.85rem !important;
        color: #000000 !important;
        padding: 3px 0 !important;
    }

    .ticket-details-table td.label-col {
        color: #333333 !important;
        font-weight: 600 !important;
    }

    .ticket-details-table td.value-col {
        color: #000000 !important;
        font-weight: 700 !important;
    }

    .ticket-details-table .badge {
        border: none !important;
        background: transparent !important;
        color: #000000 !important;
        padding: 0 !important;
        font-weight: 700 !important;
    }

    .ticket-footer-note {
        border-top: 1px dashed #000000 !important;
        color: #333333 !important;
        font-size: 0.7rem !important;
        margin-top: 10px !important;
        padding-top: 8px !important;
    }
}
