/* ============================================
   E-JRJO — Premium UI Design System
   Clean, warm, graphical — easy for everyone
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
    /* Color Palette — Warm Corporate */
    --primary: #1B4965;
    --primary-light: #2D6A8F;
    --primary-dark: #0F2D40;
    --accent: #F0A500;
    --accent-light: #FFD166;
    --accent-soft: #FFF3D4;
    --success: #2D8B55;
    --success-light: #E8F5E9;
    --danger: #C62828;
    --danger-light: #FFEBEE;
    --warning: #E65100;
    --warning-light: #FFF3E0;
    --info: #1565C0;
    --info-light: #E3F2FD;

    /* Neutrals */
    --bg: #F8F6F3;
    --bg-card: #FFFFFF;
    --bg-sidebar: #0F2D40;
    --text: #2C2C2C;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --border: #E5E1DC;
    --border-light: #F0EDE8;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(15,45,64,0.06);
    --shadow-md: 0 4px 12px rgba(15,45,64,0.08);
    --shadow-lg: 0 8px 30px rgba(15,45,64,0.12);
    --shadow-xl: 0 20px 60px rgba(15,45,64,0.15);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; }

/* ---- Layout ---- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--bg-sidebar) 0%, #162F44 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-brand {
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: center;
}

.sidebar-brand .logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
}

.sidebar-brand h1 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.sidebar-brand .tagline {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.sidebar-nav { padding: 16px 12px; flex: 1; }

.nav-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.35);
    padding: 16px 14px 8px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 2px;
    position: relative;
}

.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.nav-item.active {
    background: rgba(240,165,0,0.15);
    color: var(--accent-light);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
}

.nav-item i { font-size: 18px; width: 22px; text-align: center; }

.nav-item .badge-count {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    min-width: 22px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--primary-dark);
    flex-shrink: 0;
}

.sidebar-user .user-info {
    overflow: hidden;
}

.sidebar-user .user-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-role {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
}

/* ---- Main Content ---- */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
}

/* ---- Top Bar ---- */
.topbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-left h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-dark);
}

.topbar-left .breadcrumb {
    font-size: 13px;
    color: var(--text-secondary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    color: var(--text-secondary);
}

.topbar-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--info-light);
}

.topbar-btn .notif-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
}

/* ---- Page Content ---- */
.page-content {
    padding: 28px 32px 40px;
    max-width: 1400px;
}

/* ---- Cards ---- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

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

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-dark);
}

.card-body { padding: 24px; }

/* ---- Stat Cards ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon.blue { background: #E3F2FD; color: #1565C0; }
.stat-icon.amber { background: #FFF8E1; color: #F57F17; }
.stat-icon.green { background: #E8F5E9; color: #2E7D32; }
.stat-icon.purple { background: #F3E5F5; color: #7B1FA2; }
.stat-icon.rose { background: #FCE4EC; color: #C62828; }
.stat-icon.teal { background: #E0F2F1; color: #00695C; }

.stat-info h4 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.1;
}

.stat-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ---- Tables ---- */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead th {
    background: var(--bg);
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    text-align: left;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

table tbody td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

table tbody tr {
    transition: var(--transition);
}

table tbody tr:hover {
    background: #FAFAF8;
}

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

/* ---- Status Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-blue { background: #E3F2FD; color: #1565C0; }
.badge-green { background: #E8F5E9; color: #2E7D32; }
.badge-amber { background: #FFF8E1; color: #F57F17; }
.badge-orange { background: #FFF3E0; color: #E65100; }
.badge-red { background: #FFEBEE; color: #C62828; }
.badge-gray { background: #F3F4F6; color: #6B7280; }
.badge-teal { background: #E0F2F1; color: #00695C; }
.badge-indigo { background: #E8EAF6; color: #283593; }
.badge-slate { background: #ECEFF1; color: #546E7A; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(27,73,101,0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(27,73,101,0.4);
    color: white;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #EDAA00);
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(240,165,0,0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #3DA863);
    color: white;
    box-shadow: 0 4px 12px rgba(45,139,85,0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #E53935);
    color: white;
}

.btn-outline {
    background: white;
    border: 1.5px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--info-light);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}

/* ---- Forms ---- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text);
    background: white;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27,73,101,0.1);
}

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ---- JRJO List Items ---- */
.jrjo-list { list-style: none; }

.jrjo-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
    cursor: pointer;
}

.jrjo-item:hover {
    background: #FAFAF8;
}

.jrjo-item:last-child {
    border-bottom: none;
}

.jrjo-item .status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.jrjo-item .status-dot.blue { background: var(--info); }
.jrjo-item .status-dot.green { background: var(--success); }
.jrjo-item .status-dot.amber { background: var(--accent); }
.jrjo-item .status-dot.red { background: var(--danger); }

.jrjo-item .item-body {
    flex: 1;
    min-width: 0;
}

.jrjo-item .item-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jrjo-item .item-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ---- Alerts ---- */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
}

.alert-success { background: var(--success-light); color: var(--success); border-left: 4px solid var(--success); }
.alert-danger { background: var(--danger-light); color: var(--danger); border-left: 4px solid var(--danger); }
.alert-warning { background: var(--warning-light); color: var(--warning); border-left: 4px solid var(--warning); }
.alert-info { background: var(--info-light); color: var(--info); border-left: 4px solid var(--info); }

/* ---- Modal ---- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,45,64,0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 20px;
}

.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ---- Login Page ---- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0F2D40 0%, #1B4965 50%, #2D6A8F 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(240,165,0,0.08);
    top: -200px;
    right: -100px;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(240,165,0,0.06);
    bottom: -100px;
    left: -50px;
}

.login-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 440px;
    padding: 48px 40px;
    position: relative;
    z-index: 1;
    text-align: center;
}

.login-card .logo-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-dark);
    box-shadow: 0 8px 24px rgba(240,165,0,0.3);
}

.login-card h1 {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.login-card .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.login-card .form-group {
    text-align: left;
}

.login-card .form-control {
    padding: 14px 16px;
    font-size: 15px;
}

.login-card .btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 8px;
}

.login-footer {
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-light);
}

/* ---- Step Indicator ---- */
.steps {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 24px 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step .step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    border: 2px solid var(--border);
    color: var(--text-secondary);
    background: white;
    transition: var(--transition);
}

.step.active .step-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.step.done .step-circle {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step .step-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.step.active .step-label { color: var(--primary); font-weight: 600; }
.step.done .step-label { color: var(--success); }

.step-connector {
    width: 40px;
    height: 2px;
    background: var(--border);
    margin: 0 4px;
    align-self: center;
}

.step-connector.done { background: var(--success); }

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state .empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 32px;
    color: var(--text-light);
}

.empty-state h4 {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    max-width: 360px;
    margin: 0 auto 20px;
}

/* ---- Utilities ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--text-secondary); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

/* ---- Search ---- */
.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27,73,101,0.1);
}

.search-bar input {
    border: none;
    outline: none;
    padding: 10px 0;
    font-size: 14px;
    flex: 1;
    font-family: var(--font-body);
}

.search-bar i { color: var(--text-light); }

/* ---- Tabs ---- */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 24px;
}

.tab {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.tab:hover { color: var(--primary); }

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ---- File Upload ---- */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload:hover {
    border-color: var(--primary);
    background: rgba(27,73,101,0.02);
}

.file-upload i {
    font-size: 32px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.file-upload p {
    font-size: 14px;
    color: var(--text-secondary);
}

.file-upload .hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* ---- Print ---- */
@media print {
    .sidebar, .topbar, .btn, .search-bar { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ---- Responsive ---- */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text);
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .page-content {
        padding: 20px 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .login-card {
        padding: 32px 24px;
    }

    .topbar {
        padding: 0 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        flex-direction: column;
        padding: 16px;
        gap: 10px;
    }
}

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

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-in-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* ---- Tooltip ---- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: var(--primary-dark);
    color: white;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    margin-bottom: 6px;
}
