:root {
    color-scheme: light;
    font-family: Tahoma, Arial, sans-serif;
    background: #f3f6fb;
    color: #182230;
}

* {
    box-sizing: border-box;
}

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

a {
    color: #1858a8;
}

.topbar {
    min-height: 68px;
    padding: 14px clamp(20px, 5vw, 72px);
    color: #fff;
    background: #123f73;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.topbar strong,
.topbar .muted {
    display: block;
}

.topbar .muted {
    margin-top: 5px;
    color: #cbdcf0;
    font-size: .78rem;
}

.topbar nav {
    display: flex;
    gap: 18px;
}

.topbar a {
    color: #fff;
    text-decoration: none;
}

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

.page.wide {
    width: min(1280px, calc(100% - 32px));
}

.narrow {
    max-width: 520px;
}

.card {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(20, 45, 74, .08);
    padding: 30px;
}

.card + .card {
    margin-top: 24px;
}

h1, h2 {
    margin-top: 12px;
}

p {
    line-height: 1.9;
}

.badge {
    display: inline-block;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
}

.success {
    color: #0d6a43;
    background: #e7f7ef;
}

.notice {
    padding: 14px 16px;
    color: #4e5d6c;
    background: #f5f8fc;
    border-right: 4px solid #8eaac8;
    border-radius: 7px;
}

.field {
    margin: 18px 0;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
}

.input,
.select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #bbc8d8;
    border-radius: 8px;
    background: #fff;
    font: inherit;
}

.input:focus,
.select:focus {
    border-color: #3478c8;
    outline: 3px solid rgba(52, 120, 200, .15);
}

.button {
    min-height: 43px;
    padding: 9px 18px;
    color: #fff;
    background: #1767b5;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.button.secondary {
    color: #17324e;
    background: #e8eef5;
}

.button.danger {
    background: #a72a36;
}

.button.compact {
    min-height: 34px;
    padding: 6px 10px;
    font-size: .82rem;
}

.form-actions {
    margin-top: 22px;
}

.message {
    display: block;
    margin: 16px 0;
    padding: 12px 14px;
    border-radius: 7px;
}

.message.error {
    color: #89222d;
    background: #fcebed;
    border: 1px solid #f0c4c9;
}

.message.ok {
    color: #0d6541;
    background: #e8f7ef;
    border: 1px solid #bfe5d2;
}

.muted {
    color: #6a7785;
}

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

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.link-button {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.filters .field {
    margin-bottom: 8px;
}

.filter-actions {
    align-items: center;
    margin: 8px 0 20px;
}

.details-list {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 12px 18px;
    line-height: 1.8;
}

.details-list dt {
    color: #526477;
    font-weight: 700;
}

.details-list dd {
    margin: 0;
}

.approval-code {
    border: 2px solid #d39a22;
}

.code-value {
    display: inline-block;
    padding: 12px 18px;
    color: #172b43;
    background: #fff7dc;
    border: 1px dashed #b37b12;
    border-radius: 8px;
    font-size: 1.35rem;
    letter-spacing: .12em;
    user-select: all;
}

.success-notice {
    border-color: #9fd7bb;
    background: #eefaf4;
}

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

.ltr {
    direction: ltr;
    text-align: left;
}

.checklist {
    padding-right: 22px;
    line-height: 2.1;
}

.grid {
    width: 100%;
    border-collapse: collapse;
}

.grid th,
.grid td {
    padding: 12px 10px;
    text-align: right;
    border-bottom: 1px solid #e1e7ef;
    vertical-align: middle;
}

.grid th {
    color: #405268;
    background: #f5f8fb;
}

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

    .card {
        padding: 22px;
    }

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

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

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

    .details-list {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}
