* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", sans-serif;
    background: linear-gradient(180deg, #f6f8fb 0%, #eef2f7 100%);
    color: #18212f;
}

a {
    color: #1769aa;
    text-decoration: none;
}

.layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

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

.topbar h1,
.topbar h2,
.card h2,
.card h3 {
    margin: 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.card {
    background: #ffffff;
    border: 1px solid #d9e2ee;
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(15, 29, 53, 0.06);
    padding: 20px;
}

.wide {
    grid-column: 1 / -1;
}

.label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.input,
.select,
.textarea {
    width: 100%;
    border: 1px solid #c7d4e4;
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    background: #fbfdff;
}

.textarea {
    min-height: 110px;
    resize: vertical;
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.button {
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    background: #1769aa;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
}

.button.secondary {
    background: #edf3fb;
    color: #0f3d63;
}

.muted {
    color: #556273;
    font-size: 13px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #edf6ee;
    color: #177245;
    font-size: 12px;
    font-weight: 700;
}

.badge.warn {
    background: #fff3db;
    color: #b26a00;
}

.badge.danger {
    background: #fdecea;
    color: #9f2f27;
}

.flash {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.flash.success {
    background: #edf8ef;
    border-color: #b4dfbe;
    color: #0e6b2d;
}

.flash.error {
    background: #fdecec;
    border-color: #f1b6b1;
    color: #8f1f13;
}

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

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

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid #e6edf5;
    text-align: left;
    vertical-align: top;
}

th {
    color: #58677a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.code-box {
    width: 100%;
    min-height: 220px;
    padding: 12px;
    border-radius: 14px;
    border: 1px dashed #b9c9dc;
    background: #f8fbff;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
}

.inline-form {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

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

.login-card {
    width: min(420px, 100%);
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

@media (max-width: 900px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}
