/* Connect Pro — Apple & Starlink Inspired Dual-Theme Design System (Light Default + Dark Mode) */

:root {
    /* Light Theme (Default) */
    --cp-bg: #F4F7FB;
    --cp-bg-elevated: #FFFFFF;
    --cp-navbar-bg: rgba(255, 255, 255, 0.88);
    --cp-card-bg: rgba(255, 255, 255, 0.94);
    --cp-card-hover: #FFFFFF;
    --cp-tile-bg: #F8FAFC;
    --cp-tile-hover: #F1F5F9;
    --cp-input-bg: #F8FAFC;
    --cp-input-focus-bg: #FFFFFF;
    --cp-border: #E2E8F0;
    --cp-border-subtle: #EDF2F7;
    --cp-border-hover: rgba(37, 99, 235, 0.4);
    --cp-text-main: #0F172A;
    --cp-text-secondary: #334155;
    --cp-text-muted: #64748B;
    --cp-placeholder: #94A3B8;
    --cp-primary: #2563EB;
    --cp-cyan: #0284C7;
    --cp-shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.07), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    --cp-shadow-hover: 0 20px 38px -12px rgba(37, 99, 235, 0.14), 0 4px 14px -2px rgba(15, 23, 42, 0.06);
    --cp-orbital-line: rgba(37, 99, 235, 0.06);
}

html.dark {
    /* Dark Theme (Optional Toggle) */
    --cp-bg: #040814;
    --cp-bg-elevated: #0B1324;
    --cp-navbar-bg: rgba(5, 10, 22, 0.85);
    --cp-card-bg: rgba(12, 20, 38, 0.84);
    --cp-card-hover: rgba(16, 28, 52, 0.92);
    --cp-tile-bg: rgba(7, 12, 24, 0.70);
    --cp-tile-hover: rgba(14, 23, 42, 0.85);
    --cp-input-bg: rgba(6, 10, 20, 0.88);
    --cp-input-focus-bg: rgba(9, 16, 32, 0.96);
    --cp-border: rgba(255, 255, 255, 0.09);
    --cp-border-subtle: rgba(255, 255, 255, 0.06);
    --cp-border-hover: rgba(79, 142, 247, 0.45);
    --cp-text-main: #F8FAFC;
    --cp-text-secondary: #CBD5E1;
    --cp-text-muted: #94A3B8;
    --cp-placeholder: #64748B;
    --cp-primary: #3B82F6;
    --cp-cyan: #22D3EE;
    --cp-shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
    --cp-shadow-hover: 0 24px 48px -12px rgba(0, 0, 0, 0.7), 0 0 25px -5px rgba(59, 130, 246, 0.2);
    --cp-orbital-line: rgba(79, 142, 247, 0.06);
}

.hidden {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    min-height: 100vh;
    background-color: var(--cp-bg);
    background-image: 
        radial-gradient(ellipse 75% 50% at 85% 5%, rgba(37, 99, 235, 0.10) 0%, rgba(6, 182, 212, 0.05) 45%, transparent 75%),
        radial-gradient(ellipse 60% 50% at 10% 90%, rgba(6, 182, 212, 0.07) 0%, transparent 65%);
    background-attachment: fixed;
    color: var(--cp-text-main);
    overflow-x: hidden;
    transition: background-color 0.25s ease, color 0.25s ease;
}

html.dark body {
    background-image: 
        radial-gradient(ellipse 75% 55% at 85% 12%, rgba(21, 65, 160, 0.42) 0%, rgba(11, 33, 84, 0.18) 45%, transparent 75%),
        radial-gradient(ellipse 60% 50% at 10% 88%, rgba(6, 182, 212, 0.10) 0%, transparent 65%);
}

/* Concentric Orbital Rings */
.vj-orbital-bg {
    position: fixed;
    top: -25vh;
    right: -15vw;
    width: 90vw;
    height: 90vw;
    max-width: 1050px;
    max-height: 1050px;
    border-radius: 9999px;
    border: 1px solid var(--cp-orbital-line);
    pointer-events: none;
    z-index: 0;
}

.vj-orbital-bg::before {
    content: "";
    position: absolute;
    inset: 15%;
    border-radius: 9999px;
    border: 1px solid var(--cp-orbital-line);
}

/* Navbar & Dock */
.vj-navbar {
    background: var(--cp-navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-color: var(--cp-border);
}

/* Cards & Surfaces */
.vj-card {
    background: var(--cp-card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--cp-border);
    box-shadow: var(--cp-shadow-card);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.vj-card-interactive:hover {
    border-color: var(--cp-border-hover);
    background: var(--cp-card-hover);
    box-shadow: var(--cp-shadow-hover);
    transform: translateY(-2px);
}

.vj-tile {
    background: var(--cp-tile-bg);
    border: 1px solid var(--cp-border);
    transition: all 0.2s ease;
}

.vj-tile:hover {
    border-color: var(--cp-border-hover);
    background: var(--cp-tile-hover);
}

/* Ergonomic Inputs */
.vj-input-group,
.vj-input {
    background: var(--cp-input-bg);
    border: 1px solid var(--cp-border);
    color: var(--cp-text-main);
    border-radius: 0.875rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.vj-input-group:focus-within,
.vj-input:focus {
    border-color: #2563EB;
    background: var(--cp-input-focus-bg);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

.vj-input-group input,
.vj-input-group select,
.vj-input-group textarea {
    color: var(--cp-text-main) !important;
}

.vj-input-group select option {
    background-color: var(--cp-bg-elevated);
    color: var(--cp-text-main);
}

/* Primary & Secondary Buttons */
.vj-btn-primary {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 55%, #0284C7 100%);
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.4);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.vj-btn-primary:hover {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 55%, #06B6D4 100%);
    box-shadow: 0 12px 26px -4px rgba(37, 99, 235, 0.55);
    transform: translateY(-1px);
}

.vj-btn-primary:active {
    transform: scale(0.985);
}

.vj-btn-secondary {
    background: var(--cp-tile-bg);
    color: var(--cp-text-main);
    border: 1px solid var(--cp-border);
    transition: all 0.2s ease;
}

.vj-btn-secondary:hover {
    background: var(--cp-tile-hover);
    border-color: var(--cp-border-hover);
}

/* Status Pill Badges (Adaptive for Light & Dark) */
.vj-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.vj-pill-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 9999px;
    display: inline-block;
}

.vj-pill-cyan {
    background: rgba(2, 132, 199, 0.10);
    border: 1px solid rgba(2, 132, 199, 0.25);
    color: #0369A1;
}
html.dark .vj-pill-cyan {
    background: rgba(6, 182, 212, 0.14);
    border: 1px solid rgba(34, 211, 238, 0.28);
    color: #22D3EE;
}

.vj-pill-blue {
    background: rgba(37, 99, 235, 0.10);
    border: 1px solid rgba(37, 99, 235, 0.24);
    color: #1D4ED8;
}
html.dark .vj-pill-blue {
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(79, 142, 247, 0.32);
    color: #60A5FA;
}

.vj-pill-emerald {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
    color: #047857;
}
html.dark .vj-pill-emerald {
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(52, 211, 153, 0.28);
    color: #34D399;
}

.vj-pill-amber {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.30);
    color: #B45309;
}
html.dark .vj-pill-amber {
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(251, 191, 36, 0.28);
    color: #FBBF24;
}

.vj-pill-rose {
    background: rgba(244, 63, 94, 0.10);
    border: 1px solid rgba(244, 63, 94, 0.28);
    color: #BE123C;
}
html.dark .vj-pill-rose {
    background: rgba(244, 63, 94, 0.14);
    border: 1px solid rgba(251, 113, 133, 0.28);
    color: #FB7185;
}

/* Text Gradient */
.vj-text-gradient {
    background: linear-gradient(90deg, #1D4ED8 0%, #0284C7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
html.dark .vj-text-gradient {
    background: linear-gradient(90deg, #4F8EF7 0%, #22D3EE 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Semantic Text Helpers for Dual Theme */
.cp-text-main {
    color: var(--cp-text-main);
}
.cp-text-secondary {
    color: var(--cp-text-secondary);
}
.cp-text-muted {
    color: var(--cp-text-muted);
}

/* Light-Mode Automatic Adaptation for Legacy Utility Classes */
html:not(.dark) .text-white {
    color: #0F172A !important;
}
html:not(.dark) .vj-btn-primary .text-white,
html:not(.dark) .vj-btn-primary,
html:not(.dark) .cp-badge-avatar {
    color: #FFFFFF !important;
}
html:not(.dark) .text-slate-200,
html:not(.dark) .text-slate-300 {
    color: #334155 !important;
}
html:not(.dark) .text-slate-400,
html:not(.dark) .text-\[\#93A8C9\] {
    color: #64748B !important;
}
html:not(.dark) .text-cyan-400,
html:not(.dark) .text-cyan-300,
html:not(.dark) .text-\[\#22D3EE\] {
    color: #0284C7 !important;
}
html:not(.dark) .text-blue-400,
html:not(.dark) .text-\[\#60A5FA\] {
    color: #2563EB !important;
}
html:not(.dark) .border-white\/\[0\.05\],
html:not(.dark) .border-white\/\[0\.06\],
html:not(.dark) .border-white\/\[0\.07\],
html:not(.dark) .border-white\/\[0\.08\],
html:not(.dark) .border-white\/10 {
    border-color: #E2E8F0 !important;
}
html:not(.dark) input[type="date"] {
    color-scheme: light !important;
}

/* Remove number input spinners */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}
input[type=number] {
    -moz-appearance: textfield;
}
