/*
 * Tampilan publik & halaman login - Sistem Informasi Alumni Kusuma Bangsa
 * Mobile-first: gaya dasar untuk HP, lalu diperluas untuk layar lebar.
 */
:root {
    --brand: #1f4ea3;
    --brand-dark: #153a7d;
    --brand-soft: #e8eefa;
    --accent: #d42a32;
    --gold: #f2b705;
    --bg: #f4f6fb;
    --surface: #ffffff;
    --text: #18202f;
    --muted: #5a6476;
    --border: #e2e7f0;
    --success-bg: #e7f6ee;
    --success-text: #146c43;
    --danger-bg: #fdecec;
    --danger-text: #a51d24;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; height: auto; }
a { color: var(--brand); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }

.icon {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 22px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    user-select: none;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    min-width: 0;
}

.brand img { width: 38px; height: 38px; flex: none; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: 12px; color: var(--muted); white-space: nowrap; }

.site-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.site-nav a:hover { background: var(--brand-soft); color: var(--brand); }
.site-nav a.active { background: var(--brand-soft); color: var(--brand); }
.site-nav a .label { display: none; }

.site-nav a.nav-cta { background: var(--brand); color: #fff; }
.site-nav a.nav-cta:hover { background: var(--brand-dark); color: #fff; }

@media (min-width: 640px) {
    .site-nav a .label { display: inline; }
    .brand img { width: 44px; height: 44px; }
    .brand-text strong { font-size: 16px; }
}

/* ---------- Main & footer ---------- */
.site-main { flex: 1; padding-bottom: 40px; }

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    padding: 18px 0;
    text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .05s;
}

.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { background: var(--brand-soft); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--border); }
.btn-outline:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn-ghost-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost-light:hover { background: rgba(255,255,255,.22); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: 14px; border-radius: 10px; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    color: #fff;
    background:
        linear-gradient(160deg, rgba(21, 58, 125, .94), rgba(31, 78, 163, .86)),
        url('../img/img.jpg') center / cover no-repeat;
    padding: 40px 0 72px;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--accent) 0 33%, #fff 33% 66%, var(--gold) 66%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    margin-bottom: 16px;
}

.hero h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.hero p.lead { font-size: 16px; opacity: .9; max-width: 560px; margin: 0 0 24px; }

.hero-search {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 620px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

@media (min-width: 640px) {
    .hero { padding: 64px 0 96px; }
    .hero h1 { font-size: 42px; }
    .hero p.lead { font-size: 18px; }
    .hero-search { flex-direction: row; }
}

/* ---------- Search field ---------- */
.search-field {
    position: relative;
    flex: 1;
}

.search-field .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.search-field input {
    width: 100%;
    min-height: 52px;
    padding: 12px 16px 12px 46px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font: inherit;
    font-size: 16px; /* >=16px mencegah auto-zoom di iPhone */
    color: var(--text);
    background: #fff;
    outline: none;
}

.search-field input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31, 78, 163, .15); }

/* ---------- Sections & cards ---------- */
.section { padding: 28px 0 0; }
.section-title { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.section-sub { color: var(--muted); margin: 0 0 18px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card-body { padding: 18px; }

.overlap { margin-top: -44px; position: relative; z-index: 2; }

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.stat { padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.stat .icon-wrap {
    width: 44px; height: 44px; border-radius: 12px; flex: none;
    display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand);
}
.stat .icon-wrap { width: 36px; height: 36px; border-radius: 10px; }
.stat .value { font-size: 20px; font-weight: 800; line-height: 1.1; }
.stat .label { font-size: 12px; color: var(--muted); line-height: 1.3; }

@media (min-width: 640px) {
    .stats { gap: 12px; }
    .stat { flex-direction: row; align-items: center; padding: 16px; gap: 12px; }
    .stat .icon-wrap { width: 44px; height: 44px; border-radius: 12px; }
    .stat .value { font-size: 24px; }
    .stat .label { font-size: 13px; }
}

.steps { display: grid; gap: 12px; }
.step { padding: 18px; display: flex; gap: 14px; }
.step-num {
    width: 36px; height: 36px; border-radius: 50%; flex: none;
    display: grid; place-items: center;
    background: var(--brand); color: #fff; font-weight: 800;
}
.step h3 { font-size: 16px; margin-bottom: 4px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

@media (min-width: 768px) {
    .steps { grid-template-columns: repeat(3, 1fr); }
    .step { flex-direction: column; }
}

/* ---------- Page header ---------- */
.page-head {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 22px 0 18px;
}

.page-head h1 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.page-head p { margin: 0; color: var(--muted); }

.search-bar { display: flex; gap: 8px; margin-top: 16px; }
.search-bar .btn { flex: none; }
.search-bar .btn .label { display: none; }

@media (min-width: 640px) {
    .page-head h1 { font-size: 30px; }
    .search-bar .btn .label { display: inline; }
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.filter-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 14px;
    color: var(--muted);
    flex: none;
}

.select {
    flex: 1;
    max-width: 260px;
    min-height: 44px;
    padding: 8px 36px 8px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font: inherit;
    font-size: 16px;
    color: var(--text);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='%235a6476'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 10px center;
    -webkit-appearance: none;
    appearance: none;
}

.select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31, 78, 163, .15); }

.result-meta a { display: inline-flex; align-items: center; gap: 2px; }
.result-meta a .icon { font-size: 18px; }

.result-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 18px 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.result-meta a { font-weight: 600; text-decoration: none; }

.hint {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 14px;
    margin-top: 16px;
}

/* ---------- Daftar alumni (kartu) ---------- */
.alumni-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

@media (min-width: 720px) { .alumni-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .alumni-list { grid-template-columns: repeat(3, 1fr); } }

.alumni-card { display: flex; flex-direction: column; padding: 16px; gap: 12px; }

.alumni-top { display: flex; gap: 12px; align-items: flex-start; }

.avatar {
    width: 46px; height: 46px; border-radius: 50%; flex: none;
    display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand);
    font-weight: 800; font-size: 16px;
}

.alumni-name { font-size: 16px; font-weight: 700; margin: 0; word-break: break-word; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12.5px; font-weight: 600;
    padding: 3px 10px; border-radius: 999px;
    background: #f0f2f7; color: var(--muted);
}
.chip-brand { background: var(--brand-soft); color: var(--brand); }

.edu { display: grid; gap: 8px; margin: 0; font-size: 14px; }
.edu div { display: flex; gap: 10px; }
.edu dt {
    flex: none; width: 30px; height: 22px; border-radius: 6px;
    background: #f0f2f7; color: var(--muted);
    font-size: 11.5px; font-weight: 800;
    display: grid; place-items: center;
}
.edu dd { margin: 0; min-width: 0; }
.edu dd strong { display: block; font-weight: 600; }
.edu dd span { color: var(--muted); }
.edu .empty { color: #9aa3b2; font-style: italic; }

.alumni-card .btn { margin-top: auto; }

.empty-state { text-align: center; padding: 40px 20px; }
.empty-state .icon { font-size: 48px; color: #9aa3b2; }
.empty-state h2 { font-size: 18px; margin: 10px 0 6px; }
.empty-state p { color: var(--muted); margin: 0 0 16px; }

/* ---------- Pagination ---------- */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 20px;
}

.pager .pages { display: none; gap: 4px; }
.pager .pages a, .pager .pages span {
    min-width: 40px; height: 40px; padding: 0 8px;
    display: grid; place-items: center;
    border-radius: 10px; text-decoration: none; font-weight: 700;
    color: var(--text);
}
.pager .pages a:hover { background: var(--brand-soft); color: var(--brand); }
.pager .pages .current { background: var(--brand); color: #fff; }
.pager .pages .gap { color: var(--muted); }
.pager .page-info { font-size: 14px; color: var(--muted); text-align: center; }
.pager .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

@media (min-width: 720px) {
    .pager .pages { display: flex; }
    .pager .page-info { display: none; }
}

/* ---------- Konten umum (kegiatan, detail, tentang) ---------- */
.content-card { padding: 20px; }
.content-card p { margin: 0 0 1em; }
.meta { color: var(--muted); font-size: 14px; }

.grid-cards { display: grid; gap: 12px; }
@media (min-width: 720px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } }

.detail-list { margin: 0; display: grid; gap: 0; }
.detail-list div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.detail-list div:last-child { border-bottom: 0; }
.detail-list dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.detail-list dd { margin: 0; font-weight: 600; word-break: break-word; }

@media (min-width: 640px) {
    .detail-list div { grid-template-columns: 220px 1fr; gap: 16px; }
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 700; font-size: 13px; }

/* ---------- Halaman login ---------- */
.auth-body {
    background:
        radial-gradient(1200px 500px at 50% -10%, rgba(31, 78, 163, .18), transparent 70%),
        var(--bg);
}

.auth-wrap {
    flex: 1;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 28px 16px 40px;
}

.auth-brand { text-align: center; margin-bottom: 20px; text-decoration: none; color: var(--text); display: block; }
.auth-brand img { width: 72px; height: 72px; }
.auth-brand strong { display: block; font-size: 18px; font-weight: 800; margin-top: 8px; }
.auth-brand small { color: var(--muted); font-size: 13px; }

.auth-card { padding: 22px 18px; }
@media (min-width: 480px) { .auth-card { padding: 28px; } }

.auth-card h1 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); margin: 0 0 18px; font-size: 15px; }

.who {
    display: flex; gap: 12px; align-items: center;
    padding: 12px; border-radius: 12px;
    background: var(--brand-soft); margin-bottom: 18px;
}
.who .avatar { background: #fff; }
.who .name { font-weight: 800; line-height: 1.3; word-break: break-word; }
.who .nis { font-size: 13px; color: var(--muted); }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field .help { font-size: 13px; color: var(--muted); margin-top: 6px; }

.input-wrap { position: relative; }
.input-wrap > .icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--muted); pointer-events: none;
}

.input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px 12px 46px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font: inherit;
    font-size: 16px;
    color: var(--text);
    background: #fff;
    outline: none;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31, 78, 163, .15); }
.input[readonly], .input:disabled { background: #f3f5f9; color: var(--muted); }
.input.has-toggle { padding-right: 52px; }

.toggle-pass {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border: 0; border-radius: 10px;
    background: transparent; color: var(--muted); cursor: pointer;
    display: grid; place-items: center;
}
.toggle-pass:hover { background: #f0f2f7; }

.auth-links { text-align: center; margin-top: 18px; font-size: 14px; }
.auth-links a { font-weight: 700; text-decoration: none; }

/* ---------- Alerts ---------- */
.alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 16px;
    background: var(--danger-bg);
    color: var(--danger-text);
}
.alert p { margin: 0; }
.alert-info { background: var(--brand-soft); color: var(--brand-dark); }
.alert-success { background: var(--success-bg); color: var(--success-text); }

/* Aksesibilitas fokus keyboard */
a:focus-visible, button:focus-visible, .btn:focus-visible {
    outline: 3px solid rgba(31, 78, 163, .45);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
