:root {
    color-scheme: light;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f4f7fb;
    color: #212121;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
}

.app-shell {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f7fb;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 18px 60px rgba(20, 40, 80, 0.08);
}

.auth-card h1 {
    margin: 0 0 20px;
    font-size: 1.9rem;
}

.auth-card label {
    display: block;
    margin-bottom: 16px;
    color: #333;
    font-size: 0.95rem;
}

.auth-card input {
    width: 100%;
    border: 1px solid #cfd8df;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    margin-top: 8px;
}

.auth-card .note {
    margin-top: 16px;
    color: #6a6a6a;
    font-size: 0.9rem;
}

.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.alert.error {
    background: #ffe6e6;
    color: #921f1f;
    border: 1px solid #f1c2c2;
}

.alert.success {
    background: #e8f8ef;
    color: #1d6f3a;
    border: 1px solid #c5e5cc;
}

header {
    margin-bottom: 24px;
}

header h1 {
    margin: 0 0 10px;
    font-size: 2rem;
}

header p {
    margin: 0;
    color: #555;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.top-actions .user-greeting {
    font-weight: 600;
    margin-right: auto;
}

button,
a.button {
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    background: #1b6cff;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button.secondary,
a.button.secondary {
    background: #f2f4f7;
    color: #242424;
}

.status-message {
    color: #334155;
    margin-top: 12px;
    font-size: 0.95rem;
}

.filters-panel {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 24px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.filter-row label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.9rem;
    color: #333;
}

.filter-row input,
.settings-form input,
.settings-form select {
    border: 1px solid #cfd8df;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.95rem;
    width: 100%;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 20px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.summary-card strong {
    font-size: 2rem;
    display: block;
}

.summary-card span {
    color: #6a6a6a;
}

.data-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
}

.table-card,
.stat-block {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 18px;
    padding: 20px;
}

.table-card h2,
.stat-block h3 {
    margin-top: 0;
    font-size: 1.1rem;
}

.table-scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #e6ecf2;
    color: #333;
}

tbody td {
    padding: 12px 10px;
    border-bottom: 1px solid #f1f4f8;
    font-size: 0.95rem;
}

.stat-block ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.stat-block li {
    padding: 8px 0;
    border-bottom: 1px solid #f2f5f9;
}

.stat-block li:last-child {
    border-bottom: none;
}

.settings-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.settings-form {
    display: grid;
    gap: 16px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 940px) {
    .data-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .filter-row {
        grid-template-columns: 1fr;
    }
}
