:root {
    --bg: #f3f5f7;
    --panel: #ffffff;
    --ink: #2f4050;
    --ink-2: #45586b;
    --muted: #8a99a8;
    --line: #e5eaf0;
    --line-strong: #d7dee6;
    --sidebar: #2f4050;
    --sidebar-deep: #283745;
    --sidebar-hover: #263544;
    --topbar: #35495e;
    --teal: #1ab394;
    --teal-dark: #14967c;
    --teal-soft: #e6f7f3;
    --blue: #2f80ed;
    --blue-soft: #eaf2fe;
    --red: #ed5565;
    --red-soft: #fdecee;
    --amber: #f3a638;
    --amber-soft: #fdf4e6;
    --purple: #7266ba;
    --purple-soft: #f0eefb;
    --green: #27ae72;
    --green-soft: #e8f7ef;
    --radius: 10px;
    --radius-sm: 7px;
    --shadow-sm: 0 1px 2px rgba(47, 64, 80, .05);
    --shadow: 0 6px 22px rgba(47, 64, 80, .08);
    --shadow-lg: 0 18px 48px rgba(28, 39, 50, .22);
    --sidebar-w: 244px;
    --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--teal); }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; flex: none; }
::selection { background: rgba(26, 179, 148, .22); }

/* ---------- layout ---------- */
.layout { min-height: 100vh; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #31465a 0%, var(--sidebar) 48%, #2b3b4a 100%);
    color: #c6d1db;
    display: flex;
    flex-direction: column;
    z-index: 60;
    transition: transform .25s ease;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.brand__mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--teal), #23c9a8);
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 6px 14px rgba(26, 179, 148, .35);
}
.brand strong { display: block; color: #fff; font-size: 15px; letter-spacing: 1.6px; }
.brand small { display: block; color: #93a5b6; font-size: 11px; letter-spacing: .4px; }
.nav { padding: 14px 12px 20px; overflow-y: auto; flex: 1; }
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 4px; }
.nav__group {
    padding: 16px 10px 6px;
    font-size: 10.5px;
    letter-spacing: 2px;
    color: #7d90a2;
    text-transform: uppercase;
}
.nav__item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 11px;
    margin-bottom: 2px;
    border-radius: 8px;
    color: #c1cdd8;
    font-size: 13.5px;
    position: relative;
    transition: background .16s, color .16s;
}
.nav__item svg { width: 17px; height: 17px; opacity: .85; }
.nav__item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav__item.is-active {
    background: linear-gradient(90deg, rgba(26, 179, 148, .2), rgba(26, 179, 148, .08));
    color: #fff;
    box-shadow: inset 3px 0 0 var(--teal);
}
.nav__item.is-active svg { color: #2ed3b2; opacity: 1; }
.nav__badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: rgba(237, 85, 101, .9);
    color: #fff;
    font-size: 10.5px;
    display: grid;
    place-items: center;
}
.sidebar__foot {
    padding: 14px 18px 18px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    font-size: 11.5px;
    color: #8396a8;
}
.sidebar__foot strong { color: #c9d4de; font-weight: 600; }
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.backdrop { display: none; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: 62px;
    background: var(--topbar);
    color: #dbe3ea;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 26px;
    box-shadow: 0 2px 10px rgba(28, 39, 50, .14);
}
.topbar__crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #aab9c7; }
.topbar__crumb a { color: #cbd6e0; }
.topbar__crumb a:hover { color: #fff; }
.topbar__crumb span { opacity: .55; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background .16s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); }
.topbar .icon-btn { color: #d6e0e8; }
.bell { position: relative; }
.bell__dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff6b6b;
    box-shadow: 0 0 0 2px var(--topbar);
}
.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 0;
    color: #e6edf2;
    cursor: pointer;
    padding: 5px 8px 5px 5px;
    border-radius: 9px;
}
.user-chip:hover { background: rgba(255, 255, 255, .08); }
.user-chip__meta strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; }
.user-chip__meta small { display: block; font-size: 11px; color: #9fb1c1; }
.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, #23c9a8, #159c83);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    flex: none;
    overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--lg { width: 62px; height: 62px; font-size: 22px; }
.dropdown { position: relative; }
.dropdown__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 208px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
    padding: 7px;
    display: none;
    z-index: 70;
    color: var(--ink);
}
.dropdown.is-open .dropdown__menu { display: block; animation: drop .16s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.dropdown__head { padding: 10px 10px 9px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.dropdown__head strong { display: block; font-size: 13px; }
.dropdown__head small { color: var(--muted); font-size: 11.5px; }
.dropdown__item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 6px;
    color: var(--ink-2);
    font-size: 13px;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.dropdown__item:hover { background: #f4f7f9; color: var(--ink); }
.dropdown__item svg { width: 16px; height: 16px; color: var(--muted); }
.dropdown__sep { height: 1px; background: var(--line); margin: 5px 0; }
.dropdown__item--danger { color: var(--red); }
.dropdown__item--danger svg { color: var(--red); }

.content { padding: 24px 26px 36px; flex: 1; width: 100%; max-width: 1560px; }
.footer {
    padding: 16px 26px 22px;
    color: #96a3b0;
    font-size: 11.5px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #e8edf2;
}

/* ---------- page head ---------- */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: .2px; color: #26394b; }
.page-head p { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--teal-dark); }
.crumbs i { font-style: normal; opacity: .5; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--ink-2);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: all .16s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { border-color: #bfc9d4; color: var(--ink); background: #fafbfc; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 2px 6px rgba(26, 179, 148, .22); }
.btn--primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn--dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--dark:hover { background: #243342; border-color: #243342; color: #fff; }
.btn--danger { background: #fff; border-color: #f3c3c9; color: var(--red); }
.btn--danger:hover { background: var(--red-soft); border-color: #eda1aa; color: #d63d4d; }
.btn--danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn--danger-solid:hover { background: #d94252; border-color: #d94252; color: #fff; }
.btn--ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: #f1f4f7; }
.btn--sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn--sm svg { width: 13px; height: 13px; }
.btn--block { width: 100%; }
.btn-group { display: inline-flex; gap: 6px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--teal-dark); font-size: 12px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ---------- cards ---------- */
.card {
    background: var(--panel);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 18px; }
.card__head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.card__head h2, .card__title { font-size: 14.5px; font-weight: 650; color: #2c3e50; display: flex; align-items: center; gap: 8px; }
.card__head h2 svg { color: var(--muted); width: 16px; height: 16px; }
.card__head p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.card__body { padding: 20px; }
.card__body--flush { padding: 0; }
.card__foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; }
.card__tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.filter-bar {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 9px;
    align-items: center;
    flex-wrap: wrap;
    background: #fbfcfd;
    border-radius: var(--radius) var(--radius) 0 0;
}
.search {
    position: relative;
    display: flex;
    align-items: center;
}
.search svg { position: absolute; left: 11px; width: 15px; height: 15px; color: #9aa8b6; pointer-events: none; }
.search input { padding-left: 33px; min-width: 220px; }

/* ---------- forms ---------- */
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="tel"], input[type="date"], input[type="datetime-local"], input[type="search"], select, textarea {
    width: 100%;
    height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 0 11px;
    font-size: 13px;
    color: var(--ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 96px; padding: 9px 11px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(26, 179, 148, .12); }
input::placeholder, textarea::placeholder { color: #aab5c0; }
input:disabled, select:disabled, textarea:disabled { background: #f5f7f9; color: #97a4b1; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a99a8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field--full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12.5px; font-weight: 550; color: #415364; margin-bottom: 6px; }
.field label .req { color: var(--red); margin-left: 2px; }
.field .hint { margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.field .hint code { background: #f3f5f8; padding: 1px 4px; border-radius: 4px; font-size: 11px; }
.input-group { display: flex; align-items: stretch; }
.input-group .addon {
    display: grid;
    place-items: center;
    padding: 0 11px;
    border: 1px solid var(--line-strong);
    border-right: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: #f6f8fa;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}
.input-group input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }
.form-section { padding: 20px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.form-section__title { font-size: 13px; font-weight: 650; color: #33475b; margin-bottom: 4px; }
.form-section__desc { font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--teal); }
.radio-row { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-pill { position: relative; cursor: pointer; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 15px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    color: var(--ink-2);
    background: #fff;
}
.radio-pill input:checked + span { border-color: var(--teal); color: var(--teal-dark); background: var(--teal-soft); box-shadow: inset 0 0 0 1px var(--teal); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.field label.switch { display: inline-flex; margin-bottom: 0; font-weight: 400; }
.switch input { position: absolute; opacity: 0; }
.switch__track { width: 40px; height: 22px; border-radius: 11px; background: #c8d2dc; position: relative; transition: background .18s; }
.switch__track::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; box-shadow: 0 1px 3px rgba(0, 0, 0, .22); transition: transform .18s; }
.switch input:checked + .switch__track { background: var(--teal); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch__label { font-size: 12.5px; color: var(--ink-2); }
.upload-box {
    border: 1.5px dashed #ccd6e0;
    border-radius: var(--radius);
    background: #fafbfc;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border-color .16s, background .16s;
}
.upload-box:hover { border-color: var(--teal); background: #f7fdfb; }
.upload-box input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-box__icon { width: 44px; height: 44px; border-radius: 10px; background: var(--teal-soft); color: var(--teal-dark); display: grid; place-items: center; flex: none; }
.upload-box__icon svg { width: 20px; height: 20px; }
.upload-box strong { display: block; font-size: 13px; color: var(--ink); }
.upload-box small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.upload-box__preview { margin-left: auto; width: 76px; height: 76px; border-radius: 8px; overflow: hidden; background: #eef2f5; display: grid; place-items: center; color: #a5b2be; }
.upload-box__preview img { width: 100%; height: 100%; object-fit: cover; }
.form-note { display: flex; gap: 9px; padding: 12px 14px; border-radius: 8px; background: var(--blue-soft); color: #34618f; font-size: 12px; line-height: 1.6; }
.form-note svg { width: 16px; height: 16px; margin-top: 1px; color: var(--blue); }
.form-note--amber { background: var(--amber-soft); color: #89642d; }
.form-note--amber svg { color: var(--amber); }

/* ---------- tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; min-width: 720px; }
.table th {
    text-align: left;
    padding: 11px 16px;
    font-size: 11px;
    letter-spacing: .7px;
    text-transform: uppercase;
    color: #8d9aa8;
    font-weight: 600;
    background: #f8fafb;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid #eef2f6; font-size: 12.8px; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcfd; }
.table .cell-main { font-weight: 550; color: #2e4256; }
.table .cell-sub { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.table .cell-num { font-variant-numeric: tabular-nums; }
.table .cell-actions { text-align: right; white-space: nowrap; }
.table .cell-actions .btn-group { justify-content: flex-end; }
.table--compact td { padding: 10px 14px; }
.table--compact th { padding: 9px 14px; }
.table--sku { table-layout: fixed; min-width: 900px; }
.table--sku td, .table--sku th { padding-left: 9px; padding-right: 9px; }
.table--sku td:last-child { text-align: right; }
.table-person { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.table-person__name { font-weight: 550; color: #2e4256; }
.table-person__meta { font-size: 11.5px; color: var(--muted); }
.order-no { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12.5px; color: #2b4a63; font-weight: 550; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* ---------- badges / tags ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 23px;
    padding: 0 8px;
    border-radius: 5px;
    font-size: 11.5px;
    font-weight: 550;
    white-space: nowrap;
    background: #f0f3f6;
    color: #64748b;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge--plain::before { display: none; }
.badge--success { background: var(--green-soft); color: #1b8f5b; }
.badge--teal { background: var(--teal-soft); color: #128a70; }
.badge--info { background: var(--blue-soft); color: #2a6fcc; }
.badge--primary { background: #eef1fd; color: #5a66c0; }
.badge--warning { background: var(--amber-soft); color: #b07417; }
.badge--danger { background: var(--red-soft); color: #cf4050; }
.badge--muted { background: #f0f3f6; color: #7d8b99; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 4px; font-size: 11px; background: #f1f4f7; color: #66788a; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: currentColor; }
.dot--success { background: var(--green); }
.dot--danger { background: var(--red); }
.dot--warning { background: var(--amber); }
.dot--muted { background: #b3bfca; }
.stars { color: #f3b23c; letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: #dfe5ea; }

/* ---------- stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 17px 18px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.stat__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stat__label { color: var(--muted); font-size: 12px; }
.stat__value { font-size: 25px; font-weight: 700; color: #2b3d4f; margin-top: 6px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.stat__value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.stat__icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-dark); }
.stat__icon svg { width: 19px; height: 19px; }
.stat__icon--blue { background: var(--blue-soft); color: var(--blue); }
.stat__icon--amber { background: var(--amber-soft); color: #d78f22; }
.stat__icon--purple { background: var(--purple-soft); color: var(--purple); }
.stat__icon--red { background: var(--red-soft); color: var(--red); }
.stat__foot { margin-top: 10px; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.stat__foot strong { color: var(--teal-dark); font-weight: 650; }
.stat--accent { background: linear-gradient(135deg, #20bda0, #159c84); border-color: transparent; color: #fff; }
.stat--accent .stat__label, .stat--accent .stat__foot { color: rgba(255, 255, 255, .78); }
.stat--accent .stat__value { color: #fff; }
.stat--accent .stat__icon { background: rgba(255, 255, 255, .16); color: #fff; }
.stat--accent .stat__foot strong { color: #fff; }

/* ---------- dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.chart { padding: 4px 4px 0; }
.chart__legend { display: flex; gap: 16px; font-size: 11.5px; color: var(--muted); }
.chart__legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; }
.chart__plot { display: flex; align-items: flex-end; gap: 14px; height: 216px; padding: 22px 6px 0; border-bottom: 1px solid var(--line); position: relative; }
.chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; position: relative; }
.chart__bars { display: flex; align-items: flex-end; gap: 4px; height: 158px; width: 100%; justify-content: center; }
.chart__bar { width: 15px; min-height: 3px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #28c9a9, #1ab394); transition: height .4s ease; position: relative; }
.chart__bar--muted { background: #dbe3ea; }
.chart__bar span { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #2f4050; color: #fff; font-size: 10.5px; padding: 3px 6px; border-radius: 4px; white-space: nowrap; }
.chart__bar:hover span { display: block; }
.chart__label { font-size: 11px; color: var(--muted); }
.rank-list { display: flex; flex-direction: column; }
.rank-item { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px dashed #eef2f6; }
.rank-item:last-child { border-bottom: 0; }
.rank-item__no { width: 20px; font-size: 12px; font-weight: 700; color: #b0bcc7; }
.rank-item:nth-child(1) .rank-item__no { color: var(--teal); }
.rank-item__cover { width: 38px; height: 38px; border-radius: 7px; overflow: hidden; background: #f0f4f7; flex: none; display: grid; place-items: center; color: #a5b2be; font-size: 11px; }
.rank-item__cover img { width: 100%; height: 100%; object-fit: cover; }
.rank-item__main { min-width: 0; flex: 1; }
.rank-item__name { font-size: 12.5px; font-weight: 550; color: #34495e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-item__meta { font-size: 11px; color: var(--muted); }
.rank-item__qty { font-size: 12.5px; font-weight: 650; color: #2f4050; white-space: nowrap; }
.todo-list { display: grid; gap: 9px; }
.todo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fcfdfe;
    color: var(--ink-2);
}
.todo:hover { border-color: #cfe0eb; background: #fff; color: var(--ink); }
.todo__icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: #f0f4f7; color: #68809a; flex: none; }
.todo__icon--amber { background: var(--amber-soft); color: #d78f22; }
.todo__icon--red { background: var(--red-soft); color: var(--red); }
.todo__icon--teal { background: var(--teal-soft); color: var(--teal-dark); }
.todo__main { flex: 1; min-width: 0; }
.todo__title { font-size: 12.5px; font-weight: 550; }
.todo__meta { font-size: 11px; color: var(--muted); }
.todo__count { font-size: 18px; font-weight: 700; color: #2f4050; }
.admin-card { display: flex; align-items: center; gap: 13px; padding: 15px; border-radius: 9px; background: linear-gradient(135deg, #f6fafb, #eff7f5); border: 1px solid #e3eeeb; }
.admin-card__name { font-weight: 600; font-size: 13.5px; }
.admin-card__role { font-size: 11.5px; color: var(--muted); }
.ip-row { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; padding: 7px 0; border-bottom: 1px dashed #eef2f6; }
.ip-row:last-child { border-bottom: 0; }
.ip-row span:first-child { color: var(--muted); }
.ip-row span:last-child { color: var(--ink-2); }

/* ---------- order / production ---------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .9fr); gap: 18px; align-items: start; }
.detail-main, .detail-side { display: grid; gap: 18px; min-width: 0; }
.detail-main > *, .detail-side > *, .dash-grid > * { min-width: 0; }
.detail-span { grid-column: 1 / -1; min-width: 0; margin: 0 !important; }
.card--sticky { position: sticky; top: 82px; }
.detail-main > .card, .detail-side > .card { margin: 0; }
.order-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px;
    border-radius: var(--radius);
    background: linear-gradient(115deg, #2f4050 0%, #354a5e 55%, #2f5b58 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.order-hero::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -70px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26, 179, 148, .28), transparent 68%);
}
.order-hero__main { flex: 1; min-width: 0; position: relative; z-index: 1; }
.order-hero__eyebrow { font-size: 11px; letter-spacing: 1.4px; color: #9db2c3; text-transform: uppercase; }
.order-hero h2 { font-size: 21px; margin-top: 3px; font-family: "SFMono-Regular", Consolas, monospace; letter-spacing: .3px; }
.order-hero__meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 11.5px; color: #b9c8d4; }
.order-hero__meta span { display: inline-flex; align-items: center; gap: 5px; }
.order-hero__meta svg { width: 13px; height: 13px; }
.order-hero__amount { text-align: right; position: relative; z-index: 1; }
.order-hero__amount strong { display: block; font-size: 25px; letter-spacing: -.5px; }
.order-hero__amount small { color: #a6bac8; font-size: 11px; }
.order-hero__badges { display: flex; gap: 6px; margin-top: 6px; justify-content: flex-end; }
.order-hero .badge { background: rgba(255, 255, 255, .13); color: #eaf2f6; }
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.kv { padding: 11px 0; border-bottom: 1px dashed #eef2f6; display: flex; gap: 10px; font-size: 12.5px; }
.kv:nth-last-child(-n+2) { border-bottom: 0; }
.kv__label { color: var(--muted); width: 74px; flex: none; }
.kv__value { color: var(--ink-2); min-width: 0; word-break: break-all; }
.kv-grid--1 { grid-template-columns: 1fr; }
.kv-grid--1 .kv:nth-last-child(-n+2) { border-bottom: 1px dashed #eef2f6; }
.kv-grid--1 .kv:last-child { border-bottom: 0; }
.address-box { padding: 13px 14px; border-radius: 8px; background: #f8fafb; border: 1px solid #edf1f4; font-size: 12.5px; line-height: 1.75; }
.address-box strong { color: #2e4256; }
.item-row { display: flex; gap: 13px; padding: 14px 0; border-bottom: 1px solid #f0f3f6; }
.item-row:first-child { padding-top: 0; }
.item-row:last-child { border-bottom: 0; padding-bottom: 0; }
.item-row__cover { width: 58px; height: 58px; border-radius: 8px; overflow: hidden; background: #f1f5f8; display: grid; place-items: center; color: #a8b5c0; flex: none; border: 1px solid #eef2f5; }
.item-row__cover img { width: 100%; height: 100%; object-fit: cover; }
.item-row__main { flex: 1; min-width: 0; }
.item-row__name { font-size: 13px; font-weight: 600; color: #2e4256; }
.item-row__meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.item-row__price { text-align: right; white-space: nowrap; font-size: 13px; font-weight: 600; }
.item-row__price small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.total-lines { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.total-line { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.total-line strong { color: var(--ink-2); }
.total-line--grand { font-size: 14px; color: var(--ink); padding-top: 7px; border-top: 1px dashed var(--line); margin-top: 3px; }
.total-line--grand strong { color: #d65a3a; font-size: 18px; }
.source-card { padding: 0; overflow: hidden; border-radius: 9px; border: 1px solid var(--line); background: #f8fafb; }
.source-card__img { display: block; width: 100%; max-height: 250px; object-fit: contain; background: repeating-conic-gradient(#eef2f5 0% 25%, #f8fafb 0% 50%) 50% / 16px 16px; }
.source-card__bar { padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); background: #fff; border-top: 1px solid var(--line); }
.prod-banner {
    display: flex;
    gap: 13px;
    padding: 15px;
    border-radius: 9px;
    border: 1px solid #e3eeeb;
    background: linear-gradient(115deg, #f2fbf8, #f8fcfb);
}
.prod-banner--warning { border-color: #f4e3c2; background: linear-gradient(115deg, #fdf8ee, #fffdf8); }
.prod-banner--danger { border-color: #f5d2d6; background: linear-gradient(115deg, #fdf1f2, #fffafa); }
.prod-banner__icon { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; background: var(--teal); color: #fff; flex: none; }
.prod-banner--warning .prod-banner__icon { background: var(--amber); }
.prod-banner--danger .prod-banner__icon { background: var(--red); }
.prod-banner__main { flex: 1; min-width: 0; }
.prod-banner__title { font-size: 13px; font-weight: 650; color: #2c4a45; }
.prod-banner--warning .prod-banner__title { color: #7c5a20; }
.prod-banner--danger .prod-banner__title { color: #983c46; }
.prod-banner__desc { font-size: 11.5px; color: #647d78; margin-top: 2px; line-height: 1.6; }
.prod-banner--warning .prod-banner__desc { color: #8b6c38; }
.prod-banner--danger .prod-banner__desc { color: #a25a62; }
.prod-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.file-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.file-tile { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid #edf1f4; border-radius: 8px; background: #fcfdfe; transition: border-color .15s, background .15s; }
.file-tile:hover { border-color: #cfe0eb; background: #fff; }
.file-tile__icon { width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-dark); flex: none; }
.file-tile__icon svg { width: 15px; height: 15px; }
.file-tile__name { font-size: 11.5px; font-weight: 550; color: #3b4f62; font-family: "SFMono-Regular", Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-tile__meta { font-size: 10.5px; color: var(--muted); }
.file-tile__check { margin-left: auto; color: var(--green); flex: none; }
.file-tile__check svg { width: 14px; height: 14px; }
.file-tile--missing { border-color: #f2d3d6; background: #fdf8f8; }
.file-tile--missing .file-tile__icon { background: var(--red-soft); color: var(--red); }
.file-tile--missing .file-tile__check { color: var(--red); }
.checklist { display: flex; flex-direction: column; gap: 2px; }
.check-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; font-size: 12px; border-bottom: 1px dashed #eef2f6; }
.check-row:last-child { border-bottom: 0; }
.check-row svg { width: 15px; height: 15px; }
.check-row .ok { color: var(--green); }
.check-row .bad { color: var(--red); }
.check-row span { flex: 1; color: var(--ink-2); }
.check-row small { color: var(--muted); font-size: 11px; }
.preflight-warnings { display: flex; flex-direction: column; gap: 7px; }
.warning-item { display: flex; gap: 8px; font-size: 11.5px; line-height: 1.55; padding: 8px 10px; border-radius: 6px; background: #fbf7ee; color: #7e6032; }
.warning-item--error { background: #fdf0f1; color: #9c3f49; }
.warning-item--info { background: #f1f6fb; color: #456b8e; }
.warning-item svg { width: 14px; height: 14px; margin-top: 1px; flex: none; }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 5px; bottom: 5px; width: 1px; background: #e6ebf0; }
.timeline-item { position: relative; padding-bottom: 15px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -18px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #c9d4de; box-shadow: 0 0 0 3px #fff; }
.timeline-item:first-child::before { background: var(--teal); }
.timeline-item__title { font-size: 12.5px; font-weight: 550; color: #34495e; }
.timeline-item__time { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.timeline-item__detail { font-size: 11.5px; color: #6c7f90; margin-top: 3px; line-height: 1.55; }
.job-progress { height: 7px; border-radius: 4px; background: #eaf0f4; overflow: hidden; margin-top: 8px; }
.job-progress__bar { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #1ab394, #2ed3b2); transition: width .45s ease; }
.job-progress__bar--failed { background: var(--red); }
.run-hint { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.spinner { width: 13px; height: 13px; border: 2px solid #d9e4ea; border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.version-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 5px; background: #eef3f6; font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; color: #526a7e; }
.alert {
    display: flex;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.6;
    margin-bottom: 16px;
    border: 1px solid transparent;
    align-items: flex-start;
}
.alert svg { width: 16px; height: 16px; margin-top: 1px; flex: none; }
.alert--success { background: #edf9f4; color: #1d7d55; border-color: #c8ebdc; }
.alert--error { background: #fdf0f1; color: #a83d49; border-color: #f4d2d6; }
.alert--warning { background: #fdf7ec; color: #8b6524; border-color: #f2e0c2; }
.alert--info { background: #eff6fd; color: #35688f; border-color: #d3e6f6; }
.alert .alert__close { margin-left: auto; background: none; border: 0; color: inherit; opacity: .55; cursor: pointer; padding: 0; }
.alert .alert__close:hover { opacity: 1; }

/* ---------- misc ---------- */
.empty { padding: 54px 20px; text-align: center; color: var(--muted); }
.empty__icon { width: 52px; height: 52px; border-radius: 14px; background: #f1f5f8; color: #9fb0bf; display: grid; place-items: center; margin: 0 auto 12px; }
.empty__icon svg { width: 23px; height: 23px; }
.empty strong { display: block; color: #5b7083; font-size: 13px; font-weight: 600; }
.empty p { font-size: 12px; margin-top: 4px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pagination__info { font-size: 11.5px; color: var(--muted); }
.pages { display: flex; gap: 4px; align-items: center; }
.page-link { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); background: #fff; display: inline-grid; place-items: center; font-size: 12px; color: var(--ink-2); }
.page-link:hover { border-color: var(--teal); color: var(--teal-dark); }
.page-link.is-active { background: var(--teal); border-color: var(--teal); color: #fff; }
.page-link.is-disabled { opacity: .4; pointer-events: none; }
.page-link svg { width: 13px; height: 13px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 7px;
    font-size: 12px;
    color: #64778a;
    background: #f4f7f9;
    border: 1px solid transparent;
}
.tab:hover { color: var(--ink); background: #eef3f6; }
.tab.is-active { background: #fff; border-color: var(--line-strong); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.tab__count { font-size: 10.5px; background: #e7edf2; color: #63798d; border-radius: 9px; padding: 0 6px; min-width: 17px; text-align: center; }
.tab.is-active .tab__count { background: var(--teal-soft); color: var(--teal-dark); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.gallery-card { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.gallery-card__img { display: block; aspect-ratio: 4 / 3; background: #f2f5f7; overflow: hidden; }
.gallery-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-card:hover .gallery-card__img img { transform: scale(1.035); }
.gallery-card__body { padding: 11px 12px; }
.gallery-card__title { font-size: 12px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-card__meta { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.gallery-card__actions { display: flex; gap: 6px; margin-top: 9px; }
.gallery-card__actions form { flex: 1; }
.gallery-card__actions .btn { width: 100%; }
.thumb { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; background: #f1f5f8; display: block; }
.thumb-box { width: 44px; height: 44px; border-radius: 7px; background: #f1f5f8; display: grid; place-items: center; color: #a9b7c3; overflow: hidden; }
.thumb-box img { width: 100%; height: 100%; object-fit: cover; }
.cover-lg { width: 92px; height: 92px; border-radius: 9px; overflow: hidden; background: #f1f5f8; display: grid; place-items: center; color: #a9b7c3; border: 1px solid var(--line); }
.cover-lg img { width: 100%; height: 100%; object-fit: cover; }
.sku-table { width: 100%; border-collapse: collapse; }
.sku-table th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 600; padding: 7px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sku-table td { padding: 7px 6px; border-bottom: 1px dashed #eef2f6; vertical-align: middle; }
.sku-table input, .sku-table select { height: 34px; font-size: 12px; }
.sku-table .sku-remove { color: #c7a0a4; }
.sku-table .sku-remove:hover { color: var(--red); }
.sku-empty td { text-align: center; color: var(--muted); font-size: 12px; padding: 18px; }
.sku-note { font-size: 11.5px; color: var(--muted); }
.order-amount { font-variant-numeric: tabular-nums; font-weight: 650; color: #2d4256; }
.bulk-hint { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.settings-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.settings-section + .settings-section { margin-top: 18px; }
.info-list { display: grid; gap: 9px; }
.info-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; padding-bottom: 9px; border-bottom: 1px dashed #eef2f6; }
.info-row:last-child { border-bottom: 0; padding-bottom: 0; }
.info-row span:first-child { color: var(--muted); }
.info-row span:last-child { color: var(--ink-2); font-family: "SFMono-Regular", Consolas, monospace; font-size: 11.5px; text-align: right; word-break: break-all; }
.pw-meter { height: 4px; border-radius: 2px; background: #edf1f4; margin-top: 7px; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--teal); transition: width .2s, background .2s; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.is-open { display: flex; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(23, 34, 45, .5); backdrop-filter: blur(2px); }
.modal__dialog {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    animation: modal-in .2s ease;
}
.modal__dialog--wide { max-width: 760px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal__head { padding: 17px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.modal__head h3 { font-size: 15px; font-weight: 650; }
.modal__close { margin-left: auto; border: 0; background: #f3f6f8; width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; cursor: pointer; color: #7b8b9a; }
.modal__close:hover { background: #e9eef2; color: var(--ink); }
.modal__body { padding: 20px; }
.modal__foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; }
.modal--danger .modal__head { background: #fdf5f6; border-radius: 12px 12px 0 0; }
.modal--danger .modal__head h3 { color: #a83d49; }

/* ---------- toast ---------- */
.flash-stack { display: grid; gap: 9px; margin-bottom: 16px; }
.toast-host { position: fixed; right: 22px; top: 78px; z-index: 120; display: grid; gap: 9px; }
.toast { display: flex; gap: 9px; align-items: flex-start; background: #2f4050; color: #fff; padding: 11px 14px; border-radius: 8px; box-shadow: var(--shadow-lg); font-size: 12.5px; min-width: 240px; max-width: 380px; animation: toast-in .22s ease; }
.toast--success { background: #168b72; }
.toast--error { background: #cf4655; }
.toast--warning { background: #b07a24; }
.toast svg { width: 15px; height: 15px; margin-top: 1px; }
@keyframes toast-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* ---------- login ---------- */
.auth-body { background: #eef2f5; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-shell {
    width: min(1040px, 100%);
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(36, 52, 68, .18);
}
.auth-visual {
    position: relative;
    padding: 42px 44px;
    color: #fff;
    background: radial-gradient(circle at 78% 18%, rgba(35, 201, 168, .34), transparent 42%), linear-gradient(150deg, #2f4050 0%, #2b3d4d 52%, #244a46 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.auth-visual::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 34px;
    transform: rotate(18deg);
    right: -120px;
    bottom: -120px;
}
.auth-visual::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 260px;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .02));
    border: 1px solid rgba(255, 255, 255, .12);
    transform: rotate(-12deg);
    right: 44px;
    bottom: 58px;
    backdrop-filter: blur(2px);
}
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-brand__mark { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, #23c9a8, #159c83); display: grid; place-items: center; font-weight: 800; font-size: 20px; box-shadow: 0 8px 20px rgba(26, 179, 148, .32); }
.auth-brand strong { font-size: 15px; letter-spacing: 1.8px; display: block; }
.auth-brand small { font-size: 11px; color: #a7bbc9; }
.auth-visual__main { margin-top: 74px; position: relative; z-index: 1; max-width: 380px; }
.auth-visual__eyebrow { font-size: 11px; letter-spacing: 3px; color: #6fdcc4; font-weight: 600; }
.auth-visual h1 { font-size: 32px; line-height: 1.34; margin-top: 12px; letter-spacing: .4px; }
.auth-visual p { margin-top: 14px; color: #a9bdcb; font-size: 13px; line-height: 1.8; }
.auth-points { margin-top: 44px; display: grid; gap: 12px; position: relative; z-index: 1; }
.auth-point { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #c2d2de; }
.auth-point__icon { width: 26px; height: 26px; border-radius: 7px; background: rgba(26, 179, 148, .16); color: #48d8bb; display: grid; place-items: center; }
.auth-point__icon svg { width: 14px; height: 14px; }
.auth-meta { margin-top: auto; font-size: 11px; color: #7d93a4; position: relative; z-index: 1; }
.auth-form-wrap { padding: 48px 52px; display: flex; flex-direction: column; justify-content: center; }
.auth-form-wrap h2 { font-size: 24px; color: #293c4e; letter-spacing: .2px; }
.auth-form-wrap > p { color: var(--muted); font-size: 12.5px; margin-top: 6px; margin-bottom: 26px; }
.auth-form { display: grid; gap: 16px; }
.auth-form .field label { font-size: 12px; }
.auth-form input { height: 42px; }
.auth-form .btn { height: 42px; margin-top: 4px; font-size: 13.5px; }
.auth-foot { margin-top: 22px; font-size: 11px; color: #9daab6; line-height: 1.7; }
.auth-error { display: flex; gap: 8px; padding: 10px 12px; border-radius: 7px; background: #fdf0f1; border: 1px solid #f4d2d6; color: #a83d49; font-size: 12px; align-items: flex-start; }
.auth-error svg { width: 15px; height: 15px; margin-top: 1px; }

/* ---------- errors ---------- */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f3f5f7; }
.error-card { max-width: 460px; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 40px 36px; text-align: center; box-shadow: var(--shadow); }
.error-code { font-size: 58px; font-weight: 800; letter-spacing: -3px; color: #dfe7ee; line-height: 1; }
.error-card h1 { font-size: 18px; margin-top: 14px; color: #2f4050; }
.error-card p { color: var(--muted); font-size: 12.5px; margin-top: 8px; line-height: 1.7; word-break: break-word; }
.error-card .btn { margin-top: 22px; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dash-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(23, 34, 45, .45); z-index: 50; }
    .main { margin-left: 0; }
    .content { padding: 20px 18px 30px; }
    .topbar { padding: 0 16px; }
    .topbar__crumb { display: none; }
    .form-grid, .form-grid--3 { grid-template-columns: 1fr; }
    .kv-grid { grid-template-columns: 1fr; }
    .kv:nth-last-child(-n+2) { border-bottom: 1px dashed #eef2f6; }
    .kv:last-child { border-bottom: 0; }
    .auth-shell { grid-template-columns: 1fr; min-height: 0; }
    .auth-visual { display: none; }
    .auth-form-wrap { padding: 40px 32px; }
}
@media (max-width: 960px) {
    .source-layout { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
    .stat-grid, .stat-grid--3 { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-head { flex-direction: column; align-items: flex-start; }
    .page-head h1 { font-size: 19px; }
    .file-grid { grid-template-columns: 1fr; }
    .order-hero { flex-direction: column; align-items: flex-start; }
    .order-hero__amount { text-align: left; }
    .order-hero__badges { justify-content: flex-start; }
    .topbar__right .user-chip__meta { display: none; }
    .search input { min-width: 160px; }
    .table th, .table td { padding-left: 12px; padding-right: 12px; }
    .pagination { justify-content: center; }
    .footer { flex-direction: column; gap: 4px; }
}
