:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  font-synthesis: none;
  --bg: #f3f7f9;
  --ink: #17313d;
  --muted: #4e6674;
  --line: #d7e3e9;
  --surface: #fff;
  --surface-alt: #f6f9fb;
  --surface-hover: #eaf3f7;
  --surface-soft: #e7eff3;
  --field: #fff;
  --field-line: #9fb4bf;
  --placeholder: #5b717e;
  --accent: #17648b;
  --focus: #287f9e;
  --primary: #17648b;
  --primary-hover: #105675;
  --primary-text: #fff;
  --positive: #245d4c;
  --positive-bg: #edf7f2;
  --positive-line: #beded2;
  --warning: #755414;
  --warning-bg: #fff3dc;
  --warning-line: #dfbf85;
  --danger: #90372f;
  --danger-bg: #fff0ed;
  --danger-line: #e0b6af;
  --info: #315d74;
  --info-bg: #edf6fb;
  --info-line: #c5dce9;
  --shadow: #1e3e5029;
  --backdrop: #233d5080;
  color: var(--ink);
  background: var(--bg);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101b22;
  --ink: #ecf5fa;
  --muted: #adc0ca;
  --line: #36505f;
  --surface: #182a35;
  --surface-alt: #1d323f;
  --surface-hover: #243d4b;
  --surface-soft: #203744;
  --field: #142630;
  --field-line: #4a6675;
  --placeholder: #a8beca;
  --accent: #8acdeb;
  --focus: #91d5f2;
  --primary: #83c9ea;
  --primary-hover: #a8dcf5;
  --primary-text: #102631;
  --positive: #a4dec8;
  --positive-bg: #183830;
  --positive-line: #3c6658;
  --warning: #f2ce89;
  --warning-bg: #3b3022;
  --warning-line: #755d38;
  --danger: #f7b7ac;
  --danger-bg: #402a2a;
  --danger-line: #79504f;
  --info: #b2d8ed;
  --info-bg: #203947;
  --info-line: #426778;
  --shadow: #060e1466;
  --backdrop: #07121ab3;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #101b22;
    --ink: #ecf5fa;
    --muted: #adc0ca;
    --line: #36505f;
    --surface: #182a35;
    --surface-alt: #1d323f;
    --surface-hover: #243d4b;
    --surface-soft: #203744;
    --field: #142630;
    --field-line: #4a6675;
    --placeholder: #a8beca;
    --accent: #8acdeb;
    --focus: #91d5f2;
    --primary: #83c9ea;
    --primary-hover: #a8dcf5;
    --primary-text: #102631;
    --positive: #a4dec8;
    --positive-bg: #183830;
    --positive-line: #3c6658;
    --warning: #f2ce89;
    --warning-bg: #3b3022;
    --warning-line: #755d38;
    --danger: #f7b7ac;
    --danger-bg: #402a2a;
    --danger-line: #79504f;
    --info: #b2d8ed;
    --info-bg: #203947;
    --info-line: #426778;
    --shadow: #060e1466;
    --backdrop: #07121ab3;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  line-height: 1.65;
}

input, textarea, select, button {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--accent);
}

:where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

h1, h2, h3, p {
  overflow-wrap: anywhere;
}

h1, h2, h3 {
  line-height: 1.35;
  letter-spacing: -.025em;
}

h1 {
  font-size: 2rem;
  margin: 0 0 10px;
}

h2 {
  font-size: 1.3rem;
  margin: 0 0 5px;
}

h3 {
  font-size: 1.15rem;
}

.muted {
  color: var(--muted);
  font-size: .9375rem;
  margin: 6px 0;
}

.eyebrow {
  color: var(--accent);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .08em;
  margin: 0 0 10px;
}

.boot {
  color: var(--muted);
  padding: 80px 20px;
  text-align: center;
}

.brand-symbol {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 62px;
  height: 62px;
  border-radius: 17px;
  background: var(--primary);
  color: var(--primary-text);
  font-size: 1.65rem;
  font-weight: 700;
}

.brand-symbol.small {
  width: 39px;
  height: 39px;
  border-radius: 11px;
  font-size: 1.2rem;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(24px, 8vw, 96px);
  align-items: center;
  width: min(1180px, 100%);
  min-height: 100vh;
  min-height: 100svh;
  margin: auto;
  padding: clamp(26px, 5vw, 60px);
}

.login-intro .eyebrow {
  margin-top: 32px;
}

.login-intro h1 {
  margin: 15px 0 22px;
  font-size: clamp(2rem, 4vw, 2.9rem);
  letter-spacing: -.045em;
}

.intro-copy {
  max-width: 470px;
  color: var(--muted);
}

.login-boundary {
  color: var(--positive);
  font-size: .875rem;
  margin-top: 26px;
}

.login-card {
  min-width: 0;
  padding: clamp(20px, 3.5vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 36px var(--shadow);
}

.login-card h2 {
  font-size: 1.65rem;
}

.login-card form {
  margin-top: 22px;
}

.login-card form label {
  margin-bottom: 18px;
}

.login-theme {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  font-size: .875rem;
  font-weight: 650;
}

label small {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.6;
}

input, textarea, select {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1rem;
  line-height: 1.5;
}

input::placeholder, textarea::placeholder {
  color: var(--placeholder);
}

select option, select optgroup {
  color: var(--ink);
  background-color: var(--field);
}

textarea {
  resize: vertical;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.checkbox-label {
  min-height: 44px;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: .9375rem;
  font-weight: 400;
}

.select-control {
  position: relative;
  display: block;
  width: 100%;
}

.select-control select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
}

.select-control::after {
  content: "";
  position: absolute;
  right: 15px;
  top: calc(50% - 5px);
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}

.theme-control {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  white-space: nowrap;
}

.theme-control .select-control {
  width: 7.35rem;
  min-width: 0;
}

.theme-control select {
  min-height: 44px;
  padding: 8px 29px 8px 10px;
  font-size: .875rem;
}

.theme-control .select-control::after {
  right: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 15px;
  background: transparent;
  font-size: .875rem;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.button:disabled, .row-actions button:disabled {
  opacity: .55;
  cursor: wait;
}

.button.primary {
  color: var(--primary-text);
  background: var(--primary);
  border-color: var(--primary);
}

.button.primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.button.secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--field-line);
}

.button.secondary:hover:not(:disabled),
.button.quiet:hover:not(:disabled),
.icon-button:hover {
  background: var(--surface-hover);
}

.button.quiet {
  color: var(--muted);
}

.button.wide {
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 12px max(28px, calc((100% - 1360px) / 2));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

.brand span {
  overflow-wrap: anywhere;
}

.account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 13px;
  min-width: 0;
  color: var(--muted);
  font-size: .875rem;
}

#account-name {
  overflow-wrap: anywhere;
}

.workspace {
  max-width: 1416px;
  margin: auto;
  padding: 35px 28px 24px;
}

.page-heading, .panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.page-heading .muted {
  max-width: 760px;
}

.page-heading-actions, .button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.page-heading-actions {
  flex-shrink: 0;
  justify-content: flex-end;
}

.scope-note {
  padding: 14px 18px;
  margin-bottom: 22px;
  border: 1px solid var(--positive-line);
  border-radius: 10px;
  background: var(--positive-bg);
  color: var(--positive);
  font-size: .9375rem;
}

.scope-note strong {
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 22px;
}

.summary-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 17px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.summary-card > span, .summary-card small {
  color: var(--muted);
  font-size: .875rem;
  overflow-wrap: anywhere;
}

.summary-card > span {
  font-weight: 600;
}

.summary-card strong {
  color: var(--ink);
  font-size: 2rem;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.summary-card.due-card {
  border-top: 3px solid var(--warning-line);
}

.summary-card.expired-card {
  border-top: 3px solid var(--danger-line);
}

.summary-card.due-card strong, .status-warn {
  color: var(--warning);
}

.summary-card.expired-card strong, .status-bad, .service-error {
  color: var(--danger);
}

.status-good {
  color: var(--positive);
}

.service-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(125px, 1fr)) minmax(140px, 1.4fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.service-strip > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.service-label {
  color: var(--muted);
  font-size: .875rem;
}

.service-strip strong, .service-error {
  font-size: .875rem;
}

.tabs {
  display: flex;
  gap: 24px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--line);
}

.tab {
  min-width: 0;
  padding: 10px 0;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 650;
}

.tab.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.tab span {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  background: var(--surface-soft);
  border-radius: 5px;
  font-size: .875rem;
  font-weight: 600;
}

.filter-bar {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 16px;
}

.search-field {
  max-width: 490px;
  flex: 1;
}

.filter-select, .notification-filter {
  width: 220px;
}

.category-filter {
  width: 160px;
}

.table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 14px 16px;
  font-size: .875rem;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  background: var(--surface-alt);
  font-weight: 650;
}

td {
  vertical-align: middle;
  overflow-wrap: anywhere;
}

tbody tr:last-child td {
  border-bottom: 0;
}

@media (hover: hover) {
  tbody tr:hover {
    background: var(--surface-alt);
  }
}

.domain-cell {
  min-width: 205px;
  max-width: 335px;
}

.domain-name {
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.subline {
  margin-top: 5px;
  color: var(--muted);
  font-size: .875rem;
  overflow-wrap: anywhere;
}

.time-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.time-cell small {
  display: block;
  color: var(--muted);
  font-size: .875rem;
}

.card-label {
  display: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.5;
}

.badge.category-badge {
  margin-top: 6px;
  padding: 2px 8px;
  color: var(--info);
  background: var(--info-bg);
  border: 1px solid var(--info-line);
}

.badge.upcoming, .badge.sent, .badge.handled {
  color: var(--positive);
  background: var(--positive-bg);
}

.badge.due, .badge.uncertain, .badge.sending {
  color: var(--warning);
  background: var(--warning-bg);
}

.badge.expired, .badge.failed {
  color: var(--danger);
  background: var(--danger-bg);
}

.actions-head {
  text-align: right;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px 12px;
  min-width: 205px;
  max-width: 320px;
  margin-left: auto;
}

.row-actions button {
  padding: 4px 0;
  color: var(--accent);
  background: transparent;
  border: 1px solid transparent;
  font-size: .875rem;
  white-space: nowrap;
}

.row-actions button:hover:not(:disabled) {
  text-decoration: underline;
}

.row-actions button.danger-link {
  color: var(--danger);
}

.empty-state {
  padding: 40px 23px;
  text-align: center;
  color: var(--muted);
}

.empty-state h3 {
  color: var(--ink);
  margin: 0 0 9px;
}

.empty-state p, .message, .uncertain-warning {
  font-size: .9375rem;
}

.message, .uncertain-warning, .notice-save-status {
  padding: 12px 16px;
  border: 1px solid var(--positive-line);
  border-radius: 9px;
  background: var(--positive-bg);
  color: var(--positive);
  margin-bottom: 20px;
  overflow-wrap: anywhere;
}

.message.error {
  border-color: var(--danger-line);
  color: var(--danger);
  background: var(--danger-bg);
}

.uncertain-warning {
  border-color: var(--warning-line);
  color: var(--warning);
  background: var(--warning-bg);
}

.panel-note, .footer {
  color: var(--muted);
  font-size: .875rem;
}

.panel-note {
  margin: 13px 2px;
}

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px 20px;
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.modal {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 24px 28px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 80px var(--shadow);
}

.modal::backdrop {
  background: var(--backdrop);
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.modal-heading .eyebrow {
  margin-bottom: 5px;
}

.icon-button {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 4px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 1.6rem;
  line-height: 1;
}

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

.span-two {
  grid-column: span 2;
}

.registrar-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.registrar-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6rem;
  gap: 8px;
}

.registrar-controls .select-control select {
  padding-inline: 10px 26px;
}

.registrar-controls .select-control::after {
  right: 12px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 16px;
  margin-top: 15px;
  border-top: 1px solid var(--line);
}

.form-error {
  min-height: 22px;
  margin: 13px 0;
  color: var(--danger);
  font-size: .875rem;
}

.form-error:empty {
  display: none;
}

.import-tools {
  margin: 18px 0;
}

.file-picker {
  display: flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px dashed var(--field-line);
  border-radius: 8px;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 600;
}

.file-picker input {
  width: min(230px, 100%);
  padding: 0;
  border: 0;
  background: transparent;
  font-size: .875rem;
}

.file-picker input::file-selector-button {
  margin-right: 8px;
  padding: 6px 9px;
  border: 1px solid var(--field-line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--field);
  font: inherit;
}

.csv-input {
  font-family: ui-monospace, "Microsoft YaHei", monospace;
  white-space: pre;
}

.modal.notice-modal {
  width: min(1120px, calc(100% - 32px));
}

.notice-access-note {
  padding: 12px 15px;
  color: var(--info);
  background: var(--info-bg);
  border: 1px solid var(--info-line);
  border-radius: 9px;
  font-size: .875rem;
}

.notice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 24px;
  margin-top: 19px;
}

.notice-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.notice-editor .panel-note {
  margin: 0;
}

.notice-preview-panel {
  align-self: start;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-alt);
}

.notice-preview-caption {
  margin: 0;
  padding: 10px 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: .875rem;
  font-weight: 650;
}

.notice-preview-empty {
  display: grid;
  place-items: center;
  min-height: 315px;
  padding: 24px;
  color: var(--muted);
  font-size: .9375rem;
  text-align: center;
}

.notice-preview-panel iframe {
  display: block;
  width: 100%;
  height: 450px;
  height: clamp(280px, 62dvh, 500px);
  border: 0;
  background: var(--surface-alt);
  color-scheme: inherit;
}

.notice-save-status {
  margin: 16px 0 0;
  font-size: .9375rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 960px) {
  .table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
  }

  .table-wrap table {
    display: block;
  }

  .table-wrap thead {
    /* Preserve the header associations while the records are shown as cards. */
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .table-wrap tbody {
    display: grid;
    gap: 12px;
  }

  .table-wrap tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .table-wrap td,
  .table-wrap tbody tr:last-child td {
    min-width: 0;
    max-width: none;
    padding: 10px 14px;
    border-bottom: 0;
  }

  .table-wrap .domain-cell,
  .table-wrap td:last-child {
    grid-column: 1 / -1;
  }

  .table-wrap .domain-cell {
    padding-top: 14px;
    border-bottom: 1px solid var(--line);
  }

  .table-wrap td:last-child {
    border-top: 1px solid var(--line);
    padding-bottom: 14px;
  }

  .card-label {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .875rem;
    font-weight: 650;
  }

  .table-wrap .time-cell {
    white-space: normal;
  }

  .row-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr));
    gap: 7px;
    max-width: none;
    min-width: 0;
    margin-left: 0;
  }

  .row-actions button {
    min-height: 44px;
    padding: 7px;
    border: 1px solid var(--field-line);
    border-radius: 7px;
    background: var(--surface-alt);
    font-weight: 650;
    white-space: normal;
  }

  .row-actions button.danger-link {
    border-color: var(--danger-line);
  }

  .empty-state {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
  }
}

@media (max-width: 850px) {
  .notice-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .notice-preview-empty {
    min-height: 150px;
  }

  .notice-preview-actions .button {
    flex: 1;
  }
}

@media (max-width: 760px) {
  .login-layout {
    align-content: start;
    justify-content: center;
    grid-template-columns: minmax(0, 470px);
  }

  .login-intro .eyebrow {
    margin-top: 17px;
  }

  .login-intro h1 {
    margin-bottom: 13px;
  }

  .login-boundary {
    margin-top: 14px;
  }

  .topbar {
    padding-inline: 14px;
  }

  .brand {
    font-size: 1rem;
  }

  .workspace {
    padding: 23px 14px 21px;
  }

  h1 {
    font-size: 1.65rem;
  }

  .page-heading, .panel-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 13px;
  }

  .page-heading-actions {
    justify-content: flex-start;
  }

  .page-heading-actions .button,
  .panel-toolbar .button-row .button,
  .modal-actions .button {
    flex: 1;
  }

  .button, .tab, input:not([type="checkbox"]), select {
    min-height: 44px;
  }

  .theme-control select, .file-picker input {
    font-size: 1rem;
  }

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

  .summary-card {
    padding: 12px;
  }

  .summary-card strong {
    font-size: 1.7rem;
  }

  .service-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    padding: 13px;
  }

  .service-strip .worker-item,
  .service-strip > .button {
    grid-column: 1 / -1;
  }

  .scope-note {
    padding: 12px 13px;
  }

  .filter-bar {
    flex-wrap: wrap;
  }

  .search-field {
    max-width: none;
    flex-basis: 100%;
  }

  .filter-select {
    flex: 1;
    width: auto;
  }

  .filter-bar > .button {
    flex-basis: 100%;
  }

  .notification-filter {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .span-two {
    grid-column: auto;
  }

  .modal {
    padding: 19px 17px;
  }

  .file-picker input {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .topbar {
    flex-wrap: wrap;
    gap: 9px;
  }

  .topbar .account {
    width: 100%;
    justify-content: space-between;
  }

  .account > #account-name {
    margin-right: auto;
  }

  .topbar .button.quiet {
    padding-inline: 7px;
  }

  .login-layout {
    padding: 18px 14px 24px;
  }

  .login-intro .brand-symbol {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }

  .modal, .modal.notice-modal {
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding: 15px 12px;
  }

  .notice-layout {
    gap: 15px;
  }

  .notice-preview-empty {
    padding: 18px 12px;
  }

  .table-wrap td,
  .table-wrap tbody tr:last-child td {
    padding-inline: 11px;
  }

  .tabs {
    gap: 14px;
  }

  .footer {
    flex-direction: column;
  }
}

@media (forced-colors: active) {
  .select-control select {
    appearance: auto;
    -webkit-appearance: auto;
  }

  .select-control::after {
    display: none;
  }
}
