/* CSS Variables */
:root {
    /* Colors */
    --accent-primary: #2563eb;
    --accent-dark: #1d4ed8;
    --accent-light: #3b82f6;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    --text-inverse: #f1f5f9;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-elevated: #f1f5f9;
    --bg-hover: #e2e8f0;
    
    --border-light: #e2e8f0;
    --border-primary: #cbd5e1;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 20px;
    --space-xl: 28px;
    --space-2xl: 40px;
    --space-3xl: 56px;
    
    /* Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 6px 0 rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

h1 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 600;
    text-align: center;
    color: var(--accent-primary);
    margin-bottom: var(--space-lg);
}

h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

h3 {
    font-size: 1.125rem;
    color: var(--accent-primary);
    margin-bottom: var(--space-md);
}

h4 {
    font-size: 1rem;
    margin-bottom: var(--space-sm);
}

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
}

a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

ul, ol {
    margin-bottom: var(--space-md);
}

li {
    margin-bottom: var(--space-xs);
}

strong {
    font-weight: 600;
    color: var(--text-primary);
}

/* Progress Bar */
.progress-container {
    background: var(--bg-primary);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: var(--space-xl);
}

.progress-wrapper {
    background: var(--border-light);
    border-radius: var(--radius-lg);
    height: 8px;
    margin-bottom: var(--space-sm);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-light));
    height: 100%;
    border-radius: var(--radius-lg);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
}

/* Navigation */
.navbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-lg) 0;
    position: sticky;
    top: 0;
    z-index: 1100;
    box-shadow: var(--shadow-sm);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
}

.navbar-brand img {
    max-height: 50px;
    width: auto;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: var(--space-sm);
    z-index: 101;
}

.navbar-menu {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        gap: 0;
        padding: var(--space-md);
        box-shadow: var(--shadow-md);
        border-top: 1px solid var(--border-light);
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-menu a {
        padding: var(--space-md);
        width: 100%;
        border-radius: 0;
        border-bottom: 1px solid var(--border-light);
    }
    
    .navbar-menu a:last-child {
        border-bottom: none;
    }
}

.navbar-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.navbar-menu a:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
}

.navbar-menu a.active {
    color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.1);
}

/* Header */
header {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-light) 100%);
    color: var(--text-white);
    padding: var(--space-2xl) 0;
    text-align: center;
    margin-bottom: var(--space-2xl);
}

header h1, header h2, header p {
    color: var(--text-white);
}

header h1 {
    color: var(--text-white);
    text-align: center;
    margin-bottom: var(--space-md);
}

header h2 {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-md);
    font-weight: 500;
}

header p {
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.6;
}

/* Main */
main {
    padding: var(--space-2xl) 0 var(--space-3xl) 0;
    min-height: calc(100vh - 300px);
    background: var(--bg-secondary);
}

/* Cards */
.content-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--border-light);
}

.card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-light);
}

.card h4 {
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.card p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Forms */
.form-group {
    margin-bottom: var(--space-lg);
}

label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

input, select, textarea {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
}

input[type="number"],
input[type="email"],
input[type="date"],
input[type="month"],
input[type="year"],
input[type="tel"],
input[type="url"] {
    width: auto;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

/* Optimized input field widths */
input[type="number"] {
    width: auto;
    min-width: 100px;
    max-width: 160px;
}

input[type="email"] {
    width: auto;
    min-width: 200px;
    max-width: 350px;
}

input[type="text"] {
    width: 100%;
}

input[type="date"],
input[type="month"],
input[type="year"] {
    width: auto;
    min-width: 140px;
    max-width: 200px;
}

select {
    width: 100%;
}

input[type="file"] {
    width: 100%;
}

textarea {
    width: 100%;
}

/* Form groups in a form-row can use full width for better responsive behavior */
.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
}

/* Address suggestions dropdown */
.address-input-wrapper {
    position: relative;
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.suggestion-item {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: var(--bg-elevated);
}

.suggestion-item strong {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

/* Radio and Checkbox Groups */
.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.radio-item, .checkbox-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--border-light);
    background: var(--bg-primary);
}

.radio-item:hover, .checkbox-item:hover {
    border-color: var(--border-primary);
    background: var(--bg-hover);
}

.radio-item input, .checkbox-item input {
    width: auto;
    margin: 0;
}

.radio-item label, .checkbox-item label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    gap: var(--space-sm);
    font-family: inherit;
    min-height: 44px;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--text-white);
    border-color: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--accent-primary);
    border-color: var(--border-primary);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-link {
    background: transparent;
    color: var(--accent-primary);
    border: none;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-link:hover {
    text-decoration: underline;
    color: var(--accent-dark);
}

@keyframes pulse-highlight {
    0% { box-shadow: 0 0 0 0 rgba(0, 82, 204, 0.7); transform: scale(1); }
    50% { box-shadow: 0 0 0 15px rgba(0, 82, 204, 0); transform: scale(1.02); }
    100% { box-shadow: 0 0 0 0 rgba(0, 82, 204, 0); transform: scale(1); }
}

.btn-highlight-pulse {
    animation: pulse-highlight 2s infinite;
    background: linear-gradient(135deg, #0052cc 0%, #003d99 100%) !important;
    border: none !important;
    position: relative;
    z-index: 1;
}


.btn-danger {
    background: var(--danger);
    color: var(--text-white);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.energy-overview-grid, .documents-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.overview-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.overview-section h4 {
    margin-top: 0;
    margin-bottom: var(--space-md);
    color: var(--accent-primary);
    border-bottom: 2px solid var(--accent-light);
    padding-bottom: var(--space-xs);
}

.data-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--bg-elevated);
    font-size: 0.95rem;
}

.data-item:last-child {
    border-bottom: none;
}

.data-item strong {
    color: var(--text-secondary);
    font-weight: 500;
}

.file-list-compact {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.file-item-compact {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-xs);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
}

.file-preview-mini {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.file-meta {
    flex: 1;
    overflow: hidden;
}

.file-name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-details {
    font-size: 0.75rem;
    color: var(--text-secondary);
}


.btn-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    justify-content: center;
    margin-top: var(--space-3xl);
    padding: var(--space-xl);
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.btn-group-actions {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.nav-hint {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--space-sm);
    font-weight: 500;
}

.nav-hint b {
    color: var(--accent-primary);
}

/* Heater Type Selection */
.heater-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.heater-type-card {
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    cursor: pointer;
    background: var(--bg-primary);
}

.heater-type-card:hover {
    border-color: var(--accent-primary);
}

.heater-type-card.selected {
    border-color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.05);
}

.heater-type-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}

.heater-type-card h4 {
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-size: 1rem;
}

.heater-type-card p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.875rem;
}

/* Lists */
.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-list li {
    padding: var(--space-lg);
    margin-bottom: var(--space-sm);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.item-list li.unconfigured {
    border-left: 4px solid var(--danger);
    background: #fffafa;
}

.item-list li.unconfigured:hover {
    background: #fff5f5;
}


.item-info {
    flex: 1;
}

.item-info h4 {
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    font-size: 1rem;
}

.item-info p {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 0.875rem;
}

.item-actions {
    display: flex;
    gap: var(--space-sm);
}

.item-actions .btn {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    min-width: auto;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: var(--space-sm);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-xl);
}

.modal-footer {
    padding: var(--space-xl);
    border-top: 1px solid var(--border-light);
}

/* Footer */
footer {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: var(--space-xl) 0;
    text-align: center;
    margin-top: var(--space-2xl);
    border-top: 1px solid var(--border-light);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.footer-content a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
}

.footer-content a:hover {
    color: var(--accent-primary);
}

/* File Upload */
.file-upload-area {
    border: 2px dashed var(--border-primary);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    text-align: center;
    cursor: pointer;
    background: var(--bg-primary);
}

.file-upload-area:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}

.file-upload-area.drag-over {
    border-color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.05);
}

/* Status Messages */
.success-message {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(16, 185, 129, 0.2);
    margin-bottom: var(--space-md);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin-bottom: var(--space-md);
}

/* Validation */
.input-error {
    border-color: var(--danger) !important;
}

.error-text {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: var(--space-xs);
}

/* Table */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
}

th, td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

th {
    background: var(--bg-elevated);
    font-weight: 600;
    color: var(--text-primary);
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.stat-item {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: block;
    margin-bottom: var(--space-sm);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Alert */
.alert {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    border: 1px solid;
}

.alert-info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-primary);
    border-color: rgba(37, 99, 235, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.2);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

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

.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation Utilities */
.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out forwards;
}

/* Smooth Transitions */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

a, button, input, select, textarea {
    transition: all 0.2s ease;
}

/* Button Sizes */
.btn-small {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    min-height: 40px;
}

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.125rem;
    min-height: 50px;
}

.btn-fullwidth {
    width: 100%;
    justify-content: center;
}

/* Overview Page Styles */
.summary-section {
    margin-bottom: var(--space-3xl);
}

.summary-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2xl);
    border: 2px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2xl);
}

.summary-card.primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-light) 100%);
    color: var(--text-white);
}

.summary-card.primary h3 {
    color: var(--text-white);
}

.summary-card.primary p {
    color: rgba(255, 255, 255, 0.9);
}

.summary-content {
    flex: 1;
}

.summary-actions {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
    justify-content: flex-end;
}

.statistics-section {
    margin-bottom: var(--space-3xl);
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-lg);
}

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
    transform: translateY(-4px);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: block;
    margin-bottom: var(--space-sm);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.data-section {
    margin-bottom: var(--space-3xl);
}

.data-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.data-section-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.data-card-header {
    background: var(--bg-elevated);
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}

.data-card-header h3 {
    margin: 0;
    flex: 1;
}

.data-content {
    padding: var(--space-lg);
    min-height: 150px;
}

.data-content .empty-state {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: var(--space-lg);
}

.data-content .form-row {
    display: block;
}

.data-content .form-row > div {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}

.data-content .form-row > div:last-child {
    border-bottom: none;
}

.floor-card, .room-card, .heater-card {
    background: var(--bg-elevated);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}

.room-card {
    margin-left: var(--space-md);
}

.heater-card {
    margin-left: var(--space-md);
    font-size: 0.9rem;
}

.file-item {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    padding: var(--space-md);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}

.file-preview {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
}

.file-info strong {
    display: block;
    margin-bottom: var(--space-xs);
}

.edit-section {
    margin-bottom: var(--space-3xl);
}

.edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.edit-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    padding: var(--space-lg);
    transition: all 0.3s ease;
}

.edit-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.export-section {
    margin-bottom: var(--space-3xl);
}

.export-actions {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.danger-section {
    margin-bottom: var(--space-3xl);
}

.danger-card {
    background: rgba(239, 68, 68, 0.05);
    border: 2px solid var(--danger);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-xl);
}

.danger-content {
    flex: 1;
}

.danger-content strong {
    color: var(--danger);
    font-size: 1.125rem;
}

.info-box {
    background: var(--bg-elevated);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-primary);
}

.modal-title {
    margin: 0;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }
    
    .hero-card {
        padding: var(--space-xl);
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: var(--space-lg);
    }
    
    .btn-group {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }
    
    .btn-group .btn {
        width: 100%;
        margin: 0 !important;
    }
    
    .heater-type-grid {
        grid-template-columns: 1fr;
    }
    
    .item-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    
    .item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .summary-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .summary-actions {
        width: 100%;
        justify-content: flex-start;
        flex-direction: column;
    }
    
    .summary-actions .btn {
        width: 100%;
    }
    
    .data-card-container {
        grid-template-columns: 1fr;
    }
    
    .danger-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .danger-card .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        padding: var(--space-lg);
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .edit-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-large {
        padding: var(--space-md);
        font-size: 1rem;
    }
    
    .data-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .hero-card {
        padding: var(--space-lg);
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
    }

    #continueBtn {
        min-width: 0;
        width: 100%;
        font-size: 1.125rem;
    }

    .btn-link {
        text-align: center;
    }
    
    .info-box {
        padding: var(--space-md);
    }
}

/* Hero Card */
.hero-card {
    display: block;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-actions {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

#continueBtn {
    min-width: 250px;
    font-weight: 700;
    font-size: 1.25rem;
}

.btn-link {
    text-decoration: none;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
}

.step-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.step-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto var(--space-md);
}

.step-card h4 {
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.step-card p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

/* Requirements Grid */
.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.requirement-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: all 0.3s ease;
}

.requirement-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.requirement-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    display: block;
}

.requirement-card h4 {
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.requirement-card p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

/* Info Banner */
.info-banner {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid var(--accent-light);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
}

.info-banner h3 {
    color: var(--accent-primary);
    margin-bottom: var(--space-md);
}

.info-banner p {
    color: var(--text-secondary);
    margin: 0;
}

.info-banner a {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Section Spacing */
.section {
    margin-bottom: var(--space-2xl);
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    animation: slideIn 0.3s ease-out;
    max-width: 400px;
}

.notification.success {
    background: #10b981;
    color: white;
    border: 1px solid #059669;
}

.notification.error {
    background: #ef4444;
    color: white;
    border: 1px solid #dc2626;
}

.notification.info {
    background: var(--accent-primary);
    color: white;
    border: 1px solid var(--accent-dark);
}

/* Print Styles */
@media print {
    .btn, .modal, footer {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white;
    }
}

/* Tooltip Styling */
.tooltip-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    margin-left: 4px;
    vertical-align: middle;
    position: relative;
}

.tooltip-icon[title] {
    border-bottom: none;
}

.tooltip-icon:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    font-weight: normal;
    animation: slideIn 0.3s ease-out;
}

.tooltip-icon:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid rgba(0, 0, 0, 0.9);
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
    z-index: 1000;
}
