*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --success: #198754;
    --danger: #dc3545;
    --bg: #f4f7fb;
    --surface: #ffffff;
    --text: #1a1f36;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    --radius: 12px;
    --slate: #64748b;
    --slate-light: #cbd5e1;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #dbeafe;
    background-image:
        url('../img/muhammadiyah-tile.svg'),
        radial-gradient(ellipse at center,
            #60a5fa  0%,
            #93c5fd 30%,
            #bfdbfe 50%,
            #dbeafe 62%,
            #f5f0e8 75%,
            #faf6ef 88%,
            #fefcf8 100%);
    background-repeat: repeat, no-repeat;
    background-size: 80px 80px, auto;
    background-attachment: fixed, fixed;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Navbar */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    font-weight: 800;
    font-size: 1.2rem;
    text-decoration: none;
    letter-spacing: -0.01em;
    background: linear-gradient(120deg, #0a3d91 0%, #0d6efd 35%, #8fa4bd 65%, #64748b 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* ─── Hero — modern minimalist, blue/gray gradient accent ─────── */
.hero {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.5rem);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: -60px 0 auto 0;
    height: 480px;
    background:
        radial-gradient(620px 300px at 12% 0%, rgba(13, 110, 253, 0.09), transparent 62%),
        radial-gradient(560px 280px at 88% 8%, rgba(100, 116, 139, 0.12), transparent 62%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: clamp(2.25rem, 5vw, 3.25rem);
    padding: clamp(1.5rem, 4vw, 3.25rem) clamp(1rem, 3vw, 2.25rem);
    border-radius: 28px;
    background:
        radial-gradient(55% 70% at 12% 8%, rgba(254, 215, 102, 0.70), transparent 60%),
        radial-gradient(45% 65% at 88% 12%, rgba(253, 241, 213, 0.95), transparent 62%),
        radial-gradient(70% 100% at 50% 112%, rgba(255, 249, 231, 0.9), transparent 70%),
        radial-gradient(120% 80% at 50% 50%, rgba(255, 255, 255, 0.6), transparent 72%),
        linear-gradient(170deg, rgba(255, 255, 255, 0.65), rgba(255, 247, 222, 0.35));
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow:
        0 16px 18px -12px rgba(234, 179, 8, 0.12),
        0 28px 70px -32px rgba(15, 23, 42, 0.30);
}

 /* ═══════════════════════════════════════════════════════════════════════════
   BADGE STYLING — UPDATED VERSION (Larger Font)
   ═══════════════════════════════════════════════════════════════════════════
   
   REPLACE existing .badge section di style.css (lines 160-177) dengan ini
   Ini adalah enhancement dari existing badge styling dengan font lebih besar
*/

/* ─── BASE BADGE ──────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;           /* Base size */
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    border: 1px solid;
    transition: all 0.2s ease;
    text-transform: none;      /* Jangan uppercase agar nama/text jelas */
}

/* ─── BADGE TEXT GRADIENT (Font Diperbesar) ────────────────────────────── */
.badge-text-gradient {
    font-size: 15px;           /* ✅ DIPERBESAR dari 0.78rem (12.5px) → 15px */
    font-weight: 800;          /* Extra bold untuk prominence */
    letter-spacing: 0.2px;
    background: linear-gradient(90deg, var(--text) 0%, var(--primary) 65%, var(--slate) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    line-height: 1.2;
}

/* ─── BADGE SIZE VARIANTS ─────────────────────────────────────────────────── */

/* Large Badge — untuk highlight items, important rows */
.badge.badge-lg {
    padding: 10px 16px;
    font-size: 16px;
}

.badge.badge-lg .badge-text-gradient {
    font-size: 18px;           /* Larger for lg variant */
    font-weight: 900;
}

/* Extra Large Badge — untuk KPI cards, featured sections */
.badge.badge-xl {
    padding: 12px 20px;
    font-size: 17px;
}

.badge.badge-xl .badge-text-gradient {
    font-size: 20px;           /* Largest for xl variant */
    font-weight: 900;
}

/* ─── BADGE ICON + VALUE ──────────────────────────────────────────────────── */
.badge-icon {
    font-size: 16px;
    display: inline-block;
    min-width: 20px;
    text-align: center;
}

.badge-value {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

/* ─── COLOR VARIANTS (Semantic Colors) ────────────────────────────────────── */

/* Blue — Primary, Dokter, Staff */
.badge.b-blue {
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
    border-color: rgba(13, 110, 253, 0.3);
}

.badge.b-blue .badge-text-gradient {
    color: #0d6efd;
}

/* Green — Success, UMUM, OK */
.badge.b-green {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
    border-color: rgba(25, 135, 84, 0.3);
}

.badge.b-green .badge-text-gradient {
    color: #198754;
}

/* Amber — Warning, Monitor */
.badge.b-amber {
    background: rgba(217, 119, 6, 0.12);
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.3);
}

.badge.b-amber .badge-text-gradient {
    color: #d97706;
}

/* Red — Danger, Urgent, Kritis */
.badge.b-red {
    background: rgba(220, 38, 38, 0.12);
    color: #dc3545;
    border-color: rgba(220, 38, 38, 0.3);
}

.badge.b-red .badge-text-gradient {
    color: #dc3545;
}

/* Purple — Special, Asuransi, VIP */
.badge.b-purple {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
    border-color: rgba(124, 58, 237, 0.3);
}

.badge.b-purple .badge-text-gradient {
    color: #7c3aed;
}

/* Teal — Active, Status OK */
.badge.b-teal {
    background: rgba(13, 148, 136, 0.12);
    color: #0d9488;
    border-color: rgba(13, 148, 136, 0.3);
}

.badge.b-teal .badge-text-gradient {
    color: #0d9488;
}

/* Gray — Unknown, Not Set */
.badge.b-gray {
    background: rgba(107, 114, 133, 0.12);
    color: #6b7280;
    border-color: rgba(107, 114, 133, 0.3);
}

.badge.b-gray .badge-text-gradient {
    color: #6b7280;
}

/* ─── BADGE HOVER STATE ───────────────────────────────────────────────────── */
.badge {
    transition: all 0.3s ease;
    cursor: default;
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: currentColor;
}

/* ─── BADGE ANIMATIONS ────────────────────────────────────────────────────── */

/* Pulse effect untuk status urgent/emergency */
.badge.pulse {
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* ─── RESPONSIVE DESIGN ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .badge {
        font-size: 12px;
        padding: 5px 10px;
        gap: 4px;
    }

    .badge-text-gradient {
        font-size: 13px;        /* Proportional untuk mobile */
    }

    .badge-icon {
        font-size: 14px;
    }

    .badge.badge-lg {
        font-size: 13px;
        padding: 8px 12px;
    }

    .badge.badge-lg .badge-text-gradient {
        font-size: 15px;
    }

    .badge.badge-xl {
        font-size: 13px;
        padding: 8px 12px;
    }

    .badge.badge-xl .badge-text-gradient {
        font-size: 15px;
    }
}

/* ─── LEGACY STYLES (Backward Compatibility) ──────────────────────────── */
.badge-success {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
    border: 1px solid rgba(25, 135, 84, 0.3);
}

.badge-count {
    background: rgba(220, 38, 38, 0.12);
    color: #dc3545;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--text) 0%, var(--primary) 65%, var(--slate) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--text);
}

.hero-desc {
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto 1.5rem;
    font-size: clamp(0.95rem, 1.5vw, 1.08rem);
}

.hero-actions {
    margin-top: 1.5rem;
}

.hero-cards {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: clamp(1rem, 2.5vw, 1.5rem);
}

/* ─── Feature Card — minimalist, soft elevation, hover lift ────── */
.feature-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.50), rgba(255, 255, 255, 0.16));
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: clamp(1.5rem, 3vw, 2.1rem) 1.6rem;
    box-shadow:
        0 2px 14px rgba(255, 255, 255, 0.35),
        0 18px 40px -14px rgba(255, 255, 255, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.55);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.25));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px -18px rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.55);
}

.feature-card:hover::before {
    opacity: 1;
}

/* ─── Icon 3D badge — gradien biru & abu-abu, efek glossy ──────── */
.feature-icon,
.icon-3d {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.1rem;
    position: relative;
    color: #fff;
    transform: translateZ(0);
}

.icon-3d::after {
    content: '';
    position: absolute;
    top: 7px;
    left: 10px;
    width: 55%;
    height: 34%;
    background: rgba(255, 255, 255, 0.38);
    border-radius: 50%;
    filter: blur(6px);
    pointer-events: none;
}

.icon-3d.icon-blue {
    background: linear-gradient(150deg, #5aa2ff 0%, var(--primary) 55%, var(--primary-dark) 100%);
    box-shadow:
        0 12px 22px -8px rgba(13, 110, 253, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -4px 8px rgba(10, 60, 130, 0.25);
}

.icon-3d.icon-slate {
    background: linear-gradient(150deg, #b7c2d0 0%, var(--slate) 55%, #47536b 100%);
    box-shadow:
        0 12px 22px -8px rgba(71, 83, 107, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -4px 8px rgba(30, 41, 59, 0.3);
}

.feature-card:hover .icon-3d {
    transform: translateY(-2px) scale(1.04);
    transition: transform 0.25s ease;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.feature-card p {
    color: #000000;
    font-size: 0.92rem;
    line-height: 1.55;
}

@media (max-width: 480px) {
    .hero-cards {
        grid-template-columns: 1fr;
    }
    .icon-3d {
        width: 58px;
        height: 58px;
        font-size: 1.7rem;
        border-radius: 15px;
    }
    .feature-card {
        padding: 1.4rem 1.2rem;
    }
}

/* Auth */
.auth-body {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 1.25rem;
}

.auth-back {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.auth-back:hover {
    color: #fff;
}

.auth-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.auth-form input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.auth-hint {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Page */
main.container {
    padding-top: 2rem;
    padding-bottom: 3rem;
    min-height: calc(100vh - 130px);
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.5rem;
}

.page-header p {
    color: var(--text-muted);
}

/* Menu grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.menu-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
}

.menu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
}

.menu-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.menu-card h3 {
    margin-bottom: 0.5rem;
}

.menu-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.menu-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Table */
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.table-wrapper {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.text-center {
    text-align: center;
}

.badge-success {
    background: #d1e7dd;
    color: var(--success);
}

.badge-count {
    background: #e8f0fe;
    color: var(--primary);
    font-weight: 700;
}

/* Alerts */
.alert {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.alert-error {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.alert-success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .nav-links {
        gap: 0.75rem;
        font-size: 0.85rem;
    }

    .nav-inner {
        flex-direction: column;
        height: auto;
        padding: 0.75rem 0;
        gap: 0.5rem;
    }
}