/* Modern Dark Theme - 2025 Redesign */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Core Colors - Pure Black Theme */
    --bg-main: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    /* High contrast card background */

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    /* Zinc 400 */
    --text-muted: #52525b;
    /* Zinc 600 */

    /* Accents - Retaining pop colors but optimizing for black */
    --accent-primary: #6366f1;
    /* Indigo 500 */
    --accent-secondary: #a855f7;
    /* Purple 500 */
    --accent-glow: rgba(99, 102, 241, 0.2);
    /* Reduced glow intensity */
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --accent-cyan: #22d3ee;

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Structural */
    --border-color: #27272a;
    /* Zinc 800 - Subtle borders */
    --glass-border: rgba(255, 255, 255, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    /* background-image removed for pure black theme */
    background-attachment: fixed;
    background-attachment: fixed;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 1.8rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #67e8f9;
}

/* Components: Glass Card */
.card,
.input-card,
.result-card,
.about-card,
.legal-card,
.feature-item,
.quick-links {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), var(--shadow-glow);
}

/* Layout - Restore Grid System */
.container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: 180px 3fr 2fr 180px;
    /* Weighted 3:2 split for Dashboard */
    /* Restore 4-column layout */
    gap: 20px;
    /* Add gap for visual separation */
    min-height: 100vh;
    background: transparent !important;
    position: relative;
}

/* Time Calculator Specific Layout Override */
body.time-calculator-page .container {
    display: flex !important;
    flex-direction: column !important;
    max-width: 1200px !important;
    /* Increase width for side-by-side layout */
    width: 95% !important;
    grid-template-columns: none !important;
    padding: 30px 20px !important;
    gap: 30px !important;
    margin: 0 auto !important;
    /* Center the container */
}

body.time-calculator-page .ad-sidebar,
body.time-calculator-page .left-panel,
body.time-calculator-page .right-panel {
    display: none !important;
}

/* Sidebars & Panels */
.ad-sidebar {
    position: sticky;
    top: 0;
    width: 180px;
    min-width: 180px;
    z-index: 2;
    align-self: start;
    padding-top: 20px;
}

.left-panel {
    padding: 30px;
    overflow-y: auto;
    height: 100vh;
    position: sticky;
    top: 0;
    background: var(--bg-main);
    /* Dark background */
    z-index: 2;
    border-right: 1px solid var(--border-color);
}

.right-panel {
    padding: 25px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Main content wrapper if it exists inside panels */
.page-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    grid-column: 2 / span 2;
    /* Span middle columns if not using panels */
}

/* Header Adjustments */
.main-header {
    grid-column: 1 / -1;
    /* Span full width */
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section svg {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.5));
}

.logo-section path.st0 {
    fill: var(--text-primary) !important;
}

/* Navigation */
.mobile-nav {
    display: none;
    /* Hidden by default, shown in media queries */
}

.main-navigation {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.nav-link i {
    color: var(--accent-primary);
}

.support-btn {
    background: linear-gradient(135deg, #00aff4 0%, #009ce2 100%);
    color: white !important;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(0, 175, 244, 0.2);
}

.support-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(0, 156, 226, 0.5);
}

.support-btn i {
    color: white;
}

/* Inputs & Forms */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control,
select.form-control {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    background: #000000;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* Buttons */
.btn-calculate,
.btn {
    width: 100%;
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.btn-calculate:hover,
.btn:hover {
    filter: brightness(1.1);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* Radio Groups */
.radio-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.radio-option {
    position: relative;
    flex: 1;
    min-width: 60px;
}

.radio-option input {
    display: none;
}

.radio-option label {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    margin: 0;
}

.radio-option input:checked+label {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    font-weight: 600;
}

/* Results Section */
.result-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.result-header h3 i {
    color: var(--accent-cyan);
}

.gap-display {
    text-align: center;
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.gap-amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

.gap-label {
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.risk-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.risk-badge.red {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.risk-badge.yellow {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.risk-badge.green {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.result-value {
    color: var(--text-primary);
    font-weight: 600;
}

.result-explanation {
    background: rgba(30, 41, 59, 0.5);
    border-left: 4px solid var(--accent-primary);
    padding: 16px;
    margin-top: 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #000000;
    /* Pure black dropdown */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    min-width: 280px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 200;
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(15px);
}

.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-item i {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 8px;
    border-radius: 8px;
}

.dropdown-item-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.dropdown-item-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Disclaimer & SEO */
.disclaimer-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    padding: 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-top: 30px;
}

.seo-section {
    margin-top: 40px;
    color: var(--text-secondary);
}

.seo-section h2,
.seo-section h3 {
    color: var(--text-primary);
    margin-top: 30px;
}

.seo-section ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.seo-section li {
    margin-bottom: 8px;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* Responsive Grid Adjustments */
@media (max-width: 1200px) {
    .container {
        display: flex;
        /* Stack vertically on smaller screens */
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .ad-sidebar,
    .left-panel,
    .right-panel {
        display: none !important;
        /* Hide sidebars on mobile/tablet */
    }

    .main-header {
        position: relative;
        /* Unstick header on mobile if needed */
    }

    .page-main {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 100%;
        padding: 16px;
    }
}

@media (min-width: 1201px) {
    .container {
        display: grid !important;
        grid-template-columns: 180px 3fr 2fr 180px !important;
    }

    .ad-sidebar {
        display: block !important;
    }

    /* vital: hide mobile elements so they don't break the grid */
    .mobile-nav,
    .mobile-ad-container {
        display: none !important;
    }
}

/* Base Responsive */
@media (max-width: 768px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }

    .header-container {
        flex-direction: column;
        gap: 16px;
    }

    .main-navigation {
        width: 100%;
        justify-content: space-between;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .logo-section svg {
        height: 32px;
    }
}

/* --- Time Calculator Specific Styles (Migrated & Dark Themed) --- */

.time-calc-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.top-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.input-section {
    flex: 1;
    min-width: 0;
}

.multiple-times-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.multiple-times-header span {
    font-weight: 600;
    color: var(--text-primary);
}

.btn-add-row {
    background: var(--success);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-row:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.time-rows-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.time-row {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.2s;
}

.time-row:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.row-top-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.operation-toggle {
    display: flex;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border-color);
}

.operation-btn {
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    background: transparent;
    transition: all 0.2s;
}

.operation-btn.active.add {
    background: var(--success);
    color: white;
}

.operation-btn.active.subtract {
    background: var(--danger);
    color: white;
}

.btn-remove-row {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove-row:hover {
    background: var(--danger);
    color: white;
}

.paste-input {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-family: monospace;
    transition: all 0.2s;
}

.paste-input:focus {
    border-color: var(--accent-primary);
    outline: none;
}

.time-input-groups {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.compact-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 100px;
}

/* Hide sliders for cleaner UI */
.compact-input-group .slider {
    display: none;
}

.time-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-main);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    flex: 1;
}

.time-input-group:focus-within {
    border-color: var(--accent-primary);
}

.time-input-group input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 50px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.time-input-group input:focus {
    outline: none;
}

.time-input-group label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* Review Total Section */
.total-section {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    flex: 0 0 350px;
    position: sticky;
    top: 100px;
    backdrop-filter: blur(20px);
}

.total-label {
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.total-time {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 10px 0;
    line-height: 1.2;
}

.total-breakdown {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.btn-group {
    display: flex;
    gap: 10px;
}

.btn-add {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-add:hover {
    background: var(--success);
    color: white;
}

.btn-clear {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-clear:hover {
    background: var(--danger);
    color: white;
}

/* Time List for added entries */
.time-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.time-item.add {
    border-left: 4px solid var(--success);
}

.time-item.subtract {
    border-left: 4px solid var(--danger);
}

.time-item .time-display {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.btn-remove {
    background: transparent;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-remove:hover {
    color: var(--danger);
}

@media (max-width: 1000px) {
    .top-layout {
        flex-direction: column;
    }

    .total-section {
        flex: none;
        width: 100%;
        position: static;
    }
}

/* ========================================
   COMPONENT STYLES (Dark Theme Adapted)
   ======================================== */

/* Privacy Banner */
.privacy-banner {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.privacy-banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.privacy-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.privacy-text h4 {
    margin: 0 0 8px 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: white !important;
}

.privacy-text p {
    margin: 0;
    opacity: 0.95;
    font-size: 0.95rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9) !important;
}

.privacy-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.privacy-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
}

.privacy-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.privacy-info-btn,
.clear-data-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.privacy-info-btn:hover,
.clear-data-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.clear-data-btn {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.4);
}

/* Privacy Indicators */
.privacy-indicator {
    color: var(--success);
    margin-left: 8px;
    font-size: 0.9rem;
}

.privacy-hint {
    color: var(--success) !important;
    font-size: 0.75rem !important;
    margin-top: 4px;
    display: block;
    font-weight: 500;
}

/* Trust Badges */
.trust-badges-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.trust-badge.secure {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.trust-badge.private {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--accent-primary);
}

.trust-badge.local {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    gap: 30px;
}

.tab {
    padding: 12px 0;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    border-bottom-color: var(--accent-primary);
    color: var(--accent-primary);
    font-weight: 600;
}

/* Results Section */
.results-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.results-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.results-title i {
    color: var(--accent-secondary);
}

/* Balance Meter */
.balance-meter {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 25px 20px;
    border: 1px solid var(--border-color);
}

.meter-container {
    position: relative;
    height: 14px;
    background: linear-gradient(to right, var(--danger), var(--warning), var(--success));
    border-radius: 7px;
    margin: 20px 0;
}

.meter-indicator {
    position: absolute;
    top: -6px;
    width: 26px;
    height: 26px;
    background: var(--bg-main);
    border: 3px solid var(--accent-primary);
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 0.5s ease;
    left: 50%;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
    z-index: 2;
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

.balance-status {
    text-align: center;
    margin-top: 15px;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.kpi-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
}

.kpi-value {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--accent-cyan);
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Insights Card */
.insights-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
}

/* Progress Bars */
.progress-container {
    margin: 15px 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    transition: width 0.5s ease;
}

/* Goal Items */
.goal-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.goal-item.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.goal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.goal-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.goal-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.goal-title i {
    color: var(--accent-primary);
}

.goal-controls {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 15px;
    align-items: center;
    margin-bottom: 12px;
}

.goal-input {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s;
}

.goal-input:disabled {
    opacity: 0.5;
    background: var(--bg-main);
}

.goal-input:focus {
    border-color: var(--accent-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.goal-input::placeholder {
    color: var(--text-muted);
}

.amount-display {
    font-weight: 700;
    color: var(--accent-cyan);
    text-align: right;
    font-size: 0.9rem;
}

/* Range Sliders for Goals */
input[type="range"].slider,
.slider {
    width: 100% !important;
    height: 6px !important;
    border-radius: 3px !important;
    background: var(--border-color) !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: all 0.3s !important;
    margin: 15px 0 !important;
}

input[type="range"].slider::-webkit-slider-thumb,
.slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: var(--accent-primary) !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4) !important;
    transition: all 0.3s !important;
}

input[type="range"].slider::-webkit-slider-thumb:hover,
.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2) !important;
    box-shadow: 0 3px 12px rgba(99, 102, 241, 0.6) !important;
}

input[type="range"].slider::-moz-range-thumb,
.slider::-moz-range-thumb {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: var(--accent-primary) !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4) !important;
    border: none !important;
}

input[type="range"].slider::-moz-range-track,
.slider::-moz-range-track {
    height: 6px !important;
    background: var(--border-color) !important;
    border-radius: 3px !important;
    border: none !important;
}

input[type="range"].slider:disabled,
.slider:disabled {
    opacity: 0.5 !important;
}

.goal-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}

/* Section Title for Goals */
.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.section-title i {
    color: var(--accent-primary);
}

.info-icon {
    color: var(--text-muted);
    cursor: help;
    font-size: 0.9rem;
    margin-left: auto;
}

.info-icon:hover {
    color: var(--accent-primary);
}

/* Health Calculator Page Overrides */
body.health-calculator-page {
    max-width: 1200px;
    margin: 0 auto;
}

body.health-calculator-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: block;
    grid-template-columns: none;
}

body.health-calculator-page .main-content {
    max-width: 100%;
    padding: 0;
}