/* Botawan — premium product UI */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap");

:root {
    --bg: #070b14;
    --bg-deep: #04070f;
    --surface: rgba(14, 20, 34, 0.88);
    --surface-solid: #101826;
    --surface-elevated: rgba(18, 26, 42, 0.96);
    --text: #f2f5fb;
    --muted: #8b98b3;
    --border: rgba(148, 163, 184, 0.12);
    --border-strong: rgba(148, 163, 184, 0.22);
    --primary: #3b82f6;
    --primary-hover: #6aa4ff;
    --primary-soft: rgba(59, 130, 246, 0.14);
    --danger: #fb7185;
    --danger-soft: rgba(251, 113, 133, 0.12);
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.12);
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 10px 30px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 0 0 1px rgba(255, 255, 255, 0.05) inset, 0 22px 50px rgba(0, 0, 0, 0.4);
    --topbar-bg: rgba(7, 11, 20, 0.72);
    --table-hover: rgba(59, 130, 246, 0.07);
    --code-bg: rgba(59, 130, 246, 0.16);
    --code-color: #93c5fd;
    --badge-muted-bg: rgba(148, 163, 184, 0.12);
    --sidebar-bg: #050910;
    --sidebar-text: #f2f5fb;
    --sidebar-muted: #8491ab;
    --input-bg: rgba(6, 10, 18, 0.9);
    --radius: 18px;
    --radius-sm: 12px;
    --sidebar-width: 268px;
    --font: "Plus Jakarta Sans", "DM Sans", "Trebuchet MS", sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.28);
    --dur: 0.2s;
}

* { box-sizing: border-box; }

html {
    background-color: var(--bg-deep);
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    min-height: 100dvh;
}

::selection {
    background: rgba(59, 130, 246, 0.35);
    color: #fff;
}

:focus-visible {
    outline: 2px solid rgba(125, 211, 252, 0.75);
    outline-offset: 2px;
}

body {
    font-family: var(--font);
    color: var(--text);
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(900px 520px at 8% -10%, rgba(56, 189, 248, 0.16), transparent 55%),
        radial-gradient(820px 480px at 100% 0%, rgba(37, 99, 235, 0.18), transparent 50%),
        linear-gradient(180deg, #08101c 0%, var(--bg-deep) 48%, #04070f 100%);
    background-attachment: fixed;
    line-height: 1.55;
    font-size: 15px;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.035), transparent 28%),
        radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.08), transparent 32%);
}

.app-shell,
.auth-wrap,
.landing-body {
    position: relative;
    z-index: 1;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

a:hover { color: var(--primary-hover); }

h1, h2, h3 {
    margin: 0 0 0.35rem;
    line-height: 1.2;
    letter-spacing: -0.04em;
    font-weight: 700;
}

h1 { font-size: clamp(1.55rem, 2vw, 1.85rem); }
h2 { font-size: 1.05rem; font-weight: 650; letter-spacing: -0.025em; }

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

/* Thin elegant scrollbars */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
}

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
*::-webkit-scrollbar-track { background: transparent; }

.help-text {
    margin: 0.35rem 0 0;
    font-size: 0.84rem;
}

/* -------- Auth -------- */
.auth-body { min-height: 100vh; }

.auth-wrap {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-showcase {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 4vw, 3.5rem);
    color: #f8fafc;
    background:
        radial-gradient(640px 420px at 18% 88%, rgba(59, 130, 246, 0.32), transparent 58%),
        radial-gradient(520px 340px at 92% 8%, rgba(14, 165, 233, 0.16), transparent 52%),
        linear-gradient(165deg, #04070f 0%, #0a1426 55%, #07101c 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    animation: authRise 0.7s var(--ease-out) both;
}

.auth-showcase-glow {
    position: absolute;
    inset: auto -10% 10% auto;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18), transparent 68%);
    pointer-events: none;
    filter: blur(8px);
}

.auth-showcase-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: auto;
    color: #fff;
    position: relative;
    z-index: 1;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.85rem !important;
    padding: 0.35rem 0.7rem;
    width: fit-content;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #93c5fd !important;
    font-size: 0.78rem !important;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.auth-showcase h2 {
    font-size: clamp(2rem, 3.4vw, 2.85rem);
    font-weight: 800;
    max-width: 12ch;
    color: #fff;
    margin-bottom: 0.85rem;
    letter-spacing: -0.05em;
    line-height: 1.08;
    position: relative;
    z-index: 1;
}

.auth-showcase p,
.auth-lead {
    max-width: 36ch;
    color: rgba(248, 250, 252, 0.68);
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.55;
    position: relative;
    z-index: 1;
}

.auth-points {
    list-style: none;
    margin: 1.35rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
    position: relative;
    z-index: 1;
}

.auth-points li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: rgba(226, 232, 240, 0.88);
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-points .ico {
    color: #6ee7b7;
    width: 15px;
    height: 15px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    margin: auto;
    padding: 2.1rem 1.6rem;
    animation: authRise 0.7s var(--ease-out) 0.08s both;
}

.auth-card .btn-primary {
    min-height: 2.75rem;
    border-radius: 12px;
}

@keyframes authRise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-brand { display: none; }

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 1.15rem;
    color: var(--muted);
    font-weight: 650;
    font-size: 0.9rem;
    text-decoration: none;
}

.auth-back:hover {
    color: var(--primary);
}

.auth-showcase-brand {
    color: #fff;
    text-decoration: none;
}

.auth-showcase-brand:hover {
    color: #fff;
}

.auth-heading { margin-bottom: 0.25rem; }

.auth-sub { margin: 0 0 1.35rem; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 1.05rem 0 1.15rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(148, 163, 184, 0.18);
}

.btn-facebook {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    background: #1877f2;
    border: 1px solid #1877f2;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(24, 119, 242, 0.28);
}

.btn-facebook:hover {
    background: #166fe5;
    border-color: #166fe5;
    color: #fff;
    text-decoration: none;
}

.btn-facebook .ico {
    width: 16px;
    height: 16px;
}

.auth-footer-text {
    margin: 1.35rem 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
}

/* -------- App shell -------- */
.app-shell {
    display: flex;
    align-items: flex-start;
    min-height: 100dvh;
    width: 100%;
}

.app-body {
    min-height: 100dvh;
    overflow-x: clip;
    color-scheme: dark;
}

.sidebar {
    width: var(--sidebar-width);
    background:
        linear-gradient(180deg, rgba(59, 130, 246, 0.1), transparent 24%),
        rgba(5, 9, 16, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 1.2rem 0.9rem;
    position: sticky;
    top: 0;
    height: 100dvh;
    max-height: 100dvh;
    align-self: flex-start;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 0.2rem 0.55rem;
}

.sidebar-brand a {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 1.05rem;
    letter-spacing: -0.03em;
}

.brand-text small {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--sidebar-muted);
    letter-spacing: 0.01em;
    margin-top: 0.12rem;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #60a5fa, #2563eb);
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
    font-size: 0.72rem;
    font-weight: 750;
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: block;
    flex-shrink: 0;
    box-shadow:
        0 0 0 1px rgba(103, 232, 249, 0.18),
        0 10px 24px rgba(37, 99, 235, 0.42);
    object-fit: cover;
}

.locale-ku,
.locale-ar,
html[dir="rtl"] body.app-body,
html[dir="rtl"] body.auth-body {
    font-family: "Speda", "Noto Sans Arabic", var(--font), Tahoma, sans-serif;
}

.locale-ku .nav-link,
.locale-ar .nav-link,
.locale-ku .btn,
.locale-ar .btn,
.locale-ku h1,
.locale-ar h1,
.locale-ku h2,
.locale-ar h2,
.locale-ku .upgrade-title,
.locale-ar .upgrade-title {
    font-family: "Speda", "Noto Sans Arabic", var(--font), Tahoma, sans-serif;
}

.lang-switch-dropdown {
    position: relative;
    display: inline-flex;
    z-index: 40;
}

.lang-switch-top { margin-inline-end: 0.35rem; }

.lang-switch-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.2rem;
    padding: 0.28rem 0.55rem 0.28rem 0.4rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    cursor: pointer;
    font: inherit;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.lang-switch-trigger:hover {
    border-color: rgba(148, 163, 184, 0.32);
    background: rgba(30, 41, 59, 0.85);
}

.lang-switch-dropdown.is-open .lang-switch-trigger {
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.lang-switch-ico {
    display: grid;
    place-items: center;
    color: #7dd3fc;
}

.lang-flag {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    flex-shrink: 0;
    display: block;
    overflow: hidden;
}

.lang-switch-trigger .lang-code {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    font-family: "Plus Jakarta Sans", "DM Sans", system-ui, sans-serif;
    color: #f8fafc;
}

.lang-switch-trigger .lang-name {
    font-size: 0.8rem;
    font-weight: 650;
    color: #cbd5e1;
}

.lang-chevron {
    display: grid;
    place-items: center;
    color: #94a3b8;
    margin-inline-start: 0.05rem;
    transition: transform 0.18s ease, color 0.18s ease;
}

.lang-switch-dropdown.is-open .lang-chevron {
    transform: rotate(180deg);
    color: #93c5fd;
}

.lang-switch-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    inset-inline-end: 0;
    min-width: 13.5rem;
    padding: 0.45rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background:
        linear-gradient(180deg, rgba(30, 41, 59, 0.55), transparent 40%),
        rgba(8, 12, 22, 0.97);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 22px 48px rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: langMenuIn 0.18s ease both;
}

@keyframes langMenuIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.lang-switch-menu[hidden] { display: none !important; }

.lang-switch-menu-label {
    margin: 0;
    padding: 0.35rem 0.7rem 0.45rem;
    font-size: 0.65rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.72);
}

.lang-switch-option {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.62rem 0.7rem;
    border-radius: 12px;
    color: #cbd5e1;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lang-switch-option .lang-flag {
    width: 1.55rem;
    height: 1.55rem;
}

.lang-option-copy {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    min-width: 0;
    flex: 1;
    line-height: 1.2;
}

.lang-switch-option .lang-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.015em;
}

.lang-switch-option .lang-code {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #94a3b8;
    font-family: "Plus Jakarta Sans", "DM Sans", system-ui, sans-serif;
}

.lang-option-check {
    display: grid;
    place-items: center;
    color: #67e8f9;
    flex-shrink: 0;
}

.lang-option-check .ico {
    width: 14px;
    height: 14px;
}

.lang-switch-option:hover {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.08);
    color: #fff;
    text-decoration: none;
}

.lang-switch-option.is-active {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.22);
    color: #fff;
}

.lang-switch-option.is-active .lang-code {
    color: #93c5fd;
}

.lang-switch-top .lang-name { display: none; }

.billing-plans-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-badge {
    display: inline-flex;
    margin-bottom: 0.7rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.2);
    color: #bfdbfe;
    font-size: 0.72rem;
    font-weight: 700;
}

.price-badge-soft {
    background: rgba(148, 163, 184, 0.16);
    color: #cbd5e1;
}

@media (max-width: 980px) {
    .billing-plans-3 { grid-template-columns: 1fr; }
}

html[dir="rtl"] .sidebar-nav .nav-link,
html[dir="rtl"] .top-user,
html[dir="rtl"] .panel-head {
    text-align: right;
}

.brand-logo-sm {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.brand-logo-lg {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.auth-brand a {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.sidebar-close {
    display: none;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.nav-group + .nav-group {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-group-label {
    display: block;
    padding: 0 0.85rem 0.45rem;
    color: rgba(148, 163, 184, 0.55);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--sidebar-muted);
    text-decoration: none;
    padding: 0.68rem 0.85rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: -0.015em;
    transition:
        background 0.2s var(--ease),
        color 0.2s var(--ease),
        box-shadow 0.2s var(--ease),
        transform 0.2s var(--ease-out);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.055);
    color: #fff;
    text-decoration: none;
    transform: translateX(2px);
}

.nav-link:focus-visible {
    outline: 2px solid rgba(125, 211, 252, 0.65);
    outline-offset: 2px;
}

.nav-link.active {
    background: linear-gradient(135deg, #4f8ff7 0%, #2563eb 100%);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 10px 22px rgba(37, 99, 235, 0.32);
}

.nav-link .ico { opacity: 0.72; width: 17px; height: 17px; }
.nav-link.active .ico { opacity: 1; }

.nav-divider {
    height: 1px;
    margin: 0.55rem 0.55rem;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav .nav-link {
    font-size: 0.88rem;
    padding: 0.62rem 0.85rem;
}

.ico {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.9;
}

.ico-sm {
    width: 14px;
    height: 14px;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 0.55rem;
}

.user-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.8rem;
}

.user-chip-name {
    display: block;
    font-weight: 650;
    color: #fff;
    font-size: 0.92rem;
}

.user-chip-email {
    display: block;
    font-size: 0.78rem;
    color: var(--sidebar-muted);
    word-break: break-all;
    margin-top: 0.15rem;
}

.main-wrap {
    flex: 1;
    min-width: 0;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.35rem;
    border-bottom: 1px solid var(--border);
    background: var(--topbar-bg);
    backdrop-filter: blur(18px) saturate(1.25);
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topbar-title {
    font-weight: 650;
    letter-spacing: -0.02em;
    flex: 1;
    font-size: 0.95rem;
}

.menu-toggle {
    display: none;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    place-items: center;
    padding: 0;
}

.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
    display: block;
    width: 16px;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    position: relative;
    transition: transform 0.2s var(--ease);
}

.menu-toggle-bars::before,
.menu-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.menu-toggle-bars::before { top: -5px; }
.menu-toggle-bars::after { top: 5px; }

.main-content {
    flex: 1 0 auto;
    padding: 1.1rem 1.25rem 1.25rem;
    width: 100%;
    max-width: none;
    animation: contentRise 0.45s var(--ease-out) both;
}

@keyframes contentRise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-content-wide {
    max-width: none;
}

.sidebar-backdrop {
    display: none;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(15, 23, 42, 0.55);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.upgrade-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
    background:
        radial-gradient(90px 60px at 100% 0%, rgba(96, 165, 250, 0.2), transparent 70%),
        linear-gradient(165deg, rgba(37, 99, 235, 0.2), rgba(8, 13, 24, 0.7));
    border: 1px solid rgba(59, 130, 246, 0.26);
    border-radius: 14px;
    padding: 0.55rem 0.65rem;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease-out);
}

.upgrade-card:hover {
    color: inherit;
    text-decoration: none;
    border-color: rgba(96, 165, 250, 0.42);
    transform: translateY(-1px);
}

.upgrade-ico {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: rgba(59, 130, 246, 0.22);
    color: #93c5fd;
    flex-shrink: 0;
    margin: 0;
    box-shadow: none;
}

.upgrade-ico .ico {
    width: 14px;
    height: 14px;
}

.upgrade-copy {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    min-width: 0;
    line-height: 1.2;
}

.upgrade-title {
    font-weight: 750;
    color: #fff;
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: -0.02em;
}

.upgrade-card small {
    color: #93c5fd;
    font-size: 0.68rem;
    font-weight: 650;
}

.upgrade-card-compact p,
.upgrade-card-compact .btn-sm {
    display: none;
}

.admin-badge-card {
    display: block;
    padding: 0.65rem 0.75rem;
}

.admin-badge-card .upgrade-title {
    margin-bottom: 0.2rem;
    font-size: 0.8rem;
}

.admin-badge-card p {
    display: block;
    margin: 0;
    color: var(--sidebar-muted);
    font-size: 0.72rem;
    line-height: 1.35;
    word-break: break-all;
}

.top-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.58rem 1rem;
    max-width: 480px;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}

.top-search:focus-within {
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(8, 13, 24, 0.7);
    box-shadow: var(--focus-ring);
}

.top-search-svg {
    width: 16px;
    height: 16px;
    color: var(--muted);
}

.top-search input {
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    width: 100%;
    outline: none;
}

.top-search input::placeholder { color: var(--muted); }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    position: relative;
    text-decoration: none;
    transition:
        color var(--dur) var(--ease),
        border-color var(--dur) var(--ease),
        background var(--dur) var(--ease),
        transform var(--dur) var(--ease-out);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.top-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.25rem 0.55rem 0.25rem 0.25rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.top-user:hover {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(145deg, #60a5fa, #2563eb);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 750;
    font-size: 0.78rem;
    letter-spacing: -0.02em;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.22);
}

.avatar-photo {
    object-fit: cover;
    padding: 0;
    background: #0f172a;
    display: block;
}

.top-user-meta {
    display: none;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.top-user-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.02em;
}

.top-user-role {
    font-size: 0.68rem;
    color: var(--muted);
    font-weight: 550;
}

@media (min-width: 700px) {
    .top-user-meta { display: flex; }
}

a.icon-btn:hover,
.icon-btn:hover {
    color: var(--text);
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.dash-welcome,
.dash-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 1.15rem 1.25rem;
    border-radius: 20px;
    border: 1px solid rgba(96, 165, 250, 0.18);
    background:
        radial-gradient(640px 220px at 100% -10%, rgba(56, 189, 248, 0.18), transparent 55%),
        radial-gradient(420px 180px at 0% 100%, rgba(37, 99, 235, 0.16), transparent 60%),
        rgba(12, 18, 32, 0.78);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    animation: contentRise 0.55s var(--ease-out) both;
}

.dash-hero::after {
    content: "";
    position: absolute;
    inset: auto -20% -60% auto;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 68%);
    pointer-events: none;
}

.dash-hero.is-live {
    border-color: rgba(52, 211, 153, 0.22);
}

.dash-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.55rem;
    color: #93c5fd;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dash-hero.is-live .dash-eyebrow { color: #6ee7b7; }

.dash-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.18);
    animation: pulseDot 1.8s ease-in-out infinite;
}

.dash-hero.is-live .dash-status-dot {
    box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.18);
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.85); opacity: 0.65; }
}

.dash-welcome h1,
.dash-hero h1 {
    font-size: clamp(1.55rem, 2.4vw, 1.95rem);
    margin: 0 0 0.35rem;
    letter-spacing: -0.045em;
}

.dash-welcome .muted,
.dash-hero .muted {
    margin: 0;
    max-width: 52ch;
    font-size: 0.95rem;
}

.dash-hero .muted strong {
    color: #e2e8f0;
    font-weight: 700;
}

.dash-welcome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    position: relative;
    z-index: 1;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.metric-card {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.95rem 1rem 1rem;
    background: rgba(14, 20, 34, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    text-decoration: none;
    color: var(--text);
    min-height: 0;
    transition:
        border-color var(--dur) var(--ease),
        transform 0.28s var(--ease-out),
        background var(--dur) var(--ease),
        box-shadow var(--dur) var(--ease);
    animation: metricIn 0.5s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 0.06s);
}

@keyframes metricIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.metric-card:hover {
    border-color: rgba(96, 165, 250, 0.4);
    color: var(--text);
    transform: translateY(-4px);
    background: rgba(18, 26, 42, 0.96);
    box-shadow: var(--shadow-lg);
}

.metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.metric-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.22);
}

.metric-chip.muted-chip {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.16);
}

.metric-chip.success-chip {
    background: rgba(52, 211, 153, 0.12);
    color: #6ee7b7;
    border-color: rgba(52, 211, 153, 0.22);
}

.metric-chip.warn-chip {
    background: rgba(251, 113, 133, 0.12);
    color: #fda4af;
    border-color: rgba(251, 113, 133, 0.22);
}

.metric-ico {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 750;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.metric-ico-blue { background: rgba(59, 130, 246, 0.16); color: #60a5fa; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.07); }
.metric-ico-green { background: rgba(52, 211, 153, 0.14); color: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.07); }
.metric-ico-purple { background: rgba(56, 189, 248, 0.14); color: #7dd3fc; box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.07); }
.metric-ico-red { background: rgba(251, 113, 133, 0.14); color: #fb7185; box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.07); }
.metric-ico .ico { width: 18px; height: 18px; }

.metric-value {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.metric-label {
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 700;
    margin-top: 0.35rem;
    letter-spacing: -0.02em;
}

.metric-hint {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 500;
    margin-top: 0.15rem;
}

.dash-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.85fr);
    gap: 1.1rem;
    align-items: start;
    width: 100%;
}

.dash-main,
.dash-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.dash-panel {
    height: auto;
}

.chart-panel {
    min-height: 0;
}

.dash-panel .panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.panel-sub {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
}

.panel-link {
    color: #93c5fd;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(147, 197, 253, 0.18);
    background: rgba(59, 130, 246, 0.08);
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.panel-link:hover {
    color: #fff;
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(147, 197, 253, 0.35);
}

.plan-panel .plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.plan-price {
    margin: 0 0 0.85rem !important;
    font-size: 0.86rem !important;
}

.chart-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 1rem;
    align-items: stretch;
}

.chart-svg-box {
    min-width: 0;
}

.activity-chart {
    width: 100%;
    height: auto;
    display: block;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
}

.legend-item {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
}

.legend-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.legend-ok { background: rgba(52, 211, 153, 0.14); color: #34d399; }
.legend-bad { background: rgba(248, 113, 113, 0.14); color: #f87171; }
.legend-info { background: rgba(59, 130, 246, 0.16); color: #60a5fa; }

.legend-item strong {
    display: block;
    font-size: 0.84rem;
}

.legend-item span {
    color: var(--muted);
    font-size: 0.75rem;
}

.legend-item em {
    font-style: normal;
    font-weight: 700;
}

.delta-up { color: #34d399; }
.delta-down { color: #f87171; }

.plan-checks {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.plan-checks li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 0.45rem;
}

.plan-checks .ico { color: #34d399; }

.quick-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    font-weight: 650;
    font-size: 0.88rem;
    letter-spacing: -0.015em;
    transition:
        border-color var(--dur) var(--ease),
        background var(--dur) var(--ease),
        transform var(--dur) var(--ease-out);
    font-weight: 650;
    font-size: 0.88rem;
}

.quick-link:hover {
    border-color: rgba(59, 130, 246, 0.4);
    color: var(--text);
    background: rgba(59, 130, 246, 0.08);
    transform: translateX(3px);
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.app-footer nav {
    display: flex;
    gap: 0.9rem;
}

.app-footer a { color: var(--muted); }
.app-footer a:hover { color: var(--primary); }

.empty-state-sm {
    padding: 2rem 1rem;
}

.empty-illu {
    width: 72px;
    height: 72px;
    margin: 0 auto 0.85rem;
    border-radius: 18px;
    background:
        radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.35), transparent 50%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(59, 130, 246, 0.12));
    border: 1px solid var(--border);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.4rem;
    background: #60a5fa;
    flex-shrink: 0;
}

.activity-dot-success { background: #34d399; }
.activity-dot-error { background: #f87171; }
.activity-dot-received,
.activity-dot-info { background: #60a5fa; }
.activity-dot-pending { background: #fb923c; }

.activity-item strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 650;
}

.activity-item small {
    color: var(--muted);
    font-size: 0.75rem;
}

.platform-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.platform-pill {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--muted);
}

.platform-pill-fb { color: #60a5fa; }
.platform-pill-ig { color: #c084fc; }

.more-menu {
    position: relative;
    display: inline-block;
}

.more-menu > summary {
    list-style: none;
}

.more-menu > summary::-webkit-details-marker { display: none; }

.more-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    display: grid;
    place-items: center;
    cursor: pointer;
}

.more-btn:hover {
    color: var(--text);
    border-color: rgba(59, 130, 246, 0.4);
}

.more-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 128px;
    background: #121a2b;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 0.35rem;
    z-index: 8;
}

.more-panel a,
.more-panel button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    font-size: 0.84rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
}

.more-panel a:hover,
.more-panel button:hover {
    background: rgba(59, 130, 246, 0.12);
    color: var(--text);
}

.plan-name {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin: 0.55rem 0 0.2rem;
}

.plan-list {
    margin: 0 0 1rem;
    padding-left: 1.1rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.plan-list li { margin-bottom: 0.35rem; }

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.btn-with-brands {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

.btn-brands {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}

.btn-brand {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
}

.btn-brand .ico {
    width: 12px;
    height: 12px;
}

.btn-brand-fb { background: #1877f2; }
.btn-brand-ig {
    background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af);
}

.side-empty {
    margin: 0.25rem 0 0;
    font-size: 0.88rem;
}

/* Content */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.page-header .muted {
    margin: 0.3rem 0 0;
    max-width: 52ch;
    font-size: 0.92rem;
}

.card {
    background: rgba(14, 20, 34, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 1.05rem 1.1rem;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease-out);
}

.card:hover {
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow-lg);
}

.card-narrow { max-width: 620px; }

.empty-state {
    text-align: center;
    padding: 2.75rem 1rem;
}

.empty-state p {
    color: var(--muted);
    margin: 0.5rem auto 1.2rem;
    max-width: 34ch;
}

/* Forms */
.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.55rem;
    font-weight: 650 !important;
    cursor: pointer;
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.78rem 0.95rem;
    font: inherit;
    color: var(--text);
    background: var(--input-bg);
    color-scheme: dark;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: var(--border-strong);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.7);
    box-shadow: var(--focus-ring);
    background: rgba(8, 13, 24, 0.95);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.15rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.68rem 1.15rem;
    font: inherit;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: -0.015em;
    cursor: pointer;
    text-decoration: none;
    transition:
        background var(--dur) var(--ease),
        border-color var(--dur) var(--ease),
        color var(--dur) var(--ease),
        box-shadow var(--dur) var(--ease),
        transform 0.22s var(--ease-out);
}

.btn:hover { text-decoration: none; }

.btn:active:not(:disabled) {
    transform: translateY(1px) scale(0.985);
}

.btn-primary {
    background: linear-gradient(180deg, #6aa4ff, #2563eb);
    color: #fff;
    border-color: transparent;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        0 10px 22px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #84b5ff, #3b82f6);
    color: #fff;
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 14px 28px rgba(37, 99, 235, 0.38);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0) scale(0.985);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.035);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-strong);
    color: #fff;
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border-color: transparent;
}

.btn-ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
    background: linear-gradient(180deg, #fb8a8a, #ef4444);
    color: #fff;
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.22);
}

.btn-danger:hover {
    filter: brightness(1.06);
    color: #fff;
    transform: translateY(-1px);
}

.btn-block { width: 100%; }

.btn-sm {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 10px;
}

.btn:focus-visible {
    outline: 2px solid rgba(125, 211, 252, 0.75);
    outline-offset: 2px;
}

button.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}

/* Alerts */
.alert {
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    font-size: 0.92rem;
    animation: contentRise 0.35s var(--ease-out) both;
}

.alert-success {
    background: var(--success-soft);
    border-color: transparent;
    color: var(--success);
}

.alert-error {
    background: var(--danger-soft);
    border-color: transparent;
    color: var(--danger);
}

.error-list {
    margin: 0;
    padding-left: 1.1rem;
}

.callout-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(14, 165, 233, 0.06));
    border: 1px solid rgba(59, 130, 246, 0.22);
    color: var(--text);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.15rem;
    font-size: 0.92rem;
}

.callout-info a { font-weight: 650; }

/* Table */
.table-wrap { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.85rem 0.6rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.data-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    font-weight: 650;
}

.data-table tbody tr {
    transition: background var(--dur) var(--ease);
}

.data-table tbody tr:hover {
    background: var(--table-hover);
}

.reply-cell {
    max-width: 240px;
    word-break: break-word;
    color: var(--muted);
}

code {
    background: var(--code-bg);
    color: var(--code-color);
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-size: 0.84em;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 650;
}

.badge-success {
    background: var(--success-soft);
    color: var(--success);
}

.badge-muted {
    background: var(--badge-muted-bg);
    color: var(--muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.15rem;
}

.stat-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%), var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.05rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.stat-label {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.inline-form {
    display: inline;
    margin: 0;
}

.feature-list {
    margin: 0.65rem 0 0.85rem;
    padding-left: 1.15rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.feature-list li { margin-bottom: 0.35rem; }

.page-choice {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 0.95rem;
    margin-bottom: 0.65rem;
    cursor: pointer;
    background: var(--surface-solid);
}

.page-choice:hover {
    border-color: var(--primary);
}

.page-choice input { margin-top: 0.2rem; }
.page-choice .help-text { display: block; }

/* Responsive */
@media (max-width: 960px) {
    .auth-wrap { grid-template-columns: 1fr; }

    .auth-showcase {
        min-height: 180px;
        padding: 1.35rem 1.15rem;
        justify-content: center;
        border-right: 0;
    }

    .auth-brand {
        display: block;
        margin-bottom: 1rem;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        z-index: 6;
        touch-action: manipulation;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        height: 100%;
        height: 100dvh;
        z-index: 40;
        width: min(var(--sidebar-width), 86vw);
        transform: translateX(-105%);
        transition: transform 0.22s var(--ease);
        box-shadow: 16px 0 40px rgba(0, 0, 0, 0.35);
        -webkit-overflow-scrolling: touch;
    }

    .sidebar.open { transform: translateX(0); }
    .sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        touch-action: manipulation;
    }

    /* Never force-show while [hidden] — that blocked all phone taps. */
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 35;
        background: rgba(2, 6, 23, 0.58);
    }

    body.menu-open .sidebar-backdrop,
    .sidebar-backdrop:not([hidden]) {
        display: block;
    }

    body.menu-open { overflow: hidden; touch-action: none; }
    .stats-grid { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: stretch; }
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .dash-layout { grid-template-columns: 1fr; }
    .chart-wrap { grid-template-columns: 1fr; }
    .top-search { max-width: none; flex: 1; min-width: 0; }
    .topbar { padding: 0.7rem 0.85rem; gap: 0.55rem; }
    .top-user-name { display: none; }
    .app-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.55rem;
        padding: 1rem 1rem 1.35rem;
    }
}

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

    .top-search { display: none; }

    .btn, .nav-link, .icon-btn, .menu-toggle {
        touch-action: manipulation;
    }

    .insights-hero,
    .insights-grid,
    .history-layout,
    .history-split,
    .admin-grid,
    .admin-grid-user {
        grid-template-columns: 1fr;
    }

    .history-date,
    .history-select {
        width: 100%;
        min-width: 0;
    }

    .history-date-field,
    .history-select {
        width: 100%;
    }

    .history-date-field input,
    .history-select select {
        width: 100%;
        min-width: 0;
    }

    .billing-plans {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .main-content { padding: 0.95rem 0.9rem 1.5rem; }

    .data-table thead { display: none; }

    .data-table tr {
        display: block;
        border: 1px solid var(--border);
        border-radius: 10px;
        margin-bottom: 0.75rem;
        padding: 0.25rem 0.55rem;
        background: var(--surface-solid);
    }

    .data-table td {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .data-table td:last-child { border-bottom: 0; }

    .data-table td::before {
        content: attr(data-label);
        font-weight: 650;
        color: var(--muted);
        flex-shrink: 0;
    }

    .reply-cell { max-width: none; }

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

/* Billing plans (match landing) */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.faq-item {
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(8, 13, 24, 0.35);
    padding: 0.15rem 1rem;
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 0.95rem 0;
    font-weight: 650;
    color: var(--text);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    float: right;
    color: var(--muted);
    font-weight: 700;
}

.faq-item[open] summary::after { content: "–"; }

.faq-item p {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.55;
}

.billing-plans {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
    width: 100%;
    max-width: none;
    align-items: stretch;
}

.billing-plans .price-card {
    position: relative;
    padding: 1.65rem 1.45rem 1.45rem;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    width: 100%;
}

.billing-plans .price-card-free {
    background: rgba(18, 26, 43, 0.92);
    border: 1px solid rgba(96, 165, 250, 0.35);
    box-shadow: var(--shadow);
}

.billing-plans .price-card-business {
    background: linear-gradient(160deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 22px 50px rgba(37, 99, 235, 0.35);
    color: #fff;
}

.billing-plans .price-amount-row {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
    color: #fff;
}

.billing-plans .price-amount-row strong {
    font-size: clamp(2rem, 3.5vw, 2.55rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.billing-plans .price-amount-row span {
    font-size: 1.05rem;
    font-weight: 650;
    opacity: 0.85;
}

.billing-plans .price-card h3 {
    margin: 0 0 0.45rem;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 750;
}

.billing-plans .price-desc {
    margin: 0 0 1rem;
    color: rgba(232, 238, 248, 0.72);
    font-size: 0.92rem;
    line-height: 1.45;
}

.billing-plans .price-card-business .price-desc {
    color: rgba(255, 255, 255, 0.88);
}

.billing-plans .price-features {
    list-style: none;
    margin: 0 0 1.35rem;
    padding: 0;
    flex: 1;
}

.billing-plans .price-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.42rem 0;
    color: rgba(232, 238, 248, 0.92);
    font-size: 0.92rem;
    font-weight: 550;
    line-height: 1.4;
}

.billing-plans .price-card-business .price-features li {
    color: rgba(255, 255, 255, 0.95);
}

.billing-plans .price-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.12rem;
    background: #2563eb;
    position: relative;
}

.billing-plans .price-card-business .price-check {
    background: rgba(255, 255, 255, 0.95);
}

.billing-plans .price-check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 3px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.billing-plans .price-card-business .price-check::after {
    border-color: #2563eb;
}

.billing-plans .btn-plan {
    display: block;
    width: 100%;
    text-align: center;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: default;
}

.billing-plans .btn-plan-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(147, 197, 253, 0.55);
}

.billing-plans .btn-plan-solid {
    background: #fff;
    color: #1d4ed8;
    border: 1px solid #fff;
}

.billing-plans .btn-plan:disabled {
    opacity: 0.95;
}

@media (max-width: 800px) {
    .billing-plans {
        grid-template-columns: 1fr;
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* -------- Insights -------- */
.insights-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
    gap: 1.1rem;
    margin-bottom: 1.15rem;
    align-items: stretch;
}

.insights-hero-copy {
    padding: 1.15rem 1.2rem;
    border-radius: 18px;
    border: 1px solid rgba(96, 165, 250, 0.18);
    background:
        radial-gradient(680px 200px at 90% -10%, rgba(56, 189, 248, 0.16), transparent 55%),
        rgba(12, 18, 32, 0.82);
    box-shadow: var(--shadow);
    animation: contentRise 0.45s var(--ease-out) both;
}

.insights-hero-copy h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.55rem, 2.3vw, 1.95rem);
    letter-spacing: -0.045em;
}

.insights-hero-copy .muted {
    margin: 0 0 1rem;
    max-width: 52ch;
}

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

.insights-score {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.2rem;
}

.insights-ring {
    position: relative;
    width: 108px;
    height: 108px;
    flex-shrink: 0;
}

.insights-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.insights-ring-track {
    fill: none;
    stroke: rgba(148, 163, 184, 0.16);
    stroke-width: 8;
}

.insights-ring-value {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s var(--ease);
}

.insights-ring-label {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
    line-height: 1.15;
}

.insights-ring-label strong {
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.insights-ring-label span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 650;
}

.insights-score-meta {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 1;
}

.insights-score-meta span {
    display: block;
    font-size: 0.72rem;
    font-weight: 650;
}

.insights-score-meta strong {
    font-size: 0.98rem;
}

.text-danger { color: #f87171; }

.insights-metrics { margin-bottom: 1.15rem; }

.metric-card-static {
    cursor: default;
}

.metric-card-static:hover {
    transform: none;
}

.insights-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.85fr);
    gap: 1.1rem;
    margin-bottom: 1.15rem;
    align-items: start;
}

.insights-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.insights-sub {
    margin: 0.2rem 0 0;
    font-size: 0.84rem;
}

.insights-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.14);
    color: #93c5fd;
    font-size: 0.75rem;
    font-weight: 700;
}

.insights-gridline {
    stroke: rgba(148, 163, 184, 0.1);
    stroke-width: 1;
}

.insights-health {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.insights-health-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.insights-health-row div {
    flex: 1;
    min-width: 0;
}

.insights-health-row strong {
    display: block;
    font-size: 0.9rem;
}

.insights-health-row small {
    color: var(--muted);
    font-size: 0.75rem;
}

.insights-health-ico {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(59, 130, 246, 0.14);
    color: #93c5fd;
    flex-shrink: 0;
}

.insights-bars {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.insights-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
    font-size: 0.84rem;
}

.insights-bar-label span { color: var(--muted); font-weight: 600; }

.insights-bar-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    overflow: hidden;
}

.insights-bar-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.insights-bar-dm span {
    background: linear-gradient(90deg, #8b5cf6, #c084fc);
}

.insights-feed { margin-bottom: 0.5rem; }

.insights-empty {
    text-align: center;
    padding: 2.25rem 1rem 1.75rem;
}

.insights-empty-ico {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.85rem;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(59, 130, 246, 0.14);
    color: #60a5fa;
}

.insights-empty h3 { margin: 0 0 0.35rem; }
.insights-empty .muted { margin: 0 auto 1rem; max-width: 42ch; }
.insights-empty .dash-welcome-actions { justify-content: center; }

.insights-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 0.35rem;
}

.insights-timeline-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0.2rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.insights-timeline-item:last-child { border-bottom: 0; }

.insights-timeline-body { flex: 1; min-width: 0; }

.insights-timeline-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.insights-timeline-top strong {
    font-size: 0.9rem;
    line-height: 1.35;
}

.insights-timeline-body small {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.75rem;
}

.insights-chip {
    flex-shrink: 0;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
}

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

.section-kicker {
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7dd3fc;
}

/* -------- Insights date range tabs -------- */
.insights-range {
    margin: 0 0 1.1rem;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.insights-range-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem;
    padding: 0.28rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.insights-range-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease;
}

.insights-range-tab:hover {
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.08);
}

.insights-range-tab.is-active {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.14);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.insights-range-hint {
    margin: 0.65rem 0 0;
    font-size: 0.8rem;
}

.insights-custom {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    margin-bottom: 1.1rem;
}

.insights-custom label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 650;
    color: var(--muted);
}

.insights-custom input[type="date"] {
    min-width: 10.5rem;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.85);
    color: var(--text);
    font: inherit;
}

@media (max-width: 720px) {
    .insights-range-tabs {
        width: 100%;
        border-radius: 16px;
    }

    .insights-range-tab {
        flex: 1 1 auto;
        padding: 0.5rem 0.7rem;
        font-size: 0.82rem;
    }
}

/* -------- Comment history + mini dashboard -------- */
.history-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin: 1rem 0 0.75rem;
    padding: 0.95rem 1.05rem;
    border-radius: 16px;
    border: 1px solid rgba(96, 165, 250, 0.14);
    background:
        radial-gradient(420px 140px at 100% 0%, rgba(59, 130, 246, 0.12), transparent 55%),
        rgba(12, 18, 32, 0.78);
    box-shadow: var(--shadow);
}

.history-hero h1 {
    margin: 0 0 0.2rem;
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    letter-spacing: -0.04em;
}

.history-hero .muted {
    margin: 0;
    max-width: 56ch;
    font-size: 0.9rem;
}

.history-range {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0.85rem;
}

.history-filters,
.history-filters-modern {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 0.9rem;
    padding: 0.75rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(14, 20, 34, 0.72);
}

.history-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.history-search {
    position: relative;
    flex: 1 1 240px;
    min-width: 200px;
}

.history-search-ico {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    display: grid;
    place-items: center;
    pointer-events: none;
}

.history-search-ico .ico { width: 16px; height: 16px; }

.history-search input {
    width: 100%;
    padding: 0.7rem 0.9rem 0.7rem 2.45rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(8, 13, 24, 0.7);
    color: var(--text);
    font: inherit;
}

.history-search input:focus,
.history-date-field:focus-within,
.history-date-range:focus-within,
.history-select:focus-within {
    outline: none;
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.history-date {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 650;
}

.history-date-range {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.7rem;
    padding: 0.35rem 0.7rem 0.35rem 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(8, 13, 24, 0.7);
    flex: 0 1 auto;
}

.history-date-range-ico {
    display: grid;
    place-items: center;
    color: #93c5fd;
    flex-shrink: 0;
}

.history-date-range-ico .ico {
    width: 15px;
    height: 15px;
}

.history-date-modern {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.08rem;
    min-width: 0;
    margin: 0;
    font-size: 0.65rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8aa0bc;
}

.history-date-modern input[type="date"] {
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 650;
    letter-spacing: -0.015em;
    text-transform: none;
    min-width: 8.6rem;
    padding: 0;
    color-scheme: dark;
}

.history-date-modern input[type="date"]:focus {
    outline: none;
}

.history-date-sep {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.history-date-field {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.85);
    color: var(--muted);
}

.history-date-field .ico { width: 15px; height: 15px; }

.history-date-field input {
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    min-width: 9.5rem;
}

.history-date-field input:focus { outline: none; }

.history-apply-btn {
    margin-left: auto;
}

.history-select {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 10.5rem;
    padding: 0.55rem 2rem 0.55rem 0.8rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.85);
}

.history-select-ico {
    color: var(--muted);
    display: grid;
    place-items: center;
}

.history-select-ico .ico { width: 15px; height: 15px; }

.history-select select {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    color-scheme: dark;
}

.history-select select:focus { outline: none; }

.history-select select option,
.history-select select optgroup,
.form-group select option {
    background-color: #0f172a;
    color: #e8eef8;
}

.history-select-chevron {
    position: absolute;
    right: 0.55rem;
    width: 14px !important;
    height: 14px !important;
    color: var(--muted);
    pointer-events: none;
}

.history-select-muted {
    opacity: 0.55;
}

.history-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 1.1rem;
    align-items: start;
}

.history-main {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    min-width: 0;
}

.history-split {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
    gap: 1rem;
}

.history-empty-line {
    margin: 1.25rem 0 0.35rem;
}

.coverage-card h2 {
    margin: 0.15rem 0 0.45rem;
    font-size: 1.05rem;
}

.coverage-stat {
    margin: 0.35rem 0 0.15rem;
    font-size: clamp(2.4rem, 4vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: #f87171;
}

.coverage-stat:not(.is-alert) {
    color: #94a3b8;
}

.coverage-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.coverage-meta span {
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.1);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.history-dash {
    padding: 1.1rem 1rem;
    position: sticky;
    top: 1rem;
}

.history-dash > h2 {
    margin: 0 0 0.85rem;
    font-size: 1.15rem;
}

.mini-dash-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.mini-dash-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.8rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.55);
}

.mini-dash-row > span {
    font-weight: 700;
    font-size: 0.95rem;
}

.mini-dash-ring {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.mini-dash-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.mini-dash-track {
    fill: none;
    stroke: rgba(45, 212, 191, 0.18);
    stroke-width: 3.5;
}

.mini-dash-value {
    fill: none;
    stroke: #2dd4bf;
    stroke-width: 3.5;
    stroke-linecap: round;
}

.mini-dash-ring strong {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.mini-dash-extras {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-top: 0.95rem;
}

.mini-dash-extras span {
    display: block;
    font-size: 0.7rem;
    font-weight: 650;
}

.mini-dash-extras strong {
    font-size: 0.92rem;
}

@media (max-width: 1100px) {
    .history-layout {
        grid-template-columns: 1fr;
    }

    .history-dash {
        position: static;
    }
}

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

/* -------- Admin console -------- */
.admin-body .admin-sidebar {
    padding: 1rem 0.75rem 0.85rem;
    background:
        linear-gradient(180deg, rgba(45, 212, 191, 0.07), transparent 22%),
        linear-gradient(165deg, #070c14 0%, #050910 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.1);
}

.admin-sidebar-brand {
    margin-bottom: 1.15rem;
    padding: 0.15rem 0.25rem;
}

.admin-sidebar-brand a {
    gap: 0.7rem;
    padding: 0.45rem 0.5rem;
    border-radius: 14px;
}

.admin-sidebar-brand .brand-logo {
    box-shadow:
        0 0 0 1px rgba(45, 212, 191, 0.22),
        0 8px 20px rgba(15, 23, 42, 0.45);
}

.admin-sidebar-brand .brand-text small {
    color: #5eead4;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.62rem;
    font-weight: 700;
}

.admin-sidebar-nav {
    gap: 0;
    padding-inline-end: 0.1rem;
}

.admin-sidebar-nav .nav-group {
    gap: 0.2rem;
}

.admin-sidebar-nav .nav-group + .nav-group {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.admin-sidebar-nav .nav-group-label {
    padding: 0 0.7rem 0.5rem;
    color: rgba(148, 163, 184, 0.62);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
}

.admin-sidebar .nav-link {
    position: relative;
    gap: 0.7rem;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    border: 1px solid transparent;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    transform: none;
}

.admin-sidebar .nav-link:hover {
    color: #f1f5f9;
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.08);
    transform: none;
}

.admin-sidebar .nav-link.active {
    color: #ecfdf5;
    background: rgba(45, 212, 191, 0.12);
    border-color: rgba(45, 212, 191, 0.22);
    box-shadow: none;
}

.admin-sidebar .nav-link.active::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    width: 3px;
    height: 1.15rem;
    border-radius: 999px;
    background: #2dd4bf;
    transform: translateY(-50%);
}

.admin-sidebar .nav-ico {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 9px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: rgba(148, 163, 184, 0.08);
    color: #94a3b8;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.admin-sidebar .nav-link:hover .nav-ico {
    background: rgba(148, 163, 184, 0.14);
    color: #e2e8f0;
}

.admin-sidebar .nav-link.active .nav-ico {
    background: rgba(45, 212, 191, 0.18);
    color: #5eead4;
}

.admin-sidebar .nav-ico .ico {
    width: 15px;
    height: 15px;
    opacity: 1;
}

.admin-sidebar .nav-label {
    min-width: 0;
    line-height: 1.25;
}

.admin-sidebar .nav-link-exit {
    color: #a5b4c8;
}

.admin-sidebar .nav-link-exit:hover {
    color: #fff;
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.16);
}

.admin-sidebar .nav-link-exit:hover .nav-ico {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
}

.admin-sidebar-footer {
    padding-top: 0.75rem;
}

.admin-user-chip {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background:
        linear-gradient(145deg, rgba(45, 212, 191, 0.08), transparent 55%),
        rgba(15, 23, 42, 0.55);
}

.admin-user-avatar {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 11px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.02em;
    color: #ecfdf5;
    background: linear-gradient(145deg, rgba(45, 212, 191, 0.35), rgba(15, 118, 110, 0.55));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.admin-user-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    flex: 1;
}

.admin-user-meta strong {
    font-size: 0.82rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-meta small {
    font-size: 0.68rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-role {
    flex-shrink: 0;
    align-self: flex-start;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #99f6e4;
    background: rgba(45, 212, 191, 0.12);
    border: 1px solid rgba(45, 212, 191, 0.2);
}

.nav-section-label {
    margin: 0.35rem 0.85rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5eead4;
}

.admin-badge-card {
    background:
        radial-gradient(420px 120px at 100% 0%, rgba(45, 212, 191, 0.18), transparent 60%),
        rgba(17, 25, 40, 0.85);
}

html[dir="rtl"] .admin-sidebar .nav-link:hover {
    transform: none;
}

.admin-shell .admin-topbar {
    min-height: 4.15rem;
    padding: 0.7rem 1.25rem;
    gap: 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(8, 12, 22, 0.88));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 10px 28px rgba(2, 6, 23, 0.18);
}

.admin-top-title {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.18rem;
    min-width: 0;
    margin-inline-end: auto;
    margin-inline-start: 0.15rem;
}

.admin-top-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(45, 212, 191, 0.22);
    background: rgba(45, 212, 191, 0.1);
    color: #99f6e4;
    font-size: 0.62rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.2;
}

.admin-top-page {
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(52vw, 28rem);
}

.admin-topbar-right {
    gap: 0.65rem;
}

.admin-top-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-block: 0.28rem;
    padding-inline: 0.28rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.55);
    transition: border-color 0.18s ease, background 0.18s ease;
}

.admin-top-user:hover {
    border-color: rgba(45, 212, 191, 0.28);
    background: rgba(45, 212, 191, 0.06);
}

.admin-top-avatar {
    width: 2.05rem;
    height: 2.05rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.02em;
    color: #ecfdf5;
    background: linear-gradient(145deg, rgba(45, 212, 191, 0.4), rgba(15, 118, 110, 0.65));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.admin-top-avatar-photo {
    object-fit: cover;
    padding: 0;
    background: #0f172a;
    display: block;
}

.admin-top-user-meta {
    display: none;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.admin-top-user-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: #f8fafc;
    max-width: 9.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.02em;
}

.admin-top-user-role {
    font-size: 0.66rem;
    font-weight: 650;
    color: #5eead4;
}

@media (min-width: 700px) {
    .admin-top-user-meta { display: flex; }
}

@media (max-width: 700px) {
    .admin-top-page {
        max-width: 42vw;
        font-size: 0.95rem;
    }

    .admin-top-user {
        padding: 0.22rem;
    }

    .admin-shell .admin-topbar {
        min-height: 3.7rem;
        padding: 0.6rem 0.85rem;
    }
}

.admin-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
    padding: 1.25rem 1.35rem;
    border-radius: 18px;
    border: 1px solid rgba(45, 212, 191, 0.22);
    background:
        radial-gradient(700px 180px at 100% 0%, rgba(45, 212, 191, 0.18), transparent 55%),
        rgba(17, 25, 40, 0.72);
    box-shadow: var(--shadow);
}

.admin-hero h1 { margin: 0 0 0.3rem; font-size: clamp(1.4rem, 2vw, 1.75rem); }
.admin-hero .muted { margin: 0; max-width: 52ch; }

.admin-settings-layout {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.admin-settings-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.4rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(17, 25, 40, 0.72);
    box-shadow: var(--shadow);
    width: fit-content;
    max-width: 100%;
}

.admin-settings-menu-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-settings-menu-link:hover {
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.1);
}

.admin-settings-menu-link.is-active {
    color: #fff;
    background: rgba(59, 130, 246, 0.22);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.admin-settings-menu-link .ico {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.admin-settings-panel {
    min-width: 0;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
    align-items: start;
}

.admin-grid-user {
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.85fr);
}

.admin-user-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    margin-bottom: 1rem;
}

/* -------- Admin users list / detail -------- */
.admin-users-shell {
    padding: 0;
    overflow: hidden;
}

.admin-users-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.95rem 1.05rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(15, 23, 42, 0.35);
}

.admin-users-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    flex: 1;
    min-width: min(100%, 18rem);
}

.admin-users-search-field {
    position: relative;
    flex: 1;
    min-width: 12rem;
}

.admin-users-search-ico {
    position: absolute;
    inset-inline-start: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.admin-users-search-field input {
    width: 100%;
    min-height: 2.45rem;
    padding: 0.55rem 0.9rem 0.55rem 2.35rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(8, 13, 24, 0.55);
    color: #e2e8f0;
}

.admin-users-search-field input:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.45);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.admin-users-count {
    margin: 0;
    font-size: 0.78rem;
    white-space: nowrap;
}

.admin-users-list {
    display: flex;
    flex-direction: column;
}

.admin-user-row {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.4fr) auto;
    gap: 0.85rem 1rem;
    align-items: center;
    padding: 0.95rem 1.05rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    transition: background 0.15s ease;
}

.admin-user-row:last-child {
    border-bottom: 0;
}

.admin-user-row:hover {
    background: rgba(148, 163, 184, 0.05);
}

.admin-user-row-main {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.admin-user-row-avatar,
.admin-user-hero-avatar {
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.02em;
    color: #e0f2fe;
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.28), rgba(37, 99, 235, 0.42));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.admin-user-row-copy {
    min-width: 0;
}

.admin-user-row-title,
.admin-user-hero-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.admin-user-row-title strong,
.admin-user-hero-title h1 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-row-id {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    font-family: "Plus Jakarta Sans", "DM Sans", system-ui, sans-serif;
}

.admin-user-row-email,
.admin-user-hero-email {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-row-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.admin-user-row-joined {
    font-size: 0.72rem;
    color: #64748b;
    white-space: nowrap;
}

.admin-user-row-action {
    justify-self: end;
}

.admin-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(148, 163, 184, 0.08);
    color: #cbd5e1;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.admin-pill-dot {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: currentColor;
}

.admin-pill-ok {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.22);
}

.admin-pill-warn {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.22);
}

.admin-pill-admin {
    color: #99f6e4;
    background: rgba(45, 212, 191, 0.12);
    border-color: rgba(45, 212, 191, 0.22);
}

.admin-pill-plan {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.2);
}

.admin-pill-muted {
    color: #94a3b8;
}

.admin-users-empty {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    padding: 3rem 1.25rem;
    text-align: center;
}

.admin-users-empty-ico {
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    display: grid;
    place-items: center;
    margin-bottom: 0.35rem;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.12);
}

.admin-users-empty strong {
    color: #f8fafc;
}

.admin-user-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
    padding: 1.15rem 1.2rem;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background:
        linear-gradient(135deg, rgba(56, 189, 248, 0.08), transparent 42%),
        rgba(15, 23, 42, 0.55);
    box-shadow: var(--shadow);
}

.admin-user-hero-main {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    min-width: 0;
}

.admin-user-hero-avatar {
    width: 3.35rem;
    height: 3.35rem;
    border-radius: 16px;
    font-size: 0.92rem;
}

.admin-user-hero-copy {
    min-width: 0;
}

.admin-user-hero-title h1 {
    font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.admin-user-hero-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.admin-user-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.admin-user-panel-head h2 {
    margin: 0;
    font-size: 1rem;
}

.admin-user-panel-head .panel-sub {
    margin: 0.2rem 0 0;
}

.admin-user-panel-ico {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.16);
}

.admin-user-panel-ico.is-danger {
    color: #fda4af;
    background: rgba(244, 63, 94, 0.12);
    border-color: rgba(244, 63, 94, 0.2);
}

.admin-user-meta-empty,
.admin-user-meta-card {
    margin-top: 0.85rem;
}

.admin-user-meta-card {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.45);
}

.admin-user-meta-card strong {
    color: #f8fafc;
}

.danger-zone {
    border-color: rgba(244, 63, 94, 0.22);
    background:
        linear-gradient(180deg, rgba(244, 63, 94, 0.08), transparent 55%),
        rgba(17, 25, 40, 0.72);
}

.danger-zone h2 { color: #fda4af; }

@media (max-width: 980px) {
    .admin-user-row {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .admin-user-row-action {
        justify-self: start;
    }
}

/* -------- Admin activity -------- */
.admin-activity-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.admin-activity-shell {
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(17, 25, 40, 0.72);
    box-shadow: var(--shadow);
}

.admin-activity-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    padding: 0.95rem 1.05rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.admin-activity-search {
    position: relative;
    flex: 1 1 16rem;
    min-width: 0;
}

.admin-activity-search-ico {
    position: absolute;
    inset-inline-start: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.admin-activity-search input {
    width: 100%;
    min-height: 2.45rem;
    padding: 0.55rem 0.9rem 0.55rem 2.35rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(8, 13, 24, 0.55);
    color: #e2e8f0;
}

.admin-activity-search input:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.45);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.admin-activity-count {
    color: #94a3b8;
    font-size: 0.78rem;
    white-space: nowrap;
}

.admin-activity-empty {
    padding: 2.5rem 1.25rem;
    text-align: center;
}

.admin-activity-empty strong {
    display: block;
    color: #f8fafc;
    margin-bottom: 0.35rem;
}

.admin-activity-empty p {
    margin: 0;
    color: #94a3b8;
}

.admin-activity-table {
    width: 100%;
}

.admin-activity-head,
.admin-activity-item {
    display: grid;
    grid-template-columns: 7.5rem 6.5rem minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 1.05rem;
}

.admin-activity-head {
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-activity-item {
    border-bottom: 1px solid rgba(148, 163, 184, 0.07);
}

.admin-activity-item:last-child {
    border-bottom: 0;
}

.admin-activity-item:hover {
    background: rgba(148, 163, 184, 0.04);
}

.admin-activity-cell {
    min-width: 0;
    font-size: 0.86rem;
    color: #cbd5e1;
}

.admin-activity-cell.is-when {
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 650;
}

.admin-activity-cell.is-message {
    color: #f1f5f9;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.admin-activity-cell.is-event code {
    display: inline-block;
    max-width: 100%;
    padding: 0.18rem 0.45rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(8, 13, 24, 0.55);
    color: #94a3b8;
    font-size: 0.7rem;
    overflow-wrap: anywhere;
}

.admin-activity-cell.is-user a {
    color: #93c5fd;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.admin-activity-cell.is-user a:hover {
    color: #bfdbfe;
    text-decoration: underline;
}

.admin-activity-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.68rem;
    font-weight: 750;
    text-transform: lowercase;
}

.admin-activity-badge.is-success {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.22);
}

.admin-activity-badge.is-error {
    color: #fda4af;
    background: rgba(244, 63, 94, 0.12);
    border-color: rgba(244, 63, 94, 0.22);
}

.admin-activity-badge.is-warn {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.22);
}

.admin-activity-badge.is-info {
    color: #7dd3fc;
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(14, 165, 233, 0.2);
}

@media (max-width: 980px) {
    .admin-activity-head {
        display: none;
    }

    .admin-activity-item {
        grid-template-columns: 1fr;
        gap: 0.45rem;
        padding: 1rem 1.05rem;
    }

    .admin-activity-cell::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.2rem;
        color: #64748b;
        font-size: 0.65rem;
        font-weight: 750;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }
}

.admin-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

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

.admin-check {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 0.9rem;
    margin-bottom: 0.75rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.45);
    cursor: pointer;
}

.admin-check input { margin-top: 0.2rem; }
.admin-check strong { display: block; }
.admin-check small { display: block; margin-top: 0.2rem; }

.admin-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.admin-plan-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.4);
}

.admin-plan-card.is-featured {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.admin-plan-card-head {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.85rem;
}

.admin-plan-card-head strong {
    font-size: 1.05rem;
}

.admin-plan-toggles {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.admin-plan-toggles .admin-check {
    margin-bottom: 0;
}

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

.admin-status-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 0.85rem;
}

.admin-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.admin-status-row:last-child { border-bottom: 0; }

.admin-status-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-status-label .ico,
.page-header h1 .ico,
.ao-health-list .ico,
.feature-list .ico {
    color: #66b2ff;
}

.auth-showcase p {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
}

.auth-showcase p .ico {
    margin-top: 0.2rem;
    color: #66b2ff;
}

@media (max-width: 960px) {
    .admin-grid,
    .admin-grid-user,
    .form-row-2 {
        grid-template-columns: 1fr;
    }
}

.billing-hero {
    margin-bottom: 1.15rem;
}

.billing-hero h1 {
    margin: 0 0 0.3rem;
    font-size: clamp(1.4rem, 2vw, 1.75rem);
}

.billing-hero .muted {
    margin: 0;
    max-width: 48ch;
}

/* -------- Admin API & Secrets -------- */
.admin-api-header {
    margin-bottom: 0.85rem;
    align-items: center;
}

.admin-api-header .muted {
    margin: 0.2rem 0 0;
    max-width: 52ch;
}

.admin-api-shell {
    width: 100%;
    max-width: none;
    padding: 0.15rem 1.15rem 1.05rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(17, 25, 40, 0.72);
    box-shadow: var(--shadow);
}

.admin-api-block {
    padding: 0.95rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.admin-api-block:last-of-type {
    border-bottom: 0;
}

.admin-api-block h2 {
    margin: 0 0 0.55rem;
    font-size: 0.92rem;
}

.admin-api-hint {
    margin: -0.15rem 0 0.75rem;
    color: #94a3b8;
    font-size: 0.8rem;
    line-height: 1.35;
}

.admin-api-block .admin-check {
    margin-bottom: 0;
}

.admin-api-block .form-group {
    margin-bottom: 0.75rem;
}

.admin-api-block .form-group:last-child {
    margin-bottom: 0;
}

.admin-api-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.9rem;
    padding-top: 0.85rem;
}

.admin-api-actions .muted {
    margin: 0;
    font-size: 0.78rem;
}

.secret-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.secret-label-row label { margin: 0; }

.secret-label-row .btn-sm {
    padding: 0.28rem 0.65rem;
    font-size: 0.75rem;
}

/* -------- Admin overview (advanced) -------- */
.ao-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
    gap: 1.1rem;
    margin-bottom: 1.15rem;
    align-items: stretch;
}

.ao-hero-copy {
    padding: 1.35rem 1.4rem;
    border-radius: 20px;
    border: 1px solid rgba(45, 212, 191, 0.22);
    background:
        radial-gradient(720px 220px at 100% -10%, rgba(45, 212, 191, 0.2), transparent 55%),
        radial-gradient(520px 180px at 0% 100%, rgba(59, 130, 246, 0.14), transparent 50%),
        rgba(17, 25, 40, 0.78);
    box-shadow: var(--shadow);
}

.ao-hero-copy h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.5rem, 2.4vw, 1.95rem);
}

.ao-hero-copy .muted {
    margin: 0 0 0.9rem;
    max-width: 54ch;
}

.ao-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.ao-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    font-size: 0.72rem;
    font-weight: 700;
}

.ao-pill.is-live {
    background: rgba(45, 212, 191, 0.14);
    color: #5eead4;
}

.ao-pill.is-off,
.ao-pill.is-warn {
    background: rgba(248, 113, 113, 0.14);
    color: #fca5a5;
}

.ao-health {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.2rem;
}

.ao-health-ring {
    position: relative;
    width: 104px;
    height: 104px;
    flex-shrink: 0;
}

.ao-health-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ao-ring-track {
    fill: none;
    stroke: rgba(148, 163, 184, 0.16);
    stroke-width: 8;
}

.ao-ring-value {
    fill: none;
    stroke: #2dd4bf;
    stroke-width: 8;
    stroke-linecap: round;
}

.ao-ring-label {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
    line-height: 1.1;
}

.ao-ring-label strong {
    font-size: 1.4rem;
    letter-spacing: -0.03em;
}

.ao-ring-label span {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
}

.ao-health-copy {
    flex: 1;
    min-width: 0;
}

.ao-health-copy h2 {
    margin: 0 0 0.55rem;
    font-size: 1.05rem;
}

.ao-health-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.ao-health-list li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.84rem;
}

.ao-health-list span { color: var(--muted); font-weight: 600; }
.ao-health-list .ok { color: #5eead4; }
.ao-health-list .bad { color: #f87171; }

.ao-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.05rem;
}

.ao-kpi {
    padding: 1.05rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(17, 25, 40, 0.82);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ao-kpi-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
}

.ao-kpi-ico {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: grid;
    place-items: center;
}

.ao-kpi-blue { background: rgba(59, 130, 246, 0.16); color: #93c5fd; }
.ao-kpi-teal { background: rgba(45, 212, 191, 0.16); color: #5eead4; }
.ao-kpi-purple { background: rgba(139, 92, 246, 0.16); color: #c4b5fd; }
.ao-kpi-rose { background: rgba(244, 63, 94, 0.14); color: #fda4af; }

.ao-kpi-delta {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
}

.ao-kpi-value {
    font-size: 1.85rem;
    letter-spacing: -0.04em;
    line-height: 1;
}

.ao-kpi-label {
    font-weight: 700;
    font-size: 0.92rem;
    margin-top: 0.2rem;
}

.ao-kpi-hint {
    color: var(--muted);
    font-size: 0.78rem;
}

.ao-actions {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.7rem;
    margin-bottom: 1.15rem;
}

.ao-action {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.72);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.ao-action:hover {
    border-color: rgba(45, 212, 191, 0.35);
    background: rgba(45, 212, 191, 0.08);
    text-decoration: none;
    transform: translateY(-1px);
}

.ao-action strong {
    display: block;
    font-size: 0.88rem;
}

.ao-action small {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    margin-top: 0.1rem;
}

.ao-action-ico {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(59, 130, 246, 0.14);
    color: #93c5fd;
    flex-shrink: 0;
}

.ao-main {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 1.1rem;
    align-items: start;
}

.ao-mix {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ao-user-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.ao-user-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.55rem;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    border: 1px solid transparent;
}

.ao-user-row:hover {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.12);
    text-decoration: none;
}

.ao-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(45, 212, 191, 0.25));
    color: #fff;
    font-weight: 750;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.ao-user-meta {
    flex: 1;
    min-width: 0;
}

.ao-user-meta strong {
    display: block;
    font-size: 0.9rem;
}

.ao-user-meta small {
    color: var(--muted);
    font-size: 0.75rem;
    word-break: break-all;
}

.ao-user-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: flex-end;
}

.ao-empty {
    text-align: center;
    padding: 2rem 1rem 1.5rem;
}

.ao-empty-ico {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(45, 212, 191, 0.12);
    color: #5eead4;
}

.ao-empty h3 { margin: 0 0 0.3rem; }
.ao-empty .muted { margin: 0 auto; max-width: 42ch; }

@media (max-width: 1100px) {
    .ao-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ao-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    .ao-hero,
    .ao-main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ao-actions,
    .ao-kpis {
        grid-template-columns: 1fr;
    }

    .ao-user-tags { display: none; }
}

/* -------- Facebook posts manager -------- */
.fb-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 1.1rem 1.15rem;
    border-radius: 18px;
    border: 1px solid rgba(96, 165, 250, 0.16);
    background:
        radial-gradient(520px 180px at 100% 0%, rgba(59, 130, 246, 0.16), transparent 55%),
        rgba(12, 18, 32, 0.78);
    box-shadow: var(--shadow);
    animation: contentRise 0.45s var(--ease-out) both;
}

.fb-hero h1 {
    margin: 0 0 0.3rem;
    font-size: clamp(1.5rem, 2.2vw, 1.9rem);
    letter-spacing: -0.045em;
}

.fb-hero .muted { margin: 0; max-width: 52ch; }

.fb-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    padding: 0.95rem 1.05rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(14, 20, 34, 0.86);
    box-shadow: var(--shadow);
}

.fb-remaining {
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
}

.fb-remaining small {
    font-weight: 600;
    margin-left: 0.35rem;
}

.fb-search {
    flex: 1 1 220px;
    min-width: 180px;
    margin: 0;
}

.fb-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    align-items: center;
}

.fb-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 650;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

.fb-switch input {
    width: 2.4rem;
    height: 1.25rem;
    appearance: none;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.25);
    position: relative;
    cursor: pointer;
    transition: background 0.18s ease;
}

.fb-switch input::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.18s ease;
}

.fb-switch input:checked {
    background: #3b82f6;
}

.fb-switch input:checked::after {
    transform: translateX(1.1rem);
}

.fb-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.fb-post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.fb-post-card {
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(14, 20, 34, 0.92);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.28s var(--ease-out), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.fb-post-card:hover {
    transform: translateY(-3px);
    border-color: rgba(96, 165, 250, 0.35);
    box-shadow: var(--shadow-lg);
}

.fb-post-card.is-off {
    opacity: 0.7;
}

.fb-post-media {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background:
        radial-gradient(500px 200px at 70% 20%, rgba(59, 130, 246, 0.28), transparent 55%),
        #0b1220;
    background-size: cover;
    background-position: center;
}

.fb-post-banner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 0;
}

.fb-post-platform {
    position: absolute;
    top: 0.7rem;
    left: 0.7rem;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #1877f2;
    color: #fff;
    z-index: 2;
}

.fb-post-platform .ico { width: 16px; height: 16px; }

.fb-post-view {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    z-index: 2;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
}

.fb-post-view:hover { color: #fff; text-decoration: none; filter: brightness(1.08); }

.fb-post-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(2, 6, 23, 0.28);
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 1;
}

.fb-post-card:hover .fb-post-overlay { opacity: 1; }

.fb-post-orb {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e2e8f0;
    text-decoration: none;
}

.fb-post-orb:hover {
    background: rgba(37, 99, 235, 0.85);
    color: #fff;
}

.fb-post-badge {
    position: absolute;
    bottom: 0.7rem;
    left: 0.7rem;
    z-index: 2;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
    color: #93c5fd;
    font-size: 0.7rem;
    font-weight: 700;
}

.fb-post-foot {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
}

.fb-post-title {
    flex: 1;
    min-width: 0;
}

.fb-post-title strong {
    display: block;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fb-post-title small {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fb-toggle {
    position: relative;
    width: 2.55rem;
    height: 1.35rem;
    display: inline-block;
    cursor: pointer;
    flex-shrink: 0;
}

.fb-toggle input {
    appearance: none;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
    margin: 0;
    cursor: pointer;
    transition: background 0.18s ease;
}

.fb-toggle input::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.18s ease;
}

.fb-toggle input:checked { background: #3b82f6; }
.fb-toggle input:checked::after { transform: translateX(1.15rem); }

@media (max-width: 1100px) {
    .fb-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .fb-post-grid { grid-template-columns: 1fr; }
    .fb-post-overlay { opacity: 1; background: rgba(2, 6, 23, 0.18); }
    .fb-toolbar { padding: 0.75rem; }
}

/* -------- Facebook post setup -------- */
.fb-post-media {
    display: block;
    text-decoration: none;
    color: inherit;
}

.fb-post-title {
    text-decoration: none;
    color: inherit;
}

.fb-post-title:hover strong { color: #93c5fd; }

.ps-wrap {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 5.5rem;
}

.ps-tabs {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.ps-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.75);
    color: #cbd5e1;
    font-weight: 700;
    text-decoration: none;
}

.ps-tab.is-active {
    background: #1877f2;
    border-color: #1877f2;
    color: #fff;
}

.ps-select-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(17, 25, 40, 0.8);
    font-weight: 600;
}

.ps-check {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid #3b82f6;
    background: rgba(59, 130, 246, 0.25);
}

.ps-preview-card {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(17, 25, 40, 0.88);
}

.ps-preview-media {
    position: relative;
    min-height: 280px;
    overflow: hidden;
    background:
        radial-gradient(700px 260px at 70% 20%, rgba(59, 130, 246, 0.28), transparent 55%),
        #0b1220;
    background-size: cover;
    background-position: center;
}

.ps-preview-banner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 0;
}

.ps-preview-toggle {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}

.ps-preview-fb {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #1877f2;
    color: #fff;
    z-index: 2;
}

.ps-preview-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.9rem 1rem;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.88));
    color: #e2e8f0;
    font-weight: 650;
    font-size: 0.9rem;
}

.ps-card {
    padding: 1.1rem 1.15rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(17, 25, 40, 0.88);
}

.ps-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.ps-card-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.ps-card-title h2 {
    margin: 0;
    font-size: 1.1rem;
}

.ps-switch-line {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
}

.ps-toggle-ui {
    width: 2.5rem;
    height: 1.3rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    transition: background 0.18s ease;
}

.ps-toggle-ui::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.18s ease;
}

.ps-preview-toggle input,
.ps-switch-line input,
.ps-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ps-preview-toggle input:checked + .ps-toggle-ui,
.ps-switch-line input:checked + .ps-toggle-ui,
.ps-option input:checked + .ps-toggle-ui {
    background: #3b82f6;
}

.ps-preview-toggle input:checked + .ps-toggle-ui::after,
.ps-switch-line input:checked + .ps-toggle-ui::after,
.ps-option input:checked + .ps-toggle-ui::after {
    transform: translateX(1.15rem);
}

.ps-composer textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.85);
    color: var(--text);
    padding: 0.9rem 1rem;
    font: inherit;
}

.ps-composer-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 650;
}

.ps-options {
    margin-top: 0.85rem;
    display: flex;
    flex-direction: column;
}

.ps-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.15rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    font-weight: 650;
    cursor: pointer;
}

.ps-option span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.ps-option.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ps-toggle-ui.is-locked {
    background: rgba(148, 163, 184, 0.18);
}

.ps-example {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.ps-thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.65rem;
}

.ps-thread-item {
    display: flex;
    gap: 0.65rem;
}

.ps-thread-item.is-reply {
    margin-left: 2rem;
}

.ps-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #334155;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 750;
    flex-shrink: 0;
}

.ps-avatar-brand {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.ps-bubble {
    display: inline-block;
    padding: 0.55rem 0.75rem;
    border-radius: 16px;
    background: rgba(59, 130, 246, 0.16);
    color: #e2e8f0;
    font-size: 0.9rem;
}

.ps-bubble strong {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.8rem;
}

.ps-thread-item small {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.72rem;
}

.ps-delay {
    margin-top: 0.9rem;
}

.ps-delay label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.ps-delay input[type="range"] {
    width: 100%;
}

.ps-footer {
    position: sticky;
    bottom: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0.5rem -0.25rem 0;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(8, 13, 24, 0.92);
    backdrop-filter: blur(12px);
}

.ps-footer-actions {
    display: flex;
    gap: 0.55rem;
}

@media (max-width: 700px) {
    .ps-thread-item.is-reply { margin-left: 1rem; }
    .ps-preview-media { min-height: 220px; }
}

img.ps-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    object-fit: cover;
    background: #334155;
    flex-shrink: 0;
    display: block;
}

img.ps-avatar-brand {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

/* -------- Post analytics -------- */
.pa-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 920px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.pa-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.15rem 1.25rem;
    border-radius: 20px;
    border: 1px solid rgba(96, 165, 250, 0.18);
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(37, 99, 235, 0.22), transparent 55%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(8, 13, 24, 0.88));
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
}

.pa-top h1 {
    margin: 0.15rem 0 0.35rem;
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    letter-spacing: -0.02em;
}

.pa-sub {
    margin: 0;
    max-width: 42rem;
    line-height: 1.45;
}

.pa-top-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.pa-range {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.22rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.55);
}

.pa-range a {
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.pa-range a:hover { color: #e2e8f0; }

.pa-range a.is-active {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

.pa-close {
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.75);
    color: #cbd5e1;
    font-size: 1.35rem;
    line-height: 1;
    text-decoration: none;
}

.pa-close:hover {
    color: #fff;
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(37, 99, 235, 0.25);
}

.pa-thumb {
    height: 120px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: #0b1220;
}

.pa-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pa-card {
    padding: 1.15rem 1.2rem 1.25rem;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.18);
}

.pa-card-head h2 {
    margin: 0;
    font-size: 1.05rem;
}

.pa-card-head .muted {
    margin: 0.25rem 0 0;
}

.pa-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
    margin-top: 1rem;
}

.pa-metric {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 74px;
    padding: 0.8rem 0.85rem;
    border-radius: 14px;
    border: 1px solid rgba(96, 165, 250, 0.14);
    background:
        linear-gradient(160deg, rgba(37, 99, 235, 0.1), transparent 55%),
        rgba(8, 13, 24, 0.72);
}

.pa-metric small {
    display: block;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 650;
}

.pa-metric strong {
    display: block;
    margin-top: 0.15rem;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    color: #f8fafc;
}

.pa-metric-ico {
    width: 2.15rem;
    height: 2.15rem;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 11px;
    border: 1px solid rgba(96, 165, 250, 0.28);
    background: rgba(37, 99, 235, 0.16);
    color: #93c5fd;
}

.pa-metric-ico .ico {
    width: 16px;
    height: 16px;
}

.pa-metric-wide {
    margin-top: 0.7rem;
    justify-content: flex-start;
}

.pa-metric-wide strong {
    margin-left: auto;
    margin-top: 0;
    font-size: 1.45rem;
}

.pa-ok {
    margin: 1rem 0 0;
    color: #34d399;
    font-weight: 700;
}

.pa-fail-list {
    margin: 0.9rem 0 0;
    padding-left: 1.1rem;
    color: #fca5a5;
}

.pa-fail-list li + li { margin-top: 0.35rem; }

.pa-card .chart-svg-box {
    margin-top: 0.85rem;
    padding: 0.85rem 0.7rem 0.55rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(2, 6, 23, 0.45);
}

.pa-card .activity-chart {
    min-height: 160px;
}

@media (max-width: 900px) {
    .pa-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .pa-top { padding: 1rem; }
    .pa-metrics { grid-template-columns: 1fr; }
    .pa-range { width: 100%; overflow-x: auto; }
    .pa-thumb { height: 90px; }
}

/* ===== Spacing tighten (v32) ===== */
.main-content > :last-child {
    margin-bottom: 0;
}

.main-content .card-narrow:last-child {
    margin-bottom: 0 !important;
}

.locale-ku,
.locale-ar,
html[dir="rtl"] body {
    letter-spacing: 0;
}

.locale-ku h1,
.locale-ar h1,
.locale-ku h2,
.locale-ar h2,
.locale-ku .btn,
.locale-ar .btn,
.locale-ku .nav-link,
.locale-ar .nav-link {
    letter-spacing: 0;
}

.history-empty-line {
    margin: 0.65rem 0 0;
}

.history-layout,
.history-split,
.insights-grid,
.dash-layout {
    gap: 0.85rem;
}

.history-filters {
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.history-filters-modern .history-select {
    border-radius: 12px;
    background: rgba(8, 13, 24, 0.7);
}

html[dir="rtl"] .history-date-sep {
    display: inline-block;
    transform: scaleX(-1);
}

.coverage-card,
.history-main .card {
    min-height: 0;
}

.page-header h1 {
    letter-spacing: -0.045em;
}

.icon-btn {
    border-radius: 999px;
}

.alert {
    border-radius: 14px;
    animation: contentRise 0.4s var(--ease-out) both;
}

.sidebar-brand a {
    border-radius: 16px;
    padding: 0.35rem 0.4rem;
    transition: background 0.2s var(--ease);
}

.sidebar-brand a:hover {
    background: rgba(255, 255, 255, 0.04);
}

.chart-svg-box {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    background:
        linear-gradient(180deg, rgba(59, 130, 246, 0.05), transparent 40%),
        rgba(4, 8, 16, 0.55);
    padding: 0.85rem 0.75rem 0.45rem;
}

.activity-chart {
    width: 100%;
    height: auto;
    display: block;
}

.legend-item {
    padding: 0.7rem 0.8rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.legend-item:hover {
    border-color: rgba(96, 165, 250, 0.28);
    background: rgba(59, 130, 246, 0.06);
}

.metric-card-static {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    min-height: 0;
}

.metric-card-static .metric-value {
    font-size: 1.15rem;
    letter-spacing: -0.03em;
}

@media (max-width: 1100px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .dash-hero,
    .dash-welcome {
        padding: 1.15rem 1.1rem;
        border-radius: 20px;
    }

    .metric-grid { grid-template-columns: 1fr; }

    .menu-toggle { display: grid; }
}

html[dir="rtl"] .nav-link:hover,
html[dir="rtl"] .quick-link:hover {
    transform: translateX(-3px);
}


.settings-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 1.2rem 1.25rem;
    border-radius: 20px;
    border: 1px solid rgba(96, 165, 250, 0.16);
    background:
        radial-gradient(520px 180px at 100% 0%, rgba(59, 130, 246, 0.16), transparent 55%),
        rgba(12, 18, 32, 0.82);
    box-shadow: var(--shadow);
    animation: contentRise 0.45s var(--ease-out) both;
}

.settings-hero-identity {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    min-width: 0;
}

.settings-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.03em;
    color: #fff;
    background: linear-gradient(145deg, #60a5fa, #2563eb);
    box-shadow:
        0 0 0 4px rgba(59, 130, 246, 0.14),
        0 12px 24px rgba(37, 99, 235, 0.28);
}

.settings-hero h1 {
    margin: 0 0 0.25rem;
    font-size: clamp(1.45rem, 2.2vw, 1.85rem);
    letter-spacing: -0.045em;
}

.settings-hero .muted {
    margin: 0;
    max-width: 46ch;
}

.settings-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.settings-meta-chip {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem 0.85rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.03);
    min-width: 0;
}

.settings-meta-chip .muted {
    font-size: 0.7rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.settings-meta-chip strong {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    word-break: break-all;
}

.settings-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    align-items: stretch;
    max-width: 980px;
}

.settings-panel {
    padding: 1.2rem 1.25rem;
}

.settings-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.1rem;
}

.settings-panel-head h2 {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: -0.025em;
}

.settings-panel-ico {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: rgba(59, 130, 246, 0.14);
    color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.06);
}

.settings-panel-ico .ico {
    width: 18px;
    height: 18px;
}

.settings-panel-ico-warn {
    background: rgba(251, 113, 133, 0.12);
    color: #fda4af;
    box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.06);
}

.settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.35rem;
}

.settings-panel-profile,
.settings-panel-security {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background:
        radial-gradient(420px 160px at 100% 0%, rgba(56, 189, 248, 0.08), transparent 55%),
        rgba(14, 20, 34, 0.9);
}

.settings-profile-form,
.settings-security-form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.settings-profile-form .settings-actions,
.settings-security-form .settings-actions {
    margin-top: auto;
}

.settings-profile-form .settings-actions .btn,
.settings-panel-profile .settings-actions .btn {
    width: 100%;
}

.settings-panel-ico-secure {
    background: rgba(56, 189, 248, 0.14);
    color: #7dd3fc;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.06);
}

.settings-security-form .form-group {
    margin-bottom: 0.85rem;
}

.settings-field-block {
    margin-bottom: 1.05rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.settings-field-block + .settings-field-block {
    margin-top: 0.15rem;
}

.settings-field-label {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.85rem;
}

.settings-field-label span {
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: -0.015em;
    color: #e8eef8;
}

.settings-field-label small {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 500;
}

.settings-security-tips {
    list-style: none;
    margin: 0.15rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
}

.settings-security-tips li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #9eafc7;
    font-size: 0.78rem;
    font-weight: 550;
}

.settings-security-tips .ico {
    width: 13px;
    height: 13px;
    color: #34d399;
    flex-shrink: 0;
}

.settings-panel-security .settings-actions {
    margin-top: 0.15rem;
}

.settings-panel-security .settings-actions .btn {
    width: 100%;
}

.settings-session {
    grid-column: 1 / -1;
}

.settings-session-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.02);
}

.settings-session-row strong {
    display: block;
    font-size: 0.95rem;
    letter-spacing: -0.02em;
}

.settings-session-row .muted {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
}

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

@media (max-width: 640px) {
    .settings-hero {
        padding: 1rem;
    }

    .settings-hero-identity {
        align-items: flex-start;
    }

    .settings-layout .form-row-2 {
        grid-template-columns: 1fr;
    }
}

/* -------- App FAQ page -------- */
.faq-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    padding: 0.95rem 1.05rem;
    border-radius: 16px;
    border: 1px solid rgba(96, 165, 250, 0.16);
    background:
        radial-gradient(420px 140px at 100% 0%, rgba(56, 189, 248, 0.12), transparent 55%),
        rgba(12, 18, 32, 0.82);
    box-shadow: var(--shadow);
    animation: contentRise 0.45s var(--ease-out) both;
}

.faq-hero-compact {
    margin-bottom: 0.7rem;
}

.faq-hero h1 {
    margin: 0 0 0.2rem;
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    letter-spacing: -0.045em;
}

.faq-hero .muted {
    margin: 0;
    max-width: 46ch;
    font-size: 0.9rem;
}

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

.faq-layout {
    display: block;
    max-width: 820px;
}

.faq-panel {
    padding: 0.85rem;
    max-width: 820px;
}

.faq-panel-compact {
    margin: 0;
}

.faq-panel-head {
    display: none;
}

.faq-list-app {
    gap: 0.45rem;
}

.faq-item-app {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.02);
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.faq-item-app:hover,
.faq-item-app[open] {
    border-color: rgba(96, 165, 250, 0.28);
    background: rgba(59, 130, 246, 0.05);
}

.faq-item-app summary {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 0.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.faq-item-app summary::after {
    content: none;
    float: none;
}

.faq-item-index {
    display: grid;
    place-items: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.35rem;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.faq-item-q {
    min-width: 0;
    line-height: 1.35;
}

.faq-item-toggle {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.03);
    position: relative;
    flex-shrink: 0;
}

.faq-item-toggle::before,
.faq-item-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 1.5px;
    border-radius: 2px;
    background: #93c5fd;
    transform: translate(-50%, -50%);
    transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.faq-item-toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item-app[open] .faq-item-toggle::after {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg);
}

.faq-item-body {
    padding: 0 0.9rem 0.85rem 3.35rem;
}

.faq-item-app p {
    margin: 0;
    color: #9eafc7;
    font-size: 0.9rem;
    line-height: 1.55;
}

.faq-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.7rem;
    max-width: 820px;
}

.faq-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.48rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 650;
    text-decoration: none;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.faq-quick-link:hover {
    color: #fff;
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(59, 130, 246, 0.08);
}

.faq-side,
.faq-side-card {
    display: none;
}

@media (max-width: 640px) {
    .faq-item-body {
        padding-left: 0.9rem;
    }

    .faq-hero {
        padding: 0.85rem;
    }
}

/* -------- App Tutorial page -------- */
.tutorial-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    padding: 0.95rem 1.05rem;
    border-radius: 16px;
    border: 1px solid rgba(96, 165, 250, 0.16);
    background:
        radial-gradient(420px 140px at 100% 0%, rgba(59, 130, 246, 0.14), transparent 55%),
        rgba(12, 18, 32, 0.82);
    box-shadow: var(--shadow);
    animation: contentRise 0.45s var(--ease-out) both;
}

.tutorial-hero h1 {
    margin: 0 0 0.2rem;
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    letter-spacing: -0.045em;
}

.tutorial-hero .muted {
    margin: 0;
    max-width: 48ch;
    font-size: 0.9rem;
}

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

.tutorial-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    max-width: 980px;
    margin-bottom: 0.7rem;
}

.tutorial-step {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem 1.05rem;
    transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease-out);
}

.tutorial-step:hover {
    border-color: rgba(96, 165, 250, 0.32);
    transform: translateY(-2px);
}

.tutorial-step.is-done {
    border-color: rgba(52, 211, 153, 0.28);
    background:
        radial-gradient(280px 120px at 100% 0%, rgba(52, 211, 153, 0.1), transparent 55%),
        rgba(14, 20, 34, 0.9);
}

.tutorial-step-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.tutorial-step-num {
    display: grid;
    place-items: center;
    min-width: 2rem;
    height: 2rem;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.tutorial-step-ico {
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.04);
    color: #93c5fd;
}

.tutorial-step-ico .ico {
    width: 15px;
    height: 15px;
}

.tutorial-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.22);
    color: #6ee7b7;
    font-size: 0.68rem;
    font-weight: 750;
}

.tutorial-step-badge .ico {
    width: 12px;
    height: 12px;
}

.tutorial-step h2 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: -0.025em;
}

.tutorial-step .muted {
    margin: 0;
    flex: 1;
    font-size: 0.86rem;
    line-height: 1.5;
}

.tutorial-step .btn {
    align-self: flex-start;
    margin-top: 0.35rem;
}

.tutorial-note {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    max-width: 980px;
    padding: 0.95rem 1.05rem;
}

.tutorial-note h2 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
}

.tutorial-note .muted {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.5;
}

.tutorial-note-ico {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
}

.tutorial-note-ico .ico {
    width: 16px;
    height: 16px;
}

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

    .tutorial-note {
        max-width: none;
    }
}

.admin-review-photo {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.admin-review-photo-preview {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.55);
    flex-shrink: 0;
}

.admin-review-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-review-photo-controls {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    flex: 1;
}

.admin-review-photo-controls input[type="file"] {
    max-width: 100%;
    font-size: 0.84rem;
}

.admin-review-photo-remove {
    margin: 0.15rem 0 0;
}

.admin-review-author-cell {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.admin-review-thumb {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.admin-review-thumb-fallback {
    display: grid;
    place-items: center;
    font-size: 0.68rem;
    font-weight: 750;
    color: #ecfdf5;
    background: linear-gradient(145deg, rgba(45, 212, 191, 0.35), rgba(15, 118, 110, 0.55));
}
