/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.icon-large {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #93c5fd;
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
main {
    padding: 1.5rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.app-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Button Styles */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

/* Results Section */
.results-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.status-badge {
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    background-color: #6b7280;
    color: white;
}

.status-badge.profitable {
    background-color: #10b981;
}

.status-badge.loss-making {
    background-color: #ef4444;
}

.summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 0.9rem;
    color: #6b7280;
}

.summary-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e3a8a;
}

.view-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-selector label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.view-selector select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: white;
    font-size: 0.9rem;
    color: #374151;
}

.share-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-pdf {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
}

.btn-pdf:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.result-card {
    background-color: #f9fafb;
    border-radius: 10px;
    padding: 1.25rem;
    border-left: 4px solid #3b82f6;
    transition: transform 0.3s;
}

.result-card.highlight {
    background-color: #eff6ff;
    border-left-color: #1d4ed8;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.1);
}

.result-card:hover {
    transform: translateY(-3px);
}

.result-icon {
    font-size: 1.8rem;
    color: #3b82f6;
    margin-bottom: 0.75rem;
}

.result-card.highlight .result-icon {
    color: #1d4ed8;
}

.result-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 0.25rem;
}

.result-description {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Profit Split Section */
.profit-split {
    background-color: #f8fafc;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.profit-split h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.split-visual {
    display: flex;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
}

.split-owner, .split-operator {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    transition: width 0.5s ease;
}

.split-owner {
    background-color: #1d4ed8;
}

.split-operator {
    background-color: #3b82f6;
}

.split-values {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.split-item {
    display: flex;
    flex-direction: column;
}

.split-label {
    font-size: 0.9rem;
    color: #6b7280;
}

.split-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e3a8a;
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 1.5rem 1rem;
    background-color: #1e293b;
    color: #cbd5e1;
    margin-top: 2rem;
}

footer p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-note {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Tablet Styles */
@media (min-width: 768px) {
    header {
        padding: 2rem 1.5rem;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    main {
        padding: 2rem 1.5rem;
    }
    
    .app-wrapper {
        flex-direction: row;
    }
    
    .input-section {
        flex: 1;
    }
    
    .results-section {
        flex: 1.2;
    }
    
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .button-group {
        flex-direction: row;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .results-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .summary {
        gap: 2rem;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .container {
        max-width: 100%;
    }
    
    header {
        padding: 2.5rem 2rem;
    }
    
    main {
        padding: 2.5rem 2rem;
    }
    
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .results-grid .highlight:nth-child(5) {
        grid-column: span 2;
    }
}

/* Executive Summary */
.executive-summary {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.summary-text {
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
}

/* Scenario Comparison */
.scenario-comparison {
    margin-bottom: 2rem;
}

.scenario-comparison h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scenario-table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scenario-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.9rem;
}

.scenario-table th {
    background: #f8fafc;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.scenario-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.scenario-table tr.current-occupancy {
    background: #eff6ff;
    font-weight: 600;
}

.scenario-table tr:not(.current-occupancy) {
    opacity: 0.7;
}

.scenario-table .ebitda-cell.positive {
    color: #10b981;
    font-weight: 600;
}

.scenario-table .ebitda-cell.negative {
    color: #ef4444;
    font-weight: 600;
}

/* Risk Signals */
.risk-signals {
    margin-bottom: 2rem;
}

.risk-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ebitda-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.ebitda-badge.healthy {
    background: #d1fae5;
    color: #065f46;
}

.ebitda-badge.thin-margins {
    background: #fef3c7;
    color: #92400e;
}

.ebitda-badge.loss-making {
    background: #fee2e2;
    color: #991b1b;
}

.risk-drivers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.risk-chip {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

/* Color-coded result cards */
.result-card.good {
    border-left-color: #10b981;
    background-color: #f0fdf4;
}

.result-card.good .result-icon {
    color: #10b981;
}

.result-card.warning {
    border-left-color: #f59e0b;
    background-color: #fffbeb;
}

.result-card.warning .result-icon {
    color: #f59e0b;
}

.result-card.bad {
    border-left-color: #ef4444;
    background-color: #fef2f2;
}

.result-card.bad .result-icon {
    color: #ef4444;
}
    h1 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 1.25rem;
    }
    
    .card h2 {
        font-size: 1.2rem;
    }
    
    .result-value {
        font-size: 1.3rem;
    }
    
    .split-visual {
        height: 40px;
        font-size: 0.9rem;
    }


/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background-color: #10b981;
}

.notification-info {
    background-color: #3b82f6;
}

.notification-error {
    background-color: #ef4444;
}
