/* Admin panel */
.boot { min-height: 100vh; display: grid; place-items: center; animation: fade 1s ease infinite alternate; }
@keyframes fade { from { opacity: .4; } }

.a-login { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: radial-gradient(1200px 600px at 80% -10%, #1B2799 0%, transparent 60%), var(--navy-900); position: relative; overflow: hidden; }
.a-login::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 70%); }
.a-login-card { position: relative; width: 100%; max-width: 420px; background: var(--surface); border-radius: var(--r-xl); padding: 34px 30px 28px; box-shadow: 0 40px 90px -30px rgba(0,0,0,.6); }
.a-login-card h1 { font-size: 26px; margin-top: 22px; }
.a-login-card .sub { color: var(--muted); margin-top: 6px; }
.restricted { display: flex; gap: 10px; align-items: flex-start; background: var(--canvas); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; font-size: 13px; color: var(--muted); margin-top: 18px; }
.restricted svg { width: 18px; height: 18px; color: var(--navy); flex-shrink: 0; margin-top: 1px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 70px; }
.pw-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--navy); font-weight: 600; font-size: 13px; }
.pw-wrap button:hover { background: var(--navy-50); }
.a-login-foot { position: relative; color: rgba(255,255,255,.45); font-size: 12.5px; text-align: center; margin-top: 20px; }

.sidebar.dark { background: var(--navy-900); border-right-color: transparent; color: #fff; }
.sidebar.dark .sb-section { color: rgba(255,255,255,.4); }
.sidebar.dark .sb-item { color: rgba(255,255,255,.78); }
.sidebar.dark .sb-item svg { color: rgba(255,255,255,.5); }
.sidebar.dark .sb-item:hover { background: rgba(255,255,255,.06); }
.sidebar.dark .sb-item.active { background: rgba(255,255,255,.1); color: #fff; }
.sidebar.dark .sb-item.active svg { color: #fff; }
.sidebar.dark .sb-item .count { background: #fff; color: var(--navy); }
.sidebar.dark .sb-foot { border-top-color: rgba(255,255,255,.08); }
.sidebar.dark .sb-user small { color: rgba(255,255,255,.5); }
.sidebar.dark .btn-outline { background: transparent; border-color: rgba(255,255,255,.16); color: #fff; box-shadow: none; }
.sidebar.dark .btn-outline:hover { border-color: rgba(255,255,255,.4); color: #fff; }
.env-pill { margin: 0 8px; font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.6); display: flex; align-items: center; gap: 6px; }
.env-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: #4ADE80; }

.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi-row.small .stat-value { font-size: 22px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.mix-row { display: grid; grid-template-columns: 110px 1fr 40px; align-items: center; gap: 12px; padding: 8px 0; font-size: 14px; }
.mix-row .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .input-icon { flex: 1; min-width: 220px; max-width: 380px; }
.toolbar .inv-sub { width: auto; flex: 0 1 260px; min-width: 200px; }

.detail-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.detail-head .avatar.xl { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; background: var(--navy); color: #fff; font-family: var(--display); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted-2); }
.kv dd { margin: 0; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 24px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { height: 40px; padding: 0 14px; border: 0; background: transparent; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--navy); border-bottom-color: var(--navy); }
.more-list { display: flex; flex-direction: column; }
.more-list a { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line-2); font-weight: 600; }
.more-list a:last-child { border-bottom: 0; }
.more-list a svg { width: 20px; height: 20px; color: var(--navy); }
.more-list a .chev { margin-left: auto; color: var(--muted-2); }

@media (max-width: 1100px) { .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 10px; } .kpi-row { gap: 10px; } }

/* Global Inventory */
.inv-group td { background: var(--canvas-2); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); padding-top: 10px; padding-bottom: 10px; }
.inv-group td { padding: 0; }
.inv-fold { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 16px; background: none; border: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; text-align: left; cursor: pointer; }
.inv-fold:hover { color: var(--navy); }
.inv-fold:focus-visible { outline: 2px solid var(--navy-400); outline-offset: -2px; }
.inv-chev { display: inline-grid; place-items: center; width: 18px; height: 18px; flex-shrink: 0; transition: transform .18s var(--ease, ease); }
.inv-chev svg { width: 16px; height: 16px; }
.inv-group.closed .inv-chev { transform: rotate(-90deg); }
.inv-count { margin-left: 2px; padding: 1px 8px; border-radius: 999px; background: var(--line-2); color: var(--muted); font-size: 11px; letter-spacing: 0; }

/* Same gap under the tiles as between them */
.kpi-row + .toolbar { margin-top: 14px; }
/* Global Inventory table: column titles and values centred under each other (product names stay left) */
.inv-table th, .inv-table td, .inv-table .num { text-align: center; }
.inv-table th:first-child, .inv-table td:first-child { text-align: left; }
/* Brand packshot import (Global Inventory › Add packshots) */
.ps-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; padding: 18px; border: 2px dashed var(--navy-200); border-radius: 14px; background: var(--navy-50); color: var(--navy); text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.ps-drop:hover, .ps-drop.over { background: var(--navy-100); border-color: var(--navy-400); }
/* Only the list of photos scrolls; the heading, drop area and Save button stay put (one scrollbar, not two) */
dialog.ps-modal[open] { display: flex; flex-direction: column; overflow: hidden; }
.ps-modal .modal-body { flex: 1; min-height: 0; }
.ps-modal .ps-drop { flex-shrink: 0; }
.ps-modal #psList { min-height: 0; overflow-y: auto; padding-right: 2px; }
.ps-list { display: grid; gap: 10px; margin-top: 12px; }
.ps-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ps-prev { width: 84px; height: 84px; flex-shrink: 0; border-radius: 10px; border: 1px solid var(--line); background: #fff; overflow: hidden; display: grid; place-items: center; }
.ps-prev img { width: 100%; height: 100%; object-fit: contain; }
.ps-file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-row .select { width: 100%; }
