/* ============================================================================
   Persian City RP — design system
   NoPixel-inspired: dark premium gaming UI, glassmorphism, gradient accents
   ========================================================================== */

:root {
    --bg:            #0f1115;
    --bg-elevated:   #151a21;
    --bg-elevated-2: #1e242d;
    --glass:         rgba(255, 255, 255, 0.04);
    --glass-strong:  rgba(255, 255, 255, 0.075);
    --stroke:        rgba(255, 255, 255, 0.08);
    --stroke-strong: rgba(255, 255, 255, 0.15);
    --text:          #f5f7fa;
    --text-2:        #b4bac6;
    --text-3:        #7c8494;

    --accent:        #4f8cff;
    --accent-2:      #6ca8ff;
    --accent-deep:   #3567d6;
    --accent-soft-text: #9dc4ff;
    --gradient:      linear-gradient(120deg, #6ca8ff 0%, #4f8cff 55%, #3567d6 100%);
    --gradient-surface: linear-gradient(160deg, rgba(79, 140, 255, 0.12), rgba(108, 168, 255, 0.05));

    --success:       #41c97a;
    --success-soft-text: #6fe0a3;
    --warning:       #f7b84b;
    --warning-soft-text: #ffcb75;
    --danger:        #ff5a5f;
    --danger-soft-text: #ff8f92;

    --radius:        16px;
    --radius-sm:     10px;
    --radius-md:     13px;
    --radius-pill:   999px;

    --shadow:        0 24px 60px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-sm:     0 10px 24px rgba(0, 0, 0, 0.35);
    --shadow-accent: 0 10px 28px rgba(79, 140, 255, 0.32);

    --ease:          cubic-bezier(0.2, 0.8, 0.2, 1);
    --fast:          150ms;
    --med:           220ms;
    --slow:          300ms;

    --font: "Dana", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display",
            "Segoe UI", Tahoma, Arial, sans-serif;
    --font-title: "Dana", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display",
            "Segoe UI", Tahoma, Arial, sans-serif;
    --font-mono: "Cascadia Code", "SF Mono", Consolas, "Courier New", monospace;
}

@font-face {
    font-family: "Dana";
    src: url("../fonts/dana-regular.woff2") format("woff2"),
         url("../fonts/dana-regular.woff") format("woff"),
         url("../fonts/dana-regular.eot") format("embedded-opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Dana";
    src: url("../fonts/dana-bold.woff2") format("woff2"),
         url("../fonts/dana-bold.woff") format("woff"),
         url("../fonts/dana-bold.eot") format("embedded-opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
}

::selection { background: rgba(79, 140, 255, 0.35); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated-2); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--stroke-strong); }

a { color: var(--accent-2); text-decoration: none; transition: opacity var(--fast) var(--ease), color var(--fast) var(--ease); }
a:hover { opacity: 0.85; }

img { max-width: 100%; display: block; }

code {
    font-family: var(--font-mono);
    background: var(--glass-strong);
    border: 1px solid var(--stroke);
    padding: 0.15em 0.5em;
    border-radius: 6px;
    font-size: 0.88em;
    color: var(--text-2);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------------------------------------------------------------- ambient */

.ambient {
    position: fixed; inset: 0; z-index: -1; overflow: hidden;
    background:
        radial-gradient(650px 420px at 88% -8%, rgba(108, 168, 255, 0.14), transparent 65%),
        radial-gradient(700px 500px at 4% 8%, rgba(79, 140, 255, 0.12), transparent 65%),
        radial-gradient(900px 700px at 50% 118%, rgba(53, 103, 214, 0.10), transparent 60%),
        var(--bg);
}

/* ------------------------------------------------------------- typography */

h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }

.display {
    font-family: var(--font-title);
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead { font-size: 1.16rem; color: var(--text-2); font-weight: 400; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.78rem; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 0.9rem;
}
.eyebrow::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--gradient); box-shadow: 0 0 10px rgba(79, 140, 255, 0.7);
}

.muted { color: var(--text-3); }
.small { font-size: 0.85rem; }

/* ----------------------------------------------------------------- layout */

.container { width: min(1160px, calc(100% - 3rem)); margin-inline: auto; }

.section { padding: 6.5rem 0; }
.section-head { max-width: 640px; margin-bottom: 3.2rem; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: 0.7rem; }

.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

.stack > * + * { margin-top: 1rem; }

/* ------------------------------------------------------------------ glass */

.card {
    position: relative;
    background: var(--glass);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    padding: 1.6rem;
    transition: transform var(--slow) var(--ease), border-color var(--slow) var(--ease),
                background var(--slow) var(--ease), box-shadow var(--slow) var(--ease);
}

.card:hover { border-color: var(--stroke-strong); }

.card-hover:hover { transform: translateY(-4px); background: var(--glass-strong); box-shadow: var(--shadow-sm); }

.card h3 { font-size: 1.12rem; margin-bottom: 0.45rem; }

.card-pad-lg { padding: 2.2rem; }

/* ---------------------------------------------------------------- buttons */

.btn {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
    font: inherit; font-size: 0.98rem; font-weight: 600;
    padding: 0.78rem 1.65rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    cursor: pointer;
    color: var(--text);
    background: var(--glass-strong);
    border-color: var(--stroke);
    transition: transform var(--med) var(--ease), box-shadow var(--med) var(--ease),
                opacity var(--med) var(--ease), background var(--med) var(--ease), border-color var(--med) var(--ease);
    white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); opacity: 1; border-color: var(--stroke-strong); }
.btn:active { transform: translateY(0) scale(0.97); }

.btn .icon { width: 1.05em; height: 1.05em; }

.btn-primary {
    background: var(--gradient);
    border: none;
    color: #061024;
    font-weight: 700;
    box-shadow: var(--shadow-accent);
}
.btn-primary:hover { box-shadow: 0 14px 34px rgba(79, 140, 255, 0.45); }

.btn-danger { background: rgba(255, 90, 95, 0.14); border-color: rgba(255, 90, 95, 0.4); color: var(--danger-soft-text); }
.btn-danger:hover { border-color: rgba(255, 90, 95, 0.6); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.btn.is-loading { color: transparent; pointer-events: none; }
.btn.is-loading::after {
    content: ''; position: absolute; inset: 0; margin: auto;
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
    animation: spin 0.7s linear infinite;
}

.ripple {
    position: absolute; border-radius: 50%; pointer-events: none;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0); opacity: 0.6;
    animation: ripple 600ms var(--ease);
}

@keyframes ripple { to { transform: scale(2.8); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ forms */

.field { margin-bottom: 1.15rem; }
.field label {
    display: block; font-size: 0.85rem; font-weight: 600;
    color: var(--text-2); margin-bottom: 0.45rem;
    transition: color var(--fast) var(--ease);
}
.field:focus-within label { color: var(--accent-2); }

.input, select.input, textarea.input {
    width: 100%;
    font: inherit; font-size: 0.98rem;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-sm);
    padding: 0.72rem 1rem;
    outline: none;
    transition: border-color var(--med) var(--ease), box-shadow var(--med) var(--ease), background var(--med) var(--ease);
}

.input:hover { border-color: var(--stroke-strong); }

.input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.18);
    background: rgba(255, 255, 255, 0.075);
}

.input::placeholder { color: var(--text-3); }

select.input option { background: var(--bg-elevated); color: var(--text); }

textarea.input { resize: vertical; min-height: 110px; }

.checkbox { display: flex; gap: 0.6rem; align-items: center; font-size: 0.92rem; color: var(--text-2); }
.checkbox input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }

.hint { font-size: 0.8rem; color: var(--text-3); margin-top: 0.35rem; }

/* ----------------------------------------------------------------- badges */

.badge {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.76rem; font-weight: 600;
    padding: 0.28rem 0.75rem;
    border-radius: var(--radius-pill);
    background: var(--glass-strong);
    border: 1px solid var(--stroke);
    color: var(--text-2);
    white-space: nowrap;
}
.badge .icon { width: 1em; height: 1em; }

.badge-success { background: rgba(65, 201, 122, 0.14); border-color: rgba(65, 201, 122, 0.4); color: var(--success-soft-text); }
.badge-danger  { background: rgba(255, 90, 95, 0.14); border-color: rgba(255, 90, 95, 0.4); color: var(--danger-soft-text); }
.badge-warning { background: rgba(247, 184, 75, 0.14); border-color: rgba(247, 184, 75, 0.4); color: var(--warning-soft-text); }
.badge-accent  { background: rgba(79, 140, 255, 0.14); border-color: rgba(79, 140, 255, 0.4); color: var(--accent-soft-text); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* -------------------------------------------------------------- progress */

.progress {
    height: 8px; width: 100%;
    border-radius: var(--radius-pill);
    background: var(--glass-strong);
    border: 1px solid var(--stroke);
    overflow: hidden;
}
.progress-bar {
    height: 100%; border-radius: inherit;
    background: var(--gradient);
    transition: width 0.7s var(--ease);
}
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger  { background: var(--danger); }

/* ------------------------------------------------------------- skeleton */

.skeleton { position: relative; overflow: hidden; background: var(--glass-strong); }
.skeleton::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
    animation: shimmer 1.6s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ----------------------------------------------------------------- icons */

.icon { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.22em; flex-shrink: 0; }
.icon-inline { width: 1em; height: 1em; vertical-align: -0.15em; margin-inline-end: 0.3rem; }
.icon-lg { width: 1.7em; height: 1.7em; }

/* ----------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--stroke); }

table { width: 100%; border-collapse: collapse; background: var(--glass); backdrop-filter: blur(22px); font-size: 0.93rem; }

th, td { text-align: start; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--stroke); }

th {
    font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-3); background: rgba(255, 255, 255, 0.03);
}

tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--fast) var(--ease); }
tbody tr:hover { background: rgba(255, 255, 255, 0.035); }

.amount-pos { color: var(--success-soft-text); font-weight: 600; }
.amount-neg { color: var(--danger-soft-text); font-weight: 600; }

/* ------------------------------------------------------------------- nav */

.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    background: rgba(15, 17, 21, 0.7);
    border-bottom: 1px solid var(--stroke);
}

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.nav-brand { display: flex; align-items: center; gap: 0.7rem; font-weight: 700; font-size: 1.05rem; color: var(--text); }
.nav-brand img { width: 34px; height: 34px; border-radius: 9px; }

.nav-links { display: flex; gap: 1.6rem; align-items: center; list-style: none; }
.nav-links a:not(.btn) { color: var(--text-2); font-size: 0.93rem; font-weight: 500; position: relative; }
.nav-links a:not(.btn):hover { color: var(--text); opacity: 1; }
.nav-links a:not(.btn)::after {
    content: ''; position: absolute; inset-inline-start: 0; bottom: -6px; height: 2px; width: 0;
    background: var(--gradient); transition: width var(--med) var(--ease); border-radius: 999px;
}
.nav-links a:not(.btn):hover::after { width: 100%; }

.nav-toggle {
    display: none; background: none; border: none; color: var(--text); cursor: pointer;
    padding: 0.4rem; border-radius: var(--radius-sm);
}
.nav-toggle .icon { width: 1.4rem; height: 1.4rem; }
.nav-toggle:hover { background: var(--glass-strong); }

/* ------------------------------------------------------------------- hero */

.hero { min-height: 100vh; display: flex; align-items: center; padding: 8rem 0 5rem; position: relative; }

.hero-logo {
    width: 92px; height: 92px; border-radius: var(--radius); margin-bottom: 1.8rem;
    box-shadow: var(--shadow-accent);
}

.hero .lead { max-width: 620px; margin: 1.4rem 0 2.4rem; }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stats { display: flex; gap: 2.6rem; margin-top: 3.4rem; flex-wrap: wrap; }
.hero-stat .value { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.hero-stat .label { font-size: 0.82rem; color: var(--text-3); }

/* -------------------------------------------------------------- gallery */

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.gallery-item {
    border-radius: var(--radius); overflow: hidden; border: 1px solid var(--stroke);
    aspect-ratio: 16 / 10; position: relative; background: var(--glass);
    transition: border-color var(--med) var(--ease), box-shadow var(--med) var(--ease);
}
.gallery-item:hover { border-color: var(--stroke-strong); box-shadow: var(--shadow-sm); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .caption {
    position: absolute; inset: auto 0 0 0; padding: 2.2rem 1.1rem 0.9rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    font-size: 0.88rem; font-weight: 600;
}

/* ------------------------------------------------------------------- faq */

.faq-item { border-bottom: 1px solid var(--stroke); }
.faq-item summary {
    cursor: pointer; list-style: none; padding: 1.25rem 0;
    font-weight: 600; font-size: 1.02rem;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--text-3); transition: transform var(--slow) var(--ease); }
.faq-item[open] summary .icon { transform: rotate(180deg); color: var(--accent-2); }
.faq-item p { padding: 0 0 1.25rem; color: var(--text-2); max-width: 720px; }

/* -------------------------------------------------------------- disclosure */

.disclosure > summary {
    cursor: pointer; list-style: none;
    display: inline-flex; align-items: center; gap: 0.4rem;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary .icon { transition: transform var(--slow) var(--ease); }
.disclosure[open] > summary .icon { transform: rotate(180deg); }

.dropdown-menu {
    background: rgba(21, 26, 33, 0.96);
    border: 1px solid var(--stroke-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.1rem;
    animation: slideUp var(--slow) var(--ease);
}

/* ---------------------------------------------------------------- footer */

.footer { border-top: 1px solid var(--stroke); padding: 3rem 0 2.2rem; margin-top: 4rem; }
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--text); }

/* ------------------------------------------------------------- app shell */

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

.sidebar {
    width: 250px; flex-shrink: 0;
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column;
    padding: 1.4rem 1rem;
    background: rgba(21, 26, 33, 0.78);
    border-inline-end: 1px solid var(--stroke);
    backdrop-filter: blur(24px);
}

.sidebar-brand { display: flex; align-items: center; gap: 0.65rem; font-weight: 700; padding: 0.4rem 0.8rem 1.2rem; color: var(--text); }
.sidebar-brand img { width: 32px; height: 32px; border-radius: 8px; }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; }

.sidebar-nav a, .sidebar-nav .nav-label {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.62rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-2); font-size: 0.94rem; font-weight: 500;
    transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.sidebar-nav a .icon { color: var(--text-3); transition: color var(--fast) var(--ease); }

.sidebar-nav a:hover { background: var(--glass-strong); color: var(--text); opacity: 1; }
.sidebar-nav a:hover .icon { color: var(--text-2); }
.sidebar-nav a.active { background: rgba(79, 140, 255, 0.14); color: var(--accent-soft-text); box-shadow: inset 2px 0 0 var(--accent); }
.sidebar-nav a.active .icon { color: var(--accent-2); }

.sidebar-nav .nav-label {
    font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-3); margin-top: 1rem; padding-bottom: 0.2rem;
}

.sidebar-footer { border-top: 1px solid var(--stroke); padding-top: 0.9rem; }

.main { flex: 1; padding: 2.4rem clamp(1.2rem, 4vw, 3.2rem); min-width: 0; }

.page-head { margin-bottom: 2rem; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }

/* -------------------------------------------------------------- stat card */

.stat-card { display: flex; flex-direction: column; gap: 0.3rem; }
.stat-card .icon {
    width: 2rem; height: 2rem; padding: 0.5rem; box-sizing: content-box;
    color: var(--accent-2); background: var(--gradient-surface);
    border: 1px solid var(--stroke); border-radius: var(--radius-sm);
    margin-bottom: 0.3rem;
}
.stat-card .value { font-size: 1.65rem; font-weight: 800; letter-spacing: -0.02em; }
.stat-card .label { font-size: 0.82rem; color: var(--text-3); }

/* -------------------------------------------------------------- char pill */

.char-switch { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.char-pill {
    display: flex; align-items: center; gap: 0.55rem;
    padding: 0.5rem 1.05rem; border-radius: var(--radius-pill);
    background: var(--glass); border: 1px solid var(--stroke);
    color: var(--text-2); font-size: 0.9rem; font-weight: 600; cursor: pointer;
    transition: all var(--med) var(--ease);
}
.char-pill .icon { width: 1.05em; height: 1.05em; }
.char-pill:hover { border-color: var(--stroke-strong); color: var(--text); }
.char-pill.active { background: rgba(79, 140, 255, 0.16); border-color: rgba(79, 140, 255, 0.5); color: var(--accent-soft-text); }

/* ------------------------------------------------------------------ shop */

.shop-toolbar { display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.8rem; }
.shop-toolbar .input { max-width: 280px; }

.cat-pill {
    padding: 0.45rem 1.1rem; border-radius: var(--radius-pill); cursor: pointer;
    background: var(--glass); border: 1px solid var(--stroke);
    color: var(--text-2); font-size: 0.88rem; font-weight: 600;
    transition: all var(--med) var(--ease);
}
.cat-pill:hover { color: var(--text); border-color: var(--stroke-strong); }
.cat-pill.active { background: var(--gradient); border-color: transparent; color: #061024; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.3rem; }

.shop-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.shop-card .thumb {
    position: relative;
    aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
    font-size: 3rem; background: var(--gradient-surface);
    border-bottom: 1px solid var(--stroke);
}
.shop-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.shop-card .body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.shop-card .price { font-size: 1.22rem; font-weight: 800; }
.shop-card .desc { font-size: 0.86rem; color: var(--text-2); flex: 1; }

.featured-ribbon {
    position: absolute; top: 0.9rem; inset-inline-end: 0.9rem;
}

/* ------------------------------------------------------------------ modal */

.modal-backdrop {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(6, 7, 9, 0.65);
    backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center; padding: 1.4rem;
}
.modal-backdrop.open { display: flex; animation: fadeIn var(--med) var(--ease); }

.modal {
    width: min(480px, 100%);
    background: rgba(21, 26, 33, 0.94);
    border: 1px solid var(--stroke-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.8rem;
    animation: slideUp var(--slow) var(--ease);
}

@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } }
@keyframes scaleIn { from { transform: scale(0.94); opacity: 0; } }

/* ------------------------------------------------------------------ toast */

.toast-zone { position: fixed; bottom: 1.4rem; inset-inline-end: 1.4rem; z-index: 300; display: flex; flex-direction: column; gap: 0.7rem; }
.toast {
    min-width: 260px; max-width: 380px;
    display: flex; align-items: center; gap: 0.6rem;
    background: rgba(21, 26, 33, 0.96);
    border: 1px solid var(--stroke-strong);
    border-inline-start: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1.2rem;
    font-size: 0.92rem;
    box-shadow: var(--shadow);
    animation: slideUp var(--slow) var(--ease);
}
.toast-success { border-inline-start-color: var(--success); }
.toast-error { border-inline-start-color: var(--danger); }

/* ------------------------------------------------------------------ alert */

.alert {
    padding: 0.95rem 1.25rem; border-radius: var(--radius-sm);
    font-size: 0.93rem; margin-bottom: 1.4rem;
    border: 1px solid;
}
.alert-success { background: rgba(65, 201, 122, 0.1); border-color: rgba(65, 201, 122, 0.35); color: var(--success-soft-text); }
.alert-error { background: rgba(255, 90, 95, 0.1); border-color: rgba(255, 90, 95, 0.35); color: var(--danger-soft-text); }

/* -------------------------------------------------------------- auth card */

.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 6rem 1.4rem 3rem; }
.auth-card { width: min(430px, 100%); }
.auth-card .card { padding: 2.4rem; }

/* -------------------------------------------------------------- inventory */

.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.inv-slot {
    position: relative; text-align: center; padding: 1.3rem 0.8rem 1rem;
    display: flex; flex-direction: column; gap: 0.25rem; align-items: center;
}
.inv-slot .icon { font-size: 2rem; }
.inv-slot .icon svg { width: 1.9rem; height: 1.9rem; color: var(--text-2); }
.inv-slot .count {
    position: absolute; top: 0.6rem; inset-inline-end: 0.7rem;
    font-size: 0.78rem; font-weight: 700; color: var(--text-2);
    background: var(--glass-strong); border: 1px solid var(--stroke);
    padding: 0.1rem 0.5rem; border-radius: var(--radius-pill);
}
.inv-slot .name { font-size: 0.9rem; font-weight: 600; }
.inv-slot .meta { font-size: 0.75rem; color: var(--text-3); }

/* ----------------------------------------------------------------- reveal */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 1020px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
    .section { padding: 4.2rem 0; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }

    .nav-links {
        display: none;
        position: absolute; top: 64px; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: rgba(15, 17, 21, 0.98); border-bottom: 1px solid var(--stroke);
        padding: 0.6rem 1.4rem 1.2rem;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 0.8rem 0; }
    .nav-toggle { display: block; }

    .shell { flex-direction: column; }
    .sidebar {
        position: static; width: 100%; height: auto;
        flex-direction: row; align-items: center; overflow-x: auto;
        padding: 0.7rem 1rem; gap: 0.6rem;
    }
    .sidebar-brand { padding-block: 0; padding-inline: 0 0.6rem; }
    .sidebar-nav { flex-direction: row; align-items: center; }
    .sidebar-nav .nav-label { display: none; }
    .sidebar-nav a { white-space: nowrap; padding: 0.5rem 0.75rem; }
    .sidebar-nav a.active { box-shadow: inset 0 -2px 0 var(--accent); }
    .sidebar-footer { border: none; padding: 0; }

    .hero { padding-top: 6.5rem; }
    .hero-stats { gap: 1.6rem; }
}

@media (max-width: 460px) {
    .grid-4 { grid-template-columns: 1fr; }
    .container { width: calc(100% - 2rem); }
}
