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

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

.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo a {
    font-size: 1.5em;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 0.95em;
}

.nav-links a:hover {
    color: #667eea;
}

.pro-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.app-page {
    background: #f5f5f5;
}

.app-container {
    display: grid;
    grid-template-columns: 1fr 1fr 300px;
    gap: 30px;
    padding: 30px 0;
    margin-bottom: 30px;
}

@media (max-width: 1200px) {
    .app-container {
        grid-template-columns: 1fr 1fr;
    }
    .sidebar {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

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

.dashboard {
    display: contents;
}

.inputs-panel,
.metrics-panel,
.pro-panel,
.tips-panel {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.inputs-panel h3,
.metrics-panel h3,
.sidebar h3 {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: #333;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 0.95em;
}

.input-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: all 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.85em;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    margin-top: 15px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85em;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.metric-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.metric-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.metric-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.metric-formula {
    font-size: 0.8em;
    color: #999;
    font-style: italic;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pro-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pro-panel h3 {
    color: white;
}

.pro-panel p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    font-size: 0.95em;
    line-height: 1.6;
}

.tips-panel {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
}

.tips-panel ul li {
    padding: 8px 0;
    line-height: 1.6;
}

.charts-section,
.scenario-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.charts-section h3,
.scenario-section h3 {
    margin-bottom: 20px;
}

.scenario-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.scenario-controls > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scenario-controls label {
    font-weight: 600;
    font-size: 0.9em;
}

.scenario-controls input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
}

.scenario-result {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}
