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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    border-bottom: 4px solid #2980b9;
}

.header h1 {
    font-size: 2.2em;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.header p {
    font-size: 1em;
    opacity: 0.95;
    font-weight: 400;
}

.content {
    padding: 30px;
}

.section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    border-left: 4px solid #2980b9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.6em;
    font-weight: 600;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

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

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

.input-group input[type="text"],
.input-group input[type="number"],
.input-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.1);
}

.input-group textarea {
    min-height: 80px;
    resize: vertical;
}

.slider-container {
    margin-top: 10px;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2980b9;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2980b9;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.slider-value {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
}

.current-value {
    font-weight: 700;
    color: #2980b9;
    font-size: 1.1em;
}

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

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

.info-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-top: 3px solid #2980b9;
}

.info-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-card .value {
    font-size: 2em;
    font-weight: 700;
    color: #333;
}

.info-card .subtext {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.positive {
    color: #28a745;
}

.negative {
    color: #dc3545;
}

.warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.warning strong {
    color: #856404;
}

.button {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(41, 128, 185, 0.3);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.4);
}

.button:active {
    transform: translateY(0);
}

.timeline {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.timeline-item {
    padding: 15px;
    border-left: 3px solid #2980b9;
    margin-bottom: 15px;
    margin-left: 20px;
    background: #f8f9fa;
    border-radius: 4px;
}

.timeline-item h4 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: #2c3e50;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

tr:hover {
    background: #f8f9fa;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
    }

    .button {
        display: none;
    }

    .no-print {
        display: none;
    }

    .print-only {
        display: block !important;
    }

    /* Prevent page breaks inside elements */
    .section, .info-card, .timeline, table, .grid-2, .grid-3, .note, .warning {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* Prevent orphaned headers */
    h2, h3, h4 {
        page-break-after: avoid;
        break-after: avoid;
    }

    /* Keep tables together */
    table {
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }

    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    /* Add page break before major sections for cleaner layout */
    .section {
        page-break-before: auto;
    }

    /* Ensure first section doesn't break */
    .section:first-of-type {
        page-break-before: avoid;
    }

    .hide-on-print {
        display: none !important;
    }
}

@media (max-width: 768px) {
    body {
        padding: 8px;
    }

    .content {
        padding: 12px;
    }

    .section {
        padding: 15px;
        margin-bottom: 15px;
    }

    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }

    .header {
        padding: 25px 15px;
    }

    .header h1 {
        font-size: 1.8em;
    }
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    color: #2980b9;
    margin-left: 5px;
    font-weight: 600;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 1000;
    font-size: 0.85em;
}

.note {
    background: #e7f3ff;
    border-left: 4px solid #2196F3;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 0.95em;
}
