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

:root {
    --bg-main: #f4f7fb;
    --bg-surface: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --primary: #11314f;
    --primary-glow: rgba(17, 49, 79, 0.15);
    --accent: #cf8e2c;
    --accent-glow: rgba(207, 142, 44, 0.2);
    --success: #3b9330;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border: rgba(148, 163, 184, 0.3);
    --glass-blur: blur(16px);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 64px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Background gradient blobs removed for solid flat UI theme */
body::before {
    display: none;
}

body::after {
    display: none;
}

/* ── TYPOGRAPHY ── */
h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.25rem; font-weight: 600; color: var(--text-primary); }
p  { color: var(--text-secondary); line-height: 1.6; font-size: 0.9rem; }

/* ── LAYOUT ── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    width: 100%;
}

/* ── CARD ── */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 4px 24px -6px rgba(17, 49, 79, 0.08);
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(17, 49, 79, 0.3);
    box-shadow: 0 10px 30px -8px rgba(17, 49, 79, 0.12);
}

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    border-radius: 0.875rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    gap: 0.5rem;
    white-space: nowrap;
    touch-action: manipulation;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
    box-shadow: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #0d253b;
    box-shadow: 0 4px 12px rgba(17, 49, 79, 0.15);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    color: var(--primary);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(17, 49, 79, 0.3);
}

/* ── INPUTS ── */
.form-group { margin-bottom: 1.25rem; }

.label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input, select, textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(148, 163, 184, 0.4);
    border-radius: 0.875rem;
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
    font-size: 1rem; /* Prevent iOS zoom on focus */
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ── NAVIGATION ── */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.25rem;
    height: var(--nav-height);
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: relative; /* Tidak lagi menempel di atas */
    z-index: 100;
}

.logo {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── GRID ── */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ── BADGES ── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-present { background: rgba(34, 197, 94, 0.1); color: #4ade80; }
.badge-absent  { background: rgba(239, 68, 68, 0.1); color: #f87171; }

/* ── TABLE WRAPPER ── */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 1.25rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 550px;
}

thead tr {
    background: rgba(17, 49, 79, 0.04);
}

th {
    padding: 0.875rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

td {
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* ── VISIBILITY FIX ── */
.animate-fade {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

/* ── BOTTOM MOBILE NAV ── */
.mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    z-index: 1000;
    justify-content: space-around;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

@media (min-width: 769px) {
    .mobile-bottom-nav { display: none !important; }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.5rem 0.4rem;
    flex: 1;
    min-width: 0;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: none;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mobile-nav-item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: white;
}

/* ── STAT CARD ── */
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin: 0.25rem 0 0.5rem;
}

/* ── RESPONSIVE BREAKPOINTS ── */
@media (max-width: 640px) {
    h1 { font-size: 1.4rem; }
    h2 { font-size: 1.05rem; }

    .container { padding: 1rem 0.875rem 6rem; }

    .card { padding: 1.1rem; border-radius: 1rem; }

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

    .btn { padding: 0.75rem 1rem; font-size: 0.8rem; border-radius: 0.75rem; }

    nav {
        padding: 0 0.75rem;
        height: 56px;
        border-bottom: 1px solid var(--border);
    }

    .logo { font-size: 0.9rem; }

    .nav-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .stat-number { font-size: 2rem; }

    .table-wrap {
        border-radius: 0;
        margin: 0 -0.875rem;
    }

    .mobile-bottom-nav {
        display: flex;
    }
}


@media (min-width: 641px) {
    .mobile-only { display: none !important; }
    .mobile-bottom-nav { display: none !important; }
}

.desktop-only { display: inline; }
@media (max-width: 640px) {
    .desktop-only { display: none !important; }
}
