/* ============================================================
   Oya Creative — Portal Pelanggan
   Elegant dual theme (dark default / light toggle)
   ============================================================ */

:root {
    --primary: #3c93ea;
    --primary-hover: #2f7fd0;
    --primary-soft: rgba(60, 147, 234, .14);
    --green: #34d399;
    --amber: #fbbf24;
    --radius: 14px;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ---------- Dark theme (default) ---------- */
[data-theme="dark"] {
    --bg: #000000;
    --bg-soft: #0a0a0a;
    --card: #101010;
    --card-2: #161616;
    --sidebar: #080808;
    --text: #e6eaf2;
    --text-strong: #ffffff;
    --muted: #8b98ad;
    --border: rgba(148, 163, 184, .14);
    --border-soft: rgba(148, 163, 184, .08);
    --input-bg: #0f0f0f;
    --shadow: 0 10px 34px rgba(0, 0, 0, .55);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, .45);
    --hover: rgba(148, 163, 184, .09);
    --nav-active-bg: var(--primary-soft);
    --nav-active-text: #7db8f0;
    --logo-text: #ffffff;
    --th: #8b98ad;
    --td-border: rgba(148, 163, 184, .08);
}

/* ---------- Light theme ---------- */
[data-theme="light"] {
    --bg: #f5f7fb;
    --bg-soft: #eef2f7;
    --card: #ffffff;
    --card-2: #f8fafc;
    --sidebar: #f1f5f9;
    --text: #1f2937;
    --text-strong: #111827;
    --muted: #64748b;
    --border: #e5e9f0;
    --border-soft: #eef1f6;
    --input-bg: #ffffff;
    --shadow: 0 10px 30px rgba(15, 23, 42, .06);
    --shadow-sm: 0 2px 10px rgba(15, 23, 42, .05);
    --hover: #e9eef4;
    --nav-active-bg: #e0edfb;
    --nav-active-text: #1d6fc9;
    --logo-text: #111827;
    --th: #64748b;
    --td-border: #f0f2f6;
}

* { box-sizing: border-box; }

/* ---------- Komponen umum (disalin dari portal app.oyacreative.com) ---------- */
/* WAJIB ada: tanpa ini .btn/.field/.alert jatuh ke gaya bawaan browser */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=tel], .field input[type=date], .field select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: var(--input-bg);
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: var(--muted); opacity: .7; }
.field input:focus, .field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.pw-wrap input[type=password],
.pw-wrap input[type=text] {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: var(--input-bg);
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.pw-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.pw-wrap input::placeholder { color: var(--muted); opacity: .7; }

.row-between { display: flex; align-items: center; justify-content: space-between; }
.checkbox { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 17px; border-radius: 10px; border: 1px solid transparent;
    font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
    transition: background .15s, opacity .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #2f7fd0);
    color: #fff;
    box-shadow: 0 4px 14px rgba(60, 147, 234, .35);
}
.btn-primary:hover { opacity: .92; }
.btn-support {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, .35);
}
.btn-support:hover { opacity: .92; color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--hover); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }

.alert {
    padding: 11px 15px; border-radius: 10px; font-size: 13px; margin-bottom: 16px;
}
.alert-error { background: rgba(244, 63, 94, .12); color: #fb7185; border: 1px solid rgba(244, 63, 94, .25); }
.alert-success { background: rgba(16, 185, 129, .12); color: #34d399; border: 1px solid rgba(16, 185, 129, .25); }
[data-theme="light"] .alert-error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
[data-theme="light"] .alert-success { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    transition: background .25s ease, color .25s ease;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }

/* ---------- App layout (sidebar) ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
    width: 262px;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    padding: 22px 14px;
    display: flex; flex-direction: column;
    flex-shrink: 0;
    position: sticky; top: 0; height: 100vh;
    transition: width .22s ease, padding .22s ease, background .25s ease;
    overflow: hidden;
}
.sidebar .brand {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display); font-weight: 700; font-size: 17px;
    padding: 4px 8px 22px; color: var(--logo-text);
    white-space: nowrap;
}
.sidebar .brand .brand-text { transition: opacity .15s; }
.sidebar .brand .mark {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--primary), #6cb2f5); color: #fff;
    border-radius: 9px; display: flex; align-items: center; justify-content: center;
    font-size: 13px; flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(60, 147, 234, .4);
}
.sidebar .menu-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
    color: var(--muted); padding: 8px; margin-top: 6px;
    white-space: nowrap; transition: opacity .15s;
}
.nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 11px; border-radius: 10px; font-size: 14px; color: var(--muted);
    margin-bottom: 2px; white-space: nowrap; cursor: pointer;
    transition: background .15s, color .15s;
    background: none; border: none; width: 100%; text-align: left; font-family: inherit;
}
.nav-item .label { transition: opacity .15s; }
.nav-item:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--nav-active-bg); font-weight: 600; color: var(--nav-active-text); }
.nav-item .ico { width: 20px; text-align: center; flex-shrink: 0; }
.sidebar .spacer { flex: 1; }
.theme-toggle { margin-top: 4px; }
.user-footer {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 10px 2px; border-top: 1px solid var(--border); margin-top: 12px;
    white-space: nowrap; overflow: hidden;
}
.user-footer .user-meta { transition: opacity .15s; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #6cb2f5); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; flex-shrink: 0;
}

/* Collapsed sidebar */
.sidebar.collapsed { width: 68px; padding: 22px 10px; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .menu-label,
.sidebar.collapsed .nav-item .label,
.sidebar.collapsed .user-footer .user-meta,
.sidebar.collapsed .user-footer form { opacity: 0; width: 0; overflow: hidden; pointer-events: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px 0; }
.sidebar.collapsed .brand { justify-content: center; padding: 4px 0 22px; }
.sidebar.collapsed .user-footer { justify-content: center; padding: 11px 0 2px; }

/* Topbar with hamburger */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.hamburger {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 16px; color: var(--text);
    flex-shrink: 0; transition: background .15s;
}
.hamburger:hover { background: var(--hover); }
.topbar .crumb-wrap { flex: 1; min-width: 0; }

.main { flex: 1; padding: 32px 42px; min-width: 0; }
.crumb { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.page-title { font-size: 27px; font-family: var(--font-display); margin: 0 0 5px; color: var(--text-strong); }
.page-sub { color: var(--muted); font-size: 14px; margin: 0 0 26px; }

.header-actions { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.header-actions .right { display: flex; gap: 10px; flex-wrap: wrap; }

/* Stats cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px 22px; box-shadow: var(--shadow-sm);
    transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card .label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.stat-card .value { font-size: 30px; font-weight: 700; font-family: var(--font-display); color: var(--text-strong); }

/* Card + table */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: 16px; margin: 0; font-family: var(--font-display); color: var(--text-strong); }
.panel-head .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 12px 22px; color: var(--th); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--border); }
td { padding: 15px 22px; border-bottom: 1px solid var(--td-border); color: var(--text); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--hover); }
.strong { font-weight: 600; color: var(--text-strong); }
.muted { color: var(--muted); }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 13px; opacity: .75; }
.save { color: var(--green); font-size: 13px; font-weight: 600; }

.badge {
    display: inline-block; padding: 4px 12px; border-radius: 999px;
    background: var(--hover); color: var(--text); font-size: 12px; font-weight: 600;
}
.badge.active { background: rgba(16, 185, 129, .15); color: var(--green); }
.badge.pending { background: rgba(251, 191, 36, .15); color: var(--amber); }
.badge.processing { background: var(--primary-soft); color: #7db8f0; }
.badge.completed { background: rgba(16, 185, 129, .15); color: var(--green); }
.badge.terminated { background: var(--hover); color: var(--muted); }
[data-theme="light"] .badge.active, [data-theme="light"] .badge.completed { background: #dcfce7; color: #166534; }
[data-theme="light"] .badge.pending { background: #fef9c3; color: #854d0e; }
[data-theme="light"] .badge.processing { background: #dbeafe; color: #1e40af; }
[data-theme="light"] .badge.terminated { background: #f3f4f6; color: #6b7280; }

.actions { display: flex; gap: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 16px; }
.checkbox-inline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); font-weight: 500; }

/* ---------- Dashboard pelanggan (hero + kartu) ---------- */
.hero {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 22px 24px; margin-bottom: 24px; box-shadow: var(--shadow-sm); flex-wrap: wrap;
}
.hero-eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); font-weight: 700; margin-bottom: 8px; }
.hero-title { font-size: 28px; font-family: var(--font-display); margin: 0 0 6px; color: var(--text-strong); }
.hero-meta { font-size: 13px; color: var(--muted); text-transform: capitalize; }
.hero-meta .dot { opacity: .5; margin: 0 4px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stats-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-ico { font-size: 15px; opacity: .75; }
.stat-card .stat-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }

.panel-body { padding: 18px 22px; }
.panel-head .btn { flex: none; }

.money-rows { display: grid; gap: 12px; }
.money-row { flex-wrap: wrap;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--card-2); border: 1px solid var(--border-soft);
    border-radius: 12px; padding: 14px 16px;
}
.money-label { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.money-value { font-size: 20px; font-weight: 700; font-family: var(--font-display); color: var(--text-strong); }
.money-value.is-due { color: var(--amber); }

.pay-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--card-2); border: 1px solid var(--border-soft);
    border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
}
.pay-card:last-child { margin-bottom: 0; }
.pay-logo {
    width: 46px; height: 46px; flex: none; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-soft); color: var(--primary);
    font-weight: 700; font-size: 12px; letter-spacing: .03em;
}
.pay-name { font-weight: 600; font-size: 14px; color: var(--text-strong); display: flex; align-items: center; gap: 8px; }
.pay-type {
    font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    background: var(--hover); color: var(--muted); border-radius: 999px; padding: 3px 8px;
}
.pay-number { font-size: 13px; color: var(--text); margin-top: 3px; font-variant-numeric: tabular-nums; }
.pay-holder { font-size: 12px; color: var(--muted); margin-top: 2px; }

.order-list { display: grid; gap: 8px; }
.order-item {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    background: var(--card-2); border: 1px solid var(--border-soft);
    border-radius: 12px; padding: 13px 16px; text-decoration: none; color: inherit;
    transition: border-color .15s, transform .12s;
}
.order-item.is-link:hover { border-color: var(--primary); transform: translateY(-1px); }
.order-title { font-weight: 600; font-size: 14px; color: var(--text-strong); }
.order-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.order-right { display: flex; align-items: center; gap: 12px; flex: none; }
.order-amount { font-weight: 700; font-family: var(--font-display); color: var(--text-strong); font-size: 15px; white-space: nowrap; }

.empty { text-align: center; padding: 22px 10px; }
.empty-title { font-weight: 600; color: var(--text); font-size: 14px; }
.empty-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.note { font-size: 12px; color: var(--muted); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); }

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff; box-shadow: 0 4px 14px rgba(239, 68, 68, .3);
}
.btn-danger:hover { opacity: .92; color: #fff; }

.badge.cancelled { background: rgba(244, 63, 94, .15); color: #fb7185; }
[data-theme="light"] .badge.cancelled { background: #fee2e2; color: #b91c1c; }
.badge.paid { background: rgba(16, 185, 129, .15); color: var(--green); }
.badge.unpaid { background: rgba(251, 191, 36, .15); color: var(--amber); }
[data-theme="light"] .badge.paid { background: #dcfce7; color: #166534; }
[data-theme="light"] .badge.unpaid { background: #fef9c3; color: #854d0e; }

.page-eyebrow {
    font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--primary); font-weight: 700; margin-bottom: 6px;
}

/* Tombol ikon mata di tabel invoice */
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 9px;
    background: var(--text-strong); color: var(--bg);
    font-size: 15px; line-height: 1; text-decoration: none;
    transition: transform .12s, opacity .15s;
}
.icon-btn:hover { transform: translateY(-1px); opacity: .88; }
[data-theme="light"] .icon-btn { background: #111827; color: #fff; }

.panel-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 22px; border-top: 1px solid var(--border); flex-wrap: wrap;
}
.pager { display: flex; align-items: center; gap: 6px; }
.pager-btn {
    padding: 6px 11px; border-radius: 8px; font-size: 12px; font-weight: 600;
    border: 1px solid var(--border); color: var(--text); text-decoration: none; background: transparent;
}
.pager-btn:hover { background: var(--hover); }
.pager-btn.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager-btn.is-disabled { opacity: .45; cursor: default; }

/* ---------- Halaman detail invoice ---------- */
/* Header ringkas + banner status (pola app.websweetsstudio.com) */
.inv-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 20px; flex-wrap: wrap; margin-bottom: 18px;
}
.inv-head-right { text-align: right; }
.inv-head-right .muted { font-size: 12px; }
.inv-total-amount {
    font-family: var(--font-display); font-weight: 700; font-size: 26px;
    color: var(--text-strong); line-height: 1.2;
}
.inv-note { font-size: 12px; color: var(--muted); margin-top: 2px; }

.inv-banner {
    display: flex; gap: 12px; align-items: flex-start;
    border-radius: 12px; padding: 14px 16px; margin-bottom: 18px;
    border: 1px solid transparent;
}
.inv-banner .ico { font-size: 18px; line-height: 1.2; flex: none; }
.inv-banner .ttl { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.inv-banner .dsc { font-size: 13px; opacity: .92; }
.inv-banner.is-paid { background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .35); color: #6ee7b7; }
[data-theme="light"] .inv-banner.is-paid { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.inv-banner.is-due { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .35); color: #fcd34d; }
[data-theme="light"] .inv-banner.is-due { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.inv-banner.is-cancel { background: rgba(244, 63, 94, .12); border-color: rgba(244, 63, 94, .35); color: #fda4af; }
[data-theme="light"] .inv-banner.is-cancel { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* Dua kolom: kiri Detail Invoice & Detail Tagihan, kanan Ringkasan */
.inv-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.inv-col { display: grid; gap: 16px; }

.inv-rows { display: grid; gap: 12px; }
.inv-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.inv-row .k { font-size: 12px; color: var(--muted); }
.inv-row .v { font-size: 13px; color: var(--text-strong); font-weight: 600; text-align: right; }
.inv-row .sub { font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.inv-row.is-total { border-top: 1px solid var(--border); margin-top: 2px; padding-top: 12px; }
.inv-row.is-total .k { font-size: 13px; color: var(--text); font-weight: 600; }
.inv-row.is-total .v { font-size: 18px; font-family: var(--font-display); font-weight: 700; }
.inv-row.is-discount .v { color: #34d399; }
[data-theme="light"] .inv-row.is-discount .v { color: #047857; }

.inv-lines { display: grid; gap: 12px; margin-bottom: 16px; }
.inv-line { display: flex; gap: 12px; align-items: flex-start; }
.inv-line .av {
    width: 38px; height: 38px; flex: none; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(60, 147, 234, .15); color: var(--primary);
    font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.inv-line .body { flex: 1; min-width: 0; }
.inv-line .name { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.inv-line .desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.inv-line .amt { font-size: 14px; font-weight: 700; color: var(--text-strong); white-space: nowrap; }

@media (max-width: 900px) {
    .inv-cols { grid-template-columns: 1fr; }
    .inv-head-right { text-align: left; }
}

.invoice-sheet {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px 30px 26px; box-shadow: var(--shadow-sm); max-width: 900px;
}
.invoice-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.invoice-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.invoice-brand .mark {
    width: 42px; height: 42px; border-radius: 12px; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff; font-weight: 700; font-family: var(--font-display);
}
.invoice-brand-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--text-strong); }
.invoice-brand-sub { font-size: 12px; color: var(--muted); }
.invoice-note { font-size: 12px; color: var(--muted); max-width: 330px; }
.invoice-meta { text-align: right; min-width: 250px; }
.invoice-status { margin-bottom: 10px; }
.invoice-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; text-align: left; }
.invoice-meta-grid .muted { font-size: 11px; }
.invoice-meta-grid .strong { font-size: 13px; }

.invoice-parties {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
    margin: 22px 0; padding: 16px 18px;
    background: var(--card-2); border: 1px solid var(--border-soft); border-radius: 12px;
}
.invoice-party-title {
    font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
    color: var(--muted); font-weight: 700; margin-bottom: 6px;
}

.invoice-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 16px; }
.invoice-table th {
    padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
    color: var(--th); border-bottom: 1px solid var(--border); font-weight: 600;
}
.invoice-table td { padding: 12px; border-bottom: 1px solid var(--td-border); vertical-align: top; }

.invoice-totals { margin-left: auto; width: 100%; max-width: 320px; }
.invoice-total-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 7px 0; font-size: 14px;
}
.invoice-total-row.is-grand { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; font-size: 16px; }

.invoice-paid {
    margin-top: 18px; padding: 13px 16px; border-radius: 10px; font-size: 13px;
    background: rgba(16, 185, 129, .12); color: var(--green);
}
[data-theme="light"] .invoice-paid { background: #f0fdf4; color: #15803d; }
.invoice-due {
    margin-top: 18px; padding: 13px 16px; border-radius: 10px; font-size: 13px;
    background: rgba(251, 191, 36, .12); color: var(--amber);
}
[data-theme="light"] .invoice-due { background: #fef9c3; color: #854d0e; }

.invoice-pay { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--border); }
.invoice-pay h3 { font-size: 15px; font-family: var(--font-display); margin: 0 0 12px; color: var(--text-strong); }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }

@media (max-width: 820px) {
    .invoice-parties, .invoice-meta-grid { grid-template-columns: 1fr; }
    .invoice-meta { text-align: left; }
    .invoice-sheet { padding: 20px 18px; }
}

@media (max-width: 820px) {
    .hero { flex-direction: column; }
    .order-item { flex-direction: column; align-items: flex-start; }
    .order-right { width: 100%; justify-content: space-between; }
}
@media (max-width: 820px) {
    .grid-2, .settings-grid { grid-template-columns: 1fr; }
    .main { padding: 24px 20px; }
}

/* Pagination (Laravel default) */
nav[aria-label="Pagination"] { margin-top: 16px; }
nav[aria-label="Pagination"] .flex { display: flex; gap: 6px; align-items: center; }
nav[aria-label="Pagination"] a, nav[aria-label="Pagination"] span {
    padding: 7px 12px; border-radius: 8px; font-size: 13px;
    border: 1px solid var(--border); color: var(--muted); background: var(--card);
}
nav[aria-label="Pagination"] a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
nav[aria-label="Pagination"] [aria-current="page"] {
    background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600;
}
nav[aria-label="Pagination"] .text-sm { color: var(--muted); font-size: 13px; margin-right: 8px; }

/* ---------- Password field + toggle mata (kolom samping) ---------- */
.pw-wrap { display: flex; align-items: stretch; gap: 8px; width: 100%; }
.pw-wrap > input[type=password],
.pw-wrap > input[type=text] {
    flex: 1 1 auto; min-width: 0; width: auto; padding-right: 13px;
}
.pw-toggle {
    flex: 0 0 auto;
    width: 46px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    cursor: pointer; padding: 0;
    transition: color .15s, background .15s, border-color .15s;
}
.pw-toggle:hover { color: var(--primary); background: var(--hover); border-color: var(--primary); }
.pw-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.pw-toggle svg { width: 21px; height: 21px; display: block; }

/* ---------- Simple chart (dashboard penjualan) ---------- */
.chart { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding: 0 2px; }
.chart-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 6px; }
.chart-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart-bar {
    width: 100%; max-width: 54px; min-height: 3px;
    background: linear-gradient(180deg, #6cb2f5, var(--primary));
    border-radius: 8px 8px 4px 4px;
    transition: opacity .15s;
    box-shadow: 0 4px 12px rgba(60, 147, 234, .25);
}
.chart-bar:hover { opacity: .82; }
.chart-value { font-size: 11px; color: var(--muted); white-space: nowrap; }
.chart-label { font-size: 11px; font-weight: 600; color: var(--text); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
    z-index: 1000;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-card {
    width: 100%; max-width: 400px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transform: translateY(12px);
    transition: transform .2s ease;
}
.modal-overlay.open .modal-card { transform: translateY(0); }
.modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text-strong); }
.modal-close {
    background: none; border: none; color: var(--muted);
    font-size: 24px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.modal-close:hover { color: var(--text); }
.modal-body {
    padding: 20px; font-size: 14px; color: var(--text); line-height: 1.6;
}
.modal-actions {
    display: flex; gap: 10px; justify-content: flex-end;
    padding: 14px 20px; border-top: 1px solid var(--border);
}



/* ============================================================
   Halaman login — layar penuh: panel brand (kiri) + panel form (kanan)
   ============================================================ */
.auth-wrap {
    min-height: 100vh; position: relative; overflow: hidden;
    background:
        radial-gradient(1200px 700px at 6% -14%, rgba(60, 147, 234, .22), transparent 60%),
        radial-gradient(900px 600px at 104% 108%, rgba(60, 147, 234, .16), transparent 58%),
        var(--bg);
    display: grid;
}
/* aurora bergerak sangat halus — di belakang, tidak mencuri perhatian */
.auth-wrap::before {
    content: ""; position: absolute; inset: -20%;
    background:
        radial-gradient(closest-side, rgba(60, 147, 234, .30), transparent 70%) 18% 22%/52% 58% no-repeat,
        radial-gradient(closest-side, rgba(108, 178, 245, .22), transparent 70%) 82% 76%/46% 52% no-repeat;
    filter: blur(70px); opacity: .75; pointer-events: none;
    animation: aurora 26s ease-in-out infinite alternate;
}
@keyframes aurora {
    from { transform: translate3d(-2%, -1%, 0) scale(1); }
    to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { .auth-wrap::before { animation: none; } }

.auth-shell {
    position: relative; z-index: 1;
    width: 100%; min-height: 100vh;
    display: grid; grid-template-columns: 1.12fr .88fr;
}

/* ---------- Kiri: panel brand ---------- */
.auth-brand {
    position: relative; padding: 56px clamp(32px, 5vw, 76px) 48px;
    display: flex; flex-direction: column; overflow: hidden;
    border-right: 1px solid var(--border-soft);
    background: linear-gradient(160deg, rgba(60, 147, 234, .10), transparent 46%);
}
.auth-brand-top {
    display: flex; align-items: center; gap: 12px;
    font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--logo-text);
}
.auth-brand-top .mark {
    width: 42px; height: 42px; flex: none;
    background: linear-gradient(135deg, var(--primary), #6cb2f5);
    color: #fff; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
    box-shadow: 0 8px 22px rgba(60, 147, 234, .45);
}
.auth-headline {
    margin: clamp(28px, 6vh, 56px) 0 16px;
    font-family: var(--font-display); font-weight: 600; letter-spacing: -.025em;
    font-size: clamp(30px, 3.4vw, 46px); line-height: 1.12; color: var(--text-strong);
}
.auth-headline em { font-style: normal; color: var(--primary); }
.auth-lead {
    margin: 0 0 clamp(24px, 4vh, 36px);
    font-size: clamp(14px, 1vw, 15.5px); line-height: 1.65; color: var(--muted); max-width: 46ch;
}
.kicker-pill {
    display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
    padding: 7px 14px; border-radius: 999px;
    background: var(--primary-soft); border: 1px solid var(--border);
    font-size: 12px; font-weight: 600; color: var(--primary); letter-spacing: .02em;
}
.auth-points { list-style: none; margin: 0 0 clamp(26px, 4vh, 40px); padding: 0; display: grid; gap: 12px; }
.auth-points li {
    display: flex; align-items: center; gap: 13px;
    padding: 14px 16px; border-radius: 14px;
    background: var(--card); border: 1px solid var(--border-soft);
    font-size: 14px; color: var(--text);
    transition: transform .18s ease, border-color .18s ease;
}
.auth-points li:hover { transform: translateX(3px); border-color: var(--primary); }
.auth-points .ico {
    width: 34px; height: 34px; flex: none; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 15px;
    background: var(--primary-soft); border: 1px solid var(--border);
}
/* strip grafik dekoratif — mengisi ruang bawah tanpa konten palsu */
.auth-spark { margin-top: auto; padding-top: clamp(24px, 4vh, 44px); }
.auth-spark .bars { display: flex; align-items: flex-end; gap: 5px; height: 74px; }
.auth-spark .bars i {
    flex: 1; border-radius: 4px 4px 2px 2px; min-height: 6px;
    background: linear-gradient(180deg, rgba(108, 178, 245, .85), var(--primary));
    opacity: .55;
}
.auth-spark .cap { margin-top: 10px; font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.auth-brand-foot {
    padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--border-soft);
    font-size: 12px; color: var(--muted);
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.pulse {
    width: 7px; height: 7px; border-radius: 50%; flex: none;
    background: var(--green); box-shadow: 0 0 0 0 rgba(52, 211, 153, .55);
    animation: pulse 2.2s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); }
    70%  { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.orb { position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none; }
.orb-a { width: 300px; height: 300px; right: -90px; top: -80px; background: rgba(60, 147, 234, .26); }
.orb-b { width: 240px; height: 240px; left: -80px; bottom: -90px; background: rgba(108, 178, 245, .16); }

/* ---------- Kanan: panel form (satu bidang penuh, bukan kartu mengambang) ---------- */
.auth-card {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; justify-content: center;
    padding: clamp(36px, 5vh, 64px) clamp(28px, 4.5vw, 72px);
    background: color-mix(in srgb, var(--card) 55%, transparent);
    backdrop-filter: blur(6px);
    border: none; border-radius: 0; box-shadow: none; max-width: none;
}
.auth-form-in { width: 100%; max-width: 404px; margin: 0 auto; }
.auth-card-head h2 {
    margin: 0 0 8px; font-family: var(--font-display); font-weight: 600;
    font-size: clamp(26px, 2.3vw, 32px); letter-spacing: -.02em; color: var(--text-strong);
}
.auth-card-head p { margin: 0 0 clamp(22px, 3.4vh, 32px); font-size: 14px; line-height: 1.6; color: var(--muted); }
.auth-card .field { margin-bottom: 18px; }
.auth-card .field label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.auth-card .field input {
    width: 100%; padding: 15px 48px 15px 16px; font-size: 15px;
    border-radius: 12px; border: 1px solid var(--border); background: var(--card-2); color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.auth-card .field input:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(60, 147, 234, .16);
}
.auth-card .btn { padding: 15px 20px; font-size: 15px; border-radius: 12px; }
.auth-alt {
    margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border-soft);
    display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted);
}
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex: none; }
.auth-card .pw-wrap { position: relative; display: flex; }
.auth-card .pw-wrap input { flex: 1; }
.auth-card .pw-toggle {
    position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; font-size: 16px; line-height: 1;
    padding: 7px 8px; border-radius: 9px; color: var(--muted);
}
.auth-card .pw-toggle:hover { background: var(--hover); color: var(--primary); }

@media (max-width: 980px) {
    .auth-shell { grid-template-columns: 1fr; min-height: 100vh; }
    .auth-brand { display: none; }
    .auth-card { justify-content: center; padding: 44px 24px; }
}
/* Panel kiri tidak boleh memaksa halaman menggulir di layar pendek */
@media (max-height: 1000px) and (min-width: 981px) {
    .auth-spark { display: none; }
    .auth-brand { padding: 44px clamp(32px, 5vw, 76px) 34px; }
}
@media (max-height: 820px) and (min-width: 981px) {
    .auth-headline { font-size: clamp(25px, 2.5vw, 32px); margin-top: 20px; }
    .auth-lead { margin-bottom: 20px; font-size: 14px; }
    .auth-points { margin-bottom: 20px; gap: 8px; }
    .auth-points li { padding: 10px 13px; font-size: 13.5px; }
    .auth-points .ico { width: 30px; height: 30px; font-size: 14px; }
    .auth-card { padding: 30px clamp(28px, 4.5vw, 72px); }
}

/* ============================================================
   Tambahan dashboard statistik (oya.ai.id) — juga dipakai versi Vue
   ============================================================ */
[v-cloak] { display: none; }
.brand .mark {
    width: 34px; height: 34px; flex: none;
    background: linear-gradient(135deg, var(--primary), #6cb2f5);
    color: #fff; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    box-shadow: 0 4px 14px rgba(60, 147, 234, .4);
    margin-right: 10px;
}
.auth-title { font-size: 25px; margin: 0 0 6px; font-family: var(--font-display); color: var(--text-strong); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
    text-align: left; font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
    color: var(--th); font-weight: 700; padding: 12px 22px;
    border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--card); z-index: 1;
}
td { padding: 11px 22px; border-bottom: 1px solid var(--td-border); vertical-align: middle; }
tbody tr:hover { background: var(--hover); }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 190px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.chart-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.chart-bar {
    width: 100%; border-radius: 7px 7px 3px 3px; min-height: 3px;
    background: linear-gradient(180deg, var(--primary), rgba(60, 147, 234, .35));
}
.chart-bar:hover { filter: brightness(1.25); }
.chart-value { font-size: 10px; color: var(--muted); margin-top: 7px; white-space: nowrap; }
.chart-label { font-size: 10px; color: var(--muted); opacity: .8; }
.panel-chart { padding: 20px 22px 8px; }
.money-row { flex-wrap: wrap; }
.money-bar { flex: 1; height: 7px; background: var(--hover); border-radius: 999px; overflow: hidden; min-width: 60px; }
.money-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #6cb2f5); border-radius: 999px; }
.money-label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--text-strong); }
.combo { border-bottom: 1px solid var(--border-soft); padding: 12px 0; }
.combo:last-child { border-bottom: none; }
.combo-name { font-weight: 600; font-size: 14px; color: var(--text-strong); font-family: var(--font-display); margin-bottom: 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--hover); color: var(--text); border: 1px solid var(--border-soft); }
.scroll-x { overflow-x: auto; }
.scroll-y { max-height: 420px; overflow-y: auto; }
.scroll-y-lg { max-height: 480px; overflow-y: auto; }
.ellip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--muted); }
.strong { font-weight: 600; color: var(--text-strong); }
.tiny { font-size: 11px; }
