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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0d1117;
    color: #c9d1d9;
    line-height: 1.6;
}

.container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 1.5rem 2.5rem;
}

header {
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.8rem;
    color: #f0f6fc;
    margin-bottom: 0.25rem;
}

header p {
    color: #8b949e;
}

form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group:first-child {
    flex: 1;
}

label {
    font-size: 0.85rem;
    color: #8b949e;
}

input[type="text"], select {
    padding: 0.6rem 0.8rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #c9d1d9;
    font-size: 0.95rem;
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: #58a6ff;
}

input[type="text"] {
    min-width: 400px;
}

button[type="submit"] {
    padding: 0.6rem 1.5rem;
    background: #238636;
    color: #fff;
    border: 1px solid #2ea043;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
}

button[type="submit"]:hover {
    background: #2ea043;
}

button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#results {
    margin-top: 1rem;
}

/* Progress indicator */
.progress {
    padding: 1.5rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
}

.progress-step {
    padding: 0.3rem 0;
    color: #8b949e;
}

.progress-step.active {
    color: #58a6ff;
}

.progress-step.done {
    color: #3fb950;
}

/* Metrics table */
.metrics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.metrics-table th,
.metrics-table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #21262d;
    text-align: right;
}

.metrics-table th {
    text-align: left;
    color: #8b949e;
    font-weight: 500;
}

.metrics-table td:first-child {
    text-align: left;
}

.positive { color: #3fb950; }
.negative { color: #f85149; }

/* Report layout */
.report {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 1.5rem;
}

.report-charts {
    min-width: 0;
}

.report-sidebar {
    min-width: 0;
}

.chart-container {
    margin-bottom: 1.5rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 0.5rem;
}

.metric-headline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.metric-card .value {
    font-size: 1.6rem;
    font-weight: 600;
    color: #f0f6fc;
}

.metric-card .label {
    font-size: 0.8rem;
    color: #8b949e;
    margin-top: 0.25rem;
}

/* Date range picker */
.date-range {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
}

.date-range label {
    font-size: 0.85rem;
}

.date-range input[type="date"] {
    padding: 0.4rem 0.6rem;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 4px;
    color: #c9d1d9;
    font-size: 0.85rem;
}

.date-range button {
    padding: 0.4rem 0.8rem;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 4px;
    color: #c9d1d9;
    font-size: 0.85rem;
    cursor: pointer;
}

.date-range button:hover {
    background: #30363d;
}

section h3 {
    font-size: 1rem;
    color: #f0f6fc;
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #21262d;
}

.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}
