/* ==========================================================================
   FinWise AI Platform Stylesheet
   Theme: Glassmorphism / Dark Space BFSI Interface
   ========================================================================== */

:root {
    --bg-base: #f4f7fc; /* Clean, soft light background */
    --bg-darker: #e8eef8; /* Secondary soft blue-white */
    --card-bg: rgba(255, 255, 255, 0.65); /* High-fidelity white frosted glass */
    --card-bg-hover: rgba(255, 255, 255, 0.85); /* Brighter hover focus card */
    --border-light: rgba(14, 165, 233, 0.16); /* Soft sky-blue outlines */
    --border-neon-indigo: rgba(14, 165, 233, 0.42); /* Glow accent sky-blue border */
    --border-neon-emerald: rgba(16, 185, 129, 0.42);
    
    --text-primary: #0f172a; /* Slate 900 for high readability text */
    --text-secondary: #334155; /* Slate 700 */
    --text-muted: #64748b; /* Slate 500 */
    
    --accent-indigo: #0284c7; /* Deep sky-blue */
    --accent-sky: #0ea5e9; /* Primary neon sky-blue */
    --accent-emerald: #10b981;
    --accent-purple: #38bdf8;
    --accent-amber: #d97706; /* readable amber on light background */
    --accent-rose: #e11d48; /* readable rose on light background */
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'Orbitron', sans-serif;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    height: 100%;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0%, transparent 50%);
}

#app-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.25);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-sky);
    box-shadow: 0 0 8px var(--accent-sky);
}

/* Ticker Styles */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: rgba(240, 248, 255, 0.95);
    border-bottom: 1px solid var(--border-light);
    height: 38px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}
.ticker {
    display: flex;
    white-space: nowrap;
    animation: ticker-scroll 30s linear infinite;
}
.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 2rem;
    font-size: 0.75rem;
    font-family: var(--font-code);
    gap: 0.5rem;
}
.ticker-lbl {
    color: var(--text-muted);
}
.ticker-price {
    font-weight: 700;
    color: var(--text-primary);
}
.ticker-change {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
}
.ticker-change.pos {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
}
.ticker-change.neg {
    background: rgba(244, 63, 94, 0.15);
    color: var(--accent-rose);
}
.ticker-change.neutral {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-sky);
}
@keyframes ticker-scroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2.5rem;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 38px;
    z-index: 90;
    transition: all var(--transition-fast);
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.45rem;
    cursor: pointer;
}
.logo-dot {
    width: 7px;
    height: 7px;
    background: var(--accent-sky);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-sky);
    animation: pulse-glow 2s infinite;
}
.text-gradient {
    background: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-sky) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nav-links {
    display: flex;
    gap: 1.5rem;
}
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.2);
}
.nav-link.active {
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.2);
    border-color: var(--border-neon-indigo);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-sky) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.25);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 1.0);
    border-color: var(--accent-sky);
    transform: translateY(-1px);
}
.btn-danger {
    background: rgba(244, 63, 94, 0.08);
    border: 1px solid rgba(244, 63, 94, 0.2);
    color: var(--accent-rose);
}
.btn-danger:hover {
    background: var(--accent-rose);
    color: white;
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.25);
}
.btn-block {
    width: 100%;
}
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Content Container & Sections */
.content-wrapper {
    flex: 1;
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}
.section {
    display: none;
    animation: fadeIn 0.45s ease forwards;
}
.section.active {
    display: block;
}
.section-header {
    margin-bottom: 2.5rem;
}
.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}
.section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 750px;
}
.glow-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-code);
    letter-spacing: 0.12em;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--border-neon-indigo);
    color: var(--accent-sky);
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

/* Glassmorphism Card System */
.card {
    position: relative;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    transition: all var(--transition-normal);
}
.glass-card:hover {
    background: var(--card-bg-hover);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}
.card-shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}
.card-header {
    padding: 1.5rem 1.75rem 1rem;
}
.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}
.card-divider {
    height: 1px;
    background: var(--border-light);
    margin: 1.25rem 0;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.kpi-card {
    padding: 1.5rem;
}
.kpi-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.kpi-icon {
    font-size: 2.2rem;
    background: rgba(255, 255, 255, 0.03);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}
.kpi-data {
    display: flex;
    flex-direction: column;
}
.kpi-num {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
}
.kpi-lbl {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Split layout grid for forms/tools */
.tool-split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
@media (max-width: 900px) {
    .tool-split {
        grid-template-columns: 1fr;
    }
}

/* Forms Styling */
form {
    padding: 1.5rem 1.75rem 2rem;
}
.form-group {
    margin-bottom: 1.25rem;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}
input[type="text"], input[type="number"], input[type="password"], textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-sky);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.2);
    background: rgba(255, 255, 255, 1.0);
}

/* Sliders */
.slider-group {
    margin-bottom: 1.75rem;
    padding: 0 1.75rem;
}
.slider-group:first-of-type {
    padding-top: 1rem;
}
.slider-group:last-of-type {
    padding-bottom: 2rem;
}
.slider-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.slider-val-box {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--accent-sky);
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.22);
    padding: 2px 8px;
    border-radius: 6px;
}
.slider-val-box input {
    background: transparent;
    border: none;
    color: inherit;
    font-family: inherit;
    font-weight: inherit;
    width: 80px;
    text-align: right;
    font-size: 1rem;
    padding: 0;
}
.slider-val-box input:focus {
    box-shadow: none;
    background: transparent;
}
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(14, 165, 233, 0.15);
    outline: none;
    margin: 10px 0;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-sky);
    box-shadow: 0 0 8px var(--accent-sky);
    cursor: pointer;
    transition: transform 0.1s;
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}
.slider-limits {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Result Panel Styling */
.result-display-card {
    transition: opacity 0.4s ease, transform 0.4s ease;
    border-color: var(--border-neon-emerald);
}
.result-display-card.inactive {
    opacity: 0.5;
    pointer-events: none;
}
.result-display-card.approved-border {
    border-color: var(--border-neon-emerald);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.08);
}
.result-display-card.rejected-border {
    border-color: rgba(244, 63, 94, 0.28);
    box-shadow: 0 8px 30px rgba(244, 63, 94, 0.08);
}
.result-body {
    padding: 0 1.75rem 2rem;
}
.status-pill {
    float: right;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}
.status-pill.approved {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid var(--border-neon-emerald);
    color: var(--accent-emerald);
}
.status-pill.rejected {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.35);
    color: var(--accent-rose);
}
.risk-meter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}
.risk-label-group {
    display: flex;
    flex-direction: column;
}
.risk-value {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
}
.risk-value.risk-low {
    color: var(--accent-emerald);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}
.risk-value.risk-medium {
    color: var(--accent-amber);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}
.risk-value.risk-high {
    color: var(--accent-rose);
    text-shadow: 0 0 10px rgba(244, 63, 94, 0.3);
}
.risk-desc, .dti-lbl {
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.dti-stats {
    text-align: right;
    display: flex;
    flex-direction: column;
}
.dti-num {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.result-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.res-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-light);
    border-radius: 8px;
}
.res-lbl {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.res-val {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.highlight-box {
    background: rgba(99, 102, 241, 0.05) !important;
    border-color: var(--border-neon-indigo) !important;
}
.col-span-2 {
    grid-column: span 2;
}

/* Bullet Points reasoning list */
.reasoning-container h3 {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}
.reasoning-list {
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.reasoning-list li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Alert Boxes & Redirection advices */
.alert-box {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(217, 119, 6, 0.08);
    border: 1px solid rgba(217, 119, 6, 0.25);
    border-radius: 10px;
    margin-top: 1.25rem;
}
.alert-icon {
    font-size: 1.3rem;
}
.alert-box p {
    font-size: 0.84rem;
    color: #b45309; /* Dark readable amber */
    line-height: 1.4;
}
.mt-3 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.width-full { width: 100%; }

/* Credit Score Analyzer Gauge styling */
.gauge-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem 2.5rem;
    width: 100%;
}
.credit-gauge-container {
    position: relative;
    width: 240px;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 2rem;
}
.credit-gauge {
    position: relative;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    overflow: hidden;
}
.gauge-arc {
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    box-sizing: border-box;
    border: 24px solid transparent;
    /* FICO Ranges: 300 to 850 arc */
    background: conic-gradient(
        from 270deg,
        var(--accent-rose) 0deg,      /* Poor: 300-579 (approx 50deg) */
        var(--accent-amber) 80deg,    /* Fair: 580-669 */
        #eab308 140deg,               /* Good: 670-739 */
        var(--accent-sky) 200deg,     /* Very Good: 740-799 */
        var(--accent-emerald) 260deg,  /* Exceptional: 800-850 */
        transparent 280deg
    ) border-box;
    -webkit-mask: radial-gradient(circle, transparent 96px, #000 97px);
    mask: radial-gradient(circle, transparent 96px, #000 97px);
}
.gauge-pointer {
    position: absolute;
    bottom: 50%;
    left: calc(50% - 4px);
    width: 8px;
    height: 110px;
    background: linear-gradient(to top, var(--text-primary) 80%, var(--accent-sky) 100%);
    border-radius: 4px;
    transform-origin: bottom center;
    transition: transform var(--transition-slow);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.25);
    z-index: 5;
}
.gauge-center {
    position: absolute;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-base);
    border: 1px solid var(--border-light);
    width: 140px;
    height: 70px;
    border-top-left-radius: 80px;
    border-top-right-radius: 80px;
    justify-content: flex-end;
    padding-bottom: 0.5rem;
    box-shadow: inset 0 3px 8px rgba(0,0,0,0.08);
}
.gauge-score {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    font-family: var(--font-heading);
}
.gauge-status {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-sky);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.gauge-inputs {
    width: 100%;
    max-width: 300px;
}
.input-action-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* Impact elements progress bars */
.analyzer-details-body {
    padding: 1.5rem 1.75rem 2rem;
}
.impact-metrics-grid {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.impact-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.impact-lbl {
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.impact-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width var(--transition-slow);
}
.bg-emerald { background: var(--accent-emerald); }
.bg-sky { background: var(--accent-sky); }
.bg-purple { background: var(--accent-purple); }
.bg-amber { background: var(--accent-amber); }

.rec-title {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}
.rec-list {
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.rec-list li {
    font-size: 0.86rem;
    color: var(--text-secondary);
}

/* EMI Payment summary charts */
.calculator-inputs {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.calculator-summary-body {
    padding: 1.5rem 1.75rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.emi-summary-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}
.kpi-mini {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}
.kpi-mini-lbl {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.kpi-mini-val {
    font-size: 1.15rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

/* Circular Pie/Donut Chart inside EMI summary */
.donut-chart-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: center;
}
.donut-chart-container {
    position: relative;
    width: 140px;
    height: 140px;
}
.circular-svg {
    transform: rotate(-90deg);
}
.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 3.5;
}
.circle-fill-1 {
    fill: none;
    stroke: var(--accent-sky);
    stroke-dasharray: 0, 100;
    stroke-width: 3.8;
    stroke-linecap: round;
    transition: stroke-dasharray var(--transition-slow);
}
.circle-fill-2 {
    fill: none;
    stroke: var(--accent-rose);
    stroke-dasharray: 0, 100;
    stroke-width: 3.8;
    stroke-linecap: round;
    transition: stroke-dasharray var(--transition-slow), stroke-dashoffset var(--transition-slow);
}
.donut-center-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.donut-num {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-heading);
}
.donut-lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}
.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.legend-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.pass-color { background: var(--accent-sky); }
.fail-color { background: var(--accent-rose); }

/* Table styling for Amortization */
.table-container {
    width: 100%;
    overflow-x: auto;
    padding: 0 1.75rem 2rem;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.data-table th, .data-table td {
    padding: 0.9rem 1.2rem;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border-light);
}
.data-table th {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(14, 165, 233, 0.06);
}
.data-table tbody tr:hover {
    background: rgba(14, 165, 233, 0.025);
}
.data-table td {
    color: var(--text-secondary);
}

/* Chatbot Console advisory */
.chatbot-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 520px;
}
@media (max-width: 768px) {
    .chatbot-card {
        grid-template-columns: 1fr;
        height: auto;
    }
    .chatbot-sidebar {
        border-right: none !important;
        border-bottom: 1px solid var(--border-light);
    }
}
.chatbot-sidebar {
    padding: 1.5rem;
    background: rgba(240, 248, 255, 0.45);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}
.chatbot-sidebar h3 {
    font-size: 0.95rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.preset-prompts-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.preset-btn {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(14, 165, 233, 0.22);
    color: var(--text-secondary);
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    text-align: left;
    font-size: 0.8rem;
    cursor: pointer;
    line-height: 1.3;
    transition: all var(--transition-fast);
}
.preset-btn:hover {
    background: rgba(14, 165, 233, 0.08);
    border-color: var(--accent-sky);
    color: var(--text-primary);
}

.chatbot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: rgba(240, 248, 255, 0.3);
}
.chatbot-header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.chatbot-header-title h3 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0;
}
.chatbot-header-actions {
    display: flex;
    gap: 0.5rem;
}
.pulse-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 5px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.chatbot-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}
.chat-conversation {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.chat-bubble {
    padding: 1.1rem 1.4rem;
    border-radius: 12px;
    max-width: 80%;
    font-size: 0.92rem;
    line-height: 1.5;
    position: relative;
    animation: bubbleAppear 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}
.chat-bubble h4 {
    margin-bottom: 0.4rem;
}
.chat-bubble p {
    margin-bottom: 0;
}
.chat-bubble ul, .chat-bubble ol {
    padding-left: 1.25rem;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.chat-bubble li {
    font-size: 0.9rem;
}
.bot-bubble {
    align-self: flex-start;
    background: rgba(240, 248, 255, 0.7);
    border: 1px solid rgba(14, 165, 233, 0.2);
    color: var(--text-secondary);
    border-top-left-radius: 2px;
}
.bot-bubble h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0.75rem 0 0.4rem;
}
.bot-bubble strong {
    color: var(--accent-sky);
}
.user-bubble {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(56, 189, 248, 0.1) 100%);
    border: 1px solid rgba(14, 165, 233, 0.4);
    color: var(--text-primary);
    border-top-right-radius: 2px;
}
.chat-time {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    text-align: right;
}
.chat-input-bar {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--border-light);
    background: rgba(240, 248, 255, 0.45);
}
.chat-input-bar input {
    flex: 1;
}

/* Spinner and loading states */
.chat-bubble.loading-bubble {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
}
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(14, 165, 233, 0.2);
    border-top-color: var(--accent-sky);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Admin / Database Sync styles */
.db-sync-stats-box {
    padding: 1.5rem 1.75rem 1rem;
}
.sync-kpi-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.sync-metric-num {
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--accent-sky);
    line-height: 1;
}
.sync-metric-lbl {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.sync-description-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.db-action-buttons {
    padding: 0 1.75rem 2rem;
}
.flex-row { display: flex; align-items: center; }
.space-between { justify-content: space-between; }
.align-center { align-items: center; }

/* Admin Credentials textarea */
textarea {
    resize: vertical;
}

/* Footer Styling */
.footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    margin-top: 4rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-neon-indigo);
    backdrop-filter: blur(12px);
    padding: 0.9rem 1.5rem;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.88rem;
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.15);
    transform: translateY(120%);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.toast.show {
    transform: translateY(0);
}
.toast.success {
    border-color: var(--border-neon-emerald);
}
.toast.error {
    border-color: rgba(244, 63, 94, 0.45);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes bubbleAppear {
    from { opacity: 0; transform: scale(0.95) translateY(5px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes pulse-glow {
    0% { transform: scale(1); box-shadow: 0 0 10px rgba(16, 185, 129, 0.5); }
    50% { transform: scale(1.2); box-shadow: 0 0 20px rgba(16, 185, 129, 0.8), 0 0 10px rgba(99, 102, 241, 0.5); }
    100% { transform: scale(1); box-shadow: 0 0 10px rgba(16, 185, 129, 0.5); }
}

/* Sparkle Effects styling */
.sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #fff 20%, var(--accent-sky) 50%, transparent 80%);
    clip-path: polygon(50% 0%, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0% 50%, 35% 35%);
    opacity: 0;
    pointer-events: none;
    animation: sparkle-float 1.2s ease-out forwards;
    z-index: 9999;
}
@keyframes sparkle-float {
    0% {
        transform: translate(0, 0) scale(0) rotate(0deg);
        opacity: 0;
    }
    30% {
        opacity: 1;
        transform: translate(var(--dx), var(--dy)) scale(1.3) rotate(90deg);
    }
    100% {
        transform: translate(var(--dx2), var(--dy2)) scale(0) rotate(180deg);
        opacity: 0;
    }
}

/* Click Expansion Ripple Effects */
.ripple-circle {
    position: absolute;
    border: 2px solid var(--accent-sky);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.8;
    pointer-events: none;
    animation: ripple-out 0.55s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
    z-index: 20;
}
@keyframes ripple-out {
    to {
        transform: translate(-50%, -50%) scale(3.5);
        opacity: 0;
        border-color: var(--accent-purple);
    }
}

/* 3D Glass Coins Background Styling */
.coins-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}
.coin-particle {
    position: absolute;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    pointer-events: none;
    animation: coin-fall linear infinite;
    transform-style: preserve-3d;
    perspective: 800px;
    opacity: 0;
}
.coin-theme-skyblue {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.28) 0%, rgba(14, 165, 233, 0.1) 60%, rgba(56, 189, 248, 0.38) 100%);
    border: 1.5px solid rgba(56, 189, 248, 0.65);
    box-shadow: inset 0 0 8px rgba(56, 189, 248, 0.4), 0 0 15px rgba(56, 189, 248, 0.15);
    color: #e0f2fe;
    text-shadow: 0 0 4px rgba(56, 189, 248, 0.7);
}
.coin-theme-purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.28) 0%, rgba(99, 102, 241, 0.1) 60%, rgba(168, 85, 247, 0.38) 100%);
    border: 1.5px solid rgba(168, 85, 247, 0.65);
    box-shadow: inset 0 0 8px rgba(168, 85, 247, 0.4), 0 0 15px rgba(168, 85, 247, 0.15);
    color: #f5f3ff;
    text-shadow: 0 0 4px rgba(168, 85, 247, 0.7);
}
.coin-theme-white {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.08) 60%, rgba(255, 255, 255, 0.42) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.35), 0 0 10px rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.7);
}
.coin-theme-emerald {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(5, 150, 105, 0.1) 60%, rgba(16, 185, 129, 0.38) 100%);
    border: 1.5px solid rgba(16, 185, 129, 0.65);
    box-shadow: inset 0 0 8px rgba(16, 185, 129, 0.4), 0 0 15px rgba(16, 185, 129, 0.15);
    color: #ecfdf5;
    text-shadow: 0 0 4px rgba(16, 185, 129, 0.7);
}
@keyframes coin-fall {
    0% {
        transform: translateY(-110px) rotateY(0deg) rotateX(0deg) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.24; /* Elevated visibility for modern glass look */
    }
    90% {
        opacity: 0.24;
    }
    100% {
        transform: translateY(105vh) rotateY(1080deg) rotateX(540deg) rotate(360deg);
        opacity: 0;
    }
}

/* Background Canvas for 3D Bitcoins */
#bitcoin-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    display: block;
}

/* Premium Card Hover scaling and shadow glows */
.card {
    transition: transform var(--transition-normal), background var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal) !important;
}
.card:hover {
    transform: scale(1.025) translateY(-3px) !important;
    box-shadow: 0 12px 35px rgba(14, 165, 233, 0.18), 0 0 0 1px rgba(14, 165, 233, 0.35) !important;
    z-index: 10;
}

