/* ==========================================================================
   BÉ HỌC VUI - CSS NỀN TẢNG
   File này chỉ chứa style dùng chung.
   ========================================================================== */

* {
    box-sizing: border-box;
}

html {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

body {
    margin: 0;
    background: #f6f7fb;
    color: #202431;
}

a {
    color: inherit;
}

input,
button {
    font: inherit;
}

input {
    width: 100%;
    padding: 12px 14px;
    margin: 6px 0 16px;
    border: 1px solid #ccd2dc;
    border-radius: 10px;
    background: #fff;
}

button {
    cursor: pointer;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid #cfd5df;
    border-radius: 10px;
    background: #fff;
    color: #202431;
    text-decoration: none;
}

.button-primary {
    width: 100%;
    border-color: #202431;
    background: #202431;
    color: #fff;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(100%, 420px);
    padding: 28px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 36px rgba(24, 32, 55, 0.08);
}

.auth-card h1 {
    margin-top: 0;
}

.muted {
    color: #687083;
}

.alert {
    padding: 12px 14px;
    margin: 16px 0;
    border-radius: 10px;
}

.alert-error {
    background: #fff0f0;
    color: #8c1f1f;
}

.alert-success {
    background: #edf9f1;
    color: #17683a;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 22px;
    background: #fff;
    border-bottom: 1px solid #e5e8ee;
}

.topbar form {
    margin: 0;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat-card,
.panel {
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e8ee;
    border-radius: 16px;
}

.stat-card strong {
    display: block;
    font-size: 28px;
}

.stat-card span {
    color: #687083;
}

.panel {
    margin-top: 20px;
}

@media (max-width: 760px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar {
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
