/* public/assets/css/app.css */

/* =========================
   RESET / BASE
   ========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    font-family: 'DM Mono', 'Roboto Mono', monospace;
    color: #f4faff;
    background-color: #03060f;
    color-scheme: dark;
    display: flex;
    flex-direction: column;
}

/* Background glow — pure CSS, no DOM node, zero layout impact */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 800px 550px at 75% 10%, rgba(0,119,255,.13), transparent 60%),
        radial-gradient(ellipse 600px 450px at 25% 90%, rgba(0,212,255,.09), transparent 60%);
}

img {
    max-width: 100%;
    height: auto;
}

/* =========================
   THEME VARIABLES
   ========================= */
:root {
    --bg0:     #03060f;
    --bg1:     #060c1a;
    --surface: rgba(0,212,255,.05);
    --surface2:rgba(0,212,255,.09);
    --border:  rgba(0,212,255,.14);
    --border2: rgba(0,212,255,.24);
    --text:    #f4faff;
    --muted:   rgba(220,240,255,.80);
    --muted2:  rgba(200,230,255,.55);
    --cyan:    #00d4ff;
    --blue:    #0077ff;
    --good:    #00ffb3;
    --warn:    #ffb300;
    --bad:     #ff4466;

    /* legacy aliases kept for existing dashboard styles */
    --accent:       #0077ff;
    --accent-soft:  rgba(0,119,255,0.22);
    --accent-ring:  rgba(0,119,255,0.28);
    --brand-red:    #0077ff;
    --brand-blue:   #00d4ff;
    --brand-glow:   #00d4ff;
    --brand-deep:   #060c1a;
    --brand-accent: var(--blue);
    --bg:   #03060f;
    --card: #060c1a;
}

a {
    color: var(--cyan);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

/* =========================
   PORTAL NAV
   ========================= */
.app-nav {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 clamp(20px,5vw,60px); height: 64px;
    background: rgba(3,6,15,.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.app-nav__brand {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--text);
}
.app-nav__logo-wrap {
    width: 36px; height: 36px; border-radius: 9px; overflow: hidden;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    padding: 4px; flex-shrink: 0;
}
.app-nav__logo { width: 100%; height: 100%; object-fit: contain; display: block; }
.app-nav__name {
    font-family: 'Syne', sans-serif; font-weight: 700;
    font-size: 17px; letter-spacing: .4px;
}
.app-nav__right { display: flex; align-items: center; gap: 6px; }
.app-nav__user {
    font-size: 12px; color: var(--muted2);
    padding: 0 10px; border-right: 1px solid var(--border);
    margin-right: 4px;
}
.app-nav__link {
    font-size: 13px; color: var(--muted); text-decoration: none;
    padding: 6px 14px; border-radius: 6px;
    transition: color .2s, background .2s;
}
.app-nav__link:hover { color: var(--cyan); background: var(--surface); text-decoration: none; }
.app-nav__link--cta {
    border: 1px solid var(--border2) !important;
    color: var(--cyan) !important; background: var(--surface) !important;
}
.app-nav__link--cta:hover { background: var(--surface2) !important; }

/* =========================
   PORTAL FOOTER
   ========================= */
.app-footer {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 8px;
    padding: 14px clamp(20px,5vw,60px);
    background: rgba(6,12,26,.9);
    border-top: 1px solid var(--border);
    font-size: 12px; color: var(--muted2);
    flex-shrink: 0;
}

/* =========================
   PAGE SHELL
   ========================= */
.site-main, main:not(.auth-page) {
    flex: 1; position: relative; z-index: 1;
    padding: 1.5rem clamp(20px,5vw,60px);
}

/* =========================
   AUTH PAGES
   ========================= */
.auth-page {
    flex: 1;
    position: relative; z-index: 1;
    display: flex; justify-content: center; align-items: center;
    padding: 2rem 1rem 3rem;
}
.auth-card {
    width: 100%; max-width: 420px;
    padding: 2.5rem 2.75rem;
    background: rgba(6,12,26,.82);
    border: 1px solid var(--border2);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(0,212,255,.08);
}
.auth-card__logo {
    display: flex; align-items: center; gap: 10px; margin-bottom: 28px;
}
.auth-logo-icon {
    width: 36px; height: 36px; border-radius: 9px; overflow: hidden;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    display: flex; align-items: center; justify-content: center;
    font-family: 'Syne', sans-serif; font-weight: 800;
    font-size: 12px; color: #03060f; flex-shrink: 0;
}
.auth-logo-name {
    font-family: 'Syne', sans-serif; font-weight: 700;
    font-size: 16px; color: var(--text);
}
.auth-title {
    font-family: 'Syne', sans-serif; font-weight: 800;
    font-size: 1.7rem; color: var(--text);
    margin: 0 0 6px; letter-spacing: -.4px;
}
.auth-subtitle {
    font-size: 13px; color: var(--muted2); margin-bottom: 24px;
}
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
    font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted2);
}
.auth-field input {
    background: rgba(0,212,255,.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: 'DM Mono', monospace; font-size: 14px;
    padding: 11px 14px; outline: none; width: 100%;
    transition: border-color .2s, background .2s;
}
.auth-field input::placeholder { color: var(--muted2); }
.auth-field input:focus {
    border-color: var(--cyan);
    background: rgba(0,212,255,.07);
}
.auth-captcha {
    margin-top: 18px;
    display: flex; justify-content: center;
}
.auth-captcha iframe,
.auth-captcha > div { border-radius: 10px; overflow: hidden; }
.auth-submit {
    margin-top: 8px;
    display: flex; align-items: center; justify-content: center;
    width: 100%; padding: 13px 20px; border-radius: 10px; border: none;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #03060f; font-family: 'Syne', sans-serif;
    font-weight: 700; font-size: 14px; cursor: pointer;
    transition: opacity .2s, transform .15s;
}
.auth-submit:hover { opacity: .88; transform: translateY(-2px); }
.auth-links {
    display: flex; justify-content: space-between; flex-wrap: wrap;
    gap: 8px; margin-top: 20px;
}
.auth-link {
    font-size: 12px; color: var(--muted2); text-decoration: none;
    transition: color .2s;
}
.auth-link:hover { color: var(--cyan); text-decoration: none; }
.auth-alert {
    padding: 12px 14px; border-radius: 10px;
    font-size: 13px; margin-bottom: 16px; border: 1px solid;
}
.auth-alert--error   { background: rgba(255,68,102,.1); border-color: rgba(255,68,102,.3); color: #ff8899; }
.auth-alert--success { background: rgba(0,255,179,.08); border-color: rgba(0,255,179,.25); color: var(--good); }

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Accent glow utility (used by buttons etc.) */
.glow-accent {
    box-shadow:
        0 10px 26px rgba(15, 23, 42, 0.16),
        0 0 0 1px rgba(219, 23, 9, 0.16),
        0 14px 34px var(--accent-soft);
}

/* =========================
   LAYOUT: HEADER / MAIN / FOOTER
   ========================= */
.site-header {
    background: rgba(3,6,15,.88);
    color: var(--text);
    padding: 0 clamp(20px,5vw,60px);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
}

.site-header__left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-width: 0;
}

.site-logo {
    display: flex;
    align-items: center;
    min-width: 0;
}

.site-logo__img {
    display: block;
    height: clamp(28px, 3.2vw, 52px);
    width: auto;
    max-width: 18vw;
    min-width: 42px;
    object-fit: contain;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-nav a {
    color: #e5e7eb;
    font-size: 0.95rem;
}

.site-nav a:hover {
    color: #ffffff;
}

.site-header__user {
    font-size: 0.85rem;
    color: #9ca3af;
}

.site-nav-toggle {
    display: none;
}

.site-main {
    flex: 1;
    padding: 1.5rem 2rem;
    width: 100%;
    margin: 0 auto;
    max-width: none;
}

.site-footer {
    background: rgba(6,12,26,.9);
    color: var(--muted2);
    font-size: 0.85rem;
    text-align: center;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
}

/* =========================
   CONTAINERS / TYPO
   ========================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3 {
    color: var(--text);
}

.muted,
.text-muted {
    color: var(--muted);
}

.text-sm { font-size: 0.875rem; }
.text-right { text-align: right; }

/* =========================
   BUTTONS
   ========================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.12s ease;
    white-space: nowrap;
}

.btn-primary {
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--brand-red), var(--brand-blue));
    color: #ffffff;
    box-shadow:
        0 10px 22px rgba(15, 23, 42, 0.30),
        0 0 0 1px rgba(219, 23, 9, 0.22),
        0 12px 30px var(--accent-soft);
}

.btn-primary:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #f02211, #1e40af);
    box-shadow:
        0 14px 28px rgba(15, 23, 42, 0.40),
        0 0 0 1px rgba(219, 23, 9, 0.30),
        0 18px 44px var(--accent-ring);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow:
        0 8px 18px rgba(15, 23, 42, 0.22),
        0 0 0 1px rgba(219, 23, 9, 0.22),
        0 10px 26px var(--accent-soft);
}

.btn-secondary {
    background-color: #ffffff;
    color: #111827;
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background-color: #f3f4f6;
}

.btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px var(--accent-ring),
        0 0 0 1px rgba(219, 23, 9, 0.25);
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

.btn-xs {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* =========================
   FORMS (GLOBAL — dark theme)
   ========================= */

/* Section cards inside admin forms get breathing room */
.container > form > section.card,
.container > form > .card,
form .card + .card {
    margin-top: 20px;
}

/* h2 inside admin cards */
.card h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* Bare label wrapping an input (settings page pattern):
   <label>Label text<input ...></label>
   Stacks them vertically with correct dark styling. */
.card label:not(.checkbox):not(.sw),
.container label:not(.checkbox):not(.sw) {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted2);
    margin-bottom: 14px;
}

/* All text inputs, selects, textareas — dark themed */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--border2);
    background: rgba(0,212,255,.05);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
    box-sizing: border-box;
}
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="tel"]::placeholder,
input[type="number"]::placeholder,
input[type="url"]::placeholder,
textarea::placeholder { color: var(--muted2); }

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0,212,255,.15);
    background: rgba(0,212,255,.08);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300d4ff' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
select option { background: var(--bg1); color: var(--text); }

textarea { min-height: 100px; resize: vertical; }

/* Checkbox rows */
label.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    margin-bottom: 10px;
}
label.checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    accent-color: var(--cyan);
    cursor: pointer;
}

/* .field / .form-field wrappers (existing templates) */
.field,
.form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}
.field label,
.form-field label {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted2);
    margin-bottom: 0;
}

/* Two-column form grid for wider fields */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.form-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* =========================
   ALERTS
   ========================= */
.alert {
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
    margin: 0.75rem 0;
}
.alert-error {
    background: rgba(255,68,102,.12);
    border-color: rgba(255,68,102,.35);
    color: #ff8099;
}
.alert-success {
    background: rgba(0,255,179,.10);
    border-color: rgba(0,255,179,.30);
    color: var(--good);
}
.alert-warning {
    background: rgba(255,179,0,.10);
    border-color: rgba(255,179,0,.30);
    color: var(--warn);
}

/* =========================
   CARDS / PRODUCTS
   ========================= */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(15,23,42,0.05);
}

.dash-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dash-menu li {
    margin-bottom: 4px;
}

.card img {
    width: 100%;
    border-radius: 0.5rem;
    object-fit: cover;
    max-height: 160px;
}

.card-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.card-price {
    font-weight: 600;
    color: #16a34a;
    font-size: 0.95rem;
}

.card-meta {
    font-size: 0.8rem;
    color: #6b7280;
}

/* =========================
   SHOP HEADER / FILTERS
   ========================= */
.shop-breadcrumb {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.shop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.shop-header__title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--brand-deep);
    position: relative;
    padding-bottom: 0.15rem;
}

.shop-header__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2.5rem;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-accent), transparent);
    opacity: 0.9;
}

.shop-header__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.shop-header__filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.shop-header__filters input[type="text"],
.shop-header__filters select {
    height: 2.4rem;
    min-width: 180px;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background-color: #f9fafb;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.shop-header__filters select {
    min-width: 150px;
    cursor: pointer;
}

.shop-header__filters input[type="text"]::placeholder {
    color: #9ca3af;
}

.shop-header__filters input[type="text"]:focus,
.shop-header__filters select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
    background-color: #ffffff;
}

.shop-header__filters .btn-primary {
    height: 2.4rem;
    padding: 0 1.25rem;
    border-radius: 999px;
    white-space: nowrap;
}

/* Store wrapper */
.store-shell {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* =========================
   BRAND STRIP (LONG LOGO)
   ========================= */
.brand-strip {
    width: 100%;
    padding: 0.9rem 0 0.4rem;
    display: flex;
    justify-content: center;
}

.brand-strip__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
}

.brand-strip__logo {
    display: block;
    width: 100%;
    max-width: min(1100px, 92vw);
    height: clamp(44px, 7vw, 110px);
    object-fit: contain;
}

@media (max-width: 640px) {
    .brand-strip__logo {
        height: 42px;
        max-width: 320px;
    }
}

/* =========================
   SPECIALS STRIP
   ========================= */
.specials-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 1.25rem;
    margin: 0 0 1.5rem;
}

.special-card {
    border-radius: 0.9rem;
    padding: 1.1rem 1.4rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

.special-card__title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.special-card__text {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.special-card__btn {
    align-self: flex-start;
}

.special-card--main {
    background: radial-gradient(circle at top left, var(--brand-blue), #1d4ed8 35%, #111827 100%);
    color: #ffffff;
    border-color: rgba(37, 99, 235, 0.7);
    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.55),
        0 0 0 1px rgba(226, 242, 107, 0.18);
}

.special-card--main .special-card__text { color: #e5e7eb; }

.special-card--daily {
    background: linear-gradient(135deg, #3a0603, var(--brand-red));
    color: #f9fafb;
    border-color: rgba(219, 23, 9, 0.85);
    box-shadow:
        0 16px 40px rgba(15, 23, 42, 0.5),
        0 0 0 1px rgba(219, 23, 9, 0.9),
        0 0 16px rgba(226, 242, 107, 0.35);
}

.special-card--daily .special-card__text { color: #ffecec; }

.special-card--prebuilt {
    background: linear-gradient(135deg, #0f172a, var(--brand-red));
    color: #f9fafb;
    border-color: rgba(148, 163, 184, 0.7);
    box-shadow:
        0 16px 40px rgba(15, 23, 42, 0.45),
        0 0 0 1px rgba(219, 23, 9, 0.75),
        0 0 14px rgba(226, 242, 107, 0.30);
}

.special-card--prebuilt .special-card__text { color: #fff6de; }

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

/* =========================
   PRODUCT ROW CAROUSEL (3 items)
   ========================= */
.product-section { margin-top: 1.75rem; }

.product-section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.product-section__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--brand-deep);
}

.product-section__controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-row-carousel {
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    padding: 0.9rem 1rem 1.1rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.product-row-carousel__track {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.product-row-card {
    flex: 0 0 260px;
    max-width: 260px;
}

/* =========================
   AUTH PAGES (LOGIN / REGISTER)
   ========================= */
/* auth styles defined in theme block above */

/* auth-alert defined in theme block above */

/* Embedded mode: hide global header/footer inside iframe */
body[data-embedded="1"] .site-header,
body[data-embedded="1"] .site-footer {
    display: none !important;
}

body[data-embedded="1"] .auth-page {
    min-height: auto;
    padding: 1rem;
    background: transparent;
}

body[data-embedded="1"] .auth-card {
    margin-top: 0;
    max-width: 520px;
    box-shadow: none;
    border-radius: 18px;
}

/* =========================
   DASHBOARD (ADMIN / CLIENT)
   ========================= */
.dash-header {
    margin: 0.25rem 0 1rem;
}

.dash-header h1 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.dash-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

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

.dash-menu {
    position: sticky;
    top: 1rem;
}

.dash-menu .card {
    padding: 0.9rem;
}

.dash-content .card h2 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

/* =========================
   TABLES (ADMIN)
   ========================= */
.table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0,212,255,.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    text-align: left;
    font-size: 0.95rem;
    color: var(--text);
}

.table th {
    background: rgba(0,212,255,.10);
    color: var(--cyan);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.table tr:last-child td {
    border-bottom: none;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Admin product form layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

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

.form-grid .span-2 {
    grid-column: 1 / -1;
}

/* =========================
   CHAT FAB (FIX: don't overlap header)
   ========================= */
.chat-fab {
    position: fixed;
    top: 5.5rem;
    right: 1.5rem;
    bottom: auto;

    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--brand-red), var(--brand-blue));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 14px 30px rgba(15, 23, 42, 0.45),
        0 0 0 1px rgba(219, 23, 9, 0.22),
        0 18px 44px var(--accent-soft);
    cursor: pointer;

    z-index: 55;
}

@media (max-width: 640px) {
    .chat-fab {
        top: 4.75rem;
        right: 1rem;
    }
}

/* =========================
   CHAT MODAL
   ========================= */
.chat-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000; /* must be above everything */
}

.chat-modal-overlay.open { display: flex; }

.chat-modal {
    width: min(980px, 94vw);
    height: min(720px, 88vh);

    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.55);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-modal__header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 500;
    background: #ffffff;
    flex: 0 0 auto;
}

.chat-modal__close {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
}

.chat-modal__body {
    flex: 1 1 auto;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
}

.chat-embed,
.chat-frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #ffffff;
}

/* =========================
   UTILITIES
   ========================= */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

/* (Optional) Keep old override if anything else depends on it */
.chat-fab{
  top: 90px !important;
  right: 24px !important;
  bottom: auto !important;
}
/* =========================
   GENERIC CONTAINER / TABLES / ALERTS
   ========================= */
.container{
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

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

.table{
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.table th,
.table td{
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
}

.table th{
  text-align: left;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(0,212,255,.10);
}

.alert{
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}

.alert-error{
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.alert-success{
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.text-muted{ color:#6b7280; }

/* =========================
   DASHBOARD LAYOUT (duplicate block — kept minimal, primary rules above)
   ========================= */
.dash-content .card{ padding: 1.2rem; }

/* =========================
   ADMIN PAGES
   ========================= */
.page-head{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
}

.page-head h1{ font-size: 1.6rem; }
.page-head__actions{ display:flex; gap:0.5rem; }

.toolbar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 0;
}

.toolbar__left{ display:flex; align-items:center; gap:0.6rem; flex-wrap:wrap; }

.input{
  width: 100%;
  max-width: 420px;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border2);
  background: rgba(0,212,255,.05);
  color: var(--text);
  outline: none;
}

.input:focus{
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,212,255,.15);
}

.textarea{
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border2);
  background: rgba(0,212,255,.05);
  color: var(--text);
  outline: none;
  resize: vertical;
}

.textarea:focus{
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,212,255,.15);
}

.check{ display:inline-flex; align-items:center; gap:0.5rem; font-size:0.9rem; color: var(--text); }

.actions{ white-space: nowrap; }

.btn-danger{
  background: #ef4444;
  color: #ffffff;
  border: none;
}

.btn-danger:hover{ filter: brightness(0.95); }

.form{ padding: 1.25rem; }

.form-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}

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

.field{ display:flex; flex-direction:column; gap:0.35rem; }
.field label{ font-weight: 600; color:#111827; font-size:0.9rem; }
.field .help{ font-size:0.82rem; color:#6b7280; }
.field--span2{ grid-column: span 2; }
@media (max-width: 900px){ .field--span2{ grid-column: span 1; } }

.req{ color: #b91c1c; }

.form-actions{ display:flex; gap:0.6rem; align-items:center; justify-content:flex-end; }

.img-preview{
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 0.75rem;
  background: #f9fafb;
}

.img-preview img{
  max-width: 100%;
  max-height: 220px;
  border-radius: 12px;
  display:block;
}