/* ENKOMOS-Power Tier A - Mobile First Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #0a3d2f 0%, #0a2f24 100%);
    color: #1a2a2a;
    line-height: 1.5;
    min-height: 100vh;
    padding: 16px;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    background: #f5f7f0;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* Header */
header {
    background: linear-gradient(135deg, #0d5c46 0%, #0a3d2f 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    font-size: 1.6rem;
}

.logo .power {
    font-weight: 300;
}

.logo .tier {
    background: #ffd700;
    color: #0a3d2f;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.online-status {
    font-size: 0.75rem;
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.online-status i {
    font-size: 0.6rem;
    color: #4ade80;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 8px 24px;
    background: white;
}

.progress-step {
    width: 36px;
    height: 36px;
    background: #e0e5dc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #6b7280;
    transition: all 0.3s;
    z-index: 1;
    position: relative;
}

.progress-step.active {
    background: #0d5c46;
    color: white;
    box-shadow: 0 0 0 3px rgba(13,92,70,0.3);
}

.progress-step.completed {
    background: #0d5c46;
    color: white;
}

.progress-line {
    flex: 1;
    height: 3px;
    background: #e0e5dc;
    margin: 0 4px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 20px 16px 20px;
    font-size: 0.7rem;
    color: #6b7280;
    background: white;
}

/* Save/Load Bar */
.save-bar {
    background: white;
    padding: 12px 20px;
    display: flex;
    gap: 12px;
    border-bottom: 1px solid #e0e5dc;
    flex-wrap: wrap;
}

.save-btn, .load-btn {
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.save-btn {
    background: #0d5c46;
    color: white;
}

.load-btn {
    background: #e0e5dc;
    color: #1a2a2a;
}

.save-status {
    font-size: 0.7rem;
    color: #0d5c46;
    display: flex;
    align-items: center;
    margin-left: auto;
}

/* Form Steps */
.form-step {
    display: none;
    padding: 24px;
    background: #f5f7f0;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

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

h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #0a3d2f;
    display: flex;
    align-items: center;
    gap: 10px;
}

h2 i {
    font-size: 1.4rem;
}

h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #0a3d2f;
    padding-bottom: 6px;
    border-bottom: 2px solid #d1d9c6;
}

.step-hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 20px;
}

/* Cards */
.card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section-label {
    font-weight: 600;
    display: block;
    margin-bottom: 12px;
    color: #1a2a2a;
    font-size: 0.9rem;
}

.optional {
    font-size: 0.7rem;
    font-weight: normal;
    color: #6b7280;
}

/* Tier Selector */
.tier-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tier-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #e0e5dc;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.tier-option input {
    width: 20px;
    height: 20px;
    accent-color: #0d5c46;
}

.tier-option span {
    font-weight: 600;
    min-width: 120px;
}

.tier-option small {
    font-size: 0.7rem;
    color: #6b7280;
}

.tier-option:has(input:checked) {
    border-color: #0d5c46;
    background: #f0f9f5;
}

/* Checkbox Groups */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
    accent-color: #0d5c46;
}

/* Slider */
.slider-container {
    padding: 10px 0;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: #e0e5dc;
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #0d5c46;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.7rem;
    color: #6b7280;
}

/* Size Selector */
.size-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.size-dropdown {
    flex: 2;
    padding: 12px;
    border: 2px solid #e0e5dc;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    background: white;
}

.size-selector input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e5dc;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
}

/* Toggle Group */
.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toggle-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    cursor: pointer;
}

/* Component Rows */
.component-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 10px;
}

.component-row span {
    font-size: 0.85rem;
    font-weight: 500;
}

.component-choice {
    display: flex;
    gap: 12px;
}

.component-choice label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

/* Backup Selector */
.backup-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.backup-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #e0e5dc;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.backup-option input {
    width: 18px;
    height: 18px;
    accent-color: #0d5c46;
}

.backup-option span {
    font-weight: 600;
    min-width: 120px;
}

.backup-option small {
    font-size: 0.7rem;
    color: #6b7280;
}

.backup-option:has(input:checked) {
    border-color: #0d5c46;
    background: #f0f9f5;
}

/* Form Groups */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: #1a2a2a;
}

.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e5dc;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    background: white;
}

/* Info Box */
.info-box {
    background: #e8f4f0;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #0a3d2f;
    margin-top: 12px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.info-box i {
    margin-top: 2px;
}

/* Roadmap */
.roadmap-visual {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    gap: 8px;
}

.roadmap-item {
    background: #e8f4f0;
    padding: 12px 8px;
    border-radius: 12px;
    flex: 1;
    font-size: 0.7rem;
    font-weight: 600;
}

.roadmap-item small {
    font-weight: normal;
    font-size: 0.6rem;
    display: block;
    margin-top: 4px;
}

.roadmap-arrow {
    font-size: 1.2rem;
    color: #0d5c46;
}

/* Buttons */
.btn-next, .btn-prev, #calculateBtn, #downloadReportBtn, #newCalculationBtn, #shareReportBtn {
    padding: 14px 24px;
    border: none;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-next {
    background: #0d5c46;
    color: white;
    width: 100%;
    margin-top: 8px;
}

.btn-next:hover {
    background: #0a4a38;
    transform: scale(0.98);
}

.btn-prev {
    background: #e0e5dc;
    color: #1a2a2a;
}

.button-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.button-group button {
    flex: 1;
}

#calculateBtn {
    background: #0d5c46;
    color: white;
    flex: 1;
}

#downloadReportBtn {
    background: #1a2a2a;
    color: white;
}

#shareReportBtn {
    background: #3b82f6;
    color: white;
}

#newCalculationBtn {
    background: #e0e5dc;
    color: #1a2a2a;
}

/* Report Section */
#reportSection {
    padding: 24px;
    background: white;
    border-top: 2px solid #e0e5dc;
    animation: slideUp 0.4s ease;
}

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

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.report-header h2 {
    margin-bottom: 0;
}

.report-badge {
    background: #0d5c46;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

#reportContent {
    background: #f5f7f0;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    line-height: 1.6;
    overflow-x: auto;
}

.report-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.qr-placeholder {
    background: #e0e5dc;
    padding: 16px;
    text-align: center;
    border-radius: 16px;
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-direction: column;
}

.qr-placeholder i {
    font-size: 1.2rem;
}

/* Footer */
footer {
    background: #1a2a2a;
    color: #9ca3af;
    text-align: center;
    padding: 20px;
    font-size: 0.7rem;
}

footer .version {
    margin-top: 6px;
    font-size: 0.6rem;
}

footer .copyright {
    margin-top: 8px;
    font-size: 0.55rem;
}

/* Utility Classes */
.info-text {
    display: block;
    margin-top: 8px;
    font-size: 0.7rem;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    
    .form-step {
        padding: 16px;
    }
    
    .card {
        padding: 16px;
    }
    
    .component-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .roadmap-visual {
        flex-direction: column;
    }
    
    .roadmap-arrow {
        transform: rotate(90deg);
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .report-actions {
        flex-direction: column;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    .app-container {
        max-width: 100%;
        border-radius: 0;
    }
    .progress-bar, .progress-labels, .button-group, .report-actions, footer, header, .qr-placeholder, .save-bar {
        display: none;
    }
    #reportSection {
        display: block !important;
        padding: 0;
    }
}
