/* ============================================================
   APSARA CLIENT DASHBOARD — Partner Portal
   Matches Concierge bioluminescent terminal + Lotus Daylight
   ============================================================ */

:root {
    --dash-bg:          #030c18;
    --dash-bg-2:        #050b1a;
    --dash-panel:       rgba(13, 27, 56, 0.45);
    --dash-panel-solid: rgba(5, 16, 38, 0.84);
    --dash-border:      rgba(0, 170, 240, 0.18);
    --dash-border-soft: rgba(255, 255, 255, 0.05);
    --dash-cyan:        #00e5ff;
    --dash-text-1:      #f1f5f9;
    --dash-text-2:      #94a3b8;
    --dash-text-3:      #64748b;
    --dash-input-bg:    rgba(5, 11, 26, 0.6);
    --dash-input-border:rgba(255, 255, 255, 0.08);
}

.dashboard-page {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at 50% 50%, #0c1835 0%, var(--dash-bg-2) 100%);
    color: var(--dash-text-1);
    letter-spacing: -0.011em;
    transition: background 0.4s ease, color 0.4s ease;
}

.dashboard-page.items-start {
    align-items: flex-start;
}

.font-display {
    font-family: 'Outfit', sans-serif;
}

/* Fixed top controls */
.dashboard-topbar {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-topbar .nav-pill-ghost,
.dashboard-page .dash-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(0, 160, 230, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--dash-text-1);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    text-decoration: none;
}

.dashboard-topbar .nav-pill-ghost:hover,
.dashboard-page .dash-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.35);
    color: var(--dash-cyan);
}

.dashboard-page .dash-action-btn.dash-action-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

/* Ambient glows */
.dashboard-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(120px);
    transition: opacity 0.4s ease;
}

.dashboard-orb-1 {
    width: 500px;
    height: 500px;
    top: -10%;
    left: -10%;
    background: rgba(59, 130, 246, 0.1);
}

.dashboard-orb-2 {
    width: 600px;
    height: 600px;
    bottom: -20%;
    right: -10%;
    background: rgba(24, 82, 196, 0.05);
    filter: blur(150px);
}

/* Glass surfaces */
.dashboard-page .glass-card {
    background: var(--dash-panel);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--dash-border-soft);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}

/* Motherboard traces — see styles.css */
.dashboard-page .glass-card > * {
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-page .glass-card:hover::after {
        animation: none !important;
    }
}

.dashboard-page .glass-input {
    background: var(--dash-input-bg);
    border: 1px solid var(--dash-input-border);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-page .glass-input:focus {
    border-color: #1d75b3;
    box-shadow: 0 0 0 4px rgba(29, 117, 179, 0.15);
    outline: none;
}

/* Concierge-matched brand lockup on login */
.dashboard-page .brand-lockup {
    text-decoration: none;
}

.dashboard-page .brand-mark {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 160, 230, 0.2));
}

.dashboard-page .brand-text {
    font-family: Outfit, Inter, 'Kantumruy Pro', system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-size: 1.375rem;
    background: linear-gradient(135deg, #5a9fff 0%, #00d0ff 50%, #00e5ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-page .dash-brand-text {
    color: #fff;
    transition: color 0.4s ease;
}

.dashboard-page .dash-heading {
    color: #fff;
    transition: color 0.4s ease;
}

.dashboard-page .dash-demo-banner {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.dashboard-page .dash-signin-btn {
    background: linear-gradient(to right, #2563eb, #3b82f6);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.15);
}

.dashboard-page .dash-signin-btn:hover:not(:disabled) {
    background: linear-gradient(to right, #3b82f6, #60a5fa);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.dashboard-page .dash-action-btn {
    position: relative;
    overflow: hidden;
}

.dashboard-page .dash-action-btn.dash-action-danger::after {
    background: linear-gradient(105deg, transparent 20%, rgba(248, 113, 113, 0.40) 50%, transparent 80%);
    background-size: 260% 100%;
}

.dashboard-page .dash-chat-bubble {
    background: rgba(23, 37, 84, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.dashboard-page .dash-chat-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dashboard-page .dash-chat-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.dashboard-page .dash-stat-emerald {
    background: linear-gradient(to bottom right, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.45), rgba(6, 78, 59, 0.1));
}

.dashboard-page .dash-roi-box {
    background: linear-gradient(to right, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.dashboard-page .dash-logo-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-page .dash-divider {
    border-color: rgba(255, 255, 255, 0.05);
}

.dashboard-page .dash-chart-grid {
    stroke: rgba(255, 255, 255, 0.03);
    fill: none;
}

.dashboard-page .dash-bar-track {
    background: rgba(255, 255, 255, 0.05);
}

/* Scrollbar */
.dashboard-page .custom-scrollbar::-webkit-scrollbar { width: 6px; }
.dashboard-page .custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}
.dashboard-page .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.dashboard-page .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.animate-pulse-slow {
    animation: dash-pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

.dashboard-page .animate-chart-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.5s;
}

/* ============================================================
   LIGHT MODE — Lotus Daylight
   ============================================================ */

html[data-theme="light"] .dashboard-page {
    background: linear-gradient(180deg, #dceeff 0%, #f0f7ff 100%);
    color: #0a1a38;
}

html[data-theme="light"] .dashboard-orb-1 {
    background: rgba(160, 196, 255, 0.35);
    opacity: 0.6;
}

html[data-theme="light"] .dashboard-orb-2 {
    background: rgba(180, 212, 255, 0.25);
    opacity: 0.5;
}

html[data-theme="light"] .dashboard-page .text-white,
html[data-theme="light"] .dashboard-page .dash-heading,
html[data-theme="light"] .dashboard-page .dash-brand-text {
    color: #0a1a38 !important;
}

html[data-theme="light"] .dashboard-page .text-slate-100 { color: #0a1a38 !important; }
html[data-theme="light"] .dashboard-page .text-slate-300 { color: #1e3d72 !important; }
html[data-theme="light"] .dashboard-page .text-slate-400 { color: #6888aa !important; }
html[data-theme="light"] .dashboard-page .text-slate-500 { color: #4a6fa0 !important; }
html[data-theme="light"] .dashboard-page .text-slate-600 { color: #1e3d72 !important; }

html[data-theme="light"] .dashboard-page .glass-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(21, 87, 224, 0.12);
    box-shadow: 0 8px 32px rgba(18, 82, 196, 0.08);
}

html[data-theme="light"] .dashboard-page .glass-input {
    background: rgba(244, 250, 255, 0.9);
    border: 1px solid rgba(21, 87, 224, 0.15);
    color: #0a1a38;
}

html[data-theme="light"] .dashboard-page .glass-input:focus {
    border-color: #1252c4;
    box-shadow: 0 0 0 4px rgba(18, 82, 196, 0.1);
}

html[data-theme="light"] .dashboard-topbar .nav-pill-ghost,
html[data-theme="light"] .dashboard-page .dash-action-btn {
    background: rgba(18, 82, 196, 0.06);
    border-color: rgba(21, 87, 224, 0.2);
    color: #1e3d72;
}

html[data-theme="light"] .dashboard-topbar .nav-pill-ghost:hover,
html[data-theme="light"] .dashboard-page .dash-action-btn:hover {
    background: rgba(18, 82, 196, 0.1);
    border-color: #1252c4;
    color: #1252c4;
    box-shadow: 0 0 12px rgba(18, 82, 196, 0.12);
}

html[data-theme="light"] .dashboard-page .dash-demo-banner {
    background: rgba(18, 82, 196, 0.06);
    border-color: rgba(21, 87, 224, 0.18);
}

html[data-theme="light"] .dashboard-page .dash-demo-banner .text-blue-400 {
    color: #1252c4 !important;
}

html[data-theme="light"] .dashboard-page .dash-demo-banner .text-slate-300 {
    color: #1e3d72 !important;
}

html[data-theme="light"] .dashboard-page .dash-signin-btn {
    background: #1252c4;
    box-shadow: 0 4px 16px rgba(18, 82, 196, 0.25);
}

html[data-theme="light"] .dashboard-page .dash-signin-btn:hover:not(:disabled) {
    background: #0a3b96;
    box-shadow: 0 6px 24px rgba(18, 82, 196, 0.35);
}

html[data-theme="light"] .dashboard-page .dash-logo-box {
    background: rgba(18, 82, 196, 0.06);
    border-color: rgba(21, 87, 224, 0.14);
}

html[data-theme="light"] .dashboard-page .dash-chat-item {
    background: rgba(244, 250, 255, 0.8);
    border-color: rgba(21, 87, 224, 0.1);
}

html[data-theme="light"] .dashboard-page .dash-chat-item:hover {
    border-color: rgba(21, 87, 224, 0.2);
}

html[data-theme="light"] .dashboard-page .dash-chat-bubble {
    background: rgba(220, 236, 255, 0.7);
    border-color: rgba(21, 87, 224, 0.12);
    color: #1e3d72 !important;
}

html[data-theme="light"] .dashboard-page .dash-chat-bubble .text-blue-400 {
    color: #1252c4 !important;
}

html[data-theme="light"] .dashboard-page .dash-stat-emerald {
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.95), rgba(236, 253, 245, 0.6));
}

html[data-theme="light"] .dashboard-page .dash-roi-box {
    background: linear-gradient(to right, rgba(236, 253, 245, 0.8), rgba(220, 236, 255, 0.8));
    border-color: rgba(16, 185, 129, 0.25);
}

html[data-theme="light"] .dashboard-page .dash-divider {
    border-color: rgba(21, 87, 224, 0.1);
}

html[data-theme="light"] .dashboard-page .dash-chart-grid {
    stroke: rgba(21, 87, 224, 0.08);
}

html[data-theme="light"] .dashboard-page .dash-bar-track {
    background: rgba(21, 87, 224, 0.08);
}

html[data-theme="light"] .dashboard-page .custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(21, 87, 224, 0.04);
}

html[data-theme="light"] .dashboard-page .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(21, 87, 224, 0.15);
}

html[data-theme="light"] .dashboard-page a.text-slate-400:hover {
    color: #1252c4 !important;
}

html[data-theme="light"] .dashboard-page .brand-text {
    background: linear-gradient(135deg, #1252c4 0%, #0a70cc 55%, #007acc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .dashboard-page .brand-mark {
    filter: drop-shadow(0 2px 8px rgba(18, 82, 196, 0.15));
}

html[data-theme="light"] .dashboard-page .text-brand-300 {
    color: #1252c4 !important;
}

html[data-theme="light"] .dashboard-page .bg-brand-500\/10 {
    background: rgba(18, 82, 196, 0.08) !important;
    border-color: rgba(21, 87, 224, 0.18) !important;
}

html[data-theme="light"] .dashboard-page .text-brand-200 {
    color: #1252c4 !important;
}

html[data-theme="light"] .dashboard-page input[type="range"] {
    accent-color: #1252c4;
}
