/* Elektriabi — Production Styles */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    background: #fff;
}

a {
    color: #0e8a93;
    text-decoration: none;
}
a:hover {
    color: #0a6e75;
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: 1290px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-narrow {
    max-width: 900px;
}

/* Screens */
.screen {
    display: none;
    min-height: 100vh;
}
.screen.active {
    display: block;
}

/* Navbar */
.navbar {
    background: #0e8a93;
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.logo:hover {
    color: #fff;
    text-decoration: none;
}

.logo-icon {
    flex-shrink: 0;
}

.nav-tagline {
    color: rgba(255,255,255,0.85);
    font-size: 0.85rem;
}

/* Hero */
.hero {
    background: #f0fafa;
    color: #2e526a;
    padding: 2rem 0 1.5rem;
    text-align: center;
    border-bottom: 2px solid #c8e8eb;
}

.hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: #2e526a;
}

.hero-subtitle {
    font-size: 1rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto 1.25rem;
    line-height: 1.6;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #555;
}

.badge-icon-svg {
    flex-shrink: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-size: 1rem;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary {
    background: #129ca6;
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(18, 156, 166, 0.25);
}
.btn-primary:hover:not(:disabled) {
    background: #0e8a93;
    text-decoration: none;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(18, 156, 166, 0.35);
}

.btn-lg {
    padding: 1rem 3rem;
    font-size: 1.15rem;
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.875rem;
}

.btn-outline-light {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.7);
    padding: 0.5rem 1.2rem;
    border-radius: 9999px;
    cursor: pointer;
    font-family: inherit;
}
.btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    text-decoration: none;
}

/* Steps Section */
.steps-section {
    padding: 2rem 0;
    background: #fff;
}

.steps-section h2 {
    text-align: center;
    font-size: 1.35rem;
    color: #2e526a;
    margin-bottom: 1.5rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 0.75rem;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #129ca6;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
}

.step h3 {
    font-size: 1rem;
    color: #2e526a;
    margin-bottom: 0.25rem;
}

.step p {
    color: #666;
    font-size: 0.85rem;
}

/* FAQ / Features */
.faq-section {
    padding: 2rem 0;
    background: #f8f9fa;
}

.faq-section h2 {
    text-align: center;
    font-size: 1.35rem;
    color: #2e526a;
    margin-bottom: 1.5rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.faq-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.faq-card h3 {
    color: #2e526a;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.faq-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: #0e8a93;
    color: #fff;
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-company {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.9);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.9);
    font-size: 0.875rem;
}
.footer-links a:hover {
    color: #fff;
}

.footer-email {
    color: rgba(255,255,255,0.9);
}
.footer-email:hover {
    color: #fff;
}

/* Upload Screen */
.upload-section {
    padding: 1rem 0 3rem;
}

.upload-section h1 {
    font-size: 1.5rem;
    color: #2e526a;
    margin-bottom: 1rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 0.9rem;
}
.back-link:hover {
    color: #333;
}

.instructions-card {
    background: #f0fafa;
    border: 1px solid #c8e8eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.instructions-card h3 {
    color: #2e526a;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.instructions-card ol {
    padding-left: 1.5rem;
    color: #555;
}

.instructions-card li {
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #b0d4d7;
    border-radius: 12px;
    background: #f8fcfc;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #129ca6;
    background: #edf8f9;
}

.upload-zone.has-file {
    border-style: solid;
    border-color: #129ca6;
    background: #edf8f9;
    cursor: default;
}

.upload-zone.has-error {
    border-color: #dc3545;
    background: #fff5f5;
}

.upload-icon {
    margin-bottom: 0.3rem;
    line-height: 1;
}

.upload-text {
    font-size: 1rem;
    color: #555;
    margin-bottom: 0;
}

/* Two-column layout for consumption + production upload */
.upload-columns {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.upload-column {
    flex: 1;
    min-width: 0;
}

.upload-column-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2e526a;
    margin-bottom: 0.5rem;
}

.optional-label {
    font-weight: 400;
    color: #888;
    font-size: 0.9rem;
}

.upload-zone-optional {
    border-color: #d0d0d0;
    background: #fafafa;
}

.upload-zone-optional:hover {
    border-color: #129ca6;
    background: #edf8f9;
}

.upload-instructions-note {
    font-size: 0.82rem;
    color: #666;
    margin: 0.5rem 0 0;
    line-height: 1.4;
}

.upload-instructions {
    margin-top: 0.75rem;
}

.upload-instructions ol {
    padding-left: 1.3rem;
    color: #666;
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 0;
}

/* Inline fuse selector for upload screen */
.fuse-selector-upload {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.fuse-selector-upload label {
    display: inline;
    margin-bottom: 0;
}

.fuse-selector-upload .field-hint {
    margin: 0;
    font-size: 0.82rem;
}

/* File Info (shown after file selected) */
[hidden] {
    display: none !important;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #edf8f9;
    border: 1px solid #c8e8eb;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.file-info-details {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon {
    font-size: 1.5rem;
}

.file-name {
    font-weight: 600;
    color: #2e526a;
}

.file-size {
    font-size: 0.85rem;
    color: #888;
}

.btn-remove-file {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}
.btn-remove-file:hover {
    color: #dc3545;
}

/* Fuse Selector */
.fuse-selector {
    margin-bottom: 2rem;
}

.fuse-selector label {
    display: block;
    font-weight: 600;
    color: #2e526a;
    margin-bottom: 0.3rem;
}

.field-hint {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.fuse-selector select {
    padding: 0.6rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: #333;
    min-width: 200px;
}

/* Error Message (two-tier) */
.error-message {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.error-friendly {
    background: #fff5f5;
    border-left: 4px solid #dc3545;
    padding: 1rem 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.error-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.error-friendly strong {
    display: block;
    color: #333;
    margin-bottom: 0.3rem;
}

.error-friendly p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.error-friendly a {
    font-size: 0.9rem;
}

.error-technical {
    background: #f5f5f5;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #eee;
}

.error-technical summary {
    cursor: pointer;
    color: #666;
    font-size: 0.85rem;
}

.error-technical pre {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    color: #555;
    margin-top: 0.5rem;
    white-space: pre-wrap;
    line-height: 1.5;
}

/* Legal Pages */
.legal-section {
    padding: 2rem 0 4rem;
}

.legal-section h1 {
    font-size: 1.75rem;
    color: #2e526a;
    margin-bottom: 1.5rem;
}

.legal-section h3 {
    color: #2e526a;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-section p {
    color: #555;
    margin-bottom: 0.75rem;
}

.legal-date {
    color: #999;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.legal-section code {
    background: #f0f0f0;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    color: #2e526a;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #0e8a93;
    color: #fff;
    padding: 1rem;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

.cookie-content {
    max-width: 1290px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-content p {
    font-size: 0.9rem;
    margin: 0;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-cookie-accept {
    background: #ffffff;
    color: #0e8a93;
    border: 2px solid #ffffff;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
}

.btn-cookie-accept:hover {
    background: #e0f5f7;
    border-color: #e0f5f7;
}

.cookie-policy-link {
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
}
.cookie-policy-link:hover {
    color: #fff;
}

/* Results Section */
.results-section {
    padding: 2rem 0 4rem;
}

.results-header {
    margin-bottom: 2rem;
}

.results-header h1 {
    font-size: 1.75rem;
    color: #2e526a;
    margin-bottom: 0.3rem;
}

.results-period {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

/* Results Cards */
.results-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.results-card h2 {
    color: #2e526a;
    font-size: 1.35rem;
    margin-bottom: 0.3rem;
}

.results-subtitle {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.highlight-card {
    border-color: #129ca6;
    border-width: 2px;
}

/* Results Table */
.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

.results-table thead {
    background: #0e8a93;
    color: #fff;
}

.results-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.results-table th.num {
    text-align: right;
}

.results-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.results-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.results-table tbody tr:hover {
    background: #edf8f9;
}

.row-best {
    background: #edf8f9 !important;
    box-shadow: inset 3px 0 0 #0e8a93;
}

.row-best td:first-child {
    padding-left: calc(1rem - 3px);
}

.row-best td {
    font-weight: 600;
}

.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.diff-negative {
    color: #dc3545;
    font-size: 0.85rem;
}

/* Provider Link */
.provider-link {
    font-weight: 600;
    color: #0e8a93;
}
.provider-link:hover {
    color: #0a6e75;
}

/* Badges */
.green-badge {
    display: inline-block;
    background: #28a745;
    color: #fff;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    margin-left: 0.4rem;
    vertical-align: middle;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.type-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-weight: 600;
}

.badge-spot {
    background: #e8f4f8;
    color: #0e8a93;
}

.badge-fixed {
    background: #e8ecf0;
    color: #2e526a;
}

.badge-variable {
    background: #fff3e0;
    color: #e65100;
}

.recommended-badge {
    display: inline-block;
    background: #129ca6;
    color: #fff;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    margin-left: 0.4rem;
    vertical-align: middle;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Production revenue cell — shows as dash for unsupported packages */
.no-production {
    color: #bbb;
}

.disclaimer {
    color: #999;
    font-size: 0.8rem;
    font-style: italic;
}

/* Electricity package filters */
.elec-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
}

.filter-checkbox input[type="checkbox"] {
    accent-color: #129ca6;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.filter-group label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
}

.filter-group select {
    padding: 0.3rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    background: #fff;
    color: #333;
}

.filter-count {
    color: #888;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Combo search input */
.combo-search {
    width: 100%;
    padding: 0.4rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    margin-bottom: 0.3rem;
    color: #333;
}

.combo-search::placeholder {
    color: #aaa;
}

.combo-search:focus {
    outline: none;
    border-color: #129ca6;
    box-shadow: 0 0 0 2px rgba(18, 156, 166, 0.15);
}

/* Warning Message */
.warning-message {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.warning-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.warning-message strong {
    display: block;
    color: #333;
    margin-bottom: 0.3rem;
}

.warning-message p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.tier-warning {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

/* Fuse Selector Inline (on results page) */
.fuse-selector-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.fuse-selector-inline label {
    font-weight: 600;
    color: #2e526a;
    font-size: 0.9rem;
}

.fuse-selector-inline select {
    padding: 0.4rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
}

/* Bill Top Layout: selectors left, donut right */
.bill-top-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 1.5rem;
}

.bill-top-selectors {
    min-width: 0;
}

.bill-top-chart {
    min-width: 0;
}

.bill-top-chart h3 {
    color: #2e526a;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Combo Selector */
.combo-selector {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.combo-select label {
    display: block;
    font-weight: 600;
    color: #2e526a;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.combo-select select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
}

/* Bill Breakdown */
.bill-breakdown {
    margin-bottom: 1rem;
}

.breakdown-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 0.5rem 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    align-items: baseline;
}

.breakdown-row .num {
    min-width: 5.5rem;
}

.breakdown-header {
    border-bottom: none;
    font-size: 0.8rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.breakdown-row.breakdown-subrow {
    padding-left: 1.5rem;
    font-size: 0.85rem;
    color: #666;
    border-bottom: 1px solid #f5f5f5;
}

.breakdown-row.subtotal {
    border-top: 1px solid #ccc;
    border-bottom: none;
    padding-top: 0.6rem;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.breakdown-row.production-header {
    margin-top: 0.5rem;
    border-top: 2px solid #ccc;
    padding-top: 0.8rem;
}

.breakdown-row.total {
    border-top: 2px solid #0e8a93;
    border-bottom: none;
    padding-top: 0.8rem;
    font-size: 1.05rem;
}

.breakdown-row.average {
    color: #666;
    border-bottom: none;
    font-size: 0.95rem;
}

.donut-explanation {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    margin-top: 0.5rem;
}

.pie-legend-production .pie-legend-value {
    color: #2e8b57;
    font-weight: 600;
}

/* Feedback CTA */
.feedback-cta {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f0fafa;
    border: 1px solid #c8e8eb;
    border-radius: 12px;
}

.feedback-cta p {
    color: #2e526a;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.vat-note {
    color: #999;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Bill Tabs */
.bill-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 1rem;
}

.bill-tab {
    padding: 0.6rem 1.5rem;
    border: none;
    background: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.bill-tab:hover {
    color: #0e8a93;
}

.bill-tab.active {
    color: #0e8a93;
    border-bottom-color: #0e8a93;
}

.bill-tab-content {
    display: none;
}

.bill-tab-content.active {
    display: block;
}

/* Weighted average row */
.breakdown-row.weighted {
    color: #666;
    border-bottom: none;
    font-size: 0.95rem;
}

/* Info icon tooltips */
.info-icon {
    display: inline-block;
    color: #0e8a93;
    cursor: help;
    font-size: 0.9em;
    vertical-align: middle;
    position: relative;
}

.info-icon:hover::after {
    content: attr(title);
    position: absolute;
    left: 0.5em;
    bottom: 100%;
    background: #333;
    color: #fff;
    padding: 0.4em 0.7em;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 400;
    white-space: normal;
    width: max-content;
    max-width: 280px;
    z-index: 10;
    pointer-events: none;
    line-height: 1.4;
}

/* Bill disclaimers */
.bill-disclaimer {
    color: #999;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* UC3.1b: Monthly Bar Chart — Package Selector */
.chart-pkg-add {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.chart-pkg-add label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #555;
    white-space: nowrap;
}

.chart-pkg-add .combo-search {
    width: 160px;
    flex-shrink: 1;
}

.chart-pkg-add select {
    flex: 1;
    min-width: 200px;
    padding: 0.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.85rem;
}

.chart-pkg-add select:disabled,
.chart-pkg-add .combo-search:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chart-max-warning {
    color: #e65100;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: #fff3e0;
    border-radius: 6px;
    border-left: 3px solid #e65100;
}

/* Active legend (selected packages as tags/chips) */
.chart-active-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.chart-legend-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 16px;
    font-size: 0.8rem;
    color: #333;
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.chart-legend-remove {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0 0.2rem;
    line-height: 1;
    margin-left: 0.1rem;
}

.chart-legend-remove:hover {
    color: #c62828;
}

.chart-container {
    overflow-x: auto;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 220px;
    padding: 1.5rem 0 2rem;
    position: relative;
}

.bar-month {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bar-group {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bar {
    border-radius: 2px 2px 0 0;
    transition: opacity 0.2s;
    position: relative;
    flex-shrink: 0;
}

.bar:hover {
    opacity: 0.8;
}

.bar-label {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.4rem;
    white-space: nowrap;
}

.bar-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    margin-bottom: 4px;
    z-index: 10;
}

.bar:hover .bar-tooltip {
    display: block;
}

/* UC5.9: Net monthly chart (production mode) */
.bar-chart-net {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.bar-chart-positive {
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.bar-chart-positive .bar-group {
    flex: 1;
    min-width: 40px;
}

.bar-chart-positive .bars {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    justify-content: center;
}

.bar-chart-zero-line {
    width: 100%;
    height: 2px;
    background: #333;
    position: relative;
    flex-shrink: 0;
}

.bar-chart-zero-line::before {
    content: '0 €';
    position: absolute;
    left: 0.3rem;
    top: -0.85rem;
    font-size: 0.7rem;
    color: #666;
}

.bar-chart-negative {
    display: flex;
    align-items: flex-start;
    overflow: hidden;
}

.bar-chart-negative .bar-group {
    flex: 1;
    min-width: 40px;
}

.bar-chart-negative .bars {
    display: flex;
    gap: 2px;
    align-items: flex-start;
    justify-content: center;
}

.bar-chart-net .bar {
    min-height: 0;
}

.bar-chart-net .bar-tooltip {
    white-space: pre-line;
    text-align: left;
}

.bar-chart-negative .bar {
    border-radius: 0 0 2px 2px;
}

.bar-chart-negative .bar-tooltip {
    bottom: auto;
    top: 100%;
    margin-bottom: 0;
    margin-top: 4px;
}

.bar-chart-labels {
    display: flex;
    margin-top: 0.4rem;
}

.bar-chart-labels span {
    flex: 1;
    min-width: 40px;
    text-align: center;
    font-size: 0.75rem;
    color: #666;
}

/* UC3.3b: Pie Chart */
.pie-chart-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

#pie-chart {
    flex-shrink: 0;
}

.pie-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.pie-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pie-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

.pie-legend-label {
    color: #555;
}

.pie-legend-value {
    color: #333;
    font-weight: 600;
    margin-left: auto;
    padding-left: 1rem;
    white-space: nowrap;
}

/* Processing Section */
.processing-section {
    padding: 2rem 0 4rem;
}

.processing-section h1 {
    font-size: 1.75rem;
    color: #2e526a;
    margin-bottom: 1.5rem;
}

.data-summary-card {
    background: #f0fafa;
    border: 1px solid #c8e8eb;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.95rem;
}

.summary-label {
    color: #666;
    min-width: 140px;
}

.summary-value {
    color: #2e526a;
    font-weight: 600;
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #999;
    font-size: 0.95rem;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    flex-shrink: 0;
    transition: background 0.3s;
}

.progress-step.active .progress-dot {
    background: #129ca6;
    animation: pulse 1s ease-in-out infinite;
}

.progress-step.completed .progress-dot {
    background: #129ca6;
}

.progress-step.active,
.progress-step.completed {
    color: #333;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.progress-bar {
    height: 6px;
    background: #e5e5e5;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-fill {
    height: 100%;
    background: #129ca6;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.processing-note {
    color: #888;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .trust-badges {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .nav-tagline {
        display: none;
    }

    /* Filters: stack vertically on mobile */
    .filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        flex: 1;
    }

    /* Tables: allow horizontal scroll on mobile */
    .results-card {
        overflow-x: auto;
    }

    .results-table {
        font-size: 0.82rem;
        min-width: 520px;
    }

    .results-table th,
    .results-table td {
        padding: 0.5rem 0.5rem;
    }

    /* Bill layout: stack on mobile — selectors on top, donut below */
    .bill-top-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Bill breakdown rows: stack on narrow screens */
    .breakdown-row {
        grid-template-columns: 1fr auto;
        row-gap: 0.1rem;
    }

    .breakdown-row .breakdown-kwh,
    .breakdown-row .breakdown-senti {
        display: none;
    }

    /* Upload columns: stack vertically on mobile */
    .upload-columns {
        flex-direction: column;
    }

    /* Upload zone: reduce padding */
    .upload-zone {
        padding: 1.5rem 1rem;
    }

    /* Inline fuse selector: stack on mobile */
    .fuse-selector-upload {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Processing section */
    .summary-label {
        min-width: 110px;
    }

    /* Results header: stack */
    .results-header {
        margin-bottom: 1.25rem;
    }

    /* Pie chart: stack vertically on mobile */
    .pie-chart-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .bill-top-chart {
        border-top: 1px solid #eee;
        padding-top: 1rem;
    }

    /* Bar chart: smaller labels on mobile */
    .bar-label {
        font-size: 0.65rem;
    }

    .bar-chart-labels span {
        font-size: 0.65rem;
        min-width: 30px;
    }

    .bar-chart-positive .bar-group,
    .bar-chart-negative .bar-group {
        min-width: 30px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.3rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 0.85rem 2rem;
        font-size: 1rem;
    }

    .results-card {
        padding: 1rem;
    }

    .results-table {
        min-width: 460px;
    }

    .fuse-selector-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
}
