* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: #090d14;
    color: #f4f7fb;
}

body {
    min-height: 100vh;
}

.login-wrapper,
.error-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(
            circle at top,
            #17223b 0,
            transparent 38%
        ),
        #090d14;
}

.login-card {
    width: min(100%, 430px);
    padding: 34px;
    border: 1px solid #263249;
    border-radius: 20px;
    background: #111722;
    box-shadow:
        0 24px 80px
        rgba(0, 0, 0, 0.35);
}

.wide-card {
    width: min(100%, 540px);
}

.brand {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 28px;
}

.brand h1 {
    margin: 0;
    font-size: 25px;
}

.brand p {
    margin: 3px 0 0;
    color: #98a5b8;
}

.brand-badge {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #2f67ff;
    font-weight: 800;
}

label {
    display: block;
    margin: 18px 0 8px;
    font-size: 14px;
    color: #bac4d3;
}

input,
select {
    width: 100%;
    border: 1px solid #303b50;
    border-radius: 10px;
    padding: 13px 14px;
    background: #0a0f17;
    color: white;
    outline: none;
}

input:focus,
select:focus {
    border-color: #5280ff;
}

button,
.button-link,
.small-button {
    border: 0;
    border-radius: 10px;
    background: #356cff;
    color: white;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

button,
.button-link {
    width: 100%;
    margin-top: 22px;
    padding: 13px 16px;
    display: inline-block;
}

.small-button {
    padding: 11px 16px;
}

button:hover,
.button-link:hover,
.small-button:hover {
    filter: brightness(1.08);
}

.alert {
    padding: 12px 14px;
    margin-bottom: 18px;
    border: 1px solid #7a3232;
    border-radius: 10px;
    background: #35191b;
    color: #ffb7b7;
}

.success-alert {
    border-color: #286644;
    background: #153724;
    color: #9cf2be;
}

.info-box {
    margin-top: 20px;
    padding: 14px;
    border-radius: 10px;
    background: #192231;
    color: #aebbd0;
    line-height: 1.5;
}

.layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px 1fr;
}

.sidebar {
    display: flex;
    flex-direction: column;
    padding: 25px 18px;
    border-right: 1px solid #202a3a;
    background: #0c1119;
}

.sidebar-brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 0 12px 28px;
}

.sidebar-brand strong {
    font-size: 22px;
}

.sidebar-brand span {
    color: #8996a9;
}

.sidebar nav {
    display: grid;
    gap: 5px;
}

.sidebar nav a,
.sidebar nav span {
    padding: 11px 12px;
    border-radius: 9px;
    color: #aab5c6;
    text-decoration: none;
}

.sidebar nav .active {
    background: #172136;
    color: #fff;
}

.sidebar nav .disabled {
    opacity: 0.4;
}

.nav-divider {
    height: 1px;
    margin: 12px 0;
    background: #202a3a;
}

.sidebar form {
    margin-top: auto;
}

.logout-button {
    background: #252e3d;
}

.content {
    padding: 30px;
}

.narrow-content {
    max-width: 900px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.topbar h1 {
    margin: 0;
}

.topbar p {
    margin: 5px 0 0;
    color: #8f9caf;
}

.user-box {
    text-align: right;
}

.user-box strong,
.user-box span {
    display: block;
}

.user-box span {
    margin-top: 3px;
    color: #8592a6;
    text-transform: capitalize;
}

.welcome-card,
.card,
.panel {
    border: 1px solid #232e40;
    border-radius: 16px;
    background: #111722;
}

.welcome-card {
    padding: 28px;
}

.welcome-card h2 {
    margin: 18px 0 8px;
}

.welcome-card p {
    margin: 0;
    color: #9ba8ba;
}

.status-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    margin-right: 6px;
    border-radius: 50%;
    background: #4bd37b;
}

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

.card {
    padding: 22px;
}

.card span,
.card strong,
.card small {
    display: block;
}

.card span {
    color: #95a2b5;
}

.card strong {
    margin: 12px 0;
    font-size: 28px;
}

.card small {
    color: #748197;
}

.panel {
    padding: 20px;
}

.form-panel {
    max-width: 650px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid #253044;
    text-align: left;
    white-space: nowrap;
}

th {
    color: #8491a6;
    font-size: 13px;
    font-weight: 600;
}

td {
    color: #d5dce7;
    font-size: 14px;
}

tbody tr:hover {
    background: #141c29;
}

.table-link {
    color: #79a0ff;
    text-decoration: none;
}

.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: #263249;
    font-size: 12px;
}

.badge.success {
    background: #173d29;
    color: #8ee9af;
}

.badge.danger {
    background: #472122;
    color: #ff9f9f;
}

.badge.warning {
    background: #493918;
    color: #ffd982;
}

.warning-button {
    background: #8a5d18;
}

.secondary-link {
    display: block;
    margin-top: 18px;
    color: #8fa9de;
    text-decoration: none;
    text-align: center;
}

.form-divider {
    height: 1px;
    margin: 28px 0 8px;
    background: #283348;
}

.password-result {
    display: grid;
    gap: 8px;
}

.password-result span {
    margin-top: 12px;
    color: #93a1b5;
    font-size: 13px;
}

.password-result strong {
    font-size: 20px;
}

.password-result code {
    display: block;
    padding: 14px;
    border-radius: 10px;
    background: #080d14;
    border: 1px solid #303b50;
    color: #a9c2ff;
    font-size: 18px;
    word-break: break-all;
}

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

    .sidebar {
        display: none;
    }

    .cards {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}

@media (max-width: 560px) {
    .content {
        padding: 18px;
    }

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

    .user-box {
        text-align: left;
    }

    .cards {
        grid-template-columns: 1fr;
    }
}
