/* ==========================================================================
   AUREON - Premium Fintech Design System
   Python/Jinja2 Frontend (replicates Next.js/Tailwind design)
   ========================================================================== */

/* ─── Reset & Variables ─────────────────────────────────────────────────── */

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

:root {
    /* Core colors - public pages only; platform pages use app-platform.css which overrides these */
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2332;
    --bg-hover: #243044;
    --bg-surface: #111827;
    --border-color: #1e293b;
    --border-light: #2a3a4a;
    --text-primary: #e2e8f0;
    --text-secondary: #8892a4;
    --text-muted: #5a6478;
    --text-white: #ffffff;

    /* Semantic colors - public pages only; platform pages use app-platform.css which overrides these */
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --accent-dim: rgba(245, 158, 11, 0.1);
    --accent-glow: rgba(245, 158, 11, 0.2);
    --success: #10b981;
    --success-dim: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-dim: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-dim: rgba(245, 158, 11, 0.1);
    --info: #3b82f6;
    --info-dim: rgba(59, 130, 246, 0.1);
    --purple: #8b5cf6;
    --purple-dim: rgba(139, 92, 246, 0.1);

    /* Shadows */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 50px -10px rgba(0, 0, 0, 0.5);

    /* Borders */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.2s ease;
}

/* Platform override: app-platform.css variables take precedence for authenticated pages */
/* This block ensures public pages use style.css values and platform pages use app-platform.css values */

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ─── Utility Classes ───────────────────────────────────────────────────── */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-sm {
    max-width: 768px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-lg {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.py-12 { padding-top: 48px; padding-bottom: 48px; }
.py-20 { padding-top: 80px; padding-bottom: 80px; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.75; }

.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

/* Spacing utilities (Tailwind-like) */
.space-y-1 > * + * { margin-top: 4px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }
.space-y-8 > * + * { margin-top: 32px; }

.space-x-1 > * + * { margin-left: 4px; }
.space-x-2 > * + * { margin-left: 8px; }
.space-x-3 > * + * { margin-left: 12px; }
.space-x-4 > * + * { margin-left: 16px; }
.space-x-6 > * + * { margin-left: 24px; }

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.rounded { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius); }
.rounded-xl { border-radius: var(--radius-lg); }
.rounded-2xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* ─── Sidebar Navigation ────────────────────────────────────────────────── */

.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo .logo-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: var(--bg-primary);
    flex-shrink: 0;
}

.sidebar-logo .logo-text {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--text-white);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li a,
.sidebar-nav li button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
    width: 100%;
    text-align: left;
    margin-bottom: 2px;
}

.sidebar-nav li a:hover,
.sidebar-nav li button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-nav li a.active {
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
}

.sidebar-nav li a svg,
.sidebar-nav li button svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-bottom {
    padding: 10px;
    border-top: 1px solid var(--border-color);
}

.sidebar-bottom button,
.sidebar-bottom a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.85rem;
    width: 100%;
    margin-bottom: 2px;
}

.sidebar-bottom button:hover,
.sidebar-bottom a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-bottom .logout-btn {
    color: var(--danger);
}

.sidebar-bottom .logout-btn:hover {
    background: var(--danger-dim);
    color: var(--danger);
}

.sidebar-bottom svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ─── Main Content Area ─────────────────────────────────────────────────── */

.main-content {
    margin-left: 260px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    overflow: hidden;
}

/* Top Bar */
.main-content > .topbar {
    flex-shrink: 0;
    background: #111827;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

/* Authenticated page content area - scrollable */
.main-content > main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
}

/* ─── Top Bar ───────────────────────────────────────────────────────────── */

.topbar {
    flex-shrink: 0;
    background: #111827;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
}

.mobile-menu-btn {
    display: none;
    padding: 8px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
}

.mobile-menu-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.mobile-menu-btn svg {
    width: 22px;
    height: 22px;
}

/* ─── Status Badges ─────────────────────────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.badge-pro {
    background: var(--success-dim);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-free {
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.badge-verified {
    background: var(--success-dim);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-pending {
    background: var(--warning-dim);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-rejected {
    background: var(--danger-dim);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

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

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

/* ─── Status Banners ────────────────────────────────────────────────────── */

.status-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius);
    border: 1px solid;
}

.status-banner-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.status-banner-content {
    flex: 1;
    min-width: 0;
}

.status-banner-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 2px;
}

.status-banner-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-banner-action {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

/* Banner variants */
.banner-info {
    background: var(--info-dim);
    border-color: rgba(59, 130, 246, 0.2);
}
.banner-info .status-banner-action {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}
.banner-info .status-banner-action:hover {
    background: rgba(59, 130, 246, 0.3);
}

.banner-warning {
    background: var(--warning-dim);
    border-color: rgba(245, 158, 11, 0.2);
}
.banner-warning .status-banner-action {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}
.banner-warning .status-banner-action:hover {
    background: rgba(245, 158, 11, 0.3);
}

.banner-error {
    background: var(--danger-dim);
    border-color: rgba(239, 68, 68, 0.2);
}
.banner-error .status-banner-action {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}
.banner-error .status-banner-action:hover {
    background: rgba(239, 68, 68, 0.3);
}

.banner-success {
    background: var(--success-dim);
    border-color: rgba(16, 185, 129, 0.2);
}
.banner-success .status-banner-action {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}
.banner-success .status-banner-action:hover {
    background: rgba(16, 185, 129, 0.3);
}

/* ─── Cards ─────────────────────────────────────────────────────────────── */

.card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.card:hover {
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    opacity: 1;
}

.card h3 {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.card .value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-white);
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    letter-spacing: -0.5px;
}

.card .value.positive { color: var(--success); }
.card .value.negative { color: var(--danger); }

/* Cards grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* ─── Panels ────────────────────────────────────────────────────────────── */

.panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
}

.panel {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.panel h3 {
    margin-bottom: 20px;
    color: var(--accent);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel h3::before {
    content: '';
    width: 3px;
    height: 18px;
    background: var(--accent);
    border-radius: 2px;
}

/* ─── Tables ────────────────────────────────────────────────────────────── */

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

thead {
    background: var(--bg-hover);
}

th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--bg-hover);
}

.empty {
    color: var(--text-muted);
    text-align: center;
    padding: 40px !important;
    font-family: inherit;
    font-size: 0.9rem;
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
}

.btn-block {
    width: 100%;
}

/* ─── Forms ─────────────────────────────────────────────────────────────── */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238892a4' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 6px;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    margin-top: 2px;
    flex-shrink: 0;
}

.form-checkbox-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Password strength indicator */
.password-strength {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.password-strength-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    transition: background 0.3s;
}

.password-strength-bar.weak { background: var(--danger); }
.password-strength-bar.medium { background: var(--warning); }
.password-strength-bar.strong { background: var(--success); }

/* ─── Public Layout ─────────────────────────────────────────────────────── */

.public-page {
    min-height: 100vh;
}

.public-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(10, 14, 23, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.public-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.public-nav a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.public-nav a:hover {
    color: var(--text-white);
}

.public-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.public-hero {
    position: relative;
    padding: 140px 24px 80px;
    text-align: center;
    overflow: hidden;
}

.public-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1/2;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, var(--accent-dim) 0%, transparent 70%);
    pointer-events: none;
}

.public-hero-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.public-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
    color: var(--text-white);
}

.public-hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.public-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.public-section {
    padding: 80px 24px;
}

.public-section-alt {
    background: var(--bg-secondary);
}

.public-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-white);
}

.public-section p.subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 48px;
}

.public-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 48px 24px;
}

.public-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.public-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.public-footer h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-white);
    margin-bottom: 16px;
}

.public-footer ul {
    list-style: none;
}

.public-footer ul li {
    margin-bottom: 10px;
}

.public-footer ul li a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.public-footer ul li a:hover {
    color: var(--text-white);
}

.public-footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

/* ─── Auth Pages ────────────────────────────────────────────────────────── */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg-primary);
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .auth-logo .logo-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    color: var(--bg-primary);
    margin-bottom: 16px;
}

.auth-card .auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 8px;
}

.auth-card .auth-logo p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-card .auth-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 8px;
}

.auth-card .auth-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent);
    font-weight: 600;
}

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

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* ─── Chatbot Widget ────────────────────────────────────────────────────── */

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 16px var(--accent-glow), 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 0 4px 16px var(--accent-glow), 0 0 0 12px rgba(255, 255, 255, 0);
    }
}

.chatbot-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px var(--accent-glow), 0 0 0 0 rgba(255, 255, 255, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: pulseGlow 2s ease-in-out infinite;
}

.chatbot-launcher:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px var(--accent-glow);
}

.chatbot-launcher svg {
    width: 24px;
    height: 24px;
}

.chatbot-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    z-index: 100;
    width: calc(100vw - 48px);
    max-width: 380px;
    height: 500px;
    max-height: calc(100vh - 120px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.chatbot-header-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-white);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    line-height: 1.5;
}

.chat-message.bot {
    background: var(--bg-hover);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-message.user {
    background: var(--accent);
    color: var(--bg-primary);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-input-area {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.chatbot-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
}

.chatbot-input:focus {
    outline: none;
    border-color: var(--accent);
}

.chatbot-send {
    padding: 10px 16px;
    background: var(--accent);
    color: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
}

.chatbot-disclaimer {
    padding: 8px 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ─── Onboarding Steps ──────────────────────────────────────────────────── */

.onboarding-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 8px;
}

.onboarding-step {
    display: flex;
    align-items: center;
    flex: 1;
}

.onboarding-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.onboarding-step-dot.completed {
    background: var(--success);
    color: white;
}

.onboarding-step-dot.active {
    background: var(--accent);
    color: var(--bg-primary);
}

.onboarding-step-dot.pending {
    background: var(--bg-hover);
    color: var(--text-muted);
}

.onboarding-step-line {
    flex: 1;
    height: 2px;
}

.onboarding-step-line.completed {
    background: var(--success);
}

.onboarding-step-line.pending {
    background: var(--bg-hover);
}

.onboarding-step-label {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ─── Quick Action Cards ────────────────────────────────────────────────── */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.quick-action {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
    display: block;
}

.quick-action:hover {
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.quick-action-icon svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.quick-action h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 4px;
}

.quick-action p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ─── Loading Spinner ───────────────────────────────────────────────────── */

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Connection Status ─────────────────────────────────────────────────── */

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

.status-dot.disconnected {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ─── Modal ─────────────────────────────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-white);
}

.modal-close {
    padding: 4px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ─── Toast Notifications ───────────────────────────────────────────────── */

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 420px;
    animation: slideIn 0.3s ease;
}

.toast-success {
    border-left: 3px solid var(--success);
}

.toast-error {
    border-left: 3px solid var(--danger);
}

.toast-warning {
    border-left: 3px solid var(--warning);
}

.toast-info {
    border-left: 3px solid var(--info);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ─── Feature Flag Toggle ───────────────────────────────────────────────── */

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle.active {
    background: var(--accent);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle.active::after {
    transform: translateX(20px);
}

/* ─── Legal Pages ───────────────────────────────────────────────────────── */

.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 24px 60px;
}

.legal-page h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 8px;
}

.legal-page .last-updated {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.legal-page h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-white);
    margin-top: 32px;
    margin-bottom: 12px;
}

.legal-page p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.legal-page ul {
    padding-left: 24px;
    margin-bottom: 16px;
}

.legal-page li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 8px;
}

.legal-callout {
    background: var(--warning-dim);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius);
    padding: 20px;
    margin: 24px 0;
}

.legal-callout p {
    color: #fbbf24;
    margin-bottom: 0;
}

/* ─── Pricing Page ──────────────────────────────────────────────────────── */

.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
}

.pricing-toggle-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pricing-toggle-label.active {
    color: var(--text-white);
    font-weight: 600;
}

.pricing-switch {
    width: 48px;
    height: 26px;
    background: var(--border-color);
    border-radius: 13px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}

.pricing-switch.active {
    background: var(--accent);
}

.pricing-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.pricing-switch.active::after {
    transform: translateX(22px);
}

.pricing-save-badge {
    background: var(--success-dim);
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    transition: var(--transition);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.pricing-card.featured {
    border-color: rgba(245, 158, 11, 0.3);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.05) 0%, var(--bg-card) 100%);
}

.pricing-card .featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--bg-primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
}

.pricing-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 8px;
}

.pricing-card .price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 4px;
}

.pricing-card .price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.pricing-card .price-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 28px;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.pricing-features li svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.pricing-features li .check {
    color: var(--success);
}

.pricing-features li .x {
    color: var(--danger);
    opacity: 0.5;
}

/* ─── FAQ Page ──────────────────────────────────────────────────────────── */

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: var(--bg-card);
    color: var(--text-white);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    transition: background 0.2s;
}

.faq-question:hover {
    background: var(--bg-hover);
}

.faq-answer {
    padding: 0 20px 18px;
    background: var(--bg-card);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-answer.expanded {
    display: block;
}

.faq-answer.collapsed {
    display: none;
}

.faq-chevron {
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 12px;
    color: var(--text-muted);
}

.faq-chevron.rotated {
    transform: rotate(180deg);
}

/* ─── Beginners Guide ──────────────────────────────────────────────────── */

.guide-steps {
    max-width: 700px;
    margin: 0 auto;
}

.guide-step {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
}

.guide-step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 1px solid rgba(245, 158, 11, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}

.guide-step-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 8px;
}

.guide-step-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.trading-modes-table {
    max-width: 700px;
    margin: 0 auto 40px;
}

/* ─── Notification Center ───────────────────────────────────────────────── */

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.05);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 2px;
}

.notification-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ─── Settings Pages ────────────────────────────────────────────────────── */

.settings-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
}

.settings-nav {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.settings-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: var(--transition);
    margin-bottom: 2px;
}

.settings-nav a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.settings-nav a.active {
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
}

.settings-nav a svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.settings-content {
    min-width: 0;
}

.settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.settings-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 4px;
}

.settings-section p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ─── Exchange Cards ────────────────────────────────────────────────────── */

.exchange-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.exchange-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.exchange-card:hover {
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
}

.exchange-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.5rem;
}

.exchange-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 4px;
}

.exchange-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ─── KYC Status ────────────────────────────────────────────────────────── */

.kyc-status-banner {
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid;
    margin-bottom: 24px;
}

.kyc-status-banner .status-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.kyc-steps {
    display: flex;
    gap: 24px;
    margin-top: 24px;
}

.kyc-step {
    flex: 1;
    text-align: center;
}

.kyc-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.kyc-step-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ─── Admin Tables ──────────────────────────────────────────────────────── */

.admin-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-search {
    flex: 1;
    min-width: 200px;
}

.admin-filters {
    display: flex;
    gap: 8px;
}

/* ─── Mobile Responsive ─────────────────────────────────────────────────── */

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

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

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

    .settings-nav {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .settings-nav a {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .public-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        padding: 16px;
        gap: 12px;
        border-bottom: 1px solid var(--border-color);
    }

    .public-nav.open {
        display: flex;
    }

    .public-nav a {
        padding: 12px 16px;
        text-align: center;
        font-size: 0.9rem;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text-white);
        cursor: pointer;
        padding: 8px;
        order: 3;
    }

    @keyframes gradientShift {
        0% {
            background-position: 0% 50%;
        }
        50% {
            background-position: 100% 50%;
        }
        100% {
            background-position: 0% 50%;
        }
    }

    .brand-text {
        display: none !important;
        background-size: 300% auto !important;
    }

    .public-hero {
        padding: 100px 20px 60px;
    }

    .public-hero h1 {
        font-size: 2rem;
    }

    .public-section {
        padding: 48px 20px;
    }

    .public-section h2 {
        font-size: 1.5rem;
    }

    .public-footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .public-footer-inner {
        padding: 32px 20px;
    }

    .public-footer-grid > div {
        text-align: center;
    }

    .public-footer-grid h4 {
        margin-bottom: 12px;
    }

    .public-footer-grid ul {
        padding: 0;
    }

    .public-footer-grid ul li a {
        font-size: 0.85rem;
    }

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

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

    .auth-card {
        padding: 24px;
    }

    .chatbot-window {
        right: 12px;
        bottom: 88px;
        width: calc(100vw - 24px);
    }

    .toast {
        min-width: auto;
        max-width: calc(100vw - 48px);
    }

    .kyc-steps {
        flex-direction: column;
        gap: 16px;
    }

    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-filters {
        flex-wrap: wrap;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

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

    .public-hero-ctas {
        flex-direction: column;
    }

    .public-hero-ctas .btn {
        width: 100%;
    }

    /* Collapse 2-column grids to single column on mobile */
    .grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

 }

/* ─── Sidebar Overlay for Mobile ────────────────────────────────────────── */

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

/* ─── Scrollbar ─────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ─── Desktop Brand Text ────────────────────────────────────────────────── */

@media (min-width: 769px) {
    .brand-text {
        display: inline-block !important;
        background-size: 300% auto !important;
        animation: gradientShift 3s ease infinite !important;
    }
}

/* ─── Responsive Grid Breakpoints ───────────────────────────────────────── */

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ─── Cookie Banner ─────────────────────────────────────────────────────── */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 250;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 20px 24px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner-content {
    flex: 1;
    min-width: 280px;
}

.cookie-banner-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-banner-title svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.cookie-banner-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.cookie-banner-text a {
    color: var(--accent);
    text-decoration: underline;
    transition: color 0.2s;
}

.cookie-banner-text a:hover {
    color: var(--accent-hover);
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-banner-actions .btn {
    font-size: 0.85rem;
    padding: 8px 18px;
}

/* ─── Cookie Preferences Modal ──────────────────────────────────────────── */

.cookie-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 260;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cookie-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-modal-overlay.open .cookie-modal {
    transform: translateY(0) scale(1);
}

.cookie-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-modal-header h3 svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.cookie-modal-close {
    padding: 6px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.cookie-modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.cookie-modal-close svg {
    width: 20px;
    height: 20px;
}

.cookie-modal-body {
    padding: 24px;
}

.cookie-modal-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.cookie-option:hover {
    border-color: var(--border-light);
}

.cookie-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.cookie-option-content {
    flex: 1;
    min-width: 0;
}

.cookie-option-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 4px;
}

.cookie-option-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cookie-option-essential {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-style: italic;
}

.cookie-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cookie-modal-accept-all {
    width: 100%;
}

.cookie-modal-save {
    width: 100%;
}

.cookie-modal-link {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.cookie-modal-link a {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-modal-link a:hover {
    color: var(--accent-hover);
}

/* ─── Code Elements ─────────────────────────────────────────────────────── */

code {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

/* ─── Print Styles ──────────────────────────────────────────────────────── */

@media print {
    .sidebar,
    .topbar,
    .chatbot-launcher,
    .chatbot-window,
    .cookie-banner {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    body {
        background: white;
        color: black;
    }
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 16px;
    }

    .cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-banner-content {
        min-width: auto;
    }

    .cookie-banner-actions {
        justify-content: stretch;
    }

    .cookie-banner-actions .btn {
        flex: 1;
    }
}
