:root {
  --ink: #17212b;
  --muted: #667381;
  --line: #d8e1e8;
  --paper: #eef3f6;
  --panel: #ffffff;
  --green: #1e8d69;
  --blue: #2f6fbb;
  --red: #b54d43;
  --navy: #21384f;
  --soft-green: #e4f2ed;
  --soft-blue: #e5eef9;
  --surface: rgba(255, 255, 255, .82);
  --shadow: 0 18px 45px rgba(33, 56, 79, .14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(125deg, rgba(30, 141, 105, .1), rgba(47, 111, 187, .12)),
    var(--paper);
  font-family: Arial, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.5;
}

body.login-page {
  position: relative;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(228, 242, 237, .92) 0%, rgba(239, 245, 249, .94) 42%, rgba(229, 238, 249, .96) 100%),
    var(--paper);
}

body.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .38) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, .32) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .78), rgba(0, 0, 0, .08));
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .78), rgba(0, 0, 0, .08));
}

a {
  color: inherit;
}

.login-page,
.admin-page {
  display: grid;
  align-items: center;
  padding: clamp(16px, 4vw, 48px);
}

.login-page {
  align-items: center;
  min-height: 100vh;
  padding-block: clamp(28px, 6vh, 72px);
}

.login-shell,
.admin-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
}

.login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(22px, 4vw, 34px);
}

.header-actions,
.language-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions form {
  margin: 0;
}

.language-switcher {
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.language-switcher a {
  min-width: 42px;
  padding: 7px 10px;
  border-radius: 5px;
  color: #526071;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.language-switcher a.active {
  color: #ffffff;
  background: #1f6f64;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.login-page .brand {
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--green);
  border-radius: 8px;
  font-size: 26px;
  font-weight: 800;
}

.login-page .brand-mark {
  width: 46px;
  height: 46px;
  background: linear-gradient(145deg, #168864, #235d87);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(33, 56, 79, .18);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.login-page .brand strong {
  color: var(--ink);
  font-size: 18px;
  letter-spacing: .2px;
}

.login-page .brand small {
  color: #596b7a;
  font-size: 13px;
}

.admin-link,
.entry-actions a,
.text-button {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.admin-link {
  padding: 9px 12px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.login-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 28px);
}

.entry-card,
.admin-card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.entry-card {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(22px, 3vw, 34px);
}

.login-page .entry-card {
  isolation: isolate;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 8px;
  box-shadow:
    0 24px 70px rgba(33, 56, 79, .14),
    inset 0 1px 0 rgba(255, 255, 255, .86);
  backdrop-filter: blur(18px);
}

.entry-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 28%),
    linear-gradient(145deg, rgba(30, 141, 105, .2), rgba(33, 56, 79, .1));
}

.login-page .entry-card::before {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .18)),
    linear-gradient(135deg, rgba(30, 141, 105, .14), rgba(47, 111, 187, .06));
}

.login-page .entry-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green), rgba(47, 111, 187, .3));
}

.ddns-entry::before {
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, .82), rgba(255, 255, 255, 0) 30%),
    linear-gradient(145deg, rgba(47, 111, 187, .2), rgba(33, 56, 79, .1));
}

.login-page .ddns-entry::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .18)),
    linear-gradient(135deg, rgba(47, 111, 187, .15), rgba(30, 141, 105, .05));
}

.login-page .ddns-entry::after {
  background: linear-gradient(90deg, var(--blue), rgba(30, 141, 105, .3));
}

.service-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 417px);
  aspect-ratio: 417 / 250;
  object-fit: contain;
  margin: 0 auto 22px;
  border: 1px solid rgba(174, 190, 200, .72);
  border-radius: 8px;
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 16px 34px rgba(33, 56, 79, .14);
}

.login-page .service-logo {
  width: min(100%, 360px);
  margin: 0 auto 24px;
  padding: 16px 18px;
  border: 1px solid rgba(197, 211, 222, .72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(247, 250, 252, .78));
  box-shadow: 0 18px 42px rgba(33, 56, 79, .12);
}

.entry-head,
.login-form,
.entry-actions {
  position: relative;
  z-index: 1;
}

.entry-head {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: auto;
  margin-bottom: 18px;
}

.entry-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  width: max-content;
  padding: 5px 10px;
  color: #fff;
  background: var(--navy);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2px;
}

.login-page .image-entry .entry-badge {
  background: rgba(30, 141, 105, .95);
}

.login-page .ddns-entry .entry-badge {
  background: rgba(47, 111, 187, .95);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: 0;
}

.login-page .entry-head h1,
.login-page .entry-head h2 {
  color: #17212b;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.15;
}

.login-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, .68);
  border: 1px solid rgba(216, 225, 232, .9);
  border-radius: 8px;
  backdrop-filter: blur(8px);
}

.login-page .entry-card > .login-form {
  gap: 16px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
}

.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  background: #fff;
  border: 1px solid #c5d3de;
  border-radius: 6px;
  overflow: hidden;
}

.login-page .password-field,
.login-page .inline-input {
  border-color: rgba(177, 195, 209, .9);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(33, 56, 79, .06);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.login-page .password-field:focus-within,
.login-page .inline-input:focus-within {
  border-color: rgba(47, 111, 187, .82);
  box-shadow: 0 0 0 4px rgba(47, 111, 187, .12), 0 12px 26px rgba(33, 56, 79, .08);
}

.password-field input {
  border: 0;
}

.password-field button {
  min-width: 62px;
  border: 0;
  border-left: 1px solid var(--line);
  background: #f5f8fa;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.login-page .password-field button {
  min-width: 58px;
  background: #f8fbfd;
  color: #32506a;
  font-size: 13px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.login-page .entry-card label {
  gap: 7px;
  color: #536473;
  font-size: 13px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c5d3de;
  border-radius: 6px;
  font: inherit;
}

.login-page .entry-card input {
  min-height: 48px;
  border-color: rgba(177, 195, 209, .9);
  border-radius: 8px;
  color: #17212b;
  box-shadow: 0 10px 22px rgba(33, 56, 79, .06);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.login-page .entry-card > .login-form > label > input:focus,
.login-page .entry-card input:focus {
  box-shadow: 0 0 0 4px rgba(47, 111, 187, .12), 0 12px 26px rgba(33, 56, 79, .08);
  transform: translateY(-1px);
}

input:focus {
  outline: 3px solid rgba(47, 111, 187, .18);
  border-color: var(--blue);
}

.inline-input {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #c5d3de;
  border-radius: 6px;
  overflow: hidden;
}

.inline-input input {
  border: 0;
}

.inline-input span {
  padding: 0 10px;
  color: var(--muted);
  white-space: nowrap;
}

.login-page .inline-input span {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding-inline: 12px;
  background: #f8fbfd;
  border-left: 1px solid var(--line);
  color: #536473;
  font-size: 13px;
  font-weight: 800;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.login-page .entry-card .primary-action {
  min-height: 50px;
  margin-top: 2px;
  border-radius: 8px;
  box-shadow: 0 14px 26px rgba(30, 141, 105, .22);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.login-page .entry-card .primary-action:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(30, 141, 105, .26);
}

.primary-action {
  color: #fff;
  background: var(--green);
}

.ddns-entry .primary-action {
  background: var(--blue);
}

.login-page .ddns-entry .primary-action {
  box-shadow: 0 14px 26px rgba(47, 111, 187, .22);
}

.login-page .ddns-entry .primary-action:hover {
  box-shadow: 0 18px 34px rgba(47, 111, 187, .26);
}

.secondary-action {
  color: var(--navy);
  background: #fff;
  border-color: var(--line);
}

.full {
  width: 100%;
}

.entry-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 0 4px;
  font-size: 14px;
}

.login-page .entry-actions a {
  color: #32506a;
  font-size: 13px;
  font-weight: 800;
  text-underline-offset: 4px;
}

.login-page .entry-actions a:hover {
  text-decoration: underline;
}

.ddns-entry .entry-actions {
  justify-content: flex-end;
}

.admin-shell {
  max-width: 760px;
}

.admin-shell.wide {
  max-width: 1180px;
}

.admin-card {
  padding: clamp(22px, 5vw, 40px);
}

.dashboard-card {
  width: 100%;
  max-width: none;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.table-header p {
  margin-bottom: 0;
  color: var(--muted);
}

.table-header.compact {
  margin-bottom: 14px;
}

.table-header h2 {
  margin: 0;
  color: var(--navy);
  font-size: 24px;
}

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

.admin-grid article {
  display: grid;
  gap: 4px;
  min-height: 110px;
  padding: 16px;
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-grid strong {
  font-size: 20px;
}

.admin-grid span,
.message {
  color: var(--muted);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.admin-tabs a,
.admin-tabs button {
  min-height: 38px;
  padding: 8px 12px;
  color: var(--navy);
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.admin-tabs .active {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}

.group-tabs {
  margin-bottom: 10px;
}

.group-tabs button {
  min-width: 140px;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-search {
  display: grid;
  grid-template-columns: minmax(220px, 420px) auto auto;
  align-items: end;
  gap: 10px;
  width: 100%;
}

.admin-search label,
.pagination-bar label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-search input,
.pagination-bar input {
  min-height: 38px;
  border: 1px solid #c5d3de;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

.admin-editor {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mail-settings-panel {
  display: grid;
  gap: 16px;
}

.mail-settings-form {
  display: grid;
  gap: 16px;
}

.mode-options,
.settings-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}

.mode-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.mode-options legend {
  padding: 0 6px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.mode-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-weight: 800;
}

.settings-section {
  padding: 16px;
}

.settings-section h3 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 18px;
}

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

.mail-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mail-form-grid input,
.mail-form-grid select {
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #c5d3de;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

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

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

.secondary-action.danger {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.data-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  white-space: nowrap;
}

.data-table th {
  color: var(--navy);
  background: #edf3f7;
  font-weight: 800;
}

.sort-button {
  display: inline-block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.page-jump-form {
  display: inline-flex;
  align-items: end;
  gap: 8px;
}

.pagination-bar span {
  min-width: 220px;
  text-align: center;
}

.pagination-bar input {
  width: 86px;
}

.pagination-bar button:disabled,
.pagination-bar .disabled {
  opacity: .48;
  cursor: not-allowed;
  pointer-events: none;
}

.text-action {
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.message {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.message.error {
  color: var(--red);
  border-color: rgba(181, 77, 67, .35);
}

.inline-alert {
  padding: 13px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.inline-alert.error {
  color: #7f1d1d;
  background: #fff1f0;
  border: 2px solid #d94b43;
  box-shadow: 0 10px 26px rgba(181, 77, 67, .2);
}

.ddns-manager {
  margin-bottom: 20px;
  padding: 18px;
}

.service-manager-panel {
  width: 100%;
  padding: clamp(24px, 4vw, 40px);
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.76);
  box-shadow: 0 24px 70px rgba(33, 56, 79, 0.14);
  backdrop-filter: blur(18px);
}

.service-manager-panel .table-header h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.password-reset-card {
  width: min(560px, 100%);
  margin: 0 auto 24px;
}

.password-reset-card > h1 {
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.password-reset-card > p {
  margin: 0 0 20px;
  color: var(--muted);
}

.ddns-update-form {
  margin-top: 14px;
}

.ddns-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  padding: 12px;
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ddns-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.image-manager-panel {
  display: grid;
  gap: 18px;
}

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

.image-account-summary div {
  padding: 12px;
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.image-account-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.image-account-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.image-camera-list {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.image-camera-list table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.image-camera-list th,
.image-camera-list td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  white-space: nowrap;
}

.image-camera-list th {
  color: var(--muted);
  background: #f7fafc;
  font-weight: 800;
}

.image-camera-list tr:last-child td {
  border-bottom: 0;
}

.image-manager-actions {
  display: flex;
  justify-content: flex-end;
}

.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 33, 43, .45);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: min(720px, 92vh);
  overflow: auto;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal-panel h2 {
  margin-bottom: 18px;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 700;
  line-height: 1.22;
}

.flow-form {
  background: linear-gradient(180deg, rgba(230, 239, 246, .92), rgba(214, 229, 238, .92));
  gap: 12px;
}

.flow-row {
  grid-template-columns: minmax(220px, 300px) minmax(260px, 1fr) minmax(280px, 1.35fr);
  align-items: center;
  column-gap: 18px;
  row-gap: 0;
  min-height: 48px;
}

.flow-row > span:first-child {
  color: #69596d;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  text-align: right;
}

.flow-row .field-note {
  color: #69596d;
  white-space: pre-line;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.22;
}

.image-register input,
.ddns-activate input {
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 0;
  border-color: #9da6ad;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.flow-steps span {
  padding: 7px 12px;
  color: var(--navy);
  background: rgba(255, 255, 255, .74);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.flow-intro,
.flow-footer,
.accept-copy {
  color: #69596d;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.flow-intro,
.flow-footer {
  margin-bottom: 0;
  text-align: center;
}

.accept-copy {
  margin: 8px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(105, 89, 109, .38);
}

.terms-box {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  padding: 10px;
  border: 3px double #998899;
  background: #fff;
  color: #000;
  font: 14px/1.42 Consolas, "Courier New", monospace;
}

.accept-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.accept-row input {
  width: 18px;
  min-height: 18px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: 360px;
  padding: 14px 16px;
  color: #fff;
  background: var(--navy);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: translateY(120px);
  opacity: 0;
  transition: .2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 860px) {
  .login-grid,
  .admin-grid,
  .admin-form-grid,
  .mail-form-grid {
    grid-template-columns: 1fr;
  }

  .login-page {
    align-items: start;
  }

  .login-page .entry-card {
    padding: 22px;
  }

  .login-page .service-logo {
    width: min(100%, 320px);
    margin-bottom: 18px;
  }

  .entry-card {
    min-height: 0;
  }

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

  .flow-row > span:first-child {
    text-align: left;
  }

  .flow-row .field-note {
    font-size: 14px;
  }

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

  .image-account-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .login-header {
    align-items: flex-start;
  }

  .header-actions {
    align-items: flex-end;
    flex-direction: column;
  }

  .language-switcher a {
    min-width: 38px;
    padding-inline: 8px;
  }

  .login-page,
  .admin-page {
    align-items: start;
    padding: 14px;
  }

  .login-page {
    padding-block: 18px;
  }

  .login-header,
  .table-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-page .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .entry-card {
    min-height: 0;
  }

  .entry-head {
    gap: 10px;
  }

  .login-page .entry-head h1,
  .login-page .entry-head h2 {
    font-size: 28px;
  }

  .login-page .service-logo {
    width: 100%;
    padding: 12px;
  }

  .entry-actions {
    flex-wrap: wrap;
  }
}
