:root {
    color-scheme: light;
    font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
    color: #192d3b;
    background: #f4f7f8;
    font-size: 15px;
    line-height: 1.6;
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p, form { margin: 0; }
:focus-visible { outline: 3px solid #3e94c1; outline-offset: 3px; }
.topbar { background: #1d3342; color: #fff; }
.bar-inner, .workspace { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.bar-inner, .brand, .account-actions, .heading, .inline { display: flex; align-items: center; }
.bar-inner { min-height: 64px; justify-content: space-between; gap: 16px; }
.brand { gap: 12px; font-size: 17px; font-weight: 650; letter-spacing: .02em; }
.brand-sign { display: inline-flex; align-items: flex-end; gap: 3px; }
.brand-sign i { display: block; width: 5px; height: 9px; border-radius: 1px; background: #8fdbcf; }
.brand-sign i:nth-child(2) { height: 19px; }
.brand-sign i:last-child { height: 13px; }
.account-actions { gap: 18px; font-size: 13px; }
.scope { color: #d0dfe7; }
.workspace { padding: clamp(26px, 4vw, 52px) 0 64px; }
.heading { gap: 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
h1 { font-size: clamp(24px, 3vw, 32px); line-height: 1.3; letter-spacing: -.035em; }
h2 { font-size: 17px; line-height: 1.45; }
.tenant-name, .muted, .empty, .settings-body p, .quota-stat { color: #526776; }
.tenant-name { font-size: 13px; margin-bottom: 4px; }
.quota-stat { margin: 0; white-space: nowrap; }
.quota-stat strong { font-size: 24px; color: #16665f; font-variant-numeric: tabular-nums; }
.card, .login-card { overflow-wrap: anywhere; background: #fff; border: 1px solid #d2dde1; border-radius: 10px; }
.card { margin-bottom: 22px; padding: 23px 24px; }
.card h2 { margin-bottom: 18px; }
.count { font-size: 13px; color: #526776; font-weight: 500; margin-left: 5px; }
label { display: grid; gap: 6px; color: #314756; font-weight: 600; font-size: 14px; }
input, button { font: inherit; }
input { width: 100%; min-width: 0; height: 41px; padding: 6px 10px; border: 1px solid #a9bac4; border-radius: 5px; background: #fff; color: #172b39; }
input::placeholder { color: #677b88; font-size: 13px; }
input:focus { border-color: #227a72; }
input[readonly] { background: #f3f6f7; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
button { display: inline-flex; align-items: center; justify-content: center; min-height: 41px; padding: 7px 15px; border-radius: 5px; border: 1px solid transparent; cursor: pointer; font-size: 14px; font-weight: 650; white-space: nowrap; }
button:active { transform: translateY(1px); }
.primary { background: #13685e; color: #fff; }
.primary:hover { background: #0d554c; }
.secondary { color: #234554; border-color: #b9c9d0; background: #f7fafb; }
.secondary:hover { background: #eaf1f4; border-color: #89a0ad; }
.small { min-height: 32px; padding: 4px 9px; font-size: 13px; }
.quiet { background: transparent; color: #fff; border-color: #748793; font-size: 13px; min-height: 30px; }
.quiet:hover { background: #304a5b; }
.danger { color: #8d2e24; background: #fff; border-color: #c2847f; }
.danger:hover { background: #fbf0ec; }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(85px, .65fr) auto; align-items: end; gap: 14px; }
.create-fields { grid-template-columns: repeat(3,minmax(110px,1fr)) minmax(85px,.65fr) minmax(175px,1.2fr) auto; }
.account-fields { grid-template-columns: minmax(145px, .8fr) minmax(180px, 1fr) auto; max-width: 810px; }
.credentials { grid-template-columns: repeat(3, minmax(120px, 1fr)) auto; }
.list-card { padding: 0; }
.list-card h2 { padding: 19px 24px 15px; margin: 0; }
.table-wrap { width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 14px; }
th, td { padding: 12px 16px; border-top: 1px solid #e0e7ea; vertical-align: top; text-align: left; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
thead th { background: #f5f8f9; color: #536673; font-size: 13px; white-space: nowrap; }
tbody th { font-weight: 600; }
.number, code { font-variant-numeric: tabular-nums; }
code { font: 13px/1.5 ui-monospace, Consolas, monospace; color: #465f6d; }
.access-code { color: #115f59; }
.inline { gap: 8px; }
.license-edit { display: grid; gap: 8px; margin-top: 10px; min-width: 180px; }
.license-edit button { justify-self: start; }
.license-summary { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.deadline { white-space: nowrap; font-variant-numeric: tabular-nums; }
.gateway-hint { margin: 10px 0 15px; font-size: 14px; color: #526776; }
.gateway-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 14px; }
.gateway-actions details { padding: 8px; }
.gateway-actions .remove[open] { max-width: none; }
.quota-input { width: 80px; height: 32px; font-size: 14px; }
.empty { padding: 20px 24px 25px; border-top: 1px solid #e0e7ea; font-size: 14px; }
.quota-note, .notice { font-size: 14px; color: #70480c; background: #fbf4e6; border: 1px solid #e8d9b5; border-radius: 5px; padding: 9px 12px; }
.notice { margin-bottom: 18px; }
.state { color: #566875; white-space: nowrap; }
.verified { color: #12665b; }
.expired { color: #8d3930; }
summary { cursor: pointer; font-size: 13px; color: #23655d; }
summary:hover { text-decoration: underline; }
.remove summary { color: #8d3930; }
.remove[open] { min-width: 125px; max-width: 200px; }
.remove form { margin-top: 8px; }
.remove p, .settings-body p { font-size: 13px; margin-bottom: 8px; }
.config-row td { border-top: 0; padding-top: 0; }
.settings-body { padding: 14px; background: #f7f9fa; border-radius: 5px; margin-top: 8px; }
.settings-body p { margin-top: 10px; }
.account-settings { display: grid; gap: 5px; }
.routing { display: grid; gap: 10px; }
.routing > label:first-of-type { max-width: 400px; }
.routing button { justify-self: start; }
.routing .check { display: flex; align-items: center; font-weight: 500; }
input[type="checkbox"] { width: 16px; height: 16px; padding: 0; accent-color: #13685e; }
.login-wrap { max-width: 430px; margin: clamp(42px, 10vh, 104px) auto; padding: 0 15px; }
.login-card { padding: 30px; }
.login-card h1 { font-size: 25px; margin-bottom: 24px; }
.stack { display: grid; gap: 16px; }
.wide { width: 100%; margin-top: 5px; }
a { color: #12665b; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 1040px) {
    .create-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
    .fields, .credentials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fields button { justify-self: start; }
}
@media (max-width: 550px) {
    .bar-inner, .workspace { width: calc(100% - 24px); }
    .account-actions { gap: 8px; }
    .bar-inner { min-height: 54px; }
    .brand { font-size: 15px; gap: 7px; }
    .heading { align-items: flex-start; flex-direction: column; gap: 8px; margin-bottom: 16px; }
    .fields { grid-template-columns: minmax(0, 1fr); }
    .card:not(.list-card) { padding: 16px; }
    .list-card h2, th:first-child, td:first-child { padding-left: 16px; }
    table { min-width: 540px; }
    .login-wrap { margin-top: 32px; }
}
