:root {
    --bg: #f1f5f9;
    --surface: #ffffff;
    --ink: #0f2a43;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --accent: #14b8a6;
    --danger: #ef4444;
    --sidebar: #0b2036;
    --radius: 14px;
    --shadow: 0 12px 30px -18px rgba(15, 42, 67, .45);
}

* {
    box-sizing: border-box;
}

[x-cloak] {
    display: none !important;
}

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul {
    margin: 0;
}

ul {
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 10px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}

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

.btn--primary {
    background: var(--primary);
    color: #fff;
}

.btn--primary:hover {
    background: var(--primary-dark);
}

.btn--ghost {
    background: #fff;
    color: var(--ink);
    border-color: var(--line);
}

.btn--danger {
    background: var(--danger);
    color: #fff;
}

.btn--block {
    width: 100%;
}

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

/* App shell */
.app {
    display: grid;
    grid-template-columns: 256px 1fr;
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 15% -10%, rgba(255, 255, 255, .3), transparent 45%),
        linear-gradient(180deg, #075985 0%, var(--primary-dark) 38%, var(--primary) 72%, var(--accent) 100%);
    color: rgba(255, 255, 255, .92);
    padding: 22px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
    /* Bayangan lembut ke kanan sebagai pemisah dari konten */
    box-shadow: 18px 0 40px -28px rgba(2, 6, 23, .5);
}

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

.sidebar__close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, .35);
    background: transparent;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

.nav-backdrop {
    display: none;
}

.sidebar__brand,
.auth__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 800;
}

.sidebar .brand__mark {
    background: rgba(255, 255, 255, .2);
}

.sidebar .brand__dot {
    color: #fff;
}

.brand__dot {
    color: var(--primary);
}

.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 22px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
}

.sidebar__nav::-webkit-scrollbar {
    display: none;
}

/* Label seksi (Menu / Pengaturan) */
.sidebar__label {
    margin: 14px 8px 4px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
}

.sidebar__label:first-child {
    margin-top: 0;
}

.sidebar__nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, .8);
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.sidebar__nav a:hover {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    transform: translateX(2px);
}

/* Kotak ikon di tiap item */
.sidebar__nav-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .14);
    font-size: 16px;
    transition: background .18s ease, color .18s ease;
}

.sidebar__nav a.is-active {
    background: #fff;
    color: var(--primary-dark);
    font-weight: 700;
    box-shadow: 0 14px 26px -16px rgba(2, 6, 23, .85);
}

.sidebar__nav a.is-active .sidebar__nav-icon {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}

/* Varian ikon: desktop pakai versi filled (nav-on) */
.sidebar__nav .nav-off { display: none; }
.sidebar__nav .nav-on { display: inline-block; }

.sidebar__footer {
    margin-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .18);
    padding-top: 16px;
    display: grid;
    gap: 12px;
}

.sidebar__user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .1);
}

.sidebar__user strong {
    display: block;
    color: #fff;
    font-size: 14px;
}

.sidebar__user span {
    font-size: 12px;
    color: rgba(255, 255, 255, .7);
}

.avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 700;
}

.logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .35);
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease;
}

.logout:hover {
    background: rgba(255, 255, 255, .18);
    border-color: transparent;
    color: #fff;
}

.main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 26px;
    background: rgba(255, 255, 255, .82);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, .9);
    position: sticky;
    top: 0;
    z-index: 30;
}

/* Garis aksen gradasi halus di bawah header */
.topbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, .55), rgba(20, 184, 166, .55), transparent);
}

.topbar h1 {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.01em;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar__link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #eef4fb;
    color: var(--primary-dark);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .15s ease, transform .15s ease;
}

.topbar__link:hover {
    background: #e0eefb;
    transform: translateY(-1px);
}

/* Tombol keluar di header — hanya tampil di mobile (menggantikan footer sidebar) */
.topbar__logout {
    display: none;
    margin-left: 10px;
}

.topbar__logout button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    font-size: 17px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.topbar__logout button:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.content {
    padding: 26px 30px 48px;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow);
}

.stat__label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.stat__value {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.stat__hint {
    font-size: 12px;
    color: var(--muted);
}

/* Panels */
.grid-2 {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    align-items: start;
}

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow);
}

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

.panel__head h2 {
    font-size: 16px;
    font-weight: 700;
}

/* Table */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.table td {
    padding: 13px 12px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table td small {
    display: block;
    font-size: 12px;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    font-weight: 600;
}

.muted {
    color: var(--muted);
}

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

.actions {
    white-space: nowrap;
}

.actions .link + .link {
    margin-left: 12px;
}

.link {
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 13px;
}

.link--danger {
    color: var(--danger);
}

.chip {
    display: inline-block;
    min-width: 26px;
    padding: 2px 9px;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 999px;
    border: none;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: default;
}

button.badge {
    cursor: pointer;
}

.badge--pending { background: #fef3c7; color: #b45309; }
.badge--proses { background: #dbeafe; color: #1d4ed8; }
.badge--selesai { background: #d1fae5; color: #047857; }
.badge--diambil { background: #e2e8f0; color: #475569; }

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search {
    flex: 1;
    min-width: 220px;
}

/* Varian dengan ikon kaca pembesar di dalam field (tanpa markup tambahan) */
.search--icon input {
    padding-left: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2394a3b8'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 16px 16px;
}

.search--icon input:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230ea5e9'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
}

.search input,
.filters input,
.filters select,
.toolbar input,
.toolbar select,
.select-sm,
.input,
.form input,
.form select,
.form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    background: #fff;
}

.form input:focus,
.form select:focus,
.form textarea:focus,
.search input:focus,
.filters input:focus,
.filters select:focus,
.toolbar input:focus,
.toolbar select:focus,
.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, .15);
}

/* Normalisasi input pencarian (hapus tampilan bawaan browser) */
input[type="search"] {
    -webkit-appearance: none;
    appearance: none;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

.filters {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filters select {
    width: auto;
    min-width: 150px;
}

.filters input {
    flex: 1;
    width: auto;
    min-width: 160px;
}

.select-sm {
    width: auto;
    padding: 6px 10px;
    font-size: 13px;
}

/* Custom select dropdown */
.cselect {
    position: relative;
    width: 100%;
}

.cselect__control {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.cselect.is-open > .cselect__control,
.cselect__control:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, .15);
}

.cselect__placeholder {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cselect__single {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cselect__chips {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cselect__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 3px 6px 3px 10px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 12px;
    font-weight: 600;
}

.cselect__chip > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cselect__chip-x {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(3, 105, 161, .12);
    color: #0369a1;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.cselect__chip-x:hover {
    background: rgba(3, 105, 161, .25);
}

.cselect__chevron {
    display: flex;
    flex: 0 0 auto;
    margin-left: auto;
    color: var(--muted);
    transition: transform .2s ease;
}

.cselect__chevron.is-open {
    transform: rotate(180deg);
}

.cselect__menu {
    position: absolute;
    z-index: 8;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    max-height: 260px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 22px 45px -22px rgba(15, 42, 67, .45);
}

.cselect__search {
    padding: 4px 4px 6px;
}

.cselect__search input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    color: var(--ink);
    background: #fff;
}

.cselect__search input:focus {
    outline: none;
    border-color: var(--primary);
}

.cselect__options {
    display: grid;
    gap: 2px;
    overflow-y: auto;
}

.cselect__option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font: inherit;
    font-size: 13.5px;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.cselect__option:hover {
    background: #f1f5f9;
}

.cselect__option.is-selected {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 600;
}

.cselect__option > span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cselect__check {
    flex: 0 0 auto;
    color: var(--primary);
}

.cselect__empty {
    padding: 12px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* Status list */
.status-list {
    display: grid;
    gap: 12px;
}

.status-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
}

.status-list li:last-child {
    border-bottom: none;
}

.status-list strong {
    font-size: 18px;
}

.quick {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

/* Empty */
.empty {
    padding: 30px 0;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.empty a {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 20px;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
}

.modal__card {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    padding: 24px 26px;
    box-shadow: 0 30px 70px -30px rgba(15, 23, 42, .6);
}

.modal__card--sm {
    max-width: 400px;
}

.modal__card--lg {
    max-width: 640px;
}

.modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.modal__head h2 {
    font-size: 18px;
    font-weight: 700;
}

.modal__close {
    border: none;
    background: #f1f5f9;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 20px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
}

.modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal__actions--between {
    justify-content: space-between;
}

/* Forms */
.form {
    display: grid;
    gap: 14px;
}

.field {
    display: grid;
    gap: 6px;
}

.field > span {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

.field em {
    color: var(--danger);
    font-style: normal;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    align-self: end;
    padding-bottom: 8px;
}

.check input {
    width: auto;
}

.error {
    color: var(--danger);
    font-size: 12px;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
}

.alert--success {
    background: #d1fae5;
    color: #047857;
}

.alert--danger {
    background: #fee2e2;
    color: #b91c1c;
}

.estimate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f0f9ff;
    border: 1px dashed var(--primary);
    border-radius: 10px;
}

.estimate strong {
    color: var(--primary-dark);
    font-size: 18px;
}

.receipt {
    background: #0f172a;
    color: #e2e8f0;
    padding: 18px;
    border-radius: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

/* Pager */
.pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

.pager__item {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 16px;
    cursor: pointer;
}

.pager__item.is-disabled {
    opacity: .45;
    cursor: not-allowed;
}

.pager__info {
    font-size: 13px;
    color: var(--muted);
}

/* Toast */
.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 90;
    background: var(--sidebar);
    color: #fff;
    padding: 13px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 20px 40px -18px rgba(15, 23, 42, .7);
}

/* Auth */
.auth {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    background:
        radial-gradient(900px 520px at 10% 8%, rgba(14, 165, 233, .20), transparent 60%),
        radial-gradient(820px 520px at 92% 92%, rgba(20, 184, 166, .18), transparent 60%),
        #f2f7fb;
}

.auth__shell {
    width: 100%;
    max-width: 940px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 40px 90px -50px rgba(2, 6, 23, .6), 0 1px 0 rgba(255, 255, 255, .7) inset;
}

.auth__aside {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 44px 40px;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(150deg, #075985 0%, var(--primary-dark) 38%, var(--primary) 72%, var(--accent) 100%);
}

.auth__aside::before,
.auth__aside::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}

.auth__aside::before {
    width: 280px;
    height: 280px;
    top: -110px;
    right: -90px;
}

.auth__aside::after {
    width: 200px;
    height: 200px;
    bottom: -90px;
    left: -70px;
    background: rgba(255, 255, 255, .08);
}

.auth__aside-brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #fff;
}

.auth__aside .brand__mark {
    background: rgba(255, 255, 255, .22);
}

.auth__aside .brand__dot {
    color: #fff;
}

.auth__aside-body {
    position: relative;
    margin: auto 0;
}

.auth__aside-body h2 {
    font-size: 30px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.02em;
}

.auth__aside-body p {
    margin-top: 12px;
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .82);
}

.auth__features {
    list-style: none;
    margin: 26px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.auth__features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, .95);
}

.auth__feature-ic {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .2);
}

.auth__feature-ic svg {
    width: 15px;
    height: 15px;
}

.auth__aside-foot {
    position: relative;
    font-size: 12px;
    color: rgba(255, 255, 255, .7);
}

.auth__card {
    width: 100%;
    padding: 46px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth__card .auth__brand {
    display: none;
}

.auth__brand {
    color: var(--ink);
    margin-bottom: 22px;
}

.auth__card h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.auth__lead {
    color: var(--muted);
    font-size: 14px;
    margin: 8px 0 24px;
}

.auth__hint {
    margin-top: 22px;
    font-size: 12.5px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 860px) {
    .auth__shell {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .auth__aside {
        display: none;
    }

    .auth__card {
        padding: 34px 28px;
    }

    .auth__card .auth__brand {
        display: inline-flex;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-2 { grid-template-columns: 1fr; }
}

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

    /* Sidebar jadi BOTTOM NAV ala Instagram:
       bar penuh (edge-to-edge), putih, tanpa label, ikon outline/filled. */
    .sidebar {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: stretch;
        overflow: visible;
        padding: 0 8px calc(4px + env(safe-area-inset-bottom));
        border-radius: 0;
        background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        border: 0;
        border-top: 1px solid #e2ebf5;
        box-shadow: 0 -10px 26px -20px rgba(2, 6, 23, .45);
        transform: none;
        transition: none;
        z-index: 60;
        -webkit-tap-highlight-color: transparent;
    }

    /* Brand, label seksi, footer user, dan tombol close disembunyikan */
    .sidebar__head,
    .sidebar__label,
    .sidebar__footer,
    .sidebar__close {
        display: none;
    }

    /* Nav horizontal, ikon saja (tanpa label) */
    .sidebar__nav {
        flex-direction: row;
        align-items: stretch;
        justify-content: space-between;
        gap: 0;
        width: 100%;
        margin: 0;
        overflow: visible;
    }

    .sidebar__nav a {
        position: relative;
        flex: 1 1 0;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0;
        padding: 14px 0;
        border-radius: 12px;
        color: #9aa7b4;
        transform: none;
        transition: color .18s ease, transform .12s ease;
    }

    .sidebar__nav a:hover,
    .sidebar__nav a:focus {
        background: transparent;
        color: #9aa7b4;
        transform: none;
    }

    .sidebar__nav a:active {
        transform: scale(.9);
    }

    .sidebar__nav-icon {
        width: auto;
        height: auto;
        border-radius: 0;
        background: transparent;
        font-size: 23px;
        line-height: 1;
    }

    /* Tanpa label di mobile */
    .sidebar__nav-text {
        display: none;
    }

    /* Ikon outline saat tidak aktif, filled + gelap saat aktif (ala Instagram) */
    .sidebar__nav .nav-off { display: inline-block; }
    .sidebar__nav .nav-on { display: none; }
    .sidebar__nav a.is-active {
        background: transparent;
        color: var(--ink);
        box-shadow: none;
    }
    .sidebar__nav a.is-active .nav-off { display: none; }
    .sidebar__nav a.is-active .nav-on { display: inline-block; }
    .sidebar__nav a.is-active .sidebar__nav-icon {
        background: transparent;
        /* override warna putih dari style desktop, ikut warna parent (gelap) */
        color: inherit;
        box-shadow: none;
        transform: none;
    }

    /* Indikator atas: segmen mengikuti menu aktif */
    .sidebar__nav a.is-active::before {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        width: 30px;
        height: 3px;
        border-radius: 0 0 6px 6px;
        background: linear-gradient(90deg, var(--primary), var(--accent));
        transform: translateX(-50%);
        box-shadow: 0 6px 12px -6px rgba(2, 132, 199, .9);
        animation: navIndicatorIn .28s ease;
    }

    @keyframes navIndicatorIn {
        from { transform: translateX(-50%) scaleX(.3); opacity: 0; }
        to { transform: translateX(-50%) scaleX(1); opacity: 1; }
    }

    /* Hamburger & backdrop tak dipakai lagi (tidak ada drawer) */
    .nav-toggle { display: none; }
    .nav-backdrop { display: none !important; }

    .topbar { padding: 14px 16px; gap: 12px; }
    .topbar h1 { font-size: 17px; }
    .topbar__logout { display: inline-flex; }

    /* Ruang bawah untuk bottom nav */
    .content { padding: 18px 16px 88px; }

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

@media (max-width: 700px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search { min-width: 0; }

    .filters { width: 100%; }

    .filters select {
        flex: 1;
        width: auto;
    }

    .toolbar .btn { width: 100%; }
}

@media (max-width: 560px) {
    .field-row { grid-template-columns: 1fr; }

    .modal { padding: 12px; }

    .modal__card {
        padding: 20px 18px;
        border-radius: 14px;
    }

    .modal__actions {
        flex-direction: column-reverse;
    }

    .modal__actions .btn { width: 100%; }

    .modal__actions--between { flex-direction: column; }

    .auth { padding: 16px; }

    .auth__card { padding: 26px 22px; }

    .toast {
        left: 16px;
        right: 16px;
        /* di atas bottom nav */
        bottom: calc(84px + env(safe-area-inset-bottom));
        text-align: center;
    }
}

.actions {
    white-space: nowrap;
}

.action-btn {
    border: 0;
    background: transparent;
    padding: 6px 10px;
    margin-left: 4px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.action-btn i {
    font-size: 14px;
}

/* Struk */
.action-receipt {
    color: #2563eb;
}

.action-receipt:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

/* Edit */
.action-edit {
    color: #64748b;
}

.action-edit:hover {
    background: #f1f5f9;
    color: #334155;
}

/* Hapus */
.action-delete {
    color: #ef4444;
}

.action-delete:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* Saat ditekan */
.action-btn:active {
    transform: scale(0.96);
}

.addon-check {
    display: block;
    cursor: pointer;
    margin: 12px 0;
}

.addon-check > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.addon-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    transition: all 0.2s ease;
}

/* Icon */
.addon-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
    transition: all 0.2s ease;
}

.addon-icon i {
    font-size: 15px;
}

/* Text */
.addon-content {
    flex: 1;
    min-width: 0;
}

.addon-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.addon-subtitle {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #94a3b8;
}

/* Check */
.addon-checkmark {
    width: 22px;
    height: 22px;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: transparent;
    flex-shrink: 0;

    transition: all 0.2s ease;
}

.addon-checkmark i {
    font-size: 13px;
}

/* Hover */
.addon-check:hover .addon-box {
    border-color: #93c5fd;
    background: #f8fbff;
}

/* Checked */
.addon-check > input:checked + .addon-box {
    border-color: #3b82f6;
    background: #eff6ff;
}

.addon-check > input:checked + .addon-box .addon-icon {
    background: #3b82f6;
    color: #fff;
}

.addon-check > input:checked + .addon-box .addon-checkmark {
    border-color: #3b82f6;
    background: #3b82f6;
    color: #fff;
}

/* Focus */
.addon-check > input:focus-visible + .addon-box {
    outline: 3px solid rgba(59, 130, 246, 0.15);
}

.field input[type="number"] {
    width: 100%;
    height: 44px;
    padding: 0 14px;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    background: #fff;
    color: #334155;

    font-size: 14px;
    outline: none;

    transition: all 0.2s ease;
}

.field input[type="number"]:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}

/* Disabled */
.field input[type="number"]:disabled {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;

    cursor: not-allowed;
    opacity: 1;
}

/* Placeholder saat disabled */
.field input[type="number"]:disabled::placeholder {
    color: #cbd5e1;
}

.customer-stats {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.stat-card {
    min-width: 130px;
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 9px 11px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;

    transition: all .2s ease;
}

.stat-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
    transform: translateY(-1px);
}

.stat-icon {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 14px;
}

.orders-icon {
    background: #eff6ff;
    color: #3b82f6;
}

.spending-icon {
    background: #f0fdf4;
    color: #16a34a;
}

.stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-label {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 500;
    margin-bottom: 1px;
}

.stat-info strong {
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.customer-info {
    min-width: 200px;
}

.customer-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;

    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;

    border: 1px solid #dbeafe;
}

.customer-name > div {
    min-width: 0;
}

.customer-name strong {
    display: block;

    color: #1e293b;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-name .muted {
    display: flex;
    align-items: center;
    gap: 5px;

    margin-top: 2px;

    color: #94a3b8;
    font-size: 11.5px;
    line-height: 1.4;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-name .muted i {
    color: #a8b3c2;
    font-size: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* Tablet */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat {
        min-width: 0;
        padding: 14px;
    }

    .stat__top {
        gap: 7px;
        margin-bottom: 10px;
    }

    .stat__icon {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 12px;
    }

    .stat__label {
        font-size: 10px;
        line-height: 1.3;
    }

    .stat__value {
        display: block;
        font-size: 17px;
        line-height: 1.2;

        /* Supaya Rp 2.500.000 tidak melebar */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .stat__hint {
        display: block;
        margin-top: 6px;

        font-size: 9px;
        line-height: 1.4;
    }

    .stat__hint i {
        font-size: 9px;
    }

    .stat__filter {
        padding: 5px 8px;
        font-size: 9.5px;
        gap: 4px;
    }

    .stat__filter-icon {
        font-size: 10px;
    }
}

/* HP kecil */
@media (max-width: 380px) {
    .stats-grid {
        gap: 8px;
    }

    .stat {
        padding: 11px;
    }

    .stat__label {
        font-size: 9px;
    }

    .stat__value {
        font-size: 15px;
    }

    .stat__hint {
        font-size: 8px;
    }

    .stat__icon {
        width: 27px;
        height: 27px;
        min-width: 27px;
    }
}

.stat {
    position: relative;
    padding: 20px;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 16px;
    overflow: hidden;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.stat:hover {
    transform: translateY(-3px);
    border-color: #dbe3ec;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .07);
}

/* top */
.stat__top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 17px;
    flex-wrap: wrap;
    row-gap: 8px;
}

/* Filter bulan di card pendapatan */
.stat__filter {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 6px 10px;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    border-radius: 999px;
    color: #475569;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.stat__filter:hover {
    background: #f1f5f9;
    border-color: #dbe3ec;
}

.stat__filter-icon {
    font-size: 12px;
    color: #10b981;
}

.stat__filter-arrow {
    font-size: 9px;
    color: #94a3b8;
}

/* Select asli disembunyikan, tapi menutupi seluruh pill agar tetap bisa diklik. */
.stat__filter-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    border: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.stat__icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;
    font-size: 16px;
}

.stat__label {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

/* value */
.stat__value {
    display: block;

    color: #172033;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.5px;

    margin-bottom: 10px;
}

/* hint */
.stat__hint {
    display: flex;
    align-items: center;
    gap: 5px;

    color: #94a3b8;
    font-size: 11.5px;
    line-height: 1.4;
}

.stat__hint i {
    font-size: 11px;
}

/* Individual styles */

.stat--revenue .stat__icon {
    background: #ecfdf5;
    color: #10b981;
}

.stat--revenue .stat__hint i {
    color: #10b981;
}

.stat--active .stat__icon {
    background: #fff7ed;
    color: #f97316;
}

.stat--active .stat__hint i {
    color: #f97316;
}

.stat--orders .stat__icon {
    background: #eff6ff;
    color: #3b82f6;
}

.stat--orders .stat__hint i {
    color: #3b82f6;
}

.stat--customers .stat__icon {
    background: #f5f3ff;
    color: #8b5cf6;
}

.stat--customers .stat__hint i {
    color: #8b5cf6;
}
.status-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px;

    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 12px;

    transition: all .2s ease;
}

.status-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
}

/* Icon */

.status-item__icon {
    width: 34px;
    height: 34px;
    min-width: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    font-size: 14px;
}

/* Content */

.status-item__content {
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-item__content span {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
}

.status-item__content strong {
    color: #1e293b;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.1;
}

/* Arrow */

.status-item__arrow {
    color: #cbd5e1;
    font-size: 10px;

    transition: transform .2s ease;
}

.status-item:hover .status-item__arrow {
    transform: translateX(2px);
}


/* =========================
   PENDING
========================= */

.status-item--pending .status-item__icon {
    background: #fff7ed;
    color: #f97316;
}

.status-item--pending:hover {
    border-color: #fed7aa;
}


/* =========================
   PROSES
========================= */

.status-item--proses .status-item__icon {
    background: #eff6ff;
    color: #3b82f6;
}

.status-item--proses:hover {
    border-color: #bfdbfe;
}


/* =========================
   SELESAI
========================= */

.status-item--selesai .status-item__icon {
    background: #ecfdf5;
    color: #10b981;
}

.status-item--selesai:hover {
    border-color: #a7f3d0;
}


/* =========================
   DIAMBIL
========================= */

.status-item--diambil .status-item__icon {
    background: #f5f3ff;
    color: #8b5cf6;
}

.status-item--diambil:hover {
    border-color: #ddd6fe;
}

.top-customer-card {
    position: relative;

    padding: 20px;

    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 16px;

    overflow: hidden;

    transition: all .2s ease;
}

.top-customer-card:hover {
    border-color: #dbe3ec;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .07);
}


/* Header */

.top-customer__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    margin-bottom: 20px;
}

.top-customer__eyebrow {
    display: flex;
    align-items: center;
    gap: 5px;

    margin-bottom: 4px;

    color: #f59e0b;
    font-size: 10px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: .05em;
}

.top-customer__header h3 {
    margin: 0;

    color: #1e293b;
    font-size: 17px;
    font-weight: 700;
}

.top-customer__trophy {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: #fffbeb;
    color: #f59e0b;

    font-size: 17px;
}


/* Profile */

.top-customer__profile {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 13px;

    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 12px;
}

.top-customer__avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;

    font-size: 15px;
    font-weight: 700;
}

.top-customer__info {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 3px;
}

.top-customer__info strong {
    color: #334155;
    font-size: 14px;
    font-weight: 650;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-customer__info span {
    display: flex;
    align-items: center;
    gap: 5px;

    color: #94a3b8;
    font-size: 11px;
}

.top-customer__info span i {
    font-size: 10px;
}


/* Stats */

.top-customer__stats {
    display: flex;
    align-items: center;

    margin-top: 14px;
    padding-top: 14px;

    border-top: 1px solid #f1f5f9;
}

.top-customer__stat {
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 3px;
}

.top-customer__stat span {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 500;
}

.top-customer__stat strong {
    color: #1e293b;
    font-size: 14px;
    font-weight: 700;
}

.top-customer__divider {
    width: 1px;
    height: 30px;

    margin: 0 15px;

    background: #e2e8f0;
}


/* Empty */

.top-customer__empty {
    min-height: 110px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 7px;

    color: #94a3b8;
    font-size: 12px;
}

.top-customer__empty i {
    font-size: 24px;
    color: #cbd5e1;
}

.grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr);
    gap: 18px;
    align-items: start;
}

/* Tablet */
@media (max-width: 992px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}


/* Mobile */
@media (max-width: 576px) {

    .grid-2 {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }

    .grid-2 > section,
    .grid-2 > div {
        width: 100%;
        min-width: 0;
    }


    /* Panel */
    .grid-2 .panel {
        width: 100%;
        min-width: 0;
        border-radius: 13px;
    }


    /* Header panel */
    .grid-2 .panel__head {
        padding: 14px;
    }

    .grid-2 .panel__head h2 {
        font-size: 14px;
    }

    .grid-2 .panel__head .link {
        font-size: 11px;
    }


    /* =========================
       TABLE PESANAN
    ========================= */

    .grid-2 .table-wrap {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;

        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .grid-2 .table {
        min-width: 620px;
        width: 100%;
    }

    .grid-2 .table th,
    .grid-2 .table td {
        white-space: nowrap;
        padding: 9px 10px;
    }


    /* Invoice & total card */
    .grid-2 .customer-stats {
        max-width: 170px;
    }

    .grid-2 .stat-card {
        padding: 7px;
        gap: 7px;
    }

    .grid-2 .stat-icon {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 11px;
    }

    .grid-2 .stat-label {
        font-size: 9px;
    }

    .grid-2 .stat-info strong {
        font-size: 10px;
    }


    /* =========================
       QUICK BUTTON
    ========================= */

    .grid-2 .quick {
        display: flex;
        flex-direction: column;
        gap: 8px;

        padding: 12px;
    }

    .grid-2 .quick .btn {
        width: 100%;
    }


    /* =========================
       TOP CUSTOMER
    ========================= */

    .grid-2 .top-customer-card {
        width: 100%;
    }

    .grid-2 .top-customer__profile {
        min-width: 0;
    }

    .grid-2 .top-customer__info {
        min-width: 0;
    }

    .grid-2 .top-customer__info strong {
        max-width: 100%;

        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .grid-2 .top-customer__stats {
        width: 100%;
    }


    /* =========================
       STATUS PESANAN
    ========================= */

    .grid-2 .status-list {
        width: 100%;
    }

    .grid-2 .status-item {
        min-width: 0;
    }

}


/* HP sangat kecil */
@media (max-width: 380px) {

    .grid-2 {
        gap: 10px;
    }

    .grid-2 .panel__head {
        padding: 12px;
    }

    .grid-2 .table {
        min-width: 580px;
    }

    .grid-2 .top-customer__stats {
        gap: 8px;
    }

}

/* ===== Modal Update Status / Tracking ===== */
.status-modal__sub {
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted);
}

.status-modal__summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}

.status-chip {
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.status-chip span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

.status-chip strong {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

.timeline {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline__item {
    position: relative;
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 14px;
    padding-bottom: 20px;
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 19px;
    top: 42px;
    bottom: 0;
    width: 2px;
    background: var(--line);
}

.timeline__item.is-done:not(:last-child)::before {
    background: var(--accent);
}

.timeline__item.is-active:not(:last-child)::before {
    background: linear-gradient(180deg, var(--accent), var(--line));
}

.timeline__marker {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.timeline__item.is-done .timeline__marker {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.timeline__item.is-active .timeline__marker {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 5px rgba(14, 165, 233, .16);
}

.timeline__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
}

.timeline__body {
    min-width: 0;
    padding-top: 3px;
}

.timeline__head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.timeline__head h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.timeline__pill {
    padding: 3px 10px;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.timeline__item.is-done .timeline__pill {
    background: #d1fae5;
    color: #047857;
}

.timeline__item.is-active .timeline__pill {
    background: #e0f2fe;
    color: var(--primary-dark);
}

.timeline__desc {
    margin: 4px 0 10px;
    font-size: 13px;
    color: var(--muted);
}

.timeline__field {
    display: flex;
    gap: 8px;
}

.timeline__field input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 13.5px;
}

.timeline__field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, .15);
}

.timeline__now {
    flex: 0 0 auto;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--primary-dark);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease;
}

.timeline__now:hover {
    background: #f1f5f9;
}

.timeline__now--ghost {
    color: var(--muted);
}

@media (max-width: 640px) {
    .status-modal__summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline__item {
        grid-template-columns: 34px 1fr;
        gap: 12px;
    }

    .timeline__marker {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .timeline__item:not(:last-child)::before {
        left: 16px;
        top: 36px;
    }

    .timeline__field {
        flex-wrap: wrap;
    }

    .timeline__now {
        width: 100%;
        padding: 10px;
    }
}

/* Settings: panel aktivasi 2FA */
.setup-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    margin-bottom: 20px;
    background: #f8fafc;
    border: 1px dashed var(--line);
    border-radius: 14px;
    text-align: center;
}

.setup-qr img {
    border-radius: 10px;
    background: #fff;
    padding: 8px;
    border: 1px solid var(--line);
}

.setup-qr p {
    margin: 0;
    font-size: 13px;
    word-break: break-all;
}

.setup-qr strong {
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .04em;
}
/* ============================================================
   Splash screen awal (khusus mobile)
   ============================================================ */
.splash {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #075985 0%, #0284c7 42%, #0ea5e9 72%, #14b8a6 100%);
    color: #fff;
    transition: opacity .5s ease, visibility .5s ease;
}

.splash__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.splash__mark {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: #fff;
    color: #075985;
    display: grid;
    place-items: center;
    font-size: 32px;
    font-weight: 800;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .45);
    animation: splash-pop .5s cubic-bezier(.2, .8, .2, 1) both;
}

.splash__name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .02em;
}

.splash__spinner {
    width: 26px;
    height: 26px;
    margin-top: 4px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .28);
    border-top-color: #fff;
    animation: splash-spin .8s linear infinite;
}

.splash.is-hiding {
    opacity: 0;
    visibility: hidden;
}

.splash.is-done {
    display: none !important;
}

@keyframes splash-pop {
    from { transform: scale(.72); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes splash-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .splash { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
    .splash__mark,
    .splash__spinner { animation: none; }
}

.splash__tag {
    font-size: 12px;
    color: rgba(255, 255, 255, .78);
    margin-top: -8px;
}

.splash--minimal .splash__spinner {
    display: none;
}

