/* =========================================================
   Divisi Event TDA Makassar — stylesheet utama
   WARNA BRAND: ganti nilai --brand-* di bawah ini saja.
   (Sementara netral — menunggu palette resmi TDA)
   ========================================================= */
:root {
    --brand-primary: #1f3a5f;      /* warna utama (sidebar, tombol) */
    --brand-primary-dark: #152a46; /* hover / sidebar gelap */
    --brand-accent: #2f6fd6;       /* aksen, link, fokus */
    --brand-accent-soft: #e8f0fc;  /* latar lembut aksen */
    --brand-surface: #f4f6fa;      /* latar halaman */
    --brand-ink: #1b2433;          /* teks utama */

    --card: #ffffff;
    --muted: #6b7587;
    --line: #e4e8ef;
    --line-strong: #d3d9e3;

    --success: #1f9d61; --success-soft: #e5f6ee;
    --info: #2f6fd6;    --info-soft: #e8f0fc;
    --warning: #c07a07; --warning-soft: #fdf3dc;
    --danger: #d23f3f;  --danger-soft: #fdeaea;
    --gray: #5e6878;    --gray-soft: #eef1f5;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, .18);
    --sidebar-w: 248px;
    --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: 14px; line-height: 1.55;
    color: var(--brand-ink); background: var(--brand-surface);
}
a { color: var(--brand-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; } h4 { font-size: 14px; }
p { margin: 0 0 .75em; }
p:last-child { margin-bottom: 0; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.hidden { display: none !important; }

.icon { width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
    background: var(--brand-primary); color: #fff; display: flex; flex-direction: column;
    transition: transform .25s ease;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 18px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
    background: rgba(255, 255, 255, .15); font-weight: 800; font-size: 18px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; }
.brand-text small { opacity: .7; font-size: 12px; }
.nav { flex: 1; overflow-y: auto; padding: 6px 12px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .55; padding: 16px 10px 6px; }
.nav-link {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px;
    color: rgba(255, 255, 255, .78); font-weight: 500; margin-bottom: 2px;
}
.nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.nav-link.active { background: rgba(255, 255, 255, .16); color: #fff; font-weight: 600; }
.nav-count {
    margin-left: auto; background: #fff; color: var(--brand-primary); font-size: 11px; font-weight: 700;
    min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px;
}
.sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 14px 12px; border-top: 1px solid rgba(255, 255, 255, .12); }
.sidebar-foot form { margin: 0; }
.sidebar-foot .icon-btn { color: rgba(255, 255, 255, .8); }
.sidebar-foot .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px; border-radius: 9px; color: #fff; }
.me:hover, .me.active { background: rgba(255, 255, 255, .08); text-decoration: none; }
.me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.me-text strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
    height: 60px; padding: 0 28px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.topbar-title { font-weight: 700; font-size: 16px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 20px;
    background: var(--warning-soft); color: var(--warning); font-weight: 700; font-size: 12px;
}
.topbar-chip:hover { text-decoration: none; filter: brightness(.97); }
.icon-btn.menu-btn { display: none; }
.content { flex: 1; padding: 24px 28px 40px; width: 100%; max-width: 1280px; }
.app-foot { padding: 16px 28px; color: var(--muted); font-size: 12px; }
.sidebar-backdrop { display: none; }

@media (max-width: 960px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 16, 28, .45); z-index: 35; }
    .main { margin-left: 0; }
    .icon-btn.menu-btn { display: inline-grid; }
    .topbar { padding: 0 12px 0 8px; }
    .content { padding: 16px 16px 32px; }
    .app-foot { padding: 12px 16px; }
}

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { color: var(--muted); margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Cards & grid ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: 20px; }
.card-body.tight { padding: 12px 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--line); background: #fafbfd; border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.grid > .card + .card { margin-top: 0; }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .stats { gap: 10px; } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: flex; gap: 14px; align-items: center; min-width: 0; }
.stat-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: var(--brand-accent-soft); color: var(--brand-accent); }
.stat-icon.success { background: var(--success-soft); color: var(--success); }
.stat-icon.warning { background: var(--warning-soft); color: var(--warning); }
.stat-icon.danger { background: var(--danger-soft); color: var(--danger); }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 500; }
.stat-value { font-size: 22px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value.sm { font-size: 16px; }
.stat > div:last-child { min-width: 0; }
@media (max-width: 420px) { .stat { padding: 12px; gap: 10px; } .stat-icon { width: 36px; height: 36px; } .stat-value { font-size: 18px; } .stat-value.sm { font-size: 14px; } }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px;
    border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 13.5px;
    cursor: pointer; line-height: 1.2; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
    background: var(--brand-primary); color: #fff;
}
.btn:hover { background: var(--brand-primary-dark); text-decoration: none; }
.btn .icon { width: 16px; height: 16px; }
.btn-outline { background: #fff; color: var(--brand-ink); border-color: var(--line-strong); }
.btn-outline:hover { background: var(--gray-soft); }
.btn-ghost { background: transparent; color: var(--brand-ink); }
.btn-ghost:hover { background: var(--gray-soft); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b33232; }
.btn-success { background: var(--success); }
.btn-success:hover { background: #18804e; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn {
    width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 8px;
    border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--gray-soft); color: var(--brand-ink); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn .icon { width: 17px; height: 17px; }
.inline-form { display: inline; margin: 0; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1.4; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-gray { background: var(--gray-soft); color: var(--gray); }

/* ---------- Avatar ---------- */
.avatar {
    --h: 210; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0;
    background: hsl(var(--h), 55%, 90%); color: hsl(var(--h), 45%, 32%); font-weight: 700; font-size: 12.5px;
}
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.who-text strong { font-weight: 600; }
.who-text small { color: var(--muted); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2px solid #fff; margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; background: #fafbfd; white-space: nowrap; }
.table tbody tr:hover { background: #fafbfd; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tfoot td { font-weight: 700; background: #fafbfd; border-top: 1px solid var(--line-strong); border-bottom: 0; }
.table .row-actions { white-space: nowrap; text-align: right; width: 1%; }
.table-sm th, .table-sm td { padding: 8px 12px; }
.card > .table-wrap .table th:first-child, .card > .table-wrap .table td:first-child { padding-left: 20px; }
.card > .table-wrap .table th:last-child, .card > .table-wrap .table td:last-child { padding-right: 20px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: 13px; }
.field .hint { font-size: 12px; color: var(--muted); }
.req { color: var(--danger); }
.input, .select, .textarea {
    width: 100%; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    font: inherit; color: var(--brand-ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-accent); box-shadow: 0 0 0 3px var(--brand-accent-soft); }
.textarea { min-height: 92px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7587' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.input-group { display: flex; }
.input-group .addon { padding: 9px 12px; background: var(--gray-soft); border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); color: var(--muted); font-weight: 600; }
.input-group .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.check input { width: 16px; height: 16px; accent-color: var(--brand-primary); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.check-card { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.check-card:has(input:checked) { border-color: var(--brand-accent); background: var(--brand-accent-soft); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .input, .filters .select { width: auto; min-width: 150px; }
@media (max-width: 640px) { .filters .input, .filters .select { flex: 1 1 140px; min-width: 0; } }

/* Rating 1–5 */
.rating { display: inline-flex; gap: 4px; }
.rating input { position: absolute; opacity: 0; pointer-events: none; }
.rating label {
    width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line-strong);
    cursor: pointer; font-weight: 700; color: var(--muted); background: #fff; user-select: none;
}
.rating label:hover { border-color: var(--brand-accent); color: var(--brand-accent); }
.rating input:checked + label { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.rating input:focus-visible + label { box-shadow: 0 0 0 3px var(--brand-accent-soft); }

/* ---------- Alerts / toast ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 500; border: 1px solid transparent; }
.alert-success { background: var(--success-soft); color: #13643e; border-color: #c4ead7; }
.alert-error { background: var(--danger-soft); color: #9b2727; border-color: #f6cccc; }
.alert-info { background: var(--info-soft); color: #1f4f9c; border-color: #cfdef7; }
.alert-warning { background: var(--warning-soft); color: #7d5003; border-color: #f4dfae; }
.toast {
    position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    background: var(--brand-ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-weight: 600; z-index: 100;
    transition: all .25s ease; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 11px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--brand-ink); text-decoration: none; }
.tab.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }
.tab .icon { width: 16px; height: 16px; }
.tab .count { background: var(--gray-soft); color: var(--gray); border-radius: 10px; font-size: 11px; padding: 1px 7px; }

/* ---------- Progress ---------- */
.progress { height: 8px; background: var(--gray-soft); border-radius: 8px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand-accent); border-radius: 8px; }
.progress.success > span { background: var(--success); }
.progress.warning > span { background: var(--warning); }
.progress.danger > span { background: var(--danger); }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; display: block; }
.list-item .meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 12px; flex-wrap: wrap; }
.list-item .meta span { display: inline-flex; align-items: center; gap: 4px; }
.list-item .meta .icon { width: 13px; height: 13px; }
a.list-item { color: inherit; }
a.list-item:hover { background: #fafbfd; text-decoration: none; }

.date-box { width: 52px; flex-shrink: 0; text-align: center; border-radius: 10px; background: var(--brand-accent-soft); color: var(--brand-primary); padding: 6px 0; line-height: 1.1; }
.date-box b { display: block; font-size: 19px; }
.date-box small { font-size: 11px; font-weight: 600; text-transform: uppercase; }
.date-box.past { background: var(--gray-soft); color: var(--gray); }

.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty .icon { width: 36px; height: 36px; opacity: .45; margin-bottom: 8px; }
.empty p { margin-bottom: 12px; }

/* ---------- Project cards ---------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
@media (max-width: 400px) { .project-grid { grid-template-columns: 1fr; } }
.project-card { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; color: inherit; transition: box-shadow .15s, transform .15s; }
.project-card:hover { text-decoration: none; box-shadow: 0 6px 18px rgba(16, 24, 40, .1); transform: translateY(-1px); }
.project-card h3 { margin: 0; font-size: 16px; }
.project-card .meta { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12.5px; }
.project-card .meta span { display: flex; align-items: center; gap: 6px; }
.project-card .meta .icon { width: 14px; height: 14px; }
.project-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 4px; }

.project-hero { padding: 20px; margin-bottom: 16px; }
.project-hero .top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.project-hero h1 { margin: 6px 0 8px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 13px; }
.meta-row span { display: inline-flex; align-items: center; gap: 6px; }
.meta-row .icon { width: 15px; height: 15px; }

/* key-value */
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 16px; margin: 0; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 10px; } }
.prose p { white-space: normal; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 0 0 8px; }

/* ---------- Task board ---------- */
.task-item { display: flex; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.task-item:last-child { border-bottom: 0; }
.task-item .grow { flex: 1; min-width: 0; }
.task-title { font-weight: 600; }
.task-item.done .task-title { text-decoration: line-through; color: var(--muted); }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: 12.5px; color: var(--muted); align-items: center; }
.task-meta span { display: inline-flex; gap: 4px; align-items: center; }
.task-meta .icon { width: 13px; height: 13px; }
.task-note { margin-top: 8px; background: var(--gray-soft); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.due-over { color: var(--danger); font-weight: 600; }
.due-soon { color: var(--warning); font-weight: 600; }
@media (max-width: 640px) {
    .task-item { flex-wrap: wrap; padding: 14px 16px; }
    .task-item .grow { flex-basis: calc(100% - 22px); }
    .task-item > .actions { width: 100%; justify-content: flex-end; }
    .list-item { padding: 12px 16px; }
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--gray); }
.status-dot.proses { background: var(--info); }
.status-dot.selesai { background: var(--success); }

/* ---------- KPI ---------- */
.score { font-weight: 800; font-variant-numeric: tabular-nums; }
.score-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; padding: 4px 10px; border-radius: 8px; font-weight: 800; font-variant-numeric: tabular-nums; }
.score-pill.success { background: var(--success-soft); color: var(--success); }
.score-pill.info { background: var(--info-soft); color: var(--info); }
.score-pill.warning { background: var(--warning-soft); color: var(--warning); }
.score-pill.danger { background: var(--danger-soft); color: var(--danger); }
.score-pill.gray { background: var(--gray-soft); color: var(--gray); }
.rank { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--gray-soft); color: var(--gray); }
.rank.r1 { background: #fde9b3; color: #8a6100; }
.rank.r2 { background: #e5e8ee; color: #4b5563; }
.rank.r3 { background: #f6dcc5; color: #8a4b16; }
.big-score { font-size: 44px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.grade { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-size: 22px; font-weight: 800; }
.grade.success { background: var(--success-soft); color: var(--success); }
.grade.info { background: var(--info-soft); color: var(--info); }
.grade.warning { background: var(--warning-soft); color: var(--warning); }
.grade.danger { background: var(--danger-soft); color: var(--danger); }
.grade.gray { background: var(--gray-soft); color: var(--gray); }
.comp-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.comp-row:last-child { border-bottom: 0; }
.comp-row .progress { grid-column: 1 / -1; }
.chart-box { position: relative; height: 300px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; background: rgba(10, 16, 28, .5); }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); animation: pop .18s ease; }
.modal-box.lg { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fafbfd; border-radius: 0 0 14px 14px; flex-wrap: wrap; }
body.modal-open { overflow: hidden; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) { .modal { padding: 0; align-items: flex-end; } .modal-box, .modal-box.lg { border-radius: 16px 16px 0 0; max-height: 92vh; overflow-y: auto; } .modal-foot { border-radius: 0; } }

/* ---------- Calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-h { padding: 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; text-align: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fafbfd; }
.cal-d { min-height: 96px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cal-d.other { background: #fafbfd; color: #b0b7c3; }
.cal-d.today .cal-n { background: var(--brand-primary); color: #fff; }
.cal-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.cal-ev { display: block; font-size: 11px; padding: 2px 6px; border-radius: 5px; margin-top: 3px; background: var(--brand-accent-soft); color: var(--brand-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cal-ev:hover { text-decoration: none; filter: brightness(.96); }
.cal-ev.pelaksanaan { background: var(--success-soft); color: #13643e; }
.cal-ev.rapat { background: var(--info-soft); color: #1f4f9c; }
.cal-ev.evaluasi { background: var(--warning-soft); color: #7d5003; }
@media (max-width: 720px) { .cal-d { min-height: 64px; padding: 3px; } .cal-ev { font-size: 0; padding: 0; height: 6px; border-radius: 3px; } .cal-h { font-size: 10px; padding: 6px 2px; } }

/* ---------- Auth pages ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%); }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 32px 28px; box-shadow: var(--shadow-lg); }
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand .brand-mark { margin: 0 auto 12px; width: 52px; height: 52px; font-size: 22px; background: var(--brand-primary); color: #fff; border-radius: 14px; }
.auth-brand h1 { font-size: 20px; margin-bottom: 4px; }
.auth-brand p { color: var(--muted); margin: 0; }
.auth-card .field { margin-bottom: 14px; }
.auth-foot { text-align: center; color: rgba(255, 255, 255, .7); font-size: 12px; margin-top: 18px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 44px; }
.pw-wrap .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }

/* ---------- Public assessment page ---------- */
.public-wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.public-head { background: var(--brand-primary); color: #fff; border-radius: 16px; padding: 24px; margin-bottom: 16px; }
.public-head h1 { margin: 4px 0 6px; }
.public-head p { opacity: .85; margin: 0; }
.assess-member { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.assess-member:last-child { border-bottom: 0; }
.crit-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; flex-wrap: wrap; }
.crit-row .crit-name { font-weight: 600; }
.crit-row .crit-desc { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.assess-member.skipped .assess-body { display: none; }

/* ---------- Check-in peserta ---------- */
.checkin-wrap { max-width: 480px; }
.input-lg { padding: 13px 14px; font-size: 16px; }
.select.input-lg { padding-right: 34px; }
.btn-lg { padding: 15px 20px; font-size: 16px; }
.btn-lg .icon { width: 19px; height: 19px; }
.checkin-done { text-align: center; padding: 36px 24px 24px; }
.checkin-done h1 { font-size: 22px; margin: 16px 0 8px; }
.checkin-icon { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: var(--success-soft); color: var(--success); animation: pop .3s ease; }
.checkin-icon.info { background: var(--info-soft); color: var(--info); }
.checkin-icon .icon { width: 40px; height: 40px; stroke-width: 3; }
.checkin-event { display: flex; flex-direction: column; gap: 2px; background: var(--brand-surface); border-radius: 10px; padding: 12px 16px; margin: 16px 0; }
.checkin-event span { color: var(--muted); font-size: 13px; }
.qr-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; width: 100%; max-width: 240px; aspect-ratio: 1; }
.qr-box svg { width: 100%; height: 100%; display: block; }
.div-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: 13px; margin-bottom: 10px; }
.div-bar .progress { grid-column: 1 / -1; height: 6px; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.copy-box { display: flex; gap: 8px; }
.copy-box .input { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; background: var(--gray-soft); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.receipt-thumb { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.money-pos { color: var(--success); }
.money-neg { color: var(--danger); }
.help { background: var(--brand-accent-soft); border-radius: 10px; padding: 12px 16px; font-size: 13px; color: var(--brand-primary); }
.help .icon { width: 16px; height: 16px; margin-right: 4px; }
.log-item { display: flex; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--line); font-size: 13px; }
.log-item:last-child { border-bottom: 0; }
.log-item time { color: var(--muted); font-size: 12px; white-space: nowrap; margin-left: auto; padding-left: 8px; }

/* ---------- Print ---------- */
@media print {
    .sidebar, .topbar, .app-foot, .no-print, .tabs, .btn, .icon-btn { display: none !important; }
    .main { margin: 0; }
    .content { padding: 0; max-width: none; }
    body { background: #fff; font-size: 12px; }
    .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
}
