:root {
    --bg-1: #060b1d;
    --bg-2: #0f1d41;
    --surface: rgba(255, 255, 255, 0.08);
    --surface-strong: rgba(255, 255, 255, 0.12);
    --text-main: #eef2ff;
    --text-muted: rgba(238, 242, 255, 0.74);
    --accent: #40f7ff;
    --accent-2: #3b82f6;
    --danger: #fb7185;
}

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

html,
body {
    min-height: 100%;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--text-main);
    font-family: "Vazirmatn", "Segoe UI", sans-serif;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 15% 10%, rgba(64, 247, 255, 0.16) 0%, transparent 40%),
        radial-gradient(circle at 85% 20%, rgba(124, 58, 237, 0.24) 0%, transparent 44%),
        linear-gradient(165deg, var(--bg-1), var(--bg-2));
    background-attachment: fixed;
}

h1,
h2,
h3,
.brand {
    font-family: "Vazirmatn", "Segoe UI", sans-serif;
    font-weight: 700;
}

a {
    color: var(--accent);
}

a:hover {
    color: #7be9ff;
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
    background: rgba(5, 10, 28, 0.75);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.brand {
    font-size: 1.35rem;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.52rem;
    max-width: 100%;
    min-width: 0;
}

.brand-icon {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 0.5rem;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.nav-links,
.auth-nav {
    gap: 0.2rem;
}

.nav-links .nav-link,
.auth-nav .nav-link,
.nav-form .nav-link {
    color: var(--text-main);
    opacity: 0.9;
}

.nav-links .nav-link:hover,
.auth-nav .nav-link:hover,
.nav-form .nav-link:hover {
    color: #ffffff;
    opacity: 1;
}

.nav-form {
    margin: 0;
}

.main-content {
    flex: 1;
}

.footer-shell {
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(5, 10, 28, 0.8);
}

.footer-row {
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.92rem;
    color: var(--text-muted);
}

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

.creator-credit a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 600;
}

.creator-credit a:hover {
    color: #dbeafe;
    text-decoration: underline;
}

.landing-hero {
    padding: 4.5rem 0 3rem;
}

.hero-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1.4fr 1fr;
}

.hero-grid > *,
.auth-login-layout > *,
.report-grid > *,
.feature-grid > *,
.theme-cards > *,
.wheel-cards > * {
    min-width: 0;
}

.chip {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.32), rgba(64, 247, 255, 0.3));
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    max-width: 100%;
    white-space: normal;
    line-height: 1.45;
}

.landing-hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.42;
    margin-bottom: 1rem;
    overflow-wrap: anywhere;
}

.landing-hero p {
    color: var(--text-muted);
    max-width: 60ch;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #1d4ed8, #00b8db);
    border: 0;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af, #0891b2);
}

.preview-panel {
    background: linear-gradient(150deg, rgba(11, 18, 44, 0.88), rgba(13, 38, 85, 0.7));
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 1.2rem;
    padding: 1.4rem;
    box-shadow: 0 12px 36px rgba(5, 10, 28, 0.35);
}

.preview-panel h3 {
    margin-bottom: 0.8rem;
}

.preview-panel pre {
    margin: 0.6rem 0 0.9rem;
    padding: 1rem;
    border-radius: 0.8rem;
    background: rgba(3, 7, 18, 0.8);
    color: #9cf4ff;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    direction: ltr;
    text-align: left;
}

.theme-showcase,
.platform-grid {
    padding: 2rem 0 3rem;
}

.theme-showcase h2,
.platform-grid h2 {
    margin-bottom: 1.2rem;
}

.theme-cards,
.feature-grid,
.wheel-cards,
.admin-kpis,
.report-kpi-grid,
.report-grid {
    display: grid;
    gap: 1rem;
}

.theme-cards {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.theme-card,
.feature-card,
.content-card {
    background: linear-gradient(160deg, rgba(17, 24, 54, 0.86), rgba(17, 30, 67, 0.76));
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: 1rem 1.1rem;
}

.theme-card p,
.feature-card p,
.muted {
    color: var(--text-muted);
}

.theme-card.neon {
    box-shadow: inset 0 0 0 1px rgba(64, 247, 255, 0.4), 0 0 0 1px rgba(64, 247, 255, 0.12);
}

.theme-card.sunset {
    box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.4), 0 0 0 1px rgba(251, 146, 60, 0.1);
}

.theme-card.ocean-glass {
    box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.42), 0 0 0 1px rgba(129, 140, 248, 0.1);
}

.theme-card.carnival-lights {
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.42), 0 0 0 1px rgba(251, 191, 36, 0.1);
}

.theme-card.blossom-garden {
    box-shadow: inset 0 0 0 1px rgba(244, 114, 182, 0.42), 0 0 0 1px rgba(244, 114, 182, 0.1);
}

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

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

.panel-topbar p {
    margin: 0;
    color: var(--text-muted);
}

.wheel-cards {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.wheel-card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.status-tags,
.wheel-actions,
.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.user-admin-form {
    min-width: 220px;
}

.user-admin-form .form-control,
.user-admin-form .form-check-label {
    font-size: 0.82rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-size: 0.74rem;
    letter-spacing: 0.01em;
    background: rgba(148, 163, 184, 0.2);
    color: #dbeafe;
}

.tag-good {
    background: rgba(34, 197, 94, 0.28);
    color: #dcfce7;
}

.tag-danger {
    background: rgba(244, 63, 94, 0.28);
    color: #ffe4e6;
}

.tag-muted {
    background: rgba(100, 116, 139, 0.4);
    color: #e2e8f0;
}

.wheel-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.9rem;
    margin-bottom: 0.9rem;
    color: var(--text-muted);
}

.embed-box {
    margin-bottom: 1rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 0.75rem;
    background: rgba(2, 6, 23, 0.65);
}

.embed-label {
    font-size: 0.78rem;
    color: #93c5fd;
    margin-bottom: 0.35rem;
}

.embed-box pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: #bae6fd;
    transition: box-shadow 0.2s ease;
    cursor: copy;
}

img,
svg,
canvas,
video,
iframe {
    max-width: 100%;
}

.embed-box pre.copied {
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.6) inset;
}

.copy-text-btn.copied {
    border-color: rgba(34, 197, 94, 0.75);
    color: #dcfce7;
}

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

.public-link-text {
    flex: 1 1 260px;
    min-width: 220px;
    word-break: break-all;
    color: #93c5fd;
    text-decoration: none;
}

.public-link-text:hover {
    color: #dbeafe;
    text-decoration: underline;
}

.qr-panel {
    margin-top: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 0.7rem;
    padding: 0.85rem;
    background: #ffffff;
}

.qr-canvas-wrap {
    display: inline-block;
    background: #ffffff;
    padding: 0.45rem; /* extra quiet zone around QR modules */
    line-height: 0;
}

.qr-canvas-wrap canvas,
.qr-canvas-wrap img {
    display: block;
    max-width: 100%;
    height: auto;
}

.theme-note {
    border-radius: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.62);
}

.theme-note ul {
    margin-bottom: 0;
    padding-right: 1rem;
    padding-left: 0;
}

.theme-note li {
    margin-bottom: 0.6rem;
    color: var(--text-muted);
}

.auth-login-page {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
}

.auth-login-layout {
    width: min(1080px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 1.1rem;
    align-items: stretch;
}

.auth-brand-panel,
.auth-card {
    background: linear-gradient(160deg, rgba(11, 20, 44, 0.9), rgba(17, 36, 79, 0.72));
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 1rem;
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.38);
}

.auth-brand-panel {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-brand-panel h1 {
    margin: 0.4rem 0 0.85rem;
    font-size: clamp(1.6rem, 2.6vw, 2.25rem);
}

.auth-brand-panel p {
    color: var(--text-muted);
    line-height: 1.9;
}

.auth-points {
    margin: 0.7rem 0 0;
    padding-right: 1.1rem;
}

.auth-points li {
    margin-bottom: 0.55rem;
    color: #dbeafe;
}

.auth-form-panel {
    display: grid;
    gap: 1rem;
}

.auth-card {
    padding: 1.25rem;
}

.auth-card h2,
.auth-card h3 {
    margin-bottom: 0.9rem;
}

.auth-form .form-label {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.auth-input {
    min-height: 3rem;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.32);
    color: #f8fafc;
}

.auth-input::placeholder {
    color: rgba(226, 232, 240, 0.7);
}

.auth-input:focus {
    border-color: rgba(64, 247, 255, 0.8);
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.24);
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
}

.auth-links {
    display: grid;
    gap: 0.45rem;
    font-size: 0.94rem;
}

.auth-links a {
    color: #93c5fd;
    text-decoration: none;
}

.auth-links a:hover {
    color: #dbeafe;
    text-decoration: underline;
}

.external-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.external-buttons .btn {
    border-radius: 0.7rem;
}

.embed-key-box {
    margin-top: 1rem;
    padding: 0.65rem;
    border-radius: 0.7rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px dashed rgba(148, 163, 184, 0.35);
}

.editor-live-preview {
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.9rem;
    padding: 0.8rem;
    background: rgba(15, 23, 42, 0.56);
}

.editor-live-preview h3 {
    margin-bottom: 0.65rem;
}

.editor-widget-preview {
    --editor-env-color: #0f172a;
    --editor-text-color: #e2e8f0;
    --editor-muted-text: rgba(226, 232, 240, 0.82);
    --editor-card: rgba(15, 23, 42, 0.82);
    --editor-border: rgba(148, 163, 184, 0.3);
    border: 1px solid var(--editor-border);
    border-radius: 0.95rem;
    padding: 0.72rem;
    background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(160deg, rgba(2, 6, 23, 0.85), rgba(15, 23, 42, 0.7));
    color: var(--editor-text-color);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14), 0 10px 24px rgba(2, 6, 23, 0.28);
}

.editor-widget-preview.theme-neon {
    background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(160deg, rgba(2, 6, 23, 0.86), rgba(13, 36, 76, 0.78));
}

.editor-widget-preview.theme-sunset {
    background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(158deg, rgba(76, 29, 18, 0.86), rgba(49, 46, 129, 0.8));
}

.editor-widget-preview.theme-ocean-glass {
    background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(160deg, rgba(11, 19, 47, 0.84), rgba(10, 58, 85, 0.78));
}

.editor-widget-preview.theme-carnival-lights {
    background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(158deg, rgba(59, 7, 100, 0.86), rgba(124, 45, 18, 0.78));
}

.editor-widget-preview.theme-blossom-garden {
    background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(158deg, rgba(63, 33, 66, 0.85), rgba(31, 41, 55, 0.78));
}

.editor-widget-preview.editor-tone-dark {
    --editor-card: rgba(248, 250, 252, 0.93);
    --editor-border: rgba(15, 23, 42, 0.24);
    background:
        radial-gradient(circle at 16% 8%, var(--editor-env-color) 0%, transparent 48%),
        linear-gradient(160deg, rgba(248, 250, 252, 0.95), rgba(226, 232, 240, 0.88));
}

.editor-widget-preview.editor-tone-dark .editor-preview-brand,
.editor-widget-preview.editor-tone-dark .editor-preview-promo {
    background: rgba(255, 255, 255, 0.76);
    border-color: rgba(15, 23, 42, 0.2);
}

.editor-preview-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 0.55rem;
    padding: 0.32rem 0.48rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(15, 23, 42, 0.38);
}

.editor-preview-brand img {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.58rem;
    object-fit: contain;
    padding: 0.15rem;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.16);
}

.editor-preview-brand span {
    font-size: 0.88rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.editor-preview-header {
    text-align: center;
}

.editor-preview-header h4 {
    font-size: 1rem;
    margin: 0 0 0.2rem;
    line-height: 1.5;
}

.editor-preview-header p {
    margin: 0;
    color: var(--editor-muted-text);
    font-size: 0.82rem;
    line-height: 1.6;
}

.editor-preview-promo {
    margin: 0.62rem 0 0.72rem;
    text-align: center;
    border-radius: 0.65rem;
    border: 1px dashed rgba(96, 165, 250, 0.48);
    background: rgba(15, 23, 42, 0.36);
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    color: var(--editor-text-color);
    line-height: 1.55;
}

.editor-preview-wheel-shell {
    width: min(100%, 220px);
    aspect-ratio: 1 / 1;
    margin: 0 auto 0.7rem;
    position: relative;
}

.editor-preview-wheel-shell::before {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--editor-env-color) 0%, transparent 72%);
    opacity: 0.7;
    filter: blur(9px);
}

.editor-preview-wheel-disc,
.editor-preview-wheel-labels {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

.editor-preview-wheel-disc {
    border: 7px solid rgba(248, 250, 252, 0.92);
    box-shadow: inset 0 0 0 5px rgba(15, 23, 42, 0.72), 0 8px 20px rgba(2, 6, 23, 0.34);
}

.editor-preview-wheel-labels {
    pointer-events: none;
}

.editor-preview-wheel-label {
    position: absolute;
    transform: translate(-50%, -50%);
    max-width: 56px;
    text-align: center;
    font-size: 0.64rem;
    line-height: 1.2;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(2, 6, 23, 0.55);
}

.verification-code-fields {
    display: none;
}

.active-window-fields {
    display: none;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 0.8rem;
    background: rgba(15, 23, 42, 0.45);
    padding: 0.8rem;
}

.wheel-scale-controls {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.8rem;
    padding: 0.55rem 0.7rem;
    background: rgba(15, 23, 42, 0.45);
}

.wheel-scale-controls .form-range {
    margin-bottom: 0.45rem;
}

.wheel-scale-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.wheel-scale-input-wrap .form-control {
    max-width: 130px;
}

.wheel-scale-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.2rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(30, 41, 59, 0.75);
    color: #bfdbfe;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
}

.date-preset-tools {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.segment-tools {
    margin-bottom: 0.85rem;
}

.chance-preset-tools {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.56);
    border-radius: 0.8rem;
    padding: 0.5rem 0.65rem;
}

.preset-label {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.segment-weight-visual-cell {
    min-width: 200px;
}

.segment-weight-visual {
    position: relative;
    display: flex;
    align-items: center;
    height: 2rem;
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    overflow: hidden;
}

.segment-weight-bar {
    position: absolute;
    inset: 0.16rem 0.16rem 0.16rem auto;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #1d4ed8, #38bdf8);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.34);
    transition: width 0.25s ease, background 0.25s ease;
}

.segment-weight-value {
    position: relative;
    margin-inline-start: 0.72rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: #dbeafe;
    text-shadow: 0 0 8px rgba(2, 6, 23, 0.65);
}

.chance-summary {
    border: 1px dashed rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.58);
    border-radius: 0.75rem;
    padding: 0.65rem 0.8rem;
    color: var(--text-muted);
}

.chance-summary[data-valid="true"] {
    border-color: rgba(34, 197, 94, 0.55);
    color: #dcfce7;
}

.chance-summary[data-valid="false"] {
    border-color: rgba(244, 63, 94, 0.6);
    color: #fecdd3;
}

.form-actions,
.segment-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.segment-header-row {
    margin-bottom: 0.8rem;
}

.form-actions {
    margin-top: 1rem;
}

.kpi-card {
    text-align: center;
}

.kpi-card span {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.kpi-card strong {
    font-size: 1.9rem;
    font-weight: 700;
}

.report-filter h2 {
    margin-bottom: 1rem;
}

.quick-range {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.report-filter-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 1rem;
}

.filter-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.report-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 1rem;
}

.admin-kpis {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.admin-kpi-card {
    --kpi-accent: #38bdf8;
    position: relative;
    overflow: hidden;
    min-height: 126px;
    padding: 1.05rem 1rem 1.15rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background:
        radial-gradient(circle at 18% 16%, rgba(56, 189, 248, 0.13), transparent 48%),
        linear-gradient(160deg, rgba(10, 20, 48, 0.92), rgba(13, 37, 82, 0.74));
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.26), inset 0 0 0 1px rgba(148, 163, 184, 0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-kpi-card::after {
    content: "";
    position: absolute;
    inset-inline: 1rem;
    bottom: 0.62rem;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--kpi-accent), transparent);
    opacity: 0.88;
}

.admin-kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(125, 211, 252, 0.42);
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.34), inset 0 0 0 1px rgba(125, 211, 252, 0.2);
}

.admin-kpi-card span {
    color: #cbd5e1;
    font-size: 0.96rem;
}

.admin-kpi-card strong {
    font-size: clamp(2rem, 3.4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.05;
    margin-top: 0.4rem;
    letter-spacing: 0.02em;
}

.admin-kpi-card.tone-users {
    --kpi-accent: #38bdf8;
}

.admin-kpi-card.tone-wheels {
    --kpi-accent: #818cf8;
}

.admin-kpi-card.tone-published {
    --kpi-accent: #34d399;
}

.admin-kpi-card.tone-active {
    --kpi-accent: #22c55e;
}

.admin-kpi-card.tone-spins {
    --kpi-accent: #f59e0b;
}

.admin-dashboard-page .admin-section {
    border-color: rgba(148, 163, 184, 0.24);
    background:
        radial-gradient(circle at 12% 14%, rgba(56, 189, 248, 0.09), transparent 40%),
        linear-gradient(160deg, rgba(11, 20, 48, 0.9), rgba(13, 33, 74, 0.78));
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.3), inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.admin-dashboard-page .admin-section h2 {
    font-size: clamp(1.12rem, 2.2vw, 1.4rem);
    margin-bottom: 0.95rem;
    color: #e2e8f0;
}

.admin-dashboard-page .admin-section h3 {
    color: #dbeafe;
}

.admin-dashboard-page .notification-settings-grid > .content-card,
.admin-dashboard-page .notification-test-grid > .content-card {
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: linear-gradient(160deg, rgba(8, 15, 36, 0.76), rgba(15, 30, 67, 0.64));
}

.admin-dashboard-page .notification-test-grid > .content-card {
    position: relative;
    overflow: hidden;
}

.admin-dashboard-page .notification-test-grid > .content-card::after {
    content: "";
    position: absolute;
    inset-inline: 1rem;
    top: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.9), transparent);
}

.admin-dashboard-page .form-control,
.admin-dashboard-page .form-select {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(148, 163, 184, 0.36);
    color: #f8fafc;
}

.admin-dashboard-page .form-control::placeholder {
    color: rgba(226, 232, 240, 0.72);
}

.admin-dashboard-page .form-control:focus,
.admin-dashboard-page .form-select:focus {
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.22);
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
}

.admin-dashboard-page .admin-data-table {
    margin-bottom: 0;
}

.admin-dashboard-page .admin-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(5px);
    border-bottom-color: rgba(148, 163, 184, 0.35);
}

.admin-dashboard-page .admin-data-table tbody tr:nth-child(odd) {
    background: rgba(15, 23, 42, 0.32);
}

.admin-dashboard-page .admin-data-table tbody tr:hover {
    background: rgba(30, 64, 175, 0.24);
}

.admin-dashboard-page .table-responsive {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.86rem;
    overflow: auto;
}

.admin-dashboard-page .user-admin-form .btn {
    width: 100%;
}

.admin-dashboard-page .panel-topbar p {
    max-width: 72ch;
}

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

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

.auth-message-card {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.auth-message-actions {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.chart-card {
    min-height: 340px;
}

.chart-card h3 {
    margin-bottom: 0.8rem;
}

.chart-card canvas {
    width: 100% !important;
    height: 250px !important;
}

.table {
    color: var(--text-main);
}

.table > :not(caption) > * > * {
    border-color: rgba(148, 163, 184, 0.2);
}

.table thead th {
    color: #c7d2fe;
}

.table thead th.sortable-header {
    user-select: none;
    cursor: pointer;
    position: relative;
    padding-inline-start: 1.15rem;
}

.table thead th.sortable-header::after {
    content: "↕";
    opacity: 0.45;
    position: absolute;
    inset-inline-start: 0.2rem;
    top: 50%;
    transform: translateY(-52%);
    font-size: 0.78rem;
    line-height: 1;
}

.table thead th.sortable-header[data-sort-dir="asc"]::after {
    content: "↑";
    opacity: 0.95;
}

.table thead th.sortable-header[data-sort-dir="desc"]::after {
    content: "↓";
    opacity: 0.95;
}

.alert {
    border-radius: 0.8rem;
}

.content-card h2,
.content-card h3 {
    margin-bottom: 0.6rem;
}

@media (max-width: 992px) {
    .hero-grid,
    .theme-cards,
    .feature-grid,
    .report-grid,
    .report-filter-grid,
    .report-kpi-grid,
    .notification-settings-grid,
    .notification-test-grid {
        grid-template-columns: 1fr;
    }

    .panel-topbar,
    .form-actions,
    .segment-header-row,
    .filter-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .wheel-card-head {
        flex-direction: column;
    }

    .auth-login-layout {
        grid-template-columns: 1fr;
    }

    .auth-login-page {
        min-height: auto;
        align-items: stretch;
    }

    .chance-preset-tools {
        width: 100%;
    }

    .segment-weight-visual-cell {
        min-width: 160px;
    }

    .landing-hero {
        padding: 2.4rem 0 1.6rem;
    }

    .landing-hero h1 {
        font-size: clamp(1.7rem, 7vw, 2.25rem);
    }

    .preview-panel pre {
        font-size: 0.84rem;
    }
}

@media (max-width: 576px) {
    .topbar .container {
        padding-inline: 0.8rem;
    }

    .brand {
        font-size: 1.05rem;
    }

    .wheel-cards {
        grid-template-columns: 1fr;
    }

    .content-card,
    .theme-card,
    .feature-card {
        padding: 0.82rem 0.88rem;
        border-radius: 0.85rem;
    }

    .kpi-card strong {
        font-size: 1.52rem;
    }

    .public-link-row {
        flex-direction: column;
        align-items: stretch;
    }

    .public-link-text,
    .public-link-row .btn,
    .wheel-actions .btn,
    .admin-actions .btn {
        width: 100%;
    }

    .wheel-actions form,
    .admin-actions form {
        width: 100%;
    }

    .qr-panel {
        width: 100%;
        justify-content: center;
    }

    .auth-card,
    .auth-brand-panel {
        padding: 0.95rem;
    }

    .table-responsive {
        border-radius: 0.65rem;
    }

    .footer-row {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .admin-dashboard-page .admin-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-dashboard-page .admin-kpi-card {
        min-height: 112px;
        padding: 0.85rem 0.8rem 1rem;
    }

    .admin-dashboard-page .admin-kpi-card strong {
        font-size: clamp(1.7rem, 8vw, 2.2rem);
    }

    .admin-dashboard-page .notification-settings-grid,
    .admin-dashboard-page .notification-test-grid {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-page .filter-actions .btn {
        width: 100%;
    }
}
