/* ============================================================
   Aplikasi 8 Standar Pendidikan - Style Utama
   ============================================================ */

:root {
    --primary: #1a3a5c;
    --primary-dark: #122b47;
    --accent: #eab308;
    --accent-hover: #d9a107;
    --bg: #f1f5f9;
    --sidebar-w: 260px;
}

* { box-sizing: border-box; }

body {
    background: var(--bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #334155;
}

/* =================== HALAMAN LOGIN =================== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f2540 0%, #1a3a5c 55%, #245180 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-wrapper { width: 100%; max-width: 430px; }

.login-card {
    background: #fff;
    border-radius: 18px;
    padding: 2.4rem 2.2rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.login-brand { text-align: center; margin-bottom: 1.8rem; }

.brand-icon {
    width: 74px; height: 74px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a3a5c, #245180);
    color: var(--accent);
    font-size: 2rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(26, 58, 92, 0.35);
}

.brand-title { font-size: 1.45rem; font-weight: 800; color: var(--primary); margin-bottom: .2rem; }
.brand-subtitle { font-size: .85rem; color: #64748b; }

.login-card .form-label { font-weight: 600; color: #475569; }
.login-info { text-align: center; }

/* =================== LAYOUT APLIKASI =================== */
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--primary-dark), var(--primary));
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    transition: transform .25s ease;
}

.sidebar-brand {
    display: flex; align-items: center; gap: .7rem;
    padding: 1.2rem 1.4rem;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sidebar-brand i { font-size: 1.7rem; color: var(--accent); }
.sidebar-brand strong { display: block; font-size: 1.05rem; line-height: 1.1; }
.sidebar-brand small { color: #94a3b8; font-size: .75rem; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 1rem .8rem; }
.sidebar-label {
    font-size: .68rem; letter-spacing: .12em;
    text-transform: uppercase; color: #7c90a8;
    margin: 1.1rem .6rem .4rem;
}

.sidebar-nav a {
    display: flex; align-items: center; gap: .75rem;
    color: #cbd5e1;
    text-decoration: none;
    padding: .62rem .8rem;
    border-radius: 10px;
    margin-bottom: 2px;
    font-size: .92rem;
    transition: background .15s, color .15s;
    position: relative;
}
.sidebar-nav a i { font-size: 1.1rem; width: 22px; text-align: center; }
.sidebar-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar-nav a.active {
    background: var(--accent);
    color: var(--primary-dark);
    font-weight: 600;
}
.badge-pill {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.sidebar-footer { padding: 1rem .8rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.btn-logout {
    display: flex; align-items: center; gap: .75rem;
    color: #fca5a5;
    text-decoration: none;
    padding: .6rem .8rem;
    border-radius: 10px;
    font-weight: 600;
}
.btn-logout:hover { background: rgba(239, 68, 68, .15); color: #fecaca; }

.sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 1035;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =================== TOPBAR =================== */
.topbar {
    background: #fff;
    padding: .8rem 1.6rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1020;
}
.topbar-title { font-size: 1.15rem; font-weight: 700; color: var(--primary); margin: 0; flex: 1; }
.btn-icon {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: .3rem .55rem;
    line-height: 1;
    font-size: 1.2rem;
    color: #475569;
}
.topbar-user { display: flex; align-items: center; gap: .7rem; }
.user-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #f59e0b);
    color: #fff;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.user-info strong { display: block; font-size: .88rem; color: #1e293b; line-height: 1.2; }
.user-info small { color: #64748b; font-size: .75rem; }

/* =================== CONTENT =================== */
.content { padding: 1.6rem; flex: 1; }

.app-footer {
    text-align: center;
    padding: .9rem;
    color: #94a3b8;
    font-size: .8rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

/* =================== KARTU / DASHBOARD =================== */
.card { border: none; border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.card-header {
    background: #fff;
    border-bottom: 1px solid #eef2f7;
    font-weight: 700;
    color: var(--primary);
    border-radius: 14px 14px 0 0 !important;
}

.stat-card {
    border-radius: 14px;
    padding: 1.3rem 1.4rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.stat-card .stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    background: rgba(255,255,255,.18);
    font-size: 1.6rem;
    display: flex; align-items: center; justify-content: center;
}
.stat-card .stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.stat-card .stat-label { font-size: .82rem; opacity: .9; }
.bg-stat-1 { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.bg-stat-2 { background: linear-gradient(135deg, #15803d, #22c55e); }
.bg-stat-3 { background: linear-gradient(135deg, #b45309, #f59e0b); }
.bg-stat-4 { background: linear-gradient(135deg, #be123c, #f43f5e); }
.bg-stat-5 { background: linear-gradient(135deg, #7e22ce, #a855f7); }

/* Kartu standar */
.standar-card {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    transition: transform .15s, box-shadow .15s;
    height: 100%;
}
.standar-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.1); }
.standar-card .sc-head {
    background: linear-gradient(135deg, var(--primary), #245180);
    color: #fff;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: .8rem;
}
.standar-card .sc-num {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.standar-card .sc-head h3 { font-size: .98rem; margin: 0; line-height: 1.25; }
.standar-card .sc-body { padding: 1rem 1.2rem; font-size: .88rem; color: #64748b; }
.standar-card .sc-body p { margin-bottom: .8rem; min-height: 2.6em; }
.standar-card .sc-foot {
    padding: .7rem 1.2rem .9rem;
    border-top: 1px solid #f1f5f9;
    display: flex; justify-content: space-between; align-items: center;
    font-size: .8rem;
}

/* =================== TABEL =================== */
.table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}
.table td { vertical-align: middle; font-size: .9rem; }

.badge { font-weight: 600; padding: .45em .7em; border-radius: 8px; }

.file-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    background: #fff7ed; color: #ea580c;
    border: 1px solid #ffedd5;
}

/* =================== BUTTON =================== */
.btn { border-radius: 9px; font-weight: 600; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--primary-dark); }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--primary-dark); }

/* =================== FORM =================== */
.form-control, .form-select { border-radius: 9px; border-color: #dbe3ee; padding: .55rem .8rem; }
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(26, 58, 92, .12);
}

/* =================== RESPONSIVE =================== */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .sidebar-backdrop.show { display: block; }
    .main-content { margin-left: 0; }
}
@media (max-width: 575px) {
    .content { padding: 1rem; }
    .user-info { display: none; }
}