:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #17253a;
  background: #f6f8fc;
  --muted: #576880;
  --border: #dce4ef;
  --blue: #2551d6;
  --focus: #527bf7;
  --surface: #fff;
  --surface-subtle: #f5f8fd;
  --sidebar: #131e32;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
h2 { font-size: 17px; line-height: 1.4; }
a { color: var(--blue); }
button, input, textarea, select { font: inherit; }
:where(button, a, input, textarea, select):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; inset: 8px auto auto 8px; z-index: 5; transform: translateY(-150%); background: white; padding: 8px; }
.skip-link:focus { transform: none; }
.layout { height: 100dvh; display: grid; grid-template: minmax(0, 1fr) / 206px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  inset-block-start: 0;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 19px;
  padding: 20px 14px;
  background: var(--sidebar);
  color: #eef3ff;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 10px;
  background: #3763ef;
  color: white;
  font-size: 24px;
  font-weight: 750;
}
.brand strong { display: block; font-size: 18px; line-height: 1.15; }
.brand div > span { color: #a9b6ca; font-size: 12px; }
.workspace {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid #344056;
  border-radius: 10px;
  background: #1c283d;
  overflow-wrap: anywhere;
}
.workspace strong { font-size: 15px; }
.workspace span, .account { color: #a9b6ca; font-size: 12px; }
.sidebar .nav-toggle { display: none; color: #eef3ff; }
nav { display: grid; gap: 3px; }
nav a {
  display: block;
  padding: 9px 12px;
  color: #bac7da;
  font-weight: 550;
  text-decoration: none;
  border-radius: 7px;
  border-left: 3px solid transparent;
}
nav a:hover { background: #202c43; color: #fff; }
nav a[aria-current="page"] { background: #253451; color: #fff; border-left-color: #7d9cff; }
.account {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 12px 2px 0;
  border-top: 1px solid #344056;
  overflow-wrap: anywhere;
}
.account .quiet { color: #bbceff; }

.main {
  display: flex;
  flex-direction: column;
  width: min(100%, 1460px);
  min-height: 0;
  margin-inline: auto;
  padding: clamp(20px, 3vw, 40px);
}
.page-heading { margin-bottom: 22px; }
.page-heading .toolbar { align-items: flex-end; }
.heading-copy { display: grid; gap: 8px; }
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar-note, .subtle, .empty { color: var(--muted); }
#page-content { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
#page-content > :is(.list-toolbar, .rule-mode) { flex-shrink: 0; }
.panel {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px #17254209;
  min-width: 0;
  overflow: hidden;
}
.panel-header { padding: 13px 17px; }
.list-search {
  width: min(100%, 320px);
  min-height: 38px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: inherit;
}
.section-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); }
.section-tabs a { border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); padding: 9px 13px; }
.section-tabs a:hover { color: var(--blue); background: #eef3ff; }
.section-tabs a[aria-current="page"] { color: var(--blue); background: transparent; border-bottom-color: var(--blue); }
.table-scroll { overflow-x: auto; min-width: 0; }
#page-content > .panel:has(> .table-scroll) { display: flex; flex-direction: column; min-height: 0; }
#page-content > .panel > :is(.list-toolbar, .panel-header) { flex-shrink: 0; }
#page-content > .panel > .table-scroll { overflow: auto; min-height: 0; overscroll-behavior: contain; }
#page-content > .panel > .table-scroll th { position: sticky; top: 0; z-index: 1; box-shadow: inset 0 -1px #e8edf4; }
#page-content > .device-members { overflow: auto; min-height: 0; overscroll-behavior: contain; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th {
  font-size: 12px;
  color: var(--muted);
  background: #f8fafc;
  font-weight: 650;
}
th, td { border-bottom: 1px solid #e8edf4; padding: 10px 14px; vertical-align: middle; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcff; }
td code { font: 12px ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
td.actions { text-align: right; }
.actions-list { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.row-title { font-weight: 650; }
a.row-title { text-decoration: none; }
a.row-title:hover { text-decoration: underline; }
.cells-inline { display: flex; gap: 4px 10px; flex-wrap: wrap; }
.empty { padding: 20px 17px; }
.notice, .error, .mode { margin: 0 0 14px; padding: 10px 12px; border: 1px solid; border-radius: 7px; }
.notice { color: #126347; background: #eff9f5; border-color: #c6e8d9; }
.error { color: #9d2323; background: #fff2f2; border-color: #f2caca; overflow-wrap: anywhere; }
.mode { background: #fff8e7; border-color: #edd693; color: #704c0b; margin: 0; }
.mode.enabled { background: #eef8f3; border-color: #cae6d5; color: #185941; }
.mode p { margin: 3px 0 0; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #52647d; white-space: nowrap; }
.status::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #8b9db5; }
.status.green { color: #16684e; }
.status.green::before { background: #169974; }
.status.amber { color: #7c580b; }
.status.amber::before { background: #cf9426; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #fff;
  color: #243148;
  padding: 5px 11px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.button:hover { background: #edf2fb; }
.button.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.button.primary:hover { background: #2149ba; }
.button.soft { background: #eaf1ff; color: #2148b8; border-color: transparent; }
.button.soft:hover { background: #dce8ff; }
.button.danger { color: #a82626; }
.button.danger:hover { background: #fff1f1; }
.button:disabled { opacity: .55; cursor: default; }
.button.quiet { background: transparent; border-color: transparent; }

dialog {
  width: min(100% - 30px, 490px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 15px;
  color: #1c2536;
  box-shadow: 0 16px 42px #15233a38;
  max-height: calc(100dvh - 36px);
  overflow: hidden;
}
dialog::backdrop { background: #141d2f92; }
dialog {
  --dialog-inset: 22px;
}
dialog form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100dvh - 38px);
}
.dialog-heading, .dialog-actions { padding: 15px var(--dialog-inset); background: var(--surface); }
.dialog-heading { border-bottom: 1px solid var(--border); }
.dialog-body {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: var(--dialog-inset);
}
dialog .error { margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--border); }
.field { display: grid; gap: 5px; font-weight: 600; }
.field input, .field textarea, .field select {
  min-height: 38px;
  border: 1px solid #cbd5e2;
  border-radius: 6px;
  background: #fff;
  color: #1c2536;
  padding: 7px 9px;
  width: 100%;
  font-weight: 400;
}
.field textarea { resize: vertical; min-height: 75px; }
.field small { font-weight: 400; color: var(--muted); }
.group-options {
  min-width: 0;
  max-height: 12rem;
  overflow: auto;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.group-options legend { padding-inline: 5px; font-weight: 600; }
.group-options label { display: flex; align-items: baseline; gap: 8px; padding-block: 5px; }
.group-options small { margin-inline-start: 8px; color: var(--muted); }
.group-option { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.group-option a { flex-shrink: 0; }
.rule-flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 8px; }
.flow-arrow { padding-bottom: 9px; color: var(--muted); }
.source-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.source-tabs .button { flex: 1 0 auto; }
.source-tabs .button[aria-pressed="true"],
.source-options .button[aria-pressed="true"] { background: #eaf1ff; color: var(--blue); }
.source-options { max-height: min(12rem, 32vh); overflow-y: auto; }
.source-options .button {
  justify-content: flex-start;
  width: 100%;
  border-color: transparent;
  white-space: normal;
  text-align: start;
  font-weight: 500;
}
.source-options p { margin: 4px 6px 7px; }
.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 13px 15px; }
#page-content > .list-toolbar { padding: 0; }
.list-filter { min-height: 38px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: inherit; max-width: 100%; }
.list-count { margin-inline-start: auto; font-size: 12px; color: var(--muted); }
.member-filter-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.member-filter-toggle, .member-email-mobile { display: none; }
.member-identity { min-width: 0; }
.gateway-routes { display: grid; gap: 5px; }
.gateway-route { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; }
.change-preview, .access-check-result { background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 9px; padding: 11px 13px; }
.change-preview h3, .access-check-result h3 { margin: 0; font-size: 14px; }
.impact-section summary { font-weight: 650; cursor: pointer; }
.check-lines { display: grid; gap: 4px; }
.live-check { padding-block-start: 9px; border-top: 1px solid var(--border); }
.live-check code { white-space: pre-wrap; overflow-wrap: anywhere; }
.probe-frame { display: block; width: 100%; height: 142px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.probe-page { display: grid; gap: 8px; justify-items: start; padding: 10px 12px; background: var(--surface); }
#probe-status[data-state="reachable"] { color: #16684e; }
#probe-status[data-state="failed"] { color: #7c580b; }
.rule-mode { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 9px; padding: 11px 14px; }
.policy-summary, .object-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.policy-state { min-height: 18px; }
.rule-table-chip { display: inline-block; padding: 3px 8px; background: #edf2fa; color: #314562; border-radius: 6px; overflow-wrap: anywhere; }
.compact-rule-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.rule-selection-summary { margin: 0; padding: 5px 12px 5px 24px; overflow-wrap: anywhere; }
.row-menu > button { min-width: 36px; }
.row-menu > button[aria-expanded="true"] { background: #edf2fb; color: var(--blue); }
.button.chip-button { min-height: 27px; padding: 2px 7px; background: #edf2fa; color: #314562; border-color: transparent; }
.button.chip-button:hover { background: #dfeaff; color: var(--blue); }
.row-menu-items {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 7px 22px #17254223;
  color: inherit;
  max-width: calc(100vw - 16px);
}
.row-menu-items:popover-open { display: grid; gap: 3px; }
.row-menu-items .button { justify-content: start; }
.button.link { border-color: transparent; color: var(--blue); background: transparent; }
.button.link:hover { background: #edf2fb; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rule-dialog {
  --dialog-inset: clamp(18px, 3vw, 28px);
  width: min(1050px, calc(100% - 40px));
}
.rule-dialog .dialog-heading h2 { font-size: 21px; }
.detail-dialog {
  width: min(1050px, calc(100% - 40px));
  height: min(78dvh, 760px);
}
.detail-frame, .detail-editing form { height: 100%; max-height: 100%; }
.detail-frame { display: flex; flex-direction: column; background: var(--surface); }
.detail-frame > :not(.detail-body) { flex-shrink: 0; }
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px 18px;
  border-bottom: 1px solid var(--border);
  padding: 16px var(--dialog-inset);
}
.detail-heading { display: grid; gap: 4px; min-width: 0; }
.detail-heading h2 { font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; }
.detail-heading h2:focus { outline: none; }
.detail-heading > .button { min-height: 27px; padding-inline: 3px; justify-self: start; }
.detail-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); overflow-wrap: anywhere; }
.detail-controls, .detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 5px; }
.detail-close { font-size: 21px; line-height: 1; min-width: 38px; }
.detail-tabs { padding-inline: var(--dialog-inset); }
.detail-tabs .section-tabs { gap: 5px; }
.detail-tabs .section-tabs a { min-height: 41px; }
.detail-body { flex: 1; background: var(--surface-subtle); }
.detail-body .group-detail-form { gap: 16px; grid-template-rows: none; max-height: none; }
.detail-frame > :is(.notice, .error) { margin: 8px var(--dialog-inset) 0; }
.rule-dialog .rule-flow, .rule-detail .rule-flow { align-items: stretch; gap: 14px; }
.rule-dialog .flow-arrow, .rule-detail .flow-arrow { align-self: start; margin-top: 16px; padding: 0; }
.rule-dialog h3 { font-size: 14px; margin: 0; }
.rule-selection { display: flex; flex-direction: column; min-width: 0; padding: 11px 12px; gap: 9px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-subtle); }
.rule-selection-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; }
.rule-selection-list { list-style: none; margin: 0; padding: 0; border-block: 1px solid var(--border); }
.rule-selection-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding-inline-start: 8px;
}
.rule-selection-row + .rule-selection-row { border-top: 1px solid var(--border); }
.rule-selection-kind { padding: 2px 6px; background: #e7eef9; color: #344763; border-radius: 5px; font-size: 12px; }
.rule-selection-name { overflow-wrap: anywhere; padding-block: 6px; }
.rule-selection-row button {
  width: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
}
.rule-selection-row button:hover { background: #eaf1ff; color: #1c2536; }
.select-empty { padding: 4px 0; color: var(--muted); }
.rule-picker { display: grid; gap: 8px; padding: 9px; border: 1px solid var(--border); background: white; border-radius: 8px; }
.rule-picker .list-search { width: 100%; }
.rule-picker .source-options:has(.rule-address-fields) { max-height: none; }
.rule-address-fields, .rule-traffic { display: grid; gap: 9px; }
.rule-address-fields { padding: 4px; }
.rule-address-fields button { justify-self: end; }
.rule-traffic-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 9px; align-items: end; }
.rule-switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap; }
.rule-switch input { appearance: none; width: 33px; height: 19px; background: #8898af; border: 0; border-radius: 12px; margin: 0; position: relative; cursor: pointer; }
.rule-switch input::after { content: ""; position: absolute; inset: 3px auto auto 3px; width: 13px; height: 13px; background: #fff; border-radius: 50%; }
.rule-switch input:checked { background: var(--blue); }
.rule-switch input:checked::after { inset-inline-start: 17px; }
.rule-target { display: grid; gap: 3px; }
.rule-target small { color: var(--muted); }
.traffic-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 9px; }
.traffic-line strong { font-size: 13px; }
.scope-preview { width: 100%; overflow-wrap: anywhere; }
.scope-preview, .scope-warning { background: #eef4ff; border: 1px solid #d7e4fc; padding: 10px 12px; border-radius: 8px; }
.scope-warning { background: #fff6e2; border-color: #ecdaae; color: #6c4b09; }
.access-scope-details summary { cursor: pointer; font-weight: 650; }
.scope-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; margin-top: 10px; }
.scope-columns ul, .impact-list { margin: 5px 0 0; padding-inline-start: 19px; overflow-wrap: anywhere; }
.rule-detail { display: grid; gap: 14px; padding: 16px; }
.device-members { display: grid; grid-auto-rows: max-content; gap: 12px; }
.member-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; }
.member-heading span { color: var(--muted); font-size: 12px; }
.stack { display: grid; gap: 8px; }

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .sidebar {
    z-index: 2;
    height: auto;
    overflow: visible;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 9px;
    padding: 8px 11px;
  }
  .brand { gap: 7px; padding: 0; }
  .brand-mark { width: 30px; height: 30px; flex: 0 0 30px; font-size: 20px; border-radius: 8px; }
  .brand strong { font-size: 15px; }
  .brand div > span { font-size: 10px; }
  .workspace { padding: 3px 0; text-align: end; border: 0; background: transparent; }
  .workspace strong { font-size: 13px; }
  .workspace span { font-size: 10px; }
  .sidebar .nav-toggle { display: inline-flex; }
  .sidebar .nav-toggle:hover { background: #253451; }
  .sidebar nav, .sidebar .account { grid-column: 1 / -1; display: none; }
  .sidebar:has(.nav-toggle[aria-expanded="true"]) nav,
  .sidebar:has(.nav-toggle[aria-expanded="true"]) .account { display: grid; }
  .sidebar nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sidebar nav a { text-align: center; padding: 10px 4px; border-left: 0; }
  .sidebar .account { grid-template-columns: minmax(0, 1fr) auto; padding-top: 2px; }
  .main { padding: 18px 12px; }
  .page-heading { margin-bottom: 14px; }
  .heading-copy { min-width: 0; }
  .list-search { flex: 1 1 180px; width: auto; min-width: 0; }
  .list-toolbar { padding: 10px 12px; }
  .member-filter-toggle { display: inline-flex; }
  .member-filter-controls { display: none; flex-basis: 100%; order: 1; }
  .member-filter-controls.expanded { display: flex; }
  .members-list .list-toolbar { gap: 6px; }
  .members-list .list-search { flex-basis: 140px; }
  .members-list tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px; padding: 8px 12px; }
  .members-list tbody td:first-child { flex-basis: 100%; }
  .members-list tbody td:not(:first-child) { display: block; font-size: 12px; }
  .members-list tbody td::before { display: none; }
  .members-list tbody td[data-label="邮箱"],
  .members-list tbody td[data-label="登录状态"]:not(:has(.status.amber, .status.disabled)),
  .members-list tbody td[data-label="操作"]:empty { display: none; }
  .members-list tbody td[data-label="角色"] { color: var(--muted); }
  .members-list .member-email-mobile { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
  .section-tabs { flex-wrap: wrap; }
  .section-tabs a { padding-inline: 8px; }
  .table-scroll { overflow: visible; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  tbody tr { display: grid; gap: 7px; padding: 12px; border-bottom: 1px solid #e8edf4; }
  tbody tr:last-child { border-bottom: 0; }
  table td { display: grid; padding: 0; border: 0; gap: 8px; min-width: 0; }
  table td:first-child { font-size: 15px; font-weight: 650; }
  table td:not(:first-child):not(.actions) { grid-template-columns: minmax(73px, 31%) minmax(0, 1fr); align-items: baseline; }
  table td:not(:first-child):not(.actions)::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
  table td.actions { justify-items: end; }
  tbody tr:hover td { background: transparent; }
  .actions-list { gap: 4px; }
  .button { min-height: 44px; }
  .detail-heading > .button, .detail-tabs .section-tabs a, .button.chip-button { min-height: 44px; }
}

@media (max-width: 540px) {
  dialog, .rule-dialog, .detail-dialog {
    --dialog-inset: 15px;
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
  }
  .detail-dialog { height: calc(100dvh - 16px); }
  .detail-header { padding-block: 9px; gap: 5px; }
  .detail-heading h2 { font-size: 19px; }
  .detail-close { min-width: 44px; }
  dialog form { max-height: calc(100dvh - 18px); }
  .detail-editing form { max-height: 100%; }
  .dialog-body { gap: 12px; }
  .dialog-heading, .dialog-actions { padding-block: 8px; }
  .dialog-actions { gap: 5px; }
  .dialog-actions .button { padding-inline: 8px; }
  .rule-dialog .rule-flow, .rule-detail .rule-flow, .scope-columns { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .rule-dialog .flow-arrow, .rule-detail .flow-arrow { display: none; }
  .field input, .field textarea, .field select, .list-search { font-size: 16px; }
  .rule-selection-row button { width: 44px; min-height: 44px; }
}

.login-page { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(100%, 420px); padding: clamp(18px, 5vw, 32px); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 12px 32px #1b35560b; }
.login-card .brand { margin-bottom: 21px; padding: 0; }
.login-card h1 { font-size: 25px; }
.login-card form { display: grid; gap: 8px; margin-top: 20px; }
.login-card label { font-weight: 650; }
.login-card input { min-height: 44px; width: 100%; border-radius: 8px; padding: 7px 10px; border: 1px solid var(--border); font-size: 16px; }
.login-card form label:not(:first-child) { margin-top: 5px; }
.password-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.password-field .button { min-height: 44px; }
.login-card button[type="submit"] { margin-top: 8px; min-height: 44px; }
.login-card [role="alert"] { color: #9f1d1d; margin: 0; }
