
        /* ===== RESET & VARIABLES ===== */
        :root {
            --primary: #4F46E5;
            --primary-dark: #4338ca;
            --secondary: #0ea5e9;
            --accent: #8b5cf6;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --danger-gradient: linear-gradient(135deg, #ef4444 0%, #be123c 100%);
            --primary-gradient: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
            --kader-color: #059669;
            --pendidik-color: #d97706;
            --faskes-color: #7c3aed;
            --bidan-color: #db2777;
            --admin-color: #0369a1;
            
            
            /* Clean Frost Glass - lebih bening dan frosted */
            --glass-frost: rgba(255, 255, 255, 0.5);
            --glass-border: rgba(255, 255, 255, 0.9);
            --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
            --text-dark: #1e293b;
            --text-gray: #64748b;
            --radius-lg: 24px;
            --radius-md: 16px;
            --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.08);
            --shadow-card: 0 4px 20px rgba(0,0,0,0.02);
        }

        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; -webkit-tap-highlight-color: transparent; }

        body {
            background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 50%, #fae8ff 100%);
            background-attachment: fixed;
            min-height: 100vh;
            color: var(--text-dark);
            overflow-x: hidden;
        }

        /* ===== BACKGROUND ANIMATION ===== */
        .aurora-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; overflow: hidden; }
        .orb { position: fixed; border-radius: 50%; filter: blur(80px); opacity: 0.5; z-index: -1; animation: float 20s infinite ease-in-out; }
        .orb-1 { width: 50vw; height: 50vw; background: #a5b4fc; top: -10%; left: -10%; animation-delay: 0s; }
        .orb-2 { width: 60vw; height: 60vw; background: #f9a8d4; bottom: -10%; right: -10%; animation-delay: -5s; }
        .orb-3 { width: 40vw; height: 40vw; background: #6ee7b7; top: 40%; left: 60%; animation-delay: -10s; opacity: 0.3; }
        
        @keyframes float {
            0%, 100% { transform: translate(0, 0) scale(1); }
            33% { transform: translate(30px, -30px) scale(1.1); }
            66% { transform: translate(-20px, 20px) scale(0.9); }
        }

        /* ===== GRADIENT TEXT ===== */
        .gradient-text {
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            display: inline-block;
        }

        /* ===== SCROLL REVEAL ANIMATION ===== */
        .reveal {
            opacity: 0;
            transform: translateY(30px);
            transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
        }
        .reveal.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* ===== ROLE SELECTION - PROFESSIONAL REDESIGN ===== */
        .role-selection {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 50%, #fae8ff 100%);
            background-attachment: fixed;
            z-index: 9999;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            overflow-x: hidden;
        }

        /* Aurora Background Effect untuk Role Selection */
        .role-selection::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: -1;
            overflow: hidden;
        }

        /* Orb 1 - Ungu/Biru (kiri atas) */
        .role-selection::after {
            content: '';
            position: fixed;
            width: 60vw;
            height: 60vw;
            background: radial-gradient(circle, rgba(165, 180, 252, 0.4) 0%, transparent 70%);
            border-radius: 50%;
            top: -20%;
            left: -20%;
            filter: blur(60px);
            animation: floatOrb1 20s infinite ease-in-out;
            z-index: -1;
        }

        /* Orb tambahan dengan pseudo-element tambahan */
        .role-orb-1,
        .role-orb-2,
        .role-orb-3 {
            position: fixed;
            border-radius: 50%;
            filter: blur(60px);
            pointer-events: none;
            z-index: -1;
        }

        .role-orb-1 {
            width: 50vw;
            height: 50vw;
            background: radial-gradient(circle, rgba(249, 168, 212, 0.35) 0%, transparent 70%);
            bottom: -10%;
            right: -15%;
            animation: floatOrb2 25s infinite ease-in-out;
        }

        .role-orb-2 {
            width: 40vw;
            height: 40vw;
            background: radial-gradient(circle, rgba(110, 231, 183, 0.3) 0%, transparent 70%);
            top: 40%;
            left: 60%;
            animation: floatOrb3 18s infinite ease-in-out;
        }

        .role-orb-3 {
            width: 35vw;
            height: 35vw;
            background: radial-gradient(circle, rgba(167, 139, 250, 0.25) 0%, transparent 70%);
            top: 60%;
            left: 20%;
            animation: floatOrb1 22s infinite ease-in-out reverse;
        }

        @keyframes floatOrb1 {
            0%, 100% { transform: translate(0, 0) scale(1); }
            33% { transform: translate(30px, -30px) scale(1.1); }
            66% { transform: translate(-20px, 20px) scale(0.9); }
        }

        @keyframes floatOrb2 {
            0%, 100% { transform: translate(0, 0) scale(1); }
            33% { transform: translate(-25px, 25px) scale(1.05); }
            66% { transform: translate(15px, -15px) scale(0.95); }
        }

        @keyframes floatOrb3 {
            0%, 100% { transform: translate(0, 0) scale(1); }
            50% { transform: translate(20px, 20px) scale(1.08); }
        }

        .role-selection.hidden {
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.4s ease;
        }

        /* Header Section - Glassmorphism */
        .role-header {
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.5);
            padding: 20px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
            flex-shrink: 0;
            position: relative;
            z-index: 10;
        }

        .app-logo {
            display: flex;
            align-items: center;
            gap: 14px;
        }

        .logo-icon-wrapper {
            width: 48px;
            height: 48px;
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
            position: relative;
            overflow: hidden;
        }

        .logo-icon-wrapper::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
            transform: rotate(45deg);
            animation: shimmer 3s infinite;
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
            100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
        }

        .logo-icon-wrapper i {
            color: white;
            font-size: 1.5rem;
            position: relative;
            z-index: 1;
        }

        .logo-text {
            display: flex;
            flex-direction: column;
        }

        .app-name {
            font-size: 1.25rem;
            font-weight: 800;
            color: #1e293b;
            line-height: 1.2;
            letter-spacing: -0.02em;
        }

        .app-tagline {
            font-size: 0.75rem;
            color: #64748b;
            font-weight: 600;
            margin-top: 2px;
        }

        .header-badge {
            display: flex;
            align-items: center;
            gap: 6px;
            background: rgba(16, 185, 129, 0.1);
            color: #059669;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 700;
            border: 1px solid rgba(16, 185, 129, 0.2);
        }

        .badge-dot {
            width: 6px;
            height: 6px;
            background: #10b981;
            border-radius: 50%;
            animation: pulse 2s infinite;
        }

        /* Content Area */
        .role-content {
            flex: 1;
            padding: 32px 24px;
            max-width: 900px; /* Sedikit lebih lebar untuk 3 kolom */
            margin: 0 auto;
            width: 100%;
            display: flex;
            flex-direction: column;
        }
        .role-intro {
            text-align: center;
            margin-bottom: 32px;
        }

        .role-title {
            font-size: 1.75rem;
            font-weight: 800;
            color: #1e293b;
            margin-bottom: 8px;
            letter-spacing: -0.02em;
        }

        .role-subtitle {
            font-size: 0.95rem;
            color: #64748b;
            line-height: 1.6;
            max-width: 500px;
            margin: 0 auto;
        }

        /* Grid Layout */
        .role-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
            margin-bottom: 32px;
        }

        /* Tablet: 2 kolom */
        @media (min-width: 640px) {
            .role-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 20px;
            }
        }

        /* Desktop: 3 kolom (kartu lebih besar) */
        @media (min-width: 1024px) {
            .role-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 24px;
            }
            
            /* Kartu lebih besar di desktop */
            .role-card.professional {
                min-height: 220px;
            }
            
            .icon-circle {
                width: 64px;
                height: 64px;
                font-size: 2rem;
            }
            
            .card-content h3 {
                font-size: 1.1rem;
            }
            
            .card-content p {
                font-size: 0.9rem;
            }
        }

        /* Large Desktop: tetap 3 kolom tapi lebih lebar */
        @media (min-width: 1400px) {
            .role-content {
                max-width: 1000px;
            }
        }

        /* Professional Cards - Glassmorphism */
        .role-card.professional {
            background: rgba(255, 255, 255, 0.75);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 0;
            border: 1px solid rgba(255, 255, 255, 0.6);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05), 
                        inset 0 1px 0 rgba(255, 255, 255, 0.6);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
            overflow: hidden;
            position: relative;
            display: flex;
            flex-direction: column;
        }

        .role-card.professional:hover {
            background: rgba(255, 255, 255, 0.9);
            transform: translateY(-6px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 
                        inset 0 1px 0 rgba(255, 255, 255, 0.8);
            border-color: rgba(255, 255, 255, 0.8);
        }

        .role-card.professional:hover {
            transform: translateY(-4px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            border-color: #cbd5e1;
        }

        .role-card.professional:active {
            transform: translateY(-2px) scale(0.98);
        }

        .card-visual {
            position: relative;
            padding: 24px 20px 16px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .icon-circle {
            width: 56px;
            height: 56px;
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.75rem;
            box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
            position: relative;
            z-index: 2;
            transition: transform 0.3s ease;
        }

        .role-card.professional:hover .icon-circle {
            transform: scale(1.1) rotate(-5deg);
        }

        .card-glow {
            position: absolute;
            width: 80px;
            height: 80px;
            border-radius: 50%;
            filter: blur(40px);
            opacity: 0.6;
            z-index: 1;
            transition: opacity 0.3s ease;
        }

        .role-card.professional:hover .card-glow {
            opacity: 0.8;
        }

        .card-content {
            padding: 0 20px 20px;
            text-align: center;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .card-content h3 {
            font-size: 1rem;
            font-weight: 700;
            color: #1e293b;
            margin-bottom: 6px;
        }

        .card-content p {
            font-size: 0.8rem;
            color: #64748b;
            line-height: 1.5;
            margin-bottom: 16px;
            flex: 1;
        }

        .card-action {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 10px 16px;
            background: #f8fafc;
            border-radius: 12px;
            font-size: 0.85rem;
            font-weight: 600;
            color: #475569;
            transition: all 0.2s ease;
            margin-top: auto;
        }

        .role-card.professional:hover .card-action {
            background: #f1f5f9;
            color: #1e293b;
        }

        .card-action i {
            transition: transform 0.2s ease;
        }

        .role-card.professional:hover .card-action i {
            transform: translateX(4px);
        }

        /* Admin Card Special Styling - Mobile: full width, Desktop: normal */
        .role-card.professional.admin-card {
            grid-column: span 2;
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
            border-color: #7dd3fc;
        }

        /* Tablet dan Desktop: admin card normal size */
        @media (min-width: 640px) {
            .role-card.professional.admin-card {
                grid-column: span 1;
            }
        }

        .role-card.professional.admin-card .card-action {
            background: rgba(3, 105, 161, 0.1);
            color: #0369a1;
        }

        .role-card.professional.admin-card:hover .card-action {
            background: rgba(3, 105, 161, 0.15);
        }

        /* Footer - Glassmorphism */
        .role-footer {
            margin-top: auto;
            padding: 20px 24px;
            background: rgba(255, 255, 255, 0.5);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-top: 1px solid rgba(255, 255, 255, 0.4);
        }

        .footer-info {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            color: #94a3b8;
            font-size: 0.8rem;
            font-weight: 500;
        }

        .footer-info i {
            color: #64748b;
        }

        /* Mobile Optimizations */
        @media (max-width: 480px) {
            .role-header {
                padding: 16px 20px;
            }

            .logo-icon-wrapper {
                width: 40px;
                height: 40px;
            }

            .logo-icon-wrapper i {
                font-size: 1.25rem;
            }

            .app-name {
                font-size: 1.1rem;
            }

            .role-content {
                padding: 24px 16px;
            }

            .role-title {
                font-size: 1.5rem;
            }

            .role-grid {
                gap: 12px;
            }

            .icon-circle {
                width: 48px;
                height: 48px;
                font-size: 1.5rem;
            }

            .card-content h3 {
                font-size: 0.9rem;
            }

            .card-content p {
                font-size: 0.75rem;
            }
        }

        /* Animation for cards */
        .role-card.professional {
            animation: cardEnter 0.5s ease-out backwards;
        }

        .role-card.professional:nth-child(1) { animation-delay: 0.05s; }
        .role-card.professional:nth-child(2) { animation-delay: 0.1s; }
        .role-card.professional:nth-child(3) { animation-delay: 0.15s; }
        .role-card.professional:nth-child(4) { animation-delay: 0.2s; }
        .role-card.professional:nth-child(5) { animation-delay: 0.25s; }
        .role-card.professional:nth-child(6) { animation-delay: 0.3s; }
        .role-card.professional:nth-child(7) { animation-delay: 0.35s; }

        @keyframes cardEnter {
            from {
                opacity: 0;
                transform: translateY(20px) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        /* Safe area untuk notch phones */
        @supports (padding-top: env(safe-area-inset-top)) {
            .role-header {
                padding-top: max(20px, env(safe-area-inset-top));
            }
        }

        /* ===== MAIN LAYOUT ===== */
        .app-container {
            max-width: 480px; margin: 0 auto; padding: 20px; padding-bottom: 100px;
            animation: slideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
        }

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

        /* ===== HEADER ===== */
        .app-header {
            background: var(--glass-frost); backdrop-filter: blur(20px);
            border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
            padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow-soft);
            position: sticky; top: 20px; z-index: 100;
        }
        .header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
        .brand { display: flex; align-items: center; gap: 12px; }
                .brand-icon {
            width: 44px; height: 44px; 
            background: var(--primary-gradient);
            border-radius: 14px; 
            display: flex; align-items: center; justify-content: center;
            color: white; 
            font-size: 1.75rem; 
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
            transition: all 0.3s ease;
        }
                .brand-text h1 { 
            font-size: 1.15rem; 
            font-weight: 800; 
            line-height: 1.2;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .brand-text span { 
            font-size: 0.8rem; 
            color: var(--text-gray); 
            font-weight: 600;
            display: block;
            margin-top: 2px;
        }
        
        .badge-live {
            display: inline-flex; align-items: center; gap: 6px;
            background: rgba(16, 185, 129, 0.1); color: var(--success);
            padding: 6px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
            border: 1px solid rgba(16, 185, 129, 0.2);
        }
        .dot-pulse { width: 8px; height: 8px; background: var(--success); border-radius: 50%; animation: pulse 2s infinite; }
        @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); } 70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }

        /* Emergency bar dengan animasi */
        .emergency-bar {
            background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
            border: 1px solid rgba(239, 68, 68, 0.2); border-radius: 12px;
            padding: 12px; display: flex; align-items: center; justify-content: space-between;
            animation: emergencyPulse 2s infinite;
        }
        @keyframes emergencyPulse {
            0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
            70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
            100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
        }
        .emergency-info { display: flex; align-items: center; gap: 10px; }
        .emergency-icon { color: var(--danger); font-size: 1.5rem; animation: shake 0.5s infinite; }
        @keyframes shake {
            0% { transform: rotate(0deg); }
            25% { transform: rotate(5deg); }
            75% { transform: rotate(-5deg); }
            100% { transform: rotate(0deg); }
        }
        .emergency-text { font-size: 0.85rem; font-weight: 700; color: #991b1b; }
        .emergency-text span { font-size: 0.75rem; color: #ef4444; font-weight: 500; display: block; }
        .btn-call {
            background: var(--danger-gradient); color: white; border: none;
            width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
            transition: transform 0.2s;
        }
        .btn-call:active { transform: scale(0.95); }

        /* ===== TAB NAVIGATION ===== */
        .tab-nav {
            display: flex; gap: 8px; margin-bottom: 20px;
            background: var(--glass-frost); backdrop-filter: blur(10px);
            padding: 6px; border-radius: 16px; border: 1px solid var(--glass-border);
        }
        .tab-btn {
            flex: 1; padding: 12px; border: none; background: transparent;
            border-radius: 12px; font-weight: 700; font-size: 0.85rem; color: var(--text-gray);
            cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; gap: 6px;
        }
        .tab-btn.active { background: white; color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
        .tab-btn i { font-size: 1.1rem; }

        /* ===== CONTENT SECTIONS ===== */
        .content-section { 
            display: none; 
            animation: fadeIn 0.3s; 
        }
        .content-section.active { 
            display: block !important; 
        }

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

        /* ===== CARDS (FROST GLASS) ===== */
        .glass-card {
            background: var(--glass-frost); backdrop-filter: blur(20px) saturate(180%);
            border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
            padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow-soft);
            -webkit-backdrop-filter: blur(20px) saturate(180%);
        }
        .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
        .card-title { font-size: 1rem; font-weight: 700; }
        .card-action { font-size: 0.8rem; color: var(--primary); font-weight: 600; cursor: pointer; }

        /* ===== MAP SECTION ===== */
        .map-wrapper {
            position: relative; height: 200px; border-radius: var(--radius-md);
            overflow: hidden; border: 2px solid white; box-shadow: 0 4px 15px rgba(0,0,0,0.05);
            margin-top: 12px;
        }
#map, #map-public, #map-officer, #map-kader, #map-bidan { 
    width: 100%; 
    height: 100%; 
    z-index: 1;
    background: #f0f9ff;
}
        .map-overlay {
            position: absolute; bottom: 12px; left: 12px; right: 12px;
            background: var(--glass-frost); backdrop-filter: blur(8px);
            padding: 10px 14px; border-radius: 12px; z-index: 500;
            font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; gap: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .map-overlay i { color: var(--primary); }
        .map-hint {
            font-size: 0.7rem; color: var(--text-gray); margin-top: 4px; text-align: center;
        }

        /* ===== BENTO GRID ===== */
        .bento-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-bottom: 16px;
        }

        @media (min-width: 768px) {
            .bento-grid {
                max-width: 800px;
                margin-left: auto;
                margin-right: auto;
                gap: 16px;
            }
            .bento-item.full {
                grid-column: span 2;
            }
        }
        .bento-item {
            background: var(--glass-frost); 
            backdrop-filter: blur(20px) saturate(180%);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius-md);
            padding: 20px;
            box-shadow: var(--shadow-soft);
            transition: transform 0.2s;
            grid-column: span 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            min-height: 120px;
            overflow: hidden;
            word-wrap: break-word;
            position: relative;
        }

        @media (min-width: 768px) {
            .bento-item {
                min-height: 140px;
                padding: 24px;
            }
        }
        .bento-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        }
        .bento-item.large {
            grid-column: span 2;
        }
        .bento-item.full {
            grid-column: span 2;
        }
        .bento-item.warning { 
            background: rgba(254, 226, 226, 0.7); 
            border-color: rgba(239, 68, 68, 0.2);
        }
        .bento-item.success { 
            background: rgba(209, 250, 229, 0.7); 
            border-color: rgba(16, 185, 129, 0.2);
        }
        .bento-item.primary { 
            background: rgba(224, 231, 255, 0.7); 
            border-color: rgba(79, 70, 229, 0.2);
        }

        @media (max-width: 480px) {
            .bento-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
            }
            .bento-item {
                padding: 16px;
                min-height: 90px;
            }
            .bento-item.large {
                grid-column: span 1;
            }
            .bento-item.full {
                grid-column: span 2;
            }
        }

        /* ===== STATS CARD ===== */
        .stat-label { 
            font-size: 0.75rem; 
            color: var(--text-gray); 
            font-weight: 600; 
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .stat-value { 
            font-size: 2rem; 
            font-weight: 800; 
            color: var(--text-dark); 
            line-height: 1;
            margin-bottom: 8px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        @media (min-width: 768px) {
            .stat-value {
                font-size: 2.5rem;
            }
            .stat-label {
                font-size: 0.85rem;
            }
        }
        .stat-trend { 
            font-size: 0.7rem; 
            color: var(--text-gray);
            display: flex; 
            align-items: center; 
            gap: 4px;
            font-weight: 500;
        }
        .stat-trend i {
            font-size: 0.9rem;
        }

        @media (max-width: 480px) {
            .stat-value {
                font-size: 1.5rem;
            }
            .stat-label {
                font-size: 0.7rem;
            }
        }

        /* ===== KATEGORI & URGENSI ===== */
        .section-label { font-size: 0.8rem; font-weight: 700; color: var(--text-gray); margin-bottom: 10px; display: block; text-transform: uppercase; letter-spacing: 0.5px; }
        
        .category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
        .cat-item {
            background: var(--glass-frost); backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            border-radius: 14px; padding: 14px 8px; display: flex; flex-direction: column;
            align-items: center; justify-content: center; gap: 6px; cursor: pointer;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        .cat-item i { font-size: 1.5rem; color: var(--text-gray); transition: all 0.2s; }
        .cat-item span { font-size: 0.7rem; font-weight: 600; color: var(--text-gray); text-align: center; line-height: 1.2; }
        .cat-item:hover { background: white; transform: translateY(-4px) scale(1.02); box-shadow: 0 8px 16px rgba(0,0,0,0.08); }
        .cat-item.active { background: #eef2ff; border-color: var(--primary); box-shadow: 0 8px 20px rgba(79, 70, 229, 0.2); }
        .cat-item.active i, .cat-item.active span { color: var(--primary); font-weight: 700; }

        /* ===== PRIORITY SELECTOR ===== */
        .priority-selector { 
            display: grid; 
            grid-template-columns: repeat(3, 1fr);
            gap: 12px; 
            margin-bottom: 24px; 
        }

        .priority-btn {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 20px 12px;
            background: var(--glass-frost);
            backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            border-radius: 16px;
            font-weight: 600;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
            text-align: center;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.02);
        }

        .priority-btn i { 
            font-size: 1.5rem;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 12px;
            transition: all 0.3s ease;
            background: rgba(255,255,255,0.5);
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        }

        .priority-btn span {
            display: block;
            letter-spacing: 0.3px;
            z-index: 1;
        }

        .priority-btn.urgent { color: #dc2626; background: rgba(254, 226, 226, 0.3); }
        .priority-btn.urgent i { background: rgba(239, 68, 68, 0.1); color: #dc2626; }

        .priority-btn.moderate { color: #d97706; background: rgba(254, 243, 199, 0.3); }
        .priority-btn.moderate i { background: rgba(245, 158, 11, 0.1); color: #d97706; }

        .priority-btn.low { color: #059669; background: rgba(209, 250, 229, 0.3); }
        .priority-btn.low i { background: rgba(16, 185, 129, 0.1); color: #059669; }

        .priority-btn:hover { 
            transform: translateY(-4px); 
            box-shadow: 0 8px 24px rgba(0,0,0,0.08);
            border-color: rgba(255,255,255,0.8);
        }
        .priority-btn:hover i { transform: scale(1.1) rotate(-5deg); }

        .priority-btn.urgent.active { 
            background: rgba(254, 226, 226, 0.6); 
            border-color: rgba(239, 68, 68, 0.3);
            box-shadow: 0 8px 24px rgba(239, 68, 68, 0.15), inset 0 1px 0 rgba(255,255,255,0.5);
        }
        .priority-btn.urgent.active i {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            color: white;
            box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
        }

        .priority-btn.moderate.active { 
            background: rgba(254, 243, 199, 0.6); 
            border-color: rgba(245, 158, 11, 0.3);
            box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15), inset 0 1px 0 rgba(255,255,255,0.5);
        }
        .priority-btn.moderate.active i {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            color: white;
            box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
        }

        .priority-btn.low.active { 
            background: rgba(209, 250, 229, 0.6); 
            border-color: rgba(16, 185, 129, 0.3);
            box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15), inset 0 1px 0 rgba(255,255,255,0.5);
        }
        .priority-btn.low.active i {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
        }

        .priority-btn.active { transform: translateY(-2px) scale(1.02); font-weight: 700; }

        .priority-btn.active::after {
            content: '✓';
            position: absolute;
            top: -6px;
            right: -6px;
            width: 22px;
            height: 22px;
            background: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            font-weight: 700;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            z-index: 10;
            opacity: 0;
            transform: scale(0.5);
            transition: all 0.2s ease-out;
            border: 2px solid currentColor;
        }

        .priority-btn.active::after { opacity: 1; transform: scale(1); }

        .priority-btn.urgent.active::after { color: #dc2626; }
        .priority-btn.moderate.active::after { color: #d97706; }
        .priority-btn.low.active::after { color: #059669; }

        .priority-btn { overflow: visible !important; }

        @media (max-width: 480px) {
            .priority-selector { gap: 8px; }
            .priority-btn { padding: 16px 8px; font-size: 0.75rem; }
            .priority-btn i { width: 36px; height: 36px; font-size: 1.25rem; }
        }

        /* ===== FORM INPUTS ===== */
        .input-group { margin-bottom: 16px; }
        .modern-input {
            width: 100%; padding: 14px 16px; border-radius: 14px;
            border: 1px solid var(--glass-border); background: var(--glass-frost);
            font-size: 0.95rem; color: var(--text-dark); outline: none;
            transition: all 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        }
        .modern-input:focus { background: white; border-color: var(--primary); box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1); }
        textarea.modern-input { resize: none; height: 100px; }

        /* ===== TOGGLE SWITCH ===== */
        .toggle-group { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
        .toggle-label { font-size: 0.9rem; font-weight: 600; }
        .toggle-sublabel { font-size: 0.75rem; color: var(--text-gray); }
        .toggle-switch { position: relative; width: 50px; height: 28px; }
        .toggle-switch input { opacity: 0; width: 0; height: 0; }
        .toggle-slider {
            position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
            background-color: #cbd5e1; transition: .4s; border-radius: 28px;
        }
        .toggle-slider:before {
            position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px;
            background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }
        input:checked + .toggle-slider { background-color: var(--primary); }
        input:checked + .toggle-slider:before { transform: translateX(22px); }

        /* ===== SUBMIT BUTTON ===== */
        .btn-submit {
            width: 100%; padding: 18px; border-radius: var(--radius-md); border: none;
            background: var(--danger-gradient); color: white; font-size: 1rem; font-weight: 700;
            cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
            box-shadow: 0 10px 25px -5px rgba(220, 38, 38, 0.4);
            transition: all 0.2s; margin-top: 8px;
        }
        .btn-submit:hover { transform: translateY(-2px); box-shadow: 0 15px 30px -5px rgba(220, 38, 38, 0.5); }
        .btn-submit:active { transform: scale(0.98); }
        .btn-submit:disabled { background: #cbd5e1; box-shadow: none; cursor: not-allowed; transform: none; }

.btn-switch-role {
    width: 100%; padding: 14px; border-radius: var(--radius-md); border: none;
    background: var(--primary-gradient); color: white; font-size: 0.9rem; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 8px 20px -5px rgba(79, 70, 229, 0.3);
    transition: all 0.2s; margin-top: 12px;
}

/* ===== ACCESS CODE INPUT STYLES ===== */
.access-code-section {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    margin-top: 16px;
}

.access-code-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-gray);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.access-code-label i {
    color: var(--primary);
    font-size: 1rem;
}

.access-code-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex-wrap: wrap;
}

.access-code-input {
    flex: 1;
    min-width: 140px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid var(--glass-border);
    background: var(--glass-frost);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    outline: none;
    transition: all 0.2s;
}

.access-code-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.access-code-input.error {
    border-color: var(--danger);
    background: rgba(254, 226, 226, 0.5);
    animation: shake 0.5s ease-in-out;
}

.access-code-input.success {
    border-color: var(--success);
    background: rgba(209, 250, 229, 0.5);
}

.btn-verify-code {
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    background: var(--primary-gradient);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: 50px;
    flex-shrink: 0;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .access-code-input-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .access-code-input {
        width: 100%;
        font-size: 1.1rem;
        padding: 16px;
        letter-spacing: 3px;
    }
    
    .btn-verify-code {
        width: 100%;
        padding: 14px;
        font-size: 0.9rem;
    }
    
    .btn-verify-code i {
        font-size: 1.2rem;
    }
}

/* Tablet and Desktop */
@media (min-width: 481px) {
    .access-code-input {
        min-width: 180px;
    }
    
    .btn-verify-code {
        padding: 14px 24px;
    }
}
.btn-verify-code:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -5px rgba(79, 70, 229, 0.4);
}

.btn-verify-code:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.code-status {
    margin-top: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 20px;
}

.code-status.error {
    color: var(--danger);
}

.code-status.success {
    color: var(--success);
}

.code-status i {
    font-size: 1rem;
}

/* Role-specific colors for access code */
.role-officer .access-code-label i { color: var(--danger); }
.role-kader .access-code-label i { color: var(--kader-color); }
.role-pendidik .access-code-label i { color: var(--pendidik-color); }
.role-faskes .access-code-label i { color: var(--faskes-color); }
.role-bidan .access-code-label i { color: var(--bidan-color); }

.role-officer .access-code-input:focus { border-color: var(--danger); }
.role-kader .access-code-input:focus { border-color: var(--kader-color); }
.role-pendidik .access-code-input:focus { border-color: var(--pendidik-color); }
.role-faskes .access-code-input:focus { border-color: var(--faskes-color); }
.role-bidan .access-code-input:focus { border-color: var(--bidan-color); }

.role-officer .btn-verify-code { background: var(--danger-gradient); }
.role-kader .btn-verify-code { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
.role-pendidik .btn-verify-code { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); }
.role-faskes .btn-verify-code { background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%); }
.role-bidan .btn-verify-code { background: linear-gradient(135deg, #db2777 0%, #be185d 100%); }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.locked-overlay {
    position: relative;
}

.locked-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    border-radius: var(--radius-md);
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.locked-overlay.locked::after {
    opacity: 1;
    pointer-events: all;
}

.lock-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    z-index: 11;
    display: none;
}

.locked-overlay.locked .lock-message {
    display: block;
}

.lock-message i {
    font-size: 2rem;
    color: var(--danger);
    margin-bottom: 8px;
    display: block;
}

.lock-message p {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}
        .btn-switch-role:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -5px rgba(79, 70, 229, 0.4); }

        /* ===== REPORT LIST ===== */
        .report-list { display: flex; flex-direction: column; gap: 12px; }
        .report-item {
            background: var(--glass-frost); backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            border-radius: 16px; padding: 16px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            transition: all 0.2s; cursor: pointer;
        }
        .report-item:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,0.08); }
        .report-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 10px; }
        .report-id { font-size: 0.75rem; color: var(--text-gray); font-weight: 600; }
        .report-status { font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; }
        .status-baru { background: #dbeafe; color: #1e40af; }
        .status-proses { background: #fef3c7; color: #92400e; }
        .status-selesai { background: #d1fae5; color: #065f46; }
        .status-ditolak { background: #fee2e2; color: #991b1b; }
        .report-content { margin-bottom: 12px; }
        .report-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
        .report-desc { font-size: 0.85rem; color: var(--text-gray); line-height: 1.4; }
        .report-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; color: var(--text-gray); }
        .report-meta { display: flex; gap: 12px; }
        .report-meta span { display: flex; align-items: center; gap: 4px; }

                /* ===== TIMELINE MODERN ===== */
        .timeline-container {
            position: relative;
            margin: 24px 0;
            padding: 0 8px;
        }

        .timeline-line {
            position: absolute;
            top: 20px;
            left: 24px;
            right: 24px;
            height: 3px;
            background: #e2e8f0;
            border-radius: 2px;
            z-index: 1;
        }

        .timeline-steps {
            display: flex;
            justify-content: space-between;
            position: relative;
            z-index: 2;
        }

        .timeline-step {
            display: flex;
            flex-direction: column;
            align-items: center;
            flex: 1;
            text-align: center;
            position: relative;
        }

        .step-dot {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: white;
            border: 3px solid #e2e8f0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            color: #94a3b8;
            margin-bottom: 8px;
            transition: all 0.3s ease;
            position: relative;
            z-index: 3;
        }

        .timeline-step.completed .step-dot {
            background: var(--success);
            border-color: var(--success);
            color: white;
        }

        .timeline-step.active .step-dot {
            box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
            animation: pulse-dot 2s infinite;
        }

        .timeline-step.rejected .step-dot {
            background: var(--danger);
            border-color: var(--danger);
            color: white;
        }

        .timeline-step.inactive .step-dot {
            background: #f1f5f9;
            border-color: #cbd5e1;
            color: #94a3b8;
        }

        @keyframes pulse-dot {
            0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
            70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
            100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
        }

        .step-content {
            max-width: 100px;
        }

        .step-title {
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--text-dark);
            margin-bottom: 2px;
            line-height: 1.2;
        }

        .step-time {
            font-size: 0.7rem;
            color: var(--text-gray);
            line-height: 1.2;
        }

        .timeline-step.completed .step-title {
            color: var(--success);
        }

        .timeline-step.rejected .step-title {
            color: var(--danger);
        }

        .timeline-step.inactive .step-title {
            color: #94a3b8;
        }

        /* Progress line fill */
        .timeline-line-fill {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            background: linear-gradient(90deg, var(--success), #34d399);
            border-radius: 2px;
            transition: width 0.5s ease;
        }

        /* Mobile adjustment */
        @media (max-width: 480px) {
            .step-dot {
                width: 36px;
                height: 36px;
                font-size: 0.9rem;
            }
            
            .step-content {
                max-width: 80px;
            }
            
            .step-title {
                font-size: 0.75rem;
            }
            
            .step-time {
                font-size: 0.65rem;
            }
            
            .timeline-line {
                top: 18px;
            }
        }

        /* ===== FILTER CHIPS ===== */
        .filter-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 16px; scrollbar-width: none; }
        .filter-chips::-webkit-scrollbar { display: none; }
        .chip {
            padding: 8px 16px; background: var(--glass-frost); backdrop-filter: blur(5px);
            border: 1px solid var(--glass-border);
            border-radius: 20px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; cursor: pointer;
        }
        .chip.active { background: var(--primary); color: white; }

        /* ===== CHART ===== */
        .chart-container { height: 200px; margin-top: 16px; }

        /* ===== MODAL ===== */
        .modal {
            display: flex;
            position: fixed; 
            top: 0; 
            left: 0; 
            width: 100%; 
            height: 100%;
            background: rgba(255, 255, 255, 0.4);
            z-index: 9998; 
            opacity: 0;
            visibility: hidden;
            transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
            backdrop-filter: blur(20px) saturate(180%);
            -webkit-backdrop-filter: blur(20px) saturate(180%);
            align-items: flex-end; 
            justify-content: center;
            pointer-events: none;
        }

        /* Modal login admin tampil di tengah layar */
#adminLoginModal {
    align-items: center;
    padding: 20px;
    z-index: 10000; /* Pastikan lebih tinggi dari role selection */
}

#adminLoginModal .modal-content {
    border-radius: 24px !important;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    max-width: 400px;
    width: 90%;
}

#adminLoginModal.active .modal-content {
    transform: scale(1);
}

/* Pastikan modal tidak terhidden */
#adminLoginModal.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
}
        #adminLoginModal .modal-content {
            border-radius: 24px !important;
            transform: scale(0.9);
            transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
        }
        #adminLoginModal.active .modal-content {
            transform: scale(1);
        }
        .modal.active { 
            opacity: 1; 
            visibility: visible;
            pointer-events: all;
        }
        .modal-content {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            width: 100%; 
            max-width: 480px; 
            max-height: 90vh;
            border-radius: 24px 24px 0 0; 
            padding: 24px;
            transform: translateY(100%); 
            transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
            overflow-y: auto;
            box-shadow: 0 -10px 40px rgba(0,0,0,0.08);
        }
        .modal.active .modal-content { 
            transform: translateY(0); 
        }
        .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        .modal-title { font-size: 1.25rem; font-weight: 800; }
        .btn-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-gray); }

                /* ===== ACTION BUTTONS ===== */
        .action-group { 
            display: flex; 
            flex-wrap: wrap;
            gap: 10px; 
            margin-top: 16px; 
        }
        
        .action-group:has(> :only-child) {
            justify-content: center;
        }
        
        .action-group:has(> :only-child) .btn-action {
            min-width: 200px;
            max-width: 100%;
        }
        
        .btn-action {
            flex: 1;
            min-width: 120px;
            padding: 14px 16px; 
            border-radius: 12px; 
            border: none; 
            font-weight: 700; 
            font-size: 0.9rem;
            cursor: pointer; 
            display: flex; 
            align-items: center; 
            justify-content: center; 
            gap: 8px;
            transition: all 0.2s;
            white-space: nowrap;
        }
        
        .btn-action i {
            font-size: 1.1rem;
        }
        
        .btn-primary { 
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); 
            color: white; 
            box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
        }
        
        .btn-success { 
            background: linear-gradient(135deg, var(--success) 0%, #059669 100%); 
            color: white; 
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
        }
        
        .btn-danger { 
            background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%); 
            color: white; 
            box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
        }
        
        .btn-secondary { 
            background: #f1f5f9; 
            color: var(--text-dark); 
            border: 2px solid #e2e8f0;
        }
        
        .btn-secondary:hover {
            background: #e2e8f0;
            border-color: #cbd5e1;
        }

        /* Mobile Optimizations */
        @media (max-width: 480px) {
            .action-group {
                flex-direction: column;
                gap: 8px;
            }
            
            .btn-action {
                width: 100%;
                padding: 16px;
                font-size: 0.95rem;
            }
            
            .action-group:has(> :only-child) .btn-action {
                min-width: 100%;
                max-width: 100%;
            }
            
            /* Jika hanya 1 tombol (tutup), buat lebih prominent */
            .action-group.single-button .btn-secondary {
                background: white;
                border: 2px solid var(--text-gray);
                color: var(--text-dark);
                font-weight: 700;
            }
        }

        @media (max-width: 360px) {
            .btn-action {
                padding: 14px;
                font-size: 0.9rem;
            }
        }

        /* ===== EMPTY STATE ===== */
        .empty-state { text-align: center; padding: 40px 20px; color: var(--text-gray); }
        .empty-state i { font-size: 3rem; margin-bottom: 12px; opacity: 0.3; }
        .empty-state h3 { font-size: 1rem; margin-bottom: 4px; color: var(--text-dark); }

        /* ===== TOAST ===== */
        .toast {
            position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px);
            background: #1e293b; color: white; padding: 14px 24px; border-radius: 50px;
            font-size: 0.9rem; opacity: 0; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            z-index: 9999; display: flex; align-items: center; gap: 10px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3); font-weight: 600;
        }
        .toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
        .toast.success { background: var(--success); }
        .toast.error { background: var(--danger); }

        /* ===== ROLE BADGE COLORS ===== */
        .role-kader { color: var(--kader-color); }
        .role-pendidik { color: var(--pendidik-color); }
        .role-faskes { color: var(--faskes-color); }
        .role-bidan { color: var(--bidan-color); }

@media (max-width: 480px) {
    .app-container { padding: 16px; padding-bottom: 100px; }
    .role-cards { grid-template-columns: repeat(2, 1fr); } /* dua kolom di layar kecil */
}

@media (max-width: 360px) {
    .role-cards { grid-template-columns: 1fr; } /* satu kolom untuk layar sangat kecil */
}

#adminLoginError {
    display: none; 
    margin-top: 14px; 
    background: #fee2e2; 
    color: #991b1b; 
    padding: 12px 16px; 
    border-radius: 12px; 
    font-size: 0.85rem; 
    text-align: center;
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: shakeError 0.5s ease-in-out;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

#adminLoginError strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
    font-size: 0.9rem;
}
        
        /* ===== AI CHAT INTERFACE ===== */
/* ===== AI CHAT INTERFACE ===== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 280px);
    min-height: 400px;
    background: var(--glass-frost);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity, border-radius, height, width;
    opacity: 0.9;
    transform: translateY(10px) scale(0.98);
}

.chat-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Fallback */
    height: 100dvh; /* Dynamic viewport height untuk mobile modern */
    z-index: 9999;
    border-radius: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0) scale(1);
    padding-bottom: env(safe-area-inset-bottom); /* Untuk iPhone notch */
}



.chat-header.fullscreen {
    padding: 20px;
    background: rgba(255,255,255,0.9);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.back-button {
    display: none;
}

.back-button:hover {
    background: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

.back-button:active {
    transform: scale(0.95);
}


.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}

.message {
    max-width: 85%; /* Sedikit lebih lebar */
    min-width: 60px; /* Minimal width */
    padding: 14px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    animation: messageSlide 0.3s ease-out;
    word-wrap: break-word;
    overflow-wrap: break-word; /* Tambahan untuk browser modern */
    word-break: break-word; /* Pastikan kata panjang tidak overflow */
    hyphens: auto; /* Tambah tanda hubung jika perlu */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: block; /* Pastikan block level */
    height: auto; /* Auto height sesuai konten */
    overflow: visible; /* Jangan sembunyikan overflow */
    position: relative;
}

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

.message.user {
    align-self: flex-end;
    background: var(--primary-gradient);
    color: white;
    border-bottom-right-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
}

.message.ai {
    align-self: flex-start;
    background: white;
    color: var(--text-dark);
    border-bottom-left-radius: 6px;
    border: 1px solid var(--glass-border);
}

.message.ai.typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 24px;
    font-style: italic;
    color: var(--text-gray);
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.chat-input-wrapper {
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); /* Safety untuk iOS */
    background: rgba(255,255,255,0.6);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 12px;
    align-items: center;
    position: relative;
    z-index: 10;
}

.chat-input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    background: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.chat-input:focus {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.btn-send {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    flex-shrink: 0;
}

.btn-send:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.btn-send:active {
    transform: scale(0.95);
}

.btn-send:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.chat-header {
    padding: 20px;
    background: rgba(255,255,255,0.8);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    animation: pulse 2s infinite;
}

.ai-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.ai-info p {
    font-size: 0.8rem;
    color: var(--text-gray);
}

.suggestion-chips {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    overflow-x: auto;
    scrollbar-width: none;
    background: rgba(255,255,255,0.4);
    border-top: 1px solid rgba(255,255,255,0.5);
}

.suggestion-chips::-webkit-scrollbar {
    display: none;
}

.suggestion-chip {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-gray);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.suggestion-chip:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.2);
}

.welcome-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-gray);
}

.welcome-message i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 16px;
    opacity: 0.8;
}

.welcome-message h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 700;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 6px;
    text-align: right;
}


/* ===== AI MESSAGE FORMATTING ===== */
.message.ai strong {
    color: var(--primary);
    font-weight: 700;
}

.message.ai ul, .message.ai ol {
    margin: 8px 0 8px 20px;
    padding-left: 0;
}

.message.ai li {
    margin-bottom: 4px;
    line-height: 1.5;
}

.message.ai p {
    margin-bottom: 8px;
}

.message.ai .disclaimer {
    font-size: 0.8rem;
    color: var(--text-gray);
    font-style: italic;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--glass-border);
}

/* ===== GOOGLE MAPS BUTTON IN MODAL ===== */
.btn-maps {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-maps:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-maps:active {
    transform: translateY(0);
}

.btn-maps i {
    font-size: 1.2rem;
}

.maps-coords {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 6px;
    font-family: 'Courier New', monospace;
    background: rgba(0,0,0,0.03);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}
