:root {
    --bg: #0b0b10;
    --surface: #14141d;
    --surface-2: #1c1b26;
    --text: #f7f0d3;
    --muted: #d2be86;
    --primary: #c9a45c;
    --primary-dark: #ad8745;
    --border: #3c2f1f;
    --danger: #c43d3d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 5%, rgba(201, 164, 92, 0.12), transparent 30%),
        radial-gradient(circle at 85% 20%, rgba(201, 164, 92, 0.06), transparent 35%),
        linear-gradient(180deg, #0c0d13 0%, #0a0a0f 100%);
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

nav a {
    text-decoration: none;
    color: var(--text);
    margin-left: 18px;
    font-weight: 600;
}

.hero {
    padding: 42px 0 22px;
}

.hero-brand {
    display: block;
}

.hero-copy {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.hero h1 {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 2.8vw, 2.8rem);
    line-height: 1.15;
}

.hero p {
    margin: 0;
    color: var(--muted);
}

.brand-banner {
    margin: 6px 0 28px;
    position: relative;
}

.brand-banner img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: block;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.3);
}

.banner-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    cursor: pointer;
}

.social-hotspot {
    position: absolute;
    z-index: 3;
    display: block;
    border-radius: 999px;
    background: rgba(201, 164, 92, 0.35);
    border: 2px dashed #c9a45c;
    cursor: pointer;
}

/* positions set dynamically by JS – no static percentages needed */

.results-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0 0 14px;
}

.results-head h2,
.results-head p {
    margin: 0;
}

.results-head p {
    color: var(--muted);
}

.search-panel {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1.6fr 1fr auto auto;
    gap: 10px;
    align-items: end;
}

.search-panel label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.95rem;
    color: var(--muted);
}

.search-panel input[type="text"],
.search-panel select,
input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #0f1017;
    color: var(--text);
}

.grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    padding-bottom: 40px;
}

.card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.04);
}

.card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.card-body {
    padding: 14px;
}

.card h3 {
    margin: 0 0 6px;
}

.sku {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

.card p {
    margin: 0 0 8px;
    color: var(--muted);
}

.tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.tag {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 0.8rem;
    color: var(--muted);
    background: #12131b;
}

.price {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.form-row {
    display: flex;
    gap: 8px;
}

.form-row input[type="number"] {
    width: 72px;
}

button,
.btn {
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    display: inline-block;
}

button:hover,
.btn:hover {
    background: var(--primary-dark);
}

.btn-danger {
    background: var(--danger);
}

.btn-secondary {
    background: #2a2a37;
    color: var(--text);
}

.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.total {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
    font-size: 1.15rem;
    font-weight: 700;
}

.notice {
    margin-top: 18px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #bbf7d0;
    background: #ecfdf5;
    color: #14532d;
}

.empty {
    margin-top: 24px;
    padding: 20px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px dashed var(--border);
    color: var(--muted);
}

.actions {
    margin: 16px 0 40px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

footer {
    color: var(--muted);
    border-top: 1px solid var(--border);
    padding: 18px 0 30px;
    margin-top: 30px;
}

@media (max-width: 900px) {
    .search-panel {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════
   CHECKOUT PAGE
═══════════════════════════════════════════════════════ */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
    padding-bottom: 50px;
}

.checkout-left { display: flex; flex-direction: column; gap: 18px; }

.form-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
}

.section-title {
    margin: 0 0 16px;
    font-size: 1rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--primary);
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.field-group label {
    font-size: 0.88rem;
    color: var(--muted);
}

.optional { font-size: 0.8rem; opacity: .65; }

.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="tel"],
.field-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #0f1017;
    color: var(--text);
    font-size: 0.95rem;
}

.field-group input:focus,
.field-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Shipping options */
.shipping-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shipping-card {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.shipping-card input[type="radio"] { accent-color: var(--primary); }

.shipping-card.active,
.shipping-card:has(input:checked) { border-color: var(--primary); background: rgba(201,164,92,0.04); }

.shipping-info { display: flex; flex-direction: column; flex: 1; }
.shipping-name { font-weight: 600; }
.shipping-desc { font-size: 0.82rem; color: var(--muted); }
.shipping-price { font-weight: 700; color: var(--primary); }

.jt-logo {
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #fff;
    background: #e2231a;
    border-radius: 5px;
    padding: 3px 5px;
    flex-shrink: 0;
    user-select: none;
}

/* Payment method cards */
.payment-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.payment-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    text-align: center;
}

.payment-card input[type="radio"] { display: none; }

.payment-card.active,
.payment-card:has(input:checked) {
    border-color: var(--primary);
    background: rgba(201, 164, 92, 0.07);
}

.pay-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900;
    font-size: 1rem;
}

.gcash-icon  { background: #0a7cff; color: #fff; }
.maya-icon   { background: #17b169; color: #fff; }
.card-icon   { background: var(--surface-2); font-size: 1.2rem; }
.cod-icon    { background: var(--surface-2); font-size: 1.2rem; }

.pay-name { font-size: 0.78rem; color: var(--muted); }

.payment-info {
    margin-top: 6px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(201, 164, 92, 0.06);
    border: 1px solid rgba(201, 164, 92, 0.2);
    font-size: 0.9rem;
    color: var(--muted);
}

.hidden { display: none !important; }

/* Order summary sidebar */
.checkout-right { position: sticky; top: 80px; }

.summary-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
}

.summary-items { list-style: none; margin: 0 0 14px; padding: 0; }

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.sum-name { flex: 1; }
.sum-qty  { color: var(--muted); font-style: normal; margin-left: 4px; }
.sum-price { white-space: nowrap; font-weight: 600; }

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.92rem;
    color: var(--muted);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 10px 0 16px;
    font-size: 1.1rem;
    font-weight: 700;
    border-top: 1px solid var(--border);
    margin-top: 6px;
}

.btn-checkout {
    width: 100%;
    padding: 13px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.04em;
}

.btn-checkout:hover { background: var(--primary-dark); }

.back-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.88rem;
    text-decoration: none;
}

.back-link:hover { color: var(--text); }

/* Notice variants */
.notice-warn {
    border-color: #92400e;
    background: #1c1208;
    color: #fbbf24;
}

.notice-cod {
    border-color: var(--border);
    background: var(--surface-2);
    color: var(--text);
}

/* ── Order Success / Failed ───────────────────────────── */
.success-card {
    max-width: 680px;
    margin: 30px auto 50px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 36px;
    text-align: center;
}

.success-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(201, 164, 92, 0.15);
    border: 2px solid var(--primary);
    color: var(--primary);
    font-size: 2rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
}

.failed-card .success-icon.failed-icon {
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.success-sub   { color: var(--muted); margin: 0 0 18px; }
.order-ref     { display: inline-block; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 16px; margin-bottom: 24px; letter-spacing: 0.06em; font-size: 0.9rem; }
.success-section { text-align: left; margin-top: 24px; }
.success-section h3 { color: var(--primary); font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 10px; }
.success-totals { margin-top: 10px; }
.address-block  { line-height: 1.7; color: var(--muted); }

@media (max-width: 860px) {
    .checkout-grid       { grid-template-columns: 1fr; }
    .checkout-right      { position: static; }
    .payment-options     { grid-template-columns: repeat(2, 1fr); }
    .field-row           { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   GCASH PAYMENT PAGE
═══════════════════════════════════════════════ */
.gcash-card {
    max-width: 560px;
    margin: 24px auto 50px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
}

.gcash-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.gcash-header h1 { margin: 0; font-size: 1.4rem; }
.gcash-header p  { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; }

.gcash-badge {
    width: 52px; height: 52px;
    background: #0a7cff;
    color: #fff;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    font-weight: 900;
    flex-shrink: 0;
}

.gcash-amount {
    background: rgba(10,124,255,0.1);
    border: 1px solid rgba(10,124,255,0.25);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.gcash-amount-label { font-size: 0.85rem; color: var(--muted); }
.gcash-amount-value { font-size: 2rem; font-weight: 700; color: #0a7cff; letter-spacing: 0.02em; }

.gcash-pay-box {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
    text-align: center;
}

.gcash-qr-img {
    max-width: 220px;
    width: 100%;
    border-radius: 10px;
    border: 2px solid var(--border);
    margin: 12px auto;
    display: block;
}

.gcash-or {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 8px 0;
}

.gcash-number-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    text-align: left;
}

.gcash-number-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}

.gcash-num-label { color: var(--muted); font-size: 0.83rem; width: 120px; flex-shrink: 0; }
.gcash-num-value { font-weight: 700; flex: 1; letter-spacing: 0.04em; }

.btn-copy {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--primary);
    padding: 4px 10px;
    font-size: 0.8rem;
    cursor: pointer;
}

.gcash-step {
    font-size: 0.9rem;
    color: var(--muted);
    text-align: left;
    margin: 8px 0 4px;
}

.gcash-summary {
    border-top: 1px solid var(--border);
    padding-top: 14px;
    margin-bottom: 18px;
}

.gcash-ref-section {
    border-top: 1px solid var(--border);
    padding-top: 18px;
}

.gcash-note {
    margin-top: 14px;
    font-size: 0.83rem;
    color: var(--muted);
    line-height: 1.6;
}


/* ─── Admin Dashboard ───────────────────────────────────────────────────── */
.admin-wrap {
    padding: 28px 0 50px;
}

.admin-head,
.admin-order-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-head h1,
.admin-order-title h1 {
    margin: 0;
}

.admin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 18px;
}

.admin-login-card {
    max-width: 480px;
    margin: 40px auto;
}

.admin-mini-stat {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--muted);
}

.admin-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.admin-chip {
    text-decoration: none;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.admin-chip.active,
.admin-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.admin-chip span {
    color: var(--muted);
    margin-left: 4px;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    padding: 5px 10px;
    font-size: 0.82rem;
    font-weight: 700;
}

.admin-badge.ok {
    color: #91e29f;
    border-color: rgba(145, 226, 159, 0.45);
}

.admin-badge.warn {
    color: #ffd37a;
    border-color: rgba(255, 211, 122, 0.45);
}

.admin-badge.danger {
    color: #ff8d8d;
    border-color: rgba(255, 141, 141, 0.45);
}

.btn-small {
    display: inline-block;
    text-decoration: none;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--primary);
    border-radius: 8px;
    padding: 7px 10px;
    font-weight: 700;
}

.admin-order-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.admin-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.admin-meta-grid div {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    color: var(--muted);
}

.admin-meta-grid strong {
    color: var(--text);
}

.admin-actions {
    display: grid;
    gap: 10px;
}

.admin-actions textarea,
.admin-actions input[type="text"],
.admin-login-card input[type="text"],
.admin-login-card input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #0f1017;
    color: var(--text);
    font: inherit;
}

.btn-danger {
    border: 0;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    background: var(--danger);
    color: #fff;
    font-weight: 700;
}

@media (max-width: 820px) {
    .admin-order-grid {
        grid-template-columns: 1fr;
    }

    .admin-head,
    .admin-order-title {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Admin catalog/dashboard upgrades */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-card strong {
    display: block;
    margin: 8px 0;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--primary);
}

.stat-card small {
    color: var(--muted);
}

.stat-card.ok strong { color: #91e29f; }
.stat-card.warn strong { color: #ffd37a; }
.stat-card.danger strong { color: #ff8d8d; }

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

.admin-card-head h2 {
    margin: 0;
}

.dashboard-panels {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
}

.stock-alert-list {
    display: grid;
    gap: 10px;
}

.stock-alert-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.stock-line {
    margin: 10px 0 14px;
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: 5px 10px;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: capitalize;
}

.stock-badge.in_stock {
    color: #91e29f;
    border-color: rgba(145, 226, 159, 0.45);
    background: rgba(145, 226, 159, 0.08);
}

.stock-badge.low_stock {
    color: #ffd37a;
    border-color: rgba(255, 211, 122, 0.45);
    background: rgba(255, 211, 122, 0.08);
}

.stock-badge.out_of_stock,
.stock-badge.inactive {
    color: #ff8d8d;
    border-color: rgba(255, 141, 141, 0.45);
    background: rgba(255, 141, 141, 0.08);
}

.admin-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.product-preview {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.admin-actions input[type="number"],
.admin-actions input[type="url"],
.admin-actions input[type="file"],
.admin-actions textarea,
.admin-actions select,
.product-form input[type="text"],
.product-form input[type="number"],
.product-form input[type="url"],
.product-form input[type="file"],
.product-form textarea,
.stock-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #0f1017;
    color: var(--text);
    font: inherit;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.stock-input {
    max-width: 95px;
}

@media (max-width: 820px) {
    .dashboard-panels {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════
   v3.2 readability + admin polish
═══════════════════════════════════════════════ */
:root {
    --body-font: "Segoe UI", Arial, Helvetica, sans-serif;
    --display-font: Georgia, "Times New Roman", serif;
    --shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
}

body {
    font-family: var(--body-font);
    line-height: 1.55;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
}

.brand,
h1,
h2,
h3,
.hero h1,
.price {
    font-family: var(--display-font);
    letter-spacing: 0.01em;
}

p,
small,
label,
input,
textarea,
select,
button,
table,
.btn,
.btn-small,
.admin-chip,
.stock-badge,
.admin-badge {
    font-family: var(--body-font);
    letter-spacing: 0;
}

code {
    font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    letter-spacing: -0.02em;
}

input,
textarea,
select,
button {
    font-size: 0.95rem;
}

.admin-wrap {
    max-width: 1180px;
}

.admin-wrap h1 {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.05;
}

.admin-wrap h2 {
    font-size: 1.35rem;
    line-height: 1.18;
}

.admin-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
    line-height: 1.35;
}

th {
    color: var(--primary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-actions label,
.product-form label {
    color: var(--muted);
    font-weight: 700;
    margin-top: 4px;
}

.admin-actions input,
.admin-actions textarea,
.admin-actions select,
.admin-login-card input,
.product-form input,
.product-form textarea,
.product-form select,
.stock-input,
.field-group input,
.field-group select,
.search-panel input,
.search-panel select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #0f1017;
    color: var(--text);
    font-family: var(--body-font);
    font-size: 0.95rem;
    line-height: 1.35;
}

.admin-actions input:focus,
.admin-actions textarea:focus,
.admin-actions select:focus,
.admin-login-card input:focus,
.product-form input:focus,
.product-form textarea:focus,
.product-form select:focus,
.stock-input:focus {
    outline: 2px solid rgba(201, 164, 92, 0.25);
    border-color: var(--primary);
}

input[type="file"] {
    color-scheme: dark;
}

button,
.btn,
.btn-small,
.quick-action,
.stat-link {
    transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.btn-small:hover,
.quick-action:hover,
.stat-link:hover {
    transform: translateY(-1px);
}

.dashboard-hero {
    align-items: flex-start;
}

.dashboard-grid-large {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.stat-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.stat-card {
    min-height: 148px;
}

.stat-card span {
    font-family: var(--body-font);
    font-weight: 800;
}

.stat-card strong {
    font-family: var(--display-font);
    line-height: 1;
    white-space: nowrap;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin: 0 0 18px;
}

.quick-action {
    background: linear-gradient(180deg, rgba(201, 164, 92, 0.12), rgba(201, 164, 92, 0.04));
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    text-decoration: none;
    padding: 15px 16px;
}

.quick-action strong,
.quick-action span {
    display: block;
}

.quick-action strong {
    color: var(--primary);
    margin-bottom: 3px;
}

.quick-action span {
    color: var(--muted);
    font-size: 0.9rem;
}

.breakdown-list {
    display: grid;
    gap: 10px;
}

.breakdown-list.compact {
    gap: 8px;
}

.breakdown-row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
}

.breakdown-row span,
.breakdown-row strong {
    position: relative;
    z-index: 2;
}

.breakdown-row span {
    text-transform: capitalize;
}

.breakdown-row i {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    background: var(--primary);
    opacity: 0.75;
}

.breakdown-row.no-link {
    cursor: default;
}

.section-spacer {
    margin-top: 24px;
}

.health-list {
    display: grid;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.health-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
}

.health-list span {
    color: var(--muted);
}

.product-preview,
.admin-thumb,
.card img {
    display: block;
}

.product-preview[src=""],
.admin-thumb[src=""] {
    display: none;
}

@media (max-width: 740px) {
    .dashboard-grid-large,
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .admin-mini-stat {
        border-radius: 12px;
    }
}

.product-image-placeholder,
.admin-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.04);
    color: var(--muted);
    border: 1px dashed rgba(212,172,93,.35);
    text-align: center;
}
.product-image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 180px;
    font-size: .95rem;
}
.admin-thumb.placeholder {
    width: 68px;
    height: 68px;
    border-radius: 10px;
    font-size: .72rem;
    padding: 4px;
}
