* {
    box-sizing: border-box;
}

:root {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: #172033;
    background: #f5f7fa;
}

body {
    margin: 0;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.login-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border: 1px solid #e5e9f0;
    border-radius: 18px;
    padding: 36px;
    box-shadow: 0 12px 40px rgba(20, 32, 50, 0.08);
}

.logo {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: #172033;
    color: white;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.logo.small {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.login-card h1 {
    margin-bottom: 4px;
}

.muted {
    color: #728096;
}

label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
}

.login-card form {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

input,
select {
    height: 44px;
    padding: 0 12px;
    border: 1px solid #d9e0e9;
    border-radius: 9px;
    background: white;
    outline: none;
}

input:focus,
select:focus {
    border-color: #526b91;
    box-shadow: 0 0 0 3px rgba(82, 107, 145, 0.12);
}

button {
    border: 1px solid #d9e0e9;
    background: white;
    border-radius: 9px;
    padding: 10px 15px;
}

button:disabled {
    opacity: .5;
    cursor: default;
}

.primary {
    background: #172033;
    color: white;
    border-color: #172033;
}

.full {
    width: 100%;
}

.error {
    padding: 12px;
    border-radius: 8px;
    background: #fff1f1;
    color: #b42318;
    font-size: 14px;
}

header {
    height: 70px;
    background: white;
    border-bottom: 1px solid #e5e9f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand .sub {
    font-size: 12px;
    color: #728096;
    margin-top: 2px;
}

.user-box {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}

.link-button {
    border: 0;
    background: transparent;
    color: #526b91;
    padding: 4px;
}

main {
    max-width: 1500px;
    margin: 0 auto;
    padding: 32px;
}

.page-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title h1 {
    margin: 0;
}

.page-title p {
    margin: 6px 0 0;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px;
    background: white;
    border: 1px solid #e5e9f0;
    border-radius: 12px;
}

.filters label {
    min-width: 220px;
}

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

.stat-card {
    background: white;
    border: 1px solid #e5e9f0;
    border-radius: 12px;
    padding: 20px;
}

.stat-card span {
    color: #728096;
    font-size: 13px;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 26px;
}

.table-card {
    background: white;
    border: 1px solid #e5e9f0;
    border-radius: 12px;
    overflow: hidden;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    text-align: left;
    color: #728096;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    background: #fafbfc;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid #edf0f4;
    white-space: nowrap;
}

tbody tr:hover {
    background: #fafbfc;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    background: #eef2f6;
}

.badge.ok {
    background: #eaf8ef;
    color: #1d713c;
}

.badge.no {
    background: #f1f3f5;
    color: #8491a3;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
}

.message {
    margin: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #eef5ff;
    color: #24558d;
}

.message.error-message {
    background: #fff1f1;
    color: #b42318;
}

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

    header {
        padding: 0 18px;
    }

    main {
        padding: 20px 14px;
    }

    .page-title {
        align-items: flex-start;
        gap: 16px;
    }
}

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

    .page-title {
        flex-direction: column;
    }

    .page-title button {
        width: 100%;
    }

    .user-box span {
        display: none;
    }
}
