/* styles.css - 2024 Tax Return Audit & Compiler Tool */
/* Premium Glassmorphic Design System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --bg-dark: #070B13;
    --bg-midnight: #0B0F19;
    --card-bg: rgba(19, 27, 46, 0.7);
    --card-bg-hover: rgba(25, 36, 61, 0.85);
    --border-color: rgba(59, 130, 246, 0.15);
    --border-hover: rgba(99, 102, 241, 0.35);
    
    --primary: #6366F1;
    --primary-glow: rgba(99, 102, 241, 0.3);
    
    --emerald: #10B981;
    --emerald-glow: rgba(16, 185, 129, 0.25);
    
    --amber: #F59E0B;
    --amber-glow: rgba(245, 158, 11, 0.25);
    
    --rose: #EF4444;
    --rose-glow: rgba(239, 68, 68, 0.25);
    
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
    --text-dim: #6B7280;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-heading: 'Outfit', sans-serif;
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* Base Reset & Styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 10% 20%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 10%, rgba(16, 185, 129, 0.05) 0px, transparent 40%),
        radial-gradient(at 50% 80%, rgba(59, 130, 246, 0.06) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Layout Hierarchy */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background: rgba(11, 15, 25, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, #3B82F6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--primary-glow);
}

.brand-logo svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 2;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #FFFFFF 50%, #93C5FD 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item button {
    width: 100%;
    background: none;
    border: none;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-fast);
}

.nav-item button svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
    stroke-width: 1.75;
    fill: none;
    transition: var(--transition-fast);
}

.nav-item button:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.nav-item button:hover svg {
    stroke: var(--text-main);
}

.nav-item.active button {
    color: #FFFFFF;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: inset 0 0 12px rgba(99, 102, 241, 0.05);
}

.nav-item.active button svg {
    stroke: var(--primary);
    filter: drop-shadow(0 0 4px var(--primary-glow));
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: auto;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 0.75rem 1rem;
    border-radius: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--emerald);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--emerald);
    position: relative;
}

.status-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--emerald);
    border-radius: 50%;
    animation: pulse 1.8s infinite;
}

.status-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: #10B981;
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem 3rem;
}

/* Global Floating Live Header Banner */
.floating-header {
    background: rgba(19, 27, 46, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 2rem;
    z-index: 99;
    transition: var(--transition-smooth);
}

.floating-header:hover {
    border-color: var(--border-hover);
}

.header-info h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #FFFFFF 0%, #D1D5DB 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-meta {
    display: flex;
    gap: 1.5rem;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.header-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    background: rgba(99, 102, 241, 0.1);
    color: #93C5FD;
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Floating Refund Metrics Card */
.refund-tracker-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.refund-amount-wrapper {
    text-align: right;
}

.refund-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.refund-value {
    font-size: 2.25rem;
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1;
    margin-top: 4px;
    letter-spacing: -1px;
}

.refund-value.refund {
    color: var(--emerald);
    text-shadow: 0 0 15px var(--emerald-glow);
}

.refund-value.owed {
    color: var(--amber);
    text-shadow: 0 0 15px var(--amber-glow);
}

.refund-indicator-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.refund-indicator-box.refund {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

.refund-indicator-box.owed {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
}

.refund-indicator-box svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke-width: 2;
}

.refund-indicator-box.refund svg {
    stroke: var(--emerald);
}

.refund-indicator-box.owed svg {
    stroke: var(--amber);
}

.refund-pulse-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    top: 0;
    left: 0;
}

.refund-indicator-box.refund .refund-pulse-glow {
    border: 2px solid var(--emerald);
    animation: itemPulse 2s infinite;
}

.refund-indicator-box.owed .refund-pulse-glow {
    border: 2px solid var(--amber);
    animation: itemPulse 2s infinite;
}

/* Sections Structure */
.content-section {
    display: none;
    flex-direction: column;
    gap: 2rem;
    animation: fadeInUp 0.45s ease-out forwards;
}

.content-section.active {
    display: flex;
}

/* Glassmorphic Cards Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

/* ---- Generic grid span utilities (apply inside .grid-container) ---- */
.grid-container .span-1  { grid-column: span 1; }
.grid-container .span-2  { grid-column: span 2; }
.grid-container .span-3  { grid-column: span 3; }
.grid-container .span-4  { grid-column: span 4; }
.grid-container .span-5  { grid-column: span 5; }
.grid-container .span-6  { grid-column: span 6; }
.grid-container .span-7  { grid-column: span 7; }
.grid-container .span-8  { grid-column: span 8; }
.grid-container .span-9  { grid-column: span 9; }
.grid-container .span-10 { grid-column: span 10; }
.grid-container .span-11 { grid-column: span 11; }
.grid-container .span-12 { grid-column: span 12; }

@media (max-width: 768px) {
    .grid-container .span-1,
    .grid-container .span-2,
    .grid-container .span-3,
    .grid-container .span-4,
    .grid-container .span-5,
    .grid-container .span-6,
    .grid-container .span-7,
    .grid-container .span-8,
    .grid-container .span-9,
    .grid-container .span-10,
    .grid-container .span-11 {
        grid-column: span 12;
    }
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: 0.8s;
}

.glass-card:hover::before {
    transform: translateX(100%);
}

.glass-card:hover {
    background: var(--card-bg-hover);
    border-color: var(--border-hover);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.08);
}

.glass-card.span-12 { grid-column: span 12; }
.glass-card.span-8 { grid-column: span 8; }
.glass-card.span-6 { grid-column: span 6; }
.glass-card.span-4 { grid-column: span 4; }
.glass-card.span-3 { grid-column: span 3; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-icon-container {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon-container svg {
    width: 18px;
    height: 18px;
    stroke: var(--primary);
    stroke-width: 2;
    fill: none;
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: #FFFFFF;
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Key Metrics Display (Dashboard Widget) */
.metrics-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.metric-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-fast);
}

.metric-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(99, 102, 241, 0.15);
}

.metric-label-group {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.metric-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.metric-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.metric-badge.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.metric-badge.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #60A5FA;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-top: 1rem;
    letter-spacing: -0.5px;
}

.metric-trend {
    font-size: 0.75rem;
    margin-top: 4px;
}

.metric-trend.positive { color: var(--emerald); }
.metric-trend.negative { color: var(--rose); }

/* IRS Bracket Visual Progress Bar */
.bracket-meter-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.bracket-meter-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bracket-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.bracket-rate {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #FFFFFF;
}

.bracket-range {
    color: var(--text-muted);
}

.bracket-taxed-amount {
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.bracket-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 99px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.bracket-progress-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--primary) 0%, #3B82F6 100%);
    width: 0%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

.bracket-progress-fill.active {
    background: linear-gradient(90deg, #F59E0B 0%, #EF4444 100%);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

/* Interactive SVG Chart styling */
.chart-container {
    height: 240px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-chart-svg {
    transform: rotate(-90deg);
}

.donut-segment-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.03);
    stroke-width: 14;
}

.donut-segment {
    fill: none;
    stroke-width: 14;
    stroke-linecap: round;
    transition: stroke-dasharray 0.8s ease-out;
}

.donut-segment.w2-segment {
    stroke: var(--primary);
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.3));
}

.donut-segment.se-segment {
    stroke: var(--emerald);
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.3));
}

.donut-center-text {
    position: absolute;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.donut-center-val {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    color: #FFFFFF;
}

.donut-center-lbl {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot.w2 { background-color: var(--primary); box-shadow: 0 0 6px var(--primary); }
.legend-dot.se { background-color: var(--emerald); box-shadow: 0 0 6px var(--emerald); }

/* Styled Forms & Inputs */
.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-label span.helper {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--primary);
    cursor: help;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-dim);
    font-size: 1rem;
    font-family: var(--font-mono);
}

.form-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem 1rem 0.85rem 2rem;
    color: #FFFFFF;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    transition: var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}

/* Custom Interactive IRS W-2 Form Mockup */
.w2-paper-wrapper {
    background: rgba(11, 15, 25, 0.9);
    border: 1px dashed rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.4);
}

.w2-paper-wrapper::after {
    content: "FORM W-2 Wage and Tax Statement 2024";
    position: absolute;
    bottom: 8px;
    right: 1.5rem;
    font-size: 0.65rem;
    font-family: var(--font-heading);
    color: var(--text-dim);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.w2-paper-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.w2-box {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.01);
    border-radius: 6px;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-fast);
}

.w2-box:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(99, 102, 241, 0.2);
}

.w2-box.span-2 { grid-column: span 2; }
.w2-box.span-4 { grid-column: span 4; }

.w2-num {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
}

.w2-box-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.2;
}

.w2-box-content {
    margin-top: 4px;
}

.w2-box-content input {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #FFFFFF;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
    outline: none;
    padding-bottom: 2px;
}

.w2-box-content input:focus {
    border-bottom-color: var(--primary);
}

.w2-box-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-main);
    padding: 4px 0;
}

/* Custom Interactive 1099 Expense Sliders & Rate Controls */
.slider-group {
    background: rgba(255,255,255,0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    transition: var(--transition-fast);
}

.slider-group:hover {
    background: rgba(255,255,255,0.02);
    border-color: rgba(99, 102, 241, 0.1);
}

.slider-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.slider-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.slider-value {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.slider-control {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    transition: background var(--transition-fast);
}

.slider-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary-glow);
    transition: transform 0.15s ease;
}

.slider-control::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-meta-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Vehicle Toggle Box (Mileage vs Actual) */
.toggle-wrapper {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.toggle-option {
    flex: 1;
    text-align: center;
}

.toggle-option input {
    display: none;
}

.toggle-option label {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.toggle-option input:checked + label {
    background: rgba(99, 102, 241, 0.15);
    color: #FFFFFF;
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Comparison Widget styling */
.expense-comparison-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 1.25rem;
    border-radius: 14px;
}

.compare-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.compare-col {
    display: flex;
    flex-direction: column;
}

.compare-val {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.15rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "tnum" 1, "lnum" 1;
    letter-spacing: -0.01em;
}

.compare-val.selected {
    color: var(--emerald);
}

.compare-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.compare-bar-fill {
    height: 100%;
    background: var(--text-dim);
    border-radius: 3px;
    width: 0%;
    transition: width 0.5s ease;
}

.compare-bar-fill.selected {
    background: linear-gradient(90deg, var(--emerald) 0%, #34D399 100%);
    box-shadow: 0 0 6px var(--emerald-glow);
}

/* Interactive 1040 IRS Ledger Form styling */
.ledger-container {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}

.ledger-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ledger-sec-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

.ledger-row {
    display: flex;
    align-items: center;
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition-fast);
    cursor: pointer;
}

.ledger-row:hover {
    background: rgba(99, 102, 241, 0.03);
}

.ledger-row.section-break {
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: default;
}

.ledger-row.section-break:hover {
    background: rgba(255, 255, 255, 0.01);
}

.ledger-line-num {
    width: 32px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

.ledger-line-desc {
    flex-grow: 1;
    font-size: 0.85rem;
    color: var(--text-main);
}

.ledger-row.section-break .ledger-line-desc {
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.ledger-line-val {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
    color: #FFFFFF;
    text-align: right;
    min-width: 120px;
}

.ledger-row.summary .ledger-line-desc {
    font-weight: 600;
}

.ledger-row.summary .ledger-line-val {
    font-weight: 700;
    color: var(--emerald);
    font-size: 0.95rem;
}

.ledger-row.summary.tax-due .ledger-line-val {
    color: var(--amber);
}

.ledger-row.active {
    background: rgba(99, 102, 241, 0.08);
    border-left: 3px solid var(--primary);
}

/* Auditor & Optimizer Layout */
.audit-alert-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.audit-alert-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.01);
    border-left: 4px solid var(--text-dim);
    transition: var(--transition-fast);
}

.audit-alert-item.risk-high {
    border-left-color: var(--rose);
    background: rgba(239, 68, 68, 0.02);
    border: 1px solid rgba(239, 68, 68, 0.08);
    border-left-width: 4px;
}

.audit-alert-item.risk-medium {
    border-left-color: var(--amber);
    background: rgba(245, 158, 11, 0.02);
    border: 1px solid rgba(245, 158, 11, 0.08);
    border-left-width: 4px;
}

.audit-alert-item.opt-good {
    border-left-color: var(--emerald);
    background: rgba(16, 185, 129, 0.02);
    border: 1px solid rgba(16, 185, 129, 0.08);
    border-left-width: 4px;
}

.audit-alert-icon {
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}

.audit-alert-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke-width: 2;
}

.audit-alert-item.risk-high .audit-alert-icon svg { stroke: var(--rose); }
.audit-alert-item.risk-medium .audit-alert-icon svg { stroke: var(--amber); }
.audit-alert-item.opt-good .audit-alert-icon svg { stroke: var(--emerald); }

.audit-alert-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.audit-alert-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #FFFFFF;
}

.audit-alert-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.audit-score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    text-align: center;
}

.audit-gauge-wrapper {
    width: 140px;
    height: 140px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.audit-gauge-svg {
    transform: rotate(-90deg);
}

.audit-gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.02);
    stroke-width: 10;
}

.audit-gauge-fill {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 377;
    stroke-dashoffset: 377;
    transition: stroke-dashoffset 0.8s ease-out, stroke 0.8s ease-out;
}

.audit-gauge-text {
    position: absolute;
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    color: #FFFFFF;
}

.audit-gauge-subtext {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Animations */
@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 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes itemPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.15);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Modal/Popover Overlay helper styling */
.tooltip-popover {
    position: fixed;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 250px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
    line-height: 1.4;
}

.tooltip-popover.show {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-popover h4 {
    color: #FFFFFF;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Responsive adjustment */
@media (max-width: 1200px) {
    .glass-card.span-6 { grid-column: span 12; }
    .glass-card.span-8 { grid-column: span 12; }
    .glass-card.span-4 { grid-column: span 12; }
    .glass-card.span-3 { grid-column: span 6; }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1.5rem;
    }
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    .floating-header {
        position: relative;
        top: 0;
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    .refund-tracker-card {
        justify-content: space-between;
    }
    .glass-card.span-3 { grid-column: span 12; }
}

/* ================= Supabase Document Vault & Companion Drawer ================= */
.split-companion-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 45vw;
    height: 100vh;
    background: rgba(10, 16, 29, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.split-companion-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.drawer-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #FFFFFF;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drawer-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-fast);
}

.drawer-close-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    stroke-width: 2.5;
}

.drawer-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

.drawer-close-btn:hover svg {
    stroke: var(--rose);
}

.drawer-body {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: auto;
    background: #060911;
}

.viewer-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #FFFFFF;
}

.viewer-img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    margin: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: block;
}

.csv-viewer-container {
    padding: 1.5rem;
    overflow: auto;
}

.csv-viewer-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-main);
}

.csv-viewer-table th, .csv-viewer-table td {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.csv-viewer-table th {
    background: rgba(255, 255, 255, 0.02);
    font-weight: 600;
    color: var(--primary);
}

.vault-table-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition-fast);
}

.vault-table-row:hover {
    background: rgba(255, 255, 255, 0.015);
}

.vault-table-row td {
    padding: 12px;
    color: var(--text-main);
    vertical-align: middle;
}

.vault-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.vault-btn.view {
    background: rgba(99, 102, 241, 0.1);
    color: #93C5FD;
    border-color: rgba(99, 102, 241, 0.20);
}

.vault-btn.view:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.vault-btn.extract {
    background: rgba(16, 185, 129, 0.1);
    color: #34D399;
    border-color: rgba(16, 185, 129, 0.20);
    margin-right: 4px;
}

.vault-btn.extract:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--emerald);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.vault-btn.delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--rose);
    border-color: rgba(239, 68, 68, 0.20);
}

.vault-btn.delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--rose);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.dropzone-active {
    border-color: var(--primary) !important;
    background: rgba(99, 102, 241, 0.08) !important;
}

/* Adjust layout when drawer is open */
body.drawer-open .main-content {
    margin-right: 45vw;
}

@media (max-width: 1024px) {
    .split-companion-drawer {
        width: 80vw;
    }
    body.drawer-open .main-content {
        margin-right: 0;
    }
}

/* Document Upload select dropdown options styling to fix readability issues */
select#uploadCategory {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='none' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='%239CA3AF' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 1.25rem !important;
    padding-right: 2.5rem !important;
}

select#uploadCategory option {
    background-color: #0b0f19 !important;
    color: #f3f4f6 !important;
    font-family: var(--font-sans) !important;
    font-size: 0.85rem !important;
    padding: 12px !important;
}

/* =========================================================================
   ℹ️ FEATURE INFO ICONS & EXPANDABLE ACCORDIONS
   ========================================================================= */
.info-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
    transition: var(--transition-fast);
}

.info-toggle-btn:hover {
    background: rgba(99, 102, 241, 0.15);
}

.info-icon {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: var(--text-muted);
    stroke-width: 2.2;
    transition: var(--transition-fast);
}

.info-toggle-btn:hover .info-icon,
.info-toggle-btn.active .info-icon {
    stroke: var(--primary);
    filter: drop-shadow(0 0 3px var(--primary-glow));
}

.info-expanded-card {
    background: rgba(99, 102, 241, 0.03);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-top: 4px;
    margin-bottom: 1.25rem;
    animation: slideDown 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.2);
}

.info-card-content strong {
    display: block;
    color: #FFFFFF;
    font-size: 0.85rem;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.info-card-content p {
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.info-card-content code {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 1px 4px;
    font-family: var(--font-mono);
    color: var(--primary);
    font-size: 0.7rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================================
   🤖 GEMINI SERVICE AGENT CHAT ASSISTANT
   ========================================================================= */
.gemini-agent-launcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4), inset 0 1px 2px rgba(255,255,255,0.3);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.gemini-agent-launcher:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 15px 35px rgba(79, 70, 229, 0.5), 0 0 20px rgba(6, 182, 212, 0.4);
}

.gemini-agent-launcher:active {
    transform: scale(0.95);
}

.gemini-sparkle {
    width: 28px;
    height: 28px;
    animation: floatSparkle 4s ease-in-out infinite;
}

.sparkle-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(6, 182, 212, 0.5);
    animation: ringGlowPulse 2.5s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.gemini-agent-panel {
    position: fixed;
    bottom: 105px;
    right: 30px;
    width: 380px;
    height: 520px;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    z-index: 998;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 25px rgba(79, 70, 229, 0.1);
    transform: translateY(40px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
}

.gemini-agent-panel.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.agent-header {
    background: rgba(19, 27, 46, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.15rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agent-title-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.agent-avatar-glow {
    width: 12px;
    height: 12px;
    background: #06B6D4;
    border-radius: 50%;
    box-shadow: 0 0 10px #06B6D4;
    position: relative;
}

.agent-avatar-glow::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #06B6D4;
    border-radius: 50%;
    top: 0;
    left: 0;
    animation: ringGlowPulse 2s infinite;
}

.agent-status-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.agent-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: #FFFFFF;
    letter-spacing: 0.25px;
}

.agent-status {
    font-size: 0.68rem;
    color: #06B6D4;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agent-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-dim);
    transition: var(--transition-fast);
    padding: 4px;
}

.agent-close-btn:hover {
    color: var(--rose);
}

.agent-chat-body {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: rgba(0, 0, 0, 0.15);
}

.chat-message {
    max-width: 85%;
    padding: 0.85rem 1.15rem;
    border-radius: 14px;
    font-size: 0.82rem;
    line-height: 1.45;
    animation: messageFadeIn 0.3s ease-out forwards;
}

.chat-message.system {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}

.chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary) 0%, #4F46E5 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.agent {
    align-self: flex-start;
    background: rgba(6, 182, 212, 0.04);
    border: 1px solid rgba(6, 182, 212, 0.12);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
    box-shadow: inset 0 0 8px rgba(6, 182, 212, 0.03);
}

.chat-message p {
    margin-bottom: 8px;
}

.chat-message p:last-child {
    margin-bottom: 0;
}

.chat-message strong {
    color: #FFFFFF;
}

.chat-message.agent strong {
    color: #22D3EE;
}

.chat-message ul, .chat-message ol {
    margin-left: 1.25rem;
    margin-top: 6px;
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-message li {
    list-style-type: square;
}

.agent-chat-footer {
    padding: 1.15rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(19, 27, 46, 0.7);
    display: flex;
    gap: 10px;
    align-items: center;
}

.agent-chat-footer input {
    flex-grow: 1;
    height: 42px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0 1rem;
    color: white;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    outline: none;
    transition: var(--transition-fast);
}

.agent-chat-footer input:focus {
    border-color: #06B6D4;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

.agent-chat-footer button {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition-fast);
    outline: none;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25);
}

.agent-chat-footer button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.35);
}

.agent-chat-footer button:active {
    transform: scale(0.95);
}

@keyframes floatSparkle {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-2px) scale(1.04);
    }
}

@keyframes ringGlowPulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

@keyframes messageFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 8px;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    width: 50px;
    height: 25px;
    border: 1px solid rgba(255,255,255,0.05);
}

.typing-dot {
    width: 5px;
    height: 5px;
    background: #06B6D4;
    border-radius: 50%;
    animation: typingPulse 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingPulse {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}


/* ============================================================
   NEW TABS — Wizard | Checklist | Finder | Planning
   ============================================================ */

/* Wizard */
.wizard-progress-container { padding: 1.5rem 2rem 0; }
.wizard-progress-bar { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; margin-bottom: 1.25rem; }
.wizard-progress-fill { height: 100%; background: var(--primary); border-radius: 2px; transition: width 0.4s ease; }
.wizard-progress-steps { display: flex; justify-content: space-between; }
.wizard-step-indicator { display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: 0.4; transition: opacity 0.3s; }
.wizard-step-indicator.active, .wizard-step-indicator.completed { opacity: 1; }
.step-number { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }
.wizard-step-indicator.active .step-number { border-color: var(--primary); color: var(--primary); background: rgba(99,102,241,0.1); }
.wizard-step-indicator.completed .step-number { border-color: var(--emerald); background: rgba(16,185,129,0.1); color: var(--emerald); }
.step-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.wizard-steps-wrapper { padding: 1.5rem 2rem; }
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.wizard-step-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.07); }
.wizard-step-icon { width: 48px; height: 48px; border-radius: 12px; border: 1px solid; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wizard-step-icon svg { width: 24px; height: 24px; fill: none; stroke-width: 2; }
.wizard-step-title { font-size: 1.1rem; font-weight: 700; color: var(--text-main); margin: 0 0 4px; }
.wizard-step-subtitle { font-size: 0.78rem; color: var(--text-muted); margin: 0; }
.wizard-questions { display: flex; flex-direction: column; gap: 1.25rem; }
.wizard-question-group { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; padding: 1rem 1.25rem; }
.wizard-question-label { display: block; font-size: 0.88rem; font-weight: 600; color: var(--text-main); margin-bottom: 0.75rem; line-height: 1.4; }
.wizard-radio-group { display: flex; flex-direction: column; gap: 0.5rem; }
.wizard-radio-option { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem; border-radius: 8px; cursor: pointer; transition: background 0.15s; }
.wizard-radio-option:hover { background: rgba(255,255,255,0.04); }
.wizard-radio-option input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; }
.radio-label { font-size: 0.83rem; color: var(--text-muted); }
.wizard-irs-insight { margin-top: 1.5rem; background: rgba(245,158,11,0.05); border: 1px solid rgba(245,158,11,0.15); border-radius: 12px; padding: 1rem 1.25rem; }
.irs-insight-header { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 700; color: var(--amber); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.irs-questions-list { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; }
.irs-questions-list li { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; font-style: italic; }
.wizard-nav-buttons { display: flex; justify-content: space-between; padding: 1rem 2rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.07); gap: 1rem; }
.wizard-btn { display: flex; align-items: center; gap: 8px; padding: 0.65rem 1.5rem; border-radius: 10px; font-size: 0.85rem; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }
.wizard-btn.primary { background: var(--primary); color: #fff; }
.wizard-btn.primary:hover { background: #5558e3; }
.wizard-btn.secondary { background: rgba(255,255,255,0.07); color: var(--text-muted); border: 1px solid rgba(255,255,255,0.1); }
.wizard-btn.secondary:hover:not(:disabled) { background: rgba(255,255,255,0.12); color: var(--text-main); }
.wizard-btn:disabled { opacity: 0.35; cursor: not-allowed; }
/* Risk Radar */
.risk-radar-container { display: flex; gap: 2rem; flex-wrap: wrap; margin: 1.5rem 0; }
.risk-radar-chart { width: 220px; height: 220px; position: relative; flex-shrink: 0; margin: 0 auto; }
.radar-bg-rings { position: absolute; inset: 0; }
.radar-ring { position: absolute; border: 1px solid rgba(255,255,255,0.07); border-radius: 50%; }
.ring-1 { inset: 20%; }
.ring-2 { inset: 40%; }
.ring-3 { inset: 60%; }
.radar-axis-labels { position: absolute; inset: 0; }
.radar-label { position: absolute; font-size: 0.68rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; white-space: nowrap; }
.radar-polygon-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.radar-polygon { fill: rgba(99,102,241,0.15); stroke: var(--primary); stroke-width: 1.5; }
.radar-center-score { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; }
.radar-score-value { font-size: 1.6rem; font-weight: 800; }
.radar-score-label { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; color: var(--text-muted); }
.risk-scores-grid { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 0.75rem; }
.risk-score-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; padding: 0.85rem 1rem; }
.risk-score-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.risk-category-name { font-size: 0.82rem; font-weight: 600; color: var(--text-main); }
.risk-score-badge { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: 0.05em; }
.risk-score-bar { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; margin-bottom: 0.5rem; }
.risk-score-fill { height: 100%; border-radius: 2px; transition: width 0.6s ease; }
.risk-recommendation { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }
.defense-strategies-section { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.07); }
.defense-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }

/* Checklist */
.readiness-gauge-container { position: relative; display: flex; justify-content: center; padding: 1.5rem 1rem 1rem; }
.readiness-gauge-svg { width: 160px; height: 160px; transform: rotate(-90deg); }
.readiness-gauge-bg { fill: none; stroke: rgba(255,255,255,0.07); stroke-width: 12; }
.readiness-gauge-fill { fill: none; stroke: var(--emerald); stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray 0.5s ease, stroke 0.3s; }
.readiness-gauge-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.readiness-score-value { display: block; font-size: 1.8rem; font-weight: 800; color: var(--text-main); line-height: 1; }
.readiness-score-label { display: block; font-size: 0.6rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.08em; margin-top: 4px; }
.readiness-badge-container { padding: 0 1.5rem 1rem; }
.ready-to-file-badge { display: flex; align-items: center; gap: 8px; background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); border-radius: 10px; padding: 0.65rem 1rem; font-size: 0.85rem; font-weight: 700; color: #10B981; }
.deadline-countdown-card { margin: 0 1.5rem 1rem; background: rgba(245,158,11,0.05); border: 1px solid rgba(245,158,11,0.15); border-radius: 12px; padding: 1rem; }
.deadline-header { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; font-weight: 700; color: var(--amber); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.deadline-countdown { display: flex; gap: 0.75rem; }
.countdown-unit { flex: 1; text-align: center; }
.countdown-number { display: block; font-size: 1.6rem; font-weight: 800; color: var(--text-main); line-height: 1; }
.countdown-label { display: block; font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.missing-docs-summary { margin: 0 1.5rem 1.5rem; background: rgba(239,68,68,0.05); border: 1px solid rgba(239,68,68,0.15); border-radius: 12px; padding: 1rem; }
.missing-docs-header { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; font-weight: 700; color: var(--rose); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.missing-docs-count { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.5rem; }
.missing-docs-list { margin: 0; padding-left: 1.25rem; }
.missing-docs-list li { font-size: 0.75rem; color: var(--text-muted); line-height: 1.6; }
.checklist-categories-container { padding: 0 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.checklist-category { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; overflow: hidden; }
.checklist-category-header { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; cursor: pointer; transition: background 0.15s; user-select: none; }
.checklist-category-header:hover { background: rgba(255,255,255,0.04); }
.category-header-left { display: flex; align-items: center; gap: 0.75rem; }
.category-color-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.category-name { font-size: 0.83rem; font-weight: 600; color: var(--text-main); }
.category-progress { font-size: 0.72rem; color: var(--text-muted); background: rgba(255,255,255,0.06); padding: 2px 8px; border-radius: 20px; }
.category-chevron { width: 16px; height: 16px; stroke: var(--text-muted); fill: none; stroke-width: 2; transition: transform 0.2s; flex-shrink: 0; }
.checklist-items-wrapper { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.checklist-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.6rem 1rem; border-top: 1px solid rgba(255,255,255,0.05); cursor: pointer; transition: background 0.15s; }
.checklist-item:hover { background: rgba(255,255,255,0.03); }
.checklist-item input[type="checkbox"] { display: none; }
.checkmark { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.2); border-radius: 4px; flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.checklist-item input:checked ~ .checkmark { background: var(--emerald); border-color: var(--emerald); }
.checklist-item input:checked ~ .checkmark::after { content: ''; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); display: block; }
.item-text { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; transition: color 0.15s; }
.checklist-item input:checked ~ .item-text { color: var(--text-main); text-decoration: line-through; opacity: 0.6; }

/* Deduction Finder */
.finder-step { display: none; padding: 1.5rem 2rem; }
.finder-step.active { display: block; }
.finder-step-heading { font-size: 1.05rem; font-weight: 700; color: var(--text-main); margin: 0 0 1.25rem; }
.finder-type-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.finder-type-card { background: rgba(255,255,255,0.03); border: 2px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 1.25rem; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.75rem; }
.finder-type-card:hover { border-color: rgba(99,102,241,0.3); background: rgba(99,102,241,0.04); }
.finder-type-card.selected { border-color: var(--primary); background: rgba(99,102,241,0.08); }
.finder-type-card input[type="radio"] { display: none; }
.finder-type-icon { width: 48px; height: 48px; border-radius: 12px; border: 1px solid; display: flex; align-items: center; justify-content: center; }
.finder-type-icon svg { width: 24px; height: 24px; fill: none; stroke-width: 2; }
.finder-type-label { font-size: 0.88rem; font-weight: 700; color: var(--text-main); }
.finder-type-desc { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }
.finder-situation-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.75rem; }
.finder-situation-item { display: flex; align-items: flex-start; gap: 1rem; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 1rem; cursor: pointer; transition: all 0.15s; }
.finder-situation-item:hover { background: rgba(255,255,255,0.06); }
.finder-situation-item input[type="checkbox"] { display: none; }
.finder-situation-check { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.2); border-radius: 5px; flex-shrink: 0; margin-top: 2px; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.finder-situation-item input:checked ~ .finder-situation-check { background: var(--primary); border-color: var(--primary); }
.finder-situation-item input:checked ~ .finder-situation-check::after { content: ''; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px,-1px); display: block; }
.finder-situation-item strong { display: block; font-size: 0.85rem; font-weight: 700; color: var(--text-main); margin-bottom: 3px; }
.finder-situation-item p { font-size: 0.75rem; color: var(--text-muted); margin: 0; line-height: 1.4; }
.finder-results-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.finder-total-box { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2); border-radius: 12px; padding: 0.75rem 1.25rem; text-align: center; min-width: 160px; }
.finder-total-amount { font-size: 1.5rem; font-weight: 800; color: var(--emerald); }
.finder-results-list { display: flex; flex-direction: column; gap: 0.5rem; }
.finder-result-item { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; overflow: hidden; }
.finder-result-header { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1rem; cursor: pointer; gap: 1rem; flex-wrap: wrap; transition: background 0.15s; }
.finder-result-header:hover { background: rgba(255,255,255,0.04); }
.finder-result-left { display: flex; align-items: center; gap: 0.75rem; }
.finder-result-irc { font-size: 0.7rem; font-weight: 700; color: var(--primary); background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.2); padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.finder-result-label { font-size: 0.85rem; font-weight: 600; color: var(--text-main); }
.finder-result-right { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.finder-result-range { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.finder-risk-badge { font-size: 0.65rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.finder-result-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; padding: 0 1rem; }
.finder-result-item.expanded .finder-result-body { max-height: 300px; padding: 0 1rem 1rem; }
.finder-result-body strong { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.finder-result-body ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.finder-result-body li { font-size: 0.78rem; color: var(--text-muted); line-height: 1.6; }

/* Tax Planning */
.quick-wins-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; padding: 0 0 1rem; }
.quick-win-card { display: flex; align-items: flex-start; gap: 1rem; padding: 1.1rem; background: rgba(255,255,255,0.03); border-radius: 12px; border: 1px solid rgba(255,255,255,0.07); }
.quick-win-icon { font-size: 0.8rem; font-weight: 800; letter-spacing: -0.02em; min-width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.quick-win-card strong { display: block; font-size: 0.88rem; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.quick-win-card p { font-size: 0.78rem; color: var(--text-muted); margin: 0; line-height: 1.5; }
.tax-calendar { padding: 0; display: flex; flex-direction: column; gap: 2px; }
.calendar-month-item { display: flex; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.cal-month { font-size: 0.72rem; font-weight: 800; color: var(--month-color, var(--primary)); min-width: 32px; letter-spacing: 0.05em; padding-top: 2px; }
.cal-action { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }
.planning-strategies-list { display: flex; flex-direction: column; gap: 0.5rem; }
.strategy-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; overflow: hidden; transition: border-color 0.2s; }
.strategy-card.strategy-done { opacity: 0.45; }
.strategy-card-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; cursor: pointer; gap: 1rem; flex-wrap: wrap; }
.strategy-header-left { display: flex; align-items: center; gap: 0.75rem; }
.strategy-badge { font-size: 0.65rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.strategy-title { font-size: 0.88rem; font-weight: 600; color: var(--text-main); }
.strategy-header-right { display: flex; align-items: center; gap: 0.75rem; }
.strategy-savings { font-size: 0.75rem; font-weight: 700; color: var(--emerald); white-space: nowrap; }
.strategy-done-btn { font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.2); color: var(--emerald); cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.strategy-done-btn:hover { background: rgba(16,185,129,0.2); }
.strategy-chevron { width: 16px; height: 16px; stroke: var(--text-muted); fill: none; stroke-width: 2; transition: transform 0.2s; flex-shrink: 0; }
.strategy-card-body { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; padding: 0 1.25rem; }
.strategy-card.expanded .strategy-card-body { max-height: 400px; padding: 0 1.25rem 1.25rem; }
.strategy-card-body p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; margin: 0 0 0.5rem; }
.strategy-card-body ul { margin: 0.25rem 0 0; padding-left: 1.25rem; }
.strategy-card-body li { font-size: 0.8rem; color: var(--text-muted); line-height: 1.7; }

/* ============================================================
   RECONCILIATION HUB STYLES
   ============================================================ */
.recon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.recon-dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.recon-dropzone:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}
.recon-dropzone svg {
    width: 32px;
    height: 32px;
    stroke: var(--text-muted);
    stroke-width: 1.5;
    fill: none;
}
.recon-dropzone.active {
    border-color: var(--emerald);
    background: rgba(16, 185, 129, 0.05);
}
.recon-dropzone.active svg {
    stroke: var(--emerald);
}
.recon-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.recon-stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}
.recon-stat-val {
    font-size: 1.25rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 2px;
}
.recon-stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.recon-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 4px;
}
.recon-tab {
    background: none;
    border: none;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}
.recon-tab:hover {
    color: #FFFFFF;
    background: rgba(255,255,255,0.03);
}
.recon-tab.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
}
.recon-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}
.similarity-high {
    color: var(--emerald);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.similarity-medium {
    color: var(--amber);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.similarity-low {
    color: var(--rose);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.recon-row-interactive {
    cursor: pointer;
    transition: background 0.15s;
}
.recon-row-interactive:hover {
    background: rgba(255,255,255,0.03);
}
.recon-param-slider {
    width: 100%;
    accent-color: var(--primary);
    cursor: pointer;
}
.recon-param-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* ============================================================
   📂 IMPORTER WORKSPACE SEGMENTED TABS STYLING (OPTION C)
   ============================================================ */
.importer-tabs::-webkit-scrollbar {
    display: none;
}
.importer-tabs {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.importer-tab {
    transition: all 0.2s ease;
}
.importer-tab:hover:not(.active) {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ─────────────────────────────────────────────
 * OFFLINE VAULT & LAYOUT UNCLIPPING STYLES
 * ───────────────────────────────────────────── */
.recon-grid,
.main-content,
.content-section {
    overflow: visible !important;
    min-height: auto;
}
.recon-grid { height: auto !important; }
.content-section { max-height: none !important; }

#uploaderCard,
#vaultCard {
    overflow: visible;
    height: auto;
}

/* Offline status elements */
.badge-offline {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 8px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vault-offline-banner {
    background: rgba(245, 158, 11, 0.05);
    border-left: 3px solid #f59e0b;
    padding: 10px 14px !important;
    font-size: 0.8rem;
    color: var(--text-dim, #cbd5e1);
}
.vault-offline-banner code {
    background: rgba(0,0,0,0.25);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
}

/* OCR console (W-2 / generic) */
.ocr-console {
    background: #0b1020;
    color: #c8f7c5;
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 8px;
    padding: 14px 16px;
    margin: 12px 0;
    max-height: 360px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12.5px;
    line-height: 1.55;
    box-shadow: inset 0 0 30px rgba(99, 102, 241, 0.08);
}
.ocr-log { margin: 0; white-space: pre-wrap; word-break: break-word; }

/* CSV preview table */
.offline-csv-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}
.offline-csv-table th,
.offline-csv-table td {
    border: 1px solid var(--border-subtle, #2a2f45);
    padding: 7px 11px;
    text-align: left;
}
.offline-csv-table thead {
    background: rgba(99, 102, 241, 0.10);
    color: var(--text-primary, #e2e8f0);
}
.offline-csv-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* File-meta grid for generic preview */
.file-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
    margin: 12px 0;
}
.file-meta-grid > div {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle, #2a2f45);
    border-radius: 6px;
    padding: 10px 12px;
}
.file-meta-grid span { display:block; font-size:11px; color:var(--text-muted,#94a3b8); text-transform:uppercase; letter-spacing:.5px; }
.file-meta-grid strong { font-size: 13px; color: var(--text-primary, #e2e8f0); }

/* Drawer styles */
#splitCompanionDrawer .drawer-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle, #2a2f45);
}
#splitCompanionDrawer .drawer-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    font-size: 18px;
}
#splitCompanionDrawer .drawer-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-subtle, #2a2f45);
    text-align: right;
}

/* Premium Company Vehicle Card styling */
.company-vehicle-card {
    margin-top: 1.25rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.06));
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.04);
}
.cv-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}
.cv-card-pill {
    align-self: flex-start;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(168, 85, 247, 0.18);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.35);
}
.cv-card-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    margin: 0;
}
.cv-card-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.5rem 0;
}
.cv-card-row.total .cv-card-label {
    font-weight: 700;
    color: #fff;
}
.cv-card-row.total .cv-card-value {
    font-size: 1.5rem;
}
.cv-card-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.78);
}
.cv-card-value {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "tnum" 1, "lnum" 1;
}
.cv-card-value.positive {
    color: var(--emerald);
}
.cv-card-value.muted {
    color: rgba(255, 255, 255, 0.4);
}
.cv-card-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0.25rem 0;
}
.cv-card-divider.strong {
    background: rgba(255, 255, 255, 0.12);
}
.cv-card-note {
    margin: 0.9rem 0 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.62);
}

/* ==========================================================
   DYNAMIC SCHEDULE C BUSINESS ARCHITECTURE (Option 2)
   ========================================================== */
.add-business-btn {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    width: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15));
    border: 1px dashed rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.add-business-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.7);
    color: #fff;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}
.add-business-btn:active { transform: translateY(0); }

.dynamic-biz-wizard {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.dynamic-biz-wizard h2 {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
}
.dynamic-biz-wizard .biz-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 1.5rem 0;
}
.dynamic-biz-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 980px) {
    .dynamic-biz-grid { grid-template-columns: 1fr; }
}
.dynamic-biz-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
}
.dynamic-biz-card h3 {
    font-size: 1rem;
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 0 0 1.25rem 0;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dynamic-input-group { margin-bottom: 1rem; }
.dynamic-input-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}
.dynamic-input-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-family: var(--font-mono);
    transition: var(--transition-fast);
    box-sizing: border-box;
}
.dynamic-input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}
.dynamic-input-group input::placeholder { color: var(--text-dim); }

.add-expense-cat-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px dashed rgba(99, 102, 241, 0.45);
    border-radius: 10px;
    color: #c7d2fe;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
}
.add-expense-cat-btn:hover {
    background: rgba(99, 102, 241, 0.18);
    color: #fff;
    border-style: solid;
}

.pnl-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-main);
    font-size: 0.82rem;
}
.pnl-row .pnl-label { color: var(--text-main); }
.pnl-row .pnl-value { font-weight: 600; font-family: var(--font-mono); }
.pnl-row.total {
    font-weight: 600;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-top: 8px;
    padding: 10px 0;
    font-size: 0.85rem;
}
.pnl-row.total .pnl-value { color: var(--amber); }
.pnl-row.profit-row { font-size: 0.88rem; font-weight: 700; padding-top: 12px; border-bottom: none; }
.pnl-row.profit-positive .pnl-value { color: var(--emerald); }
.pnl-row.profit-negative .pnl-value { color: #f87171; }

.dynamic-tab-btn {
    position: relative;
}
.dynamic-tab-btn::before {
    content: "●";
    color: #a855f7;
    margin-right: 6px;
    font-size: 9px;
    vertical-align: middle;
}

/* Premium modal for naming new businesses */
.biz-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 11, 19, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}
.biz-modal {
    background: rgba(11, 15, 25, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    color: #fff;
    animation: scaleIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.biz-modal h3 {
    margin: 0 0 8px 0;
    font-size: 1.35rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
}
.biz-modal p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0 1.25rem 0;
    line-height: 1.45;
}
.biz-modal input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    box-sizing: border-box;
    margin-bottom: 1.5rem;
    font-family: inherit;
}
.biz-modal input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}
.biz-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.biz-modal-btn {
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: var(--transition-fast);
}
.biz-modal-btn.cancel {
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.biz-modal-btn.cancel:hover { background: rgba(255,255,255,0.1); color: #fff; }
.biz-modal-btn.confirm {
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: #fff;
}
.biz-modal-btn.confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(99,102,241,0.3);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }

