body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  background: var(--theme-background);
  color: #18395e;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.app-shell {
  width: min(1720px, calc(100vw - 24px));
  margin: 0 auto;
  padding: clamp(18px, 2vw, 34px) 0 52px;
  display: grid;
  gap: clamp(18px, 1.8vw, 28px);
  position: relative;
}

.app-shell::before,
.app-shell::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(18px);
  opacity: 0.3;
  z-index: 0;
  animation: floatBlob 12s ease-in-out infinite;
}

.app-shell::before {
  top: 8vh;
  right: -80px;
  background: radial-gradient(circle, rgba(24, 167, 155, 0.36), transparent 68%);
}

.app-shell::after {
  bottom: 6vh;
  left: -90px;
  background: radial-gradient(circle, rgba(15, 47, 92, 0.26), transparent 68%);
  animation-delay: -6s;
}

.card {
  background: var(--theme-surface);
  border: 1px solid rgba(24, 57, 94, 0.1);
  border-radius: 30px;
  box-shadow: 0 24px 80px rgba(24, 57, 94, 0.12);
  position: relative;
  z-index: 1;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
  content-visibility: auto;
  contain-intrinsic-size: 420px;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 88px rgba(24, 57, 94, 0.16);
}

.card-body {
  padding: clamp(18px, 2vw, 30px);
}

.hero {
  background: var(--theme-hero-background);
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% auto auto -8%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
  animation: floatBlob 14s ease-in-out infinite;
  pointer-events: none;
}

.hero-grid,
.main-grid,
.lower-grid,
.auth-grid {
  display: grid;
  gap: clamp(18px, 1.8vw, 28px);
}

.hero-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.5fr) minmax(360px, 0.75fr);
}

.hero-photo-card {
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(8, 20, 37, 0.12) 0%, rgba(8, 20, 37, 0.24) 100%),
    var(--theme-hero-photo) center center / cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.16);
  animation: tiltCard 10s ease-in-out infinite;
}

.main-grid {
  grid-template-columns: minmax(380px, 0.85fr) minmax(0, 1.15fr);
}

.lower-grid {
  grid-template-columns: minmax(360px, 0.78fr) minmax(0, 1.22fr);
}

.auth-grid {
  max-width: 1100px;
  margin: 7vh auto 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.brand img {
  width: clamp(180px, 20vw, 340px);
  height: auto;
}

.brand-mark,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.86rem;
  font-weight: 800;
}

.brand-mark {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chip {
  background: rgba(15, 47, 92, 0.08);
  color: var(--theme-ink);
}

.chip.good {
  background: rgba(24, 121, 78, 0.12);
  color: #18794e;
}

.chip.warn {
  background: rgba(160, 90, 0, 0.14);
  color: #9a5e09;
}

.chip.muted {
  background: rgba(102, 122, 146, 0.12);
  color: #667a92;
}

.hero h1,
.card h2,
.card h3 {
  margin: 0;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.4vw, 4.8rem);
  line-height: 0.96;
  max-width: 10ch;
  margin-bottom: 14px;
}

.hero p,
.hero li {
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.72;
}

.auth-login-card,
.auth-login-card h2,
.auth-login-card label,
.auth-login-card .visibility-item span {
  color: var(--theme-ink);
}

.hero .auth-login-card,
.hero .auth-login-card p,
.hero .auth-login-card label,
.hero .auth-login-card span,
.hero .auth-login-card h2,
.hero .auth-login-card .muted,
.hero .auth-login-card .auth-form-intro,
.hero .auth-login-card .auth-passkey-help {
  color: var(--theme-ink) !important;
}

.hero .auth-login-card .btn,
.hero .auth-login-card .btn-secondary,
.hero .auth-login-card .btn-ghost {
  color: var(--theme-ink);
}

.hero .auth-login-card .btn-secondary,
.hero .auth-login-card .btn-ghost {
  background: rgba(15, 47, 92, 0.08);
  border-color: rgba(15, 47, 92, 0.14);
}

.auth-login-card .muted,
.auth-form-intro,
.auth-passkey-help {
  color: #5f7692;
  line-height: 1.65;
}

.auth-login-card input,
.auth-login-card input::placeholder {
  color: #18395e;
}

.auth-login-card .visibility-item input {
  accent-color: var(--theme-accent);
}

.auth-login-card .field label,
.auth-login-card .visibility-item,
.auth-login-card .visibility-item span,
.auth-login-card .muted,
.auth-login-card h2 {
  opacity: 1;
}

.auth-form-intro {
  margin: 10px 0 18px;
  font-weight: 600;
}

:focus-visible {
  outline: 3px solid #056e78;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.toolbar,
.row-actions,
.chip-row,
.title-row,
.auth-actions,
.modal-panels {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.toolbar {
  align-items: center;
  gap: 10px;
}

.title-row {
  justify-content: space-between;
  align-items: start;
}

.btn,
.btn-secondary,
.btn-ghost,
.btn-inline {
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn {
  background: linear-gradient(135deg, #ffffff 0%, #e8fbf7 100%);
  color: #0f2f5c;
  border-color: rgba(24, 167, 155, 0.16);
  box-shadow: 0 10px 24px rgba(15, 47, 92, 0.12);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.94);
  color: #0f2f5c;
  border-color: rgba(15, 47, 92, 0.12);
  box-shadow: 0 8px 18px rgba(15, 47, 92, 0.08);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #0f2f5c;
  border-color: rgba(15, 47, 92, 0.12);
  box-shadow: none;
}

.hero .btn-secondary,
.hero .btn-ghost {
  color: #f6fbff;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.btn-inline {
  min-height: 34px;
  padding: 0 12px;
  background: rgba(15, 47, 92, 0.08);
  color: var(--theme-ink);
  border-color: rgba(15, 47, 92, 0.08);
}

.toolbar .btn,
.toolbar .btn-secondary,
.toolbar .btn-ghost {
  min-width: 0;
}

.hero-toolbar-groups {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.toolbar-group-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.toolbar-group-card .muted {
  color: rgba(255, 255, 255, 0.78);
}

.toolbar-group {
  width: 100%;
  margin-top: 12px;
}

.loading-state {
  margin-top: 14px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.32);
  border-top-color: #fff;
  animation: buttonSpin 0.85s linear infinite;
}

.btn[data-loading="1"],
.btn-secondary[data-loading="1"],
.btn-ghost[data-loading="1"],
.btn-inline[data-loading="1"] {
  position: relative;
  pointer-events: none;
  opacity: 0.92;
}

.btn[data-loading="1"]::before,
.btn-secondary[data-loading="1"]::before,
.btn-ghost[data-loading="1"]::before,
.btn-inline[data-loading="1"]::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.32);
  border-top-color: currentColor;
  animation: buttonSpin 0.85s linear infinite;
}

.btn:hover,
.btn-secondary:hover,
.btn-ghost:hover,
.btn-inline:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 47, 92, 0.14);
}

.btn:focus-visible,
.btn-secondary:focus-visible,
.btn-ghost:focus-visible,
.btn-inline:focus-visible {
  outline: none;
  border-color: rgba(24, 167, 155, 0.6);
  box-shadow: 0 0 0 4px rgba(24, 167, 155, 0.14);
}

.btn:disabled,
.btn-secondary:disabled,
.btn-ghost:disabled,
.btn-inline:disabled {
  opacity: 1;
  cursor: wait;
  transform: none;
}

.field-grid,
.kpi-grid,
.result-grid,
.visibility-grid {
  display: grid;
  gap: 14px;
}

.field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(15, 47, 92, 0.1);
  background: rgba(255, 255, 255, 0.84);
}

.field.span-2 {
  grid-column: 1 / -1;
}

.field label {
  font-weight: 800;
}

.field-label-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tooltip-trigger {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 47, 92, 0.1);
  color: var(--theme-ink);
  font-weight: 800;
  cursor: pointer;
  position: relative;
  z-index: 3;
  box-shadow: 0 10px 24px rgba(15, 47, 92, 0.14);
}

.tooltip-trigger:hover,
.tooltip-trigger:focus-visible {
  transform: translateY(-1px);
}

.tooltip-trigger::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) scale(0.96);
  min-width: 220px;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #0f2f5c;
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 14px 34px rgba(15, 47, 92, 0.24);
  z-index: 10;
}

.tooltip-trigger:hover::after,
.tooltip-trigger:focus-visible::after,
.tooltip-trigger.is-open::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.tooltip-bubble {
  position: fixed;
  max-width: 300px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #0f2f5c;
  color: #fff;
  font-size: 0.84rem;
  line-height: 1.5;
  box-shadow: 0 18px 42px rgba(15, 47, 92, 0.26);
  z-index: 9999;
  pointer-events: none;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid rgba(15, 47, 92, 0.18);
  border-radius: 16px;
  padding: 14px 15px;
  background: #fff;
  color: #18395e;
  font: inherit;
  box-sizing: border-box;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 0;
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 4px rgba(46, 196, 182, 0.15);
}

.help,
.muted {
  color: #6a7f96;
  line-height: 1.55;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 26px;
}

.kpi {
  min-height: 120px;
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.kpi strong {
  display: block;
  font-size: 2rem;
  margin-bottom: 10px;
}

.link-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.link-row input {
  flex: 1 1 260px;
}

.status {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 700;
}

.status.success {
  background: rgba(24, 121, 78, 0.22);
}

.status.warn {
  background: rgba(160, 90, 0, 0.24);
}

.status.error {
  background: rgba(161, 38, 38, 0.24);
}

.result-list,
.user-admin-list {
  display: grid;
  gap: 16px;
}

.result-card,
.user-admin-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(15, 47, 92, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 251, 254, 0.96) 100%);
}

.result-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.result-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(15, 47, 92, 0.04);
}

.result-item strong {
  display: block;
  margin-bottom: 6px;
}

.wizard-nav {
  margin-top: 10px;
}

.compact-sync-shell {
  display: grid;
  gap: 12px;
  padding: clamp(18px, 2vw, 26px);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(221, 247, 243, 0.16) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
}

.compact-hero-shell {
  max-width: 840px;
  margin: 0 auto;
}

.compact-hero-body {
  display: grid;
  gap: 18px;
}

.compact-toolbar {
  justify-content: flex-end;
}

.compact-sync-row {
  display: grid;
  grid-template-columns: auto minmax(180px, 420px) auto;
  gap: 12px;
  align-items: center;
}

.compact-sync-label {
  font-weight: 800;
}

.compact-sync-row input {
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  padding: 0 18px;
  font: inherit;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 32px rgba(15, 47, 92, 0.12);
}

.preview-pane {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 250, 248, 0.96) 100%);
  border: 1px solid rgba(15, 47, 92, 0.08);
}

.preview-pane-wide {
  grid-column: 1 / -1;
}

.preview-pane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.preview-issues-list {
  display: grid;
  gap: 14px;
}

.preview-issue-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(15, 47, 92, 0.05);
  border: 1px solid rgba(15, 47, 92, 0.08);
}

.preview-issue-copy {
  display: grid;
  gap: 6px;
  flex: 1 1 320px;
}

.preview-issue-copy p {
  margin: 0;
  color: rgba(15, 47, 92, 0.76);
}

.preview-issue-open-button {
  align-self: start;
}

.admin-chat-actions {
  align-items: start;
}

.scheduler-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(241,250,248,0.96) 100%);
}

.scheduler-form .field input[type="time"],
.scheduler-form .field select {
  min-height: 48px;
}

@keyframes floatBlob {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -16px, 0) scale(1.06); }
}

@keyframes tiltCard {
  0%, 100% { transform: rotate(-0.4deg) translateY(0); }
  50% { transform: rotate(0.5deg) translateY(-4px); }
}

@keyframes buttonSpin {
  to { transform: rotate(360deg); }
}

.result-modal-sheet {
  width: min(880px, 100%);
}

.modal-sheet .title-row,
.modal-sheet .chip-row,
.modal-sheet .auth-actions {
  align-items: center;
}

.visibility-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.visibility-panel {
  padding: 18px;
  border: 1px solid rgba(15, 47, 92, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
}

.visibility-list,
.permissions-matrix {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow: auto;
}

.permissions-matrix {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.visibility-item {
  display: flex;
  gap: 10px;
  align-items: center;
}

.payload pre,
.log-list {
  margin: 0;
  border-radius: 22px;
}

.payload pre {
  min-height: 460px;
  max-height: 900px;
  overflow: auto;
  padding: 24px;
  background: #081a35;
  color: #d7e6fa;
}

.log-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}

.log-list li {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 47, 92, 0.1);
  background: rgba(15, 47, 92, 0.03);
}

.section-order-list {
  display: grid;
  gap: 10px;
}

.section-order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 47, 92, 0.06);
  cursor: move;
}

.section-order-item.dragging {
  opacity: 0.4;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(6, 18, 35, 0.52);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-sheet {
  width: min(1100px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 47, 92, 0.12);
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(7, 20, 41, 0.24);
  padding: 24px;
}

.modal-panels {
  display: block;
  margin-top: 16px;
}

.modal-panel {
  display: block;
}

.wizard-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(24, 167, 155, 0.12) 0%, rgba(15, 47, 92, 0.06) 100%);
  border: 1px solid rgba(24, 167, 155, 0.18);
}

.wizard-intro-soft {
  background: linear-gradient(135deg, rgba(24, 167, 155, 0.1) 0%, rgba(221, 247, 243, 0.9) 100%);
}

.wizard-intro p {
  margin: 0;
  flex: 1 1 320px;
}

.step-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--theme-ink);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quick-preview-form .field {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 250, 249, 0.94) 100%);
  border-color: rgba(24, 167, 155, 0.16);
}

.quick-preview-form .field:nth-child(odd) {
  transform: rotate(-0.25deg);
}

.quick-preview-form .field:nth-child(even) {
  transform: rotate(0.25deg);
}

.quick-preview-form .field:focus-within {
  box-shadow: 0 18px 32px rgba(24, 167, 155, 0.12);
}

.modal-sheet.minimized .modal-panels {
  display: none;
}

.modal-sheet.minimized .modal-panel,
.modal-sheet.minimized .auth-actions,
.modal-sheet.minimized .wizard-nav {
  display: none;
}

.modal-sheet.minimized {
  width: min(540px, 100%);
}

.hidden {
  display: none !important;
}

.auth-copy {
  display: grid;
  gap: 16px;
}

.login-photo-panel {
  min-height: clamp(420px, 62vh, 760px);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(8, 20, 37, 0.04) 0%, rgba(8, 20, 37, 0.18) 100%),
    var(--theme-login-photo) center center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 22px 60px rgba(7, 20, 41, 0.18);
}

.auth-copy .login-photo-panel::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border-radius: inherit;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(8, 20, 37, 0.02), rgba(8, 20, 37, 0.14));
}

.user-photo-panel {
  min-height: 240px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(8, 20, 37, 0.06) 0%, rgba(8, 20, 37, 0.18) 100%),
    var(--theme-user-photo) center center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 18px 42px rgba(7, 20, 41, 0.16);
}

.card-collapsed > :not(.title-row) {
  display: none !important;
}

.flash {
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
  background: rgba(160, 90, 0, 0.12);
  color: #9a5e09;
}

.flash.error {
  background: rgba(161, 38, 38, 0.12);
  color: #a12626;
}

@media (max-width: 1280px) {
  .hero-grid,
  .main-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-copy { order: 2; }
  .field-grid,
  .kpi-grid,
  .result-grid,
  .visibility-grid,
  .permissions-matrix {
    grid-template-columns: 1fr;
  }

  .title-row,
  .result-top,
  .link-row {
    flex-direction: column;
  }

  .toolbar {
    flex-direction: column;
  }

  .compact-sync-row {
    grid-template-columns: 1fr;
  }

  .auth-grid {
    max-width: 100%;
    margin-top: 0;
    gap: 18px;
  }

  .login-photo-panel {
    min-height: 220px;
  }

  .auth-login-card .auth-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .btn-secondary,
  .btn-ghost {
    width: 100%;
  }
}
