* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f1419;
    color: #e0e6ed;
}

/* --- Auth page --- */
body.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-card {
    background: #1a2230;
    padding: 2rem 2.5rem;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    width: min(360px, 90vw);
    text-align: center;
}

.auth-card h1 {
    margin: 0 0 1.25rem;
    font-size: 1.25rem;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-card label {
    font-size: 0.85rem;
    text-align: left;
    color: #8a99ad;
}

.auth-card input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.5em;
    background: #0f1419;
    border: 1px solid #2c3a4d;
    border-radius: 4px;
    color: #fff;
}

.auth-card button {
    padding: 0.6rem;
    font-size: 1rem;
    background: #2563eb;
    color: #fff;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.auth-card button:hover { background: #1d4ed8; }

.flash {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0.5rem;
    background: #3a1a1a;
    color: #ffb4b4;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* --- Dashboard --- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: #1a2230;
    border-bottom: 1px solid #2c3a4d;
}

.topbar h1 { margin: 0; font-size: 1.1rem; }
.user-info { font-size: 0.85rem; color: #8a99ad; }
.user-info a { color: #6ea8ff; margin-left: 1rem; text-decoration: none; }
.user-info a:hover { text-decoration: underline; }

main { padding: 1rem 1.25rem; }

.table-status {
    color: #8a99ad;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.table-wrap {
    overflow: auto;
    max-height: calc(100vh - 7rem);
    border: 1px solid #2c3a4d;
    border-radius: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

thead {
    position: sticky;
    top: 0;
    background: #1a2230;
    z-index: 1;
}

th, td {
    padding: 0.4rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid #243042;
    white-space: nowrap;
}

th {
    cursor: pointer;
    user-select: none;
    color: #cfd8e3;
    font-weight: 600;
}

th:hover { background: #243042; }
th .sort-arrow { color: #6ea8ff; margin-left: 0.25rem; }

tbody tr:nth-child(even) { background: #131a24; }
tbody tr:hover { background: #1f2a3a; }

td.numeric { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; text-align: right; }

#filter-row input {
    width: 100%;
    padding: 0.25rem 0.4rem;
    background: #0f1419;
    border: 1px solid #2c3a4d;
    border-radius: 3px;
    color: #e0e6ed;
    font-size: 0.8rem;
}
