/* ============================================================
   SellVault — "Gunmetal" premium theme
   Brushed-metal grays, chrome accents, smooth motion.
   ============================================================ */
:root {
    --bg:        #0d0f13;
    --bg-2:      #121519;
    --bg-3:      #171b21;
    --panel-hi:  #232832;   /* top edge highlight */
    --panel-1:   #191d24;
    --panel-2:   #14171c;
    --border:    #2a2f39;
    --border-hi: #3a414e;
    --text:      #eaedf3;
    --muted:     #99a3b3;
    --muted-2:   #6b7482;
    --chrome-1:  #d6dbe4;   /* light chrome */
    --chrome-2:  #9aa6b8;   /* mid steel */
    --steel:     #8ea2c4;   /* accent steel-blue */
    --steel-2:   #6f86ad;
    --green:     #57c98a;
    --amber:     #e6b365;
    --red:       #e8686f;
    --radius:    16px;
    --radius-sm: 11px;
    --shadow:    0 20px 45px -20px rgba(0,0,0,.75);
    --rim:       inset 0 1px 0 rgba(255,255,255,.06);
    --ease:      cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    min-height: 100vh;
    background:
        radial-gradient(1100px 500px at 50% -12%, rgba(142,162,196,.10), transparent 60%),
        linear-gradient(180deg, #0f1216, var(--bg) 40%);
    background-attachment: fixed;
}
a { color: var(--steel); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--chrome-1); }
h1, h2, h3 { letter-spacing: -.02em; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.container-narrow { max-width: 640px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 22px; } .mb { margin-bottom: 22px; }
hr { border: none; border-top: 1px solid var(--border); }

/* ---- Motion ---- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sheen { from { background-position: -180% 0; } to { background-position: 180% 0; } }
.panel, .card, .stat, .hero { animation: fadeUp .5s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- Header ---- */
.site-header {
    position: sticky; top: 0; z-index: 30;
    background: linear-gradient(180deg, rgba(20,23,28,.92), rgba(15,18,22,.78));
    backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--rim);
}
.site-header .inner { display: flex; align-items: center; justify-content: space-between; padding: 15px 22px; }
.brand { font-weight: 800; font-size: 20px; color: var(--text); display: flex; align-items: center; gap: 11px; }
.brand:hover { color: var(--text); }
.brand .logo {
    width: 34px; height: 34px; border-radius: 10px; font-size: 17px;
    display: inline-flex; align-items: center; justify-content: center; color: #0d0f13;
    background: linear-gradient(160deg, #eef1f6, #9aa6b8 55%, #6f7a8c);
    box-shadow: var(--rim), 0 6px 18px -6px rgba(0,0,0,.6);
}
.nav a { color: var(--muted); margin-left: 22px; font-weight: 600; font-size: 14px; }
.nav a:hover { color: var(--text); }

/* ---- Hero ---- */
.hero { padding: 74px 0 30px; text-align: center; }
.hero h1 {
    font-size: clamp(34px, 6vw, 56px); margin: 0 0 14px; font-weight: 800; letter-spacing: -.03em;
    background: linear-gradient(180deg, #ffffff 20%, #aeb8c8 70%, #7f8b9e);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,.4));
}
.hero p { color: var(--muted); font-size: 18px; max-width: 580px; margin: 0 auto; }
.badges { display: flex; gap: 10px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.badge {
    background: linear-gradient(180deg, var(--panel-1), var(--panel-2));
    border: 1px solid var(--border); box-shadow: var(--rim);
    color: var(--muted); padding: 7px 15px; border-radius: 999px; font-size: 13px; font-weight: 600;
}

/* ---- Metal surfaces ---- */
.panel {
    background: linear-gradient(180deg, var(--panel-1), var(--panel-2));
    border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
    box-shadow: var(--shadow), var(--rim);
    position: relative;
}
.panel::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
    border-radius: var(--radius) var(--radius) 0 0;
}
.panel h2 { margin-top: 0; }

/* ---- Product grid ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; margin: 40px 0; }
.card {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: linear-gradient(180deg, var(--panel-1), var(--panel-2));
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow), var(--rim);
    transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
    color: var(--text);
}
.card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hi);
    box-shadow: 0 28px 55px -22px rgba(0,0,0,.8), 0 0 0 1px rgba(214,219,228,.08), var(--rim);
    text-decoration: none;
}
.card-media {
    height: 152px; display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: linear-gradient(135deg, #2b313c, #171b21 70%);
    border-bottom: 1px solid var(--border);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.card-media .ph {
    font-size: 46px; font-weight: 800;
    background: linear-gradient(180deg, #eef1f6, #9aa6b8); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card .desc { color: var(--muted); font-size: 14px; flex: 1; margin-bottom: 18px; }
.card .price-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.price {
    font-size: 22px; font-weight: 800; letter-spacing: -.02em;
    background: linear-gradient(180deg, #fff, #b9c1cf); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stock { font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; border: 1px solid transparent; }
.stock.in { background: rgba(87,201,138,.12); color: var(--green); border-color: rgba(87,201,138,.25); }
.stock.out { background: rgba(232,104,111,.12); color: var(--red); border-color: rgba(232,104,111,.25); }

/* ---- Buttons: brushed steel ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    color: #0f1216; border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius-sm);
    padding: 12px 20px; font-weight: 700; font-size: 15px; font-family: inherit; cursor: pointer; text-decoration: none;
    background: linear-gradient(180deg, #eef1f6, #c2cad6 48%, #a7b1c1);
    box-shadow: var(--rim), 0 10px 24px -12px rgba(0,0,0,.8);
    transition: transform .18s var(--ease), box-shadow .25s var(--ease), filter .2s var(--ease);
    position: relative; overflow: hidden;
}
.btn::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.55) 50%, transparent 80%);
    background-size: 220% 100%; background-position: -180% 0; opacity: 0; transition: opacity .2s;
}
.btn:hover { transform: translateY(-2px); color: #0f1216; box-shadow: var(--rim), 0 16px 30px -12px rgba(0,0,0,.85); filter: brightness(1.04); }
.btn:hover::after { opacity: 1; animation: sheen .9s var(--ease); }
.btn:active { transform: translateY(0); }
.btn.block { width: 100%; }
.btn.secondary {
    background: linear-gradient(180deg, var(--panel-hi), var(--panel-2)); color: var(--text);
    border: 1px solid var(--border-hi);
}
.btn.secondary:hover { border-color: var(--chrome-2); filter: brightness(1.15); }
.btn.danger { background: linear-gradient(180deg, #f08a8f, #d0474f); color: #fff; border-color: rgba(255,255,255,.25); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---- Forms ---- */
label { display: block; font-weight: 600; font-size: 14px; margin: 15px 0 7px; color: #cdd3de; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
    width: 100%; color: var(--text); font-size: 15px; font-family: inherit;
    background: linear-gradient(180deg, #0f1216, #12151a);
    border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.4);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--steel);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.4), 0 0 0 3px rgba(142,162,196,.22);
}
.help { color: var(--muted-2); font-size: 13px; margin-top: 5px; }
.help code, .help + code, code { background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 5px; color: #cdd3de; font-size: 12.5px; }

/* ---- Alerts ---- */
.alert { border-radius: var(--radius-sm); padding: 13px 16px; margin-bottom: 18px; font-weight: 600; font-size: 14px; box-shadow: var(--rim); animation: fadeUp .4s var(--ease) both; }
.alert.success { background: rgba(87,201,138,.10); color: #8fe3b3; border: 1px solid rgba(87,201,138,.3); }
.alert.error { background: rgba(232,104,111,.10); color: #f2a1a6; border: 1px solid rgba(232,104,111,.3); }

/* ---- Delivered / code ---- */
.codebox {
    background: #090b0e; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 15px 17px;
    font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace; font-size: 14px;
    white-space: pre-wrap; word-break: break-word; margin-bottom: 10px; color: #cdd9ea; box-shadow: inset 0 1px 3px rgba(0,0,0,.5);
}

/* ---- Order summary ---- */
.summary { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); }
.summary:last-child { border-bottom: none; font-weight: 800; font-size: 18px; }

/* ---- Status pills ---- */
.pill { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border: 1px solid transparent; }
.pill.pending { background: rgba(230,179,101,.14); color: var(--amber); border-color: rgba(230,179,101,.28); }
.pill.paid { background: rgba(142,162,196,.16); color: var(--steel); border-color: rgba(142,162,196,.3); }
.pill.delivered { background: rgba(87,201,138,.14); color: var(--green); border-color: rgba(87,201,138,.28); }
.pill.cancelled, .pill.refunded { background: rgba(232,104,111,.14); color: var(--red); border-color: rgba(232,104,111,.28); }

/* ---- Tables ---- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 13px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
tbody tr { transition: background .2s var(--ease); }
tbody tr:hover td { background: rgba(255,255,255,.025); }

/* ---- Admin layout ---- */
.admin-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 246px; flex-shrink: 0; padding: 24px 16px;
    background: linear-gradient(180deg, #14171c, #0f1216);
    border-right: 1px solid var(--border); box-shadow: var(--rim);
}
.sidebar .brand { font-size: 18px; margin-bottom: 26px; padding: 0 6px; }
.sidebar nav a { display: block; color: var(--muted); padding: 11px 13px; border-radius: 10px; font-weight: 600; font-size: 14px; margin-bottom: 3px; transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease); }
.sidebar nav a:hover { background: rgba(255,255,255,.045); color: var(--text); transform: translateX(3px); }
.sidebar nav a.active { background: linear-gradient(180deg, var(--panel-hi), var(--panel-2)); color: #fff; box-shadow: var(--rim); border: 1px solid var(--border); }
.admin-main { flex: 1; padding: 34px 38px; overflow-x: auto; }
.admin-main h1 { margin-top: 0; font-size: 28px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 30px; }
.stat { background: linear-gradient(180deg, var(--panel-1), var(--panel-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow), var(--rim); position: relative; }
.stat::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent); }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .value { font-size: 30px; font-weight: 800; margin-top: 6px; letter-spacing: -.02em; background: linear-gradient(180deg, #fff, #b3bccb); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.row { display: flex; gap: 18px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 200px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); color: var(--muted-2); font-size: 13px; padding: 34px 0; margin-top: 72px; text-align: center; }

/* ---- Crypto checkout ---- */
.coin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 13px; }
.coin-option {
    display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--text);
    background: linear-gradient(180deg, var(--panel-hi), var(--panel-2)); border: 1px solid var(--border);
    border-radius: 14px; padding: 20px 12px; cursor: pointer; box-shadow: var(--rim);
    transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.coin-option:hover { border-color: var(--chrome-2); transform: translateY(-3px); box-shadow: var(--rim), 0 16px 30px -16px rgba(0,0,0,.8); }
.coin-sym { font-size: 21px; font-weight: 800; }
.coin-name { font-size: 13px; color: var(--muted); }

.crypto-pay .crypto-head { display: flex; align-items: center; justify-content: space-between; }
.countdown { font-family: ui-monospace, Menlo, monospace; font-weight: 800; font-size: 18px; color: var(--amber); background: rgba(230,179,101,.12); padding: 5px 13px; border-radius: 999px; border: 1px solid rgba(230,179,101,.28); }
.countdown.expired { color: var(--red); background: rgba(232,104,111,.12); }
.qr-wrap { display: flex; justify-content: center; margin: 24px 0; }
.qr-img { background: #fff; padding: 12px; border-radius: 16px; box-shadow: 0 12px 30px -12px rgba(0,0,0,.7); }
.crypto-label { display: block; font-weight: 700; font-size: 12px; color: var(--muted); margin: 18px 0 6px; text-transform: uppercase; letter-spacing: .06em; }
.copy-row { display: flex; align-items: center; gap: 10px; background: #090b0e; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 15px; box-shadow: inset 0 1px 3px rgba(0,0,0,.5); }
.copy-row code { font-family: ui-monospace, Menlo, monospace; font-size: 14px; color: #cdd9ea; word-break: break-all; flex: 1; }
.copy-row code.addr { font-size: 13px; }
.copy-row .unit { color: var(--muted); font-weight: 700; font-size: 13px; }
.copy-btn { background: linear-gradient(180deg, var(--panel-hi), var(--panel-2)); border: 1px solid var(--border-hi); color: var(--text); border-radius: 9px; padding: 8px 13px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: border-color .2s var(--ease), filter .2s var(--ease); }
.copy-btn:hover { border-color: var(--chrome-2); filter: brightness(1.15); }
.waiting { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.waiting .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(230,179,101,.5); } 50% { opacity: .4; box-shadow: 0 0 0 7px rgba(230,179,101,0); } }

/* ---- Payment methods ---- */
.pay-methods { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.pay-methods form { margin: 0; }
.pay-method {
    display: flex; align-items: center; gap: 15px; width: 100%; color: var(--text); text-align: left; cursor: pointer;
    background: linear-gradient(180deg, var(--panel-hi), var(--panel-2)); border: 1px solid var(--border);
    border-radius: 14px; padding: 17px 19px; box-shadow: var(--rim);
    transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.pay-method:hover { border-color: var(--chrome-2); transform: translateY(-2px); box-shadow: var(--rim), 0 16px 30px -16px rgba(0,0,0,.8); color: var(--text); }
.pay-method .pm-icon { font-size: 23px; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: linear-gradient(160deg, #2f3540, #1a1e24); border: 1px solid var(--border); }
.pay-method .pm-body { flex: 1; display: flex; flex-direction: column; }
.pay-method .pm-title { font-weight: 700; font-size: 15px; }
.pay-method .pm-sub { color: var(--muted); font-size: 13px; }
.pay-method .pm-arrow { color: var(--muted); font-size: 18px; transition: transform .25s var(--ease); }
.pay-method:hover .pm-arrow { transform: translateX(5px); color: var(--chrome-1); }

/* ---- Analytics ---- */
.goalbar { height: 14px; background: #0f1216; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,.5); }
.goalbar-fill { height: 100%; background: linear-gradient(90deg, var(--steel-2), var(--chrome-1)); border-radius: 999px; transition: width .7s var(--ease); }
canvas { max-width: 100%; }

/* ---- Profit tools ---- */
.calc-out { background: #0f1216; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 16px; box-shadow: inset 0 1px 3px rgba(0,0,0,.4); }
ul.insights { list-style: none; padding: 0; margin: 0; }
ul.insights li { padding: 11px 14px; margin-bottom: 8px; background: linear-gradient(180deg, var(--panel-hi), var(--panel-2)); border-left: 3px solid var(--steel); border-radius: 8px; font-size: 14px; box-shadow: var(--rim); }
ul.insights.suggestions li { border-left-color: var(--green); }

/* ---- Misc ---- */
.linklike { background: none; border: none; color: var(--steel); cursor: pointer; font-size: 14px; font-weight: 600; font-family: inherit; padding: 0; }
.linklike:hover { text-decoration: underline; color: var(--chrome-1); }

@media (max-width: 760px) {
    .sidebar { display: none; }
    .admin-main { padding: 22px 18px; }
    .hero { padding: 48px 0 20px; }
}


/* ---- Pastebin auto-fulfilment pool ---- */
.pool-stat .help { margin-top: 4px; }
/* Scan-line sweep on the paste panels */
.panel.scan::after {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--steel), transparent);
    opacity: .5; animation: scanline 3.2s var(--ease) infinite;
    border-radius: var(--radius) var(--radius) 0 0;
}
@keyframes scanline { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .6; } 50% { transform: translateY(180px); opacity: .2; } 100% { transform: translateY(0); opacity: 0; } }

.pool-list { display: flex; flex-direction: column; gap: 8px; }
.pool-item {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px;
    background: linear-gradient(180deg, var(--panel-hi), var(--panel-2));
    border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--rim);
    animation: fadeUp .45s var(--ease) both;
}
.pool-item .pool-type { font-size: 15px; }
.pool-item .pool-content { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: #cdd9ea; flex: 1; word-break: break-all; }
.pool-item .pool-meta { color: var(--muted-2); font-size: 12px; white-space: nowrap; }
.pool-item.used { opacity: .55; }
.pool-item.used .pool-content { text-decoration: line-through; color: var(--muted-2); }
.pool-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(87,201,138,.6); animation: dotpulse 1.8s infinite; flex-shrink: 0; }
.pool-dot.off { background: var(--muted-2); animation: none; box-shadow: none; }
@keyframes dotpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(87,201,138,.5); } 50% { box-shadow: 0 0 0 5px rgba(87,201,138,0); } }


/* ============================================================
   iOS / iPhone (incl. iPhone 17 Pro Max) & mobile
   ============================================================ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; overflow-x: hidden; }

/* Prevent zoom-on-focus: iOS zooms when input font-size < 16px */
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=url], select, textarea { font-size: 16px; }

/* Comfortable touch targets */
.btn, .copy-btn, .pay-method, .coin-option, .nav a, .sidebar nav a { min-height: 44px; }
.btn, .pay-method, .coin-option { touch-action: manipulation; }

/* Safe-area insets (notch / Dynamic Island / home indicator) */
@supports (padding: max(0px)) {
    .site-header .inner {
        padding-top: calc(15px + env(safe-area-inset-top));
        padding-left: max(22px, env(safe-area-inset-left));
        padding-right: max(22px, env(safe-area-inset-right));
    }
    .container {
        padding-left: max(22px, env(safe-area-inset-left));
        padding-right: max(22px, env(safe-area-inset-right));
    }
    .site-footer { padding-bottom: calc(34px + env(safe-area-inset-bottom)); }
}

/* Phones & small tablets */
@media (max-width: 760px) {
    .container { padding-left: 16px; padding-right: 16px; }
    .hero { padding: 44px 0 18px; }
    .hero h1 { font-size: clamp(28px, 8vw, 40px); }
    .grid { grid-template-columns: 1fr; gap: 16px; }
    .row { gap: 14px; }
    .toolbar { align-items: stretch; }

    /* Admin becomes a top bar with a horizontal, swipeable nav */
    .admin-shell { flex-direction: column; }
    .sidebar {
        display: block; width: 100%;
        border-right: none; border-bottom: 1px solid var(--border);
        position: sticky; top: 0; z-index: 25;
        padding: 10px 12px calc(8px + env(safe-area-inset-top));
        padding-top: calc(10px + env(safe-area-inset-top));
        background: linear-gradient(180deg, rgba(20,23,28,.96), rgba(15,18,22,.9));
        backdrop-filter: saturate(140%) blur(12px);
    }
    .sidebar .brand { margin-bottom: 10px; font-size: 17px; }
    .sidebar nav {
        display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
        padding-bottom: 4px; scrollbar-width: none;
    }
    .sidebar nav::-webkit-scrollbar { display: none; }
    .sidebar nav a { white-space: nowrap; margin-bottom: 0; padding: 10px 14px; }
    .sidebar nav a:hover { transform: none; }
    .sidebar form { margin-top: 8px; }
    .sidebar form .btn { max-width: 140px; }
    .admin-main { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
    .admin-main h1 { font-size: 24px; }

    /* Tables scroll horizontally instead of breaking the layout */
    .panel > table, .admin-main table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }

    .stat .value { font-size: 26px; }
    .copy-row { flex-wrap: wrap; }
    .pool-item { flex-wrap: wrap; }
    .pool-item .pool-meta { white-space: normal; }
}

/* Larger phones like iPhone Pro Max keep 2-up product cards */
@media (min-width: 480px) and (max-width: 760px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
}


/* Pool item cost chip */
.pool-cost { font-size: 12px; font-weight: 700; color: var(--amber); background: rgba(230,179,101,.12); border: 1px solid rgba(230,179,101,.28); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }


/* Needs-attention (sale without a price) */
.alert.warn { background: rgba(230,179,101,.12); color: #f0c68a; border: 1px solid rgba(230,179,101,.35); }
.tag-warn { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--amber); background: rgba(230,179,101,.14); border: 1px solid rgba(230,179,101,.3); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
tbody tr.row-warn td { background: rgba(230,179,101,.06); }
tbody tr.row-warn td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
