@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --surface: #f5f7fb;
    --surface-strong: #eef2f8;
    --ink: #132033;
    --muted: #617089;
    --line: rgba(19, 32, 51, 0.1);
    --card: rgba(255, 255, 255, 0.92);
    --shadow: 0 20px 60px rgba(19, 32, 51, 0.12);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fbfcfe 0%, var(--surface) 100%);
}

a {
    text-decoration: none;
}

.brand-font {
    font-family: "Space Grotesk", sans-serif;
}

.marketing-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.marketing-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(19, 32, 51, 0.06);
    backdrop-filter: blur(14px);
    background: rgba(251, 252, 254, 0.82);
}

.marketing-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
}

.nav-links {
    display: flex;
    gap: 18px;
    color: var(--muted);
    font-weight: 700;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 22px;
    padding: 54px 0 24px;
}

.hero-pane,
.glass-card,
.dash-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--card);
    box-shadow: var(--shadow);
}

.hero-pane {
    padding: 38px;
    min-height: 560px;
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.14), transparent 34%),
        radial-gradient(circle at bottom right, rgba(98, 179, 255, 0.18), transparent 30%),
        linear-gradient(135deg, #0f172a 0%, #123b75 48%, #0b6d98 100%);
}

.hero-pane::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(155deg, rgba(8, 17, 32, 0.28), rgba(8, 17, 32, 0.86));
}

.hero-pane::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -140px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 65%);
}

.hero-pane > * {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.88rem;
    font-weight: 700;
}

.hero-title {
    font-size: clamp(2.5rem, 4.4vw, 4.4rem);
    line-height: 0.98;
    margin: 18px 0 0;
}

.hero-text {
    max-width: 640px;
    margin-top: 18px;
    font-size: 1.06rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.84);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 28px;
}

.hero-stat {
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.12);
}

.hero-stat strong {
    display: block;
    font-size: 1.25rem;
}

.panel-stack {
    display: grid;
    gap: 18px;
}

.panel {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
}

.content-page {
    max-width: 920px;
    margin: 0 auto;
}

.page-card {
    padding: 34px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    line-height: 1.9;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin: 28px 0 18px;
    align-items: end;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.feature-card {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
}

.feature-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #fff;
    margin-bottom: 14px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.92), #0b6d98);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    padding: 30px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

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

.sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid var(--line);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sidebar h1 {
    font-size: 1.2rem;
    margin: 0;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.sidebar-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--muted);
    font-weight: 700;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
}

.dashboard-main {
    flex: 1;
    padding: 28px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.dash-grid {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: repeat(4, 1fr);
}

.two-grid {
    grid-template-columns: repeat(2, 1fr);
}

.dash-card {
    padding: 22px;
    border-radius: var(--radius-lg);
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    margin-top: 8px;
}

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

.form-inline-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
}

.grid-span-12 { grid-column: span 12; }
.grid-span-8 { grid-column: span 8; }
.grid-span-6 { grid-column: span 6; }
.grid-span-4 { grid-column: span 4; }
.grid-span-3 { grid-column: span 3; }
.grid-span-2 { grid-column: span 2; }

.media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.media-card {
    padding: 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: #fff;
}

.media-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    object-fit: cover;
    background: var(--surface-strong);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    margin-top: 36px;
}

.site-footer-inner {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0;
}

.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-weight: 700;
}

.footer-links a {
    color: var(--muted);
}

.locale-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.locale-switcher a {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.locale-switcher a.active {
    background: rgba(var(--primary-rgb), 0.14);
    border-color: rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
}

.settings-note {
    color: var(--muted);
    font-size: 0.88rem;
    margin-top: 8px;
}

.player-root,
.player-root body {
    background: #000;
}

.player-frame {
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
    position: relative;
}

.player-display {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-display img,
.player-display video {
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
}

.player-message {
    color: #fff;
    font-size: 2rem;
    text-align: center;
    padding: 2rem;
    line-height: 1.6;
}

.pairing-box {
    color: #fff;
    text-align: center;
    padding: 24px;
}

.pairing-code {
    font-size: clamp(4rem, 10vw, 8rem);
    letter-spacing: 0.14em;
    color: #2ed573;
    font-weight: 800;
    margin-top: 20px;
}

@media (max-width: 1100px) {
    .hero-grid,
    .feature-grid,
    .stats-grid,
    .two-grid,
    .media-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .form-inline-grid {
        grid-template-columns: 1fr;
    }

    .grid-span-12,
    .grid-span-8,
    .grid-span-6,
    .grid-span-4,
    .grid-span-3,
    .grid-span-2 {
        grid-column: span 1;
    }

    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

body[dir="rtl"] .sidebar {
    border-right: 0;
    border-left: 1px solid var(--line);
}

body[dir="rtl"] .sidebar-nav a {
    text-align: right;
}

.support-thread {
    display: grid;
    gap: 14px;
}

.support-message {
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
}

.support-message-seller {
    background: rgba(var(--primary-rgb), 0.08);
    border-color: rgba(var(--primary-rgb), 0.18);
}

.support-message-customer {
    background: rgba(19, 32, 51, 0.04);
}

.support-message-system {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.18);
}

.support-message-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.88rem;
}
