/* ENERGIES — minimal stylesheet (foundation phase) */
:root {
    --navy: #0B2545;
    --solar: #1E5F9F;
    --sun: #F59E0B;
    --green: #10B981;
    --bg: #f7f8fa;
    --card: #ffffff;
    --line: #e5e7eb;
    --text: #111827;
    --muted: #6b7280;
    --error: #dc2626;
    --error-bg: #fef2f2;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Auth page ---------- */
body.auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, var(--solar) 100%);
    padding: 16px;
}

.card {
    background: var(--card);
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.card h1 {
    margin: 0 0 4px 0;
    color: var(--navy);
    font-size: 28px;
    letter-spacing: -0.02em;
}
.card .muted { color: var(--muted); margin: 0 0 24px 0; }

form label {
    display: block;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}
form input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.15s;
}
form input:focus {
    outline: none;
    border-color: var(--solar);
    box-shadow: 0 0 0 3px rgba(30, 95, 159, 0.15);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: transform 0.05s, box-shadow 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn.primary {
    background: var(--solar);
    color: white;
    width: 100%;
}
.btn.primary:hover { background: var(--navy); }
.btn.ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}
.btn.ghost:hover { background: var(--bg); }

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}
.alert.error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid #fecaca;
}

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--muted);
    font-size: 13px;
}
.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}
.divider span { padding: 0 12px; }

.tg-login {
    display: flex;
    justify-content: center;
    min-height: 50px;
}

.small { font-size: 13px; }

/* ---------- Dashboard ---------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: white;
    border-bottom: 1px solid var(--line);
}
.brand {
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.03em;
}
.topbar nav {
    display: flex;
    align-items: center;
    gap: 16px;
}
.user-chip {
    color: var(--text);
    font-size: 14px;
}
.user-chip small {
    color: var(--muted);
    margin-left: 4px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px;
}
.container h1 {
    margin: 0 0 8px 0;
    color: var(--navy);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}
.card-small {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--line);
}
.card-small h3 {
    margin: 0 0 12px 0;
    color: var(--navy);
    font-size: 16px;
}
.card-small ul {
    margin: 0;
    padding-left: 18px;
    font-size: 14px;
    color: var(--text);
}
.card-small li {
    margin-bottom: 4px;
}
