/* =========================================================
   متغیرهای سراسری، پایه و چیدمان کلی + صفحات
   ========================================================= */

:root {
    /* رنگ‌ها */
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-soft: rgba(249, 115, 22, .10);
    --primary-soft-hover: rgba(249, 115, 22, .16);
    --secondary: #fb923c;
    --secondary-dark: #c2410c;
    --secondary-soft: rgba(251, 146, 60, .12);
    --secondary-soft-hover: rgba(251, 146, 60, .2);
    --accent: #f59e0b;
    --success: #16a34a;
    --background: #f7f5f2;
    --surface: #ffffff;
    --surface-2: #f4f1ec;
    --text: #1c1917;
    --text-soft: #44403c;
    --muted: #78716c;
    --border: #eae5df;
    --dark: #17120d;

    /* ابعاد */
    --radius: 16px;
    --radius-sm: 12px;
    --radius-lg: 24px;
    --container: 1200px;
    --header-h: 74px;

    /* سایه */
    --shadow-sm: 0 2px 10px -6px rgba(28, 25, 23, .18);
    --shadow: 0 14px 34px -18px rgba(28, 25, 23, .35);
    --shadow-lg: 0 30px 60px -28px rgba(28, 25, 23, .45);

    --font: 'Vazirmatn', 'Segoe UI', Tahoma, 'IRANSans', sans-serif;
    --transition: .2s ease;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--background);
    color: var(--text);
    font-size: 16px;
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; }
h1, h2, h3, h4, h5 { line-height: 1.6; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font-family: inherit; }
svg.icon { flex: 0 0 auto; }

:focus-visible {
    outline: 3px solid rgba(249, 115, 22, .45);
    outline-offset: 2px;
    border-radius: 6px;
}

::selection { background: var(--primary); color: #fff; }

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

.main { min-height: 60vh; }

.section-top { padding-top: 2.5rem; }

.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); }

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

/* =========================================================
   Header
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    flex: 0 0 auto;
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 10px 22px -12px rgba(249, 115, 22, .9);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.brand-text strong { font-size: 1.06rem; letter-spacing: -.01em; }
.brand-text small { font-size: .7rem; color: var(--muted); font-weight: 500; }
.brand-light { color: #fff; }
.brand-light .brand-mark { background: rgba(255, 255, 255, .16); box-shadow: none; }

.main-nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex: 1 1 auto; }
.nav-list {
    display: flex;
    align-items: center;
    gap: .35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-link {
    display: inline-block;
    padding: .5rem .85rem;
    border-radius: 10px;
    font-size: .92rem;
    font-weight: 600;
    color: var(--text-soft);
    transition: var(--transition);
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.is-active { background: var(--primary-soft); color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: .55rem; }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.nav-toggle { display: none; }
.nav-overlay { display: none; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
    position: relative;
    overflow: hidden;
    padding: 4.5rem 0 5rem;
    background:
        radial-gradient(900px 420px at 85% -10%, rgba(251, 146, 60, .18), transparent 60%),
        radial-gradient(700px 400px at 10% 110%, rgba(249, 115, 22, .16), transparent 60%),
        var(--surface);
    border-bottom: 1px solid var(--border);
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(28, 25, 23, .06) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, #000, transparent 75%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 3rem;
    align-items: center;
}

.hero h1 {
    font-size: clamp(1.7rem, 4vw, 2.85rem);
    line-height: 1.45;
    letter-spacing: -.02em;
    margin-bottom: 1rem;
}
.hero h1 span {
    background: linear-gradient(120deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-lead {
    font-size: clamp(.98rem, 1.5vw, 1.12rem);
    color: var(--muted);
    max-width: 52ch;
    margin-bottom: 1.8rem;
}
.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1.4rem;
    margin-top: 1.6rem;
    list-style: none;
    padding: 0;
}
.hero-points li {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-soft);
}
.hero-points .icon { color: var(--success); }

.hero-art {
    position: relative;
    min-height: 320px;
}
.hero-art-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .8rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    font-size: .85rem;
    font-weight: 700;
    animation: floatY 5s ease-in-out infinite;
}
.hero-art-card .art-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
}
.hero-art-card small { display: block; color: var(--muted); font-weight: 500; font-size: .74rem; }
.hero-art-card:nth-child(1) { top: 8%; inset-inline-start: 4%; }
.hero-art-card:nth-child(2) { top: 40%; inset-inline-end: 2%; animation-delay: .9s; }
.hero-art-card:nth-child(3) { bottom: 6%; inset-inline-start: 16%; animation-delay: 1.7s; }

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* =========================================================
   Search Box
   ========================================================= */
.search-box {
    display: grid;
    gap: .8rem;
    padding: 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.search-box--hero {
    grid-template-columns: 1.2fr 1fr auto;
    align-items: end;
    gap: .9rem;
    padding: 1.2rem;
}
.search-box--compact { grid-template-columns: 1fr auto; }
.search-label { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: .4rem; }
.search-submit { height: 48px; padding-inline: 1.6rem; }

/* =========================================================
   Categories
   ========================================================= */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.category-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1.05rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}
.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, .45);
    box-shadow: var(--shadow);
}
.category-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    flex: 0 0 auto;
    transition: var(--transition);
}
.category-card:hover .category-icon { background: var(--primary); color: #fff; }
.category-body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.category-body strong { font-size: .95rem; }
.category-body small { color: var(--muted); font-size: .76rem; }
.category-arrow { color: var(--muted); transition: var(--transition); }
.category-card:hover .category-arrow { color: var(--primary); transform: translateX(-4px); }

/* =========================================================
   Shop Card
   ========================================================= */
.shops-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.shop-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}
.shop-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: rgba(249, 115, 22, .35);
}

.shop-card-media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); }
.shop-card-media img { width: 100%; height: 100%; object-fit: cover; }
.shop-card-media-top {
    position: absolute;
    top: .7rem;
    inset-inline: .7rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}
.shop-card-media .badge { background: rgba(255, 255, 255, .94); box-shadow: var(--shadow-sm); }
.shop-card-media .badge-success { color: #15803d; }
.bookmark-btn { width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .94); }
.bookmark-btn.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.bookmark-btn.is-active .icon { fill: currentColor; }

.shop-card-distance {
    position: absolute;
    bottom: .7rem;
    inset-inline-end: .7rem;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .28rem .6rem;
    border-radius: 999px;
    background: rgba(28, 25, 23, .78);
    color: #fff;
    font-size: .74rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.shop-card-body { display: flex; flex-direction: column; gap: .7rem; padding: 1.1rem 1.15rem 1.2rem; flex: 1 1 auto; }
.shop-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.shop-card-title { font-size: 1.02rem; margin: 0; }
.shop-card-title a:hover { color: var(--primary); }
.shop-card-rating {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .55rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, .12);
    font-size: .8rem;
    flex: 0 0 auto;
}
.shop-card-rating strong { color: #b45309; }
.shop-card-rating span { color: var(--muted); font-size: .72rem; }

.shop-card-address {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--muted);
    font-size: .85rem;
}
.shop-card-address .icon { color: var(--primary); }

.shop-card-footer {
    display: flex;
    gap: .6rem;
    margin-top: auto;
    padding-top: .9rem;
    border-top: 1px dashed var(--border);
}
.shop-card-footer .btn { flex: 1 1 auto; }

/* نمای لیستی (صفحه جستجو) */
.shop-card--list { flex-direction: row; }
.shop-card--list .shop-card-media { width: 230px; flex: 0 0 230px; aspect-ratio: auto; }
.shop-card--list .shop-card-footer { border-top: 0; padding-top: 0; }

/* =========================================================
   Stats
   ========================================================= */
.stats-band {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1.8rem;
    background: linear-gradient(135deg, var(--dark), #2b1c12);
    border-radius: var(--radius-lg);
    color: #fff;
}
.stat-item { text-align: center; padding: .5rem; }
.stat-item .icon { color: var(--secondary); margin-bottom: .4rem; }
.stat-value { display: block; font-size: clamp(1.3rem, 2.5vw, 1.9rem); font-weight: 800; }
.stat-label { font-size: .82rem; color: rgba(255, 255, 255, .65); }

/* =========================================================
   How it works / CTA
   ========================================================= */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.step {
    position: relative;
    padding: 1.6rem 1.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.step-num {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: .9rem;
    border-radius: 13px;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 800;
}
.step h3 { font-size: 1.02rem; margin-bottom: .4rem; }
.step p { color: var(--muted); font-size: .89rem; }

.cta-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.4rem;
    background: linear-gradient(120deg, var(--primary), #9a3412);
    border-radius: var(--radius-lg);
    color: #fff;
    box-shadow: var(--shadow-lg);
}
.cta-band h2 { font-size: clamp(1.25rem, 2.4vw, 1.7rem); margin-bottom: .5rem; }
.cta-band p { color: rgba(255, 255, 255, .8); font-size: .93rem; }
.cta-actions { display: flex; gap: .7rem; flex: 0 0 auto; }

/* =========================================================
   Page header (inner pages)
   ========================================================= */
.page-head {
    padding: 2.4rem 0 1.6rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: .4rem;
    list-style: none;
    margin: 0 0 .7rem;
    padding: 0;
    font-size: .82rem;
    color: var(--muted);
}
.breadcrumb a:hover { color: var(--primary); }
.page-head h1 { font-size: clamp(1.35rem, 3vw, 1.95rem); }
.page-head p { color: var(--muted); font-size: .92rem; margin-top: .35rem; }

/* =========================================================
   Search page
   ========================================================= */
.search-layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 1.6rem;
    align-items: start;
    padding: 2rem 0 4rem;
}

/* جلوگیری از بزرگ‌شدن ستون‌ها بخاطر محتوای Wide (جدول، تب و ...) */
.search-layout > *,
.shop-layout > *,
.dash-grid > *,
.dashboard > * { min-width: 0; }

.filters {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.filters-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border);
}
.filters-head h3 { font-size: .98rem; display: flex; align-items: center; gap: .45rem; }
.filters-toggle { display: none; }
.filters-body { padding: 1.1rem; display: flex; flex-direction: column; gap: 1.05rem; }
.filter-group { display: flex; flex-direction: column; gap: .5rem; }
.filter-group > .label { margin: 0; }
.filter-reset { margin-top: .3rem; }

.results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}
.results-count { font-size: .9rem; color: var(--muted); }
.results-count strong { color: var(--text); }
.sort-select { width: auto; min-width: 175px; padding-block: .55rem; }

.results-list { display: flex; flex-direction: column; gap: 1.2rem; }

/* Map placeholder */
.map-placeholder {
    position: relative;
    height: 340px;
    margin-bottom: 1.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background-color: #fdf0e4;
    background-image:
        linear-gradient(rgba(148, 163, 184, .28) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .28) 1px, transparent 1px);
    background-size: 44px 44px;
}
.map-placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 40%, rgba(249, 115, 22, .12), transparent 45%),
        radial-gradient(circle at 70% 65%, rgba(251, 146, 60, .14), transparent 45%);
}
.map-road {
    position: absolute;
    background: rgba(255, 255, 255, .85);
    box-shadow: 0 0 0 1px rgba(148, 163, 184, .35);
}
.map-pin {
    position: absolute;
    transform: translate(50%, -100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    cursor: pointer;
    z-index: 2;
}
.map-pin-dot {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50% 50% 50% 4px;
    background: var(--primary);
    color: #fff;
    transform: rotate(-45deg);
    box-shadow: 0 8px 16px -6px rgba(249, 115, 22, .9);
    transition: .18s ease;
}
.map-pin-dot .icon { transform: rotate(45deg); }
.map-pin:hover .map-pin-dot,
.map-pin.is-active .map-pin-dot { background: var(--accent); transform: rotate(-45deg) scale(1.12); }
.map-pin-label {
    padding: .18rem .5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    border: 1px solid var(--border);
    font-size: .7rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}
.map-placeholder .map-hint {
    position: absolute;
    bottom: .7rem;
    inset-inline-start: .7rem;
    z-index: 3;
    padding: .35rem .75rem;
    border-radius: 999px;
    background: rgba(28, 25, 23, .8);
    color: #fff;
    font-size: .74rem;
    font-weight: 600;
}

/* =========================================================
   Repair shop profile
   ========================================================= */
.shop-cover {
    position: relative;
    height: 280px;
    background: var(--surface-2);
    overflow: hidden;
}
.shop-cover img { width: 100%; height: 100%; object-fit: cover; }
.shop-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 18, 32, .82), rgba(11, 18, 32, .12) 60%);
}
.shop-cover-inner {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    z-index: 1;
    padding-bottom: 1.5rem;
    color: #fff;
}

.shop-profile-head {
    display: flex;
    align-items: flex-end;
    gap: 1.4rem;
    margin-top: -68px;
    z-index: 2;
    position: relative;
}
.shop-logo {
    width: 128px;
    height: 128px;
    border-radius: 22px;
    border: 5px solid var(--surface);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
    flex: 0 0 auto;
}
.shop-logo img { width: 100%; height: 100%; object-fit: cover; }

.shop-head-info { flex: 1 1 auto; padding-bottom: .4rem; }
.shop-head-info h1 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
.shop-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1.1rem;
    margin-top: .55rem;
    color: var(--muted);
    font-size: .88rem;
}
.shop-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.shop-meta .icon { color: var(--primary); }

.shop-head-actions { display: flex; gap: .6rem; padding-bottom: .6rem; flex: 0 0 auto; }

.shop-layout {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 1.6rem;
    align-items: start;
    padding: 2rem 0 4rem;
}

.tabs {
    display: flex;
    gap: .3rem;
    min-width: 0;
    padding: .35rem;
    margin-bottom: 1.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
    flex: 1 1 auto;
    padding: .65rem 1rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}
.tab-btn:hover { color: var(--text); background: var(--surface-2); }
.tab-btn.is-active { background: var(--primary); color: #fff; }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.info-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .9rem; }
.info-list li { display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; }
.info-list .icon { color: var(--primary); margin-top: .28rem; }
.info-list small { display: block; color: var(--muted); font-size: .78rem; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.gallery-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}
.gallery-grid img:hover { transform: scale(1.03); box-shadow: var(--shadow); }

.review { padding: 1.1rem 0; border-bottom: 1px dashed var(--border); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }
.avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 800;
    flex: 0 0 auto;
}
.review-name { font-weight: 700; font-size: .92rem; }
.review-date { color: var(--muted); font-size: .76rem; }
.review-text { font-size: .9rem; color: var(--text-soft); }

.side-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.3rem;
}
.side-card-head {
    padding: .95rem 1.1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.side-card-body { padding: 1.1rem; display: flex; flex-direction: column; gap: .9rem; }

.mini-map { height: 170px; margin: 0; border: 0; border-radius: var(--radius-sm); }

/* =========================================================
   Forms pages (request / login / register)
   ========================================================= */
.narrow { max-width: 720px; margin-inline: auto; }
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
}
.form-card-head { margin-bottom: 1.6rem; }
.form-card-head h1 { font-size: 1.4rem; }
.form-card-head p { color: var(--muted); font-size: .9rem; margin-top: .4rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 1.6rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--muted);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: .87rem;
}
.upload-box:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.upload-box input { display: none; }

.auth-wrap {
    min-height: calc(100vh - var(--header-h));
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.2rem;
    padding: 3.5rem;
    background: linear-gradient(150deg, var(--primary), #7c2d12 60%, #17120d);
    color: #fff;
    overflow: hidden;
}
.auth-aside::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: 24px 24px;
}
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.auth-aside p { color: rgba(255, 255, 255, .78); font-size: .95rem; }
.auth-points { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.auth-points li { display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.auth-points .icon { color: #fdba74; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.auth-card { width: min(420px, 100%); }
.auth-card h1 { font-size: 1.5rem; margin-bottom: .4rem; }
.auth-card .sub { color: var(--muted); font-size: .9rem; margin-bottom: 1.7rem; }
.auth-alt { text-align: center; margin-top: 1.4rem; font-size: .88rem; color: var(--muted); }
.auth-alt a { color: var(--primary); font-weight: 700; }
.auth-forgot { display: block; text-align: start; margin-top: .4rem; font-size: .82rem; color: var(--primary); font-weight: 600; }

.segment {
    display: flex;
    gap: .3rem;
    padding: .3rem;
    margin-bottom: 1.4rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}
.segment button {
    flex: 1 1 auto;
    padding: .6rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    font-size: .87rem;
    cursor: pointer;
    transition: var(--transition);
}
.segment button.is-active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

/* =========================================================
   Dashboard
   ========================================================= */
.dashboard {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: calc(100vh - var(--header-h));
}

.dash-sidebar {
    background: var(--dark);
    color: #e7e5e4;
    padding: 1.4rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}
.dash-user {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .06);
}
.dash-user .avatar { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; }
.dash-user strong { display: block; color: #fff; font-size: .9rem; }
.dash-user small { font-size: .74rem; color: #a8a29e; }

.dash-menu { list-style: none; display: flex; flex-direction: column; gap: .2rem; }
.dash-menu a {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem .8rem;
    border-radius: 11px;
    font-size: .89rem;
    font-weight: 600;
    color: #e7e5e4;
    transition: var(--transition);
}
.dash-menu a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.dash-menu a.is-active { background: var(--primary); color: #fff; box-shadow: 0 10px 22px -14px rgba(249, 115, 22, 1); }
.dash-menu .menu-count {
    margin-inline-start: auto;
    padding: .05rem .45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    font-size: .7rem;
}
.dash-menu a.is-active .menu-count { background: rgba(255, 255, 255, .25); }
.dash-menu-sep { margin: .7rem 0 .4rem; font-size: .7rem; color: #78716c; text-transform: uppercase; letter-spacing: .08em; }

.dash-upgrade {
    margin-top: auto;
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(245, 158, 11, .22), rgba(245, 158, 11, .06));
    border: 1px solid rgba(245, 158, 11, .32);
}
.dash-upgrade strong { display: block; color: #fbbf24; font-size: .9rem; margin-bottom: .3rem; }
.dash-upgrade p { font-size: .78rem; color: #e7e5e4; margin-bottom: .7rem; line-height: 1.8; }

.dash-main { padding: 1.8rem; background: var(--background); min-width: 0; }
.dash-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.6rem;
    flex-wrap: wrap;
}
.dash-topbar h1 { font-size: 1.35rem; }
.dash-topbar p { color: var(--muted); font-size: .87rem; }
.dash-sidebar-toggle { display: none; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-bottom: 1.6rem; }
.stat-card {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1.15rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.stat-card-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex: 0 0 auto;
}
.stat-card-icon.primary { background: var(--primary-soft); color: var(--primary); }
.stat-card-icon.green  { background: rgba(22, 163, 74, .12); color: var(--success); }
.stat-card-icon.orange { background: rgba(245, 158, 11, .15); color: #d97706; }
.stat-card-icon.purple { background: rgba(124, 58, 237, .12); color: #7c3aed; }
.stat-card strong { display: block; font-size: 1.5rem; line-height: 1.3; }
.stat-card span { font-size: .8rem; color: var(--muted); }
.stat-card .trend { font-size: .72rem; font-weight: 700; color: var(--success); }

.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.3rem; align-items: start; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.table th,
.table td { padding: .8rem .9rem; text-align: start; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { background: var(--surface-2); font-size: .78rem; color: var(--muted); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(249, 115, 22, .04); }
.table .user-cell { display: flex; align-items: center; gap: .55rem; }

.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--secondary)); }

.activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.activity li { display: flex; gap: .7rem; }
.activity-dot {
    width: 10px;
    height: 10px;
    margin-top: .5rem;
    border-radius: 50%;
    background: var(--primary);
    flex: 0 0 auto;
    box-shadow: 0 0 0 4px var(--primary-soft);
}
.activity p { font-size: .85rem; }
.activity small { color: var(--muted); font-size: .74rem; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
    margin-top: auto;
    background: var(--dark);
    color: #e7e5e4;
    padding-top: 3.4rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 2rem;
    padding-bottom: 2.4rem;
}
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 1rem; }
.footer-about p { font-size: .87rem; color: #a8a29e; line-height: 2; margin-top: .9rem; }
.footer-badges { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }
.footer-badges .badge-outline { color: #a8a29e; border-color: rgba(255, 255, 255, .16); }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.footer-links a { font-size: .87rem; color: #a8a29e; transition: var(--transition); }
.footer-links a:hover { color: #fff; padding-inline-start: .3rem; }
.footer-contact { list-style: none; display: flex; flex-direction: column; gap: .7rem; font-size: .87rem; color: #a8a29e; }
.footer-contact li { display: flex; align-items: center; gap: .5rem; }
.footer-contact .icon { color: var(--secondary); }
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: .8rem;
    color: #78716c;
    flex-wrap: wrap;
}
.footer-note { color: var(--secondary); }

/* =========================================================
   Utilities
   ========================================================= */
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
