/* ========================================================
   ATIAH CARE - Clinical Healthcare Design System
   Standard: Modern, Trustworthy, Responsive EMR & Patient Portal
   Palette: Medical Emerald/Teal, Slate Dark Navy, Crisp White
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Primary Brand Colors (Atiah Care Sunset Orange & Warm Amber) */
    --primary: #ea580c;
    --primary-hover: #c2410c;
    --primary-dark: #9a3412;
    --primary-deep: #431407;
    --primary-light: #fff7ed;
    --primary-border: #fed7aa;
    --primary-glow: rgba(234, 88, 12, 0.28);

    /* Secondary Brand Accent (Medical Pine / Deep Forest Green from Banner) */
    --accent: #0f766e;
    --accent-hover: #115e59;
    --accent-dark: #134e4a;
    --accent-deep: #042f2e;
    --accent-light: #f0fdfa;
    --accent-border: #99f6e4;
    --accent-glow: rgba(15, 118, 110, 0.25);

    /* Brand Gold & Sunshine Yellow (Badges, Stars, Promo Scallop) */
    --brand-gold: #f59e0b;
    --brand-gold-hover: #d97706;
    --brand-gold-light: #fef3c7;
    --brand-gold-border: #fde68a;

    /* Neutrals & Surfaces */
    --bg: #fafaf9;
    --card: #ffffff;
    --card-elevated: #ffffff;
    --text: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-light: #f8fafc;

    /* Semantic States */
    --success: #10b981;
    --success-dark: #059669;
    --success-light: #ecfdf5;
    --success-border: #a7f3d0;

    --warning: #f59e0b;
    --warning-dark: #d97706;
    --warning-light: #fffbeb;
    --warning-border: #fde68a;

    --danger: #ef4444;
    --danger-dark: #dc2626;
    --danger-light: #fef2f2;
    --danger-border: #fecaca;

    --info: #0284c7;
    --info-light: #f0f9ff;
    --info-border: #bae6fd;

    /* Radii */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
    --shadow-glow: 0 0 20px rgba(234, 88, 12, 0.22);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
}

/* ========================================================
   RESET & GLOBAL TYPOGRAPHY
   ======================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 15px;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

img, svg {
    display: inline-block;
    vertical-align: middle;
    max-width: 100%;
}

/* ========================================================
   LAYOUT CONTAINER & GRIDS
   ======================================================== */
.container {
    width: 100%;
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.container-narrow {
    max-width: 800px;
}

.container-wide {
    max-width: 1360px;
}

/* ========================================================
   CARDS & PANELS
   ======================================================== */
.card {
    background: var(--card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ========================================================
   BUTTONS (TOUCH-FRIENDLY & ACCESSIBLE)
   ======================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    min-height: 42px;
    user-select: none;
    line-height: 1;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #ffffff !important;
    box-shadow: 0 2px 6px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-secondary {
    background-color: #ffffff;
    color: var(--text-body);
    border-color: var(--border);
    box-shadow: var(--shadow-subtle);
}

.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: var(--border-hover);
    color: var(--text);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: #ffffff !important;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
    color: #ffffff !important;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #ffffff !important;
    box-shadow: 0 2px 6px var(--accent-glow);
}

.btn-accent:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    min-height: 34px;
    border-radius: var(--radius-xs);
}

.btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1.05rem;
    min-height: 48px;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

/* ========================================================
   FORM CONTROLS & INPUTS
   ======================================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.4rem;
    color: #1e293b;
}

.form-label.required::after {
    content: " *";
    color: var(--danger);
    font-weight: 700;
}

.form-control, .form-select {
    width: 100%;
    padding: 0.65rem 0.95rem;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    color: var(--text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    min-height: 44px;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2);
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    line-height: 1.4;
}

/* ========================================================
   BADGES & CHIPS
   ======================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3em 0.75em;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    letter-spacing: 0.025em;
    text-transform: uppercase;
    line-height: 1;
}

.badge-primary { background: var(--primary-light); color: var(--primary-dark); border: 1px solid var(--primary-border); }
.badge-success { background: var(--success-light); color: var(--success-dark); border: 1px solid var(--success-border); }
.badge-warning { background: var(--warning-light); color: var(--warning-dark); border: 1px solid var(--warning-border); }
.badge-danger  { background: var(--danger-light);  color: var(--danger-dark);  border: 1px solid var(--danger-border); }
.badge-secondary { background: #f1f5f9; color: #475569; border: 1px solid var(--border); }
.badge-info    { background: var(--accent-light); color: var(--accent-hover); border: 1px solid var(--accent-border); }

/* Dot Indicator */
.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    display: inline-block;
}

/* ========================================================
   ALERTS & NOTIFICATIONS
   ======================================================== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.92rem;
    line-height: 1.5;
    border: 1px solid transparent;
}

.alert-success { background: var(--success-light); color: #065f46; border-color: var(--success-border); }
.alert-danger  { background: var(--danger-light);  color: #991b1b; border-color: var(--danger-border); }
.alert-warning { background: var(--warning-light); color: #92400e; border-color: var(--warning-border); }
.alert-info    { background: var(--accent-light);  color: #075985; border-color: var(--accent-border); }

.btn-close {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding-left: 0.75rem;
    line-height: 1;
}
.btn-close:hover { opacity: 1; }

/* ========================================================
   RESPONSIVE TABLES & CLINICAL DATA
   ======================================================== */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: #ffffff;
}

.table th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    padding: 0.9rem 1rem;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background-color: #f8fafc;
}

/* ========================================================
   SLOT PICKER (INTERACTIVE CLINICAL SCHEDULE)
   ======================================================== */
.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.slot-item {
    padding: 0.65rem 0.25rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    background: #ffffff;
    transition: all var(--transition-fast);
}

.slot-item:hover:not(.disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
}

.slot-item.active {
    background-color: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
    box-shadow: 0 4px 10px var(--primary-glow);
}

.slot-item.disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    text-decoration: line-through;
    cursor: not-allowed;
    border-color: #e2e8f0;
    opacity: 0.7;
}

/* ========================================================
   STEPPER / TIMELINE FOR STATUS TRACKING
   ======================================================== */
.stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 2rem 0;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 25px;
    right: 25px;
    height: 3px;
    background: var(--border);
    z-index: 1;
}

.step-item {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: all var(--transition-base);
}

.step-item.active .step-circle {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 0 4px var(--primary-light);
}

.step-item.completed .step-circle {
    border-color: var(--success);
    background: var(--success);
    color: #ffffff;
}

.step-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.step-item.active .step-label {
    color: var(--primary-dark);
    font-weight: 700;
}

/* ========================================================
   STAR TWINKLING & CELESTIAL CLINICAL EFFECTS
   ======================================================== */
.top-bar-stars {
    background: linear-gradient(90deg, #9a3412 0%, #c2410c 25%, #ea580c 50%, #c2410c 75%, #9a3412 100%);
    color: #ffffff;
    font-size: 0.82rem;
    padding: 0.5rem 0;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(254, 215, 170, 0.35);
}

.star-twinkle {
    display: inline-block;
    animation: starTwinkle 2s infinite ease-in-out;
    transform-origin: center center;
    color: #fde047;
}

.star-twinkle-fast {
    display: inline-block;
    animation: starTwinkle 1.3s infinite ease-in-out;
    transform-origin: center center;
    color: #fde047;
}

.star-twinkle-slow {
    display: inline-block;
    animation: starTwinkle 2.8s infinite ease-in-out;
    transform-origin: center center;
    color: #fde047;
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.25;
        transform: scale(0.8) rotate(0deg);
        filter: drop-shadow(0 0 2px rgba(253, 224, 71, 0.4));
    }
    50% {
        opacity: 1;
        transform: scale(1.3) rotate(15deg);
        filter: drop-shadow(0 0 8px rgba(253, 224, 71, 0.9));
    }
}

/* Hero Header Banner dengan Efek Bintang & Gradient Sunset Atiah Care */
.hero-header-banner {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 28%, #f97316 62%, #fb923c 100%);
    border-radius: var(--radius-lg);
    padding: 2.75rem 2.25rem;
    color: #ffffff;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 36px -8px rgba(234, 88, 12, 0.35);
    border: 1px solid rgba(254, 215, 170, 0.45);
}

.hero-header-banner h1 {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(154, 52, 18, 0.35);
}

.hero-header-banner p {
    color: #fff7ed !important;
    text-shadow: 0 1px 3px rgba(154, 52, 18, 0.25);
}

.service-number-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.3);
}

.hero-star-particle {
    position: absolute;
    pointer-events: none;
    color: #fde047;
    user-select: none;
    animation: starTwinkle 2.2s infinite ease-in-out;
}

@keyframes shootingStar {
    0% {
        transform: translateX(-100px) translateY(-50px) rotate(-45deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    60% {
        transform: translateX(500px) translateY(250px) rotate(-45deg);
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

.shooting-star {
    position: absolute;
    top: 20px;
    left: 10%;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, #fde047, transparent);
    opacity: 0;
    animation: shootingStar 6s infinite ease-in;
    pointer-events: none;
}

/* ========================================================
   PUBLIC NAVBAR & NAVIGATION
   ======================================================== */
.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--primary);
    letter-spacing: -0.02em;
    max-height: 54px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-emblem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    font-size: 1.25rem;
}

.brand img,
.brand-logo-img {
    height: 42px !important;
    max-height: 42px !important;
    width: auto !important;
    max-width: 140px !important;
    object-fit: contain !important;
    border-radius: var(--radius-xs);
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
    transition: transform var(--transition-fast);
}

.brand:hover .brand-logo-img {
    transform: scale(1.04);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-body);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.4rem 0.2rem;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
    padding: 0.25rem;
}

/* Mobile Quick Bar (Sticky at bottom on phones) */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    z-index: 99;
    padding: 0.4rem 0.5rem;
}

.mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-xs);
    text-decoration: none;
}

.mobile-nav-btn.active, .mobile-nav-btn:hover {
    color: var(--primary);
}

.mobile-nav-btn svg, .mobile-nav-btn span.icon {
    font-size: 1.25rem;
}

/* ========================================================
   ADMIN & PETUGAS COMMAND BAR
   ======================================================== */
.admin-header {
    background: #0f172a;
    color: #ffffff;
    padding: 0.65rem 0;
    font-size: 0.88rem;
    border-bottom: 1px solid #1e293b;
}

.admin-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
}

.admin-nav {
    background: #ffffff;
    border-bottom: 1.5px solid var(--border);
    padding: 0.45rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.admin-nav-tabs {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0.2rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.admin-nav-tabs::-webkit-scrollbar {
    display: none;
}

.admin-nav-item {
    padding: 0.55rem 0.95rem;
    border-radius: var(--radius-sm);
    color: var(--text-body);
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all var(--transition-fast);
}

.admin-nav-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-hover);
}

.admin-nav-item.active {
    background-color: var(--primary);
    color: #ffffff !important;
    box-shadow: 0 2px 6px var(--primary-glow);
}

/* ========================================================
   KOTAK LAYANAN & PROGRAM (RESPONSIVE 2-3 BARIS)
   ======================================================== */
.layanan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1rem;
    margin-bottom: 1.75rem;
}

.layanan-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    padding: 1.35rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.layanan-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background 0.25s ease;
}

.layanan-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-border);
    box-shadow: 0 12px 24px -4px rgba(13, 148, 136, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
}

.layanan-card:hover::before {
    background: linear-gradient(90deg, var(--primary), #2dd4bf);
}

.layanan-card-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.layanan-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 0.85rem;
    margin-bottom: 0.4rem;
    line-height: 1.35;
}

.layanan-card-desc {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.55;
    flex-grow: 1;
    margin-bottom: 1.15rem;
}

.layanan-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.6rem 0.95rem;
    border-radius: var(--radius-xs);
    background: var(--primary-light);
    color: var(--primary-hover);
    font-size: 0.84rem;
    font-weight: 700;
    border: 1px solid var(--primary-border);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.layanan-card-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* Animasi Muncul Form */
@keyframes fadeInForm {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-revealed {
    display: block !important;
    animation: fadeInForm 0.35s ease forwards;
}

/* ========================================================
   FOOTER (MODERN, CLEAN & ATTRACTIVE)
   ======================================================== */
.footer {
    background: linear-gradient(180deg, #042f2e 0%, #021a19 100%);
    border-top: 1px solid rgba(45, 212, 191, 0.25);
    padding: 3.5rem 0 1.75rem;
    margin-top: auto;
    font-size: 0.9rem;
    color: #94a3b8;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.4), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr 1.1fr;
    gap: 2.25rem;
    margin-bottom: 2.5rem;
}

.footer-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.footer a:hover {
    color: #2dd4bf;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-list li {
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.5;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(45, 212, 191, 0.12);
    color: #5eead4;
    border: 1px solid rgba(45, 212, 191, 0.28);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
    font-weight: 600;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.82rem;
    color: #64748b;
}

/* ========================================================
   RESPONSIVE BREAKPOINTS (MOBILE & TABLET ADAPTATION)
   ======================================================== */
@media (max-width: 992px) {
    .layanan-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14.5px;
    }

    body {
        padding-bottom: 60px; /* Space for mobile bottom bar */
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card {
        padding: 1.15rem;
        border-radius: var(--radius-sm);
        margin-bottom: 1.15rem;
    }

    .hero-header-banner {
        padding: 1.75rem 1.25rem;
        border-radius: var(--radius-md);
    }

    .hero-header-banner h1 {
        font-size: 1.45rem !important;
    }

    .brand img,
    .brand-logo-img {
        height: 32px !important;
        max-height: 32px !important;
        max-width: 100px !important;
    }

    .nav-links {
        display: none; /* Replaced by mobile bottom bar & toggle */
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-bottom-bar {
        display: block;
    }

    .layanan-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .top-bar-stars {
        display: none; /* Compact space on phone */
    }

    /* Form Grids collapse to single column */
    .form-row-2col, .grid-2col {
        grid-template-columns: 1fr !important;
    }

    .slot-grid {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: 0.45rem;
    }
}

/* ========================================================
   POPUP BANNER MODAL (QR CODE & QRIS)
   ======================================================== */
.modal-banner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    z-index: 99999;
    padding: 1.25rem 1rem;
    overflow-y: auto;
    box-sizing: border-box;
    animation: bannerFadeIn 0.25s ease-out forwards;
}

.modal-banner-overlay.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

@media (max-height: 740px) {
    .modal-banner-overlay.active {
        align-items: flex-start;
        padding-top: 1.5rem;
        padding-bottom: 2.5rem;
    }
}

@keyframes bannerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bannerPopZoom {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-banner-card {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(234, 88, 12, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.4);
    overflow: hidden;
    position: relative;
    border: 2px solid #fed7aa;
    animation: bannerPopZoom 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    margin: auto;
}

.modal-banner-header {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 35%, #f97316 70%, #fbbf24 100%);
    padding: 1.25rem 1.25rem 1rem 1.25rem;
    color: #ffffff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.modal-banner-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-banner-close:hover {
    background: #ffffff;
    color: #ea580c;
    transform: rotate(90deg) scale(1.1);
}

.modal-banner-body {
    padding: 1.25rem 1.25rem;
    text-align: center;
    background: #ffffff;
}

.modal-banner-qr-box {
    background: #ffffff;
    padding: 8px;
    border-radius: 14px;
    display: inline-block;
    box-shadow: 0 8px 24px -4px rgba(234, 88, 12, 0.18);
    border: 2px solid #fed7aa;
    margin-bottom: 0.75rem;
}

.modal-banner-qr-box img {
    max-width: 100%;
    width: 195px;
    height: auto;
    display: block;
    border-radius: 8px;
    margin: 0 auto;
}

.modal-banner-footer {
    padding: 0.85rem 1.25rem 1rem 1.25rem;
    background: #fff7ed;
    border-top: 1px dashed #fed7aa;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================================
   MODUL CHAT KONSULTASI SOSIAL MEDIA MODERN & ELEGAN (RESPONSIVE)
   ======================================================== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 520px;
    max-height: 740px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    position: relative;
}

.chat-header-bar {
    padding: 1rem 1.35rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1.5px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    z-index: 5;
}

.chat-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.35rem;
    background: radial-gradient(circle at top left, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

.chat-messages-area::-webkit-scrollbar {
    width: 6px;
}
.chat-messages-area::-webkit-scrollbar-track {
    background: transparent;
}
.chat-messages-area::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.chat-messages-area::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.chat-bubble-row {
    display: flex;
    width: 100%;
    margin-bottom: 0.2rem;
    animation: fadeInBubble 0.25s ease-out;
}
.chat-bubble-row.pasien {
    justify-content: flex-end;
}
.chat-bubble-row.petugas {
    justify-content: flex-start;
}

@keyframes fadeInBubble {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-bubble-wrap {
    display: flex;
    align-items: flex-end;
    gap: 0.65rem;
    max-width: 82%;
}
.chat-bubble-row.pasien .chat-bubble-wrap {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    position: relative;
    border: 2px solid #ffffff;
    overflow: hidden;
}
.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.chat-avatar.petugas {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
}
.chat-avatar.pasien {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: #ffffff;
}

.chat-bubble {
    border-radius: 18px;
    padding: 0.85rem 1.15rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    position: relative;
    word-break: break-word;
    font-size: 0.93rem;
    line-height: 1.6;
}

.chat-bubble.pasien {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.22);
}
.chat-bubble.pasien .chat-bubble-body {
    color: #ffffff;
}
.chat-bubble.pasien .chat-bubble-time {
    color: rgba(255, 255, 255, 0.85);
}

.chat-bubble.petugas {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    border-bottom-left-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}
.chat-bubble.petugas .chat-bubble-body {
    color: #1e293b;
}

.chat-bubble-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.chat-bubble-body {
    word-wrap: break-word;
}

.chat-bubble-time {
    font-size: 0.7rem;
    margin-top: 0.4rem;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
}

.chat-attachment-img {
    margin-top: 0.5rem;
    border-radius: 12px;
    overflow: hidden;
    max-width: 260px;
    border: 1.5px solid rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.chat-attachment-img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.chat-attachment-img img {
    width: 100%;
    height: auto;
    display: block;
}

.social-reaction-strip {
    display: flex;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    overflow-x: auto;
    white-space: nowrap;
}
.reaction-pill {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    user-select: none;
}
.reaction-pill:hover {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #0369a1;
    transform: translateY(-1px);
}

.chat-composer-bar {
    padding: 0.75rem 1rem;
    background: #ffffff;
    border-top: 1.5px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.chat-composer-main {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    width: 100%;
}
.chat-composer-input {
    flex: 1;
    border-radius: 16px;
    border: 1.5px solid #cbd5e1;
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
    line-height: 1.45;
    resize: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8fafc;
}
.chat-composer-input:focus {
    outline: none;
    border-color: #0284c7;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}
.btn-attachment {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: all 0.15s;
}
.btn-attachment:hover {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #bae6fd;
}
.btn-send-social {
    height: 44px;
    padding: 0 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    border: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.btn-send-social:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.pulse-online {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
    animation: pulseGlow 1.8s infinite;
}
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.chat-date-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 0;
    position: relative;
}
.chat-date-separator::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}
.chat-date-separator span {
    position: relative;
    z-index: 2;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
}

.chat-lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    cursor: zoom-out;
}
.chat-lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

@media (max-width: 640px) {
    .chat-container {
        height: calc(100vh - 160px);
        min-height: 420px;
        border-radius: 14px;
    }
    .chat-bubble-wrap {
        max-width: 92%;
    }
    .chat-bubble {
        padding: 0.75rem 0.95rem;
        font-size: 0.88rem;
    }
    .social-reaction-strip {
        padding: 0.4rem 0.75rem;
    }
}

/* ========================================================
   IN-PLACE SOCIAL MEDIA DISCUSSION THREAD & COMMENTS
   ======================================================== */
.social-thread-panel {
    background: #f8fafc;
    border-top: 1.5px solid #edf2f7;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    margin: 1rem -1.45rem -1.25rem -1.45rem;
    padding: 1.25rem 1.45rem;
    animation: threadSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes threadSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.social-thread-comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 1rem;
}

.social-thread-comments-list::-webkit-scrollbar {
    width: 5px;
}
.social-thread-comments-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}

.social-comment-card {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.social-comment-card.is-pasien {
    flex-direction: row-reverse;
}

.social-comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    overflow: hidden;
    border: 2px solid #ffffff;
}

.social-comment-avatar.is-petugas {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: #ffffff;
}

.social-comment-avatar.is-pasien {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: #ffffff;
}

.social-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-comment-bubble {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.75rem 1rem;
    max-width: 82%;
    box-shadow: 0 1px 4px rgba(15,23,42,0.04);
}

.social-comment-card.is-pasien .social-comment-bubble {
    background: #f0fdfa;
    border-color: #ccfbf1;
}

.social-comment-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.social-comment-author {
    font-size: 0.85rem;
    font-weight: 800;
    color: #0f172a;
}

.social-comment-role {
    font-size: 0.72rem;
    color: #0d9488;
    background: #ccfbf1;
    padding: 1px 7px;
    border-radius: 9999px;
    font-weight: 700;
}

.social-comment-time {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-left: auto;
}

.social-comment-text {
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.social-comment-attachment {
    margin-top: 0.5rem;
    border-radius: 10px;
    overflow: hidden;
    max-width: 220px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: transform 0.2s;
}

.social-comment-attachment:hover {
    transform: scale(1.02);
}

.social-comment-attachment img {
    width: 100%;
    height: auto;
    display: block;
}

.social-composer-box {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.75rem;
    box-shadow: 0 2px 8px rgba(15,23,42,0.04);
}

.social-composer-textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-family: inherit;
    font-size: 0.88rem;
    color: #0f172a;
    min-height: 44px;
    line-height: 1.45;
}

.social-composer-textarea::placeholder {
    color: #94a3b8;
}

.social-composer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed #e2e8f0;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.social-composer-chips {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.social-chip-btn {
    font-size: 0.74rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 3px 9px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.social-chip-btn:hover {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

/* ========================================================
   RESPONSIVE STEPPER & MOBILE HELPERS
   ======================================================== */
.status-stepper-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    gap: 0.5rem;
    position: relative;
}
@media (max-width: 480px) {
    .status-stepper-grid {
        gap: 0.2rem;
    }
    .status-stepper-grid .step-title {
        font-size: 0.68rem !important;
        letter-spacing: -0.02em;
    }
    .status-stepper-grid .step-desc {
        font-size: 0.62rem !important;
    }
    .status-stepper-grid .step-icon {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.75rem !important;
        margin-bottom: 0.2rem !important;
    }
}

.table-responsive-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ========================================================
   PRINT STYLESHEET (RME & KASIR THERMAL)
   ======================================================== */
@media print {
    .navbar, .admin-nav, .top-bar-stars, .footer, .btn, .mobile-bottom-bar {
        display: none !important;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .card {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
    }
}
