/* panel.css - kerangka panel admin (sidebar, topbar) + halaman Dashboard.
   Dimuat SETELAH assets/css/admin.css, memakai variabel warna yang sama (--accent emas, --ink). */

:root {
    --pnl-sidebar-w: 248px;
    --pnl-sidebar-bg: #171a21;
    --pnl-sidebar-ink: #c9ccd3;
    --pnl-sidebar-muted: #7d828e;
    --pnl-green: #2f8f5b;
    --pnl-green-soft: #e6f4ec;
    --pnl-red: #c2453d;
    --pnl-red-soft: #fbe9e7;
    --pnl-amber: #b7791f;
    --pnl-amber-soft: #fdf3e1;
    --pnl-blue: #3d6fb6;
    --pnl-blue-soft: #e8eff9;
    --pnl-gray-soft: #eef0f3;
}

.pnl-body { background: #f5f3ef; }

/* ---------- Sidebar ---------- */
.pnl-sidebar {
    width: var(--pnl-sidebar-w);
    background: var(--pnl-sidebar-bg);
    color: var(--pnl-sidebar-ink);
}
@media (min-width: 768px) {
    .pnl-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        flex-shrink: 0;
    }
}
@media (max-width: 767.98px) {
    .pnl-sidebar { background: var(--pnl-sidebar-bg) !important; }
}
.pnl-brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: 1.4rem 1.25rem 1.1rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -.01em;
}
.pnl-brand:hover { color: #fff; }
.pnl-brand small {
    display: block;
    font-weight: 500;
    font-size: .72rem;
    color: var(--pnl-sidebar-muted);
    letter-spacing: .02em;
    margin-top: 1px;
}
.pnl-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #c9a878, var(--accent));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.15rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(169, 130, 95, .35);
}
.pnl-brand-dot { color: #c9a878; }
.pnl-nav-label {
    padding: 1rem 1.4rem .4rem;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--pnl-sidebar-muted);
}
.pnl-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 .75rem; }
.pnl-nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .62rem .8rem;
    border-radius: 9px;
    color: var(--pnl-sidebar-ink);
    text-decoration: none;
    font-weight: 500;
    font-size: .9rem;
    transition: background .15s ease, color .15s ease;
}
.pnl-nav-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; opacity: .85; }
.pnl-nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.pnl-nav-link.active {
    background: rgba(201, 168, 120, .16);
    color: #f1dcbc;
    box-shadow: inset 3px 0 0 #c9a878;
}
.pnl-nav-link.active i { opacity: 1; }
.pnl-user {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin: 1rem .75rem .9rem;
    padding: .7rem .75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
}
.pnl-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2b303b;
    color: #f1dcbc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .8rem;
    flex-shrink: 0;
}
.pnl-user-info { min-width: 0; flex: 1; line-height: 1.2; }
.pnl-user-info strong { display: block; color: #fff; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pnl-user-info small { color: var(--pnl-sidebar-muted); font-size: .72rem; }
.pnl-logout { color: var(--pnl-sidebar-muted); font-size: 1.1rem; padding: .25rem; }
.pnl-logout:hover { color: #fff; }

/* ---------- Topbar ---------- */
.pnl-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 64px;
    padding: .75rem 2rem;
    background: rgba(245, 243, 239, .88);
    backdrop-filter: saturate(160%) blur(8px);
    border-bottom: 1px solid var(--border-soft);
}
.pnl-topbar-title { font-weight: 600; font-size: 1.02rem; color: var(--ink); flex: 1; min-width: 0; }
.pnl-topbar-actions { display: flex; align-items: center; gap: .9rem; }
.pnl-topbar-date { color: var(--ink-soft); font-size: .85rem; }
.pnl-topbar-date i { margin-right: .3rem; }
.pnl-icon-btn { border: 1px solid var(--border-soft); background: #fff; border-radius: 9px; padding: .3rem .6rem; }
.pnl-btn-ghost { border: 1px solid var(--border-soft); background: #fff; color: var(--ink-soft); }
.pnl-btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.pnl-content { max-width: 1440px; }
@media (max-width: 767.98px) {
    .pnl-topbar { padding: .6rem 1rem; }
    .pnl-content.p-4 { padding: 1.1rem !important; }
}

/* ---------- Dashboard: sapaan & aksi cepat ---------- */
.dash-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.dash-hero h1 { font-size: 1.55rem; font-weight: 700; margin: 0 0 .25rem; letter-spacing: -.02em; }
.dash-hero p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.dash-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.dash-actions .btn { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .87rem; padding: .55rem 1rem; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-soft { background: #fff; border: 1px solid var(--border-soft); color: var(--ink); }
.btn-soft:hover { border-color: var(--ink-soft); color: var(--ink); background: #fff; }

/* ---------- Dashboard: kartu statistik ---------- */
.kpi {
    position: relative;
    height: 100%;
    background: #fff;
    border-radius: 14px;
    padding: 1.15rem 1.2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #ece8e1;
    display: flex;
    gap: .95rem;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s ease, transform .15s ease;
}
a.kpi:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); color: inherit; }
.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.kpi-icon.gold { background: var(--accent-soft); color: var(--accent-dark); }
.kpi-icon.green { background: var(--pnl-green-soft); color: var(--pnl-green); }
.kpi-icon.blue { background: var(--pnl-blue-soft); color: var(--pnl-blue); }
.kpi-icon.amber { background: var(--pnl-amber-soft); color: var(--pnl-amber); }
.kpi-label { font-size: .78rem; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.kpi-value { font-size: 1.85rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin-top: .15rem; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: .8rem; color: var(--ink-soft); margin-top: .2rem; }
.kpi-sub .up { color: var(--pnl-green); font-weight: 600; }
.kpi-sub .down { color: var(--pnl-red); font-weight: 600; }

/* ---------- Dashboard: panel ---------- */
.panel {
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #ece8e1;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem 1.25rem .6rem;
}
.panel-title { font-size: .98rem; font-weight: 600; margin: 0; }
.panel-sub { font-size: .8rem; color: var(--ink-soft); margin: .1rem 0 0; }
.panel-link { font-size: .82rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.panel-body { padding: .4rem 1.25rem 1.2rem; flex: 1; }
.panel-body.flush { padding: 0; }
.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 220px; }

/* Donut: angka total di tengah + legenda dgn jumlah */
.donut-wrap { position: relative; height: 190px; margin: .2rem 0 1rem; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center strong { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.donut-center span { font-size: .75rem; color: var(--ink-soft); margin-top: .2rem; }
.legend-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.legend-list li { display: flex; align-items: center; gap: .55rem; font-size: .86rem; }
.legend-list .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-list .val { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.legend-list .pct { color: var(--ink-soft); font-size: .78rem; width: 3rem; text-align: right; }

/* Acara mendatang */
.event-list { list-style: none; margin: 0; padding: 0; }
.event-item {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .8rem 1.25rem;
    border-top: 1px solid #f1eee8;
}
.event-item:first-child { border-top: none; }
.event-date {
    width: 52px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    text-align: center;
    padding: .35rem 0;
    line-height: 1.1;
}
.event-date strong { display: block; font-size: 1.2rem; }
.event-date span { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.event-info { min-width: 0; flex: 1; }
.event-info a { font-weight: 600; color: var(--ink); text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-info a:hover { color: var(--accent-dark); }
.event-meta { font-size: .78rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.countdown-pill { font-size: .74rem; font-weight: 600; border-radius: 999px; padding: .22rem .6rem; background: var(--pnl-gray-soft); color: var(--ink-soft); white-space: nowrap; }
.countdown-pill.soon { background: var(--pnl-amber-soft); color: var(--pnl-amber); }
.countdown-pill.today { background: var(--pnl-green-soft); color: var(--pnl-green); }

/* Peringkat undangan */
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .95rem; }
.rank-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; font-size: .88rem; }
.rank-row a { color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row a:hover { color: var(--accent-dark); }
.rank-row .num { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank-bar { height: 6px; border-radius: 99px; background: #f1eee8; margin-top: .4rem; overflow: hidden; }
.rank-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #c9a878, var(--accent)); }

/* Tabel undangan terbaru */
.dash-table { margin: 0; }
.dash-table thead th {
    background: #faf8f5;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ink-soft);
    border-bottom: 1px solid #ece8e1;
    padding: .7rem 1.25rem;
    white-space: nowrap;
}
.dash-table td { padding: .85rem 1.25rem; vertical-align: middle; border-color: #f1eee8; font-size: .88rem; }
.dash-table tbody tr:last-child td { border-bottom: none; }
.inv-cell { display: flex; align-items: center; gap: .75rem; min-width: 220px; }
.inv-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--ink);
    color: #f1dcbc;
    font-weight: 700;
    font-size: .8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.inv-cell strong { display: block; font-weight: 600; }
.inv-cell small { color: var(--ink-soft); }
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .76rem;
    font-weight: 600;
    border-radius: 999px;
    padding: .25rem .65rem;
    text-transform: capitalize;
}
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-aktif { background: var(--pnl-green-soft); color: var(--pnl-green); }
.status-draft { background: var(--pnl-gray-soft); color: #5b6170; }
.status-nonaktif { background: var(--pnl-amber-soft); color: var(--pnl-amber); }
.status-expired { background: var(--pnl-red-soft); color: var(--pnl-red); }
.row-actions { display: flex; gap: .35rem; justify-content: flex-end; }
.row-actions .btn { padding: .3rem .55rem; border-radius: 8px; }

.empty-state { text-align: center; padding: 2rem 1rem; color: var(--ink-soft); }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .5rem; color: #cbbfae; }
.empty-state p { margin: 0 0 .8rem; font-size: .9rem; }

/* ======================================================================
   Perbaikan & komponen bersama (admin, klien, staff) - desktop & HP
   ====================================================================== */

/* Bootstrap .offcanvas-md memaksa background transparan di >= md - pakai ID supaya menang. */
#adminSidebar.pnl-sidebar { background-color: var(--pnl-sidebar-bg) !important; }
#adminSidebar.pnl-sidebar .offcanvas-header { border-bottom: 1px solid rgba(255, 255, 255, .06); }
.rank-row a { min-width: 0; flex: 1; }

/* Topbar panel klien/staff (tanpa sidebar) */
.pnl-topbar-solo { padding-left: 1.5rem; }
.pnl-brand-inline { padding: 0; color: var(--ink); font-size: .98rem; }
.pnl-brand-inline:hover { color: var(--ink); }
.pnl-brand-inline .pnl-brand-dot { color: var(--accent); }
.pnl-topbar-title small {
    display: block;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--accent-dark);
    line-height: 1.1;
}
.pnl-user-chip { display: inline-flex; align-items: center; gap: .5rem; font-size: .86rem; font-weight: 500; color: var(--ink); }
.pnl-avatar.sm { width: 30px; height: 30px; font-size: .72rem; background: var(--ink); }

/* ---------- Halaman Kelola Undangan: header ---------- */
.inv-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-bottom: 1rem;
}
.inv-back { display: inline-flex; align-items: center; gap: .35rem; font-size: .84rem; font-weight: 600; text-decoration: none; margin-bottom: .35rem; }
.inv-hero-title { font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 .45rem; line-height: 1.25; }
.inv-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; font-size: .86rem; color: var(--ink-soft); }
.inv-hero-meta i { margin-right: .25rem; }
.inv-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: .75rem;
    margin-bottom: .6rem;
}
.inv-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    background: #fff;
    border: 1px solid #ece8e1;
    border-radius: 12px;
    padding: .65rem .75rem;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}
.inv-link-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.inv-link-body { min-width: 0; flex: 1; line-height: 1.25; }
.inv-link-body strong { display: block; font-size: .86rem; }
.inv-link-body small { display: block; font-size: .75rem; color: var(--ink-soft); }
.inv-link .btn { padding: .3rem .5rem; border-radius: 8px; flex-shrink: 0; }
.js-copy-link.copied { background: var(--pnl-green-soft); border-color: var(--pnl-green); color: var(--pnl-green); }
.inv-help { margin: 0 0 1.1rem; font-size: .84rem; color: var(--ink-soft); }
.inv-help summary { cursor: pointer; font-weight: 600; color: var(--accent-dark); display: inline-flex; align-items: center; gap: .35rem; list-style: none; }
.inv-help summary::-webkit-details-marker { display: none; }
.inv-help[open] { background: #fff; border: 1px solid #ece8e1; border-radius: 12px; padding: .8rem 1rem; }
.inv-help p { margin: .6rem 0 0; line-height: 1.55; }

/* ---------- Tab menu: lengket di atas & bisa digeser di HP ---------- */
#tabMenu.nav-tabs { position: sticky; top: 64px; z-index: 1010; }
.pnl-body-solo #tabMenu.nav-tabs { top: 64px; }
#tabMenu .nav-link { white-space: nowrap; font-size: .88rem; }
#tabMenuContent.tab-content { background: #fff; }

/* ---------- Tabel ---------- */
.table-responsive { -webkit-overflow-scrolling: touch; }
.table thead th { white-space: nowrap; }
.pnl-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .6rem .25rem 0;
    font-size: .82rem;
    color: var(--ink-soft);
}
.pnl-pager-btns { display: inline-flex; align-items: center; gap: .4rem; }
.pnl-pager-num { min-width: 4.5rem; text-align: center; font-weight: 600; color: var(--ink); }

/* ---------- Form & tombol ---------- */
.form-control, .form-select { min-height: 40px; }
.form-control-sm, .form-select-sm { min-height: 32px; }
.btn { touch-action: manipulation; }

/* ---------- Halaman daftar (Undangan/Klien) ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.4rem; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.page-head p { margin: .2rem 0 0; color: var(--ink-soft); font-size: .88rem; }
.list-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; padding: .9rem 1.25rem; border-bottom: 1px solid #f1eee8; }
.list-toolbar .form-control, .list-toolbar .form-select { max-width: 280px; }
.search-input { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.search-input i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.search-input .form-control { padding-left: 2.1rem; max-width: none; }

/* ======================================================================
   HP / layar kecil
   ====================================================================== */
@media (max-width: 767.98px) {
    .pnl-topbar-solo { padding-left: 1rem; }
    .dash-hero h1, .inv-hero-title { font-size: 1.2rem; }
    .dash-actions { width: 100%; }
    .dash-actions .btn { flex: 1; justify-content: center; }
    .kpi { padding: .95rem 1rem; }
    .kpi-value { font-size: 1.55rem; }
    .chart-box { height: 220px; }
    .panel-head, .panel-body { padding-left: 1rem; padding-right: 1rem; }
    .event-item, .dash-table td, .dash-table thead th { padding-left: 1rem; padding-right: 1rem; }

    #tabMenu.nav-tabs {
        top: 64px;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        scrollbar-width: none;
        margin: 0 -1.1rem;
        border-radius: 0;
        padding: .45rem 1rem;
        scroll-padding: 0 1rem;
    }
    #tabMenu.nav-tabs::-webkit-scrollbar { display: none; }
    #tabMenu .nav-link { padding: .5rem .8rem; font-size: .84rem; }
    #tabMenuContent.tab-content { padding: 1rem !important; margin-left: -.35rem; margin-right: -.35rem; }

    /* Input yg diberi max-width inline (mis. pencarian/upload) dibuat selebar layar. */
    .tab-content .form-control[style*="max-width"],
    .tab-content .form-select[style*="max-width"],
    .tab-content input[style*="max-width"] { max-width: 100% !important; }
    .tab-content .table { font-size: .82rem; }
    /* Tabel yang tidak dibungkus .table-responsive tetap bisa digeser, tidak melebar keluar layar. */
    .tab-content table:not(.table-responsive table) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tab-content .btn-sm { padding: .35rem .6rem; }
    .tab-content .d-flex { flex-wrap: wrap; }

    /* Modal jadi layar penuh di HP supaya form panjang (Edit RSVP dll) nyaman diisi. */
    .modal-dialog:not(.modal-dialog-centered) { margin: 0; max-width: none; min-height: 100%; }
    .modal-dialog:not(.modal-dialog-centered) .modal-content { min-height: 100vh; border-radius: 0; border: none; }
    .modal-footer { position: sticky; bottom: 0; background: #fff; }

    .list-toolbar { padding: .75rem 1rem; }
    .search-input, .list-toolbar .form-select { max-width: none; flex: 1 1 100%; }

    /* Tabel daftar -> kartu bertumpuk (dipakai .stack-table) */
    .stack-table thead { display: none; }
    .stack-table, .stack-table tbody, .stack-table tr, .stack-table td { display: block; width: 100%; }
    .stack-table tr { padding: .85rem 1rem; border-bottom: 1px solid #f1eee8; }
    .stack-table td { border: none !important; padding: .2rem 0 !important; text-align: left !important; }
    .stack-table td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 7.5rem; color: var(--ink-soft); font-size: .78rem; }
    .stack-table .row-actions { justify-content: flex-start; margin-top: .45rem; }
}

/* ---------- Halaman login ---------- */
.auth-body { background: #f5f3ef; min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: flex; }
.auth-side {
    flex: 0 0 44%;
    background: radial-gradient(circle at 20% 15%, rgba(201, 168, 120, .22), transparent 55%), #171a21;
    color: #c9ccd3;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}
.auth-side-inner { max-width: 380px; }
.auth-side h2 { color: #fff; font-size: 2rem; font-weight: 700; margin: 1.2rem 0 .6rem; letter-spacing: -.02em; }
.auth-side h2 span { color: #c9a878; }
.auth-side p { font-size: 1rem; line-height: 1.6; margin-bottom: 1.5rem; }
.auth-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; font-size: .92rem; }
.auth-side li i { color: #c9a878; margin-right: .5rem; }
.pnl-brand-mark.lg { width: 52px; height: 52px; font-size: 1.6rem; border-radius: 14px; }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--ink); text-decoration: none; margin-bottom: 2rem; font-size: 1.05rem; }
.auth-brand .pnl-brand-dot { color: var(--accent); }
.auth-card h1 { font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: .3rem; }
.auth-sub { color: var(--ink-soft); margin-bottom: 1.6rem; }
.auth-input { position: relative; }
.auth-input > i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.auth-input .form-control { padding-left: 2.5rem; min-height: 48px; border-radius: 12px; background: #fff; }
.auth-eye { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: none; background: none; color: var(--ink-soft); padding: .4rem .55rem; }
.auth-submit { min-height: 48px; border-radius: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.auth-note { margin: 1.25rem 0 0; color: var(--ink-soft); font-size: .85rem; text-align: center; }
.auth-home { display: inline-flex; align-items: center; gap: .35rem; margin-top: 1.75rem; font-size: .85rem; text-decoration: none; color: var(--ink-soft); }
.rank-list li, .rank-row { min-width: 0; }
.panel-body { min-width: 0; }

/* ======================================================================
   Panel klien & staf: sidebar berkelompok (desktop) + menu bawah (HP),
   Beranda (views/client/home.ejs) & hub Hari-H (views/panel/harih.ejs)
   ====================================================================== */
.cl-shell { display: flex; min-height: 100vh; }
.cl-sidebar {
    width: var(--pnl-sidebar-w);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    flex-direction: column;
    background: var(--pnl-sidebar-bg);
    color: var(--pnl-sidebar-ink);
    overflow-y: auto;
}
.cl-sidebar .pnl-nav { margin-top: .4rem; }
.cl-main { flex: 1; min-width: 0; }
.cl-bottomnav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1030;
    display: flex;
    background: #fff;
    border-top: 1px solid var(--border-soft);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .05);
}
.cl-bottomnav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
    padding: .45rem .2rem .5rem;
    font-size: .68rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
    min-width: 0;
}
.cl-bottomnav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cl-bottomnav a i { font-size: 1.2rem; }
.cl-bottomnav a.active { color: var(--accent-dark); }
@media (max-width: 767.98px) {
    .cl-body .pnl-content { padding-bottom: 5.5rem !important; }
}
.cl-group-title { font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 .9rem; }

/* Kartu acara */
.cl-event {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.5rem;
    border-radius: 18px;
    margin-bottom: 1.1rem;
    color: #fff;
    background: linear-gradient(135deg, #1f2430 0%, #3a3346 60%, #6b5640 100%);
}
.cl-event.compact { padding: 1.1rem 1.3rem; }
.cl-event-harih { background: linear-gradient(135deg, #1d3b2c 0%, #2f8f5b 100%); }
.cl-event-sesudah { background: linear-gradient(135deg, #2b303b 0%, #5b6170 100%); }
.cl-event h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; margin: .5rem 0 .4rem; }
.cl-event.compact h1 { font-size: 1.3rem; }
.cl-event-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; background: rgba(255, 255, 255, .15); border-radius: 999px; padding: .25rem .7rem; }
.cl-event-meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .86rem; opacity: .9; align-items: center; }
.cl-event-meta i { margin-right: .25rem; }
.cl-event-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.cl-event-actions .btn { font-weight: 600; }
.cl-phase-card {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem;
    padding: 1rem 1.25rem; border-radius: 14px; margin-bottom: 1.1rem;
    background: var(--pnl-green-soft); border: 1px solid #cfe8da;
}
.cl-phase-card.done { background: #fff; border-color: var(--border-soft); }
.cl-phase-card p { margin: .2rem 0 0; font-size: .86rem; color: var(--ink-soft); }

.cl-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; margin-bottom: 1.1rem; }
.cl-steps, .cl-todo, .cl-check, .cl-feed { list-style: none; padding: 0; margin: 0; }
.cl-steps li a, .cl-todo li a {
    display: flex; align-items: center; gap: .6rem; padding: .7rem .2rem;
    border-top: 1px solid #f1eee8; color: var(--ink); text-decoration: none; font-size: .9rem;
}
.cl-steps li:first-child a, .cl-todo li:first-child a { border-top: none; }
.cl-steps li a:hover, .cl-todo li a:hover { color: var(--accent-dark); }
.cl-steps li.done a { color: var(--ink-soft); }
.cl-steps li.done span { text-decoration: line-through; }
.cl-steps li.done .bi-check-circle-fill { color: var(--pnl-green); }
.cl-todo i:first-child { color: var(--pnl-amber); }
.cl-todo li.muted a { color: var(--ink-soft); }
.cl-todo li.muted i:first-child { color: var(--pnl-blue); }
.cl-empty { margin: .4rem 0; color: var(--ink-soft); font-size: .88rem; }
.cl-pct { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.cl-progress { height: 8px; border-radius: 99px; background: #f1eee8; overflow: hidden; margin-bottom: .8rem; }
.cl-progress span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #c9a878, var(--accent)); }
.cl-check li { font-size: .85rem; padding: .2rem 0; }
.cl-check li.ok i { color: var(--pnl-green); }
.cl-check li.bad i { color: var(--pnl-red); }
.cl-check li.opt { color: var(--ink-soft); }
.cl-feed li { display: flex; align-items: center; gap: .65rem; padding: .55rem 0; border-top: 1px solid #f1eee8; }
.cl-feed li:first-child { border-top: none; }
.cl-feed-body { min-width: 0; flex: 1; line-height: 1.3; }
.cl-feed-body strong { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-feed-body small { display: block; font-size: .76rem; color: var(--ink-soft); }
.cl-quote { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cl-dot { width: 9px; height: 9px; border-radius: 50%; background: #d4d7dd; flex-shrink: 0; }
.cl-dot.hadir { background: var(--pnl-green); }
.cl-dot.tidak_hadir { background: var(--pnl-red); }
.cl-dot.ragu { background: var(--pnl-amber); }
.cl-links { grid-template-columns: 1fr; }

/* Hub hari-H */
.cl-live {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem;
    background: #fff; border: 1px solid var(--border-soft); border-radius: 16px; padding: 1rem 1.1rem; margin-bottom: 1rem;
    position: relative;
}
.cl-live div { text-align: center; }
.cl-live strong { display: block; font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cl-live div:first-child strong { color: var(--pnl-green); }
.cl-live span { font-size: .76rem; color: var(--ink-soft); }
.cl-live-note { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); font-size: .72rem; }
.cl-live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--pnl-green); margin-right: .2rem; animation: clPulse 1.6s infinite; }
@keyframes clPulse { 50% { opacity: .25; } }
.cl-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; }
.cl-tile {
    display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem 1rem; min-height: 120px;
    background: #fff; border: 1px solid var(--border-soft); border-radius: 16px;
    color: var(--ink); text-decoration: none; transition: box-shadow .15s, transform .15s;
}
.cl-tile:hover { color: var(--ink); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.cl-tile i { font-size: 1.7rem; color: var(--accent-dark); margin-bottom: .3rem; }
.cl-tile strong { font-size: 1rem; }
.cl-tile small { font-size: .78rem; color: var(--ink-soft); }
.cl-tile.main { background: var(--ink); border-color: var(--ink); color: #fff; }
.cl-tile.main i, .cl-tile.main small { color: #f1dcbc; }
@media (max-width: 575.98px) {
    .cl-tiles { grid-template-columns: 1fr 1fr; }
    .cl-tile.main { grid-column: 1 / -1; min-height: 110px; }
    .cl-live strong { font-size: 1.6rem; }
    .cl-event { padding: 1.1rem; }
    .cl-event h1 { font-size: 1.3rem; }
}
.cl-qr-img svg { width: 220px; height: 220px; max-width: 100%; }
.mw-100 { max-width: 100% !important; }

/* Tabel RSVP sebagai kartu di HP (klien/staf) */
@media (max-width: 767.98px) {
    .cl-body .cl-cards thead { display: none; }
    .cl-body .cl-cards, .cl-body .cl-cards tbody, .cl-body .cl-cards tr, .cl-body .cl-cards td { display: block; width: 100%; }
    .cl-body .cl-cards tr { border: 1px solid var(--border-soft); border-radius: 12px; margin-bottom: .6rem; padding: .5rem .7rem; background: #fff; }
    .cl-body .cl-cards td { border: none; padding: .15rem 0; white-space: normal; }
    .cl-body .cl-cards td[data-label]::before { content: attr(data-label) ': '; font-weight: 600; color: var(--ink-soft); font-size: .76rem; }
    .cl-body .table-responsive:has(.cl-cards) { overflow: visible; }
}

/* Daftar Tamu: bilah atur massal (muncul saat tamu dicentang) */
.tamu-bulk {
    position: sticky; bottom: .75rem; z-index: 1015;
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
    background: #fff; border: 1px solid var(--border-soft); border-radius: 12px;
    padding: .6rem .8rem; margin-bottom: .75rem; box-shadow: var(--shadow-md);
}
@media (max-width: 767.98px) { .cl-body .tamu-bulk { bottom: 4.6rem; } }

/* RSVP/VIP: chip filter cepat & bilah cari yang menempel saat di-scroll */
.rsvp-chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: .25rem; -webkit-overflow-scrolling: touch; }
.rsvp-chips button { flex-shrink: 0; border: 1px solid var(--border-soft); background: #fff; color: var(--ink-soft); border-radius: 999px; padding: .3rem .85rem; font-size: .82rem; font-weight: 600; }
.rsvp-chips button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (min-width: 768px) { .rsvp-toolbar { position: sticky; top: 106px; z-index: 1005; background: #fff; padding-top: .4rem; padding-bottom: .4rem; } }
