:root {
  --bg: #0f172a;
  --panel: #111827;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #2563eb;
  --danger: #dc2626;
  --success: #059669;
  --focus: #111827;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  color: var(--text);
  line-height: 1.55;
}
a, button, input, textarea, select { -webkit-tap-highlight-color: transparent; }
a, button, .btn, .switch-pill {
  -webkit-touch-callout: none;
  user-select: none;
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  z-index: 9999;
  background: #fff;
  color: #000;
  padding: 10px 14px;
  border-radius: 10px;
}
.skip-link:focus { left: 10px; }
.header {
  background: var(--bg);
  color: #fff;
  padding: 20px 16px;
}
.header-inner, .container {
  max-width: 1024px;
  margin: 0 auto;
}
.container.narrow { max-width: 560px; }
.header h1 { margin: 0 0 6px; font-size: 28px; }
.header p { margin: 0; color: #cbd5e1; }
.nav {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.nav a {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.2);
  padding: 10px 14px;
  border-radius: 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.container { padding: 20px 16px 40px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  margin-bottom: 18px;
}
.inner-card { margin-bottom: 14px; background: #fcfdff; }
.card h1, .card h2, .card h3 { margin-top: 0; }
.grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 860px) {
  .grid.two { grid-template-columns: 1.2fr .8fr; }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
}
label {
  display: block;
  font-weight: 700;
  margin: 14px 0 8px;
}
input[type="file"], input[type="password"], input[type="text"], textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 16px;
  background: #fff;
  color: var(--text);
}
textarea.copybox {
  min-height: 96px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
button, .btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-height: 44px;
}
.btn.secondary { background: #475569; }
.btn.success { background: var(--success); }
.btn.danger { background: var(--danger); }
.muted { color: var(--muted); }
.alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.meta {
  display: grid;
  grid-template-columns: minmax(110px, 140px) 1fr;
  gap: 10px 14px;
}
.meta div {
  padding: 8px 0;
  border-bottom: 1px dashed #e5e7eb;
  min-width: 0;
}
.meta .k { color: var(--muted); font-weight: 600; }
.meta-wide { grid-template-columns: minmax(90px, 120px) 1fr; }
.table-wrap { overflow: auto; }
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}
th { color: #475569; font-weight: 700; }
.code {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 12px;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.compact-actions { margin-top: 0; }
.small { font-size: 13px; }
.smallish { font-size: 18px; }
.footer { text-align: center; color: #64748b; font-size: 13px; padding-top: 10px; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  z-index: 9998;
}
.modal-card {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 520px);
  background: #fff;
  border: 1px solid #dbe3f0;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  z-index: 9999;
}
.modal-card h2 {
  margin: 0 0 10px;
}
.modal-card p {
  margin-top: 0;
}
.sheet-trigger-wrap {
  margin: 0 0 16px;
}
.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: min(100%, 720px);
  margin: 0 auto;
  background: #fff;
  border-radius: 20px 20px 0 0;
  border: 1px solid #dbe3f0;
  border-bottom: 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -16px 40px rgba(15, 23, 42, 0.18);
  z-index: 9999;
}
.sheet-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
}
.sheet-list {
  display: grid;
  gap: 10px;
}
.sheet-link,
.sheet-action {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  border-radius: 14px;
}
.floating-action-wrap {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 9997;
  pointer-events: none;
}
.floating-action-btn {
  min-width: 0;
  padding: 12px 14px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  pointer-events: auto;
}
.settings-jump-card .actions {
  justify-content: flex-start;
}
.toolbar {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.wrap-start { align-items: flex-start; }
.record-list { display: grid; gap: 14px; }
.stat-card { text-align: center; }
.stat-card h2 { font-size: 16px; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 800; }
.break-all { word-break: break-all; }
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-weight: 700;
}
.checkbox-row input {
  width: 20px;
  height: 20px;
  margin: 0;
}
.settings-subgroup {
  padding: 14px 0 6px;
  border-top: 1px dashed #dbe3f0;
}
.settings-subgroup:first-of-type {
  border-top: 0;
  padding-top: 4px;
}
.settings-status-card {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f8fbff;
  display: grid;
  gap: 6px;
}
.inline-actions {
  margin-top: 10px;
}
.compact-list {
  display: grid;
  gap: 10px;
}
.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.title-row h2,
.title-row h3 {
  margin: 0;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}
.status-badge.info {
  color: #075985;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}
.detail-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed #dbe3f0;
}
.detail-section h3 {
  margin: 0 0 12px;
  font-size: 18px;
}
.section-intro {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}
.section-intro h2 {
  margin: 0 0 6px;
  font-size: 22px;
}
.section-intro p {
  margin: 0;
  color: #475569;
}
.section-index {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #dbe3f0;
  border-radius: 16px;
  background: #f8fbff;
}
.section-index-title {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 800;
  color: #334155;
}
.section-index-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.section-index-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
}
.section-index-link:hover {
  background: #eef6ff;
}
.settings-group {
  margin: 0 0 18px;
  padding: 14px 16px 18px;
  border: 1px solid #dbe3f0;
  border-radius: 18px;
  background: #fbfdff;
}
.settings-group legend {
  padding: 0 8px;
  font-weight: 800;
  font-size: 17px;
  color: #0f172a;
}
.group-hint {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 14px;
}
.device-auth-card {
  margin: 6px 0 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}
.device-auth-title {
  display: block;
  font-size: 16px;
  font-weight: 800;
}
.device-auth-text,
.device-auth-hint {
  margin: 8px 0 0;
}
.device-auth-text {
  color: #0f172a;
}
.device-auth-hint {
  color: #475569;
  font-size: 14px;
}
.device-auth-bound {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
}
.device-auth-ready {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
}
.device-auth-idle {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffdf5 0%, #fffbeb 100%);
}
.settings-group > label:first-of-type,
.settings-group > .checkbox-row:first-of-type {
  margin-top: 8px;
}
.settings-sublist {
  margin-top: 14px;
}
.dylib-list {
  margin-top: 12px;
}
.compact-option {
  align-items: flex-start;
  font-weight: 600;
  padding: 10px 12px;
  border: 1px solid #dbe3f0;
  border-radius: 12px;
  background: #f8fbff;
}
.compact-option span {
  word-break: break-word;
}
.spacer { height: 12px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 640px) {
  .header h1 { font-size: 24px; }
  .meta, .meta-wide { grid-template-columns: 1fr; }
  .meta .k, .meta-wide .k { padding-bottom: 0; border-bottom: 0; }
  .section-index-list { gap: 8px; }
  .section-index-link { width: 100%; justify-content: center; }
  .floating-action-btn { width: auto; max-width: calc(100vw - 32px); }
}

.app-hero { text-align: center; }
.app-icon {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  object-fit: cover;
  display: block;
  margin: 0 auto 14px;
  border: 1px solid #dbeafe;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}
.small-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin: 0;
}
.record-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.search-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.search-form input {
  min-width: min(380px, 100%);
}
@media (min-width: 860px) {
  .grid.four { grid-template-columns: repeat(4, 1fr); }
}


input[type="file"]{padding:14px;}
button, .btn { min-height: 50px; font-size: 17px; border-radius: 14px; }
.nav a { min-height: 50px; font-size: 17px; }
.header { padding: 16px; }
.header-inner > p:empty { display:none; }
.record-head h3{margin:0 0 4px;font-size:22px;}
.record-head .small{font-size:14px;}
.meta div{font-size:17px; line-height:1.6;}
.meta .k{font-size:15px;}
.search-form input{font-size:17px;}
.card{border-radius:22px;padding:20px;}
@media (max-width:640px){ .container{padding:16px 12px 28px;} .card{padding:16px;} .header h1{font-size:22px;} button,.btn{width:100%;} .actions .btn{width:100%;} .search-form{width:100%;} .search-form input{min-width:100%;} }
@media (max-width:640px){ .section-intro{padding:14px 16px;} .section-intro h2{font-size:20px;} .settings-group{padding:12px 14px 16px;} }


.actions.stack-mobile .btn,
.actions.stack-mobile button {
  flex: 1 1 220px;
}
.modal-backdrop[hidden] { display: none !important; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}
.modal-card {
  width: min(100%, 460px);
  background: #fff;
  color: var(--text);
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
  padding: 20px;
}
.modal-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}
.modal-card p {
  margin: 0 0 12px;
}
@media (max-width: 640px) {
  .actions.stack-mobile {
    flex-direction: column;
  }
  .actions.stack-mobile .btn,
  .actions.stack-mobile button {
    width: 100%;
  }
}


.upload-progress {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
}
.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.progress-bar {
  width: 100%;
  height: 12px;
  background: #dbeafe;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: #2563eb;
  transition: width .2s ease;
}
button[disabled], .btn[aria-disabled="true"] {
  opacity: .7;
  cursor: not-allowed;
}
.center-actions { justify-content: center; }

.admin-app {
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

.with-tabbar {
  padding-bottom: calc(132px + env(safe-area-inset-bottom));
}

.bottom-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(6px);
}

.bottom-tabbar a {
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.68);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(14px, 3.2vw, 16px);
  line-height: 1.2;
  text-align: center;
  padding: 10px 8px;
}

.bottom-tabbar a.active {
  color: #fff;
  background: #2563eb;
  border-color: #3b82f6;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.admin-nav-launcher {
  margin: 0 auto 16px;
  width: min(100% - 32px, 980px);
  padding: 0 16px;
  box-sizing: border-box;
}

body.admin-nav-open {
  overflow: hidden;
}

.admin-nav-trigger {
  min-width: 120px;
  min-height: 52px;
  border-radius: 16px;
  padding: 12px 14px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.admin-nav-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-nav-current {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  color: #334155;
  font-weight: 700;
}

.admin-nav-backdrop[hidden],
.admin-nav-dialog[hidden] {
  display: none !important;
}

.admin-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  z-index: 1100;
}

.admin-nav-dialog {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(92vw, 420px);
  background: #fff;
  border: 1px solid #dbe3f0;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
  padding: 18px;
  z-index: 1101;
  max-height: min(78vh, 560px);
  overflow: auto;
}

.admin-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-nav-head h2 {
  margin: 0;
  font-size: 22px;
}

.admin-nav-close {
  min-width: 88px;
}

.admin-nav-list {
  display: grid;
  gap: 10px;
}

.admin-nav-link {
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid #dbe3f0;
  background: #f8fbff;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  text-align: center;
}

.admin-nav-link.active,
.admin-nav-link[aria-current="page"] {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1d4ed8;
}

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

.stat-mini {
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 10px 12px;
  background: #f8fbff;
}

.stat-mini .label {
  color: #64748b;
  display: block;
  font-size: 13px;
}

.stat-mini strong {
  display: block;
  font-size: 21px;
  margin-top: 4px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.form-divider {
  height: 1px;
  margin: 18px 0 8px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.22), rgba(148, 163, 184, 0.14));
}

.top-switcher {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.switch-pill {
  text-decoration: none;
  color: var(--text);
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 999px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.switch-pill.active {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1d4ed8;
  font-weight: 700;
}

.fold-card {
  margin-top: 16px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 12px 14px;
  background: #f8fbff;
}

.fold-card summary {
  cursor: pointer;
  font-weight: 700;
}

.bottom-links {
  padding-top: 0;
}

.bottom-links-card {
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.button-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.button-link {
  width: 100%;
}

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

.stack-mobile-actions > .btn,
.stack-mobile-actions > form {
  flex: 1 1 220px;
}

.auth-stats {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.auth-bulk-panel {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.auth-bulk-panel h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.auth-bulk-panel p {
  margin: 0;
}

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

.auth-status-stack {
  display: grid;
  gap: 18px;
}

.auth-status-block {
  display: grid;
  gap: 14px;
}

.auth-status-intro {
  margin-bottom: 0;
}

.auth-days-group {
  border: 1px solid #dbe3f0;
  border-radius: 18px;
  background: #fcfdff;
  padding: 16px;
}

.auth-days-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.auth-days-head h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.auth-days-head p {
  margin: 0;
}

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

.auth-code-card {
  padding-top: 16px;
}

.auth-code-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.auth-code-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 700;
  min-height: 44px;
}

.auth-code-pick input {
  width: 22px;
  height: 22px;
  margin: 0;
}

.auth-code-meta {
  margin-top: 6px;
}

.auth-shell {
  display: grid;
  gap: 18px;
}

.auth-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.auth-view-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  flex: 1 1 auto;
}

.auth-view-tab {
  display: grid;
  gap: 4px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  min-height: 58px;
  padding: 10px 12px;
  text-align: center;
}

.auth-view-tab strong {
  font-size: 18px;
}

.auth-view-tab.active {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1d4ed8;
  font-weight: 800;
}

.auth-chooser-block,
.auth-chooser-form,
.auth-row-action-form {
  display: grid;
  gap: 8px;
}

.auth-chooser-block {
  min-width: 140px;
}

.auth-chooser-select,
.auth-row-action-select {
  min-height: 50px;
  font-size: 16px;
}

.auth-intro {
  margin-bottom: 0;
}

.auth-search-form {
  margin-top: -4px;
}

.auth-summary-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-summary-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  color: #334155;
  font-weight: 700;
}

.auth-selection-status {
  margin-top: -4px;
}

.auth-row-list {
  display: grid;
  gap: 12px;
}

.auth-row-card {
  border: 1px solid #dbe3f0;
  border-radius: 18px;
  background: #fcfdff;
  padding: 16px;
}

.auth-row-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.auth-row-pick {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
}

.auth-row-pick input {
  width: 22px;
  height: 22px;
  margin: 0;
}

.auth-row-content {
  flex: 1 1 auto;
  min-width: 0;
}

.auth-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.auth-row-head h3 {
  margin: 0;
}

.auth-row-grid {
  display: grid;
  gap: 10px 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-row-grid div {
  display: grid;
  gap: 4px;
}

.auth-row-grid .k {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.frontend-mode-picker {
  min-height: 54px;
  font-size: 17px;
  font-weight: 700;
  background: #f8fbff;
  border-color: #93c5fd;
}

.auth-row-inline-more {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.auth-inline-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  color: #475569;
  font-size: 13px;
}

.auth-generate-form {
  margin-bottom: 0;
}

@media (max-width: 420px) {
  .admin-nav-launcher {
    width: calc(100% - 24px);
    padding: 0 12px;
  }
  .admin-nav-trigger {
    width: 100%;
  }
  .admin-nav-inline {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-nav-dialog {
    width: calc(100vw - 24px);
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    transform: none;
  }
}

@media (max-width: 640px) {
  .auth-topbar,
  .auth-view-tabs,
  .auth-bulk-actions,
  .auth-days-actions {
    flex-direction: column;
  }
  .auth-view-tabs {
    grid-template-columns: 1fr;
  }
  .auth-chooser-block,
  .auth-chooser-form,
  .auth-chooser-select,
  .auth-row-action-form,
  .auth-row-action-select {
    width: 100%;
  }
  .auth-row-main,
  .auth-row-head,
  .auth-row-inline-more {
    flex-direction: column;
  }
  .auth-row-grid {
    grid-template-columns: 1fr;
  }
  .auth-bulk-actions .btn,
  .auth-days-actions .btn,
  .stack-mobile-actions > form,
  .stack-mobile-actions > .btn {
    width: 100%;
  }
  .auth-code-top {
    flex-direction: column;
  }
  .modal-card {
    padding: 18px;
  }
}
