:root {
    --bg: #f4f5f7;
    --ink: #0d0f13;
    --ink-2: #3b4250;
    --muted: #7a828f;
    --line: rgba(15, 23, 42, 0.07);
    --line-strong: rgba(15, 23, 42, 0.12);
    --panel: rgba(255, 255, 255, 0.76);
    --panel-solid: #fff;
    --ok: #0fa968;
    --danger: #d92d20;
    --warn: #b54708;
    --radius: 18px;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.03), 0 18px 40px -30px rgba(16, 24, 40, 0.35);
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: var(--font);
    background:
        radial-gradient(900px 620px at 6% -10%, #e2ebff 0%, rgba(226, 235, 255, 0) 62%),
        radial-gradient(800px 560px at 100% 0%, #ffe5ef 0%, rgba(255, 229, 239, 0) 58%),
        linear-gradient(180deg, #f8f9fb 0%, #f2f3f6 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    width: 228px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 20px 14px 18px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(26px) saturate(170%);
    -webkit-backdrop-filter: blur(26px) saturate(170%);
    border-right: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 1px 0 0 rgba(15, 23, 42, 0.03);
}

.side-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    text-decoration: none;
}

.brand-mark {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, #2f6bff, #7a5cff);
    box-shadow: 0 8px 18px -8px rgba(59, 110, 246, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand-mark svg {
    width: 22px;
    height: 22px;
}

.side-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.side-brand-text strong {
    font-size: 14px;
    font-weight: 750;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-brand-text small {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.04em;
}

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

.nav-item {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 11px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 550;
    color: #5a6270;
    text-decoration: none;
    transition: 0.18s;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.8;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--ink);
}

.nav-item.is-active {
    background: #111318;
    color: #fff;
    box-shadow: 0 10px 22px -14px rgba(11, 13, 17, 0.9);
}

.nav-item.is-active svg {
    opacity: 1;
}

.side-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 8px;
}

.side-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    color: #7a828f;
    text-decoration: none;
}

.side-link:hover {
    color: var(--ink);
}

.side-link svg {
    width: 14px;
    height: 14px;
}

.version {
    font-size: 10px;
    color: #b0b6c0;
}

/* Shell */
.shell {
    flex: 1;
    min-width: 0;
    margin-left: 228px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.topbar-title h1 {
    margin: 0;
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.topbar-title p {
    margin: 3px 0 0;
    font-size: 11.5px;
    color: var(--muted);
}

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

.admin-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 11px 0 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
}

.avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #2f6bff, #7a5cff);
    color: #fff;
    font-size: 11px;
    font-weight: 750;
}

.content {
    width: 100%;
    max-width: 1320px;
    padding: 24px 28px 70px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 15px;
    border-radius: 11px;
    border: 1px solid transparent;
    font-size: 12.5px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    transition: 0.18s;
    white-space: nowrap;
}

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

.btn-primary {
    background: linear-gradient(180deg, #23262d, #0b0d11);
    color: #fff;
    box-shadow: 0 10px 24px -14px rgba(11, 13, 17, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -14px rgba(11, 13, 17, 0.95);
}

.btn-quiet {
    background: rgba(255, 255, 255, 0.7);
    border-color: var(--line-strong);
    color: var(--ink-2);
    box-shadow: inset 0 1px 0 #fff;
}

.btn-quiet:hover {
    background: #fff;
}

.btn-danger {
    background: rgba(217, 45, 32, 0.08);
    border-color: rgba(217, 45, 32, 0.18);
    color: #b42318;
}

.btn-danger:hover {
    background: rgba(217, 45, 32, 0.14);
}

.btn-sm {
    height: 32px;
    padding: 0 11px;
    font-size: 12px;
    border-radius: 9px;
}

.btn-xs {
    height: 27px;
    padding: 0 9px;
    font-size: 11px;
    border-radius: 8px;
}

.btn-block {
    width: 100%;
}

.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Panels */
.panel {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: var(--radius);
    box-shadow: var(--shadow), inset 0 1px 0 #fff;
    padding: 20px;
}

.panel + .panel {
    margin-top: 16px;
}

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

.panel-head h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.panel-head p {
    margin: 3px 0 0;
    font-size: 11.5px;
    color: var(--muted);
}

.panel > p.hint {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.8;
    font-weight: 500;
    color: var(--muted);
}

.panel-head .btn {
    flex-shrink: 0;
}

/* Stats */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.68));
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow), inset 0 1px 0 #fff;
}

.stat-card span {
    display: block;
    font-size: 11.5px;
    color: var(--muted);
    margin-bottom: 8px;
}

.stat-card b {
    font-size: 26px;
    font-weight: 780;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.stat-card small {
    display: block;
    margin-top: 4px;
    font-size: 10.5px;
    color: #9aa2ae;
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -26px;
    top: -28px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 110, 246, 0.12), transparent 70%);
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.edit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}

.edit-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

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

    .edit-side {
        order: -1;
    }
}

.quick-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-list .btn {
    justify-content: flex-start;
}

.site-line {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.site-line .label {
    font-size: 10.5px;
    color: #9aa2ae;
    margin-bottom: 6px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.mini-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
}

.mini-item:hover {
    background: rgba(255, 255, 255, 0.7);
}

.mini-item img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
}

.mini-item .mini-name {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 550;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-item .mini-count {
    font-size: 10.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.onboarding {
    padding: 28px;
    border-radius: 18px;
    background: linear-gradient(120deg, rgba(240, 246, 255, 0.9), rgba(255, 255, 255, 0.75));
    border: 1px solid rgba(59, 110, 246, 0.12);
}

.onboarding h2 {
    margin: 0 0 6px;
    font-size: 17px;
    letter-spacing: -0.02em;
}

.onboarding p {
    margin: 0 0 16px;
    font-size: 12.5px;
    color: #6b7280;
    line-height: 1.7;
}

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

.step {
    padding: 12px 14px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 23, 42, 0.05);
    font-size: 11.5px;
    color: #4b5360;
    line-height: 1.6;
}

.step b {
    display: block;
    font-size: 10px;
    color: #9aa2ae;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

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

/* Flash */
.flash {
    margin-bottom: 14px;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 12.5px;
    line-height: 1.6;
}

.flash-success {
    background: rgba(15, 169, 104, 0.08);
    border: 1px solid rgba(15, 169, 104, 0.18);
    color: #067647;
}

.flash-error {
    background: rgba(217, 45, 32, 0.07);
    border: 1px solid rgba(217, 45, 32, 0.16);
    color: #b42318;
}

/* Table */
.table-wrap {
    overflow-x: auto;
    margin: 0 -4px;
    padding: 0 4px;
}

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

.table th {
    text-align: left;
    padding: 0 10px 10px;
    font-size: 10.5px;
    font-weight: 700;
    color: #9aa2ae;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table td {
    padding: 11px 10px;
    border-top: 1px solid var(--line);
    vertical-align: middle;
}

.table tbody tr {
    transition: background 0.15s;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.6);
}

.cell-app {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
}

.thumb {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.05);
    flex-shrink: 0;
}

.cell-app strong {
    display: block;
    font-size: 13px;
    font-weight: 650;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cell-app small {
    display: block;
    font-size: 10.5px;
    color: #9aa2ae;
    font-family: var(--mono);
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mono {
    font-family: var(--mono);
    font-size: 11px;
    color: #6b7280;
}

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

/* Tags */
.tag {
    display: inline-flex;
    align-items: center;
    height: 21px;
    padding: 0 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}

.jb-rootful {
    background: rgba(245, 158, 11, 0.12);
    color: #a45f07;
}

.jb-rootless {
    background: rgba(16, 185, 129, 0.11);
    color: #077a57;
}

.jb-roothide {
    background: rgba(139, 92, 246, 0.12);
    color: #6733c4;
}

.jb-arm64e {
    background: rgba(59, 130, 246, 0.11);
    color: #1d4ed8;
}

.tag-neutral {
    background: rgba(15, 23, 42, 0.05);
    color: #6b7280;
}

.tag-green {
    background: rgba(15, 169, 104, 0.1);
    color: #067647;
}

.tag-red {
    background: rgba(217, 45, 32, 0.08);
    color: #b42318;
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.field.full {
    grid-column: 1 / -1;
}

.field label,
.field .label {
    font-size: 11.5px;
    font-weight: 600;
    color: #6b7280;
}

.field label .req {
    color: #d92d20;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.78);
    padding: 0 12px;
    height: 40px;
    font-size: 13px;
    color: var(--ink);
    outline: 0;
    transition: 0.18s;
}

.field textarea {
    height: auto;
    min-height: 110px;
    padding: 10px 12px;
    line-height: 1.65;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: rgba(59, 110, 246, 0.45);
    box-shadow: 0 0 0 3px rgba(59, 110, 246, 0.09);
    background: #fff;
}

.field .hint {
    font-size: 10.5px;
    color: #9aa2ae;
    line-height: 1.5;
}

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

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--ink-2);
    cursor: pointer;
    user-select: none;
}

.check input {
    width: 16px;
    height: 16px;
    accent-color: #111318;
}

.switch {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
    font-size: 12.5px;
    color: var(--ink-2);
}

.switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-track {
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.15);
    position: relative;
    transition: 0.2s;
}

.switch-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.25);
    transition: 0.2s;
}

.switch input:checked + .switch-track {
    background: #16b877;
}

.switch input:checked + .switch-track .switch-knob {
    transform: translateX(16px);
}

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

.inline-form {
    display: inline;
}

/* Icon manager */
.icon-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-preview {
    width: 84px;
    height: 84px;
    border-radius: 21px;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.05), 0 16px 28px -20px rgba(16, 24, 40, 0.45);
}

.icon-actions {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.file-pick {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    cursor: pointer;
}

.file-pick-label {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropzone */
.dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 190px;
    padding: 28px;
    border: 1.5px dashed rgba(15, 23, 42, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.45);
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}

.dropzone:hover,
.dropzone.is-drag {
    border-color: rgba(59, 110, 246, 0.45);
    background: rgba(240, 246, 255, 0.7);
}

.dropzone-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    color: #3b6ef6;
}

.dropzone-icon svg {
    width: 24px;
    height: 24px;
}

.dropzone strong {
    font-size: 14px;
}

.dropzone span {
    font-size: 11.5px;
    color: var(--muted);
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Upload items */
.upload-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.upload-item {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow: inset 0 1px 0 #fff;
}

.upload-item .thumb {
    width: 66px;
    height: 66px;
    border-radius: 17px;
}

.upload-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.upload-fields .field {
    gap: 4px;
}

.upload-fields .field label {
    font-size: 10.5px;
}

.upload-fields .field input,
.upload-fields .field select {
    height: 34px;
    font-size: 12px;
    border-radius: 9px;
}

.upload-fields .span2 {
    grid-column: span 2;
}

.upload-meta {
    font-size: 10.5px;
    color: #9aa2ae;
    margin-top: 6px;
    line-height: 1.6;
}

.upload-remove {
    align-self: flex-start;
}

/* Variant cards */
.variant-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid var(--line);
    margin-bottom: 9px;
}

.variant-card-main {
    flex: 1;
    min-width: 0;
}

.variant-card-title {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 650;
}

.variant-card-meta {
    margin-top: 5px;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.6;
}

.variant-card-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Chart */
.bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 130px;
    padding-top: 10px;
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    justify-content: flex-end;
}

.bar {
    width: 100%;
    max-width: 34px;
    border-radius: 7px 7px 3px 3px;
    background: linear-gradient(180deg, #5b8cff, #3b6ef6);
    min-height: 3px;
    transition: height 0.3s;
}

.bar-col small {
    font-size: 9px;
    color: #9aa2ae;
    white-space: nowrap;
}

.bar-col b {
    font-size: 10px;
    font-weight: 650;
    color: #6b7280;
}

/* Empty */
.empty {
    text-align: center;
    padding: 44px 20px;
    color: var(--muted);
}

.empty h3 {
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--ink);
}

.empty p {
    margin: 0 0 14px;
    font-size: 12px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    font-size: 11.5px;
    color: var(--muted);
}

.pager {
    display: flex;
    gap: 5px;
}

.pager a,
.pager span {
    min-width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.65);
    font-size: 11.5px;
    text-decoration: none;
    color: #5a6270;
    padding: 0 8px;
}

.pager .is-current {
    background: #111318;
    border-color: #111318;
    color: #fff;
}

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 18px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 32px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(28px);
    box-shadow: 0 40px 90px -45px rgba(16, 24, 40, 0.5), inset 0 1px 0 #fff;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    font-size: 15px;
    font-weight: 750;
}

.login-card h1 {
    margin: 0 0 6px;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.login-card .sub {
    margin: 0 0 22px;
    font-size: 12.5px;
    color: var(--muted);
}

.login-card .field {
    margin-bottom: 13px;
}

.login-card .btn {
    margin-top: 6px;
    height: 44px;
    font-size: 13.5px;
}

.login-foot {
    margin-top: 18px;
    text-align: center;
    font-size: 10.5px;
    color: #a4abb6;
}

/* Utility */
.muted {
    color: var(--muted);
}

.small {
    font-size: 11px;
}

.nowrap {
    white-space: nowrap;
}

.mt-12 {
    margin-top: 12px;
}

.mt-16 {
    margin-top: 16px;
}

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

.search-inline {
    display: flex;
    gap: 8px;
}

.search-inline input {
    height: 34px;
    width: 210px;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.72);
    padding: 0 11px;
    font-size: 12px;
    outline: 0;
}

.search-inline input:focus {
    border-color: rgba(59, 110, 246, 0.4);
    box-shadow: 0 0 0 3px rgba(59, 110, 246, 0.08);
}

.code-box {
    font-family: var(--mono);
    font-size: 11.5px;
    background: rgba(15, 23, 42, 0.045);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 7px 10px;
    color: #4b5360;
    word-break: break-all;
}

/* Responsive */
@media (max-width: 1080px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 900px) {
    .sidebar {
        top: auto;
        bottom: 0;
        width: 100%;
        height: 64px;
        flex-direction: row;
        align-items: center;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
        border-right: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.9);
        box-shadow: 0 -10px 30px -20px rgba(16, 24, 40, 0.4);
    }

    .side-brand,
    .side-foot {
        display: none;
    }

    .side-nav {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        gap: 2px;
    }

    .nav-item {
        flex: 1;
        height: 52px;
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        font-size: 9.5px;
        padding: 0;
        border-radius: 10px;
    }

    .nav-item svg {
        width: 19px;
        height: 19px;
    }

    .shell {
        margin-left: 0;
        padding-bottom: 70px;
    }

    .topbar {
        min-height: 64px;
        padding: 10px 16px;
    }

    .topbar-title h1 {
        font-size: 16px;
    }

    .topbar-title p {
        display: none;
    }

    .content {
        padding: 16px 16px 40px;
    }

    .form-grid,
    .field-row {
        grid-template-columns: 1fr;
    }

    .upload-item {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .upload-item .thumb {
        width: 54px;
        height: 54px;
        border-radius: 14px;
    }

    .upload-remove {
        grid-column: 1 / -1;
        justify-self: end;
    }

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

    .variant-card {
        flex-direction: column;
    }

    .variant-card-actions {
        width: 100%;
    }

    .variant-card-actions .btn {
        flex: 1;
    }

    .admin-chip {
        display: none;
    }
}

@media (max-width: 560px) {
    .panel {
        padding: 16px;
        border-radius: 16px;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 13px 14px;
    }

    .stat-card b {
        font-size: 22px;
    }

    .upload-fields {
        grid-template-columns: 1fr;
    }

    .upload-fields .span2 {
        grid-column: span 1;
    }

    .search-inline input {
        width: 100%;
    }

    .row-actions {
        flex-wrap: wrap;
    }
}
