* {
    box-sizing: border-box;
}

:root {
    --bg: #f2f6fb;
    --bg-soft: #e9f0fb;
    --surface: #ffffff;
    --surface-2: #f8fbff;
    --text: #13263a;
    --muted: #5a6f86;
    --line: #d8e2ef;
    --brand: #0b63ce;
    --brand-2: #0f8c7f;
    --danger: #c23434;
    --ok: #147a3f;
    --star: #ee9e00;
    --shadow: 0 14px 28px rgba(14, 36, 64, 0.08);
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Aptos", "Segoe UI Variable", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at 8% 0%, #dceaff 0%, transparent 36%),
        radial-gradient(circle at 100% 0%, #dff7f1 0%, transparent 30%),
        linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 55%, #f8fbff 100%);
    min-height: 100vh;
}

a {
    color: var(--brand);
    text-decoration: none;
}

.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 18px 30px;
}

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

.hero h1 {
    margin: 0;
    font-size: 1.6rem;
    letter-spacing: 0.2px;
}

.hero p {
    margin: 6px 0 0;
    color: var(--muted);
}

.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.92rem;
}

.chip.primary {
    border-color: #bed6f7;
    background: #eff6ff;
    color: #0b4f9e;
}

.chip.warn {
    border-color: #efc5c5;
    color: #a32a2a;
    background: #fff2f2;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 14px;
}

.card h2,
.card h3 {
    margin: 0 0 8px;
}

.subtle {
    color: var(--muted);
    font-size: 0.94rem;
}

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

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

.metric {
    font-size: 1.8rem;
    margin: 6px 0 0;
    font-weight: 700;
}

.field {
    margin-bottom: 14px;
}

.password-wrap {
    position: relative;
    width: 100%;
}

.password-wrap input {
    padding-right: 42px;
}

.toggle-pass {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--muted);
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.toggle-pass:hover {
    color: var(--brand);
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 7px;
}

input[type="text"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 0.98rem;
    color: var(--text);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

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

.inline > * {
    flex: 1;
}

.inline .fit {
    flex: 0 0 auto;
}

button,
.btn {
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #0b66d4 0%, #0752b5 100%);
    color: #fff;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-block;
}

button:disabled,
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button.danger,
.btn.danger {
    background: linear-gradient(135deg, #d14545 0%, #b62d2d 100%);
}

.btn.light {
    border: 1px solid var(--line);
    color: var(--text);
    background: #fff;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.captcha-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.captcha-image {
    display: block;
    width: 170px;
    height: 54px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
}

.captcha-refresh {
    padding: 9px 12px;
}

.pagination {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.msg {
    border-radius: 12px;
    padding: 11px 12px;
    margin-bottom: 12px;
    border: 1px solid;
}

.msg.ok {
    background: #e9f9ef;
    border-color: #b5e2c2;
    color: var(--ok);
}

.msg.er {
    background: #fdecec;
    border-color: #f0b8b8;
    color: #a62525;
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    text-align: left;
    padding: 10px;
    vertical-align: top;
}

th {
    font-size: 0.9rem;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    color: #34506d;
    background: var(--surface-2);
}

.stars {
    color: var(--star);
    letter-spacing: 1px;
}

.bar-row {
    display: grid;
    grid-template-columns: 95px 1fr 50px;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.bar-track {
    height: 12px;
    background: #e8edf6;
    border-radius: 99px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #ffc557 0%, #f09e00 100%);
}

.radio-list {
    display: grid;
    gap: 9px;
}

.radio-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    background: #fff;
}

.radio-item .stars {
    min-width: 90px;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 450px;
}

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

@media (max-width: 760px) {
    .page {
        padding: 14px 12px 22px;
    }

    .hero h1 {
        font-size: 1.28rem;
    }

    .inline > * {
        flex: 1 1 100%;
    }

    .inline .fit {
        flex: 1 1 100%;
    }

    table {
        min-width: 560px;
    }
}
