/* ---- Root & Global Resets ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --page-gutter: clamp(1rem, 3vw, 2rem);
    --section-y: clamp(3rem, 7vw, 6rem);
    --content-max: 80rem;
    --content-max-wide: 96rem;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-muted: #f1f5f9;
    --line: #e2e8f0;
    --line-soft: #eef2f7;
    --text: #0f172a;
    --text-muted: #64748b;
    --brand: #086bff;
    --brand-strong: #005ae6;
    --brand-soft: #eff6ff;
    --success: #059669;
    --danger: #e11d48;
    --warning: #d97706;
    --radius-card: 0.5rem;
    --radius-control: 0.625rem;
    --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
    --shadow-card-hover: 0 10px 30px rgba(15, 23, 42, 0.08);
}

html.dark {
    --surface: #161616;
    --surface-soft: #1c1c1c;
    --surface-muted: #222224;
    --line: rgba(255, 255, 255, 0.1);
    --line-soft: rgba(255, 255, 255, 0.06);
    --text: #f5f5f5;
    --text-muted: rgba(255, 255, 255, 0.5);
    --brand-soft: rgba(8, 107, 255, 0.15);
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.28);
    --shadow-card-hover: 0 8px 28px rgba(0, 0, 0, 0.38);
}

html {
    overflow-x: clip;
    text-size-adjust: 100%;
}

body {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 1) 24rem),
        #fff;
    color: var(--text);
    font-family: var(--font-sans, Inter, system-ui, sans-serif);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

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

img,
video {
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
    max-width: 100%;
}

h1,
h2,
h3,
p,
a,
button,
label,
span,
li,
td,
th {
    overflow-wrap: anywhere;
}

h1,
h2,
h3 {
    letter-spacing: 0;
}

p {
    line-height: 1.65;
}

:focus-visible {
    outline: 3px solid rgba(8, 107, 255, 0.28);
    outline-offset: 2px;
}

html, body {
    -ms-overflow-style: none !important;  /* IE and Edge */
    scrollbar-width: none !important;     /* Firefox */
}
html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none !important;             /* Chrome, Safari, Opera */
}

/* Preserve scrollbars for internal containers that actually need them */
.table-container::-webkit-scrollbar, 
.form-input::-webkit-scrollbar,
select::-webkit-scrollbar,
[style*="overflow-y: auto"]::-webkit-scrollbar,
[style*="overflow-y: scroll"]::-webkit-scrollbar {
    display: block !important;
}

/* ---- Preloader ---- */
@keyframes preloader-pulse-scale {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.2); opacity: 0.85; }
}

@keyframes preloader-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .4; }
}

.animate-preloader-pulse-scale {
    animation: preloader-pulse-scale 0.8s ease-in-out infinite;
}

#preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ---- Toast Slide-In ---- */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

.animate-slide-in {
    animation: slideIn .4s cubic-bezier(.16,1,.3,1) forwards;
}

/* ---- Modal animation ---- */
@keyframes modalIn {
    from { transform: scale(.95) translateY(10px); opacity: 0; }
    to   { transform: scale(1)   translateY(0);    opacity: 1; }
}

.animate-modal-in {
    animation: modalIn .3s cubic-bezier(.16,1,.3,1) forwards;
}

/* ---- Navigation links ---- */
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    min-height: 2.75rem;
    padding: .375rem .75rem;
    font-size: .875rem;
    font-weight: 500;
    color: #4b5563;
    border-radius: var(--radius-control);
    transition: all .15s ease;
}
.nav-link:hover {
    background-color: var(--surface-muted);
    color: var(--text);
}
.nav-link-active,
.nav-link.active {
    background-color: var(--brand-soft);
    color: var(--brand);
}

.mobile-nav-link {
    display: block;
    min-height: 2.75rem;
    padding: .75rem .75rem;
    font-size: .875rem;
    font-weight: 500;
    color: #4b5563;
    border-radius: var(--radius-control);
    transition: all .15s ease;
}
.mobile-nav-link:hover {
    background-color: #f3f4f6;
    color: #111827;
}

/* ---- Card styles (shadcn-like) ---- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-card-hover);
}

/* Keep Tailwind gradient cards intact when app.css loads after tailwind.css. */
.card.bg-gradient-to-br {
    background-color: #111827 !important;
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)) !important;
}

.card.bg-gradient-to-br.text-white,
.card.bg-gradient-to-br .text-white {
    color: #fff !important;
}

.card.bg-gradient-to-br .text-gray-300 {
    color: #d1d5db !important;
}

.card.bg-gradient-to-br .text-gray-200 {
    color: #e5e7eb !important;
}

.card-header {
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--line-soft);
}
.card-body {
    padding: 1.25rem;
}
.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--line-soft);
    background-color: var(--surface-soft);
    border-radius: 0 0 var(--radius-card) var(--radius-card);
}

/* ---- Button styles ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: var(--control-h, 2.75rem);
    padding: var(--control-py, .5rem) var(--control-px, 1rem);
    font-size: max(14px, var(--type-sm, .875rem));
    font-weight: 500;
    border-radius: var(--radius-control);
    transition: all .15s ease;
    cursor: pointer;
    border: none;
    outline: none;
    white-space: nowrap;
}
.btn:active {
    transform: scale(.98);
}

.btn-primary {
    background-color: var(--brand);
    color: #fff;
    box-shadow: 0 1px 3px rgba(8,107,255,.25);
}
.btn-primary:hover {
    background-color: var(--brand-strong);
    box-shadow: 0 4px 12px rgba(8,107,255,.3);
}

.btn-secondary {
    background-color: var(--surface);
    color: #334155;
    border: 1px solid var(--line);
}
.btn-secondary:hover {
    background-color: var(--surface-soft);
    border-color: #cbd5e1;
}

.btn-success {
    background-color: #16a34a;
    color: #fff;
    box-shadow: 0 1px 3px rgba(22,163,74,.25);
}
.btn-success:hover {
    background-color: #15803d;
}

.btn-danger {
    background-color: #dc2626;
    color: #fff;
    box-shadow: 0 1px 3px rgba(220,38,38,.25);
}
.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-ghost {
    background: transparent;
    color: #6b7280;
}
.btn-ghost:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.btn-lg {
    min-height: var(--control-h-lg, 3rem);
    padding: var(--control-py, .75rem) calc(var(--control-px, 1.5rem) * 1.15);
    font-size: var(--type-md, 1rem);
}

.btn-sm {
    min-height: 2.25rem;
    padding: .25rem .625rem;
    font-size: var(--type-xs, .75rem);
}

/* ---- Form inputs (shadcn-like) ---- */
.input,
.form-input {
    display: block;
    width: 100%;
    min-height: var(--control-h, 2.75rem);
    padding: var(--control-py, .5rem) var(--control-px, .75rem);
    font-size: max(16px, var(--type-sm, .875rem));
    line-height: 1.5;
    color: var(--text);
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    outline: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.input::placeholder,
.form-input::placeholder {
    color: #9ca3af;
}
.input:focus,
.form-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(8, 107, 255, 0.12);
}
.input:disabled,
.form-input:disabled {
    background-color: var(--surface-muted);
    cursor: not-allowed;
}

.form-label {
    display: block;
    font-size: var(--type-sm, .875rem);
    font-weight: 500;
    color: #334155;
    margin-bottom: .375rem;
}

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

/* ---- Table (shadcn-like) ---- */
.table-container {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--type-sm, .875rem);
    table-layout: auto;
}

.table-container .data-table--compact {
    table-layout: fixed;
}

.table-container .data-table--wide {
    width: auto;
    min-width: 56rem;
    max-width: none;
}

.data-table thead {
    display: table-header-group;
    width: 100%;
    background-color: var(--surface-soft);
}
.data-table th {
    padding: var(--table-pad, .75rem 1rem);
    font-weight: 600;
    text-align: left;
    color: var(--text-muted);
    font-size: var(--type-xs, .75rem);
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid var(--line);
    overflow-wrap: break-word;
    word-break: normal;
}
.data-table td {
    padding: var(--table-pad, .75rem 1rem);
    border-bottom: 1px solid var(--line-soft);
    color: #334155;
    overflow-wrap: break-word;
    word-break: normal;
}

.table-container .data-table--wide th,
.table-container .data-table--wide td {
    max-width: none;
}
.data-table tbody tr:hover {
    background-color: #f9fafb;
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ---- Badge ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: .125rem .5rem;
    font-size: .75rem;
    font-weight: 600;
    border-radius: 9999px;
    line-height: 1.5;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }
.badge-warning { background: #fef9c3; color: #a16207; }
.badge-info    { background: #dbeafe; color: #1d4ed8; }
.badge-neutral { background: #f3f4f6; color: #6b7280; }

/* ---- Signal card ---- */
.signal-card {
    position: relative;
    overflow: hidden;
    transition: all .2s ease;
}
.signal-card:hover {
    box-shadow: 0 4px 16px rgba(2,132,199,.08);
}
.signal-feedback-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 20;
    border-radius: inherit;
}
.signal-card-win-burst {
    animation: signal-win-pop .8s cubic-bezier(.2,.8,.2,1);
}
.signal-card-loss-burst {
    animation: signal-loss-shake .72s cubic-bezier(.36,.07,.19,.97);
}
.signal-card-loss-burst::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center, rgba(248, 113, 113, 0.2) 0%, rgba(248, 113, 113, 0) 62%);
    animation: signal-loss-fade .72s ease-out;
    pointer-events: none;
}
.signal-confetti-piece {
    position: absolute;
    top: -10%;
    left: var(--left, 50%);
    width: .6rem;
    height: 1rem;
    border-radius: .2rem;
    background: var(--color, #34d399);
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(var(--rotate, 0deg));
    animation: signal-confetti-fall var(--duration, .95s) cubic-bezier(.2,.8,.2,1) forwards;
    animation-delay: var(--delay, 0s);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}
.signal-loss-ring {
    position: absolute;
    inset: 18%;
    border-radius: 9999px;
    border: 2px solid rgba(239, 68, 68, 0.25);
    animation: signal-loss-ring .72s ease-out forwards;
}
@keyframes signal-win-pop {
    0% { transform: scale(1); box-shadow: 0 10px 30px rgba(16, 185, 129, 0); }
    35% { transform: scale(1.015); box-shadow: 0 18px 38px rgba(16, 185, 129, 0.16); }
    100% { transform: scale(1); box-shadow: 0 4px 16px rgba(2,132,199,.08); }
}
@keyframes signal-loss-shake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-5px); }
    30% { transform: translateX(4px); }
    45% { transform: translateX(-4px); }
    60% { transform: translateX(3px); }
    75% { transform: translateX(-2px); }
}
@keyframes signal-loss-fade {
    0% { opacity: 0; }
    25% { opacity: 1; }
    100% { opacity: 0; }
}
@keyframes signal-confetti-fall {
    0% {
        opacity: 0;
        transform: translate3d(0, -24px, 0) rotate(var(--rotate, 0deg)) scale(.75);
    }
    12% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--drift-x, 0px), var(--drift-y, 240px), 0) rotate(calc(var(--rotate, 0deg) + 220deg)) scale(1);
    }
}
@keyframes signal-loss-ring {
    0% {
        opacity: 0;
        transform: scale(.72);
    }
    30% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(1.22);
    }
}

/* ---- Stat card ---- */
.stat-card {
    padding: 1.25rem 1.5rem;
}
.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
}
.stat-card .stat-label {
    font-size: .8125rem;
    color: #6b7280;
    margin-top: .25rem;
}

/* ---- Direction indicators ---- */
.direction-up {
    color: #16a34a;
    font-weight: 700;
}
.direction-down {
    color: #dc2626;
    font-weight: 700;
}

/* ---- Dashboard Sidebar ---- */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .625rem .875rem;
    font-size: .875rem;
    font-weight: 500;
    color: #6b7280;
    border-radius: .75rem;
    transition: all .15s ease;
}
.sidebar-link:hover {
    background-color: #f3f4f6;
    color: #111827;
}
.sidebar-link.active {
    background-color: #eff6ff;
    color: #0284c7;
}

/* ---- Pulse dot for active signals ---- */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1);   }
    50%      { opacity: .5; transform: scale(1.3); }
}
.pulse-dot {
    width: .5rem;
    height: .5rem;
    background: #16a34a;
    border-radius: 9999px;
    animation: pulse-dot 2s ease-in-out infinite;
}

/* ---- Pricing card highlight ---- */
.pricing-popular {
    border-color: #0284c7;
    box-shadow: 0 4px 24px rgba(2,132,199,.12);
    position: relative;
}
.pricing-popular::after {
    content: 'Популярный';
    position: absolute;
    top: -.75rem;
    right: 1rem;
    padding: .125rem .625rem;
    font-size: .6875rem;
    font-weight: 600;
    color: #fff;
    background: #0284c7;
    border-radius: 9999px;
}

/* ---- Hero gradient ---- */
.hero-gradient {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 40%, #38bdf8 100%);
}

/* ---- Floating animation ---- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* ---- Skeleton loading ---- */
@keyframes shimmer {
    0%   { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 50%, #f3f4f6 100%);
    background-size: 200px 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: .5rem;
}
.signal-loading-shell {
    position: relative;
    overflow: hidden;
    border-color: rgba(191, 219, 254, 0.9);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 20px 45px rgba(14, 116, 144, 0.08);
}
.signal-loading-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .875rem;
    border-radius: 9999px;
    background: rgba(14, 165, 233, 0.08);
    color: #0369a1;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.signal-loading-orb {
    width: .65rem;
    height: .65rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
    box-shadow: 0 0 0 8px rgba(14, 165, 233, 0.12);
    animation: pulse-dot 1.8s ease-in-out infinite;
}
.signal-loading-copy {
    color: #64748b;
    font-size: .9375rem;
    font-weight: 500;
}
.signal-loading-dots {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.signal-loading-dots span {
    width: .45rem;
    height: .45rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #60a5fa 0%, #0ea5e9 100%);
    opacity: .35;
    animation: signal-loading-bounce 1.1s ease-in-out infinite;
}
.signal-loading-dots span:nth-child(2) { animation-delay: .15s; }
.signal-loading-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes signal-loading-bounce {
    0%, 100% { transform: translateY(0); opacity: .35; }
    50% { transform: translateY(-4px); opacity: 1; }
}
.signal-loading-shell .skeleton-shimmer {
    position: relative;
    overflow: hidden;
    background: #e8eef7;
}
.signal-loading-shell .skeleton-shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.68) 40%,
        rgba(255,255,255,0.9) 50%,
        rgba(255,255,255,0.68) 60%,
        transparent 100%
    );
    background-size: 300% 100%;
    animation: signal-card-shimmer 1.6s infinite ease-in-out;
}
@keyframes signal-card-shimmer {
    0% { background-position: 150% 50%; }
    100% { background-position: -150% 50%; }
}

/* ---- Scrollbar ---- */
html {
    scrollbar-width: none;
    scrollbar-color: transparent transparent;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* ---- Selection ---- */
::selection {
    background: #bae6fd;
    color: #0c4a6e;
}

/* ---- Safe Area Utility ---- */
.pb-safe {
    padding-bottom: env(safe-area-inset-bottom);
}

/* ---- Responsive fixes ---- */
@media (max-width: 640px) {
    .stat-card .stat-value { font-size: 1.5rem; }
    .card-body { padding: 1rem; }
    .card-header { padding: 1rem; }
    
    /* Hide desktop sidebar on mobile when bottom nav is active */
    aside.w-full.lg\:w-64.shrink-0 {
        display: none;
    }
    
    /* Ensure content takes full width */
    .flex.flex-col.lg\:flex-row {
        flex-direction: column;
    }
}

/* ============================================
   PREMIUM DARK MODE DESIGN
   ============================================ */
.dark body {
    background-color: #020617; /* Deepest Indigo */
    color: #94a3b8; /* Slate 400 */
}

/* Backgrounds */
.dark .bg-white { background-color: #0f172a !important; } /* Slate 900 */
.dark .bg-gray-50 { background-color: #1e293b !important; } /* Slate 800 */
.dark .bg-gray-100 { background-color: #334155 !important; } /* Slate 700 */

/* Borders */
.dark .border-gray-100 { border-color: #1e293b !important; }
.dark .border-gray-200 { border-color: #334155 !important; }
.dark .border-gray-300 { border-color: #475569 !important; }

/* Text colors */
.dark .text-gray-900 { color: #f8fafc !important; } /* White/Slate 50 */
.dark .text-gray-800 { color: #f1f5f9 !important; }
.dark .text-gray-700 { color: #cbd5e1 !important; }
.dark .text-gray-600 { color: #94a3b8 !important; }
.dark .text-gray-500 { color: #64748b !important; }
.dark .text-gray-400 { color: #475569 !important; }

/* Cards & Components */
.dark .card {
    background: #0f172a;
    border: 1px solid rgba(51, 65, 85, 0.5);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.dark .card-header {
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.dark .card-footer {
    background-color: transparent !important;
    border-top: 1px solid rgba(51, 65, 85, 0.5) !important;
}

.dark .sidebar-link {
    color: #64748b;
}

.dark .sidebar-link:hover {
    background-color: rgba(30, 41, 59, 0.5);
    color: #f8fafc;
}

.dark .sidebar-link.active {
    background-color: rgba(38, 126, 255, 0.15);
    color: #60a5fa;
    box-shadow: inset 2px 0 0 #267eff;
}

.dark .sidebar-link.active svg {
    color: #267eff;
}

/* Fix for stat numbers in Dark Mode */
.dark .stat-value {
    color: #f8fafc !important;
}
.dark .stat-label {
    color: #94a3b8 !important;
}

/* Badges in Dark Mode */
.dark .badge-success {
    background-color: rgba(52, 211, 153, 0.1) !important;
    color: #34d399 !important;
    border: 1px solid rgba(52, 211, 153, 0.2);
}
.dark .badge-warning {
    background-color: rgba(59, 130, 246, 0.1) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
}
.dark .badge-danger {
    background-color: rgba(248, 113, 113, 0.1) !important;
    color: #f87171 !important;
    border: 1px solid rgba(248, 113, 113, 0.2);
}
.dark .badge-info {
    background-color: rgba(38, 126, 255, 0.1) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(38, 126, 255, 0.2);
}
.dark .badge-neutral {
    background-color: rgba(148, 163, 184, 0.1) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Data Table in Dark Mode */
.dark .data-table thead {
    background-color: #1e293b !important;
}
.dark .data-table th {
    border-bottom: 1px solid rgba(51, 65, 85, 0.8) !important;
    color: #94a3b8 !important;
}
.dark .data-table td {
    border-bottom: 1px solid rgba(51, 65, 85, 0.4) !important;
    color: #cbd5e1 !important;
}
.dark .table-container {
    border: 1px solid rgba(51, 65, 85, 0.5) !important;
}

/* Footer & Mobile Nav in Dark Mode */
.dark footer {
    background-color: #020617 !important;
    border-top: 1px solid rgba(51, 65, 85, 0.5) !important;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    color: #2563eb;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.footer-social-link:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    transform: translateY(-1px);
}

.footer-social-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.dark .footer-social-link {
    border-color: #334155;
    background: #111827;
    color: #60a5fa;
}

.dark .footer-social-link:hover {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.14);
    color: #93c5fd;
}

.dark .md\:hidden.fixed.bottom-0 {
    background-color: rgba(15, 23, 42, 0.9) !important;
    border-top: 1px solid rgba(51, 65, 85, 0.5) !important;
    backdrop-filter: blur(12px);
}

/* Modal in Dark Mode */
.payment-modal-dialog {
    width: min(100%, 27rem);
    max-height: min(92vh, 60rem);
}

.payment-modal-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-modal-main {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-card-grid,
.payment-crypto-grid {
    display: grid;
    gap: 0.75rem;
    align-items: stretch;
}

.payment-card-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
    height: 100%;
}

.payment-info-card {
    min-width: 0;
    height: 100%;
}

.payment-card-box {
    min-height: 4rem;
    min-width: 0;
    overflow: hidden;
}

.payment-card-value {
    min-width: 0;
    white-space: normal;
    word-break: break-word;
    font-size: 0.95rem;
    line-height: 1.25;
    letter-spacing: 0.015em;
}

.payment-crypto-info-card {
    min-height: 7.25rem;
}

.payment-crypto-status-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

#crypto-status-text,
#crypto-amount-text {
    line-height: 1.25;
}

#crypto-currency-text {
    line-height: 1.35;
}

#crypto-status-badge {
    align-self: flex-start;
}

.manual-payment-status-card {
    position: relative;
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.875rem;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 1rem;
    padding: 0.9rem 0.95rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255,255,255,0.85);
}

.manual-payment-status-card.hidden {
    display: none;
}

.manual-payment-status-glow {
    position: absolute;
    inset: -45% auto auto -12%;
    width: 7rem;
    height: 7rem;
    border-radius: 9999px;
    background: rgba(148, 163, 184, 0.1);
    filter: blur(24px);
    pointer-events: none;
}

.manual-payment-status-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.92));
    backdrop-filter: blur(10px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.72),
        0 6px 14px rgba(15, 23, 42, 0.05);
}

.manual-payment-status-body {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.manual-payment-status-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
}

.manual-payment-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.18rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}

.manual-payment-status-text {
    margin-top: 0.28rem;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
}

.manual-payment-status-pending {
    border-color: rgba(245, 158, 11, 0.2);
    box-shadow:
        inset 3px 0 0 rgba(245, 158, 11, 0.9),
        0 10px 30px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255,255,255,0.85);
}

.manual-payment-status-pending .manual-payment-status-glow {
    background: rgba(251, 191, 36, 0.14);
}

.manual-payment-status-pending .manual-payment-status-icon {
    color: #b96a10;
    border-color: rgba(253, 230, 138, 0.8);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(254, 243, 199, 0.88));
}

.manual-payment-status-pending .manual-payment-status-badge {
    color: #a95508;
    background: rgba(255, 237, 213, 0.95);
    border-color: rgba(245, 158, 11, 0.18);
}

.manual-payment-status-review {
    border-color: rgba(14, 165, 233, 0.22);
    box-shadow:
        inset 3px 0 0 rgba(14, 165, 233, 0.95),
        0 10px 30px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255,255,255,0.85);
}

.manual-payment-status-review .manual-payment-status-glow {
    background: rgba(34, 211, 238, 0.16);
}

.manual-payment-status-review .manual-payment-status-icon {
    color: #0f6fa2;
    border-color: rgba(125, 211, 252, 0.82);
    background: linear-gradient(180deg, rgba(240, 249, 255, 0.98), rgba(224, 242, 254, 0.9));
}

.manual-payment-status-review .manual-payment-status-badge {
    color: #075985;
    background: rgba(224, 242, 254, 0.98);
    border-color: rgba(14, 165, 233, 0.22);
}

.manual-payment-status-approved {
    border-color: rgba(16, 185, 129, 0.2);
    box-shadow:
        inset 3px 0 0 rgba(16, 185, 129, 0.95),
        0 10px 30px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255,255,255,0.85);
}

.manual-payment-status-approved .manual-payment-status-glow {
    background: rgba(45, 212, 191, 0.14);
}

.manual-payment-status-approved .manual-payment-status-icon {
    color: #0f766e;
    border-color: rgba(153, 246, 228, 0.82);
    background: linear-gradient(180deg, rgba(240, 253, 250, 0.98), rgba(204, 251, 241, 0.9));
}

.manual-payment-status-approved .manual-payment-status-badge {
    color: #0f766e;
    background: rgba(236, 253, 245, 0.98);
    border-color: rgba(16, 185, 129, 0.2);
}

.manual-payment-status-canceled {
    border-color: rgba(244, 63, 94, 0.2);
    box-shadow:
        inset 3px 0 0 rgba(244, 63, 94, 0.92),
        0 10px 30px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255,255,255,0.85);
}

.manual-payment-status-canceled .manual-payment-status-glow {
    background: rgba(251, 113, 133, 0.14);
}

.manual-payment-status-canceled .manual-payment-status-icon {
    color: #be123c;
    border-color: rgba(253, 164, 175, 0.8);
    background: linear-gradient(180deg, rgba(255, 241, 242, 0.98), rgba(255, 228, 230, 0.9));
}

.manual-payment-status-canceled .manual-payment-status-badge {
    color: #be123c;
    background: rgba(255, 241, 242, 0.98);
    border-color: rgba(244, 63, 94, 0.18);
}

.payment-modal-methods,
.payment-panel,
#payment-card-instructions,
#payment-crypto-instructions,
.payment-modal-footer {
    width: 100%;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.payment-modal-footer {
    align-items: stretch;
}

@media (max-width: 420px) {
    .payment-modal-dialog {
        width: min(100%, 100vw - 1rem);
        max-height: min(100vh - 1rem, 100dvh - 1rem);
        border-radius: 1.25rem;
    }

    #payment-modal .payment-method-btn {
        min-height: 3.125rem;
        font-size: 0.875rem;
        line-height: 1.2;
    }

    .payment-card-value {
        font-size: 0.9rem;
        letter-spacing: 0.02em;
    }

    #payment-modal .payment-modal-footer a,
    #payment-modal .payment-modal-footer button {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 640px) {
    .payment-modal-dialog {
        width: min(100%, 31rem);
        max-height: min(88vh, 46rem);
    }
}

@media (min-width: 768px) {
    .payment-modal-dialog {
        width: min(100%, 32rem);
    }

    .payment-card-grid {
        grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr);
        align-items: start;
    }

    .payment-crypto-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .payment-crypto-grid > #crypto-link-box {
        grid-column: 1 / -1;
    }

    .payment-panel-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #payment-crypto-panel .payment-panel-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #payment-crypto-panel .payment-panel-actions > :first-child {
        grid-column: 1 / -1;
    }

    .payment-modal-footer {
        flex-direction: row;
        align-items: center;
    }

    .payment-modal-footer > button {
        width: auto;
        min-width: 10rem;
    }

    .payment-modal-footer > a {
        flex: 1;
    }
}

@media (min-width: 768px) and (max-width: 920px) {
    .payment-card-value {
        font-size: 0.88rem;
        letter-spacing: 0.01em;
    }
}

@media (min-width: 1024px) {
    .payment-modal-dialog {
        width: min(100%, 34rem);
        max-height: min(86vh, 46rem);
    }
}

@media (min-width: 1800px) {
    .payment-modal-dialog {
        width: min(100%, 36rem);
        max-height: min(84vh, 47rem);
        padding: 1.25rem 1.35rem;
    }

    .payment-modal-title {
        font-size: 1.5rem;
    }

    .payment-modal-plan {
        font-size: 1rem;
    }

    #payment-modal .payment-method-btn,
    #payment-modal .payment-panel button,
    #payment-modal .payment-modal-footer button,
    #payment-modal .payment-modal-footer a {
        font-size: 1rem;
    }
}

.dark #payment-modal .bg-white {
    background-color: #0f172a !important;
    border: 1px solid rgba(51, 65, 85, 0.5);
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}
.dark #payment-modal .text-gray-900 { color: #f8fafc !important; }
.dark #payment-modal .bg-gray-50 { background-color: #1e293b !important; }
/* Input boxes inside modal: make them deeper than the modal background */
.dark #payment-modal .bg-white.border { 
    background-color: #020617 !important; 
    border-color: rgba(51, 65, 85, 0.8) !important; 
}
.dark .manual-payment-status-card {
    border-color: rgba(51, 65, 85, 0.72);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98));
    box-shadow:
        0 18px 34px rgba(2, 6, 23, 0.34),
        inset 0 1px 0 rgba(148, 163, 184, 0.06);
}

.dark .manual-payment-status-icon {
    border-color: rgba(71, 85, 105, 0.7);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.92));
}

.dark .manual-payment-status-label {
    color: #a8b4c7;
}

.dark .manual-payment-status-text {
    color: #f8fafc;
}

.dark .manual-payment-status-pending {
    border-color: rgba(245, 158, 11, 0.24);
    box-shadow:
        inset 3px 0 0 rgba(251, 191, 36, 0.9),
        0 18px 34px rgba(2, 6, 23, 0.34),
        inset 0 1px 0 rgba(148, 163, 184, 0.05);
}

.dark .manual-payment-status-review {
    border-color: rgba(34, 211, 238, 0.24);
    box-shadow:
        inset 3px 0 0 rgba(34, 211, 238, 0.95),
        0 18px 34px rgba(2, 6, 23, 0.34),
        inset 0 1px 0 rgba(148, 163, 184, 0.05);
}

.dark .manual-payment-status-approved {
    border-color: rgba(45, 212, 191, 0.24);
    box-shadow:
        inset 3px 0 0 rgba(45, 212, 191, 0.95),
        0 18px 34px rgba(2, 6, 23, 0.34),
        inset 0 1px 0 rgba(148, 163, 184, 0.05);
}

.dark .manual-payment-status-canceled {
    border-color: rgba(251, 113, 133, 0.24);
    box-shadow:
        inset 3px 0 0 rgba(251, 113, 133, 0.92),
        0 18px 34px rgba(2, 6, 23, 0.34),
        inset 0 1px 0 rgba(148, 163, 184, 0.05);
}

.dark .manual-payment-status-pending .manual-payment-status-icon,
.dark .manual-payment-status-review .manual-payment-status-icon,
.dark .manual-payment-status-approved .manual-payment-status-icon,
.dark .manual-payment-status-canceled .manual-payment-status-icon {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.92));
}

.dark .manual-payment-status-pending .manual-payment-status-badge {
    background: rgba(120, 53, 15, 0.28);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.2);
}

.dark .manual-payment-status-review .manual-payment-status-badge {
    background: rgba(8, 47, 73, 0.42);
    color: #67e8f9;
    border-color: rgba(34, 211, 238, 0.22);
}

.dark .manual-payment-status-approved .manual-payment-status-badge {
    background: rgba(19, 78, 74, 0.34);
    color: #5eead4;
    border-color: rgba(45, 212, 191, 0.22);
}

.dark .manual-payment-status-canceled .manual-payment-status-badge {
    background: rgba(76, 5, 25, 0.32);
    color: #fda4af;
    border-color: rgba(251, 113, 133, 0.22);
}
.dark #payment-modal .border-t { border-color: rgba(51, 65, 85, 0.3) !important; }
.dark #payment-modal .text-gray-600 { color: #cbd5e1 !important; }
.dark #payment-modal .text-gray-500 { color: #94a3b8 !important; }
.dark #payment-modal .bg-gray-100 { background-color: #1e293b !important; color: #f8fafc !important; border: 1px solid rgba(51, 65, 85, 0.5); }
.dark #payment-modal .bg-gray-100:hover { background-color: #334155 !important; border-color: rgba(51, 65, 85, 0.8); }
.dark #payment-modal .payment-method-btn.bg-white {
    background-color: #0b1220 !important;
    border-color: rgba(51, 65, 85, 0.8) !important;
    color: #cbd5e1 !important;
}
.dark #payment-modal .payment-method-btn.bg-primary-50 {
    background-color: rgba(8, 107, 255, 0.16) !important;
    border-color: rgba(59, 130, 246, 0.45) !important;
    color: #bfdbfe !important;
}
.dark #payment-modal #payment-crypto-instructions {
    background-color: rgba(6, 78, 59, 0.22) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #a7f3d0 !important;
}

/* Animation for the primary check button in dark mode */
.dark #check-payment-btn {
    box-shadow: 0 4px 14px 0 rgba(38, 126, 255, 0.3);
}
.dark #check-payment-btn:hover {
    box-shadow: 0 6px 20px rgba(38, 126, 255, 0.4);
    transform: translateY(-1px);
}

/* Sidebar ID Badge */
.dark aside .bg-gray-50\/80 {
    background-color: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(51, 65, 85, 0.5) !important;
}

/* Nav links in header */
.dark nav {
    background-color: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(51, 65, 85, 0.5) !important;
}

.dark .nav-link {
    color: #94a3b8;
}

.dark .nav-link:hover {
    color: #f8fafc;
    background-color: rgba(30, 41, 59, 0.5);
}

.dark .nav-link-active, .dark .nav-link.active {
    background-color: rgba(38, 126, 255, 0.1);
    color: #60a5fa;
}

/* Success/Error Badges */
.dark .bg-emerald-50, .dark .bg-emerald-100 {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.dark .bg-red-50, .dark .bg-red-100 {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.dark .bg-primary-50 { background-color: rgba(38, 126, 255, 0.08) !important; }

/* Inputs */
.dark .input,
.dark .form-input {
    background-color: #020617;
    border-color: #1e293b;
    color: #f8fafc;
}
.dark .input:focus,
.dark .form-input:focus {
    border-color: #267eff;
    box-shadow: 0 0 0 2px rgba(38, 126, 255, 0.1);
}

.dark .input:disabled,
.dark .form-input:disabled {
    background-color: rgba(30, 41, 59, 0.5) !important;
    color: #64748b !important;
    border-color: rgba(51, 65, 85, 0.5) !important;
    cursor: not-allowed;
}

/* Textarea refinement */
textarea.input,
textarea.form-input {
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
    line-height: 1.6;
    resize: vertical;
    min-height: 120px;
}

.dark .form-label {
    color: #94a3b8 !important;
}

/* Settings & Sessions specific */
.dark .border-primary-100 { border-color: rgba(38, 126, 255, 0.2) !important; }
.dark .bg-primary-50\/50 { background-color: rgba(38, 126, 255, 0.05) !important; }
.dark .sm\:border-l.border-primary-100\/50 { border-left-color: rgba(38, 126, 255, 0.2) !important; }

.dark .w-10.h-10.bg-white.text-primary-600 {
    background-color: #1e293b !important;
    color: #60a5fa !important;
}

.dark .text-emerald-700 { color: #34d399 !important; }
.dark .bg-emerald-100 { background-color: rgba(52, 211, 153, 0.1) !important; }

/* Action buttons in sessions */
.dark .bg-white.border-gray-200.text-gray-500 {
    background-color: #1e293b !important;
    border-color: rgba(51, 65, 85, 0.5) !important;
    color: #94a3b8 !important;
}

.dark .bg-white.border-gray-200.text-gray-500:hover {
    background-color: #334155 !important;
    color: #f8fafc !important;
}

/* Global Text Visibility in Dark Mode */
.dark .text-gray-900 { color: #f8fafc !important; }
.dark .text-gray-800 { color: #f1f5f9 !important; }
.dark .text-gray-700 { color: #cbd5e1 !important; }
.dark .text-gray-600 { color: #94a3b8 !important; }
.dark .text-gray-500 { color: #64748b !important; }
.dark .text-gray-400 { color: #94a3b8 !important; } /* Lightened for visibility */
.dark .text-gray-300 { color: #cbd5e1 !important; } /* Lightened for visibility */

.dark .text-gray-500.mt-1 { color: #94a3b8 !important; } /* Subtitles */
.dark .font-semibold.text-gray-900 { color: #f8fafc !important; } /* Field values */
.dark .font-mono.text-gray-900 { color: #60a5fa !important; } /* IDs */

.dark .border-gray-100 { border-color: rgba(51, 65, 85, 0.4) !important; }
.dark .bg-white { background-color: #0f172a !important; } /* Fix for session card background */

/* Pricing & Plans in Dark Mode */
.dark .card-body .bg-gray-50 {
    background-color: rgba(30, 41, 59, 0.5) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(51, 65, 85, 0.3);
}

.dark .line-through {
    color: #475569 !important;
    opacity: 0.6;
}

.dark .text-emerald-500 { color: #34d399 !important; }

.dark ul li.text-gray-600 { color: #cbd5e1 !important; }
.dark ul li.text-gray-400.line-through { color: #475569 !important; }

.dark .pricing-popular {
    border-color: rgba(38, 126, 255, 0.5) !important;
    background-color: rgba(15, 23, 42, 0.6) !important;
}

.dark .pricing-popular::after {
    background: #267eff !important;
    box-shadow: 0 0 10px rgba(38, 126, 255, 0.4);
}

.dark .pricing-popular::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 1.5rem;
    padding: 1px;
    background: linear-gradient(to bottom, rgba(38, 126, 255, 0.5), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 0;
}

.dark .pricing-popular {
    z-index: 1;
}

.dark .pricing-popular .text-gray-500 { color: #94a3b8 !important; }

.dark .card[class*="bg-primary-50"] {
    background-color: rgba(38, 126, 255, 0.05) !important;
    border-color: rgba(38, 126, 255, 0.3) !important;
}

.dark .text-xs.uppercase {
    color: #94a3b8 !important;
    letter-spacing: 0.05em;
}

/* Table styling */
.dark .data-table thead { background-color: #1e293b; }
.dark .data-table th { color: #94a3b8; border-bottom-color: #334155; }
.dark .data-table td { color: #cbd5e1; border-bottom-color: #1e293b; }
.dark tr:hover td { background-color: rgba(30, 41, 59, 0.3); }

/* Buttons refinement */
.dark .btn-secondary {
    background-color: #1e293b;
    color: #cbd5e1;
    border-color: #334155;
}
.dark .btn-secondary:hover {
    background-color: #334155;
    color: #f8fafc;
}


/* Mobile Bottom Nav */
.dark .md\:hidden.fixed.bottom-0 {
    background-color: rgba(2, 6, 23, 0.9) !important;
    border-top-color: #1e293b !important;
}

/* Home Page Hero Dark Mode */
.dark .hero-gradient {
    background: linear-gradient(135deg, #020617 0%, #0f172a 40%, #1e293b 100%);
}

.dark .hero-gradient svg path:last-child {
    fill: #020617 !important;
}

.dark .hero-gradient svg path:first-child {
    fill: #0f172a !important;
    fill-opacity: 0.5;
}

/* Feature Icons in Dark mode */
.dark .bg-primary-100 { background-color: rgba(38, 126, 255, 0.1) !important; }
.dark .text-primary-600 { color: #60a5fa !important; }

.dark .bg-emerald-100 { background-color: rgba(16, 185, 129, 0.1) !important; }
.dark .text-emerald-600 { color: #34d399 !important; }

.dark .bg-violet-100 { background-color: rgba(139, 92, 246, 0.1) !important; }
.dark .text-violet-600 { color: #a78bfa !important; }

/* Pricing Cards inside Home */
.dark #pricing .bg-blue-600 { background-color: #2563eb !important; }
.dark #pricing .bg-gray-900 { background-color: #020617 !important; border: 1px solid #1e293b; }
.dark #pricing .bg-emerald-600 { background-color: #059669 !important; }

/* Special styling for the Forever card in Dark Mode */
.dark .card.from-gray-900 {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.15) !important;
}

/* Pulse dots */
.dark .pulse-dot { background-color: #3b82f6; }
.dark .pulse-dot::after { border-color: #3b82f6; }

/* Result Badges */
.badge-result {
    display: inline-flex;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-won { background-color: #ecfdf5; color: #065f46; }
.badge-lost { background-color: #fef2f2; color: #991b1b; }
.badge-unknown { background-color: #f3f4f6; color: #6b7280; }

.dark .badge-won { background-color: rgba(52, 211, 153, 0.15) !important; color: #34d399 !important; border: none; }
.dark .badge-lost { background-color: rgba(248, 113, 113, 0.15) !important; color: #f87171 !important; border: none; }
.dark .badge-unknown { background-color: rgba(148, 163, 184, 0.1) !important; color: #94a3b8 !important; border: none; }

/* Alerts */
.alert-warning {
    padding: 1rem;
    background-color: #fffbeb;
    color: #92400e;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}
.dark .alert-warning {
    background-color: rgba(251, 191, 36, 0.05) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.dark .direction-up { color: #34d399 !important; }
.dark .direction-down { color: #f87171 !important; }

/* Global Component Overrides for Dark Mode */
.dark #preloader { background-color: #020617 !important; }
.dark #preloader .text-gray-400 { color: #475569 !important; }

.dark #mobile-menu {
    background-color: rgba(15, 23, 42, 0.98) !important;
    border-color: rgba(51, 65, 85, 0.8) !important;
}
.dark .mobile-nav-link {
    color: #94a3b8 !important;
    border-bottom: 1px solid rgba(51, 65, 85, 0.4) !important;
}
.dark .mobile-nav-link:hover {
    background-color: rgba(30, 41, 59, 0.5) !important;
    color: #f8fafc !important;
}
.dark #mobile-menu .bg-gray-50 {
    background-color: rgba(30, 41, 59, 0.6) !important;
}

/* Signals refinements */
.dark .signal-card {
    background-color: #0f172a !important;
    border-color: rgba(51, 65, 85, 0.5) !important;
}
.dark .signal-card .border-gray-100 { border-color: rgba(51, 65, 85, 0.5) !important; }
.dark .signal-confetti-piece {
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.4);
}
.dark .signal-loss-ring {
    border-color: rgba(248, 113, 113, 0.32);
}
.dark .signal-loading-shell {
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.1), transparent 30%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(2, 6, 23, 0.96) 100%) !important;
    border-color: rgba(56, 189, 248, 0.2) !important;
    box-shadow: 0 24px 50px rgba(2, 6, 23, 0.45) !important;
}
.dark .signal-loading-badge {
    background: rgba(14, 165, 233, 0.16) !important;
    color: #7dd3fc !important;
}
.dark .signal-loading-copy {
    color: #94a3b8 !important;
}

.dark .skeleton-shimmer { background: #1e293b !important; }
.dark .skeleton-shimmer::after {
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 40%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 60%, transparent 100%) !important;
}

#toast-container {
    position: fixed;
    top: max(1.15rem, env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    width: min(36rem, calc(100vw - 1.5rem));
    max-width: calc(100vw - 1.5rem);
    pointer-events: none;
}

.toast-item,
.auth-form__alert {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: fit-content;
    max-width: 100%;
    padding: var(--toast-pad, 0.85rem 1.15rem 0.85rem 0.95rem);
    border: 0;
    border-radius: 999px;
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    pointer-events: auto;
}

.toast-item {
    animation: toastIn 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.toast-item--out {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.26s ease, transform 0.26s ease;
}

.toast-item--error,
.auth-form__alert--error {
    background: #ff4d4d;
}

.toast-item--success,
.auth-form__alert--success {
    background: #22c55e;
}

.toast-item--info {
    background: #0a84ff;
}

.toast-item__icon,
.auth-form__alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    flex-shrink: 0;
}

.toast-item__icon svg,
.auth-form__alert-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.toast-item--error .toast-item__icon,
.auth-form__alert--error .auth-form__alert-icon { color: #ff4d4d; }
.toast-item--success .toast-item__icon,
.auth-form__alert--success .auth-form__alert-icon { color: #22c55e; }
.toast-item--info .toast-item__icon { color: #0a84ff; }

.toast-item__text,
.auth-form__alert-text {
    margin: 0;
    font-size: var(--type-sm, 0.9375rem);
    font-weight: 600;
    line-height: 1.35;
    color: #fff;
    overflow-wrap: anywhere;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dark .bg-emerald-50 { background-color: rgba(16, 185, 129, 0.1) !important; }
.dark .bg-red-50 { background-color: rgba(239, 68, 68, 0.1) !important; }
.dark .bg-sky-50 { background-color: rgba(14, 165, 233, 0.12) !important; }
.dark .text-sky-600 { color: #38bdf8 !important; }

/* Alerts in dark mode */
.dark .alert-success { background-color: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); color: #34d399; }
.dark .alert-error, .dark .alert-danger { background-color: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.2); color: #f87171; }

/* Internal scrollbars only — page chrome stays without a gutter */
.table-container::-webkit-scrollbar,
.overflow-x-auto::-webkit-scrollbar,
.form-input::-webkit-scrollbar,
select::-webkit-scrollbar,
[style*="overflow-y: auto"]::-webkit-scrollbar,
[style*="overflow-y: scroll"]::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-container::-webkit-scrollbar-track,
.overflow-x-auto::-webkit-scrollbar-track {
    background: transparent !important;
}

.table-container::-webkit-scrollbar-thumb,
.overflow-x-auto::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 20px;
}


/* Navigation Glassmorphism Dark */
.dark nav {
    background-color: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(51, 65, 85, 0.5) !important;
}
.dark .nav-link { color: #94a3b8; }
.dark .nav-link:hover { color: #f8fafc; background-color: rgba(30, 41, 59, 0.5); }
.dark .nav-link-active { background-color: #1e293b; color: #60a5fa; }

/* Signal Ability Card Fixes */
.dark #signal-ability-card .text-gray-500 { color: #94a3b8 !important; }
.dark #signal-ability-card .font-semibold.text-primary-600.border {
    background-color: rgba(30, 41, 59, 0.5) !important;
    border-color: rgba(51, 65, 85, 0.8) !important;
    color: #60a5fa !important;
    padding-left: 0.625rem !important;
    padding-right: 0.625rem !important;
}

/* Fix for global gray-500 that might be too dark */
.dark .text-gray-500 { color: #94a3b8 !important; }
.dark .text-gray-400 { color: #64748b !important; }

/* Form Elements Dark Mode */
.dark .input,
.dark .form-input,
.dark select.form-input {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}
.dark .input:focus,
.dark .form-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
}
.dark .input:disabled,
.dark .form-input:disabled {
    background-color: rgba(30, 41, 59, 0.5) !important;
    color: #64748b !important;
}
.dark .form-label { color: #cbd5e1 !important; }

/* Global Badge Overrides */
.dark .badge-success { background: rgba(22, 163, 74, 0.15) !important; color: #4ade80 !important; border: 1px solid rgba(22, 163, 74, 0.2); }
.dark .badge-danger { background: rgba(220, 38, 38, 0.15) !important; color: #f87171 !important; border: 1px solid rgba(220, 38, 38, 0.2); }
.dark .badge-info { background: rgba(37, 99, 235, 0.15) !important; color: #60a5fa !important; border: 1px solid rgba(37, 99, 235, 0.2); }
.dark .badge-warning { background: rgba(245, 158, 11, 0.15) !important; color: #fbbf24 !important; border: 1px solid rgba(245, 158, 11, 0.2); }
.dark .badge-neutral { background: rgba(148, 163, 184, 0.1) !important; color: #94a3b8 !important; border: 1px solid rgba(148, 163, 184, 0.15); }

/* Card Body bg fixes */
.dark .bg-gray-50 { background-color: rgba(30, 41, 59, 0.5) !important; }

/* User Name Animations & Theme Optimization */
:root {
    --name-emerald-1: #10b981;
    --name-emerald-2: #059669;
    --name-emerald-glow: rgba(16, 185, 129, 0.4);
    --name-emerald-glow-strong: rgba(16, 185, 129, 0.7);

    --name-blue-1: #086bff;
    --name-blue-2: #3b82f6;
    --name-blue-glow: rgba(8, 107, 255, 0.35);
    --name-blue-glow-strong: rgba(8, 107, 255, 0.6);

    --name-purple-1: #7c3aed;
    --name-purple-2: #a855f7;
    --name-purple-glow: rgba(124, 58, 237, 0.35);
    --name-purple-glow-strong: rgba(124, 58, 237, 0.6);

    --name-forever-1: #000000;
    --name-forever-2: #555555;
    --name-forever-glow: rgba(0, 0, 0, 0.15);
    --name-forever-glow-strong: rgba(0, 0, 0, 0.3);
}

.dark {
    --name-emerald-1: #34d399;
    --name-emerald-2: #10b981;
    --name-emerald-glow: rgba(52, 211, 153, 0.3);
    --name-emerald-glow-strong: rgba(52, 211, 153, 0.6);

    --name-blue-1: #60a5fa;
    --name-blue-2: #93c5fd;
    --name-blue-glow: rgba(96, 165, 250, 0.3);
    --name-blue-glow-strong: rgba(96, 165, 250, 0.6);

    --name-purple-1: #c084fc;
    --name-purple-2: #e9d5ff;
    --name-purple-glow: rgba(192, 132, 252, 0.3);
    --name-purple-glow-strong: rgba(192, 132, 252, 0.55);

    --name-forever-1: #ffffff;
    --name-forever-2: #94a3b8;
    --name-forever-glow: rgba(255, 255, 255, 0.2);
    --name-forever-glow-strong: rgba(255, 255, 255, 0.5);
}

@keyframes glow-pulse-green {
    0%, 100% { filter: drop-shadow(0 0 5px var(--name-emerald-glow)); }
    50%      { filter: drop-shadow(0 0 12px var(--name-emerald-glow-strong)); }
}
@keyframes glow-pulse-blue {
    0%, 100% { filter: drop-shadow(0 0 5px var(--name-blue-glow)); }
    50%      { filter: drop-shadow(0 0 12px var(--name-blue-glow-strong)); }
}
@keyframes glow-pulse-purple {
    0%, 100% { filter: drop-shadow(0 0 5px var(--name-purple-glow)); }
    50%      { filter: drop-shadow(0 0 12px var(--name-purple-glow-strong)); }
}
@keyframes glow-pulse-forever {
    0%, 100% { filter: drop-shadow(0 0 8px var(--name-forever-glow)); }
    50%      { filter: drop-shadow(0 0 18px var(--name-forever-glow-strong)); }
}

/* Base Gradient Logic - Ensuring Clip is never lost */
.name-gradient-blue,
.name-gradient-purple,
.name-gradient-black {
    display: inline-block;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    white-space: nowrap;
    text-shadow: 0 0 1px rgba(0,0,0,0.01);
}

/* User Name Gradients by Plan: 1 мес — синий, 3 мес — фиолетовый, навсегда — чёрный */
.name-gradient-blue {
    background-image: linear-gradient(to right, var(--name-blue-1), var(--name-blue-2));
    animation: glow-pulse-blue 2s ease-in-out infinite;
}
.name-gradient-purple {
    background-image: linear-gradient(to right, var(--name-purple-1), var(--name-purple-2));
    animation: glow-pulse-purple 2s ease-in-out infinite;
}
.name-gradient-black {
    background-image: linear-gradient(to right, var(--name-forever-1), var(--name-forever-2));
    animation: glow-pulse-forever 2s ease-in-out infinite;
}

/* Status Icon Solid Colors (for SVGs) */
.icon-status-blue { color: var(--name-blue-1); filter: drop-shadow(0 0 3px var(--name-blue-glow)); }
.icon-status-purple { color: var(--name-purple-1); filter: drop-shadow(0 0 3px var(--name-purple-glow)); }
.icon-status-forever { color: var(--name-forever-1); filter: drop-shadow(0 0 3px var(--name-forever-glow)); }

/* ============================================
   PAYMENT MODAL REDESIGN
   ============================================ */
#payment-modal .payment-modal-dialog {
    width: min(100%, 34rem);
    max-height: min(92vh, 48rem);
    padding: 1.25rem;
    border-radius: 1.75rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background:
        radial-gradient(circle at top, rgba(59, 130, 246, 0.06), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    box-shadow:
        0 32px 80px rgba(15, 23, 42, 0.18),
        0 10px 30px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#payment-modal .payment-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255, 255, 255, 0.9);
    color: #64748b;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#payment-modal .payment-modal-close:hover {
    color: #0f172a;
    border-color: rgba(203, 213, 225, 0.98);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

#payment-modal .payment-modal-content {
    gap: 1.1rem;
}

#payment-modal .payment-modal-header {
    padding-right: 3rem;
}

#payment-modal .payment-modal-hero {
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
}

#payment-modal .payment-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1.1rem;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid rgba(191, 219, 254, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

#payment-modal .payment-modal-headline {
    min-width: 0;
}

#payment-modal .payment-modal-kicker {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
}

#payment-modal .payment-modal-title {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

#payment-modal .payment-modal-plan {
    margin: 0.4rem 0 0;
    font-size: 0.98rem;
    line-height: 1.45;
    font-weight: 600;
    color: #475569;
}

#payment-modal .payment-modal-methods,
#payment-modal .payment-panel,
#payment-modal .payment-modal-footer {
    width: 100%;
    max-width: none;
    margin: 0;
}

#payment-modal .payment-modal-section-label,
#payment-modal .payment-panel-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
}

#payment-modal .payment-modal-section-label {
    margin: 0 0 0.55rem;
}

#payment-modal .payment-method-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.35rem;
    border-radius: 1.1rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(248, 250, 252, 0.95);
}

#payment-modal .payment-method-btn {
    min-height: 3.1rem;
    padding: 0.8rem 1rem;
    border-radius: 0.9rem;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: none;
}

#payment-modal .payment-panel {
    padding: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 1.35rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

#payment-modal .payment-panel-description {
    margin: 0 0 0.85rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #64748b;
}

#payment-modal .payment-card-grid,
#payment-modal .payment-crypto-grid {
    gap: 0.85rem;
}

#payment-modal .payment-card-field {
    gap: 0.5rem;
}

#payment-modal .payment-info-card,
#payment-modal .payment-card-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 1px 1px rgba(15, 23, 42, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

#payment-modal .payment-crypto-info-card,
#payment-modal .payment-crypto-link-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

#payment-modal .payment-card-value,
#payment-modal .payment-amount-value,
#payment-modal .payment-crypto-main-value {
    font-size: 1.06rem;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

#payment-modal .payment-card-value,
#payment-modal .payment-amount-value {
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
}

#payment-modal .payment-crypto-subvalue {
    margin-top: 0.32rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #64748b;
}

#payment-modal .payment-link-value {
    font-size: 0.9rem;
    line-height: 1.45;
    font-weight: 600;
    color: #2563eb;
    word-break: break-word;
}

#payment-modal .payment-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    flex-shrink: 0;
    border-radius: 0.85rem;
    border: 1px solid rgba(191, 219, 254, 0.95);
    background: #eff6ff;
    color: #2563eb;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

#payment-modal .payment-copy-btn:hover {
    background: #dbeafe;
    border-color: rgba(147, 197, 253, 0.98);
    transform: translateY(-1px);
}

#payment-modal #manual-payment-hint,
#payment-modal .payment-inline-hint {
    margin-top: 0.85rem;
    padding: 0.78rem 0.92rem;
    border-radius: 1rem;
    border: 1px solid rgba(191, 219, 254, 0.75);
    background: #f0f7ff;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #1d4ed8;
}

#payment-modal .payment-inline-hint-success {
    border-color: rgba(167, 243, 208, 0.9);
    background: #ecfdf5;
    color: #047857;
}

#payment-modal .payment-panel-actions {
    margin-top: 0.9rem;
}

#payment-modal .payment-action-btn {
    min-height: 3.1rem;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

#payment-modal .payment-action-btn:hover {
    transform: translateY(-1px);
}

#payment-modal .payment-action-btn-primary {
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

#payment-modal .payment-action-btn-success {
    background: linear-gradient(180deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 12px 24px rgba(5, 150, 105, 0.16);
}

#payment-modal .payment-action-btn-dark {
    background: linear-gradient(180deg, #1f2937, #111827);
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

#payment-modal .payment-action-btn-secondary {
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: #f8fafc;
    color: #334155;
}

#payment-modal .payment-action-btn-danger {
    border: none;
    background: #fff1f2;
    color: #e11d48;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.12);
}

#payment-modal .payment-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    align-items: center;
}

#payment-modal .payment-support-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.8rem;
    padding: 0.65rem 1rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #2563eb;
    transition: color 0.18s ease, background-color 0.18s ease;
    text-align: center;
    max-width: 100%;
    line-height: 1.35;
}

#payment-modal .payment-support-link:hover {
    color: #1d4ed8;
    background: rgba(239, 246, 255, 0.82);
}

#payment-modal.payment-page {
    width: 100%;
}

#payment-modal.payment-page .payment-page-dialog {
    width: min(100%, 42rem);
    max-height: none;
    margin: 0;
}

#payment-modal.payment-page .payment-modal-header {
    padding-right: 0;
}

#payment-modal.payment-page .payment-modal-content {
    display: flex;
    flex-direction: column;
}

#payment-modal.payment-page .payment-modal-footer > a {
    width: 100%;
}

@media (max-width: 639px) {
    #payment-modal .payment-modal-dialog {
        width: min(100%, 100vw - 1rem);
        max-height: min(100vh - 1rem, 100dvh - 1rem);
        padding: 1rem;
        border-radius: 1.4rem;
    }

    #payment-modal .payment-modal-header {
        padding-right: 2.5rem;
    }

    #payment-modal .payment-modal-hero {
        gap: 0.8rem;
    }

    #payment-modal .payment-modal-icon {
        width: 3rem;
        height: 3rem;
        border-radius: 1rem;
    }

    #payment-modal .payment-modal-title {
        font-size: 1.18rem;
    }

    #payment-modal .payment-modal-plan {
        font-size: 0.92rem;
    }

    #payment-modal.payment-page .payment-modal-header {
        padding-right: 0;
    }
}

@media (min-width: 768px) {
    #payment-modal .payment-modal-dialog {
        width: min(100%, 35rem);
        padding: 1.35rem;
    }

    #payment-modal .payment-modal-footer > button {
        width: min(100%, 10rem);
    }

    #payment-modal.payment-page .payment-modal-dialog {
        width: min(100%, 42rem);
    }

    #payment-modal.payment-page .payment-modal-footer > a {
        width: min(100%, 14rem);
    }
}

.dark #payment-modal .payment-modal-dialog {
    border-color: rgba(51, 65, 85, 0.78);
    background:
        radial-gradient(circle at top, rgba(59, 130, 246, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
    box-shadow:
        0 32px 90px rgba(2, 6, 23, 0.58),
        inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

.dark #payment-modal .payment-modal-close {
    border-color: rgba(51, 65, 85, 0.82);
    background: rgba(15, 23, 42, 0.88);
    color: #94a3b8;
}

.dark #payment-modal .payment-modal-close:hover {
    color: #f8fafc;
    border-color: rgba(71, 85, 105, 0.98);
    background: rgba(15, 23, 42, 0.98);
}

.dark #payment-modal .payment-modal-kicker,
.dark #payment-modal .payment-modal-section-label,
.dark #payment-modal .payment-panel-label {
    color: #94a3b8;
}

.dark #payment-modal .payment-modal-title,
.dark #payment-modal .payment-card-value,
.dark #payment-modal .payment-amount-value,
.dark #payment-modal .payment-crypto-main-value {
    color: #f8fafc;
}

.dark #payment-modal .payment-modal-plan,
.dark #payment-modal .payment-panel-description,
.dark #payment-modal .payment-crypto-subvalue {
    color: #cbd5e1;
}

.dark #payment-modal .payment-modal-icon {
    border-color: rgba(59, 130, 246, 0.28);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
}

.dark #payment-modal .payment-method-track {
    border-color: rgba(51, 65, 85, 0.78);
    background: rgba(15, 23, 42, 0.9);
}

.dark #payment-modal .payment-panel {
    border-color: rgba(51, 65, 85, 0.76);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98));
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.05);
}

.dark #payment-modal .payment-info-card,
.dark #payment-modal .payment-card-box {
    border-color: rgba(51, 65, 85, 0.82);
    background: rgba(2, 6, 23, 0.92);
}

.dark #payment-modal .payment-copy-btn {
    border-color: rgba(59, 130, 246, 0.28);
    background: rgba(30, 41, 59, 0.98);
    color: #93c5fd;
}

.dark #payment-modal .payment-copy-btn:hover {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(96, 165, 250, 0.34);
}

.dark #payment-modal #manual-payment-hint,
.dark #payment-modal .payment-inline-hint {
    border-color: rgba(59, 130, 246, 0.26);
    background: rgba(8, 47, 73, 0.34);
    color: #93c5fd;
}

.dark #payment-modal .payment-inline-hint-success {
    border-color: rgba(16, 185, 129, 0.28);
    background: rgba(6, 78, 59, 0.3);
    color: #6ee7b7;
}

.dark #payment-modal .payment-action-btn-secondary {
    border-color: rgba(51, 65, 85, 0.82);
    background: rgba(15, 23, 42, 0.9);
    color: #e2e8f0;
}

.dark #payment-modal .payment-action-btn-danger {
    border-color: rgba(244, 63, 94, 0.24);
    background: rgba(76, 5, 25, 0.32);
    color: #fda4af;
}

.dark #payment-modal .payment-modal-footer {
    border-top-color: rgba(51, 65, 85, 0.58);
}

.dark #payment-modal .payment-support-link {
    color: #93c5fd;
}

.dark #payment-modal .payment-support-link:hover {
    color: #bfdbfe;
    background: rgba(30, 41, 59, 0.72);
}

/* Адаптивность: assets/css/responsive.css (единственный слой @media для layout/UI) */


/* ============================================
   SIMPLE PAYMENT PAGE
   ============================================ */
#payment-modal.payment-page {
    width: 100%;
}

#payment-modal.payment-page .payment-page-card {
    width: min(100%, 50rem);
    border: 1px solid #e5e7eb;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

#payment-modal.payment-page .payment-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid #eef2f7;
}

#payment-modal.payment-page .payment-page-eyebrow {
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

#payment-modal.payment-page .payment-page-title {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 800;
    color: #111827;
}

#payment-modal.payment-page .payment-page-subtitle {
    margin-top: 0.4rem;
    font-size: 0.92rem;
    color: #64748b;
}

#payment-modal.payment-page .payment-page-price {
    flex: 0 0 auto;
    padding: 0.55rem 0.75rem;
    border: 1px solid #bfdbfe;
    border-radius: 0.75rem;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 800;
    white-space: nowrap;
}

#payment-modal.payment-page .payment-page-content {
    padding: 1.35rem 1.5rem;
}

#payment-modal.payment-page .payment-modal-section-label,
#payment-modal.payment-page .payment-panel-label {
    margin: 0 0 0.45rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

#payment-modal.payment-page .payment-method-track {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

#payment-modal.payment-page .payment-method-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.9rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 700;
}

#payment-modal.payment-page .payment-method-icon {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
}

#payment-modal.payment-page .payment-method-btn.bg-primary-50 {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #2563eb;
}

#payment-modal.payment-page .payment-page-main {
    margin-top: 1rem;
}

#payment-modal.payment-page .payment-panel {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: none;
}

#payment-modal.payment-page .payment-panel-description {
    margin: 0 0 1rem;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.45;
}

#payment-modal.payment-page .payment-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

#payment-modal.payment-page .payment-card-field {
    min-width: 0;
}

#payment-modal.payment-page .payment-info-card,
#payment-modal.payment-page .payment-card-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 3.5rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #f9fafb;
    box-shadow: none;
}

#payment-modal.payment-page .payment-card-value,
#payment-modal.payment-page .payment-amount-value,
#payment-modal.payment-page .payment-crypto-main-value {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
}

#payment-modal.payment-page .payment-card-value,
#payment-modal.payment-page .payment-amount-value {
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
}

#payment-modal.payment-page .payment-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid #bfdbfe;
    border-radius: 0.65rem;
    background: #eff6ff;
    color: #2563eb;
}

#payment-modal.payment-page .payment-inline-hint,
#payment-modal.payment-page #manual-payment-hint {
    margin-top: 0.85rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #bfdbfe;
    border-radius: 0.75rem;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.9rem;
    line-height: 1.4;
}

#payment-modal.payment-page .payment-inline-hint-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

#payment-modal.payment-page .payment-panel-actions {
    margin-top: 0.9rem;
}

#payment-modal.payment-page .payment-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    box-shadow: none;
}

#payment-modal.payment-page .payment-action-btn:hover {
    transform: none;
}

#payment-modal.payment-page .payment-action-btn-primary,
#payment-modal.payment-page .payment-action-btn-success {
    background: #2563eb;
    color: #fff;
}

#payment-modal.payment-page .payment-action-btn-dark {
    background: #111827;
    color: #fff;
}

#payment-modal.payment-page .payment-action-btn-secondary {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
}

#payment-modal.payment-page .payment-action-btn-danger {
    border: none;
    background: #fff1f2;
    color: #e11d48;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.12);
}

#payment-modal.payment-page .payment-crypto-grid {
    display: grid;
    gap: 0.85rem;
}

#payment-modal.payment-page #payment-crypto-panel .payment-crypto-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

#payment-modal.payment-page #payment-crypto-panel .payment-crypto-link-card {
    grid-column: 1 / -1;
}

#payment-modal.payment-page #payment-crypto-panel .payment-info-card {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 8.25rem;
    padding: 0.9rem;
}

#payment-modal.payment-page #payment-crypto-panel .payment-info-card.hidden {
    display: none;
}

#payment-modal.payment-page #payment-crypto-panel .payment-crypto-link-card {
    min-height: 4.8rem;
    justify-content: flex-start;
}

#payment-modal.payment-page #payment-crypto-panel .payment-crypto-info-card {
    gap: 0.25rem;
}

#payment-modal.payment-page #payment-crypto-panel .payment-crypto-link-card {
    gap: 0.35rem;
}

#payment-modal.payment-page .payment-crypto-status-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
}

#payment-modal.payment-page .payment-crypto-subvalue,
#payment-modal.payment-page .payment-link-value {
    margin-top: 0.3rem;
    font-size: 0.88rem;
    line-height: 1.45;
}

#payment-modal.payment-page .payment-link-value {
    color: #2563eb;
    overflow-wrap: anywhere;
}

#payment-modal.payment-page .payment-qr-image {
    display: block;
    width: min(100%, 12rem);
    height: auto;
    margin: 0.75rem auto 0;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.5rem;
}

#payment-modal.payment-page .payment-qr-image.hidden {
    display: none;
}

#payment-modal.payment-page #payment-crypto-panel .payment-panel-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

#payment-modal.payment-page #create-crypto-invoice-btn,
#payment-modal.payment-page #cancel-crypto-invoice-btn {
    grid-column: 1 / -1;
}

#payment-modal.payment-page #create-crypto-invoice-btn.hidden,
#payment-modal.payment-page #open-crypto-invoice-btn.hidden,
#payment-modal.payment-page #check-crypto-status-btn.hidden,
#payment-modal.payment-page #cancel-crypto-invoice-btn.hidden {
    display: none;
}

#payment-modal.payment-page .payment-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eef2f7;
    align-items: stretch;
}

#payment-modal.payment-page .payment-modal-footer > a,
#payment-modal.payment-page .payment-modal-footer > button {
    width: 100%;
}

#payment-modal.payment-page .payment-support-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    color: #2563eb;
    font-weight: 700;
    text-align: center;
}

.dark #payment-modal.payment-page .payment-page-card {
    border-color: #334155;
    background: #0f172a;
    box-shadow: none;
}

.dark #payment-modal.payment-page .payment-page-head,
.dark #payment-modal.payment-page .payment-modal-footer {
    border-color: #1e293b;
}

.dark #payment-modal.payment-page .payment-page-title,
.dark #payment-modal.payment-page .payment-card-value,
.dark #payment-modal.payment-page .payment-amount-value,
.dark #payment-modal.payment-page .payment-crypto-main-value {
    color: #f8fafc;
}

.dark #payment-modal.payment-page .payment-page-subtitle,
.dark #payment-modal.payment-page .payment-page-eyebrow,
.dark #payment-modal.payment-page .payment-modal-section-label,
.dark #payment-modal.payment-page .payment-panel-label,
.dark #payment-modal.payment-page .payment-panel-description,
.dark #payment-modal.payment-page .payment-crypto-subvalue {
    color: #94a3b8;
}

.dark #payment-modal.payment-page .payment-panel,
.dark #payment-modal.payment-page .payment-method-btn,
.dark #payment-modal.payment-page .payment-action-btn-secondary {
    border-color: #334155;
    background: #111827;
    color: #e5e7eb;
}

.dark #payment-modal.payment-page .payment-info-card,
.dark #payment-modal.payment-page .payment-card-box {
    border-color: #334155;
    background: #020617;
}

@media (max-width: 640px) {
    .footer-socials {
        justify-content: flex-start;
    }

    .footer-social-link {
        width: 2.75rem;
        height: 2.75rem;
    }

    #payment-modal.payment-page .payment-page-card {
        border-radius: 0.85rem;
    }

    #payment-modal.payment-page .payment-page-head,
    #payment-modal.payment-page .payment-page-content {
        padding: 1rem;
    }

    #payment-modal.payment-page .payment-page-head {
        flex-direction: column;
    }

    #payment-modal.payment-page .payment-page-price {
        width: 100%;
        text-align: center;
    }

    #payment-modal.payment-page .payment-method-track,
    #payment-modal.payment-page .payment-card-grid {
        grid-template-columns: 1fr;
    }

    #payment-modal.payment-page .payment-panel {
        padding: 0.85rem;
    }

    #payment-modal.payment-page .payment-crypto-status-head {
        align-items: flex-start;
        flex-direction: column;
    }

    #payment-modal.payment-page #payment-crypto-panel .payment-crypto-grid,
    #payment-modal.payment-page #payment-crypto-panel .payment-panel-actions {
        grid-template-columns: 1fr;
    }

    #payment-modal.payment-page #payment-crypto-panel .payment-info-card,
    #payment-modal.payment-page #payment-crypto-panel .payment-crypto-link-card {
        min-height: auto;
    }
}

@media (min-width: 1024px) {
    #payment-modal.payment-page {
        display: flex;
        justify-content: center;
    }

    #payment-modal.payment-page .payment-page-card {
        width: 100%;
        max-width: 50rem;
    }

    #payment-modal.payment-page .payment-page-head {
        padding: 1.5rem 1.6rem;
    }

    #payment-modal.payment-page .payment-page-content {
        padding: 1.5rem 1.6rem;
    }

    #payment-modal.payment-page .payment-panel {
        padding: 1.15rem;
    }

    #payment-modal.payment-page .payment-modal-footer {
        display: grid;
        grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
        align-items: center;
        gap: 1rem;
    }

    #payment-modal.payment-page .payment-support-link {
        justify-self: end;
        width: auto;
        max-width: 18rem;
    }
}

#payment-modal.payment-page .manual-payment-status-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.9rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #f9fafb;
    box-shadow: none;
}

#payment-modal.payment-page .manual-payment-status-card.hidden {
    display: none;
}

#payment-modal.payment-page .manual-payment-status-glow {
    display: none;
}

#payment-modal.payment-page .manual-payment-status-icon {
    display: none;
}

#payment-modal.payment-page .manual-payment-status-body {
    display: contents;
    flex: 1;
    min-width: 0;
}

#payment-modal.payment-page .manual-payment-status-label {
    display: none;
}

#payment-modal.payment-page .manual-payment-status-text {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: #111827;
}

#payment-modal.payment-page .manual-payment-status-badge {
    min-height: 1.45rem;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
}

#payment-modal.payment-page .manual-payment-status-pending,
#payment-modal.payment-page .manual-payment-status-review,
#payment-modal.payment-page .manual-payment-status-approved,
#payment-modal.payment-page .manual-payment-status-canceled {
    box-shadow: none;
}

#payment-modal.payment-page .manual-payment-status-pending {
    border-color: #e5e7eb;
    background: #f9fafb;
}

#payment-modal.payment-page .manual-payment-status-review {
    border-color: #bae6fd;
    background: #f0f9ff;
}

#payment-modal.payment-page .manual-payment-status-approved {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

#payment-modal.payment-page .manual-payment-status-canceled {
    border-color: #fecdd3;
    background: #fff1f2;
}

#payment-modal.payment-page .manual-payment-status-pending .manual-payment-status-badge {
    color: #92400e;
    border-color: #fde68a;
    background: #fffbeb;
}

#payment-modal.payment-page .manual-payment-status-review .manual-payment-status-icon,
#payment-modal.payment-page .manual-payment-status-review .manual-payment-status-badge {
    color: #0369a1;
    border-color: #bae6fd;
    background: #e0f2fe;
}

#payment-modal.payment-page .manual-payment-status-approved .manual-payment-status-icon,
#payment-modal.payment-page .manual-payment-status-approved .manual-payment-status-badge {
    color: #15803d;
    border-color: #bbf7d0;
    background: #dcfce7;
}

#payment-modal.payment-page .manual-payment-status-canceled .manual-payment-status-icon,
#payment-modal.payment-page .manual-payment-status-canceled .manual-payment-status-badge {
    color: #be123c;
    border-color: #fecdd3;
    background: #ffe4e6;
}

#payment-modal.payment-page #check-payment-btn:disabled,
#payment-modal.payment-page #check-payment-btn.cursor-not-allowed {
    border: 1px solid #dbe3ef;
    background: #f8fafc;
    color: #64748b;
}

.dark #payment-modal.payment-page .manual-payment-status-card {
    border-color: #334155;
    background: #111827;
}

.dark #payment-modal.payment-page .manual-payment-status-text {
    color: #f8fafc;
}

/* ============================================
   RESPONSIVE HARDENING PASS
   ============================================ */
main,
section,
.card,
.card-body,
.card-header,
.card-footer,
.table-container,
.overflow-x-auto,
.signal-card,
.payment-page-card,
.payment-panel,
.payment-info-card {
    min-width: 0;
}

main [class*="grid"] > *,
main [class*="flex"] > *,
footer [class*="grid"] > *,
footer [class*="flex"] > * {
    min-width: 0;
}

.table-container,
.overflow-x-auto {
    overflow-x: auto;
    overflow-y: hidden;
}

.data-table {
    width: max-content;
    min-width: 100%;
}

.data-table:not(.data-table--wide) th,
.data-table:not(.data-table--wide) td {
    max-width: 18rem;
}

.skeleton-shimmer,
[class*="skeleton"] {
    max-width: 100%;
}

canvas {
    display: block;
}

[style*="height:200px"],
[style*="height: 250px"],
[style*="height:160px"] {
    max-width: 100%;
}

@media (max-width: 767px) {
    .data-table th,
    .data-table td {
        max-width: 14rem;
    }

    .table-container,
    .overflow-x-auto {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    main [class*="grid-cols-2"],
    main [class*="grid-cols-3"],
    main [class*="grid-cols-4"] {
        grid-template-columns: 1fr;
    }

    main .home-stats.grid-cols-3,
    main .signal-metrics.grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .btn,
    button,
    a {
        max-width: 100%;
    }

    .truncate {
        white-space: normal;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    main [class*="md:grid-cols-3"],
    main [class*="lg:grid-cols-3"],
    main [class*="lg:grid-cols-4"],
    main [class*="xl:grid-cols-6"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ============================================
   MODERN UI REFRESH + FULL-SITE RESPONSIVE AUDIT
   ============================================ */
body {
    background:
        radial-gradient(circle at 20% 0%, rgba(8, 107, 255, 0.06), transparent 24rem),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 32rem);
}

.dark body {
    background:
        radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.12), transparent 24rem),
        linear-gradient(180deg, #020617 0%, #0f172a 32rem);
}

.relative.z-50.mx-auto.max-w-5xl nav {
    border-radius: 0.875rem;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.nav-link,
.mobile-nav-link,
.btn,
.form-input,
.input,
select,
textarea {
    border-radius: var(--radius-control) !important;
}

.card,
.stat-card,
.signal-card,
.table-container,
.payment-page-card,
.payment-panel,
.payment-info-card,
.payment-card-box,
.payment-modal-dialog {
    border-radius: var(--radius-card) !important;
}

.card,
.stat-card {
    background: rgba(255, 255, 255, 0.94);
    border-color: var(--line);
}

.card:hover,
.stat-card:hover {
    transform: translateY(-1px);
}

.dark .card,
.dark .stat-card {
    background: rgba(15, 23, 42, 0.92) !important;
    border-color: rgba(51, 65, 85, 0.82) !important;
}

.home-hero {
    min-height: clamp(34rem, 72vh, 46rem);
}

.home-hero [class*="blur-"][class*="rounded-full"],
.home-hero [class*="blur\\["][class*="rounded-full"] {
    display: none !important;
}

.home-hero-title {
    max-width: 13ch;
}

.home-hero-copy {
    max-width: 40rem;
}

.home-stats {
    max-width: 34rem;
}

.home-stats {
    max-width: min(100%, 34rem);
    gap: 0.75rem !important;
    margin-top: 2.5rem !important;
    padding-top: 0 !important;
    border-top: 0 !important;
}

.home-stats > div {
    position: relative;
    overflow: hidden;
    min-height: 5.75rem;
    padding: 1rem;
    border: 1px solid rgba(219, 227, 239, 0.92);
    border-radius: var(--radius-card);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.96));
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
}

.home-stats > div::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.2rem;
    background: linear-gradient(180deg, #1d7cff, #78b7ff);
}

.home-stats > div::after {
    content: "";
    position: absolute;
    right: 0.85rem;
    top: 0.85rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: #10b981;
    box-shadow: 0 0 0 0.35rem rgba(16, 185, 129, 0.12);
}

.home-stats > div:nth-child(2)::after {
    background: #086bff;
    box-shadow: 0 0 0 0.35rem rgba(8, 107, 255, 0.12);
}

.home-stats > div:nth-child(3)::after {
    background: #8b5cf6;
    box-shadow: 0 0 0 0.35rem rgba(139, 92, 246, 0.12);
}

.home-stats .text-2xl {
    color: var(--text) !important;
    font-size: clamp(1.45rem, 2.4vw, 1.85rem);
    font-weight: 850;
    line-height: 1;
}

.home-stats .text-xs {
    margin-top: 0.45rem !important;
    color: var(--text-muted) !important;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
}

.home-signal-preview > .relative {
    display: grid;
    gap: 0.85rem;
    width: min(100%, 22rem) !important;
    height: auto !important;
}

.home-signal-preview > .relative > div {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08) !important;
}

.home-signal-preview .rounded-2xl,
.signal-card .rounded-2xl,
.card .rounded-2xl {
    border-radius: 0.625rem !important;
}

.section-title {
    max-width: none;
}

.text-center .section-title {
    max-width: 18ch;
    margin-left: auto;
    margin-right: auto;
}

details.group {
    border-radius: var(--radius-card) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

details.group summary {
    min-height: 3.5rem;
}

details.group[open] {
    border-color: #bfdbfe !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

section.bg-white {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

.dark section.bg-white {
    background-color: rgba(15, 23, 42, 0.84) !important;
}

.badge {
    border-radius: 999px;
}

.stat-card {
    min-height: 6.25rem;
    padding: 1.05rem;
}

.stat-card .stat-value {
    line-height: 1.05;
}

.sidebar-link {
    border-radius: var(--radius-control) !important;
}

aside.w-full.lg\:w-64.shrink-0 .card {
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.05);
}

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

.data-table a:not(.btn) {
    color: var(--brand);
}

footer {
    background: #ffffff !important;
}

footer .grid {
    align-items: start;
}

.footer-social-link {
    border-radius: var(--radius-control);
}

@media (min-width: 768px) {
    .home-hero-grid {
        grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
    }
}

@media (max-width: 767px) {
    body {
        background: linear-gradient(180deg, #f8fafc 0%, #ffffff 26rem);
    }

    .home-hero {
        min-height: auto;
    }

    .home-hero-title {
        max-width: none;
        font-size: clamp(2.1rem, 11vw, 3.1rem);
    }

    .home-hero-copy {
        font-size: 1rem;
    }

    .home-cta-row > a,
    .btn.w-full,
    form .btn[type="submit"] {
        width: 100%;
    }

    .home-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 0.75rem;
    }

    .home-stats > div {
        padding: 0.75rem 0.5rem;
        border: 1px solid var(--line-soft);
        border-radius: var(--radius-card);
        background: rgba(255, 255, 255, 0.72);
    }

    main .grid.grid-cols-2.lg\:grid-cols-4,
    main .grid.grid-cols-2.lg\:grid-cols-3,
    main .grid.grid-cols-2.xl\:grid-cols-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-card {
        min-height: 5.8rem;
    }

    .stat-card .flex.items-center {
        align-items: flex-start;
    }

    .stat-card .w-10.h-10 {
        width: 2.25rem;
        height: 2.25rem;
    }

    .card-header.flex,
    .card-body > .flex.items-center.justify-between {
        align-items: flex-start;
        flex-direction: column;
    }

    footer .grid {
        grid-template-columns: 1fr !important;
    }

    footer .mt-8.pt-6 {
        align-items: flex-start;
        text-align: left;
    }
}

@media (max-width: 420px) {
    main .grid.grid-cols-2.lg\:grid-cols-4,
    main .grid.grid-cols-2.lg\:grid-cols-3,
    main .grid.grid-cols-2.xl\:grid-cols-6,
    .home-stats {
        grid-template-columns: 1fr !important;
    }

    .relative.z-50.mx-auto.max-w-5xl nav .text-xl {
        max-width: 8rem;
    }
}

/* ============================================
   UNIFIED MODERN DESIGN LAYER
   Keep global page styling in this single CSS layer.
   ============================================ */
:root {
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-muted: #eef2f7;
    --surface-raised: rgba(255, 255, 255, 0.96);
    --line: #dbe3ef;
    --line-soft: #edf2f7;
    --text: #0b1220;
    --text-muted: #64748b;
    --brand: #086bff;
    --brand-strong: #005be7;
    --brand-soft: #eaf3ff;
    --success: #059669;
    --danger: #e11d48;
    --warning: #d97706;
    --radius-card: 0.5rem;
    --radius-control: 0.625rem;
    --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 36px rgba(15, 23, 42, 0.055);
    --shadow-card-hover: 0 16px 42px rgba(15, 23, 42, 0.08);
    --shadow-control: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html {
    background: #f8fafc;
}

body {
    background:
        linear-gradient(180deg, #f7faff 0%, #ffffff 28rem),
        #ffffff;
    color: var(--text);
}

.dark body {
    background:
        linear-gradient(180deg, #050b18 0%, #0f172a 30rem),
        #0f172a;
}

main {
    flex: 1 0 auto;
}

.relative.z-50.mx-auto.max-w-5xl {
    max-width: min(72rem, calc(100vw - 2rem));
}

.relative.z-50.mx-auto.max-w-5xl nav {
    border-radius: 0.875rem !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(219, 227, 239, 0.92) !important;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.075);
}

.dark .relative.z-50.mx-auto.max-w-5xl nav {
    background: rgba(15, 23, 42, 0.86) !important;
    border-color: rgba(51, 65, 85, 0.82) !important;
}

.nav-link,
.mobile-nav-link {
    font-weight: 650;
    color: #556274;
}

.nav-link:hover,
.mobile-nav-link:hover {
    background: #f1f6fd;
    color: var(--text);
}

.nav-link-active,
.nav-link.active,
.sidebar-link.active {
    background: var(--brand-soft) !important;
    color: var(--brand) !important;
}

.card,
.stat-card,
.signal-card,
.table-container,
.payment-page-card,
.payment-panel,
.payment-info-card,
.payment-card-box,
.payment-modal-dialog,
details.group {
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-card) !important;
    background: var(--surface-raised);
    box-shadow: var(--shadow-card);
}

.card,
.stat-card,
.signal-card {
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.card:hover,
.stat-card:hover,
.signal-card:hover {
    border-color: #c8d4e4 !important;
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
}

.card-header {
    padding: clamp(1rem, 2vw, 1.25rem);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.82), rgba(255, 255, 255, 0));
    border-bottom-color: var(--line-soft);
}

.card-body {
    padding: clamp(1rem, 2vw, 1.25rem);
}

.card-footer {
    background: #fbfdff;
    border-top-color: var(--line-soft);
}

.btn,
.payment-action-btn,
.payment-method-btn {
    min-height: 2.75rem;
    border-radius: var(--radius-control) !important;
    font-weight: 700;
    letter-spacing: 0;
    box-shadow: var(--shadow-control);
}

.btn {
    border: 1px solid transparent;
}

.btn-primary,
.payment-action-btn-primary {
    background: linear-gradient(180deg, #1477ff 0%, var(--brand-strong) 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 12px 24px rgba(8, 107, 255, 0.18);
}

.btn-primary:hover,
.payment-action-btn-primary:hover {
    box-shadow: 0 16px 32px rgba(8, 107, 255, 0.24);
}

.btn-primary:focus-visible,
.payment-action-btn-primary:focus-visible,
a.bg-blue-600:focus-visible,
button.bg-blue-600:focus-visible,
a.bg-primary-600:focus-visible,
button.bg-primary-600:focus-visible {
    outline: none;
    border-color: transparent !important;
    box-shadow: 0 0 0 4px rgba(8, 107, 255, 0.14), 0 12px 24px rgba(8, 107, 255, 0.18);
}

.btn-secondary,
.payment-action-btn-secondary {
    background: #ffffff !important;
    color: #1f2937 !important;
    border-color: var(--line) !important;
}

.btn-secondary:hover,
.payment-action-btn-secondary:hover {
    background: #f8fbff !important;
    border-color: #bfcbda !important;
}

.btn-ghost {
    border-color: transparent !important;
}

.btn-danger,
.payment-action-btn-danger {
    background: #fff1f3 !important;
    color: var(--danger) !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.12);
}

.btn-success,
.payment-action-btn-success {
    background: #ecfdf5 !important;
    color: #047857 !important;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.12);
}

.btn:disabled,
.payment-action-btn:disabled,
.form-input:disabled {
    opacity: 0.72;
}

.form-label,
.payment-panel-label,
.payment-modal-section-label {
    color: #526176;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.form-input,
.input,
select,
textarea {
    min-height: 2.85rem;
    background: #ffffff;
    border-color: var(--line);
    color: var(--text);
    box-shadow: var(--shadow-control);
}

.form-input:focus,
.input:focus,
select:focus,
textarea:focus {
    border-color: #8bbdff;
    box-shadow: 0 0 0 4px rgba(8, 107, 255, 0.12);
}

.table-container {
    overflow-x: auto;
    overflow-y: hidden;
}

.data-table {
    font-size: 0.875rem;
}

.data-table thead {
    background: #f6f9fd;
}

.data-table th {
    color: #64748b;
    letter-spacing: 0.075em;
}

.data-table td {
    color: #263244;
}

.data-table tbody tr:hover {
    background: #f8fbff;
}

.badge {
    min-height: 1.55rem;
    padding: 0.18rem 0.62rem;
    border: 1px solid transparent;
}

.badge-success {
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.badge-danger {
    background: #fff1f2;
    border-color: #fecdd3;
}

.badge-neutral {
    background: #f4f7fb;
    border-color: #e5ebf3;
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 6.75rem;
}

.stat-card .stat-value {
    color: var(--text);
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    font-weight: 850;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-weight: 550;
}

.dashboard-page {
    width: 100%;
}

.dashboard-page > .mb-8,
.dashboard-page > .mb-6 {
    gap: 1rem;
}

.dashboard-page h1,
.home-hero-title,
.section-title {
    color: var(--text);
    letter-spacing: 0;
}

.dashboard-page .card.border-primary-200,
.dashboard-page .card.bg-primary-50\/30 {
    border-width: 1px !important;
}

.sidebar-link {
    min-height: 2.85rem;
    font-weight: 700;
}

aside.w-full.lg\:w-64.shrink-0 .card {
    position: sticky;
    top: 5.5rem;
}

#payment-modal.payment-page .payment-page-card,
#payment-modal.payment-page .payment-panel {
    background: #ffffff;
}

#payment-modal.payment-page .payment-method-track {
    gap: 0.5rem;
}

#payment-modal.payment-page .payment-method-btn {
    min-height: 3rem;
}

#payment-modal.payment-page .payment-info-card,
#payment-modal.payment-page .payment-card-box {
    background: #f9fbfe;
}

footer {
    border-top-color: var(--line) !important;
}

footer > .max-w-7xl {
    max-width: min(80rem, calc(100vw - 2rem));
}

.footer-social-link {
    width: 2.5rem;
    height: 2.5rem;
    background: #f8fbff;
    border-color: var(--line);
}

.md\:hidden.fixed.bottom-0 {
    background: rgba(255, 255, 255, 0.92) !important;
    border-top-color: rgba(219, 227, 239, 0.94) !important;
    box-shadow: 0 -14px 32px rgba(15, 23, 42, 0.075);
}

.md\:hidden.fixed.bottom-0 a {
    border-radius: 0.625rem;
}

.md\:hidden.fixed.bottom-0 a:hover {
    background: #f1f6fd;
}

.dark .card,
.dark .stat-card,
.dark .signal-card,
.dark .table-container,
.dark .payment-page-card,
.dark .payment-panel,
.dark .payment-info-card,
.dark .payment-card-box,
.dark .payment-modal-dialog,
.dark details.group {
    background: rgba(15, 23, 42, 0.94) !important;
    border-color: rgba(51, 65, 85, 0.86) !important;
}

.dark .card-header,
.dark .data-table thead {
    background: rgba(30, 41, 59, 0.5);
}

.dark .card-footer,
.dark footer {
    background: rgba(15, 23, 42, 0.94) !important;
}

.dark .form-input,
.dark .input,
.dark select,
.dark textarea {
    background: #111827;
    border-color: #334155;
    color: #f8fafc;
}

.dark .data-table td {
    color: #dbeafe;
}

.dark .btn-secondary,
.dark .payment-action-btn-secondary {
    background: #111827 !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

.dark .footer-social-link {
    background: #111827;
}

.card.bg-gradient-to-br {
    background-color: #111827 !important;
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)) !important;
}

.card.bg-gradient-to-br.text-white,
.card.bg-gradient-to-br .text-white {
    color: #ffffff !important;
}

.dark .home-stats > div {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(17, 24, 39, 0.94));
    border-color: rgba(51, 65, 85, 0.86);
}

.dark .home-stats .text-2xl {
    color: #f8fafc !important;
}

.dark .home-stats .text-xs {
    color: #94a3b8 !important;
}

@media (min-width: 1024px) {
    .dashboard-page {
        padding-top: 2.25rem;
        padding-bottom: 3rem;
    }

    .home-hero-grid,
    .dashboard-page > .grid {
        align-items: start;
    }
}

@media (max-width: 767px) {
    :root {
        --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 22px rgba(15, 23, 42, 0.045);
        --shadow-card-hover: var(--shadow-card);
    }

    body {
        background: linear-gradient(180deg, #f8fbff 0%, #ffffff 24rem);
    }

    .relative.z-50.mx-auto.max-w-5xl {
        max-width: none;
        padding-left: 0.875rem;
        padding-right: 0.875rem;
        margin-top: 0.75rem;
        margin-bottom: 1rem;
    }

    .relative.z-50.mx-auto.max-w-5xl nav {
        border-radius: var(--radius-card) !important;
    }

    .card:hover,
    .stat-card:hover,
    .signal-card:hover {
        transform: none;
    }

    .card-header,
    .card-body,
    .card-footer {
        padding: 1rem;
    }

    .btn,
    .payment-action-btn,
    .payment-method-btn {
        min-height: 2.8rem;
        white-space: normal;
        text-align: center;
    }

    .stat-card {
        min-height: 6.25rem;
    }

    .home-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 0.55rem !important;
        margin-top: 1.75rem !important;
    }

    .home-stats > div {
        min-height: 5rem;
        padding: 0.85rem 0.7rem 0.8rem 0.85rem;
    }

    .home-stats .text-2xl {
        font-size: clamp(1.2rem, 7vw, 1.55rem);
    }

    .home-stats .text-xs {
        font-size: 0.68rem;
    }

    .data-table {
        width: 100%;
        min-width: 100%;
    }

    .table-container {
        overflow: visible;
    }

    .card-footer.flex {
        gap: 0.75rem;
    }

    #payment-modal.payment-page .payment-page-card {
        box-shadow: none;
    }

    footer > .max-w-7xl {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

@media (max-width: 420px) {
    .btn-lg {
        font-size: 0.95rem;
    }

    .home-stats > div,
    .stat-card {
        min-height: 5.75rem;
    }

    .home-stats {
        grid-template-columns: 1fr !important;
    }

    .home-stats > div {
        min-height: 4.75rem;
    }

    .form-input,
    .input,
    select,
    textarea {
        font-size: 0.95rem;
    }
}

/* ============================================
   DASHBOARD MODERNIZATION
   ============================================ */
.dashboard-overview-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.94));
    box-shadow: var(--shadow-card);
}

.dashboard-eyebrow {
    margin-bottom: 0.35rem;
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.dashboard-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
}

.dashboard-meta-pill {
    display: inline-flex;
    min-width: 8.5rem;
    min-height: 3.1rem;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid #d7e7ff;
    border-radius: var(--radius-control);
    background: #f4f9ff;
}

.dashboard-meta-pill span {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.dashboard-meta-pill strong {
    color: var(--text);
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.15;
}

.dashboard-meta-id strong {
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

@media (min-width: 1024px) {
    .dashboard-meta-id {
        display: none;
    }
}

.dashboard-page .stat-card {
    position: relative;
    overflow: hidden;
    min-height: 7rem;
}

.dashboard-page .stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.22rem;
    background: linear-gradient(180deg, #1477ff, #8ec5ff);
}

.dashboard-page .stat-card:nth-child(2)::before {
    background: linear-gradient(180deg, #10b981, #a7f3d0);
}

.dashboard-page .stat-card:nth-child(3)::before {
    background: linear-gradient(180deg, #22c55e, #bbf7d0);
}

.dashboard-page .stat-card:nth-child(4)::before {
    background: linear-gradient(180deg, #8b5cf6, #ddd6fe);
}

.dashboard-page .stat-card .w-10.h-10 {
    border-radius: var(--radius-control) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.dashboard-page .stat-card > .flex.items-center {
    display: grid !important;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    align-items: center !important;
    gap: 0.875rem;
    width: 100%;
}

.dashboard-page .stat-card > .flex.items-center > .w-10.h-10 {
    width: 2.75rem !important;
    height: 2.75rem !important;
    align-self: center;
    justify-self: center;
}

.dashboard-page .stat-card > .flex.items-center > div:last-child {
    min-width: 0;
}

.dashboard-page .stat-card .stat-value,
.dashboard-page .stat-card .stat-label {
    display: block;
}

.dashboard-page .stat-card .stat-label {
    margin-top: 0.2rem;
    line-height: 1.25;
}

.dashboard-page .card h2 {
    letter-spacing: 0;
}

.dashboard-page .card-header {
    min-height: 4.4rem;
}

.dashboard-page canvas {
    max-width: 100%;
}

.dashboard-page #chartSignals,
.dashboard-page #chartResults {
    filter: drop-shadow(0 10px 18px rgba(8, 107, 255, 0.08));
}

.dashboard-page .card-body .form-input[readonly] {
    background: #f8fbff;
    font-weight: 650;
}

.dashboard-page .card-body .space-y-2 > .flex {
    min-height: 2rem;
    align-items: center;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--line-soft);
}

.dashboard-page .card-body .space-y-2 > .flex:last-child {
    border-bottom: 0;
}

.dark .dashboard-overview-hero {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.92));
    border-color: rgba(51, 65, 85, 0.86);
}

.dark .dashboard-meta-pill {
    background: rgba(30, 41, 59, 0.82);
    border-color: rgba(51, 65, 85, 0.9);
}

.dark .dashboard-meta-pill strong {
    color: #f8fafc;
}

.dark .dashboard-page .card-body .form-input[readonly] {
    background: rgba(15, 23, 42, 0.82);
}

@media (max-width: 767px) {
    .dashboard-overview-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 1rem;
    }

    .dashboard-hero-meta {
        display: grid;
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .dashboard-meta-pill {
        min-width: 0;
        width: 100%;
    }

    .dashboard-page .stat-card {
        min-height: 6.25rem;
    }

    .dashboard-page .grid.grid-cols-2.lg\:grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    .dashboard-page .card-header {
        min-height: 0;
    }
}

/* ---- Auth pages (ITD-style) ---- */
.auth-layout {
    background-color: #f5f5f5;
    color: #1a1a1a;
}

.auth-layout__main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px;
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
}

.auth-page__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(358px, 100%);
    max-width: 100%;
}

.auth-page__logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
    font-size: 32px;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.auth-page__logo:hover {
    opacity: 0.85;
}

.auth-page__logo img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.auth-page__logo-accent {
    color: var(--brand);
}

.auth-form {
    width: 100%;
}

.auth-form__header {
    margin-bottom: 48px;
}

.auth-form__title {
    font-size: var(--type-xl, 1.5rem);
    font-weight: 500;
    color: inherit;
    margin: 0 0 8px;
}

.auth-form__subtitle {
    font-size: var(--type-md, 1rem);
    font-weight: 400;
    color: #7a7a7a;
    margin: 0;
}

.auth-form__alert {
    width: 100%;
    max-width: 100%;
    margin-bottom: 24px;
    text-align: left;
}

.auth-form__ref {
    padding: 12px 16px;
    margin-bottom: 24px;
    background: rgba(8, 107, 255, 0.08);
    border: 1px solid rgba(8, 107, 255, 0.2);
    border-radius: 12px;
    font-size: 14px;
    color: var(--brand-strong);
    text-align: center;
}

.auth-form__fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-field__label {
    font-size: var(--type-md, 1rem);
    font-weight: 400;
    color: inherit;
}

.auth-field__input-wrap {
    position: relative;
    width: 100%;
}

.auth-field__input-wrap .auth-input {
    padding-right: 48px;
}

.auth-input {
    width: 100%;
    min-height: var(--control-h, 2.75rem);
    padding: var(--control-py, 0.75rem) var(--control-px, 1rem);
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    font-size: max(16px, var(--type-md, 1rem));
    font-family: inherit;
    color: inherit;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: #7a7a7a;
}

.auth-input:focus {
    border-color: rgba(0, 0, 0, 0.4);
}

.auth-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-field__toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    color: #7a7a7a;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-field__toggle:hover {
    color: inherit;
}

.auth-field__link {
    align-self: flex-end;
    font-size: 14px;
    color: #7a7a7a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-field__link:hover {
    color: var(--brand);
}

.auth-form__terms {
    margin-top: 16px;
    font-size: 13px;
    font-weight: 400;
    color: #7a7a7a;
    line-height: 1.5;
}

.auth-form__terms a {
    color: var(--brand);
    text-decoration: none;
}

.auth-form__terms a:hover {
    text-decoration: underline;
}

.auth-form__remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #7a7a7a;
    cursor: pointer;
}

.auth-form__remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
    cursor: pointer;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: clamp(1.25rem, 4vw, 2.25rem);
    padding: 0 var(--control-px, 1.5rem);
    min-height: var(--control-h, 3rem);
    height: auto;
    font-size: var(--type-md, 1rem);
    font-weight: 500;
    font-family: inherit;
    color: #fff;
    background: #1a1a1a;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.auth-submit:hover:not(:disabled) {
    opacity: 0.9;
}

.auth-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

a.auth-submit {
    text-decoration: none;
}

.auth-submit--inline {
    width: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.auth-form__footer {
    margin-top: 18px;
    font-size: 14px;
    color: #7a7a7a;
    text-align: center;
}

.auth-form__footer a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 500;
}

.auth-form__footer a:hover {
    text-decoration: underline;
}

.auth-form__empty {
    text-align: center;
    padding: 24px 0;
}

.auth-form__empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: #7a7a7a;
    opacity: 0.5;
}

.auth-form__empty p {
    font-size: 14px;
    color: #7a7a7a;
    margin: 0 0 16px;
}

.dark.auth-layout,
.dark .auth-layout {
    background-color: #151518;
    color: #f5f5f5;
}

.dark .auth-form__subtitle,
.dark .auth-field__link,
.dark .auth-form__terms,
.dark .auth-form__remember,
.dark .auth-form__footer,
.dark .auth-input::placeholder,
.dark .auth-field__toggle {
    color: rgba(255, 255, 255, 0.5);
}

.dark .auth-input {
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .auth-input:focus {
    border-color: rgba(255, 255, 255, 0.4);
}

.dark .auth-submit {
    background: #fff;
    color: #000;
}

@media (max-width: 480px) {
    .auth-page {
        padding: 16px;
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
        padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
        justify-content: flex-start;
        padding-top: max(24px, env(safe-area-inset-top, 0px));
    }

    .auth-page__logo {
        margin-bottom: 32px;
        font-size: 28px;
        gap: 10px;
    }

    .auth-page__logo img {
        width: 36px;
        height: 36px;
    }

    .auth-form__header {
        margin-bottom: 32px;
    }

    .auth-form__title {
        font-size: 22px;
    }

    .auth-form__subtitle {
        font-size: 15px;
    }

    .auth-input {
        padding: 14px;
        font-size: 16px;
    }

    .auth-submit {
        margin-top: 28px;
        height: 44px;
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .auth-page__logo {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .auth-form__header {
        margin-bottom: 24px;
    }

    .auth-form__title {
        font-size: 20px;
    }
}

/* ---- Home page: ITD theme, full-width layout ---- */
body.home-itd {
    --hb-bg: #f5f5f5;
    --hb-surface: #ffffff;
    --hb-text: #1a1a1a;
    --hb-muted: #7a7a7a;
    --hb-border: rgba(0, 0, 0, 0.1);
    --hb-btn: #1a1a1a;
    --hb-btn-text: #ffffff;
    --hb-secondary: #ebebeb;
    --hb-accent: var(--brand);
    --hb-radius: 24px;
    --hb-radius-sm: 16px;
    background-color: var(--hb-bg);
    color: var(--hb-text);
}

@keyframes home-enter {
    from {
        opacity: 0;
        transform: translate3d(0, 16px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

body.home-itd > .site-header,
body.home-itd > main > section,
body.home-itd > footer {
    animation: home-enter 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.home-itd > .site-header {
    animation-delay: 0.04s;
}

body.home-itd > main > section:nth-of-type(1) { animation-delay: 0.1s; }
body.home-itd > main > section:nth-of-type(2) { animation-delay: 0.18s; }
body.home-itd > main > section:nth-of-type(3) { animation-delay: 0.24s; }
body.home-itd > main > section:nth-of-type(n + 4) { animation-delay: 0.3s; }

body.home-itd > footer {
    animation-delay: 0.34s;
}

html:not(.dark) body.home-itd footer {
    background: #ffffff !important;
    border-top-color: var(--hb-border) !important;
}

.hb-wrap {
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1rem, 3vw, 2rem);
    padding-right: clamp(1rem, 3vw, 2rem);
}

.hb-section {
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.hb-section--surface {
    background: var(--hb-surface);
}

.hb-section__head {
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.hb-section__head--center {
    text-align: center;
}

.hb-section__head--center .hb-section__lead {
    margin-left: auto;
    margin-right: auto;
}

.hb-section__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 0.75rem;
    color: var(--hb-text);
}

.hb-section__lead {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.55;
    color: var(--hb-muted);
    margin: 0;
    max-width: 42rem;
}

.hb-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 1.5rem;
    font-size: 14px;
    font-weight: 500;
    color: var(--brand-strong);
    background: rgba(8, 107, 255, 0.08);
    border-radius: 999px;
}

.hb-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    animation: hb-pulse 2s ease-in-out infinite;
}

@keyframes hb-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.hb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--control-h, 3rem);
    padding: 0 var(--control-px, 1.5rem);
    font-size: var(--type-md, 1rem);
    font-weight: 500;
    font-family: inherit;
    line-height: 1.2;
    text-decoration: none;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.hb-btn:hover {
    opacity: 0.9;
}

.hb-btn--primary {
    color: var(--hb-btn-text);
    background: var(--hb-btn);
}

.hb-btn--secondary {
    color: var(--hb-text);
    background: var(--hb-secondary);
}

.hb-btn--light {
    color: #000;
    background: #fff;
}

.hb-btn--block {
    width: 100%;
}

.hb-btn--lg {
    min-height: var(--control-h-lg, 3.25rem);
    padding: 0 calc(var(--control-px, 1.75rem) * 1.1);
    font-size: var(--type-lg, 1.0625rem);
}

.hb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 2.5rem;
}

.hb-card {
    background: var(--hb-surface);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius-sm);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
    .hb-card {
        border-radius: var(--hb-radius);
    }
}

/* Hero */
.hb-hero {
    padding: clamp(3rem, 8vw, 6rem) 0;
}

.hb-hero__grid {
    display: grid;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

@media (min-width: 768px) {
    .hb-hero__grid {
        grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    }
}

.hb-hero__title {
    font-size: clamp(2rem, 5.5vw, 3.5rem);
    font-weight: 600;
    line-height: 1.1;
    margin: 0 0 1.25rem;
    max-width: none;
    color: var(--hb-text);
}

.hb-hero__accent {
    color: var(--hb-accent);
}

.hb-hero__lead {
    font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
    line-height: 1.6;
    color: var(--hb-muted);
    margin: 0;
    max-width: 36rem;
}

.hb-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2.5rem;
    max-width: 32rem;
}

.hb-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    text-align: center;
    background: var(--hb-surface);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius-sm);
}

.hb-stat__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: clamp(2.5rem, 6vw, 3rem);
    height: clamp(2.5rem, 6vw, 3rem);
    border-radius: 14px;
    background: #f5f5f5;
    color: #1a1a1a;
}

.hb-stat__icon svg {
    width: clamp(1.125rem, 2.5vw, 1.375rem);
    height: clamp(1.125rem, 2.5vw, 1.375rem);
}

.hb-stat--accuracy .hb-stat__icon {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
}

.hb-stat--monitoring .hb-stat__icon {
    background: rgba(8, 107, 255, 0.12);
    color: #086bff;
}

.hb-stat--traders .hb-stat__icon {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
}

.hb-stat__body {
    min-width: 0;
}

.hb-stat__value {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.1;
}

.hb-stat__label {
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: var(--hb-muted);
}

/* Signal preview */
.hb-hero__preview {
    display: none;
}

@media (min-width: 768px) {
    .hb-hero__preview {
        display: block;
    }
}

.hb-signals {
    position: relative;
    width: 100%;
    max-width: 22rem;
    margin-left: auto;
    min-height: 26rem;
}

.hb-signal {
    position: relative;
    padding: 1.25rem;
    background: var(--hb-surface);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius-sm);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.hb-signal--offset {
    position: absolute;
    top: 5.5rem;
    left: 1rem;
    right: 1rem;
    z-index: 2;
    opacity: 0.92;
}

.hb-signal--offset2 {
    position: absolute;
    top: 11rem;
    left: 2rem;
    right: 2rem;
    z-index: 1;
    opacity: 0.82;
}

.hb-signal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.hb-signal__tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--hb-muted);
}

.hb-signal__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.hb-signal__dot--up { background: #22c55e; }
.hb-signal__dot--down { background: #ef4444; }
.hb-signal__dot--brand { background: var(--brand); }

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

.hb-signal__pair {
    font-size: 1.25rem;
    font-weight: 600;
}

.hb-hero__preview .hb-signal__pair {
    filter: blur(8px);
    user-select: none;
    pointer-events: none;
}

.hb-signal__dir {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    font-weight: 700;
}

.hb-signal__dir--up { color: #16a34a; }
.hb-signal__dir--down { color: #ef4444; }

.hb-signal__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--hb-muted);
    margin-bottom: 0.5rem;
}

.hb-signal__pct {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.hb-signal__pct--up {
    color: #16a34a;
    background: rgba(34, 197, 94, 0.12);
}

.hb-signal__pct--down {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.hb-signal__bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.hb-signal__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4ade80, #16a34a);
}

.hb-signal__bar--down span {
    background: linear-gradient(90deg, #f87171, #ef4444);
}

.hb-signal__time {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--hb-muted);
    text-align: right;
}

/* Demo video */
.hb-demo-video {
    position: relative;
    width: 100%;
    max-width: 56rem;
    margin: 0 auto;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--hb-border);
    background: #0b1220;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
}

.hb-demo-video__player {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
    background: #000;
    cursor: pointer;
}

.hb-demo-video__toggle {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.hb-demo-video__toggle:hover {
    transform: scale(1.05);
    background: rgba(8, 107, 255, 0.88);
    border-color: rgba(255, 255, 255, 0.35);
}

.hb-demo-video__toggle:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.hb-demo-video__icon {
    display: block;
}

.hb-demo-video.is-playing .hb-demo-video__icon--play {
    display: none;
}

.hb-demo-video:not(.is-playing) .hb-demo-video__icon--pause {
    display: none;
}

@media (min-width: 768px) {
    .hb-demo-video {
        border-radius: 1.25rem;
    }

    .hb-demo-video__toggle {
        right: 1.25rem;
        bottom: 1.25rem;
        width: 3.25rem;
        height: 3.25rem;
    }
}

/* Features */
.hb-features {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .hb-features {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

.hb-feature {
    padding: clamp(1.5rem, 3vw, 2rem);
}

.hb-feature__icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    border-radius: 14px;
    background: var(--hb-bg);
    color: var(--hb-accent);
}

.hb-feature:nth-child(1) .hb-feature__icon { background: #dbeafe; color: #1d4ed8; }
.hb-feature:nth-child(2) .hb-feature__icon { background: #fff7e6; color: #c2410c; }
.hb-feature:nth-child(3) .hb-feature__icon { background: #f3e8ff; color: #7c3aed; }

.hb-step:nth-child(1) .hb-step__num { background: #0a84ff; color: #fff; }
.hb-step:nth-child(2) .hb-step__num { background: #7c3aed; color: #fff; }
.hb-step:nth-child(3) .hb-step__num { background: #167347; color: #fff; }

.hb-seo__item:nth-child(1) .hb-seo__icon { background: #dbeafe; color: #1d4ed8; }
.hb-seo__item:nth-child(2) .hb-seo__icon { background: #ccfbf1; color: #0f766e; }
.hb-seo__item:nth-child(3) .hb-seo__icon { background: #dcfce7; color: #15803d; }
.hb-seo__item:nth-child(4) .hb-seo__icon { background: #ffedd5; color: #c2410c; }

.hb-feature__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.hb-feature__text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--hb-muted);
    margin: 0;
}

/* Steps */
.hb-steps {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .hb-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.hb-step {
    padding: clamp(1.5rem, 3vw, 2rem);
    text-align: center;
}

.hb-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    background: var(--hb-btn);
    border-radius: 50%;
}

.hb-step__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.hb-step__text {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--hb-muted);
    margin: 0;
}

/* Reviews */
.hb-reviews {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .hb-reviews {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.hb-review {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

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

.hb-review__user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.hb-review__avatar {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--brand-strong, #005ae6);
    background: rgba(8, 107, 255, 0.12);
}

.hb-review__name {
    font-weight: 600;
    color: var(--hb-text);
}

.hb-review__stars {
    display: flex;
    gap: 2px;
    color: #fbbf24;
    flex-shrink: 0;
}

.hb-review__text {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--hb-muted);
}

.hb-reviews__more {
    margin: 1.75rem 0 0;
    text-align: center;
}

.hb-reviews__more a {
    color: var(--brand, #086bff);
    font-weight: 600;
    text-decoration: none;
}

.hb-reviews__more a:hover {
    text-decoration: underline;
}

/* Pricing */
.hb-pricing {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .hb-pricing {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .hb-pricing {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.hb-pricing .hb-card.hb-price {
    border: none;
    outline: none;
}

.hb-price {
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 3vw, 2rem);
    min-height: 100%;
}

/* Тарифные цвета: название, цена, галочки */
.hb-price--free,
.dash-plan-card--free {
    --plan-title: #1a1a1a;
    --plan-muted: #7a7a7a;
    --plan-price: #1a1a1a;
    --plan-price-sub: #7a7a7a;
    --plan-feature: #525252;
    --plan-check: #086bff;
    --plan-cross: #a3a3a3;
}

.hb-price--month,
.dash-plan-card--month {
    --plan-title: #ffffff;
    --plan-muted: rgba(255, 255, 255, 0.78);
    --plan-price: #ffffff;
    --plan-price-sub: rgba(255, 255, 255, 0.65);
    --plan-feature: rgba(255, 255, 255, 0.92);
    --plan-check: #bfdbfe;
    --plan-cross: rgba(255, 255, 255, 0.45);
}

.hb-price--popular,
.dash-plan-card--popular {
    --plan-title: #ffffff;
    --plan-muted: rgba(255, 255, 255, 0.78);
    --plan-price: #ffffff;
    --plan-price-sub: rgba(255, 255, 255, 0.65);
    --plan-feature: rgba(255, 255, 255, 0.92);
    --plan-check: #e9d5ff;
    --plan-cross: rgba(255, 255, 255, 0.45);
}

.hb-price--dark,
.dash-plan-card--forever {
    --plan-title: #ffffff;
    --plan-muted: rgba(255, 255, 255, 0.72);
    --plan-price: #ffffff;
    --plan-price-sub: rgba(255, 255, 255, 0.55);
    --plan-feature: rgba(255, 255, 255, 0.88);
    --plan-check: #e5e5e5;
    --plan-cross: rgba(255, 255, 255, 0.4);
}

.hb-price--free {
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.hb-price--month {
    background: linear-gradient(160deg, #1563d4 0%, #0d4bb8 52%, #062d7a 100%);
    box-shadow: 0 10px 28px rgba(8, 107, 255, 0.28);
}

.hb-price--popular {
    background: linear-gradient(160deg, #7c3aed 0%, #6d28d9 52%, #3b0764 100%);
    box-shadow: 0 10px 28px rgba(124, 58, 237, 0.28);
}

.hb-price--dark {
    background: linear-gradient(160deg, #1a1a1a 0%, #0a0a0a 52%, #000 100%);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.hb-price--free .hb-price__name,
.hb-price--free .hb-price__amount,
.dash-plan-card--free .dash-plan-card__name,
.dash-plan-card--free .dash-plan-card__price {
    color: var(--plan-title);
}

.hb-price--free .hb-price__muted,
.hb-price--free .hb-price__list,
.dash-plan-card--free .dash-plan-card__desc,
.dash-plan-card--free .dash-plan-card__features {
    color: var(--plan-muted);
}

.hb-price--month .hb-price__name,
.hb-price--month .hb-price__amount,
.hb-price--popular .hb-price__name,
.hb-price--popular .hb-price__amount,
.hb-price--dark .hb-price__name,
.hb-price--dark .hb-price__amount,
.dash-plan-card--month .dash-plan-card__name,
.dash-plan-card--month .dash-plan-card__price,
.dash-plan-card--popular .dash-plan-card__name,
.dash-plan-card--popular .dash-plan-card__price,
.dash-plan-card--forever .dash-plan-card__name,
.dash-plan-card--forever .dash-plan-card__price {
    color: var(--plan-price);
}

.hb-price--month .hb-price__muted,
.hb-price--popular .hb-price__muted,
.hb-price--dark .hb-price__muted,
.dash-plan-card--month .dash-plan-card__desc,
.dash-plan-card--popular .dash-plan-card__desc,
.dash-plan-card--forever .dash-plan-card__desc {
    color: var(--plan-muted);
}

.hb-price--free .hb-price__amount {
    color: var(--plan-price);
}

.hb-price--free .hb-price__amount span {
    color: var(--plan-price-sub);
}

.hb-price--month .hb-price__amount span,
.hb-price--popular .hb-price__amount span,
.hb-price--dark .hb-price__amount span,
.dash-plan-card--month .dash-plan-card__price span,
.dash-plan-card--popular .dash-plan-card__price span,
.dash-plan-card--forever .dash-plan-card__price span {
    color: var(--plan-price-sub);
}

.hb-price--month .hb-price__list,
.hb-price--popular .hb-price__list,
.hb-price--dark .hb-price__list,
.dash-plan-card--month .dash-plan-card__features,
.dash-plan-card--popular .dash-plan-card__features,
.dash-plan-card--forever .dash-plan-card__features {
    color: var(--plan-feature);
}

.hb-price__item:not(.hb-price__item--no) svg,
.dash-plan-card__features li:not(.is-no) svg {
    color: var(--plan-check);
}

.hb-price__item--no svg,
.dash-plan-card__features li.is-no svg {
    color: var(--plan-cross);
}

.hb-price--popular .hb-price__badge {
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
}

.hb-price--month .hb-price__badge {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

.hb-price__badge {
    align-self: flex-start;
    padding: 4px 10px;
    margin-bottom: 0.75rem;
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-strong);
    background: rgba(8, 107, 255, 0.1);
    border-radius: 999px;
}

.hb-price__name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--plan-title, #1a1a1a);
}

.hb-price__muted {
    font-size: 0.875rem;
    color: var(--plan-muted, var(--hb-muted));
    margin: 0 0 1rem;
}

.hb-price__amount {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    color: var(--plan-price, #1a1a1a);
}

.hb-price__amount span {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--plan-price-sub, var(--hb-muted));
}

.hb-price__list {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: var(--plan-feature, var(--hb-muted));
}

.hb-price__item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.hb-price__item svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.hb-price__item--no {
    color: var(--plan-muted, var(--hb-muted));
}

/* SEO */
.hb-seo {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .hb-seo {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .hb-seo {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hb-seo__item {
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 3vw, 2rem);
}

.hb-seo__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.hb-seo__text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--hb-muted);
    margin: 0;
}

.hb-seo__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    margin-bottom: 1.25rem;
    border-radius: 14px;
    background: var(--hb-bg);
    color: var(--hb-accent, var(--brand));
}

/* CTA */
.hb-cta__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hb-cta__inner .hb-section__lead {
    margin: 0 auto 2rem;
    text-align: center;
}

.hb-cta__inner .hb-btn {
    margin-inline: auto;
    align-self: center;
}

/* Override legacy home rules that squeeze content */
body.home-itd .home-hero-title {
    max-width: none;
}

body.home-itd main .card:not(.hb-card) {
    border-radius: var(--hb-radius-sm);
}

@media (max-width: 639px) {
    .hb-stats {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .hb-stat {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 1rem;
        padding: 1rem 1.125rem;
    }

    .hb-actions .hb-btn {
        flex: 1 1 100%;
    }

    .hb-hero__preview {
        display: block;
        margin-top: 1rem;
    }

    .hb-signals {
        max-width: none;
        min-height: auto;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .hb-signal--offset,
    .hb-signal--offset2 {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        opacity: 1;
    }
}

.dark body.home-itd {
    --hb-bg: #0a0a0c;
    --hb-surface: #222224;
    --hb-text: #f5f5f5;
    --hb-muted: rgba(255, 255, 255, 0.5);
    --hb-border: rgba(255, 255, 255, 0.1);
    --hb-secondary: #2a2a2c;
    --hb-btn: #ffffff;
    --hb-btn-text: #000000;
}

.dark body.home-itd .hb-stat {
    background: #2a2a2c;
}

.dark body.home-itd .hb-feature:nth-child(1) .hb-feature__icon { background: #11263f; color: #64aeff; }
.dark body.home-itd .hb-feature:nth-child(2) .hb-feature__icon { background: #302716; color: #f0c46b; }
.dark body.home-itd .hb-feature:nth-child(3) .hb-feature__icon { background: #2a1a40; color: #c084fc; }

.dark body.home-itd .hb-stat--accuracy .hb-stat__icon {
    background: rgba(34, 197, 94, 0.18);
    color: #4ade80;
}

.dark body.home-itd .hb-stat--monitoring .hb-stat__icon {
    background: rgba(8, 107, 255, 0.2);
    color: #60a5fa;
}

.dark body.home-itd .hb-stat--traders .hb-stat__icon {
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
}

.dark body.home-itd .hb-step:nth-child(1) .hb-step__num { background: #0a84ff; color: #fff; }
.dark body.home-itd .hb-step:nth-child(2) .hb-step__num { background: #7c3aed; color: #fff; }
.dark body.home-itd .hb-step:nth-child(3) .hb-step__num { background: #167347; color: #fff; }

.dark body.home-itd .hb-price--dark,
.dark body.site-itd .dash-plan-card--forever {
    background: linear-gradient(160deg, #1a1a1a 0%, #0a0a0a 52%, #000 100%);
}

.dark body.home-itd .hb-price {
    border: none;
}

.dark body.home-itd .hb-price--free {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* ---- Site header (ITD theme) ---- */
html:not(.dark) body.site-itd {
    background-color: #f5f5f5;
    color: #1a1a1a;
}

html:not(.dark) body.site-itd.home-itd {
    background-color: #f5f5f5;
}

.site-header {
    position: relative;
    z-index: 50;
    padding: clamp(0.75rem, 2vw, 1.25rem) 0;
}

.site-header__wrap {
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding-left: clamp(1rem, 3vw, 2rem);
    padding-right: clamp(1rem, 3vw, 2rem);
}

.site-header__bar {
    position: relative;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-radius: 999px;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
    padding: 0 clamp(1rem, 2.5vw, 1.5rem);
}

.site-header__brand {
    flex-shrink: 0;
}

.site-header__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.site-header__logo:hover {
    opacity: 0.85;
}

.site-header__logo img {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
}

.site-header__logo-accent {
    color: var(--brand);
}

.site-header__nav {
    display: none;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 0;
}

.site-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    gap: 0.5rem;
}

.site-header__desktop {
    display: none;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: nowrap;
}

.site-header__guest-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

body.site-itd .site-header .nav-link {
    color: #7a7a7a;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}

body.site-itd .site-header .nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

body.site-itd .site-header .nav-link-active,
body.site-itd .site-header .nav-link.active {
    background: #f0f0f0;
    color: #1a1a1a;
}

.site-header__register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0 1.25rem;
    margin-left: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    background: #1a1a1a;
    border-radius: 999px;
    transition: opacity 0.2s ease;
}

.site-header__register:hover {
    opacity: 0.9;
}

.site-header__register--mobile {
    display: flex;
    width: 100%;
    min-height: 2.75rem;
    margin-top: 0.5rem;
    margin-left: 0;
    font-size: 0.9375rem;
}

.site-header__burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    color: #7a7a7a;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.site-header__burger:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

.site-header__user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem 0.35rem 0.35rem;
    font-size: 0.875rem;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 999px;
}

.site-header__avatar {
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: #1a1a1a;
    border-radius: 50%;
}

.site-header__avatar--month {
    background: linear-gradient(135deg, #2b7fff, #086bff);
}

.site-header__avatar--popular {
    background: linear-gradient(135deg, #9b6dff, #7c3aed);
}

.site-header__avatar--forever {
    background: linear-gradient(135deg, #404040, #000000);
}

.site-header__mobile {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 1.25rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.site-header__mobile.hidden {
    display: none !important;
}

.site-header__mobile-inner {
    padding: 0.75rem 1rem 1rem;
}

body.site-itd .site-header .mobile-nav-link {
    color: #7a7a7a;
    border-radius: 0.75rem;
}

body.site-itd .site-header .mobile-nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

/* Desktop: no burger, show full nav */
@media (min-width: 768px) {
    .site-header__desktop {
        display: flex;
    }

    .site-header__nav {
        display: flex;
    }

    .site-header__burger {
        display: none !important;
    }

    .site-header__mobile {
        display: none !important;
    }

    .site-header__actions {
        margin-left: auto;
    }
}

/* Tablet: compact nav labels */
@media (min-width: 768px) and (max-width: 1023px) {
    body.site-itd .site-header .nav-link {
        padding: 0.35rem 0.6rem;
        font-size: 0.8125rem;
    }

    .site-header__register {
        padding: 0 1rem;
        font-size: 0.8125rem;
    }

    .site-header__user span {
        display: none;
    }
}

/* Mobile: burger + dropdown only */
@media (max-width: 767px) {
    .site-header__bar {
        border-radius: 1.25rem;
    }

    .site-header__inner {
        min-height: 3.75rem;
    }

    .site-header__desktop {
        display: none !important;
    }

    .site-header__nav {
        display: none !important;
    }

    .site-header__burger {
        display: flex;
    }

    .site-header__mobile:not(.hidden) {
        display: block;
    }

    #mobile-menu.site-header__mobile {
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0;
        right: 0;
        max-height: min(70dvh, 28rem);
        overflow-y: auto;
    }

    .site-header__logo {
        font-size: 1.125rem;
    }

    .site-header__logo img {
        width: 2rem;
        height: 2rem;
    }
}

@media (max-width: 400px) {
    .site-header__logo > span {
        display: none;
    }

    .site-header__inner {
        padding: 0 0.75rem;
    }
}

.dark body.site-itd {
    --sp-bg: #0a0a0c;
    --sp-surface: #161616;
    --sp-text: #f5f5f5;
    --sp-muted: rgba(255, 255, 255, 0.5);
    --sp-border: rgba(255, 255, 255, 0.1);
    --sp-btn: #ffffff;
    --sp-btn-text: #000000;
    --sp-secondary: #222224;
    background: var(--sp-bg);
    color: var(--sp-text);
}

.dark body.site-itd .site-header__bar,
.dark body.site-itd .site-header__mobile {
    background: rgba(34, 34, 36, 0.88);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark body.site-itd .site-header .nav-link {
    color: rgba(255, 255, 255, 0.5);
}

.dark body.site-itd .site-header .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f5f5f5;
}

.dark body.site-itd .site-header .nav-link-active,
.dark body.site-itd .site-header .nav-link.active {
    background: var(--brand, #086bff);
    color: #ffffff;
}

.dark body.site-itd .site-header__register {
    background: #fff;
    color: #000;
}

.dark body.site-itd .site-header__burger:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f5f5f5;
}

.dark body.site-itd .site-header__user {
    background: rgba(255, 255, 255, 0.08);
}

.dark body.site-itd .site-header__avatar:not([class*="site-header__avatar--"]) {
    background: #fff;
    color: #000;
}

.dark body.site-itd .site-header__avatar--month,
.dark body.site-itd .site-header__avatar--popular,
.dark body.site-itd .site-header__avatar--forever {
    color: #fff;
}

.dark body.site-itd .site-header .mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f5f5f5;
}

/* ===== Public pages: sp-* (ITD theme) ===== */
body.site-itd {
    --sp-bg: #f5f5f5;
    --sp-surface: #ffffff;
    --sp-text: #1a1a1a;
    --sp-muted: #7a7a7a;
    --sp-border: rgba(0, 0, 0, 0.1);
    --sp-btn: #1a1a1a;
    --sp-btn-text: #ffffff;
    --sp-secondary: #ebebeb;
    --sp-radius: 24px;
    --sp-radius-sm: 16px;
}

html:not(.dark) body.site-itd:not(.home-itd) footer {
    background: #ffffff !important;
    border-top-color: var(--sp-border) !important;
}

.sp-page {
    width: 100%;
}

.sp-wrap {
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1rem, 3vw, 2rem);
    padding-right: clamp(1rem, 3vw, 2rem);
}

.sp-wrap.is-center {
    text-align: center;
}

.sp-wrap--narrow {
    max-width: 48rem;
}

.sp-wrap--medium {
    max-width: 64rem;
}

.sp-hero {
    padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(1rem, 2vw, 1.5rem);
}

.sp-hero.is-center .sp-hero__lead {
    margin-left: auto;
    margin-right: auto;
}

.sp-hero__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    line-height: 1.1;
    margin: 0 0 1rem;
    color: var(--sp-text);
}

.sp-hero__lead {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.55;
    color: var(--sp-muted);
    margin: 0;
    max-width: 36rem;
}

.sp-hero__meta {
    font-size: 0.875rem;
    color: var(--sp-muted);
    margin: 0.5rem 0 0;
}

.sp-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 1.25rem;
    font-size: 14px;
    font-weight: 500;
    color: var(--brand-strong);
    background: rgba(8, 107, 255, 0.08);
    border-radius: 999px;
}

.sp-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
}

.sp-section {
    padding: clamp(2rem, 4vw, 3.5rem) 0;
}

.sp-section--surface {
    background: var(--sp-surface);
}

.sp-section__title {
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    color: var(--sp-text);
}

.sp-section__lead {
    font-size: 1rem;
    line-height: 1.55;
    color: var(--sp-muted);
    margin: 0 0 1.5rem;
    max-width: 40rem;
}

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

.sp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.2;
    text-decoration: none;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.sp-btn:hover {
    opacity: 0.9;
}

.sp-btn--primary {
    color: var(--sp-btn-text);
    background: var(--sp-btn);
}

.sp-btn--secondary {
    color: var(--sp-text);
    background: var(--sp-secondary);
}

.sp-btn--lg {
    min-height: 52px;
    padding: 0 1.75rem;
}

.sp-block {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: clamp(1.5rem, 3vw, 2rem);
}

.sp-legal {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--sp-muted);
}

.sp-legal section + section {
    margin-top: 1.75rem;
}

.sp-legal h2 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--sp-text);
    margin: 0 0 0.75rem;
}

.sp-legal p + p {
    margin-top: 0.5rem;
}

.sp-legal a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sp-faq-group {
    margin-bottom: 2.5rem;
}

.sp-faq-group__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--sp-text);
    margin: 0 0 1rem;
}

.sp-faq-group__title svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--brand);
    flex-shrink: 0;
}

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

.sp-cta {
    text-align: center;
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: clamp(1.5rem, 3vw, 2rem);
    margin-top: 2rem;
}

.sp-cta__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--sp-text);
    margin: 0 0 0.5rem;
}

.sp-cta__lead {
    font-size: 1rem;
    color: var(--sp-muted);
    margin: 0 0 1.25rem;
}

.sp-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.sp-grid {
    display: grid;
    gap: 1rem;
}

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

@media (min-width: 768px) {
    .sp-grid--2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.sp-grid--3 {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .sp-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .sp-grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.sp-card {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    padding: 1.5rem;
}

.sp-card h2,
.sp-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--sp-text);
    margin: 0 0 0.75rem;
}

.sp-card p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--sp-muted);
    margin: 0;
}

.sp-note {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--sp-radius-sm);
}

.sp-form-card {
    max-width: 36rem;
    margin: 0 auto 2rem;
}

.sp-form-card label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sp-text);
    margin-bottom: 0.35rem;
}

.sp-form-card .form-input {
    margin-bottom: 1rem;
}

.sp-review {
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.sp-review__user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sp-review__avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(8, 107, 255, 0.1);
    color: var(--brand-strong);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-review__name {
    font-weight: 500;
    color: var(--sp-text);
}

.sp-review__text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--sp-muted);
    flex: 1;
}

.sp-empty {
    min-height: calc(100vh - 16rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(3rem, 8vw, 5rem) 1rem;
    text-align: center;
}

.sp-empty__code {
    font-size: clamp(5rem, 18vw, 8rem);
    font-weight: 600;
    line-height: 1;
    color: rgba(0, 0, 0, 0.08);
    margin: 0 0 0.5rem;
}

.sp-empty__title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    color: var(--sp-text);
    margin: 0 0 0.5rem;
}

.sp-empty__lead {
    font-size: 1rem;
    color: var(--sp-muted);
    margin: 0 auto 1.5rem;
    max-width: 24rem;
}

/* Install page */
.sp-install-hero {
    display: grid;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .sp-install-hero {
        grid-template-columns: minmax(0, 1fr) 26rem;
    }
}

.sp-install-preview__box {
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--sp-border);
    padding: 1rem;
}

.sp-install-preview__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.875rem;
    padding: 0.35rem 0;
}

.sp-install-preview__row span:first-child {
    color: var(--sp-muted);
}

.sp-install-preview__row span:last-child {
    font-weight: 600;
    color: var(--sp-text);
    text-align: right;
}

.sp-install-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .sp-install-tabs {
        display: flex;
        flex-wrap: wrap;
    }
}

.sp-install-step {
    display: flex;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--sp-muted);
}

.sp-install-step__num {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--sp-secondary);
    color: var(--sp-text);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-install-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    background: rgba(8, 107, 255, 0.08);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.sp-install-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Legacy components on ITD pages */
body.site-itd main .card {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    box-shadow: none;
}

body.site-itd main .btn-primary,
body.site-itd main .sp-btn--primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--sp-btn-text) !important;
    background: var(--sp-btn) !important;
    border: none !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

body.site-itd main .btn-primary:hover,
body.site-itd main .sp-btn--primary:hover {
    opacity: 0.9;
}

body.site-itd main .btn-secondary,
body.site-itd main .sp-btn--secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--sp-text) !important;
    background: var(--sp-secondary) !important;
    border: none !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    text-decoration: none;
}

body.site-itd main .btn-lg {
    min-height: 52px;
    padding: 0 1.75rem;
}

body.site-itd main .form-input {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--sp-text);
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: 12px;
    transition: border-color 0.2s ease;
}

body.site-itd main .form-input:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.25);
}

body.site-itd main details.group {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    overflow: hidden;
}

body.site-itd main details.group summary {
    list-style: none;
}

body.site-itd main details.group summary::-webkit-details-marker {
    display: none;
}

body.site-itd main details.group summary:hover {
    background: rgba(0, 0, 0, 0.02);
}

body.site-itd main details.group summary span:first-child {
    color: var(--sp-text) !important;
}

body.site-itd main details.group [class*="text-gray-600"],
body.site-itd main details.group [class*="text-gray-400"] {
    color: var(--sp-muted) !important;
}

body.site-itd main details.group strong {
    color: var(--sp-text);
}

body.site-itd main .text-gray-900,
body.site-itd main .dark\:text-white {
    color: var(--sp-text) !important;
}

body.site-itd main .text-gray-500,
body.site-itd main .text-gray-600,
body.site-itd main .dark\:text-gray-400 {
    color: var(--sp-muted) !important;
}

body.site-itd [data-install-card].ring-2 {
    border-color: rgba(8, 107, 255, 0.35) !important;
    box-shadow: 0 0 0 2px rgba(8, 107, 255, 0.2);
}

/* ===== Dashboard ITD theme ===== */
body.site-itd.dashboard-route,
body.site-itd:has(.dashboard-page) {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

body.site-itd .dashboard-page {
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem) clamp(5rem, 8vw, 3rem);
    min-width: 0;
}

.dash-page-head {
    margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
    padding: clamp(1.25rem, 3vw, 1.5rem);
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
}

.dash-page-head--welcome {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.dash-page-head__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand);
}

.dash-page-head__title {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    line-height: 1.15;
    color: #1a1a1a;
}

.dash-page-head__lead {
    margin: 0.5rem 0 0;
    font-size: clamp(0.875rem, 2.8vw, 0.9375rem);
    line-height: 1.5;
    color: #7a7a7a;
}

.dash-layout {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2.5vw, 1.5rem);
    align-items: stretch;
}

@media (min-width: 1024px) {
    .dash-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 1.5rem;
    }
}

.dash-sidebar {
    width: 100%;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .dash-sidebar {
        width: 16rem;
        position: sticky;
        top: 5.5rem;
    }
}

.dash-sidebar__card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 0.75rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.dash-sidebar__id {
    margin-bottom: 0.875rem;
}

.dash-sidebar__id-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.5rem 0.5rem 0.875rem;
    background: #ffffff;
    border: none;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dash-sidebar__id-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.dash-sidebar__id-kicker {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.2;
}

.dash-sidebar__id-value {
    display: block;
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
    font-size: 0.9375rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    color: #1a1a1a;
    background: none;
    padding: 0;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.dash-sidebar__copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: #ffffff;
    color: #6b7280;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.dash-sidebar__copy:hover {
    color: var(--brand, #086bff);
    background: #ffffff;
    transform: translateY(-1px);
}

.dash-sidebar__copy.is-copied {
    color: #16a34a;
    background: #f0fdf4;
}

.dash-sidebar__copy-icon {
    width: 1.125rem;
    height: 1.125rem;
}

.dark .dash-sidebar__id-inner {
    background: #222224;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.dark .dash-sidebar__id-kicker {
    color: #9ca3af;
}

.dark .dash-sidebar__id-value {
    color: #f5f5f5;
}

.dark .dash-sidebar__copy {
    background: rgba(255, 255, 255, 0.08);
    color: #d4d4d4;
    box-shadow: none;
}

.dark .dash-sidebar__copy:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #93c5fd;
}

.dark .dash-sidebar__copy.is-copied {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.dash-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
}

@media (min-width: 1024px) {
    .dash-nav {
        flex-direction: column;
        flex-wrap: nowrap;
    }
}

.dash-nav__link,
body.site-itd .dashboard-page .sidebar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #7a7a7a;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    flex: 1 1 auto;
}

@media (min-width: 1024px) {
    .dash-nav__link,
    body.site-itd .dashboard-page .sidebar-link {
        flex: none;
        width: 100%;
    }
}

.dash-nav__link:hover,
body.site-itd .dashboard-page .sidebar-link:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #1a1a1a;
}

.dash-nav__link.active,
body.site-itd .dashboard-page .sidebar-link.active {
    background: #1a1a1a;
    color: #ffffff;
}

.dash-nav__icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.dash-main {
    flex: 1;
    min-width: 0;
}

body.site-itd .dashboard-page .card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

body.site-itd .dashboard-page .card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: transparent;
}

body.site-itd .dashboard-page .card-body {
    padding: 1.25rem;
}

body.site-itd .dashboard-page .stat-card {
    border-radius: 20px;
}

body.site-itd .dashboard-page .stat-value {
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.1;
}

body.site-itd .dashboard-page .stat-label {
    color: #7a7a7a;
    font-size: 0.8125rem;
}

body.site-itd .dashboard-page .dash-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 1024px) {
    body.site-itd .dashboard-page .dash-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.875rem;
    }
}

body.site-itd .dashboard-page .dash-charts {
    display: grid;
    gap: 0.875rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    body.site-itd .dashboard-page .dash-charts {
        grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
        align-items: stretch;
    }
}

/* Dashboard overview: stats & charts (ITD) */
.dash-stat {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-height: 5.5rem;
    padding: 1rem 1.125rem;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.dash-stat:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.dash-stat__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 14px;
    background: #f5f5f5;
    color: #1a1a1a;
}

.dash-stat__icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.dash-stat--signals .dash-stat__icon {
    background: rgba(8, 107, 255, 0.1);
    color: #086bff;
}

.dash-stat--today .dash-stat__icon {
    background: rgba(0, 0, 0, 0.05);
    color: #404040;
}

.dash-stat--winrate .dash-stat__icon {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
}

.dash-stat--referrals .dash-stat__icon {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

.dash-stat__body {
    min-width: 0;
}

.dash-stat__value {
    margin: 0;
    font-size: clamp(1.375rem, 3.5vw, 1.75rem);
    font-weight: 700;
    line-height: 1.1;
    color: #1a1a1a;
    font-variant-numeric: tabular-nums;
}

.dash-stat__label {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    color: #7a7a7a;
}

.dash-chart-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.dash-chart-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.dash-chart-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.dash-chart-card__tag {
    flex-shrink: 0;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #525252;
    background: #f5f5f5;
    border-radius: 999px;
}

.dash-chart-card__body {
    padding: 1rem 1.25rem 1.25rem;
    flex: 1;
}

.dash-chart-card__canvas {
    position: relative;
    width: 100%;
}

.dash-chart-card__canvas--line {
    height: 210px;
}

.dash-chart-card__body--donut {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.75rem;
}

.dash-chart-donut {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 280px;
    gap: 1.25rem;
}

.dash-chart-donut__ring {
    position: relative;
    width: 168px;
    height: 168px;
}

.dash-chart-donut__ring canvas {
    width: 100% !important;
    height: 100% !important;
}

.dash-chart-donut__center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.dash-chart-donut__value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    color: #1a1a1a;
    font-variant-numeric: tabular-nums;
}

.dash-chart-donut__label {
    margin-top: 0.2rem;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8a8a;
}

.dash-chart-legend {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dash-chart-legend__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.625rem;
    background: #fafafa;
    border-radius: 12px;
}

.dash-chart-legend__name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #525252;
}

.dash-chart-legend__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
    font-style: normal;
}

.dash-chart-legend__dot--won { background: #16a34a; }
.dash-chart-legend__dot--lost { background: #dc2626; }
.dash-chart-legend__dot--unknown { background: #d4d4d4; }

.dash-chart-legend__num {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1a1a1a;
    font-variant-numeric: tabular-nums;
}

.dark .dash-stat {
    background: #161616;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.dark .dash-stat__value { color: #f5f5f5; }
.dark .dash-stat__label { color: rgba(255, 255, 255, 0.5); }
.dark .dash-stat--signals .dash-stat__icon { background: rgba(8, 107, 255, 0.2); color: #60a5fa; }
.dark .dash-stat--today .dash-stat__icon { background: rgba(255, 255, 255, 0.08); color: #e5e5e5; }
.dark .dash-stat--winrate .dash-stat__icon { background: rgba(34, 197, 94, 0.18); color: #4ade80; }
.dark .dash-stat--referrals .dash-stat__icon { background: rgba(124, 58, 237, 0.2); color: #a78bfa; }

.dark .dash-chart-card {
    background: #161616;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .dash-chart-card__head { border-bottom-color: rgba(255, 255, 255, 0.08); }
.dark .dash-chart-card__title { color: #f5f5f5; }
.dark .dash-chart-card__tag { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.45); }
.dark .dash-chart-donut__value { color: #f5f5f5; }
.dark .dash-chart-donut__label { color: rgba(255, 255, 255, 0.45); }
.dark .dash-chart-legend__row { background: rgba(255, 255, 255, 0.05); }
.dark .dash-chart-legend__name { color: rgba(255, 255, 255, 0.55); }
.dark .dash-chart-legend__num { color: #f5f5f5; }

body.site-itd .dashboard-page .dash-plans {
    display: grid;
    gap: 1rem;
}

@media (min-width: 1024px) {
    body.site-itd .dashboard-page .dash-plans {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.dash-back-link {
    margin: 0 0 1rem;
}

.dash-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 0 0.625rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
}

.dash-bottom-nav__bar {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.2rem;
    min-height: 4.25rem;
    padding: 0.4rem 0.35rem;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.07);
}

.dash-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.4rem 0.2rem;
    border-radius: 16px;
    color: #8a8a8a;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.dash-bottom-nav__item:active:not(.is-active) {
    transform: scale(0.96);
    background: rgba(0, 0, 0, 0.04);
}

.dash-bottom-nav__item.is-active {
    color: #ffffff;
    background: #1a1a1a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.dash-bottom-nav__item.is-active .dash-bottom-nav__icon,
.dash-bottom-nav__item.is-active .dash-bottom-nav__label {
    color: #ffffff;
}

.dash-bottom-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
}

.dash-bottom-nav__icon svg {
    width: 100%;
    height: 100%;
}

.dash-bottom-nav__item.is-active .dash-bottom-nav__icon svg {
    stroke: currentColor;
    stroke-width: 2.25;
}

.dash-bottom-nav__label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.dash-bottom-nav-spacer {
    height: calc(4.75rem + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
}

.dark .dash-bottom-nav__bar {
    background: rgba(20, 20, 20, 0.94);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.35);
}

.dark .dash-bottom-nav__item {
    color: #9ca3af;
}

.dark .dash-bottom-nav__item:active:not(.is-active) {
    background: rgba(255, 255, 255, 0.06);
}

.dark .dash-bottom-nav__item.is-active {
    color: #1a1a1a;
    background: #f5f5f5;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.dark .dash-bottom-nav__item.is-active .dash-bottom-nav__icon,
.dark .dash-bottom-nav__item.is-active .dash-bottom-nav__label {
    color: #1a1a1a;
}

.sp-legal ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0.5rem 0 0;
}

.sp-legal li + li {
    margin-top: 0.25rem;
}

.sp-legal strong {
    color: var(--sp-text);
    font-weight: 600;
}

@media (max-width: 767px) {
    .sp-actions .sp-btn,
    .sp-actions .btn,
    .sp-cta__actions .sp-btn,
    .sp-cta__actions .btn {
        width: 100%;
    }

    .sp-install-tabs [data-install-platform] {
        width: 100%;
    }
}

/* ===== Dashboard pages UI ===== */
.dash-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#active-signal-container {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.dash-panel__head-text {
    min-width: 0;
}

.dash-panel {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.dash-panel--accent {
    background: linear-gradient(135deg, rgba(8, 107, 255, 0.06) 0%, #ffffff 55%);
    border-color: rgba(8, 107, 255, 0.15);
}

.dash-panel__head {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.dash-panel__head--split {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.dash-panel__title {
    margin: 0;
    font-size: clamp(1rem, 3.2vw, 1.125rem);
    font-weight: 600;
    line-height: 1.25;
    color: #1a1a1a;
}

.dash-panel__lead {
    margin: 0.35rem 0 0;
    font-size: clamp(0.8125rem, 2.5vw, 0.875rem);
    line-height: 1.5;
    color: #7a7a7a;
}

.dash-panel__body {
    padding: 1.25rem;
}

.dash-panel__body--flush {
    padding: 0;
}

.dash-panel__foot {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: center;
}

.dash-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    white-space: nowrap;
}

.dash-badge--info {
    color: var(--brand-strong);
    background: rgba(8, 107, 255, 0.1);
}

.dash-badge--ok {
    color: #166534;
    background: #dcfce7;
}

.dash-badge--muted {
    color: #525252;
    background: #f5f5f5;
}

.dash-badge--month {
    color: #1d4ed8;
    background: rgba(8, 107, 255, 0.12);
}

.dash-badge--popular {
    color: #6d28d9;
    background: rgba(124, 58, 237, 0.12);
}

.dash-badge--forever {
    color: #1a1a1a;
    background: #e5e5e5;
}

.dark .dash-badge--month {
    color: #93c5fd;
    background: rgba(8, 107, 255, 0.2);
}

.dark .dash-badge--popular {
    color: #e9d5ff;
    background: rgba(124, 58, 237, 0.22);
}

.dark .dash-badge--forever {
    color: #f5f5f5;
    background: rgba(255, 255, 255, 0.12);
}

.dash-action {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .dash-action {
        flex-direction: row;
        align-items: center;
    }
}

.dash-action__info {
    flex: 1;
    min-width: 0;
}

.dash-action__controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

@media (min-width: 640px) {
    .dash-action__controls {
        flex-direction: row;
        align-items: center;
        width: auto;
    }
}

.dash-quota {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand-strong);
    background: rgba(8, 107, 255, 0.1);
    border-radius: 8px;
}

.dash-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--control-h, 2.75rem);
    padding: 0 var(--control-px, 1.25rem);
    font-size: max(14px, var(--type-sm, 0.9375rem));
    font-weight: 500;
    font-family: inherit;
    border: none;
    outline: none;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.dash-btn:hover {
    opacity: 0.9;
}

.dash-btn--primary {
    color: #fff;
    background: #1a1a1a;
}

.dash-btn--secondary {
    color: #1a1a1a;
    background: #ebebeb;
}

.dash-btn--block {
    width: 100%;
}

.dash-empty {
    text-align: center;
    padding: clamp(2rem, 5vw, 3rem) 1.25rem;
}

.dash-empty__icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: #d4d4d4;
}

.dash-empty__icon svg {
    width: 100%;
    height: 100%;
}

.dash-empty__title {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
}

.dash-empty__text {
    margin: 0 0 1.25rem;
    font-size: 0.9375rem;
    color: #7a7a7a;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
}

/* Signals page: get signal bar */
.dash-signal-get__lead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.dash-signal-get__form {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.dash-signal-get__field {
    flex: 0 1 12.5rem;
    width: 12.5rem;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.dash-signal-get__hint {
    font-size: 0.6875rem;
    color: #8a8a8a;
    line-height: 1.3;
}

.dash-signal-get__btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.dash-select {
    width: 100%;
    min-height: 3rem;
    padding: 0 2.25rem 0 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    color: #1a1a1a;
    background: #fafafa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237a7a7a' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.dash-select:hover:not(:disabled) {
    border-color: rgba(0, 0, 0, 0.14);
    background-color: #f5f5f5;
}

.dash-select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Active signal card */
.dash-signal.dash-panel {
    overflow: hidden;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.dash-signal.dash-panel .dash-panel__body {
    padding: 1.25rem;
}

.dash-signal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0.875rem 1.25rem;
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
}

.dash-signal__head-start {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}

.dash-signal__head-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.dash-signal__head-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    background: #e8f2ff;
    color: #086bff;
}

.dash-signal__head-icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

.dash-signal__head-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.2;
}

.dash-signal__head-meta {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #7a7a7a;
    line-height: 1.3;
}

.dash-signal__get {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-left: auto;
    flex: 0 1 auto;
    min-width: 0;
}

.dash-signal__get .dash-signal-get__form {
    width: 100%;
    justify-content: flex-end;
}

.dash-signal__get .dash-select {
    min-height: var(--control-h, 2.75rem);
}

.dash-signal__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eeeeee;
}

.dash-signal__pair {
    margin: 0;
    font-size: clamp(1.75rem, 5.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.05;
    color: #1a1a1a;
    letter-spacing: -0.03em;
}

.dash-signal__dir {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.8125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 999px;
    flex-shrink: 0;
}

/* Яркие pill-кнопки/бейджи: без тёмной обводки, только цветная тень */
.dash-signal__dir--up,
.dash-signal__dir--down,
.dash-signal__status--won,
.dash-signal__status--lost,
.dash-btn--feedback-won,
.dash-btn--feedback-lost,
.dash-signal--up .dash-signal__confidence-track,
.dash-signal--down .dash-signal__confidence-track,
.btn-success,
.btn-danger,
.payment-action-btn-success,
.payment-action-btn-danger,
.dash-pay-simple__cancel {
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.dash-signal__dir--up {
    color: #ffffff;
    background: #22c55e;
    box-shadow:
        0 4px 16px rgba(34, 197, 94, 0.45),
        0 2px 6px rgba(34, 197, 94, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.dash-signal__dir--down {
    color: #ffffff;
    background: #ef4444;
    box-shadow:
        0 4px 16px rgba(239, 68, 68, 0.45),
        0 2px 6px rgba(239, 68, 68, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dash-signal .dash-metric-grid {
    margin-bottom: 1.25rem;
}

.dash-signal .dash-metric {
    padding: 0.875rem 0.5rem;
    background: #f7f7f7;
    border: 1px solid #efefef;
    border-radius: 12px;
}

.dash-signal .dash-metric__label {
    margin-bottom: 0.4rem;
    font-size: 0.625rem;
    letter-spacing: 0.08em;
}

.dash-signal .dash-metric__value {
    font-size: clamp(1.0625rem, 2.8vw, 1.3125rem);
    font-weight: 700;
    color: #1a1a1a;
}

.dash-signal .dash-metric__value--time {
    font-size: 1.0625rem;
    letter-spacing: 0.02em;
}

.dash-signal__confidence {
    margin-top: 0;
}

.dash-signal__confidence-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #7a7a7a;
}

.dash-signal__confidence-head strong {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1a1a1a;
}

.dash-signal__confidence-track {
    height: 0.375rem;
    background: #ebebeb;
    border-radius: 999px;
    overflow: hidden;
}

.dash-signal__confidence-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.dash-signal--up .dash-signal__confidence-fill {
    background: #22c55e;
}

.dash-signal--up .dash-signal__confidence-track {
    background: rgba(34, 197, 94, 0.14);
}

.dash-signal--down .dash-signal__confidence-fill {
    background: #ef4444;
}

.dash-signal--down .dash-signal__confidence-track {
    background: rgba(239, 68, 68, 0.14);
}

.dash-signal__status-wrap {
    margin-top: 1.5rem;
    padding-top: 0;
    border-top: none;
    text-align: center;
}

.dash-signal__status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1.125rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 999px;
}

.dash-signal__status--won {
    color: #ffffff;
    background: #22c55e;
    box-shadow:
        0 4px 14px rgba(34, 197, 94, 0.42),
        0 2px 5px rgba(34, 197, 94, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.dash-signal__status--lost {
    color: #ffffff;
    background: #ef4444;
    box-shadow:
        0 4px 14px rgba(239, 68, 68, 0.42),
        0 2px 5px rgba(239, 68, 68, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dash-btn--feedback {
    min-height: 3rem;
    width: 100%;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
}

.dash-btn--feedback-won {
    color: #ffffff;
    background: #22c55e;
    box-shadow:
        0 6px 20px rgba(34, 197, 94, 0.5),
        0 2px 8px rgba(34, 197, 94, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.dash-btn--feedback-won:hover {
    background: #16a34a;
    opacity: 1;
    box-shadow:
        0 8px 26px rgba(34, 197, 94, 0.58),
        0 3px 10px rgba(34, 197, 94, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.dash-btn--feedback-won:active {
    transform: translateY(0);
    box-shadow:
        0 3px 12px rgba(34, 197, 94, 0.4),
        0 1px 4px rgba(34, 197, 94, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.dash-btn--feedback-won:focus-visible {
    outline: 2px solid rgba(34, 197, 94, 0.65);
    outline-offset: 3px;
}

.dash-btn--feedback-lost {
    color: #ffffff;
    background: #ef4444;
    box-shadow:
        0 6px 20px rgba(239, 68, 68, 0.5),
        0 2px 8px rgba(239, 68, 68, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.dash-btn--feedback-lost:hover {
    background: #dc2626;
    opacity: 1;
    box-shadow:
        0 8px 26px rgba(239, 68, 68, 0.58),
        0 3px 10px rgba(239, 68, 68, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.dash-btn--feedback-lost:active {
    transform: translateY(0);
    box-shadow:
        0 3px 12px rgba(239, 68, 68, 0.4),
        0 1px 4px rgba(239, 68, 68, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.dash-btn--feedback-lost:focus-visible {
    outline: 2px solid rgba(239, 68, 68, 0.65);
    outline-offset: 3px;
}

.dark .dash-select {
    color: #f5f5f5;
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.dark .dash-signal.dash-panel {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.dark .dash-signal__head {
    background: #161616;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dark .dash-signal__head-icon {
    background: rgba(8, 107, 255, 0.2);
    color: #93c5fd;
}

.dark .dash-signal__head-title,
.dark .dash-signal__pair,
.dark .dash-signal__confidence-head strong,
.dark .dash-signal .dash-metric__value { color: #f5f5f5; }

.dark .dash-signal__head-meta {
    color: rgba(255, 255, 255, 0.5);
}

.dark .dash-signal__hero {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dark .dash-signal .dash-metric {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.dark .dash-signal__dir--up {
    box-shadow:
        0 4px 18px rgba(34, 197, 94, 0.55),
        0 2px 8px rgba(34, 197, 94, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.dark .dash-signal__dir--down {
    box-shadow:
        0 4px 18px rgba(239, 68, 68, 0.55),
        0 2px 8px rgba(239, 68, 68, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.dark .dash-signal--up .dash-signal__confidence-track {
    background: rgba(34, 197, 94, 0.22);
}

.dark .dash-signal--down .dash-signal__confidence-track {
    background: rgba(239, 68, 68, 0.22);
}

.dark .dash-signal__status--won {
    box-shadow:
        0 4px 16px rgba(34, 197, 94, 0.5),
        0 2px 6px rgba(34, 197, 94, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.dark .dash-signal__status--lost {
    box-shadow:
        0 4px 16px rgba(239, 68, 68, 0.5),
        0 2px 6px rgba(239, 68, 68, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.dark .dash-btn--feedback-won {
    box-shadow:
        0 6px 22px rgba(34, 197, 94, 0.55),
        0 2px 8px rgba(34, 197, 94, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.dark .dash-btn--feedback-won:hover {
    box-shadow:
        0 8px 28px rgba(34, 197, 94, 0.62),
        0 3px 10px rgba(34, 197, 94, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dark .dash-btn--feedback-lost {
    box-shadow:
        0 6px 22px rgba(239, 68, 68, 0.55),
        0 2px 8px rgba(239, 68, 68, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.dark .dash-btn--feedback-lost:hover {
    box-shadow:
        0 8px 28px rgba(239, 68, 68, 0.62),
        0 3px 10px rgba(239, 68, 68, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

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

.dash-metric {
    padding: 1rem;
    text-align: center;
    background: #f5f5f5;
    border-radius: 14px;
}

.dash-metric__label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7a7a7a;
}

.dash-metric__value {
    font-size: clamp(1rem, 2.5vw, 1.375rem);
    font-weight: 700;
    color: #1a1a1a;
}

.dash-feedback {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.dash-feedback__title {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    color: #525252;
}

.dash-feedback__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 480px) {
    .dash-feedback__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.dash-steps {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .dash-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.dash-step {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.dash-step__num {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    background: #1a1a1a;
    border-radius: 10px;
}

.dash-step__title {
    margin: 0 0 0.2rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1a1a1a;
}

.dash-step__text {
    margin: 0;
    font-size: 0.8125rem;
    color: #7a7a7a;
    line-height: 1.45;
}

.dash-copy {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .dash-copy {
        flex-direction: row;
    }
}

.dash-copy .form-input {
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
    font-size: 0.8125rem;
}

.dash-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.dash-mini-stat {
    padding: 1.25rem 1rem;
    text-align: center;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
}

.dash-mini-stat__value {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    line-height: 1.1;
}

.dash-mini-stat__label {
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: #7a7a7a;
}

.dash-mini-stat--blue .dash-mini-stat__value {
    color: var(--brand);
}

.dash-mini-stat--green .dash-mini-stat__value {
    color: #16a34a;
}

.dash-mini-stat--amber .dash-mini-stat__value {
    color: #d97706;
}

.dash-mini-stat--red .dash-mini-stat__value {
    color: #ef4444;
}

.dash-mini-stat--winrate .dash-mini-stat__value {
    color: var(--brand, #086bff);
}

.dash-mini-stats--history {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0.875rem;
}

@media (min-width: 768px) {
    .dash-mini-stats--history {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.dash-panel__head-badge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

/* ===== History page ===== */
.dash-history-list {
    display: flex;
    flex-direction: column;
}

.dash-history-item {
    padding: 1.125rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.15s ease;
}

.dash-history-item:last-child {
    border-bottom: none;
}

.dash-history-item:hover {
    background: #fafafa;
}

.dash-history-item__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}

.dash-history-item__pair-wrap {
    min-width: 0;
}

.dash-history-item__pair {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.dash-history-item__date {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
}

.dash-history-item__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem 0.75rem;
}

.dash-history-metric {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.dash-history-metric__label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
}

.dash-history-metric__value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
}

.dash-history__accuracy {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 0.2rem 0.55rem;
    font-size: 0.8125rem;
    font-weight: 700;
    border-radius: 999px;
    border: none;
}

.dash-history__accuracy--high {
    color: #166534;
    background: rgba(34, 197, 94, 0.14);
}

.dash-history__accuracy--mid {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.12);
}

.dash-history__accuracy--low {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.12);
}

.dash-signal__status--sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
}

.dash-signal__status--pending {
    color: #525252;
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dash-signal__status--pending.dash-signal__status--sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
}

.dark .dash-history-item {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dark .dash-history-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.dark .dash-history-item__pair {
    color: #f5f5f5;
}

.dark .dash-history-item__date,
.dark .dash-history-metric__label {
    color: #9ca3af;
}

.dark .dash-history-metric__value {
    color: #f5f5f5;
}

.dark .dash-history__accuracy--high {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.18);
}

.dark .dash-history__accuracy--mid {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.18);
}

.dark .dash-history__accuracy--low {
    color: #f87171;
    background: rgba(239, 68, 68, 0.18);
}

.dark .dash-signal__status--pending {
    color: #d4d4d4;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.dark .dash-mini-stat--red .dash-mini-stat__value {
    color: #f87171;
}

.dark .dash-mini-stat--winrate .dash-mini-stat__value {
    color: #60a5fa;
}

/* ===== Referrals page ===== */
.dash-mini-stats--referrals {
    margin-bottom: 0.875rem;
}

.dash-panel--referral-link {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

.dash-panel--referral-link .dash-panel__head {
    background: #ffffff;
}

.dash-panel--referral-link .dash-panel__body {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #ffffff;
}

/* Unified referral link copy field */
.dash-copy-field {
    width: 100%;
}

.dash-copy-field__inner {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.375rem;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.dash-copy-field__input {
    flex: 1;
    min-width: 0;
    min-height: 2.75rem;
    padding: 0 0.75rem;
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1a1a1a;
    background: transparent;
    border: none;
    outline: none;
    border-radius: 12px;
}

.dash-copy-field__input:focus {
    outline: none;
}

.dash-copy-field__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-shrink: 0;
    min-height: 2.75rem;
    padding: 0 1.125rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    color: #ffffff;
    background: #1a1a1a;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.dash-copy-field__btn:hover {
    background: #262626;
}

.dash-copy-field__btn:active {
    transform: scale(0.98);
}

.dash-copy-field__btn.is-copied {
    background: #16a34a;
}

.dash-copy-field__btn-icon {
    flex-shrink: 0;
}

.dash-copy-field__btn-text {
    white-space: nowrap;
}

@media (max-width: 520px) {
    .dash-copy-field__inner {
        flex-direction: column;
        padding: 0.5rem;
    }

    .dash-copy-field__btn {
        width: 100%;
    }
}

.dark .dash-copy-field__inner {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.dark .dash-copy-field__input {
    color: #f5f5f5;
}

.dark .dash-copy-field__btn {
    background: #f5f5f5;
    color: #1a1a1a;
}

.dark .dash-copy-field__btn:hover {
    background: #ffffff;
}

.dark .dash-copy-field__btn.is-copied {
    background: #22c55e;
    color: #ffffff;
}

.dash-ref-steps {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .dash-ref-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.dash-ref-step {
    padding: 1rem 1.125rem;
    background: #fafafa;
    border-radius: 16px;
    border: none;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.dash-ref-step__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--brand, #086bff);
    background: rgba(8, 107, 255, 0.1);
    border-radius: 12px;
}

.dash-ref-step__icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.dash-ref-step__icon--bonus {
    color: #16a34a;
    background: rgba(34, 197, 94, 0.12);
}

.dash-ref-step__title {
    margin: 0 0 0.35rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1a1a1a;
}

.dash-ref-step__text {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #7a7a7a;
}

.dash-ref-step__text strong {
    color: #16a34a;
    font-weight: 700;
}

.dash-chart-card--referrals {
    margin-bottom: 0.875rem;
}

.dash-ref-list {
    display: flex;
    flex-direction: column;
}

.dash-ref-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.15s ease;
}

.dash-ref-item:last-child {
    border-bottom: none;
}

.dash-ref-item:hover {
    background: #fafafa;
}

.dash-ref-item__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--brand, #086bff);
    background: rgba(8, 107, 255, 0.1);
    border-radius: 999px;
    flex-shrink: 0;
}

.dash-ref-item__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    min-width: 0;
}

.dash-ref-item__name {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.dash-ref-item__date {
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .dash-ref-item {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }

    .dash-ref-item__date {
        grid-column: 2;
        justify-self: start;
    }
}

.dark .dash-ref-step {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.dark .dash-ref-step__title {
    color: #f5f5f5;
}

.dark .dash-ref-step__text {
    color: #9ca3af;
}

.dark .dash-ref-step__icon {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.15);
}

.dark .dash-ref-step__icon--bonus {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.18);
}

.dark .dash-ref-item {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dark .dash-ref-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.dark .dash-ref-item__avatar {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.15);
}

.dark .dash-ref-item__name {
    color: #f5f5f5;
}

.dark .dash-panel--accent {
    background: linear-gradient(135deg, rgba(8, 107, 255, 0.12) 0%, #161616 55%);
    border-color: rgba(96, 165, 250, 0.2);
}

.dark .dash-panel--referral-link,
.dark .dash-panel--referral-link .dash-panel__head,
.dark .dash-panel--referral-link .dash-panel__body {
    background: #161616;
    border-color: rgba(255, 255, 255, 0.1);
}

.dash-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dash-table-wrap .data-table {
    min-width: 36rem;
}

.dash-table-wrap .data-table thead {
    background: #f5f5f5;
}

.dash-table-wrap .data-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a7a7a;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.dash-table-wrap .data-table td {
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

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

.dash-plan-current__name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

.dash-plan-current__meta {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #7a7a7a;
    background: #f5f5f5;
    border-radius: 12px;
}

.dash-plans-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
}

.dash-plan-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-radius: 20px;
    border: none;
    outline: none;
    min-height: 100%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.dash-plan-card__tag {
    align-self: flex-start;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.dash-plan-card__name {
    margin: 0 0 0.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--plan-title, #1a1a1a);
}

.dash-plan-card__desc {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: var(--plan-muted, #7a7a7a);
}

.dash-plan-card__price {
    margin-bottom: 1.25rem;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--plan-price, #1a1a1a);
}

.dash-plan-card__price span {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--plan-price-sub, #7a7a7a);
}

.dash-plan-card__features {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: var(--plan-feature, #525252);
}

.dash-plan-card__features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-plan-card__features li svg {
    flex-shrink: 0;
}

.dash-plan-card__features li.is-no {
    color: var(--plan-muted, #7a7a7a);
    opacity: 0.65;
    text-decoration: line-through;
}

.dash-plan-card--free {
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.dash-plan-card--month {
    background: linear-gradient(160deg, #1563d4 0%, #0d4bb8 52%, #062d7a 100%);
    box-shadow: 0 10px 28px rgba(8, 107, 255, 0.28);
}

.dash-plan-card--popular {
    background: linear-gradient(160deg, #7c3aed 0%, #6d28d9 52%, #3b0764 100%);
    box-shadow: 0 10px 28px rgba(124, 58, 237, 0.28);
}

.dash-plan-card--forever {
    background: linear-gradient(160deg, #1a1a1a 0%, #0a0a0a 52%, #000 100%);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.dash-plan-card.is-current {
    transform: translateY(-2px);
}

.dash-plan-card--month.is-current {
    box-shadow: 0 14px 36px rgba(8, 107, 255, 0.38);
}

.dash-plan-card--popular.is-current {
    box-shadow: 0 14px 36px rgba(124, 58, 237, 0.38);
}

.dash-plan-card--forever.is-current {
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
}

.dash-plan-card--month .dash-btn--primary,
.dash-plan-card--popular .dash-btn--primary,
.dash-plan-card--forever .dash-btn--primary {
    background: #ffffff;
    color: #1a1a1a;
}

.dash-support-actions {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 520px) {
    .dash-support-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.dash-support-btn {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-height: 4.5rem;
    padding: 1rem 1.125rem;
    border-radius: 16px;
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dash-support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.dash-support-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
}

.dash-support-btn__icon svg {
    width: 1.375rem;
    height: 1.375rem;
}

.dash-support-btn__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.dash-support-btn__text strong {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.dash-support-btn__text small {
    font-size: 0.8125rem;
    font-weight: 500;
    opacity: 0.9;
    line-height: 1.3;
}

.dash-support-btn--vk {
    color: #ffffff;
    background: #0077ff;
}

.dash-support-btn--tg {
    color: #ffffff;
    background: #229ed9;
}

.dark .dash-support-btn--vk {
    box-shadow: 0 4px 18px rgba(0, 119, 255, 0.35);
}

.dark .dash-support-btn--tg {
    box-shadow: 0 4px 18px rgba(34, 158, 217, 0.35);
}

.dash-alert {
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
}

.dash-kv {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dash-kv__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.dash-kv__row:last-child {
    border-bottom: none;
}

.dash-kv__key {
    color: #7a7a7a;
}

.dash-kv__val {
    font-weight: 600;
    color: #1a1a1a;
    text-align: right;
}

.dash-kv__val--accent {
    color: var(--brand, #086bff);
}

.dash-widgets {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 0.5rem;
}

.dash-plan-overview {
    position: relative;
    overflow: hidden;
}

.dash-plan-overview::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #d4d4d4;
}

.dash-plan-overview--month::before {
    background: linear-gradient(90deg, #086bff, #60a5fa);
}

.dash-plan-overview--popular::before {
    background: linear-gradient(90deg, #7c3aed, #c084fc);
}

.dash-plan-overview--forever::before {
    background: linear-gradient(90deg, #1a1a1a, #525252);
}

.dash-plan-overview--free::before {
    background: linear-gradient(90deg, #a3a3a3, #d4d4d4);
}

.dash-plan-overview__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.dash-plan-overview__name {
    margin: 0;
    font-size: clamp(1.375rem, 4vw, 1.625rem);
    font-weight: 700;
    line-height: 1.15;
    color: #1a1a1a;
}

.dash-plan-overview__cta {
    margin-top: 1.25rem;
}

.dash-plan-overview .dash-kv {
    margin-top: 0.5rem;
    padding: 0.25rem 0;
    background: #fafafa;
    border-radius: 14px;
}

.dash-plan-overview .dash-kv__row {
    padding: 0.625rem 1rem;
}

.dash-referral-lead {
    margin: 0 0 1.125rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #7a7a7a;
}

.dash-referral-lead__bonus {
    font-weight: 700;
    color: var(--brand, #086bff);
}

.dash-referral-code {
    margin: 0.75rem 0 0;
    font-size: 0.8125rem;
    color: #7a7a7a;
}

.dash-referral-code code {
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1a1a1a;
    background: #f5f5f5;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
}

.dash-copy__btn {
    flex-shrink: 0;
    min-width: 3rem;
    width: 3rem;
    padding: 0;
}

.dash-copy .form-input {
    min-height: 3rem;
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    color: #1a1a1a;
}

.dark .dash-plan-overview__name { color: #f5f5f5; }
.dark .dash-plan-overview .dash-kv { background: rgba(255, 255, 255, 0.05); }
.dark .dash-kv__val { color: #f5f5f5; }
.dark .dash-referral-lead { color: #9ca3af; }
.dark .dash-referral-code code { color: #f5f5f5; background: rgba(255, 255, 255, 0.08); }
.dark .dash-copy .form-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f5f5f5;
}

.dash-session {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 14px;
}

@media (min-width: 640px) {
    .dash-session {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.dash-session.is-current {
    background: rgba(8, 107, 255, 0.06);
    border: 1px solid rgba(8, 107, 255, 0.15);
}

.dash-session + .dash-session {
    margin-top: 0.75rem;
}

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

@media (min-width: 640px) {
    .dash-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.dash-load-more {
    min-height: 48px;
    padding: 0 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1a1a1a;
    background: #f5f5f5;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.dash-load-more:hover {
    background: #ebebeb;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Payment page (dashboard) ===== */
.dash-pay {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.dash-pay-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
}

.dash-pay-back:hover {
    color: var(--brand-strong);
}

.dash-pay-summary__kicker {
    margin: 0 0 0.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a7a7a;
}

.dash-pay-summary__price {
    flex-shrink: 0;
    padding: 0.5rem 0.85rem;
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.2;
    border-radius: 999px;
    background: #1a1a1a;
    color: #fff;
    white-space: nowrap;
}

.dash-pay-summary--month .dash-pay-summary__price {
    background: linear-gradient(135deg, #086bff, #3b82f6);
}

.dash-pay-summary--popular .dash-pay-summary__price {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.dash-pay-summary--forever .dash-pay-summary__price {
    background: linear-gradient(135deg, #1a1a1a, #404040);
}

.dash-pay-summary__perks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0 0 0.75rem;
    padding: 0;
    list-style: none;
}

.dash-pay-summary__perks li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #525252;
}

.dash-pay-summary__perks svg {
    flex-shrink: 0;
    color: var(--brand);
}

.dash-pay-summary__meta {
    margin: 0;
    font-size: 0.8125rem;
    color: #9ca3af;
}

.dash-pay-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dash-pay-steps__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.5rem;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    background: #fff;
    color: #9ca3af;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.dash-pay-steps__item.is-active {
    border-color: rgba(8, 107, 255, 0.25);
    background: rgba(8, 107, 255, 0.06);
    color: var(--brand);
}

.dash-pay-steps__item.is-done {
    border: none;
    background: #f0fdf4;
    color: #166534;
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.12);
}

.dash-pay-steps__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 999px;
    background: #f5f5f5;
    color: inherit;
}

.dash-pay-steps__item.is-active .dash-pay-steps__num {
    background: var(--brand);
    color: #fff;
}

.dash-pay-steps__item.is-done .dash-pay-steps__num {
    background: #16a34a;
    color: #fff;
}

.dash-pay-steps__label {
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dash-pay-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.dash-pay-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
    min-height: 5.5rem;
    padding: 0.85rem 0.9rem;
    text-align: left;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    background: #fafafa;
    color: #1a1a1a;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.dash-pay-tab:hover {
    border-color: rgba(8, 107, 255, 0.25);
    background: #fff;
}

.dash-pay-tab.is-active {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 4px 16px rgba(8, 107, 255, 0.12);
}

.dash-pay-tab__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    background: rgba(8, 107, 255, 0.1);
    color: var(--brand);
}

.dash-pay-tab__icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.dash-pay-tab__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.dash-pay-tab__text strong {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.2;
}

.dash-pay-tab__text small {
    font-size: 0.75rem;
    font-weight: 500;
    color: #7a7a7a;
    line-height: 1.3;
}

.dash-pay-tab__badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.2rem 0.45rem;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
}

.dash-pay-flow {
    margin: 0 0 1rem;
    padding: 0.85rem 0.85rem 0.85rem 2rem;
    border-radius: 14px;
    background: #f5f5f5;
    list-style: decimal;
}

.dash-pay-flow.hidden {
    display: none;
}

.dash-pay-flow li {
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #525252;
}

.dash-pay-flow li:last-child {
    margin-bottom: 0;
}

.dash-pay-flow strong {
    color: #1a1a1a;
}

.dash-pay-panels {
    margin-top: 0.25rem;
}

.dash-pay-panel {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.dash-pay-panel.hidden {
    display: none;
}

.dash-pay-status-grid {
    display: grid;
    gap: 0.65rem;
}

@media (min-width: 640px) {
    .dash-pay-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dash-pay-qr {
        grid-column: 1 / -1;
    }
}

.dash-pay-stat {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    background: #fafafa;
}

.dash-pay-stat__label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9ca3af;
}

.dash-pay-stat__value {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    color: #1a1a1a;
    word-break: break-word;
}

.dash-pay-stat__hint {
    font-size: 0.8125rem;
    color: #7a7a7a;
}

.dash-pay-badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.2rem 0.55rem;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 999px;
}

.dash-pay-badge--muted {
    color: #525252;
    background: #f5f5f5;
}

.dash-pay-copy-grid {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .dash-pay-copy-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

.dash-pay-copy__box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 3.25rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: #fff;
}

.dash-pay-copy__value {
    flex: 1;
    min-width: 0;
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
    font-size: 0.9375rem;
    font-weight: 800;
    line-height: 1.25;
    color: #1a1a1a;
    word-break: break-all;
}

.dash-pay-copy__btn {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.55rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--brand);
    background: rgba(8, 107, 255, 0.08);
    border: 1px solid rgba(8, 107, 255, 0.2);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.dash-pay-copy__btn:hover {
    background: rgba(8, 107, 255, 0.14);
}

.dash-pay-copy__btn span {
    display: none;
}

@media (min-width: 480px) {
    .dash-pay-copy__btn span {
        display: inline;
    }
}

.dash-pay-tip {
    margin: 0;
    padding: 0.75rem 0.9rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    border-radius: 12px;
}

.dash-pay-tip--ok {
    color: #166534;
    background: #f0fdf4;
    border: none;
}

.dash-pay-tip--warn {
    color: #92400e;
    background: #fffbeb;
    border: none;
}

.dash-pay-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dash-pay-actions .dash-btn.hidden,
.dash-pay-actions .payment-action-btn.hidden {
    display: none;
}

.dash-pay-manual-status {
    margin: 0;
}

.dash-pay-qr__img {
    display: block;
    max-width: 12rem;
    margin: 0.75rem auto 0;
    border-radius: 12px;
}

.dash-pay-link {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand);
    word-break: break-all;
}

.dash-pay-help__body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .dash-pay-help__body {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.dash-pay-help__text p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #7a7a7a;
}

.dash-pay-help .payment-support-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
}

#payment-modal.payment-page.dash-pay {
    max-width: 42rem;
}

/* Simple payment (SBP only) */
.dash-pay--simple {
    width: 100%;
    max-width: min(100%, 32rem);
    margin-left: auto;
    margin-right: auto;
}

.dash-pay--simple #crypto-status-badge {
    display: none !important;
}

.dash-pay--simple #create-crypto-invoice-btn,
.dash-pay--simple #open-crypto-invoice-btn {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

.dash-pay-simple.dash-panel,
.dash-pay--simple .dash-panel {
    width: 100%;
}

.dash-pay-simple__rows {
    margin: 0 0 1.25rem;
    padding: 0;
}

.dash-pay-simple__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.dash-pay-simple__row:first-child {
    padding-top: 0;
}

.dash-pay-simple__row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dash-pay-simple__row dt {
    margin: 0;
    font-size: 0.875rem;
    color: #7a7a7a;
}

.dash-pay-simple__row dd {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: right;
}

.dash-pay-simple__price {
    font-size: 1.25rem;
    color: var(--brand);
}

.dash-pay-simple__methods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1rem;
}

.dash-pay-simple__method {
    flex: 1 1 8rem;
    min-height: 2.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #fff;
    color: #334155;
    font-size: 0.875rem;
    font-weight: 600;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.dash-pay-simple__method.is-active {
    border-color: rgba(8, 107, 255, 0.45);
    background: rgba(8, 107, 255, 0.08);
    color: #086bff;
}

.dark .dash-pay-simple__method {
    background: #1e293b;
    border-color: rgba(71, 85, 105, 0.8);
    color: #e2e8f0;
}

.dark .dash-pay-simple__method.is-active {
    background: rgba(8, 107, 255, 0.18);
    border-color: rgba(56, 189, 248, 0.45);
    color: #93c5fd;
}

.dash-pay-simple__primary-action {
    display: grid;
    gap: 0.625rem;
    margin: 0 0 1rem;
}

.dash-pay-simple__status {
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #525252;
    background: #f5f5f5;
    border-radius: 12px;
}

.dash-pay-simple__status.is-pending {
    color: #1d4ed8;
    background: #eff6ff;
}

.dash-pay-simple__status.is-ok {
    color: #166534;
    background: #f0fdf4;
}

.dash-pay-simple__status.is-error {
    color: #b91c1c;
    background: #fef2f2;
}

.dash-pay-qr-guide {
    margin: 0 0 1rem;
    padding: 1rem;
    border: 1px solid rgba(8, 107, 255, 0.16);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(8, 107, 255, 0.055), rgba(14, 165, 233, 0.025));
}

.dash-pay-qr-guide.hidden {
    display: none;
}

.dash-pay-qr-guide__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dash-pay-qr-guide__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 2.5rem;
    color: #086bff;
    border-radius: 12px;
    background: rgba(8, 107, 255, 0.1);
}

.dash-pay-qr-guide__icon svg {
    width: 1.4rem;
    height: 1.4rem;
}

.dash-pay-qr-guide__head h2 {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.35;
    color: #171717;
}

.dash-pay-qr-guide__head p {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #737373;
}

.dash-pay-qr-guide__steps {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dash-pay-qr-guide__steps li {
    display: grid;
    grid-template-columns: 1.65rem minmax(0, 1fr);
    align-items: start;
    gap: 0.65rem;
}

.dash-pay-qr-guide__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    color: #086bff;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(8, 107, 255, 0.13);
}

.dash-pay-qr-guide__steps p {
    margin: 0;
    padding-top: 0.15rem;
    color: #525252;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.dash-pay-qr-guide__steps strong {
    color: #262626;
}

.dash-pay-qr-guide__notice {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1rem 0 0;
    padding-top: 0.85rem;
    color: #166534;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.45;
    border-top: 1px solid rgba(22, 101, 52, 0.12);
}

.dash-pay-qr-guide__notice svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    margin-top: 0.05rem;
}

.dark .dash-pay-qr-guide {
    border-color: rgba(56, 189, 248, 0.2);
    background: linear-gradient(145deg, rgba(8, 107, 255, 0.12), rgba(14, 165, 233, 0.04));
}

.dark .dash-pay-qr-guide__head h2,
.dark .dash-pay-qr-guide__steps strong {
    color: #f1f5f9;
}

.dark .dash-pay-qr-guide__head p,
.dark .dash-pay-qr-guide__steps p {
    color: #cbd5e1;
}

.dark .dash-pay-qr-guide__number {
    color: #93c5fd;
    background: #1e293b;
}

.dark .dash-pay-qr-guide__notice {
    color: #86efac;
    border-top-color: rgba(134, 239, 172, 0.15);
}

.dash-pay-simple__actions {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    width: 100%;
}

.dash-pay-simple__btn {
    min-height: 3rem;
    width: 100%;
    font-size: 0.9375rem;
}

.dash-pay-simple__btn.is-creating,
.dash-pay-simple__btn.is-opening,
.dash-pay-simple__btn.is-done {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    pointer-events: none;
    transition: background 0.25s ease, transform 0.2s ease;
}

.dash-pay-simple__btn.is-creating {
    background: linear-gradient(
        110deg,
        #1a1a1a 0%,
        #1a1a1a 38%,
        #525252 50%,
        #1a1a1a 62%,
        #1a1a1a 100%
    );
    background-size: 220% 100%;
    animation: dash-pay-btn-shimmer 1.1s ease-in-out infinite;
}

.dash-pay-simple__btn.is-opening {
    background: #262626;
}

.dash-pay-simple__btn.is-done {
    background: #166534;
    animation: dash-pay-btn-done 0.35s ease-out;
}

.dash-pay-btn__spinner {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dash-pay-btn-spin 0.65s linear infinite;
    flex-shrink: 0;
}

.dash-pay-btn__check {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: dash-pay-btn-check 0.4s ease-out;
}

.dash-pay-btn__label {
    font-weight: 600;
    letter-spacing: 0.01em;
}

@keyframes dash-pay-btn-spin {
    to { transform: rotate(360deg); }
}

@keyframes dash-pay-btn-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

@keyframes dash-pay-btn-done {
    0% { transform: scale(0.98); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes dash-pay-btn-check {
    0% { opacity: 0; transform: scale(0.6); }
    100% { opacity: 1; transform: scale(1); }
}

.dash-pay-simple__btn.hidden {
    display: none;
}

.dash-pay-simple__cancel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
    min-height: 2.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #b91c1c;
    background: #fef2f2;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.14);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dash-pay-simple__cancel:hover {
    background: #fee2e2;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.22);
    transform: translateY(-1px);
}

.dash-pay-simple__cancel:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dash-pay-simple__cancel.hidden {
    display: none;
}

.dark .dash-pay-simple__cancel {
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.4);
}

.dark .dash-pay-simple__cancel:hover {
    background: rgba(127, 29, 29, 0.25);
}

.dash-pay-simple__help {
    margin: 0;
    font-size: 0.8125rem;
    color: #9ca3af;
    text-align: center;
}

.dash-pay-simple__help a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
}

.dash-pay-simple__help a:hover {
    text-decoration: underline;
}

.dark .dash-pay-simple__row {
    border-color: #334155;
}

.dark .dash-pay-simple__row dd {
    color: #f1f5f9;
}

.dark .dash-pay-simple__status {
    background: #0f172a;
    color: #94a3b8;
}

.dark .dash-pay-simple__status.is-pending {
    background: rgba(8, 107, 255, 0.12);
    color: #93c5fd;
}

@media (max-width: 479px) {
    .dash-pay--simple .dash-panel__body {
        padding: 1rem;
    }

    .dash-pay-simple__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
        padding: 0.75rem 0;
    }

    .dash-pay-simple__row dd {
        text-align: left;
        width: 100%;
    }

    .dash-pay-simple__price {
        font-size: 1.375rem;
    }

    .dash-pay-simple__status {
        padding: 0.65rem 0.75rem;
    }

    .dash-pay-simple__btn {
        min-height: 3.125rem;
        font-size: 1rem;
    }

    .dash-pay-simple__help {
        padding: 0 0.25rem 0.5rem;
        line-height: 1.5;
    }
}

@media (min-width: 480px) and (max-width: 1023px) {
    .dash-pay--simple {
        max-width: 100%;
    }
}

@media (min-width: 640px) {
    .dash-pay-simple__actions {
        flex-direction: row;
        align-items: stretch;
    }

    .dash-pay-simple__actions .dash-pay-simple__btn {
        flex: 1 1 0;
        min-width: 0;
    }
}

body.site-itd .dashboard-page .dash-main:has(.dash-pay--simple) {
    width: 100%;
    min-width: 0;
}

#payment-modal.payment-page.dash-pay .payment-page-card,
#payment-modal.payment-page.dash-pay .payment-panel {
    border: none;
    box-shadow: none;
    padding: 0;
    background: transparent;
}

#payment-modal.payment-page.dash-pay .payment-modal-methods,
#payment-modal.payment-page.dash-pay .payment-modal-footer {
    max-width: none;
    margin: 0;
}

.dark .dash-pay-steps__item {
    background: #111827;
    border-color: #334155;
    color: #94a3b8;
}

.dark .dash-pay-steps__item.is-active {
    background: rgba(8, 107, 255, 0.12);
    border-color: rgba(8, 107, 255, 0.35);
    color: #93c5fd;
}

.dark .dash-pay-tab {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

.dark .dash-pay-tab.is-active {
    background: #1e293b;
}

.dark .dash-pay-flow {
    background: #0f172a;
}

.dark .dash-pay-stat,
.dark .dash-pay-copy__box {
    background: #0f172a;
    border-color: #334155;
}

.dark .dash-pay-summary__perks li {
    color: #cbd5e1;
}

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

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

    .dash-action__controls .btn,
    .dash-action__controls .form-input,
    .dash-copy .btn,
    .dash-copy .form-input {
        width: 100%;
    }
}

/* Admin panel styles: assets/css/admin.css (loaded on /admin/* only) */

/* ============================================
   ITD DARK THEME (unified)
   Charcoal surfaces + brand blue — overrides slate on site-itd
   ============================================ */

/* Slate overrides → ITD charcoal on public + dashboard */
html.dark body.site-itd .bg-white,
html.dark body.site-itd.dashboard-route .bg-white {
    background-color: #161616 !important;
}

html.dark body.site-itd .bg-gray-50,
html.dark body.site-itd .bg-gray-100 {
    background-color: #1c1c1c !important;
}

html.dark body.site-itd .border-gray-100,
html.dark body.site-itd .border-gray-200 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark body.site-itd .text-gray-900,
html.dark body.site-itd .text-gray-800 {
    color: #f5f5f5 !important;
}

html.dark body.site-itd .text-gray-700,
html.dark body.site-itd .text-gray-600 {
    color: rgba(255, 255, 255, 0.55) !important;
}

html.dark body.site-itd .text-gray-500,
html.dark body.site-itd .text-gray-400 {
    color: rgba(255, 255, 255, 0.4) !important;
}

html.dark body.site-itd .card,
html.dark body.site-itd .dashboard-page .card {
    background: #161616;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

html.dark body.site-itd .card-header,
html.dark body.site-itd .card-footer {
    border-color: rgba(255, 255, 255, 0.08);
}

html.dark body.site-itd .sidebar-link {
    color: rgba(255, 255, 255, 0.5);
}

html.dark body.site-itd .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f5f5f5;
    box-shadow: none;
}

html.dark body.site-itd .sidebar-link.active {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
}

html.dark body.site-itd .sidebar-link.active svg {
    color: #000000 !important;
}

html.dark body.site-itd .stat-value {
    color: #f5f5f5 !important;
}

html.dark body.site-itd .stat-label {
    color: rgba(255, 255, 255, 0.5) !important;
}

html.dark body.site-itd:not(.home-itd) footer {
    background: #161616 !important;
    border-top-color: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.5);
}

html.dark body.site-itd:not(.home-itd) footer a,
html.dark body.site-itd:not(.home-itd) footer .text-gray-600,
html.dark body.site-itd:not(.home-itd) footer .text-gray-500 {
    color: rgba(255, 255, 255, 0.5) !important;
}

html.dark body.site-itd:not(.home-itd) footer a:hover {
    color: #f5f5f5 !important;
}

html.dark body.site-itd .footer-social-link {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f5f5f5;
}

html.dark body.site-itd .footer-social-link:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

html.dark body.site-itd .sp-note {
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.25);
}

html.dark body.site-itd .sp-badge {
    background: rgba(8, 107, 255, 0.18);
    color: #93c5fd;
}

html.dark body.site-itd #preloader {
    background: #0a0a0c !important;
}

/* Dashboard: panels & layout */
html.dark .dash-panel {
    background: #161616;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

html.dark .dash-panel__head,
html.dark .dash-panel__foot {
    border-color: rgba(255, 255, 255, 0.08);
}

html.dark .dash-panel__title {
    color: #f5f5f5;
}

html.dark .dash-panel__lead {
    color: rgba(255, 255, 255, 0.5);
}

html.dark .dash-panel--accent {
    background: linear-gradient(135deg, rgba(8, 107, 255, 0.14) 0%, #161616 55%);
    border-color: rgba(96, 165, 250, 0.22);
}

html.dark .dash-page-head {
    background: #161616;
    border-color: rgba(255, 255, 255, 0.1);
}

html.dark .dash-page-head__title {
    color: #f5f5f5;
}

html.dark .dash-page-head__lead {
    color: rgba(255, 255, 255, 0.5);
}

html.dark .dash-page-head__eyebrow {
    color: #60a5fa;
}

html.dark .dash-sidebar__card {
    background: #161616;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

html.dark .dash-nav__link,
html.dark body.site-itd .dashboard-page .sidebar-link {
    color: rgba(255, 255, 255, 0.5);
}

html.dark .dash-nav__link:hover,
html.dark body.site-itd .dashboard-page .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f5f5f5;
}

html.dark .dash-nav__link.active,
html.dark body.site-itd .dashboard-page .sidebar-link.active {
    background: #ffffff;
    color: #000000;
}

html.dark .dash-mini-stat {
    background: #161616;
    border-color: rgba(255, 255, 255, 0.1);
}

html.dark .dash-mini-stat__value {
    color: #f5f5f5;
}

html.dark .dash-mini-stat__label {
    color: rgba(255, 255, 255, 0.5);
}

html.dark .dash-mini-stat--blue .dash-mini-stat__value {
    color: #60a5fa;
}

html.dark .dash-mini-stat--green .dash-mini-stat__value {
    color: #4ade80;
}

html.dark .dash-mini-stat--amber .dash-mini-stat__value {
    color: #fbbf24;
}

html.dark .dash-empty__icon {
    color: #404040;
}

html.dark .dash-empty__title {
    color: #f5f5f5;
}

html.dark .dash-empty__text {
    color: rgba(255, 255, 255, 0.5);
}

html.dark .dash-btn--primary {
    color: #000000;
    background: #ffffff;
}

html.dark .dash-btn--secondary {
    color: #f5f5f5;
    background: #2a2a2c;
}

html.dark .dash-load-more {
    color: #f5f5f5;
    background: #2a2a2c;
}

html.dark .dash-load-more:hover {
    background: #333335;
}

html.dark .dash-plans-title {
    color: #f5f5f5;
}

html.dark .dash-plan-current__name {
    color: #f5f5f5;
}

html.dark .dash-plan-current__meta {
    color: rgba(255, 255, 255, 0.5);
    background: #1c1c1c;
}

html.dark .dash-plan-card--free {
    background: #161616;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

html.dark .dash-plan-card--free .dash-plan-card__name,
html.dark .dash-plan-card--free .dash-plan-card__price {
    color: #f5f5f5;
}

html.dark .dash-plan-card--free .dash-plan-card__desc,
html.dark .dash-plan-card--free .dash-plan-card__features {
    color: rgba(255, 255, 255, 0.5);
}

html.dark .dash-table-wrap .data-table thead {
    background: #1c1c1c;
}

html.dark .dash-table-wrap .data-table th {
    color: rgba(255, 255, 255, 0.5);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

html.dark .dash-table-wrap .data-table td {
    color: #e5e5e5;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

html.dark .dash-table-wrap tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

html.dark .dash-alert {
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.25);
}

html.dark .dash-kv__key {
    color: rgba(255, 255, 255, 0.5);
}

html.dark .dash-step__title {
    color: #f5f5f5;
}

html.dark .dash-step__text {
    color: rgba(255, 255, 255, 0.5);
}

html.dark .dash-step__num {
    background: #ffffff;
    color: #000000;
}

html.dark .dash-metric {
    background: rgba(255, 255, 255, 0.05);
}

html.dark .dash-metric__label {
    color: rgba(255, 255, 255, 0.5);
}

html.dark .dash-metric__value {
    color: #f5f5f5;
}

html.dark .dash-feedback {
    border-top-color: rgba(255, 255, 255, 0.08);
}

html.dark .dash-feedback__title {
    color: rgba(255, 255, 255, 0.55);
}

html.dark .dash-signal-get__hint {
    color: rgba(255, 255, 255, 0.45);
}

html.dark .dash-quota {
    background: rgba(8, 107, 255, 0.18);
    color: #93c5fd;
}

html.dark .dash-badge--ok {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.18);
}

html.dark .dash-badge--muted {
    color: #d4d4d4;
    background: rgba(255, 255, 255, 0.1);
}

html.dark .dash-badge--info {
    color: #93c5fd;
    background: rgba(8, 107, 255, 0.2);
}

html.dark .dash-copy-field__btn {
    color: #000000;
    background: #ffffff;
}

html.dark .dash-copy-field__btn:hover {
    background: #e5e5e5;
}

html.dark body.site-itd .form-input,
html.dark body.site-itd .input {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f5f5f5;
}

html.dark body.site-itd .form-input:focus,
html.dark body.site-itd .input:focus {
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 0 3px rgba(8, 107, 255, 0.2);
}

html.dark body.site-itd .form-label {
    color: rgba(255, 255, 255, 0.55);
}

/* ============================================
   Dark theme: one charcoal palette
   Old slate/indigo .dark rules used !important and
   painted a blue-gray glass UI over the ITD surfaces.
   ============================================ */
html.dark {
    color-scheme: dark;
    --surface-raised: #161616;
}

html.dark body.site-itd,
html.dark body.site-itd.home-itd,
html.dark body.site-itd.dashboard-route {
    --hb-bg: #0a0a0c;
    --hb-surface: #1c1c1e;
    --hb-text: #f5f5f5;
    --hb-muted: rgba(255, 255, 255, 0.68);
    --hb-border: rgba(255, 255, 255, 0.12);
    --hb-btn: #ffffff;
    --hb-btn-text: #111111;
    --hb-secondary: #2c2c2e;
    --sp-bg: #0a0a0c;
    --sp-surface: #1c1c1e;
    --sp-text: #f5f5f5;
    --sp-muted: rgba(255, 255, 255, 0.68);
    --sp-border: rgba(255, 255, 255, 0.12);
    --sp-btn: #ffffff;
    --sp-btn-text: #111111;
    --sp-secondary: #2c2c2e;
    --surface: #1c1c1e;
    --surface-soft: #161616;
    --surface-muted: #222224;
    --surface-raised: #1c1c1e;
    --line: rgba(255, 255, 255, 0.12);
    --line-soft: rgba(255, 255, 255, 0.08);
    --text: #f5f5f5;
    --text-muted: rgba(255, 255, 255, 0.68);
    background: #0a0a0c !important;
    color: #f5f5f5 !important;
}

html.dark body.site-itd nav,
html.dark body.site-itd nav.site-header__bar,
html.dark body.site-itd .site-header__bar {
    background: rgba(22, 22, 24, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

html.dark body.site-itd .site-header .nav-link,
html.dark body.site-itd .nav-link {
    color: rgba(255, 255, 255, 0.78) !important;
    background: transparent !important;
}

html.dark body.site-itd .site-header .nav-link:hover,
html.dark body.site-itd .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

html.dark body.site-itd .site-header .nav-link-active,
html.dark body.site-itd .site-header .nav-link.active,
html.dark body.site-itd .nav-link-active,
html.dark body.site-itd .nav-link.active {
    background: #086bff !important;
    color: #ffffff !important;
}

html.dark body.site-itd .site-header__mobile,
html.dark body.site-itd #mobile-menu,
html.dark body.site-itd #mobile-menu.site-header__mobile {
    background: rgba(22, 22, 24, 0.98) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

html.dark body.site-itd .mobile-nav-link {
    color: rgba(255, 255, 255, 0.82) !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark body.site-itd .mobile-nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

html.dark body.site-itd .card,
html.dark body.site-itd .stat-card,
html.dark body.site-itd .signal-card,
html.dark body.site-itd .table-container,
html.dark body.site-itd .payment-page-card,
html.dark body.site-itd .payment-panel,
html.dark body.site-itd .payment-info-card,
html.dark body.site-itd .payment-card-box,
html.dark body.site-itd .payment-modal-dialog,
html.dark body.site-itd details.group,
html.dark body.site-itd .dashboard-page .card {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
}

html.dark body.site-itd .card-header,
html.dark body.site-itd .data-table thead,
html.dark body.site-itd .card-footer {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark body.site-itd footer,
html.dark body.home-itd footer,
html.dark body.site-itd.home-itd footer {
    background: #111113 !important;
    border-top-color: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.68) !important;
}

html.dark body.site-itd .text-gray-900,
html.dark body.site-itd .text-gray-800,
html.dark body.site-itd .text-gray-700 {
    color: #f5f5f5 !important;
}

html.dark body.site-itd .text-gray-600,
html.dark body.site-itd .text-gray-500,
html.dark body.site-itd .text-gray-400,
html.dark body.site-itd .text-gray-300 {
    color: rgba(255, 255, 255, 0.64) !important;
}

html.dark body.site-itd .form-input,
html.dark body.site-itd .input,
html.dark body.site-itd select,
html.dark body.site-itd textarea,
html.dark body.site-itd select.form-input {
    background: #161618 !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #f5f5f5 !important;
}

html.dark body.site-itd .btn-secondary,
html.dark body.site-itd .payment-action-btn-secondary {
    background: #2c2c2e !important;
    color: #f5f5f5 !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}

html.dark body.site-itd .btn-secondary:hover,
html.dark body.site-itd .payment-action-btn-secondary:hover {
    background: #3a3a3c !important;
    color: #ffffff !important;
}

html.dark body.home-itd .hb-btn--secondary {
    color: #f5f5f5;
    background: #2c2c2e;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

html.dark body.home-itd .hb-signal {
    background: #222224;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    opacity: 1;
}

html.dark body.home-itd .hb-signal--offset {
    background: #1a1a1c;
    border-color: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

html.dark body.home-itd .hb-signal--offset2 {
    background: #141416;
    border-color: rgba(255, 255, 255, 0.08);
    opacity: 1;
}

html.dark body.home-itd .hb-signal__tag,
html.dark body.home-itd .hb-signal__time,
html.dark body.home-itd .hb-hero__lead,
html.dark body.home-itd .hb-stat__label {
    color: rgba(255, 255, 255, 0.72);
}

html.dark body.home-itd .hb-section--surface {
    background: #111113;
}

html.dark body.home-itd .hb-card,
html.dark body.home-itd .hb-stat,
html.dark body.home-itd .hb-step {
    background: #222224;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

html.dark body.home-itd .hb-feature__title,
html.dark body.home-itd .hb-step__title {
    color: #f5f5f5;
}

html.dark body.home-itd .hb-feature__text,
html.dark body.home-itd .hb-step__text {
    color: rgba(255, 255, 255, 0.72);
}

html.dark body.home-itd .hb-review__name {
    color: #f5f5f5;
}

html.dark body.home-itd .hb-review__text {
    color: rgba(255, 255, 255, 0.72);
}

html.dark body.home-itd .hb-review__avatar {
    background: rgba(8, 107, 255, 0.22);
    color: #93c5fd;
}

html.dark body.home-itd .hb-feature:nth-child(1) .hb-feature__icon,
html.dark body.home-itd .hb-seo__item:nth-child(1) .hb-seo__icon { background: #11263f; color: #64aeff; }
html.dark body.home-itd .hb-feature:nth-child(2) .hb-feature__icon { background: #302716; color: #f0c46b; }
html.dark body.home-itd .hb-feature:nth-child(3) .hb-feature__icon { background: #2a1a40; color: #c084fc; }
html.dark body.home-itd .hb-seo__item:nth-child(2) .hb-seo__icon { background: #0c2e2a; color: #2dd4bf; }
html.dark body.home-itd .hb-seo__item:nth-child(3) .hb-seo__icon { background: #142b20; color: #70d7a2; }
html.dark body.home-itd .hb-seo__item:nth-child(4) .hb-seo__icon { background: #3a2412; color: #fb923c; }

html.dark body.home-itd .hb-price--free,
html.dark body.site-itd .dash-plan-card--free {
    background: #222224;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
    --plan-title: #f5f5f5;
    --plan-muted: rgba(255, 255, 255, 0.68);
    --plan-price: #f5f5f5;
    --plan-price-sub: rgba(255, 255, 255, 0.55);
    --plan-feature: rgba(255, 255, 255, 0.8);
    --plan-check: #60a5fa;
    --plan-cross: rgba(255, 255, 255, 0.35);
}

html.dark body.site-itd #preloader {
    background: #0a0a0c !important;
}

html.dark body.site-itd #preloader .text-gray-400 {
    color: rgba(255, 255, 255, 0.55) !important;
}

html.dark body.site-itd .dash-panel,
html.dark body.site-itd .dash-page-head,
html.dark body.site-itd .dash-sidebar__card,
html.dark body.site-itd .dash-mini-stat {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.12);
}

html.dark body.site-itd .dash-bottom-nav__bar {
    background: rgba(17, 17, 19, 0.96) !important;
    border-color: rgba(255, 255, 255, 0.1);
}

