/* ============================================================
   Tema modern bersama – Daftar Ulang PPDB SMKN 2 Cimahi
   Dipakai bersama Bootstrap 4 (menimpa sebagian gaya).
   ============================================================ */
:root {
    --brand: #1d4ed8;
    --brand-dark: #1e3a8a;
    --brand-light: #3b82f6;
    --accent: #06b6d4;
    --ok: #16a34a;
    --danger: #dc2626;
    --ink: #0f172a;
    --muted: #64748b;
    --surface: #ffffff;
    --bg: #eef2f7;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(2, 32, 71, .10);
    --shadow-sm: 0 4px 14px rgba(2, 32, 71, .08);
}

* { font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }

body {
    background:
        radial-gradient(1200px 500px at 110% -10%, rgba(6, 182, 212, .15), transparent 60%),
        radial-gradient(900px 500px at -10% 0%, rgba(29, 78, 216, .15), transparent 55%),
        var(--bg);
    color: var(--ink);
    min-height: 100vh;
}

/* ---------- Navbar ---------- */
.app-nav {
    background: linear-gradient(120deg, var(--brand-dark), var(--brand) 55%, var(--accent));
    color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 22px;
    margin: 22px auto;
}
.app-nav .brand {
    display: flex; align-items: center; gap: 12px;
    font-weight: 600; font-size: 1.15rem; letter-spacing: .3px;
}
.app-nav .brand .logo {
    width: 42px; height: 42px; border-radius: 12px;
    background: rgba(255, 255, 255, .18);
    display: grid; place-items: center; font-size: 1.4rem;
}
.app-nav .brand small { display:block; font-weight: 400; font-size: .72rem; opacity: .85; }
.app-nav .brand .logo img, .login-head .logo img {
    width: 100%; height: 100%; object-fit: contain; display: block;
}
.app-nav .brand .logo:has(img), .login-head .logo:has(img) {
    background: #fff; padding: 5px; overflow: hidden;
}
.app-nav .user-chip {
    margin-left: auto; font-size: .85rem; font-weight: 500;
    background: rgba(255, 255, 255, .18); color: #fff;
    padding: 7px 14px; border-radius: 999px;
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.app-nav .menu { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.app-nav .menu a {
    color: #fff; text-decoration: none;
    padding: 8px 14px; border-radius: 999px;
    font-size: .9rem; font-weight: 500;
    background: rgba(255, 255, 255, .12);
    transition: .2s;
    display: inline-flex; align-items: center; gap: 7px;
}
.app-nav .menu a:hover { background: rgba(255, 255, 255, .28); transform: translateY(-1px); }
.app-nav .menu a.active { background: #fff; color: var(--brand-dark); box-shadow: var(--shadow-sm); }
.app-nav .menu a.logout { background: rgba(220, 38, 38, .85); }
.app-nav .menu a.logout:hover { background: #ef4444; }

/* ---------- Cards / panels ---------- */
.card-modern {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(15, 23, 42, .05);
    padding: 26px;
    margin: 0 auto 24px;
}
.card-modern h3, .card-modern h4 { font-weight: 600; color: var(--ink); }
.section-title {
    font-weight: 600; margin-bottom: 4px;
    display: flex; align-items: center; gap: 10px;
}
.section-title .ico {
    width: 38px; height: 38px; border-radius: 10px; flex: none;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff; display: grid; place-items: center; font-size: 1.1rem;
}
.subtitle { color: var(--muted); margin: 0; }

/* ---------- Tombol ---------- */
.btn-grad {
    background: linear-gradient(120deg, var(--brand), var(--brand-light));
    border: none; color: #fff; font-weight: 600;
    border-radius: 12px; padding: 10px 22px;
    box-shadow: var(--shadow-sm); transition: .2s;
}
.btn-grad:hover { color:#fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-soft {
    background: #eaf1ff; color: var(--brand-dark);
    border: none; border-radius: 12px; padding: 8px 16px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 7px; text-decoration: none; transition:.2s;
}
.btn-soft:hover { background: #dbe7ff; color: var(--brand-dark); }

/* ---------- Form ---------- */
.form-control, .custom-select {
    border-radius: 12px; border: 1.5px solid #e2e8f0;
    padding: 12px 14px; height: auto;
}
.form-control:focus {
    border-color: var(--brand-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .15);
}
.field-label { font-weight: 600; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.input-icon { position: relative; }
.input-icon i { position: absolute; top: 50%; left: 14px; transform: translateY(-50%); color: var(--muted); }
.input-icon .form-control { padding-left: 42px; }

/* ---------- Tabel ---------- */
.table-modern { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-modern thead th {
    background: #f1f5f9; color: var(--muted);
    font-size: .75rem; letter-spacing: .6px; text-transform: uppercase;
    border: none; padding: 14px; white-space: nowrap;
}
.table-modern tbody td { padding: 14px; border-top: 1px solid #eef2f7; vertical-align: middle; }
.table-modern tbody tr:hover { background: #f8fbff; }
.table-wrap {
    border-radius: 14px; overflow: hidden;
    border: 1px solid #eef2f7; box-shadow: var(--shadow-sm);
}

/* ---------- Badge status ---------- */
.badge-status {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .82rem;
}
.badge-ok { background: #dcfce7; color: var(--ok); }
.badge-warn { background: #fee2e2; color: var(--danger); }

/* ---------- Alert ---------- */
.alert-modern {
    border-radius: 12px; padding: 12px 16px; font-weight: 500;
    display: flex; align-items: center; gap: 10px; border: none;
}
.alert-modern.info { background: #e0f2fe; color: #075985; }
.alert-modern.bad  { background: #fee2e2; color: #991b1b; }
.alert-modern.good { background: #dcfce7; color: #166534; }

/* ---------- Daftar menu kartu (home) ---------- */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.menu-card {
    text-decoration: none; color: var(--ink);
    background: var(--surface); border-radius: 14px; padding: 20px;
    border: 1px solid #eef2f7; box-shadow: var(--shadow-sm); transition: .2s;
    display: flex; gap: 14px; align-items: flex-start;
}
.menu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--ink); }
.menu-card .mc-ico {
    width: 46px; height: 46px; flex: none; border-radius: 12px; color: #fff;
    display: grid; place-items: center; font-size: 1.3rem;
    background: linear-gradient(135deg, var(--brand), var(--accent));
}
.menu-card .mc-title { font-weight: 600; }
.menu-card .mc-sub { color: var(--muted); font-size: .82rem; }

/* ---------- Thumbnail dokumen terunggah ---------- */
.doc-thumb { display: inline-flex; flex-direction: column; align-items: flex-start; }
.doc-preview {
    width: 260px; max-width: 100%; height: 340px;
    border: 1px solid #e2e8f0; border-radius: 12px;
    box-shadow: var(--shadow-sm); background: #f8fafc;
    object-fit: contain; display: block;
}
img.doc-preview { cursor: zoom-in; }
canvas.doc-preview { height: auto; background: #fff; }

/* ---------- Statistik & toolbar (admin) ---------- */
.stat-pill {
    display: inline-flex; align-items: center; gap: 10px;
    background: linear-gradient(120deg, var(--brand), var(--accent));
    color: #fff; padding: 12px 20px; border-radius: 14px;
    font-weight: 600; box-shadow: var(--shadow-sm);
}
.stat-pill .num { font-size: 1.6rem; line-height: 1; }
.stat-pill .lbl { font-size: .8rem; font-weight: 500; opacity: .9; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.toolbar form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }

/* DataTables agar serasi dengan tema */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 10px; border: 1.5px solid #e2e8f0; padding: 6px 10px;
}
table.dataTable thead th { border-bottom: 2px solid #eef2f7 !important; }

/* ---------- Preview file unggahan ---------- */
.file-preview { margin-top: 12px; }
.file-preview:empty { display: none; }
.file-preview .preview-name {
    font-size: .82rem; font-weight: 600; color: var(--muted);
    margin-bottom: 8px; display: flex; align-items: center; gap: 7px; word-break: break-all;
}
.file-preview .preview-img {
    max-width: 100%; max-height: 320px; border-radius: 12px;
    border: 1px solid #e2e8f0; box-shadow: var(--shadow-sm);
}
.file-preview .preview-frame {
    width: 100%; max-width: 320px; height: auto; border-radius: 12px;
    border: 1px solid #e2e8f0; box-shadow: var(--shadow-sm); background: #fff;
}

/* ---------- Login ---------- */
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
    width: 100%; max-width: 420px; background: var(--surface);
    border-radius: 22px; box-shadow: var(--shadow); overflow: hidden;
}
.login-head {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand) 60%, var(--accent));
    color: #fff; padding: 34px 30px 28px; text-align: center;
}
.login-head .logo {
    width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 14px;
    background: rgba(255, 255, 255, .18); display: grid; place-items: center; font-size: 2rem;
}
.login-head h1 { font-size: 1.35rem; font-weight: 600; margin: 0; }
.login-head p { margin: 6px 0 0; opacity: .9; font-size: .85rem; }
.login-body { padding: 28px 30px 32px; }
