:root {
    --bg-base: #f0fdf4;
    --bg-panel: #ffffff;
    --bg-panel-secondary: #f8fafc;

    --border-light: #e2e8f0;
    --border-highlight: #cbd5e1;

    --text-main: #0f172a;
    --text-muted: #64748b;

    --accent: #10B981;
    --accent-hover: #059669;
    --accent-glow: rgba(16, 185, 129, 0.2);

    --grad-1: #10B981;
    --grad-2: #34d399;

    --chart-1: #10B981;
    --chart-2: #F59E0B;
    --chart-3: #3B82F6;
    --chart-4: #8B5CF6;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body.dark-theme {
    --bg-base: #064e3b;
    --bg-panel: #022c22;
    --bg-panel-secondary: #065f46;

    --border-light: rgba(255, 255, 255, 0.1);
    --border-highlight: rgba(255, 255, 255, 0.2);

    --text-main: #f8fafc;
    --text-muted: #a7f3d0;

    --accent: #34d399;
    --accent-hover: #6ee7b7;
    --accent-glow: rgba(52, 211, 153, 0.15);

    --chart-1: #34d399;
    --chart-2: #fbbf24;
    --chart-3: #60a5fa;
    --chart-4: #a78bfa;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
}

svg {
    display: block;
}

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

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

.text-sm {
    font-size: 0.875rem;
}

.text-center {
    text-align: center;
}

.font-semibold {
    font-weight: 600;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

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

.gap-4 {
    gap: 1rem;
}

.w-full {
    width: 100%;
}

.text-gradient {
    background: linear-gradient(135deg, var(--grad-1), var(--grad-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout */
.app-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.icon-wrap {
    background: linear-gradient(135deg, var(--grad-1), var(--grad-2));
    padding: 0.5rem;
    border-radius: 0.75rem;
    color: white;
}

/* Buttons */
.btn-icon {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: var(--text-main);
    background: var(--bg-panel-secondary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--grad-1), var(--grad-2));
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: filter 0.2s, transform 0.2s;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-highlight);
    color: var(--text-main);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--bg-panel-secondary);
    border-color: var(--text-main);
}

/* Main Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    .app-container {
        padding: 1rem;
    }
}

.inputs-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.results-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 2rem;
}

/* Cards */
.card {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.card-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: var(--accent-glow);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Inputs */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.input-modern {
    background: var(--bg-panel-secondary);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
    width: 100%;
}

.input-modern:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.range-modern {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    outline: none;
    margin: 0.5rem 0;
}

.range-modern::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: var(--shadow-sm);
}

.range-modern::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
}

.checkbox-modern {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Results Custom UI */
.result-card {
    background: linear-gradient(145deg, var(--bg-panel), var(--bg-panel-secondary));
    border: 1px solid var(--accent-glow);
}

.total-wrap {
    text-align: center;
    padding: 1rem 0;
}

.total-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.total-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.unit {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Progress / Comparison Bar */
.progress-track {
    width: 100%;
    height: 12px;
    background: var(--border-light);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--grad-1), var(--grad-2));
    border-radius: 6px;
    width: 0%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--text-main);
    z-index: 2;
}

.marker-global {
    left: 24%;
}

/* Approximate 4.8 / 20 * 100 */
.marker-national {
    left: 75%;
}

/* Approximate 15 / 20 * 100 */

/* Tips List */
.badge {
    background: var(--accent-glow);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.tips-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tips-list li {
    font-size: 0.875rem;
    padding-left: 1.5rem;
    position: relative;
}

.tips-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Charts */
.chart-container {
    height: 250px;
    width: 100%;
}

@media print {
    body {
        background: white;
        color: black;
    }

    .inputs-section,
    .btn-primary,
    .btn-outline,
    .app-header {
        display: none;
    }

    .results-section {
        width: 100%;
        top: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}