:root {
    --bg: #f4eee6;
    --bg-deep: #ece3d8;
    --surface: rgba(255, 252, 247, 0.78);
    --surface-strong: #fffaf3;
    --surface-dark: #1e2428;
    --line: rgba(70, 53, 36, 0.12);
    --line-strong: rgba(70, 53, 36, 0.18);
    --ink: #1d1812;
    --muted: #6d6254;
    --accent: #c45f2c;
    --accent-deep: #8d3c16;
    --accent-soft: #f1d1bc;
    --teal: #1f6763;
    --teal-soft: #d7efeb;
    --navy: #273844;
    --gold: #b98a1d;
    --gold-soft: #f4e3b4;
    --danger: #a24234;
    --danger-soft: #f4d9d4;
    --ok: #2d7b51;
    --ok-soft: #d8efe0;
    --shadow-xl: 0 28px 80px rgba(64, 45, 25, 0.14);
    --shadow-lg: 0 18px 40px rgba(59, 44, 27, 0.12);
    --shadow-sm: 0 10px 24px rgba(60, 45, 28, 0.08);
    --radius-xl: 32px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    color: var(--ink);
    font-family: "Segoe UI", "Aptos", "Trebuchet MS", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 246, 225, 0.95), transparent 28%),
        radial-gradient(circle at bottom right, rgba(214, 232, 227, 0.9), transparent 30%),
        linear-gradient(180deg, #f8f3eb 0%, #efe6da 52%, #f4eee7 100%);
}

body {
    position: relative;
}

button,
input,
select {
    font: inherit;
}

.page-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.34;
    background-image:
        linear-gradient(rgba(70, 53, 36, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(70, 53, 36, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0));
}

.page-glow {
    position: fixed;
    border-radius: 999px;
    filter: blur(18px);
    pointer-events: none;
}

.glow-one {
    width: 340px;
    height: 340px;
    top: -120px;
    right: -60px;
    background: rgba(196, 95, 44, 0.18);
}

.glow-two {
    width: 300px;
    height: 300px;
    bottom: 6%;
    left: -90px;
    background: rgba(31, 103, 99, 0.16);
}

.app-shell {
    position: relative;
    z-index: 1;
    max-width: 1480px;
    margin: 0 auto;
    padding: 28px 24px 56px;
}

.topbar,
.panel,
.subnav {
    animation: rise-in 520ms ease both;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 22px;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, #f6d0b9 0%, #f4efe7 55%, #d2e9e5 100%);
    border: 1px solid rgba(100, 74, 49, 0.14);
    box-shadow: var(--shadow-sm);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--navy);
}

.eyebrow,
.mini-label {
    margin: 0 0 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.73rem;
    color: var(--accent-deep);
    font-weight: 700;
}

.brand-block h1,
.stage-copy h2,
.panel h2,
.focus-summary h3,
.stat-value,
.dock-stat strong {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
}

.brand-block h1 {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.topbar-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.status-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.sync-badge,
.meta-pill,
.status-chip,
.micro-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 700;
}

.sync-badge {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(83, 63, 42, 0.12);
    box-shadow: var(--shadow-sm);
}

.sync-badge.ok,
.status-chip.ok {
    background: var(--ok-soft);
    color: var(--ok);
}

.sync-badge.warn,
.status-chip.warn {
    background: var(--danger-soft);
    color: var(--danger);
}

.sync-badge.pending,
.status-chip.pending {
    background: var(--gold-soft);
    color: #886100;
}

.micro-chip.ok {
    background: var(--ok-soft);
    color: var(--ok);
}

.micro-chip.warn {
    background: var(--danger-soft);
    color: var(--danger);
}

.micro-chip.pending {
    background: var(--gold-soft);
    color: #886100;
}

.meta-pill {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(83, 63, 42, 0.1);
    color: var(--ink);
}

.command-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
    gap: 20px;
    margin-bottom: 20px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(18px);
}

.accent-panel {
    position: relative;
    overflow: hidden;
    padding: 34px;
    background:
        linear-gradient(135deg, rgba(255, 248, 241, 0.84), rgba(255, 253, 250, 0.64)),
        linear-gradient(120deg, rgba(196, 95, 44, 0.08), rgba(31, 103, 99, 0.08));
}

.accent-panel::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -80px;
    bottom: -90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31, 103, 99, 0.12), transparent 72%);
}

.stage-copy h2 {
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.05;
    max-width: 13ch;
}

.stage-lead,
.helper-text,
.panel-note,
.stat-note,
.store-meta,
.timeline-meta,
.attention-copy,
.field span {
    color: var(--muted);
}

.stage-lead {
    max-width: 62ch;
    line-height: 1.65;
    margin: 18px 0 0;
}

.feature-band {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.feature-card {
    position: relative;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(83, 63, 42, 0.08);
    box-shadow: var(--shadow-sm);
}

.feature-kicker {
    display: block;
    margin-bottom: 8px;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--teal);
    font-weight: 700;
}

.feature-card strong {
    display: block;
    line-height: 1.5;
}

.stage-dock {
    padding: 26px;
    display: grid;
    gap: 18px;
    align-content: start;
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.92rem;
}

.field input,
.store-card input,
.report-table input {
    border: 1px solid rgba(90, 70, 48, 0.14);
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink);
    border-radius: 14px;
    padding: 13px 14px;
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.field input:focus,
.store-card input:focus,
.report-table input:focus {
    border-color: rgba(196, 95, 44, 0.4);
    box-shadow: 0 0 0 5px rgba(196, 95, 44, 0.11);
}

.hero-actions,
.form-footer {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.button {
    border: none;
    cursor: pointer;
    border-radius: 16px;
    padding: 13px 18px;
    font-weight: 700;
    transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button.primary {
    color: #fff9f2;
    background: linear-gradient(135deg, var(--accent) 0%, #db8750 100%);
    box-shadow: 0 16px 34px rgba(196, 95, 44, 0.24);
}

.button.secondary {
    color: #edf9f8;
    background: linear-gradient(135deg, var(--teal) 0%, #2e8a85 100%);
    box-shadow: 0 16px 34px rgba(31, 103, 99, 0.2);
}

.button.ghost {
    background: rgba(255, 255, 255, 0.74);
    color: var(--ink);
    border: 1px solid rgba(90, 70, 48, 0.12);
}

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

.dock-stat {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(90, 70, 48, 0.08);
}

.dock-stat span,
.summary-kicker,
.stat-label,
.attention-label {
    display: block;
    font-size: 0.84rem;
    color: var(--muted);
}

.dock-stat strong {
    display: block;
    margin-top: 8px;
    font-size: 1.2rem;
}

.subnav {
    display: inline-flex;
    gap: 8px;
    padding: 8px;
    margin-bottom: 22px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(90, 70, 48, 0.08);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

.subnav-link {
    border: none;
    background: transparent;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
}

.subnav-link.is-active {
    color: #fff8f0;
    background: linear-gradient(135deg, var(--navy) 0%, #3c5160 100%);
}

.views {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.view {
    display: none;
}

.view.is-active {
    display: block;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.95fr);
    gap: 18px;
    margin-bottom: 18px;
}

.focus-panel,
.board-panel,
.input-stage,
.table-panel,
.store-create-panel,
.store-roster-panel,
.compact-panel {
    padding: 24px;
}

.dashboard-side {
    display: grid;
    gap: 18px;
}

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

.stat-card {
    position: relative;
    padding: 20px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 248, 241, 0.84));
    border: 1px solid rgba(90, 70, 48, 0.08);
    box-shadow: var(--shadow-lg);
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    border-radius: 24px 24px 0 0;
    background: linear-gradient(90deg, rgba(196, 95, 44, 0.75), rgba(31, 103, 99, 0.4));
}

.stat-value {
    display: block;
    font-size: clamp(1.7rem, 2.5vw, 2.4rem);
    margin: 12px 0 8px;
    line-height: 1;
}

.board-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.72fr);
    gap: 18px;
}

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

.panel-head.spread {
    align-items: center;
}

.panel h2 {
    font-size: 1.55rem;
    line-height: 1.12;
}

.focus-summary,
.working-summary,
.attention-list,
.store-list,
.import-log-list {
    display: grid;
    gap: 14px;
}

.focus-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 156px;
    gap: 16px;
    align-items: stretch;
    padding: 18px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(28, 35, 39, 0.96), rgba(42, 60, 73, 0.92));
    color: #f6efe7;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.focus-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #d8ebe7;
    font-size: 0.86rem;
    font-weight: 700;
}

.focus-summary h3 {
    font-size: clamp(1.6rem, 2.6vw, 2.25rem);
    margin-top: 14px;
}

.focus-copy {
    margin: 10px 0 0;
    color: rgba(245, 236, 228, 0.78);
    line-height: 1.65;
}

.focus-score {
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-orb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), transparent 40%),
        conic-gradient(var(--score-color) calc(var(--score) * 1%), rgba(255, 255, 255, 0.08) 0);
    box-shadow: inset 0 0 0 14px rgba(255, 255, 255, 0.08);
}

.score-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: rgba(21, 28, 33, 0.94);
}

.score-inner strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.5rem;
}

.score-inner span {
    font-size: 0.72rem;
    color: rgba(240, 232, 222, 0.72);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

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

.focus-metric,
.summary-item {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(90, 70, 48, 0.08);
}

.focus-metric strong,
.summary-item strong {
    display: block;
    margin-top: 10px;
    font-size: 1.1rem;
}

.summary-note {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(90, 70, 48, 0.08);
    line-height: 1.6;
    color: var(--muted);
}

.attention-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(90, 70, 48, 0.08);
}

.attention-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-weight: 700;
}

.attention-copy strong {
    display: block;
    margin-bottom: 4px;
}

.timeline-meta strong,
.import-log strong,
.summary-note strong {
    color: var(--ink);
}

.attention-empty {
    padding: 22px;
    border-radius: 18px;
    background: rgba(216, 239, 224, 0.6);
    border: 1px dashed rgba(45, 123, 81, 0.22);
    color: var(--ok);
    line-height: 1.6;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.timeline-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(90, 70, 48, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(252, 245, 237, 0.92));
    border-radius: 22px;
    padding: 16px;
    cursor: pointer;
    text-align: left;
    box-shadow: var(--shadow-sm);
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.timeline-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.timeline-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: var(--timeline-tone, rgba(196, 95, 44, 0.4));
}

.timeline-card.is-clean {
    --timeline-tone: linear-gradient(90deg, rgba(45, 123, 81, 0.9), rgba(108, 190, 142, 0.55));
}

.timeline-card.is-warning {
    --timeline-tone: linear-gradient(90deg, rgba(162, 66, 52, 0.92), rgba(230, 152, 76, 0.55));
}

.timeline-card.is-active {
    border-color: rgba(31, 103, 99, 0.3);
    box-shadow: 0 0 0 4px rgba(31, 103, 99, 0.08), var(--shadow-lg);
}

.timeline-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.timeline-head strong {
    font-size: 1rem;
}

.timeline-progress {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(39, 56, 68, 0.08);
    overflow: hidden;
    margin: 12px 0 14px;
}

.timeline-progress span {
    display: block;
    height: 100%;
    width: var(--progress, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--teal), #53a59e);
}

.timeline-meta {
    display: grid;
    gap: 6px;
    font-size: 0.9rem;
}

.import-log {
    padding: 15px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(90, 70, 48, 0.08);
    line-height: 1.6;
}

.input-helper {
    margin: -4px 0 2px;
}

.table-shell {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(90, 70, 48, 0.08);
}

.table-wrap {
    overflow: auto;
    max-width: 100%;
}

.report-table {
    width: 100%;
    min-width: 1320px;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.74);
}

.report-table th,
.report-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(90, 70, 48, 0.08);
    vertical-align: middle;
}

.report-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff9f1;
    text-align: left;
    font-size: 0.83rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.report-table tr {
    transition: background-color 140ms ease;
}

.report-table tr.is-status-sudah {
    background: rgba(216, 239, 224, 0.24);
}

.report-table tr.is-status-selisih {
    background: rgba(244, 217, 212, 0.26);
}

.report-table tr.is-status-belum {
    background: rgba(244, 227, 180, 0.22);
}

.store-name {
    display: block;
    font-weight: 700;
    font-size: 0.98rem;
}

.store-meta {
    display: block;
    margin-top: 5px;
    font-size: 0.78rem;
}

.computed-cell {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.stores-shell {
    display: grid;
    grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.25fr);
    gap: 18px;
}

.store-form,
.store-list {
    display: grid;
    gap: 14px;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.store-card {
    display: grid;
    grid-template-columns: 1.4fr 90px 135px 145px auto auto;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(90, 70, 48, 0.08);
    box-shadow: var(--shadow-sm);
}

.store-card.inactive {
    opacity: 0.62;
}

.store-card .checkbox-row {
    justify-content: center;
}

.empty-state {
    padding: 26px;
    border-radius: 20px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed rgba(90, 70, 48, 0.16);
    background: rgba(255, 255, 255, 0.6);
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1220px) {
    .command-stage,
    .dashboard-shell,
    .board-shell,
    .stores-shell {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .feature-band,
    .control-grid,
    .form-grid,
    .focus-grid,
    .summary-grid,
    .dock-stats,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .focus-hero {
        grid-template-columns: 1fr;
    }

    .score-orb {
        margin-inline: auto;
    }

    .store-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

@media (max-width: 760px) {
    .app-shell {
        padding: 18px 14px 40px;
    }

    .topbar,
    .topbar-status,
    .status-row,
    .hero-actions,
    .form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .subnav {
        display: flex;
        width: 100%;
        border-radius: 24px;
        overflow: auto;
    }

    .subnav-link {
        white-space: nowrap;
    }

    .accent-panel,
    .stage-dock,
    .focus-panel,
    .board-panel,
    .compact-panel,
    .input-stage,
    .table-panel,
    .store-create-panel,
    .store-roster-panel {
        padding: 18px;
    }

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