* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #1F1F1F;
    color: #f5f5f5;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px;
}

.page-shell.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 16px;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.brand-logo {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.03em;
}

.top-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.top-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    transition: background .2s ease, color .2s ease;
    color: #475569;
}

.top-nav a:hover,
.top-nav a.active {
    background: rgba(167,50,94,0.16);
    color: #A7325E;
}

.user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    background: #A7325E;
    color: white;
    cursor: pointer;
}

.button-ghost {
    background: rgba(167,50,94,0.12);
    color: #A7325E;
}

.panel {
    background: #181818;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    margin-bottom: 24px;
}

.panel-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #f5f5f5;
}

.status-panel .panel-footer {
    margin-top: 22px;
    color: #64748b;
    font-size: 14px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.status-card {
    border-radius: 24px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
    color: white;
}

.status-card .status-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.status-card .status-label {
    font-size: 14px;
    opacity: 0.85;
}

.status-card.orange {
    background: linear-gradient(135deg, #fb923c, #f97316);
}

.status-card.blue {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

.status-card.green {
    background: linear-gradient(135deg, #34d399, #10b981);
}

.status-card.brown {
    background: linear-gradient(135deg, #a16207, #92400e);
}

.status-card.pump {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.chart-shell {
    width: 100%;
    min-height: 320px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

thead th {
    text-align: left;
    padding: 14px 18px;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #1f2937;
}

tbody tr:hover {
    background: #f8fafc;
}

.auth-card {
    width: min(480px, 100%);
    background: #181818;
    border-radius: 28px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: #1e3a8a;
    color: white;
    font-size: 24px;
    font-weight: 700;
}

.auth-card h1 {
    margin: 0;
    font-size: 24px;
}

.auth-card p {
    margin: 4px 0 0;
    color: #64748b;
}

.auth-form label {
    display: block;
    margin-bottom: 18px;
    font-size: 14px;
    color: #475569;
}

..auth-form input,
.settings-form input {
    width: 100%;
    border: 1px solid #333333;
    background: #101010;
    color: #f5f5f5;
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 8px;
    font-size: 15px;
}

.auth-form button,
.settings-form button {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 14px 16px;
    background: #A7325E;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.auth-note {
    margin-top: 22px;
    color: #94a3b8;
    font-size: 14px;
}

.alert {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    color: #f8f8f8;
}

.alert-error {
    background: #7c1f3f;
}

.alert-success {
    background: #26532f;
}

.settings-form label {
    display: block;
    margin-bottom: 18px;
    font-size: 14px;
    color: #cbd5e1;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .page-shell {
        padding: 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .top-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .status-card {
        min-height: 140px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    table {
        min-width: 100%;
    }
}

@media (max-width: 500px) {
    .status-card {
        border-radius: 20px;
        padding: 18px;
    }

    .top-nav a,
    .button {
        width: 100%;
        justify-content: center;
    }

    .user-row {
        justify-content: space-between;
    }
}
