/* =========================================================
   Dashboard owner — memakai token warna dari app.css
   ========================================================= */

.dash {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 22px 52px;
    display: grid;
    gap: 16px;
}

.dash-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.dash-head h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 27px;
    letter-spacing: -0.4px;
    margin-bottom: 4px;
}

.dash-filters {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
}

.dash-filters .field {
    flex: 0 1 160px;
    min-width: 140px;
}

.dash-filters .filter-select {
    flex-basis: 180px;
}

.dash-filters .filter-shift {
    flex-basis: 250px;
}

.dash-period {
    margin-left: auto;
    align-self: center;
}

/* ------------------------------ KPI ------------------------------ */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.kpi {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.kpi::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--gold), var(--brand-2));
    opacity: 0.85;
}

.kpi > span {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--muted);
}

.kpi > strong {
    font-size: 23px;
    letter-spacing: -0.6px;
    line-height: 1.15;
}

.kpi > small {
    font-size: 11.5px;
    color: var(--muted);
}

.kpi.accent {
    background: linear-gradient(160deg, #2b1c14, #3d2117);
    border-color: #4a2b1d;
    color: #f8ecdc;
}

.kpi.accent > span,
.kpi.accent > small {
    color: rgba(248, 236, 220, 0.62);
}

.kpi.accent::before {
    background: linear-gradient(180deg, #f0c887, var(--gold));
}

/* ----------------------------- Panels ---------------------------- */

.dash-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 16px;
    align-items: start;
}

.panel {
    display: grid;
    gap: 14px;
    padding: 18px 20px 20px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.panel-head h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    letter-spacing: -0.3px;
    margin-bottom: 3px;
}

.panel-head h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
}

.count-badge {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(179, 38, 30, 0.1);
    border: 1px solid rgba(179, 38, 30, 0.24);
    color: var(--danger);
    font-size: 13px;
    font-weight: 700;
}

.count-badge.safe {
    background: #eaf3ec;
    border-color: #c4ddca;
    color: #275c41;
}

/* ------------------------------ P&L ------------------------------ */

.pnl-body {
    display: grid;
    gap: 2px;
}

.pl-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px dashed #eee1cf;
    font-size: 14px;
}

.pl-row:last-child {
    border-bottom: none;
}

.pl-row span {
    color: #5d4c3d;
}

.pl-row strong {
    font-variant-numeric: tabular-nums;
}

.pl-row.minus strong {
    color: #8a5b3d;
}

.pl-row.plus strong {
    color: #275c41;
}

.pl-row.subtotal {
    margin-top: 4px;
    border-top: 1px solid var(--line);
    border-bottom: none;
    padding-top: 11px;
    font-weight: 600;
}

.pl-row.total {
    padding: 12px 14px;
    margin-top: 4px;
    border-radius: 12px;
    border-bottom: none;
    background: #eaf3ec;
    color: #1f4d36;
    font-size: 16px;
    font-weight: 700;
}

.pl-row.total span {
    color: #275c41;
    font-weight: 600;
}

.pl-row.total.negative {
    background: rgba(179, 38, 30, 0.08);
    color: var(--danger);
}

.pl-row.total.negative span {
    color: var(--danger);
}

.pnl-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-top: 4px;
}

.mini-rows {
    display: grid;
    gap: 4px;
    margin-top: 7px;
}

.mini-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    font-size: 12.5px;
    color: #5d4c3d;
}

.mini-row strong {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.mini-empty {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 7px;
}

/* -------------------------- Stok menipis ------------------------- */

.stock-list {
    display: grid;
    gap: 9px;
}

.stock-item {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffefa;
}

.stock-item.critical {
    border-color: rgba(179, 38, 30, 0.3);
    background: rgba(179, 38, 30, 0.04);
}

.stock-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.stock-name {
    font-size: 13.5px;
    font-weight: 600;
}

.stock-figure {
    font-size: 12.5px;
    font-weight: 700;
    color: #8a5b3d;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.stock-item.critical .stock-figure {
    color: var(--danger);
}

.stock-bar {
    height: 6px;
    border-radius: 999px;
    background: #f0e4d2;
    overflow: hidden;
}

.stock-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold), var(--brand-2));
    min-width: 3px;
}

.stock-item.critical .stock-bar span {
    background: linear-gradient(90deg, #d65a48, var(--danger));
}

.stock-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    color: var(--muted);
}

.stock-flag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--danger);
}

.dash-empty {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 34px 16px;
    text-align: center;
    border: 1px dashed #c4ddca;
    border-radius: 14px;
    background: #f4faf5;
}

.dash-empty span {
    font-size: 24px;
}

.dash-empty p {
    font-weight: 600;
    color: #275c41;
}

.dash-empty small {
    font-size: 11.5px;
    color: var(--muted);
}

.dash-empty-inline {
    padding: 30px 10px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

/* ---------------------------- Chart ----------------------------- */

.sales-split {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.split-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f8f0e2;
    border: 1px solid #efe1cc;
    font-size: 11px;
    color: #6c5745;
    white-space: nowrap;
}

.split-pill strong {
    font-size: 12px;
    color: var(--ink);
}

.chart-wrap {
    padding: 6px 2px 0;
}

.chart {
    display: flex;
    align-items: stretch;
    gap: 7px;
    height: 210px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.chart-col {
    flex: 1 1 0;
    min-width: 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    height: 100%;
}

.chart-value {
    font-size: 9.5px;
    text-align: center;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
}

.chart-track {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.chart-bar {
    width: 100%;
    max-width: 46px;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, var(--brand-2), var(--brand));
    box-shadow: inset 0 -6px 10px rgba(0, 0, 0, 0.08);
    min-height: 3px;
    transition: filter 0.15s ease;
}

.chart-col:hover .chart-bar {
    filter: brightness(1.12);
}

.chart-bar.zero {
    background: #e9ddcc;
    box-shadow: none;
}

.chart-label {
    font-size: 10px;
    text-align: center;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    height: 13px;
}

.chart.dense .chart-value {
    display: none;
}

.chart.dense .chart-label {
    font-size: 9px;
}

/* ---------------------------- Table ----------------------------- */

.table-wrap {
    max-height: 300px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
}

.dash-table th,
.dash-table td {
    padding: 9px 12px;
    text-align: right;
    white-space: nowrap;
}

.dash-table th:first-child,
.dash-table td:first-child {
    text-align: left;
}

.dash-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8f0e2;
    border-bottom: 1px solid #efe1cc;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
}

.dash-table tbody tr + tr td {
    border-top: 1px solid #f2e7d7;
}

.dash-table tbody tr:hover td {
    background: #fff8ec;
}

.dash-table td:first-child {
    font-weight: 600;
}

/* --------------------------- Responsive -------------------------- */

@media (max-width: 1020px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dash-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .dash {
        padding: 18px 14px 40px;
    }

    .dash-head h1 {
        font-size: 23px;
    }

    .dash-filters .field {
        flex: 1 1 46%;
    }

    .dash-period {
        margin-left: 0;
    }

    .pnl-breakdown {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .chart {
        height: 170px;
        gap: 5px;
    }

    .sales-split {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .kpi {
        padding: 14px;
    }

    .kpi > strong {
        font-size: 20px;
    }

    .panel {
        padding: 16px;
        border-radius: 16px;
    }

    .dash-table th,
    .dash-table td {
        padding: 8px 10px;
    }
}

/* ---------------------------- Ekspor ---------------------------- */

.panel-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.export-actions {
    display: flex;
    gap: 6px;
}

.export-btn {
    padding: 7px 11px;
    font-size: 12px;
    border-radius: 9px;
    font-weight: 700;
}

.export-btn:disabled {
    opacity: 0.55;
}

@media (max-width: 700px) {
    .panel-tools {
        justify-content: flex-start;
    }
}

/* ========================= Owner shell ========================= */

.owner-app {
    min-height: 100vh;
}

.owner-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 260px;
    padding: 20px 16px;
    overflow-y: auto;
    color: #f6ead8;
    background:
        radial-gradient(360px 220px at 10% -10%, rgba(229, 165, 61, 0.16), transparent 65%),
        linear-gradient(180deg, #241a15 0%, #332015 100%);
    border-right: 1px solid rgba(246, 234, 216, 0.08);
}

.owner-main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: 260px;
}

.owner-main > .dash {
    flex: 1;
}

.sidebar-head {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 4px 6px 2px;
}

.brand-logo.sidebar {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 12px;
}

.sidebar-store {
    display: grid;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.sidebar-store strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14.5px;
    line-height: 1.25;
    letter-spacing: 0.1px;
    overflow-wrap: anywhere;
}

.sidebar-store span {
    font-size: 10.5px;
    line-height: 1.35;
    color: rgba(246, 234, 216, 0.55);
    overflow-wrap: anywhere;
}

.sidebar-close {
    display: none;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 1px solid rgba(246, 234, 216, 0.18);
    border-radius: 9px;
    background: transparent;
    color: #f6ead8;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.sidebar-label {
    margin: 14px 10px 5px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: rgba(246, 234, 216, 0.4);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: rgba(246, 234, 216, 0.78);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sidebar-link svg {
    flex: 0 0 auto;
    opacity: 0.82;
}

.sidebar-link:hover {
    background: rgba(246, 234, 216, 0.07);
    color: #fff7ea;
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(229, 165, 61, 0.22), rgba(229, 165, 61, 0.05));
    border-color: rgba(229, 165, 61, 0.26);
    color: #f6d9a4;
}

.sidebar-link.active svg {
    opacity: 1;
}

.sidebar-foot {
    display: grid;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(246, 234, 216, 0.1);
}

.sidebar-foot small {
    text-align: center;
    font-size: 10px;
    letter-spacing: 0.4px;
    color: rgba(246, 234, 216, 0.36);
}

.sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 45;
    border: 0;
    padding: 0;
    background: rgba(20, 12, 8, 0.58);
    backdrop-filter: blur(2px);
}

.owner-topbar {
    gap: 16px;
}

.owner-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.owner-topbar-title {
    display: grid;
    gap: 1px;
    line-height: 1.15;
}

.owner-topbar-title span {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: rgba(246, 234, 216, 0.45);
}

.owner-topbar-title strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15.5px;
    color: #f8ecdc;
}

.sidebar-toggle {
    display: none;
}

.owner-mobile-brand {
    display: none;
}

.brand-logo.topbar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 11px;
}

/* ------------------------- Akses cepat ------------------------ */

.quick-panel {
    align-content: start;
}

.quick-links {
    display: grid;
    gap: 9px;
}

.quick-link {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fffcf6;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.quick-link:hover {
    border-color: rgba(229, 165, 61, 0.55);
    background: #fff8ea;
    transform: translateY(-1px);
}

.quick-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
    background: rgba(156, 45, 30, 0.08);
    color: var(--brand);
}

.quick-link > span:last-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.quick-link strong {
    font-size: 13.5px;
    line-height: 1.3;
}

.quick-link small {
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--muted);
}

/* -------------------------- Accounting ------------------------- */

.accounting-page .panel {
    gap: 16px;
}

/* ========================= Pengaturan ========================== */

.settings-page {
    max-width: 1040px;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 16px;
    align-items: start;
}

.settings-card {
    padding: 22px;
}

.settings-form {
    display: grid;
    gap: 16px;
}

.logo-editor {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px;
    border: 1px dashed var(--line);
    border-radius: 15px;
    background: #fffcf5;
}

.logo-preview {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(150deg, var(--gold), #c98224);
    color: #2a1a11;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.logo-preview img,
.preview-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #fff;
}

.logo-copy {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.logo-copy strong {
    font-size: 13.5px;
}

.logo-copy p {
    font-size: 12px;
}

.logo-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.file-btn {
    position: relative;
    overflow: hidden;
    padding: 9px 14px;
    font-size: 13px;
}

.file-btn input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-btn.has-file {
    border-color: rgba(229, 165, 61, 0.55);
    background: rgba(229, 165, 61, 0.12);
    color: var(--brand);
}

.btn.ghost.danger {
    color: var(--danger);
    border-color: rgba(179, 38, 30, 0.28);
    padding: 9px 14px;
    font-size: 13px;
}

.btn.ghost.danger:hover:not(:disabled) {
    background: rgba(179, 38, 30, 0.07);
}

.settings-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 2px;
}

.settings-actions .muted {
    font-size: 12px;
}

.settings-preview {
    position: sticky;
    top: 82px;
    gap: 14px;
}

.preview-store {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 15px;
    background: linear-gradient(150deg, #241a15, #3a2217);
    color: #f8ecdc;
}

.preview-logo {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(150deg, var(--gold), #c98224);
    color: #2a1a11;
    font-size: 17px;
    font-weight: 800;
}

.preview-store > div:last-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.preview-store strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.preview-store span {
    font-size: 11px;
    line-height: 1.4;
    color: rgba(248, 236, 220, 0.62);
    overflow-wrap: anywhere;
}

.preview-receipt {
    display: grid;
    gap: 3px;
    justify-items: center;
    padding: 18px 16px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: #fffdf8;
    color: #3c2f24;
    font-family: "Courier New", monospace;
    font-size: 11.5px;
    line-height: 1.5;
    text-align: center;
}

.preview-receipt > strong {
    font-size: 12.5px;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.preview-receipt-label {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 1.6px;
    color: var(--muted);
}

.preview-receipt-rule {
    max-width: 100%;
    overflow: hidden;
    color: #b9a58c;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.preview-receipt-item,
.preview-receipt-total {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    text-align: left;
}

.preview-receipt-total {
    margin-top: 2px;
    padding-top: 5px;
    border-top: 1px dashed #ddd0bd;
    font-weight: 700;
}

.settings-hint {
    font-size: 11.5px;
}

.settings-hardware {
    margin-top: 16px;
}

.hardware-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.hardware-block {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fffcf5;
}

.hardware-block h3 {
    margin: 0;
    font-size: 14px;
}

.check-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.check-field input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 2px 0 0;
    accent-color: #a26a24;
}

.check-field span {
    display: grid;
    gap: 2px;
}

.check-field strong {
    font-size: 13px;
}

.check-field small {
    font-size: 11.5px;
    line-height: 1.4;
}

.field-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 10px;
}

.hardware-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hardware-actions .btn {
    padding: 8px 12px;
    font-size: 12.5px;
}

.hardware-hint {
    font-size: 11.5px;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .hardware-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1080px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .settings-preview {
        position: static;
    }
}

@media (max-width: 980px) {
    .owner-sidebar {
        width: 282px;
        visibility: hidden;
        transform: translateX(-100%);
        transition: transform 0.22s ease, visibility 0.22s ease;
    }

    .sidebar-open .owner-sidebar {
        visibility: visible;
        transform: translateX(0);
    }

    .sidebar-open {
        overflow: hidden;
    }

    .sidebar-close {
        display: grid;
    }

    .owner-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .owner-topbar-title {
        display: none;
    }

    .owner-mobile-brand {
        display: flex;
    }
}

@media (max-width: 600px) {
    .dash-filters .filter-select {
        flex: 1 1 100%;
    }

    .logo-editor {
        align-items: flex-start;
        flex-direction: column;
    }

    .logo-preview {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
    }

    .owner-topbar {
        padding-inline: 14px;
    }

    .owner-mobile-brand .brand-text strong {
        max-width: 132px;
    }
}

@media (max-width: 420px) {
    .owner-mobile-brand .brand-text {
        display: none;
    }
}


/* ===================== Accounting v2 ====================== */

.dash-heading {
    display: grid;
    gap: 3px;
}

.dash-eyebrow,
.panel-eyebrow {
    display: block;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--brand);
}

.panel-eyebrow {
    margin-bottom: 3px;
    color: var(--muted);
}

.accounting-tabs {
    position: sticky;
    top: 82px;
    z-index: 20;
    display: flex;
    gap: 6px;
    padding: 6px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 253, 248, 0.92);
    box-shadow: 0 10px 26px rgba(52, 35, 20, 0.08);
    backdrop-filter: blur(10px);
    scrollbar-width: none;
}

.accounting-tabs::-webkit-scrollbar {
    display: none;
}

.accounting-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 126px;
    padding: 11px 14px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: #6c5948;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.accounting-tab svg {
    opacity: 0.78;
}

.accounting-tab:hover {
    background: rgba(36, 29, 23, 0.05);
    color: var(--ink);
}

.accounting-tab.is-active {
    background: linear-gradient(150deg, #2b1c14, #3d2117);
    border-color: #4a2b1d;
    color: #f8ecdc;
    box-shadow: 0 8px 18px rgba(36, 26, 21, 0.2);
}

.accounting-tab.is-active svg {
    opacity: 1;
}

.accounting-tab:focus-visible {
    outline: 3px solid rgba(229, 165, 61, 0.65);
    outline-offset: 2px;
}

.accounting-panels,
.accounting-panel {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.accounting-hint {
    padding: 11px 13px;
    border: 1px dashed #e2d2bc;
    border-radius: 12px;
    background: #fffcf5;
    color: #75604c;
    font-size: 12px;
    line-height: 1.55;
}

.accounting-hint-wide {
    margin-top: -2px;
}

/* ----------------------------- Jurnal ----------------------------- */

.journal-head {
    flex-wrap: wrap;
}

.journal-head .journal-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.journal-search {
    min-width: 250px;
}

.journal-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.journal-stat,
.ledger-stat {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fffcf6;
}

.journal-stat span,
.ledger-stat span {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: var(--muted);
}

.journal-stat strong,
.ledger-stat strong {
    font-size: 17px;
    line-height: 1.2;
    letter-spacing: -0.3px;
    font-variant-numeric: tabular-nums;
}

.journal-stat.balanced {
    background: #edf5ef;
    border-color: #cfe1d4;
}

.journal-stat.balanced strong {
    color: #275c41;
}

.journal-stat.balanced.unbalanced {
    background: rgba(179, 38, 30, 0.07);
    border-color: rgba(179, 38, 30, 0.22);
}

.journal-stat.balanced.unbalanced strong {
    color: var(--danger);
}

.journal-sources {
    margin: 0;
    padding-bottom: 0;
}

.journal-list {
    display: grid;
    gap: 10px;
}

.journal-card {
    --source-color: #857463;
    display: grid;
    gap: 7px;
    padding: 14px 15px 12px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--source-color);
    border-radius: 14px;
    background: #fffefb;
    box-shadow: 0 3px 10px rgba(52, 35, 20, 0.035);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.journal-card:hover {
    border-color: #decdb6;
    border-left-color: var(--source-color);
    box-shadow: 0 8px 20px rgba(52, 35, 20, 0.07);
    transform: translateY(-1px);
}

.journal-card[data-source="sale"] {
    --source-color: #2e7d5b;
}

.journal-card[data-source="purchase"] {
    --source-color: #c98224;
}

.journal-card[data-source="expense"] {
    --source-color: #b3261e;
}

.journal-card[data-source="income"] {
    --source-color: #37698f;
}

.journal-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.journal-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.journal-date {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.2px;
}

.source-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(133, 116, 99, 0.1);
    color: #6c5948;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.65px;
    text-transform: uppercase;
}

.source-badge.sale {
    background: rgba(46, 125, 91, 0.1);
    color: #275c41;
}

.source-badge.purchase {
    background: rgba(201, 130, 36, 0.12);
    color: #8a5b15;
}

.source-badge.expense {
    background: rgba(179, 38, 30, 0.09);
    color: var(--danger);
}

.source-badge.income {
    background: rgba(55, 105, 143, 0.1);
    color: #2a5575;
}

.journal-ref {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    color: #8a7663;
    letter-spacing: 0.2px;
}

.journal-desc {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink);
}

.journal-lines {
    display: grid;
    gap: 2px;
    padding-top: 2px;
}

.journal-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px 108px;
    align-items: baseline;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px dashed #f0e5d6;
    font-size: 12.5px;
}

.journal-line:last-child {
    border-bottom: none;
}

.journal-line-head {
    padding: 2px 0 4px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.journal-line-head span:not(:first-child),
.journal-amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.journal-account {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
}

.journal-account small {
    flex: 0 0 auto;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 10px;
    color: #a08b75;
}

.journal-account span {
    overflow-wrap: anywhere;
}

.journal-amount {
    color: #4c3d31;
    font-weight: 600;
}

.journal-amount.credit {
    color: #6f5b48;
}

.journal-total {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 7px;
    border-top: 1px solid var(--line);
    font-size: 12px;
}

.journal-total span {
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-size: 9.5px;
    align-self: center;
}

.journal-total strong {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

/* --------------------------- Buku besar --------------------------- */

.ledger-head {
    align-items: flex-end;
    flex-wrap: wrap;
}

.ledger-account-field {
    flex: 0 1 290px;
    min-width: 220px;
}

.ledger-tools,
.coa-tools {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.accounting-export .export-btn {
    white-space: nowrap;
}

@media (max-width: 860px) {
    .ledger-tools,
    .coa-tools {
        width: 100%;
        justify-content: flex-start;
    }
}

.ledger-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.ledger-stat.debit {
    border-color: #d9e4ec;
    background: #f6fafc;
}

.ledger-stat.credit {
    border-color: #eadfd2;
    background: #fdf8f1;
}

.ledger-stat.closing {
    border-color: #cfe1d4;
    background: #edf5ef;
}

.ledger-stat.debit strong {
    color: #2a5575;
}

.ledger-stat.credit strong {
    color: #8a5b15;
}

.ledger-stat.closing strong {
    color: #275c41;
}

.ledger-stat strong.negative {
    color: var(--danger);
}

.ledger-type {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 11.5px;
    color: var(--muted);
}

.account-code {
    padding: 2px 7px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fffcf6;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 10.5px;
    color: #6c5948;
}

.ledger-table-wrap {
    margin: 0 -4px;
    padding: 0 4px;
}

.ledger-table {
    min-width: 760px;
}

.ledger-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ledger-table td.num.balance {
    font-weight: 700;
}

.ledger-table td.num.balance.negative {
    color: var(--danger);
}

.ledger-ref {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 10.5px;
    color: #8a7663;
    white-space: nowrap;
}

.ledger-description {
    min-width: 200px;
}

.ledger-description small {
    display: block;
    margin-top: 2px;
    font-size: 10.5px;
    color: var(--muted);
}

/* ------------------------------ Input ------------------------------ */

.accounting-entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.entry-panel {
    position: relative;
    overflow: hidden;
}

.entry-income {
    border-top: 3px solid #2e7d5b;
}

.entry-expense {
    border-top: 3px solid var(--brand);
}

.entry-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 13px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.entry-income .entry-mark {
    background: #eaf3ec;
    color: #275c41;
}

.entry-expense .entry-mark {
    background: rgba(156, 45, 30, 0.09);
    color: var(--brand);
}

.accounting-form {
    display: grid;
    gap: 13px;
}

.accounting-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.accounting-form .field input,
.accounting-form .field select {
    background: #fffefb;
}

.accounting-form .btn {
    margin-top: 2px;
}

/* ----------------------------- States ----------------------------- */

.accounting-loading {
    padding: 22px 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
}

.accounting-empty {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 30px 18px;
    border: 1px dashed #e2d2bc;
    border-radius: 14px;
    background: #fffcf6;
    color: #9b8570;
    text-align: center;
}

.accounting-empty strong {
    font-size: 14px;
    color: #5d4c3d;
}

.accounting-empty span {
    max-width: 320px;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 1080px) {
    .accounting-entry-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .journal-summary,
    .ledger-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .journal-head,
    .ledger-head {
        align-items: stretch;
    }

    .journal-tools,
    .ledger-account-field {
        flex: 1 1 100%;
    }

    .journal-search {
        min-width: 0;
        width: 100%;
    }

    .journal-head .journal-tools {
        width: 100%;
    }

    .journal-sources {
        flex-wrap: wrap;
        overflow: visible;
    }
}

@media (max-width: 600px) {
    .accounting-tabs {
        top: 72px;
        border-radius: 14px;
    }

    .accounting-tab {
        flex: 1 1 0;
        min-width: 0;
        gap: 4px;
        padding: 9px 4px;
        font-size: 10.5px;
        white-space: nowrap;
    }

    .accounting-tab svg {
        width: 15px;
        height: 15px;
    }

    .accounting-tab span {
        display: inline;
    }

    .journal-line {
        grid-template-columns: minmax(0, 1fr) 82px 82px;
        gap: 6px;
        font-size: 11.5px;
    }

    .journal-account {
        display: grid;
        gap: 1px;
    }

    .journal-account small {
        font-size: 9px;
    }

    .journal-card {
        padding: 12px 12px 10px;
    }

    .journal-card-head {
        align-items: flex-start;
    }

    .journal-ref {
        font-size: 10px;
    }

    .accounting-form-grid {
        grid-template-columns: 1fr;
    }

    .ledger-table-wrap {
        max-height: none;
        overflow: visible;
        border: 0;
    }

    .ledger-table {
        display: block;
        min-width: 0;
        font-size: 12px;
    }

    .ledger-table thead {
        display: none;
    }

    .ledger-table tbody {
        display: grid;
        gap: 8px;
    }

    .ledger-table tr {
        display: grid;
        gap: 5px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #fffefb;
    }

    .ledger-table th,
    .ledger-table td,
    .ledger-table tbody tr + tr td {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
        padding: 0;
        border: 0;
    }

    .ledger-table tbody tr:hover td {
        background: transparent;
    }

    .ledger-table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 0.7px;
        text-transform: uppercase;
        color: var(--muted);
    }

    .ledger-table td.num,
    .ledger-description {
        min-width: 0;
        text-align: right;
    }

    .ledger-table td {
        min-width: 0;
        white-space: normal;
    }

    .ledger-table td.num {
        white-space: nowrap;
    }

    .ledger-table td.ledger-description {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px;
        width: 100%;
        overflow-wrap: anywhere;
    }

    .ledger-description::before {
        align-self: start;
    }

    .ledger-description small {
        grid-column: 2;
        min-width: 0;
        text-align: right;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 360px) {
    .accounting-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }

    .accounting-tab {
        justify-content: flex-start;
        min-width: 0;
        padding: 10px;
        font-size: 11px;
    }
}

/* ===================== COA & jurnal manual ===================== */

.coa-head {
    flex-wrap: wrap;
}

.coa-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.coa-stat {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fffcf6;
}

.coa-stat span {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: var(--muted);
}

.coa-stat strong {
    font-size: 19px;
    letter-spacing: -0.3px;
    font-variant-numeric: tabular-nums;
}

.coa-stat.asset {
    border-color: #d9e4ec;
    background: #f6fafc;
}

.coa-stat.asset strong {
    color: #2a5575;
}

.coa-stat.revenue {
    border-color: #cfe1d4;
    background: #edf5ef;
}

.coa-stat.revenue strong {
    color: #275c41;
}

.coa-stat.expense {
    border-color: #eadfd2;
    background: #fdf8f1;
}

.coa-stat.expense strong {
    color: #8a5b3d;
}

.coa-form {
    display: grid;
    gap: 12px;
    padding: 15px;
    border: 1px solid #e2d2bc;
    border-radius: 14px;
    background: #fffcf5;
}

.coa-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}

.coa-cash-field {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffefb;
    color: #5d4c3d;
    font-size: 12px;
    line-height: 1.45;
    cursor: pointer;
}

.coa-cash-field input {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    flex: 0 0 16px;
    accent-color: var(--brand);
}

.coa-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.coa-table {
    min-width: 620px;
}

.coa-code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    color: #7d6854;
    white-space: nowrap;
}

.coa-name strong {
    font-weight: 600;
}

.account-type {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(133, 116, 99, 0.1);
    color: #6c5948;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.55px;
    text-transform: uppercase;
    white-space: nowrap;
}

.account-type.asset {
    background: rgba(55, 105, 143, 0.1);
    color: #2a5575;
}

.account-type.liability {
    background: rgba(201, 130, 36, 0.12);
    color: #8a5b15;
}

.account-type.equity {
    background: rgba(107, 76, 138, 0.1);
    color: #5a3d78;
}

.account-type.revenue {
    background: rgba(46, 125, 91, 0.1);
    color: #275c41;
}

.account-type.expense {
    background: rgba(179, 38, 30, 0.09);
    color: var(--danger);
}

.coa-cash {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: #edf5ef;
    color: #275c41;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.coa-blank {
    color: #b7a48e;
}

/* --------------------------- Jurnal manual --------------------------- */

.journal-manual-btn {
    padding: 8px 13px;
    font-size: 12px;
    border-radius: 10px;
}

.manual-journal-wrap {
    display: grid;
    gap: 11px;
    padding: 13px 14px;
    border: 1px dashed #e2d2bc;
    border-radius: 14px;
    background: #fffcf5;
}

.manual-journal-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.manual-journal-intro strong {
    display: block;
    font-size: 13px;
    margin-bottom: 2px;
}

.manual-journal-intro span {
    display: block;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.45;
}

.manual-journal {
    display: grid;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.manual-journal-meta {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 10px;
}

.manual-lines {
    display: grid;
    gap: 8px;
}

.manual-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 105px 105px 36px;
    gap: 8px;
    align-items: end;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffefb;
}

.manual-line .field span {
    font-size: 9px;
}

.manual-line .field input,
.manual-line .field select {
    padding: 9px 10px;
    font-size: 13px;
}

.manual-remove {
    display: grid;
    place-items: center;
    width: 36px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.manual-remove:hover:not(:disabled) {
    border-color: rgba(179, 38, 30, 0.3);
    background: rgba(179, 38, 30, 0.06);
    color: var(--danger);
}

.manual-remove:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.manual-journal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.manual-journal-foot .btn {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 10px;
}

.manual-totals {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 11.5px;
}

.manual-totals span {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
}

.manual-totals strong {
    color: var(--ink);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.manual-balance {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(133, 116, 99, 0.1);
    color: #6c5948;
    font-weight: 700;
}

.manual-balance.balanced {
    background: #edf5ef;
    color: #275c41;
}

.manual-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.journal-card[data-source="manual"] {
    --source-color: #6b4c8a;
}

.source-badge.manual {
    background: rgba(107, 76, 138, 0.1);
    color: #5a3d78;
}

@media (max-width: 860px) {
    .coa-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .journal-tools {
        flex-wrap: wrap;
    }

    .journal-manual-btn {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .coa-form-grid,
    .manual-journal-meta {
        grid-template-columns: 1fr;
    }

    .manual-line {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px;
        grid-template-areas:
            "account account remove"
            "debit credit .";
    }

    .manual-account {
        grid-area: account;
    }

    .manual-debit {
        grid-area: debit;
    }

    .manual-credit {
        grid-area: credit;
    }

    .manual-remove {
        grid-area: remove;
        align-self: start;
    }

    .manual-journal-foot {
        align-items: flex-start;
    }

    .manual-totals {
        width: 100%;
    }

    .manual-actions {
        width: 100%;
    }

    .manual-actions .btn {
        flex: 1;
    }
}

@media (max-width: 600px) {
    .accounting-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .accounting-tab {
        justify-content: flex-start;
    }

    .coa-table-wrap {
        max-height: none;
        overflow: visible;
        border: 0;
    }

    .coa-table {
        display: block;
        min-width: 0;
        font-size: 12px;
    }

    .coa-table thead {
        display: none;
    }

    .coa-table tbody {
        display: grid;
        gap: 8px;
    }

    .coa-table tr {
        display: grid;
        gap: 5px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #fffefb;
    }

    .coa-table th,
    .coa-table td,
    .coa-table tbody tr + tr td {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
        padding: 0;
        border: 0;
        white-space: normal;
    }

    .coa-table tbody tr:hover td {
        background: transparent;
    }

    .coa-table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 0.7px;
        text-transform: uppercase;
        color: var(--muted);
    }

    .coa-name {
        text-align: right;
    }
}

@media (max-width: 360px) {
    .accounting-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ===================== Owner: menu & kategori ===================== */

.menu-admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 14px;
}

.category-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.category-form .field {
    flex: 1 1 auto;
}

.category-form .btn {
    flex: 0 0 auto;
    height: 42px;
}

.category-list {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffcf6;
}

.category-row .category-name {
    font-weight: 700;
    color: var(--ink);
}

.category-row .category-count {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.category-loading {
    padding: 14px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    color: var(--muted);
    font-size: 12px;
}

.menu-list-head {
    flex-wrap: wrap;
}

.menu-filter {
    flex: 0 1 240px;
    min-width: 180px;
}

.menu-admin-name {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.menu-admin-thumb {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    object-fit: cover;
    background: #f2e7d6;
    border: 1px solid var(--line);
}

.menu-admin-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .menu-admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .category-form {
        flex-wrap: wrap;
    }

    .category-form .field,
    .category-form .btn {
        width: 100%;
        flex: 1 1 100%;
    }

    .menu-filter {
        flex: 1 1 100%;
        min-width: 0;
    }
}

/* ------------------ CRUD kategori & menu owner ------------------ */

.category-row.is-editing {
    align-items: center;
}

.category-edit-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 11px;
    border: 1px solid #cdbba4;
    border-radius: 9px;
    background: #fff;
    font: inherit;
    font-weight: 700;
    color: var(--ink);
}

.category-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.category-actions,
.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mini-btn {
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #6b5b4b;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mini-btn:hover:not(:disabled) {
    background: #f7efe2;
    border-color: #d8c6ae;
    color: var(--ink);
}

.mini-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.mini-btn.primary {
    border-color: #241a15;
    background: #241a15;
    color: #f6ead8;
}

.mini-btn.primary:hover:not(:disabled) {
    background: #3a2a1f;
    border-color: #3a2a1f;
    color: #fff;
}

.mini-btn.danger {
    border-color: #e5c9c1;
    color: #a5382a;
}

.mini-btn.danger:hover:not(:disabled) {
    background: #fbece8;
    border-color: #d8a99e;
    color: #8a2c20;
}

.menu-form-actions {
    display: flex;
    gap: 8px;
}

.menu-form-actions .btn.primary {
    flex: 1 1 auto;
}

.menu-admin-table tr.is-inactive .menu-admin-name strong,
.menu-admin-table tr.is-inactive .menu-admin-thumb {
    opacity: 0.6;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.status-badge.active {
    background: #e7f2e4;
    color: #3d6b34;
}

.status-badge.inactive {
    background: #f2ece4;
    color: #8a7968;
}

@media (max-width: 700px) {
    .category-meta {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .menu-form-actions {
        flex-direction: column;
    }

    .menu-admin-table td[data-label="Aksi"] .row-actions {
        justify-content: flex-end;
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    #menu-table-wrap {
        max-height: none;
        overflow: visible;
        border: 0;
    }

    .menu-admin-table {
        display: block;
        min-width: 0;
        font-size: 12px;
    }

    .menu-admin-table thead {
        display: none;
    }

    .menu-admin-table tbody {
        display: grid;
        gap: 8px;
    }

    .menu-admin-table tr {
        display: grid;
        gap: 5px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #fffefb;
    }

    .menu-admin-table th,
    .menu-admin-table td,
    .menu-admin-table tbody tr + tr td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 0;
        border: 0;
        white-space: normal;
    }

    .menu-admin-table tbody tr:hover td {
        background: transparent;
    }

    .menu-admin-table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 0.7px;
        text-transform: uppercase;
        color: var(--muted);
    }

    .menu-admin-table td.num {
        text-align: left;
    }

    .menu-admin-table .menu-admin-name {
        justify-content: flex-end;
        text-align: right;
    }
}

/* =========================== Dapur ============================= */

.kitchen-page {
    min-height: 100vh;
    background: #f7f1e7;
}

.kitchen-shell {
    min-height: 100vh;
}

.kitchen-main {
    display: grid;
    gap: 18px;
    width: min(1040px, 100%);
    margin: 0 auto;
    padding: 28px 22px 52px;
}

.kitchen-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.kitchen-head h1 {
    margin: 3px 0 5px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    line-height: 1.15;
}

.kitchen-head p {
    font-size: 12.5px;
}

.kitchen-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.kitchen-stat {
    display: grid;
    gap: 3px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fffdf8;
}

.kitchen-stat > span {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
}

.kitchen-stat strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 27px;
    line-height: 1.1;
}

.kitchen-stat small {
    font-size: 11px;
}

.kitchen-stat.low {
    border-color: #ead6a8;
    background: #fff8e8;
}

.kitchen-stat.low strong {
    color: #a36b16;
}

.kitchen-stat.out {
    border-color: #eed3ca;
    background: #fdf0ec;
}

.kitchen-stat.out strong {
    color: #a5382a;
}

.kitchen-panel {
    padding: 20px;
}

.kitchen-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.kitchen-panel-head h2 {
    margin: 0 0 3px;
    font-size: 16px;
}

.kitchen-panel-head p,
.kitchen-panel-head small {
    font-size: 11.5px;
}

.kitchen-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.kitchen-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    background: #fffdf8;
    font-size: 13px;
}

.kitchen-table th {
    padding: 10px 14px;
    background: #f8f0e3;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-align: left;
    text-transform: uppercase;
    color: var(--muted);
}

.kitchen-table th:nth-child(2),
.kitchen-table th:nth-child(3) {
    text-align: right;
}

.kitchen-table td {
    padding: 12px 14px;
    border-top: 1px solid #efe4d4;
}

.kitchen-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.kitchen-table tr.is-low td {
    background: #fffbf1;
}

.kitchen-table tr.is-out td {
    background: #fdf3f0;
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.stock-badge.safe {
    background: #e7f2e4;
    color: #3d6b34;
}

.stock-badge.low {
    background: #fbf0d4;
    color: #946311;
}

.stock-badge.out {
    background: #fbe7e1;
    color: #a5382a;
}

@media (max-width: 600px) {
    .kitchen-main {
        padding: 20px 14px 40px;
    }

    .kitchen-stats {
        grid-template-columns: 1fr;
    }

    .kitchen-table-wrap {
        overflow: visible;
        border: 0;
    }

    .kitchen-table {
        display: block;
        min-width: 0;
        font-size: 12.5px;
    }

    .kitchen-table thead {
        display: none;
    }

    .kitchen-table tbody {
        display: grid;
        gap: 8px;
    }

    .kitchen-table tr {
        display: grid;
        gap: 5px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #fffefb;
    }

    .kitchen-table th,
    .kitchen-table td,
    .kitchen-table tbody tr + tr td {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
        padding: 0;
        border: 0;
    }

    .kitchen-table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 0.7px;
        text-transform: uppercase;
        color: var(--muted);
    }

    .kitchen-table tr.is-low td,
    .kitchen-table tr.is-out td {
        background: transparent;
    }
}

/* ----------------------------- Inventori ------------------------- */

.inventory-head-actions,
.inventory-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inventory-panel-head {
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
}

.inventory-search {
    flex: 0 1 240px;
    min-width: 180px;
}

.inventory-chips {
    margin: 2px 0 12px;
}

.inventory-page .table-wrap {
    max-height: 520px;
}

.inventory-table td small {
    display: block;
    font-size: 10.5px;
    font-weight: 500;
    margin-top: 2px;
}

.inventory-table tr.is-inactive td {
    opacity: 0.62;
}

.inventory-row-actions {
    display: inline-flex;
    gap: 6px;
    justify-content: flex-end;
}

.inventory-row-actions .btn {
    min-width: 0;
    padding: 6px 10px;
    font-size: 11.5px;
}

.stock-badge.inactive {
    background: #ece5da;
    color: #7a6957;
}

.inventory-form {
    display: grid;
    gap: 12px;
}

.purchase-modal .modal-card {
    width: min(720px, 94vw);
    max-width: 720px;
}

.purchase-lines {
    display: grid;
    gap: 10px;
}

.purchase-line {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.7fr) minmax(0, 0.9fr) auto auto;
    align-items: end;
    gap: 8px;
    padding: 10px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    background: rgba(248, 240, 226, 0.4);
}

.purchase-line .field span {
    font-size: 10px;
}

.purchase-line-subtotal {
    align-self: center;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.purchase-line-remove {
    align-self: center;
    padding: 6px 9px;
    min-width: 0;
}

.purchase-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8f0e2;
    border: 1px solid var(--line);
}

.purchase-total span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--muted);
}

.purchase-total strong {
    font-size: 17px;
}

.opname-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 16px;
}

.opname-list {
    display: grid;
    gap: 8px;
}

.opname-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffaf0;
}

.opname-item div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.opname-item .muted {
    font-size: 11.5px;
}

.opname-item .btn {
    min-width: 0;
    padding: 6px 12px;
    font-size: 11.5px;
}

.opname-difference {
    margin: 0;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
}

.opname-difference.is-more {
    color: var(--green);
}

.opname-difference.is-less {
    color: var(--brand);
}

@media (max-width: 980px) {
    .opname-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .inventory-head-actions {
        width: 100%;
    }

    .inventory-head-actions .btn {
        flex: 1;
    }

    .purchase-line {
        grid-template-columns: 1fr 1fr;
    }

    .purchase-line-material {
        grid-column: 1 / -1;
    }

    .purchase-line-subtotal {
        justify-self: start;
    }
}

/* ------------------- Inventori: pembatalan & komplimen ---------------- */

.void-kpis {
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    margin-bottom: 14px;
}

.void-tools {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.void-tools .field.compact {
    min-width: 132px;
}

.void-stage-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.void-stage-badge.before {
    color: #3f6212;
    background: rgba(132, 204, 22, 0.16);
    border: 1px solid rgba(77, 124, 15, 0.24);
}

.void-stage-badge.after {
    color: #7c2d12;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(180, 83, 9, 0.26);
}

.waste-details {
    margin-top: 4px;
    text-align: left;
}

.waste-details summary {
    cursor: pointer;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    list-style: none;
}

.waste-details summary::-webkit-details-marker {
    display: none;
}

.waste-details summary::after {
    content: " ▾";
    font-size: 9px;
}

.waste-details ul {
    margin: 6px 0 0;
    padding-left: 14px;
    display: grid;
    gap: 2px;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.5;
}

.void-table td[data-label="Alasan"] {
    max-width: 220px;
    white-space: normal;
    line-height: 1.45;
}

@media (max-width: 900px) {
    .void-tools {
        width: 100%;
        justify-content: stretch;
    }

    .void-tools .field.compact {
        flex: 1 1 140px;
    }
}

/* --------------------- Inventori: kartu stok ---------------------- */

.card-tools {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.card-tools .field.compact:first-child {
    min-width: 180px;
}

.card-tools .field.compact {
    min-width: 128px;
}

.card-kpis {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin-bottom: 14px;
}

.card-table td[data-label="Catatan"] {
    max-width: 230px;
    white-space: normal;
    line-height: 1.45;
}

.sc-type {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.sc-type.in {
    color: #166534;
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(22, 101, 52, 0.22);
}

.sc-type.out {
    color: #9a3412;
    background: rgba(251, 146, 60, 0.16);
    border: 1px solid rgba(154, 52, 18, 0.22);
}

.card-table .sc-in {
    color: #166534;
    font-weight: 700;
}

.card-table .sc-out {
    color: #9a3412;
    font-weight: 700;
}

@media (max-width: 900px) {
    .card-tools {
        width: 100%;
        justify-content: stretch;
    }

    .card-tools .field.compact,
    .card-tools .field.compact:first-child {
        flex: 1 1 140px;
    }
}

/* ----------------------- Backup & restore ----------------------- */

.backup-create {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.backup-action {
    display: grid;
    align-content: start;
    gap: 6px;
    justify-items: start;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fffcf5;
}

.backup-action strong {
    font-size: 13.5px;
}

.backup-action p {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
}

.backup-action .btn {
    margin-top: 6px;
}

.backup-list-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.backup-list-head h3 {
    margin: 0;
    font-size: 14px;
}

.backup-list-head .muted {
    font-size: 12px;
}

.backup-list-wrap {
    max-height: 360px;
}

.backup-table {
    min-width: 680px;
}

.backup-table th,
.backup-table td {
    text-align: left;
    white-space: nowrap;
}

.backup-table td:nth-child(3) {
    font-variant-numeric: tabular-nums;
}

.backup-name {
    display: block;
    font-weight: 600;
    font-size: 12px;
}

.backup-auto {
    display: block;
    margin-top: 2px;
    font-size: 10.5px;
    font-weight: 500;
    color: var(--muted);
}

.backup-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 99px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: rgba(46, 125, 91, 0.12);
    color: #1f6448;
}

.backup-badge.web {
    background: rgba(229, 165, 61, 0.18);
    color: #8a5a12;
}

.backup-actions-col {
    text-align: right !important;
}

.backup-row-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.backup-row-actions .btn {
    min-width: 0;
    padding: 6px 10px;
    font-size: 11.5px;
    border-radius: 9px;
}

.backup-restore {
    display: grid;
    gap: 14px;
    margin-top: 4px;
    padding: 18px;
    border: 1px solid rgba(179, 38, 30, 0.28);
    border-radius: 15px;
    background: rgba(179, 38, 30, 0.04);
}

.backup-restore h3 {
    margin: 0 0 6px;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.backup-warning {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #8f2a1f;
}

.backup-restore .settings-actions {
    padding-top: 0;
}

@media (max-width: 720px) {
    .backup-create {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ------------------ Backup otomatis harian --------------------- */

.automation-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fffcf5;
}

.auto-retention {
    max-width: 180px;
}

.automation-cron {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px dashed rgba(156, 45, 30, 0.25);
    border-radius: 14px;
    background: rgba(229, 165, 61, 0.08);
}

.automation-cron strong {
    font-size: 13px;
}

.automation-cron p {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
}

.automation-cron code {
    display: block;
    overflow-x: auto;
    padding: 8px 10px;
    border-radius: 9px;
    background: #2a1d16;
    color: #f7e7cf;
    font-size: 11.5px;
    white-space: nowrap;
}

.automation-destinations {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.destination-card {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fffcf5;
}

.destination-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.destination-head .check-field {
    flex: 1 1 190px;
}

.destination-test {
    padding: 7px 11px;
    font-size: 11.5px;
    border-radius: 9px;
}

.destination-fields {
    display: grid;
    gap: 12px;
}

.destination-fields .field textarea {
    min-height: 92px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11.5px;
}

.destination-checks {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.destination-status {
    margin: 0;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 11.5px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.destination-status.ok {
    background: rgba(46, 125, 91, 0.1);
    color: #1f6448;
}

.destination-status.fail {
    background: rgba(179, 38, 30, 0.08);
    color: #8f2a1f;
}

.destination-status.pending {
    background: rgba(229, 165, 61, 0.14);
    color: #7a5312;
}

.automation-history-head {
    margin-top: 4px;
}

.automation-history {
    max-height: 340px;
}

.automation-history .backup-table {
    min-width: 760px;
}

.automation-history .automation-message {
    min-width: 220px;
    max-width: 360px;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 11.5px;
}

.run-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 99px;
    font-size: 10.5px;
    font-weight: 700;
}

.run-badge.success {
    background: rgba(46, 125, 91, 0.12);
    color: #1f6448;
}

.run-badge.partial {
    background: rgba(229, 165, 61, 0.18);
    color: #8a5a12;
}

.run-badge.failed {
    background: rgba(179, 38, 30, 0.1);
    color: #8f2a1f;
}

.run-badge.running {
    background: rgba(36, 29, 23, 0.08);
    color: var(--muted);
}

@media (max-width: 900px) {
    .automation-destinations {
        grid-template-columns: minmax(0, 1fr);
    }

    .automation-options {
        grid-template-columns: minmax(0, 1fr);
    }

    .auto-retention {
        max-width: none;
    }
}

/* ----------------------------- Favicon -------------------------- */

.favicon-editor {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px;
    border: 1px dashed var(--line);
    border-radius: 15px;
    background: #fffcf5;
}

.favicon-tab {
    flex: 0 0 176px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f4e9d8;
    box-shadow: var(--shadow-soft);
}

.favicon-tab-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 9px;
}

.favicon-tab-bar > i {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: #c9b7a2;
}

.favicon-tab-title {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 4px;
    padding: 5px 7px 6px;
    border-radius: 7px;
    background: var(--paper);
    color: var(--ink);
    font-size: 10px;
    font-weight: 600;
}

.favicon-tab-title img {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    object-fit: contain;
}

.favicon-tab-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 560px) {
    .favicon-editor {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}

/* ------------------- Mulai jualan dari nol --------------------- */

.fresh-start {
    border-color: rgba(179, 38, 30, 0.22);
}

.fresh-start .panel-head h2 {
    color: var(--danger);
}

.fresh-start-body {
    display: grid;
    gap: 14px;
}

.fresh-start-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.fresh-start-block {
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
}

.fresh-start-block h3 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--ink-soft);
}

.fresh-start-block ul {
    display: grid;
    gap: 5px;
    margin: 0;
    padding-left: 17px;
    font-size: 12.5px;
    color: var(--ink-soft);
}

.fresh-start-block:first-child h3 {
    color: var(--danger);
}

.fresh-start-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.fresh-start-counts li {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    font-size: 12px;
    color: var(--ink-soft);
}

.fresh-start-counts li strong {
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.fresh-start-counts li.is-empty {
    opacity: 0.6;
}

.fresh-start-counts li.fresh-start-total {
    border-color: rgba(179, 38, 30, 0.28);
    background: rgba(179, 38, 30, 0.06);
    color: var(--danger);
    font-weight: 600;
}

.fresh-start-counts li.fresh-start-kept {
    width: 100%;
    border: 0;
    padding: 0;
    background: none;
    color: var(--ink-soft);
}

.fresh-start-backup {
    margin: 0;
    padding: 10px 12px;
    border-left: 3px solid rgba(179, 38, 30, 0.45);
    background: rgba(179, 38, 30, 0.045);
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--ink-soft);
}

.fresh-start-backup span {
    display: block;
    margin-top: 3px;
    font-size: 11.5px;
}

.fresh-start-confirm {
    max-width: 320px;
}

.fresh-start .settings-actions {
    justify-content: flex-start;
}
