/* Variables */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --secondary-dark: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --text-color: #333;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f7fa;
}

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

/* Typography */
h1, h2, h3, h4 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

h1 {
    font-size: 2.2rem;
    text-align: center;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

h3 {
    font-size: 1.4rem;
}

h4 {
    font-size: 1.1rem;
}

p {
    margin-bottom: 15px;
}

small {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Header */
header {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    text-align: center;
    box-shadow: var(--box-shadow);
}

header p {
    color: #666;
    font-size: 1.2rem;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    gap: 30px;
    min-height: 700px;
}

.sidebar {
    flex: 0 0 300px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px 0;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.main-content {
    flex: 1;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    min-height: 700px;
}

/* Navigation */
nav ul {
    list-style: none;
}

nav ul li {
    margin-bottom: 5px;
}

nav ul li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: var(--transition);
}

nav ul li a:hover, nav ul li.active a {
    background-color: #f5f7fa;
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

/* Results Summary */
.results-summary {
    margin-top: 30px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.results-summary h3 {
    color: var(--primary-color);
}

.results-summary ul {
    list-style: none;
    margin-bottom: 20px;
}

.results-summary li {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.results-summary span {
    font-weight: bold;
}

/* Form Sections */
.form-section {
    display: none;
}

.form-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* Grid Layout */
.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.form-card, .chart-card {
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-next {
    background-color: var(--secondary-color);
    color: white;
}

.btn-next:hover {
    background-color: var(--secondary-dark);
}

.btn-back {
    background-color: var(--light-color);
    color: var(--text-color);
}

.btn-back:hover {
    background-color: #ddd;
}

.btn-group {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.center {
    justify-content: center;
    gap: 20px;
}

/* Results Display */
.result {
    margin-top: 25px;
    padding: 20px;
    background-color: white;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.result h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.result p {
    margin-bottom: 10px;
}

.result .value {
    font-weight: bold;
    color: var(--dark-color);
}

.formula {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.formula h4 {
    color: var(--warning-color);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.formula p {
    font-size: 0.9rem;
    font-family: Consolas, Monaco, 'Courier New', monospace;
}

/* Resume Section */
.resume-card {
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
}

.resume-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.resume-item {
    background-color: white;
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.resume-item h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 5px;
}

.resume-item p {
    font-weight: bold;
    font-size: 1.2rem;
}

.resume-chart {
    margin: 30px 0;
    height: 400px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        flex: none;
        width: 100%;
        position: static;
    }
    
    nav ul {
        display: flex;
        flex-wrap: wrap;
    }
    
    nav ul li {
        flex: 1 1 auto;
        min-width: 150px;
    }
    
    nav ul li a {
        text-align: center;
        padding: 10px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    nav ul li a:hover, nav ul li.active a {
        border-left-color: transparent;
        border-bottom-color: var(--primary-color);
    }
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}