:root {
    --bg-color: #f8fafc; /* Clean very light off-white */
    --text-color: #0f172a; /* Deep Charcoal/Navy */
    --text-muted: #64748b;
    --primary: #004a44; /* Sysazzle Dark Teal */
    --primary-light: #0d6e66;
    --secondary: #1e293b; /* Dark Navy Accent */
    --glass-bg: #ffffff;
    --glass-border: #e2e8f0;
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
    --critical: #dc2626;
    --warning: #ea580c;
    --low: #059669;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    padding-bottom: 4rem;
    width: 100%;
}
html {
    overflow-x: hidden;
    width: 100%;
}

/* Layout */
.calculator-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem 2.5rem;
    overflow-x: hidden;
}

.app-header {
    text-align: center;
    margin-bottom: 3.5rem;
    animation: fadeInDown 0.8s ease forwards;
}

.logo {
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.app-header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.app-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

.app-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: start;
}

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

/* Left Column: Wizard Section */
.wizard-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.wizard-card {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    overflow-x: hidden;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.section-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Form Controls */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group.push-down {
    margin-top: 1rem;
}

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

label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.value-display {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.1rem;
}

input[type="number"], select {
    width: 100% !important;
    max-width: 100% !important;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    color: var(--text-color);
    padding: 0.85rem 1rem !important;
    border-radius: 8px;
    font-size: 1.05rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    outline: none;
    transition: all 0.2s;
    appearance: none;
    box-sizing: border-box !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

input[type="number"]:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 74, 68, 0.1);
}

/* Range Slider */
input[type="range"] {
    -webkit-appearance: none;
    width: calc(100% - 24px); /* Prevent thumb protrusion */
    max-width: 100%;
    height: 8px;
    background: #e2e8f0; 
    border-radius: 4px;
    outline: none;
    margin: 10px 12px;
    box-sizing: border-box;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 74, 68, 0.3);
    transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* Right Column: Dashboard Section */
.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 2rem;
}

.shadow-panel {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
}

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

.card-header h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary);
}

.pulse-indicator {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #dcfce7;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pulse-indicator::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: #16a34a;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.big-number {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
    letter-spacing: -1.5px;
}

.highlight-teal { color: var(--primary); }
.highlight-navy { color: var(--secondary); }
.highlight-red { color: var(--critical); }

.suffix {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 0.5rem;
    letter-spacing: normal;
}

/* Sub Metrics */
.sub-metrics {
    display: flex;
    gap: 1rem;
    background: #fff5f5;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid #fecdd3;
}

.metric-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.m-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.m-value {
    font-size: 1.3rem;
    color: var(--secondary);
    font-weight: 700;
}

.red-text { color: var(--critical); }

/* Reports inside Panel B */
.report-section {
    margin: 1rem 0;
}

.report-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--secondary);
}

.report-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.push-top {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.benchmark-note {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(0, 74, 68, 0.05);
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.report-divider {
    border: none;
    height: 1px;
    background: #e2e8f0;
    margin: 2.5rem 0;
}

/* Contact Footer */
.contact-footer {
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: #94a3b8;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    line-height: 1.7;
}

.contact-footer strong {
    color: #e2e8f0;
}

.contact-footer a {
    color: #7dd3fc;
    text-decoration: none;
    transition: color 0.2s;
}

.contact-footer a:hover {
    color: #ffffff;
}

/* Export CTA Box */
.export-box {
    background: var(--secondary);
    color: white;
    border: none;
}

.export-box h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.export-box p {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.export-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.export-form button {
    grid-column: span 2;
    justify-self: start;
}

.export-status {
    min-height: 1.25rem;
    margin-top: 0.9rem;
    font-size: 0.92rem;
    line-height: 1.4;
    color: #cbd5e1;
}

.export-status[data-tone="loading"] {
    color: #bfdbfe;
}

.export-status[data-tone="success"] {
    color: #86efac;
}

.export-status[data-tone="error"] {
    color: #fecaca;
}

.export-form input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.export-form input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.export-form input::placeholder {
    color: #cbd5e1;
}

.primary-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
}

.primary-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 74, 68, 0.4);
}

.highlight-btn {
    background: #059669;
    color: #ffffff;
}

.highlight-btn:hover {
    background: #10b981;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .calculator-container { padding: 1.5rem 0.5rem; }
    .app-header { padding: 0 1.5rem; margin-bottom: 2rem; }
    .app-header h1 { font-size: 1.6rem; word-wrap: break-word; }
    .app-header p { font-size: 0.9rem; }
    .wizard-card, .shadow-panel { padding: 1.25rem; }
    .section-title { font-size: 1.1rem; }
    .section-desc { font-size: 0.85rem; }
    label { font-size: 0.85rem; }
    .big-number { font-size: 1.6rem; flex-wrap: wrap; word-wrap: break-word; }
    .sub-metrics { flex-direction: column; }
    .export-form { flex-direction: column; width: 100%; }
    .export-form input { width: 100%; box-sizing: border-box; }
    .primary-btn { width: 100%; box-sizing: border-box; font-size: 0.9rem; }
}

@media (max-width: 480px) {
    .calculator-container { padding: 0.5rem 0; }
    .app-header { padding: 0 1.5rem; }
    .wizard-card, .shadow-panel { padding: 1rem; border-radius: 8px; border-left: none; border-right: none; }
    .app-header h1 { font-size: 1.4rem; }
    .app-header p { font-size: 0.85rem; }
    .section-title { font-size: 1rem; }
    .big-number { font-size: 1.4rem; }
    .sub-metrics { padding: 1rem; }
    .m-value { font-size: 1rem; }
}
