/* BroCalc — custom overrides pro Pico CSS dark theme */

:root {
    --bc-accent: #4fc3f7;
    --bc-green: #66bb6a;
    --bc-red: #ef5350;
    --bc-yellow: #ffa726;
    --bc-muted: #9e9e9e;
}

/* Layout */
body > nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--pico-background-color);
    border-bottom: 1px solid var(--pico-muted-border-color);
}

main.container {
    padding-top: 1rem;
    padding-bottom: 2rem;
}

/* Cards grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
}

.card h3 {
    font-size: 0.8rem;
    color: var(--bc-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card .value {
    font-size: 1.5rem;
    font-weight: 600;
}

.card .value.positive { color: var(--bc-green); }
.card .value.negative { color: var(--bc-red); }
.card .value.accent { color: var(--bc-accent); }

/* Status badges */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-running { background: var(--bc-green); color: #000; }
.badge-stopped { background: var(--bc-red); color: #fff; }
.badge-pending { background: var(--bc-yellow); color: #000; }
.badge-active { background: var(--bc-green); color: #000; }
.badge-none { background: var(--bc-muted); color: #fff; }
.badge-error { background: var(--bc-red); color: #fff; }
.badge-monitor { background: var(--bc-yellow); color: #000; }
.badge-provisioning { background: var(--bc-accent); color: #000; }

/* Tables */
table {
    font-size: 0.9rem;
}

/* Flash messages */
.flash {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.flash-success { background: rgba(102, 187, 106, 0.15); border: 1px solid var(--bc-green); color: var(--bc-green); }
.flash-error { background: rgba(239, 83, 80, 0.15); border: 1px solid var(--bc-red); color: var(--bc-red); }
.flash-warning { background: rgba(255, 167, 38, 0.15); border: 1px solid var(--bc-yellow); color: var(--bc-yellow); }

/* Equity chart */
.equity-chart {
    width: 100%;
    height: auto;
    margin: 1rem 0;
}

.equity-chart .chart-line {
    fill: none;
    stroke: var(--bc-accent);
    stroke-width: 2;
}

.equity-chart .grid-line {
    stroke: var(--pico-muted-border-color);
    stroke-width: 0.5;
    stroke-dasharray: 4 4;
}

.equity-chart .label {
    fill: var(--bc-muted);
    font-size: 11px;
    font-family: inherit;
}

/* HTMX loading indicator */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    opacity: 1;
}

/* Section spacing */
section {
    margin-bottom: 2rem;
}

section h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
    padding-bottom: 0.25rem;
}

/* Nav active state */
nav a[aria-current="page"] {
    color: var(--bc-accent);
    font-weight: 600;
}

/* Auth forms */
.auth-container {
    max-width: 400px;
    margin: 3rem auto;
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Inline actions (buttons in table rows) */
.actions {
    display: flex;
    gap: 0.5rem;
}

.actions button, .actions a {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    margin: 0;
}

/* Period selector */
.period-selector {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.period-selector button {
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
}

.period-selector button[aria-current="true"] {
    background: var(--bc-accent);
    color: #000;
}
