/* ==========================================================================
   0x-Connect Cyber-Fintech & Arbitrage Theme Stylesheet
   ========================================================================== */

:root {
    --ox-bg: #070a13;
    --ox-bg-secondary: #0b1120;
    --ox-surface: rgba(16, 25, 47, 0.95);
    --ox-surface-solid: #0e172a;
    --ox-surface-card: rgba(16, 25, 47, 0.96);
    --ox-surface-hover: rgba(28, 44, 82, 0.95);
    --ox-border: rgba(0, 242, 254, 0.25);
    --ox-border-subtle: rgba(255, 255, 255, 0.15);
    --ox-border-hover: rgba(0, 242, 254, 0.55);

    /* Vibrant Cyber & 0x-Connect Brand Accents */
    --ox-cyan: #00e5ff;
    --ox-blue: #0070f3;
    --ox-purple: #8b5cf6;
    --ox-violet: #7928ca;
    --ox-magenta: #a855f7;
    --ox-emerald: #00f5a0;
    --ox-gold: #f5b700;
    --ox-red: #ff3366;

    /* Signature 0x-Connect Gradients */
    --ox-gradient-primary: linear-gradient(135deg, #a855f7 0%, #0070f3 50%, #00e5ff 100%);
    --ox-gradient-brand: linear-gradient(135deg, #7928ca 0%, #0070f3 45%, #00e5ff 100%);
    --ox-gradient-emerald: linear-gradient(135deg, #00f5a0 0%, #00d2ff 100%);
    --ox-gradient-purple: linear-gradient(135deg, #a855f7 0%, #7928ca 100%);
    --ox-gradient-cyan: linear-gradient(135deg, #0070f3 0%, #00e5ff 100%);
    --ox-gradient-gold: linear-gradient(135deg, #f5b700 0%, #ff8c00 100%);
    --ox-gradient-dark: linear-gradient(180deg, rgba(16, 25, 47, 0.98) 0%, rgba(7, 10, 19, 0.99) 100%);
    --ox-gradient-card: linear-gradient(145deg, rgba(18, 28, 52, 0.95) 0%, rgba(10, 16, 32, 0.98) 100%);

    /* Ferro Theme Backward-Compatibility Variables */
    --ferro-bg: #070a13;
    --ferro-surface: #0e172a;
    --ferro-surface-2: #131d36;
    --ferro-surface-3: #1a2748;
    --ferro-border: #233458;
    --ferro-border-light: rgba(0, 242, 254, 0.3);
    --ferro-gold: #ffb800;
    --ferro-gold-hover: #ffc72b;
    --ferro-gold-glow: rgba(255, 184, 0, 0.35);
    --ferro-blue: #00e5ff;
    --ferro-blue-hover: #38bdf8;
    --ferro-blue-glow: rgba(0, 229, 255, 0.4);
    --ferro-red: #ff3366;
    --ferro-red-hover: #ff4d79;
    --ferro-red-glow: rgba(255, 51, 102, 0.4);
    --ferro-green: #00f5a0;
    --ferro-cyan: #00e5ff;
    --ferro-text: #f8fafc;
    --ferro-text-muted: #cbd5e1;
    --ferro-text-dim: #94a3b8;

    /* Typography */
    --ox-font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ox-font-mono: 'Space Grotesk', 'JetBrains Mono', monospace;
    --ox-font-title: 'Orbitron', 'Plus Jakarta Sans', sans-serif;

    /* Glows & Shadows */
    --ox-glow-cyan: 0 0 25px rgba(0, 229, 255, 0.35);
    --ox-glow-emerald: 0 0 25px rgba(0, 245, 160, 0.35);
    --ox-shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

/* Logo & Icon Styling */
.ox-logo-img {
    height: 44px;
    max-width: 220px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.2));
    transition: transform 0.25s ease, filter 0.25s ease;
}

.ox-logo-img:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.4));
}

.ox-icon-img {
    height: 38px;
    width: 38px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
}

.ox-brand-card-img {
    border-radius: 14px;
    border: 1px solid var(--ox-border);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 229, 255, 0.15);
    max-width: 100%;
    object-fit: cover;
}

/* Base resets & typography */
body.theme-0x {
    background-color: var(--ox-bg);
    color: #e2e8f0;
    font-family: var(--ox-font-main);
    overflow-x: hidden;
    position: relative;
}

/* High-Contrast Global Typography & Readability Overhaul */
.text-muted,
.theme-0x .text-muted,
.ox-user-body .text-muted,
.text-muted.small,
small.text-muted,
span.text-muted,
p.text-muted,
div.text-muted {
    color: #cbd5e1 !important;
}

.text-secondary,
.theme-0x .text-secondary {
    color: #94a3b8 !important;
}

.form-text,
.form-text.text-muted {
    color: #cbd5e1 !important;
}

.theme-0x p,
.ox-user-body p {
    color: #e2e8f0;
}

.form-label, label {
    color: #ffffff !important;
    font-weight: 600;
}

body.theme-0x::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(0, 242, 254, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 85% 65%, rgba(0, 245, 160, 0.04) 0%, transparent 45%),
        radial-gradient(circle at 50% 90%, rgba(157, 78, 221, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Monospace Utilities */
.ox-mono {
    font-family: var(--ox-font-mono) !important;
}

.ox-title {
    font-family: var(--ox-font-title) !important;
    letter-spacing: 0.5px;
}

/* Glow & Accent Text Classes */
.text-ox-cyan { color: var(--ox-cyan) !important; }
.text-ox-blue { color: var(--ox-blue) !important; }
.text-ox-emerald { color: var(--ox-emerald) !important; }
.text-ox-purple { color: var(--ox-purple) !important; }
.text-ox-gold { color: var(--ox-gold) !important; }
.text-ox-red { color: var(--ox-red) !important; }

.ox-gradient-text {
    background: var(--ox-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ox-gradient-text-emerald {
    background: var(--ox-gradient-emerald);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ox-gradient-text-gold {
    background: var(--ox-gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Top Live Arbitrage Ticker */
.ox-ticker-bar {
    background: rgba(8, 12, 22, 0.95);
    border-bottom: 1px solid var(--ox-border);
    font-size: 0.8rem;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 1050;
}

.ox-ticker-track {
    display: inline-flex;
    animation: oxTickerScroll 35s linear infinite;
}

.ox-ticker-track:hover {
    animation-play-state: paused;
}

@keyframes oxTickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ox-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    color: #94a3b8;
}

.ox-ticker-spread {
    background: rgba(0, 245, 160, 0.12);
    border: 1px solid rgba(0, 245, 160, 0.3);
    color: var(--ox-emerald);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Navbar */
.ox-navbar {
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--ox-border);
    transition: all 0.3s ease;
    z-index: 1030;
}

.ox-navbar.scrolled {
    background: rgba(7, 10, 19, 0.96);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.ox-nav-link {
    color: #94a3b8 !important;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.6rem 1rem !important;
    transition: all 0.25s ease;
    border-radius: 8px;
}

.ox-nav-link:hover, .ox-nav-link.active {
    color: var(--ox-cyan) !important;
    background: rgba(0, 242, 254, 0.08);
}

/* Buttons */
.btn-ox-primary {
    background: var(--ox-gradient-primary);
    color: #070a13 !important;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.6rem;
    box-shadow: 0 4px 18px rgba(0, 242, 254, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-ox-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.55);
    color: #070a13 !important;
}

.btn-ox-emerald {
    background: var(--ox-gradient-emerald);
    color: #070a13 !important;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.6rem;
    box-shadow: 0 4px 18px rgba(0, 245, 160, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-ox-emerald:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 245, 160, 0.55);
    color: #070a13 !important;
}

.btn-ox-outline {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--ox-border);
    color: #e2e8f0;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.65rem 1.4rem;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-ox-outline:hover {
    background: rgba(0, 242, 254, 0.1);
    border-color: var(--ox-cyan);
    color: #ffffff;
    box-shadow: 0 0 18px rgba(0, 242, 254, 0.25);
}

.btn-ox-outline-emerald {
    background: rgba(0, 245, 160, 0.04);
    border: 1px solid rgba(0, 245, 160, 0.3);
    color: var(--ox-emerald);
    font-weight: 600;
    border-radius: 10px;
    padding: 0.65rem 1.4rem;
    transition: all 0.3s ease;
}

.btn-ox-outline-emerald:hover {
    background: rgba(0, 245, 160, 0.15);
    border-color: var(--ox-emerald);
    color: #ffffff;
    box-shadow: 0 0 18px rgba(0, 245, 160, 0.3);
}

/* High-Tech Card & Glass Containers */
.ox-card {
    background: var(--ox-gradient-card);
    border: 1px solid var(--ox-border-subtle);
    border-radius: 16px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--ox-shadow-card);
    position: relative;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.ox-card:hover {
    border-color: var(--ox-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px -10px rgba(0, 242, 254, 0.15);
}

.ox-card-glow {
    border-color: var(--ox-border);
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.12);
}

.ox-card-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--ox-gradient-primary);
}

/* Badges */
.ox-badge-cyan {
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.35);
    color: var(--ox-cyan);
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 30px;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ox-badge-emerald {
    background: rgba(0, 245, 160, 0.12);
    border: 1px solid rgba(0, 245, 160, 0.35);
    color: var(--ox-emerald);
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 30px;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ox-badge-gold {
    background: rgba(245, 183, 0, 0.12);
    border: 1px solid rgba(245, 183, 0, 0.35);
    color: var(--ox-gold);
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 30px;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ox-badge-purple {
    background: rgba(157, 78, 221, 0.12);
    border: 1px solid rgba(157, 78, 221, 0.35);
    color: var(--ox-purple);
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 30px;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Hero Section & Parallax Canvas */
.ox-hero-section {
    position: relative;
    padding: 130px 0 90px 0;
    overflow: hidden;
}

.ox-parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    filter: saturate(1.4) contrast(1.2);
    transform: translateZ(0);
    pointer-events: none;
    z-index: -1;
}

.ox-hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 242, 254, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 254, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    pointer-events: none;
    z-index: -1;
}

/* Arbitrage Visualizer Terminal */
.ox-terminal-box {
    background: #090e1a;
    border: 1px solid var(--ox-border);
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), var(--ox-glow-cyan);
    overflow: hidden;
}

.ox-terminal-header {
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ox-terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.ox-terminal-log-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
    font-size: 0.82rem;
    font-family: var(--ox-font-mono);
    transition: background 0.2s;
}

.ox-terminal-log-row:hover {
    background: rgba(0, 242, 254, 0.04);
}

.ox-terminal-pulse {
    width: 8px;
    height: 8px;
    background: var(--ox-emerald);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--ox-emerald);
    display: inline-block;
    animation: oxPulse 1.8s infinite;
}

@keyframes oxPulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px var(--ox-emerald); }
    100% { transform: scale(0.9); opacity: 0.6; }
}

/* 6-Level Ladder Visualizer */
.ox-level-card {
    background: rgba(14, 22, 41, 0.7);
    border: 1px solid var(--ox-border-subtle);
    border-radius: 14px;
    padding: 20px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

.ox-level-card:hover {
    border-color: var(--ox-cyan);
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 242, 254, 0.15);
}

.ox-level-card.featured {
    border-color: var(--ox-cyan);
    background: linear-gradient(160deg, rgba(0, 242, 254, 0.12) 0%, rgba(14, 22, 41, 0.8) 100%);
}

.ox-level-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 242, 254, 0.15);
    border: 2px solid var(--ox-cyan);
    color: var(--ox-cyan);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
    font-family: var(--ox-font-mono);
}

/* Section Parallax Divider */
.ox-parallax-divider {
    position: relative;
    padding: 80px 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    border-top: 1px solid var(--ox-border);
    border-bottom: 1px solid var(--ox-border);
    overflow: hidden;
}

.ox-parallax-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 10, 19, 0.88);
    backdrop-filter: blur(6px);
}

.ox-parallax-divider .container {
    position: relative;
    z-index: 1;
}

/* Footer Styling */
.ox-footer {
    background: #05080f;
    border-top: 1px solid var(--ox-border);
    padding-top: 60px;
    padding-bottom: 30px;
    color: #94a3b8;
}

.ox-footer-link {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 8px;
}

.ox-footer-link:hover {
    color: var(--ox-cyan);
}

/* ==========================================================================
   User Dashboard Theme Components
   ========================================================================== */
.ox-user-body {
    background-color: var(--ox-bg);
    color: #f1f5f9;
    min-height: 100vh;
}

.ox-user-topbar {
    background: rgba(10, 16, 30, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 242, 254, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.ox-user-sidebar {
    background: rgba(8, 12, 23, 0.98);
    border-right: 1px solid rgba(0, 242, 254, 0.18);
    min-height: calc(100vh - 65px);
    padding: 1.5rem 0.75rem;
}

.ox-user-sidebar .text-uppercase.text-muted,
.ox-user-sidebar .text-uppercase {
    color: #38bdf8 !important;
    font-weight: 700 !important;
    letter-spacing: 1.2px !important;
    font-size: 0.7rem !important;
}

.ox-user-sidebar-link {
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    text-decoration: none;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.ox-user-sidebar-link:hover {
    color: #ffffff;
    background: rgba(0, 242, 254, 0.12);
}

.ox-user-sidebar-link.active {
    color: var(--ox-cyan);
    background: rgba(0, 242, 254, 0.16);
    border: 1px solid rgba(0, 242, 254, 0.35);
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(0, 242, 254, 0.18);
}

/* High-Contrast Card & Stat Card Surfaces */
.ox-card {
    background: linear-gradient(145deg, rgba(16, 25, 47, 0.96) 0%, rgba(9, 15, 28, 0.98) 100%);
    border: 1px solid rgba(0, 242, 254, 0.22);
    border-radius: 16px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    position: relative;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.ox-card:hover {
    border-color: rgba(0, 242, 254, 0.45);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px -10px rgba(0, 242, 254, 0.25);
}

.ox-card-glow {
    border-color: rgba(0, 242, 254, 0.35);
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.18);
}

.ox-stat-card {
    background: linear-gradient(145deg, rgba(16, 25, 47, 0.96) 0%, rgba(9, 15, 28, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ox-stat-card:hover {
    border-color: rgba(0, 242, 254, 0.45);
    transform: translateY(-3px);
}

.ox-stat-card-cyan {
    border-top: 3px solid var(--ox-cyan);
}

.ox-stat-card-emerald {
    border-top: 3px solid var(--ox-emerald);
}

.ox-stat-card-purple {
    border-top: 3px solid var(--ox-purple);
}

.ox-stat-card-gold {
    border-top: 3px solid var(--ox-gold);
}

.ox-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.ox-stat-icon.cyan {
    background: rgba(0, 242, 254, 0.18);
    color: var(--ox-cyan);
}

.ox-stat-icon.emerald {
    background: rgba(0, 245, 160, 0.18);
    color: var(--ox-emerald);
}

.ox-stat-icon.purple {
    background: rgba(157, 78, 221, 0.18);
    color: var(--ox-purple);
}

.ox-stat-icon.gold {
    background: rgba(245, 183, 0, 0.18);
    color: var(--ox-gold);
}

/* Progress bar cyber */
.ox-progress {
    background: rgba(255, 255, 255, 0.1);
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
}

.ox-progress-bar-cyan {
    background: var(--ox-gradient-primary);
}

.ox-progress-bar-emerald {
    background: var(--ox-gradient-emerald);
}

/* Form Controls in 0x Dark & High Contrast */
.ox-form-control,
.form-control,
.form-select {
    background-color: #0c1324 !important;
    border: 1px solid rgba(0, 242, 254, 0.25) !important;
    color: #ffffff !important;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
}

.ox-form-control:focus,
.form-control:focus,
.form-select:focus {
    background-color: #111b33 !important;
    border-color: var(--ox-cyan) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 242, 254, 0.25) !important;
}

.form-control::placeholder {
    color: #94a3b8 !important;
}

/* Disabled & Read-Only Input Overrides for Crisp Readability */
.form-control:disabled,
.form-control[readonly],
.form-control.text-muted:disabled,
.form-control.text-muted[readonly],
.form-select:disabled,
.ox-form-control:disabled,
.ox-form-control[readonly] {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc !important;
    opacity: 0.95 !important;
    cursor: not-allowed;
}

.input-group-text {
    background-color: #141f36 !important;
    border: 1px solid rgba(0, 242, 254, 0.25) !important;
    color: #cbd5e1 !important;
    font-weight: 600;
}

/* High-Contrast Tables */
.table-dark,
.table-dark > :not(caption) > * > *,
.table-ferro,
.table-ferro > :not(caption) > * > *,
.table {
    color: #f1f5f9;
}

.table-dark thead th,
.table-ferro thead th,
.table thead th,
.table-ferro th {
    background-color: #0e172a !important;
    color: #ffffff !important;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-bottom: 2px solid rgba(0, 242, 254, 0.35) !important;
    padding: 0.85rem 1rem;
}

.table thead tr.text-muted th,
.table-dark thead tr.text-muted th,
.table-dark thead tr.text-muted td {
    color: #ffffff !important;
}

.table-dark td,
.table-ferro td,
.table td {
    background-color: rgba(14, 22, 41, 0.75) !important;
    color: #f1f5f9 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 0.85rem 1rem;
    vertical-align: middle;
}

.table-dark tbody tr:hover td,
.table-ferro tbody tr:hover td,
.table tbody tr:hover td {
    background-color: rgba(0, 242, 254, 0.08) !important;
    color: #ffffff !important;
}

/* Modals */
.ox-modal-content {
    background: #0c1222;
    border: 1px solid var(--ox-border);
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), var(--ox-glow-cyan);
    color: #e2e8f0;
}

.ox-modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ox-modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Inner Panels & Sub-Boxes */
.ox-user-body .bg-dark {
    background-color: #0f182e !important;
    border: 1px solid rgba(0, 242, 254, 0.25) !important;
}

.ox-user-body .border-secondary {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.badge.bg-dark,
.ox-user-body .badge.bg-dark {
    background-color: #111b33 !important;
    border: 1px solid rgba(0, 242, 254, 0.25) !important;
    color: #f1f5f9 !important;
}

/* ==========================================================================
   Ferro Theme Compatibility Bridge in 0x-Connect
   ========================================================================== */
.ferro-card {
    background: rgba(14, 22, 41, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 242, 254, 0.22);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.25s ease-in-out;
    position: relative;
    overflow: hidden;
}

.ferro-card:hover {
    border-color: rgba(0, 242, 254, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
}

.ferro-card-gold-border { border-top: 3px solid #ffb800 !important; }
.ferro-card-blue-border { border-top: 3px solid #00e5ff !important; }
.ferro-card-red-border { border-top: 3px solid #ff3366 !important; }
.ferro-card-green-border { border-top: 3px solid #00f5a0 !important; }

.glow-gold { box-shadow: 0 0 25px rgba(255, 184, 0, 0.25); }
.glow-blue { box-shadow: 0 0 25px rgba(0, 229, 255, 0.25); }
.glow-red { box-shadow: 0 0 25px rgba(255, 51, 102, 0.25); }

/* Ferro Buttons Bridge */
.btn-ferro-gold {
    background: linear-gradient(135deg, #ffb800 0%, #e59800 100%);
    color: #070a12 !important;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.4rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(255, 184, 0, 0.35);
}
.btn-ferro-gold:hover {
    background: linear-gradient(135deg, #ffc72b 0%, #ffb800 100%);
    color: #000 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 184, 0, 0.55);
}

.btn-ferro-blue {
    background: linear-gradient(135deg, #0070f3 0%, #00e5ff 100%);
    color: #070a12 !important;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.4rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.35);
}
.btn-ferro-blue:hover {
    filter: brightness(1.1);
    color: #000 !important;
    transform: translateY(-1px);
}

.btn-ferro-red {
    background: linear-gradient(135deg, #ff3366 0%, #d91b4c 100%);
    color: #ffffff !important;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.4rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.35);
}
.btn-ferro-red:hover {
    color: #fff !important;
    transform: translateY(-1px);
}

.btn-ferro-green {
    background: linear-gradient(135deg, #00f5a0 0%, #00d2ff 100%);
    color: #070a12 !important;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.4rem;
    transition: all 0.2s ease;
}
.btn-ferro-green:hover {
    filter: brightness(1.1);
    color: #000 !important;
}

.btn-ferro-outline {
    background: rgba(20, 29, 51, 0.6);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: #f1f5f9;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.65rem 1.4rem;
    transition: all 0.2s ease;
}
.btn-ferro-outline:hover {
    background: rgba(0, 242, 254, 0.12);
    border-color: var(--ox-cyan);
    color: #ffffff;
}

/* Ferro Badges Bridge */
.badge-ferro-gold {
    background: rgba(255, 184, 0, 0.18);
    color: #ffc72b !important;
    border: 1px solid rgba(255, 184, 0, 0.5);
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-weight: 600;
}
.badge-ferro-blue {
    background: rgba(0, 229, 255, 0.18);
    color: #38bdf8 !important;
    border: 1px solid rgba(0, 229, 255, 0.5);
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-weight: 600;
}
.badge-ferro-green {
    background: rgba(0, 245, 160, 0.18);
    color: #00f5a0 !important;
    border: 1px solid rgba(0, 245, 160, 0.5);
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-weight: 600;
}
.badge-ferro-red {
    background: rgba(255, 51, 102, 0.18);
    color: #fb7185 !important;
    border: 1px solid rgba(255, 51, 102, 0.5);
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-weight: 600;
}

/* Ferro Progress Bridge */
.progress-ferro {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}
.progress-bar-ferro {
    background: var(--ox-gradient-primary);
}

/* ==========================================================================
   High-Contrast Auth UI & Form Controls
   ========================================================================== */
.auth-ui-body {
    background: radial-gradient(circle at 50% 15%, rgba(0, 112, 243, 0.15) 0%, #070a13 70%) !important;
    min-height: 100vh;
}

.auth-ui-body .ferro-card,
.auth-card {
    background: rgba(14, 23, 42, 0.95) !important;
    border: 1px solid rgba(0, 242, 254, 0.3) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 229, 255, 0.12) !important;
    border-radius: 20px !important;
}

.auth-ui-body .ferro-card-blue-border {
    border-top: 4px solid var(--ox-cyan) !important;
}

.auth-ui-body .ferro-card-gold-border {
    border-top: 4px solid var(--ox-gold) !important;
}

/* Global Form Contrast & Readability */
.form-label,
label {
    color: #f8fafc !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
}

.form-control,
.form-select {
    background-color: #0b1220 !important;
    border: 1px solid rgba(0, 242, 254, 0.3) !important;
    color: #ffffff !important;
    font-size: 0.95rem;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: #0f1a30 !important;
    border-color: #00e5ff !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 229, 255, 0.25) !important;
    color: #ffffff !important;
}

.form-control::placeholder {
    color: #64748b !important;
    opacity: 1;
}

.input-group-text {
    background-color: #121e36 !important;
    border: 1px solid rgba(0, 242, 254, 0.3) !important;
    color: #cbd5e1 !important;
    border-radius: 10px 0 0 10px;
    padding: 0.7rem 1rem;
}

.input-group .form-control {
    border-radius: 0 10px 10px 0;
}

.input-group .form-control:not(:last-child) {
    border-radius: 0;
}

.input-group .btn.toggle-password-btn {
    background-color: #121e36 !important;
    border: 1px solid rgba(0, 242, 254, 0.3) !important;
    border-left: none !important;
    color: #00e5ff !important;
    border-radius: 0 10px 10px 0 !important;
    padding: 0.7rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.input-group .btn.toggle-password-btn:hover {
    background-color: rgba(0, 229, 255, 0.2) !important;
    color: #ffffff !important;
}

.input-group .btn.toggle-password-btn i {
    color: #00e5ff !important;
}

.input-group .btn.toggle-password-btn:hover i {
    color: #ffffff !important;
}

.form-check-label {
    color: #cbd5e1 !important;
    font-size: 0.88rem;
}

.form-check-input {
    background-color: #0b1220 !important;
    border: 1px solid rgba(0, 242, 254, 0.4) !important;
}

.form-check-input:checked {
    background-color: #00e5ff !important;
    border-color: #00e5ff !important;
}

/* High Contrast Card & Text Overrides */
.ferro-card,
.ox-card {
    background: rgba(14, 23, 42, 0.94);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 16px;
}

.ferro-card p,
.ox-card p,
.ferro-card .text-muted,
.ox-card .text-muted {
    color: #cbd5e1 !important;
}

.ferro-card .text-muted.small,
.ox-card .text-muted.small {
    color: #94a3b8 !important;
}

.table-ferro thead th {
    background-color: #101c36 !important;
    color: #f8fafc !important;
    border-bottom: 2px solid rgba(0, 242, 254, 0.35) !important;
}

.table-ferro tbody td {
    background-color: transparent !important;
    color: #e2e8f0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}


