html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: "Segoe UI", "PingFang TC", sans-serif;
  margin: 0;
  padding: 0 max(16px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: #f6f7f9;
  color: #222;
  min-height: 100vh;
  min-height: 100dvh;
}
body.is-logged-in {
  padding: 0;
  background: #e5e7eb;
}
body:not(.is-logged-in) {
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: #b8e6cc;
  overflow-x: hidden;
}
.console-shell {
  max-width: 960px;
  margin: 0 auto;
  min-height: 100dvh;
  background: #f6f7f9;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.console-header {
  background: transparent;
  padding: 0;
  position: relative;
  z-index: 20;
}
.console-header-intro {
  background: #fff;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  border-bottom: 1px solid #e5e7eb;
}
.console-header-pin {
  position: sticky;
  top: 0;
  z-index: 25;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.console-title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 10rem;
}
.console-product-badge {
  display: none;
}
.console-title-tagline {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}
.console-header-visual {
  margin: 10px -16px 0;
  max-height: 148px;
  overflow: hidden;
  border-radius: 0 0 18px 18px;
  position: relative;
  line-height: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-top: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.console-header-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, transparent 45%, rgba(15, 23, 42, 0.08) 100%);
  pointer-events: none;
}
.console-header-visual--tech {
  position: relative;
  min-height: 148px;
  max-height: 148px;
  line-height: normal;
}
.console-header-tech-bg {
  width: 100%;
  height: 148px;
  object-fit: cover;
  object-position: center;
  display: block;
}
.console-header-tech-icons {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  margin: 0;
  padding: 0 12px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 0;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  cursor: default;
}
.console-header-tech-legend li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin: 0;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(236, 253, 245, 0.82);
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
}
.console-header-tech-legend li + li::before {
  content: "·";
  margin: 0 10px;
  color: rgba(167, 243, 208, 0.45);
  font-weight: 400;
  pointer-events: none;
}
.console-header-tech-icons img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.75;
}
.console-header-tech-legend li span {
  opacity: 0.95;
}
.console-header-visual-img {
  width: 100%;
  height: 148px;
  object-fit: cover;
  object-position: center;
  display: block;
}
.console-header-visual-caption {
  display: none !important;
}
.console-header .console-user-row,
.console-header .console-account-row,
.console-header .auth-banner {
  padding-left: 0;
  padding-right: 0;
}
.console-header-top .console-user-row {
  margin-bottom: 0;
  flex: 1 1 12rem;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.console-header-top .console-user {
  text-align: right;
}
.console-header-top .console-user-actions {
  flex-shrink: 0;
}
.console-header-pin .auth-banner {
  margin: 8px 0 0;
}
.console-header-pin .console-account-row {
  margin-bottom: 0;
}
.console-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding-bottom: 10px;
  border-bottom: 3px solid #06c755;
}
.console-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: 0;
}
.console-chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(145deg, #12d17a 0%, #06c755 50%, #00a84a 100%);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(6, 199, 85, 0.3);
  flex-shrink: 0;
}
.console-chat-btn:hover { color: #fff; filter: brightness(1.05); }
.console-chat-btn-icon { filter: brightness(0) invert(1); }
.console-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.console-user {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 600;
  line-height: 1.45;
}
.console-user strong {
  color: #0f172a;
  font-weight: 800;
}
.console-user-role {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  vertical-align: middle;
}
.console-user-role--super {
  color: #065f46;
  background: #ecfdf5;
  border-color: #6ee7b7;
}
.console-btn-ghost {
  margin: 0;
  padding: 6px 12px;
  font-size: 0.82rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.console-account-row { margin-bottom: 0; }
.console-field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.console-account-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.console-select {
  flex: 1 1 180px;
  min-width: 0;
  padding: 10px 12px;
  font-size: 0.95rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
}
.console-status {
  font-size: 0.78rem;
  color: #047857;
  font-weight: 600;
  white-space: nowrap;
}
.console-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px calc(96px + env(safe-area-inset-bottom, 0px));
}
.console-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.console-kpi {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  min-width: 0;
}
.console-kpi-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #6b7280;
  margin-bottom: 4px;
}
.console-kpi-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
  letter-spacing: 0;
}
.console-kpi-value--sm {
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.console-kpi-value--ok { color: #047857; }
.console-kpi-value--warn { color: #b45309; }
.console-kpi-value--err { color: #b91c1c; }
.panel-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-hero--rich {
  position: relative;
  padding: 14px 16px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}
.panel-hero--rich::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: min(46%, 200px);
  height: 100%;
  background: linear-gradient(125deg, rgba(6, 199, 85, 0.12) 0%, rgba(30, 58, 95, 0.08) 100%);
  opacity: 0.22;
  mask-image: linear-gradient(to left, #000 15%, transparent);
  -webkit-mask-image: linear-gradient(to left, #000 15%, transparent);
  pointer-events: none;
}
.panel-hero--rich::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: var(--panel-accent, #06c755);
}
.panel-hero--rich > * {
  position: relative;
  z-index: 1;
}
.panel-hero--emerald {
  --panel-accent: #06c755;
  background: linear-gradient(125deg, #fff 0%, #f0fdf4 55%, #ecfdf5 100%);
}
.panel-hero--sky {
  --panel-accent: #0284c7;
  background: linear-gradient(125deg, #fff 0%, #f0f9ff 55%, #e0f2fe 100%);
}
.panel-hero--violet {
  --panel-accent: #7c3aed;
  background: linear-gradient(125deg, #fff 0%, #f5f3ff 55%, #ede9fe 100%);
}
.panel-hero--amber {
  --panel-accent: #d97706;
  background: linear-gradient(125deg, #fff 0%, #fffbeb 55%, #fef3c7 100%);
}
.panel-hero--slate {
  --panel-accent: #334155;
  background: linear-gradient(125deg, #fff 0%, #f8fafc 55%, #f1f5f9 100%);
}
.panel-hero--teal {
  --panel-accent: #0d9488;
  background: linear-gradient(125deg, #fff 0%, #f0fdfa 55%, #ccfbf1 100%);
}
.panel-hero-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 6px;
  box-sizing: border-box;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: none;
}
.panel-hero .panel-title {
  margin: 0;
}
.panel-subtitle {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 500;
  line-height: 1.35;
}
.panel-title {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}
.hint-details {
  margin: 0 0 12px;
  padding: 10px 12px 10px 14px;
  background: linear-gradient(90deg, #f8fafc 0%, #fff 12%);
  border: 1px solid #e2e8f0;
  border-left: 3px solid #94a3b8;
  border-radius: 10px;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.hint-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #475569;
}
.hint-compact { margin: 6px 0 0; }
.console-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.console-card-title {
  display: block;
  color: #1f2937;
}
.console-card-title::before {
  content: none;
}
.empty-state-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}
.empty-state-icon img {
  opacity: 0.85;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 20px 12px 28px;
  gap: 8px;
  box-sizing: border-box;
}
.empty-state-art {
  display: block;
  width: min(220px, 72vw);
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}
.console-table-wrap--empty {
  overflow-x: visible;
}
.console-table--empty {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
}
.console-table--empty thead {
  display: none;
}
.console-table--empty td.empty-state-cell {
  padding: 0;
  border-bottom: none;
  background: transparent !important;
  text-align: center;
  vertical-align: middle;
}
.empty-state-title {
  margin: 8px 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: #374151;
}
.empty-state-desc {
  margin: 0;
  max-width: 28em;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #64748b;
}
.empty-state-cta {
  margin-top: 10px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  background: #06c755;
  box-shadow: none;
}
.empty-state-cta:hover {
  filter: brightness(1.05);
}
.console-card .console-card-title {
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #334155;
}
.console-form .console-field {
  display: block;
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: #475569;
}
.console-form input,
.console-form select,
.console-field input,
.console-field select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}
.console-btn-primary {
  width: 100%;
  margin: 4px 0 0;
  padding: 11px 16px;
  border: none;
  border-radius: 10px;
  background: #06c755;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.console-btn-recall {
  width: 100%;
  margin: 8px 0 0;
  padding: 11px 16px;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
  cursor: pointer;
}
.console-btn-recall:disabled { opacity: 0.55; cursor: not-allowed; }
.console-btn-secondary {
  margin: 0;
  padding: 9px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
}
.console-btn-secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.console-btn-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.console-btn-danger {
  margin: 0;
  padding: 9px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  cursor: pointer;
}
.console-btn-danger:hover {
  background: #fee2e2;
  border-color: #f87171;
}
.console-btn-danger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.console-btn-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.console-textarea {
  width: 100%;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82rem;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  resize: vertical;
  box-sizing: border-box;
}
.console-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.console-table { margin-top: 0; font-size: 0.82rem; }
.console-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f8fafc;
  background: #334155;
  border-bottom: none;
  padding: 10px 8px;
}
.console-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #f1f5f9;
}
.console-table tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.85);
}
.acc-actions button {
  margin: 2px 3px 2px 0;
  padding: 5px 8px;
  font-size: 0.75rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.login-screen {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: transparent;
  overflow: hidden;
}
.login-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.login-bg-gradient {
  position: absolute;
  inset: -40%;
  background: linear-gradient(
    125deg,
    #06c755 0%,
    #7ddea8 22%,
    #e8faf0 45%,
    #5fd492 68%,
    #a8e8c4 100%
  );
  background-size: 200% 200%;
  animation: login-bg-gradient 18s ease-in-out infinite alternate;
}
@keyframes login-bg-gradient {
  0% {
    background-position: 0% 20%;
    transform: scale(1) rotate(0deg);
  }
  100% {
    background-position: 100% 80%;
    transform: scale(1.08) rotate(3deg);
  }
}
.login-bg-bubble {
  position: absolute;
  border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.45);
  opacity: 0.55;
}
.login-bg-bubble--1 {
  width: min(42vw, 220px);
  height: min(36vw, 190px);
  left: -8%;
  top: 12%;
  animation: login-bubble-drift-a 22s ease-in-out infinite;
}
.login-bg-bubble--2 {
  width: min(50vw, 280px);
  height: min(44vw, 240px);
  right: -12%;
  top: 28%;
  animation: login-bubble-drift-b 26s ease-in-out infinite;
}
.login-bg-bubble--3 {
  width: min(36vw, 180px);
  height: min(32vw, 160px);
  left: 18%;
  bottom: 8%;
  animation: login-bubble-drift-c 20s ease-in-out infinite;
}
.login-bg-bubble--4 {
  width: min(28vw, 140px);
  height: min(24vw, 120px);
  right: 20%;
  bottom: 18%;
  animation: login-bubble-drift-a 24s ease-in-out infinite reverse;
}
.login-bg-bubble--5 {
  width: min(22vw, 110px);
  height: min(20vw, 100px);
  left: 42%;
  top: 6%;
  opacity: 0.35;
  animation: login-bubble-drift-b 19s ease-in-out infinite reverse;
}
@keyframes login-bubble-drift-a {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(28px, -22px) rotate(8deg);
  }
}
@keyframes login-bubble-drift-b {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  50% {
    transform: translate(-24px, 18px) rotate(-6deg) scale(1.06);
  }
}
@keyframes login-bubble-drift-c {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(16px, 26px) rotate(5deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .login-bg-gradient,
  .login-bg-bubble {
    animation: none !important;
  }
  .login-bg-gradient {
    inset: 0;
    transform: none;
    background-size: 100% 100%;
  }
}
.login-screen::before {
  content: none;
}
.login-sub {
  margin: 0 0 20px;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: center;
}
.login-screen.hidden { display: none !important; }
.console-shell.hidden { display: none !important; }
.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 14px;
  padding: 28px 26px 24px;
  box-shadow: 0 12px 40px rgba(6, 120, 60, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
}
.login-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.login-brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #06c755;
  box-shadow: none;
}
.login-brand-icon img {
  filter: brightness(0) invert(1);
}
.login-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  line-height: 1.3;
  text-align: center;
  color: #0f172a;
}
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-field { display: block; font-size: 0.88rem; color: #334155; margin: 0; }
.login-field input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  font-size: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-sizing: border-box;
}
.login-field input:focus {
  outline: 2px solid #06c755;
  border-color: #06c755;
}
.login-observe { font-size: 0.85rem; color: #475569; margin: 0; }
.login-observe.hidden { display: none !important; }
.login-submit {
  margin-top: 4px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: #06c755;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: none;
}
.login-submit:hover { filter: brightness(1.05); }
.login-submit:disabled { opacity: 0.65; cursor: wait; }
.login-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  font-size: 0.88rem;
  line-height: 1.4;
}
.login-error.hidden { display: none !important; }
.auth-box { display: flex; flex-direction: column; gap: 8px; flex: 1 1 100%; }
.auth-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.auth-row-toolbar { justify-content: flex-end; }
.auth-row-toolbar #btnWebLogout {
  margin-top: 0;
  padding: 6px 14px;
  font-size: 0.85rem;
}
.auth-banner {
  flex: 1 1 100%;
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 0.9rem;
  line-height: 1.45;
}
.auth-banner.hidden { display: none !important; }
.auth-banner.err { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.auth-banner.ok { background: #ecfdf5; border-color: #6ee7b7; color: #047857; }
h1 { font-size: 1.25rem; margin: 0; }
/* 舊版頂部 pill 分頁已移除；底欄樣式見 console-nav.css */
.panel { display: none; }
.panel.active { display: block; }
.panel > .console-result:not(.console-card .console-result) {
  margin-bottom: 12px;
}
.console-card-qr { text-align: center; }
.console-qr-display {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 72px;
  margin-top: 10px;
}
.console-qr-display:empty { display: none; }
.console-qr-display img {
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
  max-width: 100%;
  height: auto;
}
.console-pin {
  margin: 14px 0 0;
  text-align: center;
  font-size: 1.45rem;
  letter-spacing: 0.12em;
  color: #059669;
  font-weight: 800;
}
.console-pin:empty { display: none; }
.qr-scan-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.qr-scan-modal.hidden { display: none !important; }
.qr-scan-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.qr-scan-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  max-height: min(92vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 18px 18px 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  text-align: center;
}
.qr-scan-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.qr-scan-modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  text-align: left;
  flex: 1;
}
.qr-scan-modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.qr-scan-modal-close:hover { background: #e2e8f0; }
.qr-scan-modal-status {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.45;
  text-align: center;
}
.qr-scan-modal-status:empty { display: none; }
.qr-scan-modal-img {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}
.qr-scan-modal-img:empty { display: none; }
.qr-scan-modal-img img {
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  max-width: 100%;
  height: auto;
}
.qr-scan-modal-pin {
  margin: 14px 0 0;
  font-size: 1.35rem;
  letter-spacing: 0.12em;
  color: #059669;
  font-weight: 800;
}
.qr-scan-modal-pin:empty { display: none; }
.console-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.console-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.console-modal.hidden { display: none !important; }
.console-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.console-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  background: #fff;
  border-radius: 16px;
  padding: 18px 18px 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}
.console-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.console-modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}
.console-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.console-result-compact {
  padding: 10px 12px;
  font-size: 0.82rem;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
}
.console-result-compact:empty { display: none; }
.console-field-block {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px !important;
  font-size: 0.85rem;
  color: #475569;
}
.console-details {
  margin-bottom: 12px;
  padding: 0;
  overflow: hidden;
}
details.console-details {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.console-details-summary {
  padding: 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  color: #334155;
  list-style: none;
}
.console-details-summary::-webkit-details-marker { display: none; }
.console-details-body {
  padding: 0 14px 14px;
  border-top: 1px solid #f1f5f9;
}
.console-details-body .console-field { margin-top: 12px; }
.console-details-body .console-btn-primary { margin-top: 4px; }
.console-job-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}
.console-job-list:empty { display: none; }
.console-job-list li {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  font-size: 0.82rem;
  margin: 0;
  background: #fff;
}
.console-job-list li:hover { background: #ecfdf5; }
.console-job-list li:last-child { border-bottom: none; }
.console-card-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.console-card-head-row .console-card-title { margin: 0; flex: 1 1 auto; }
.console-card-head-row .console-btn-secondary { margin: 0; flex-shrink: 0; }
.admin-user-form { margin-bottom: 12px; }
.admin-table-wrap { margin-top: 4px; }
.admin-table td,
.admin-table th { vertical-align: middle; }

@media (min-width: 721px) {
  .admin-table-wrap:has(.admin-table--stack),
  .console-table-wrap:has(.accounts-table--stack) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-table--stack th:last-child,
  .admin-table--stack td:last-child,
  .accounts-table--stack th:last-child,
  .accounts-table--stack td:last-child {
    position: sticky;
    right: 0;
    z-index: 1;
  }
  .admin-table--stack th:last-child,
  .accounts-table--stack th:last-child {
    background: #334155;
  }
  .admin-table--stack td:last-child,
  .accounts-table--stack td:last-child {
    background: #fff;
    box-shadow: -8px 0 12px rgba(15, 23, 42, 0.08);
  }
  .admin-table--stack tbody tr:nth-child(even) td:last-child,
  .accounts-table--stack tbody tr:nth-child(even) td:last-child {
    background: rgba(248, 250, 252, 0.98);
  }
  .accounts-table--stack td.acc-proxy.mono {
    max-width: 11rem;
    max-height: 4.2em;
    overflow: auto;
    padding: 6px 8px;
    font-size: 0.75rem;
    white-space: pre-wrap;
    word-break: break-all;
  }
  .accounts-table--stack td.acc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 10.5rem;
    white-space: normal;
    vertical-align: top;
  }
  .accounts-table--stack td.acc-actions button {
    flex: 1 1 calc(50% - 3px);
    min-width: 0;
    margin: 0;
  }
}

@media (max-width: 720px) {
  .admin-table-wrap:has(.admin-table--stack),
  .console-table-wrap:has(.accounts-table--stack) {
    overflow-x: visible;
  }
  .admin-table--stack,
  .accounts-table--stack {
    min-width: 0 !important;
    display: block;
  }
  .admin-table--stack thead,
  .accounts-table--stack thead {
    display: none;
  }
  .admin-table--stack tbody,
  .accounts-table--stack tbody {
    display: block;
  }
  .admin-table--stack tbody tr,
  .accounts-table--stack tbody tr {
    display: block;
    margin-bottom: 12px;
    padding: 12px 12px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }
  .admin-table--stack tbody tr:nth-child(even) td,
  .accounts-table--stack tbody tr:nth-child(even) td {
    background: transparent;
  }
  .admin-table--stack td,
  .accounts-table--stack td {
    display: grid;
    grid-template-columns: 4.8rem 1fr;
    gap: 8px;
    align-items: center;
    padding: 7px 0;
    border: none;
    text-align: left;
    white-space: normal;
  }
  .admin-table--stack td::before,
  .accounts-table--stack td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
  }
  .admin-table--stack td.admin-td-owner {
    align-items: stretch;
  }
  .admin-table--stack .admin-owner-select {
    max-width: none;
    width: 100%;
  }
  .admin-table--stack td.admin-user-actions,
  .admin-table--stack td.admin-acc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid #f1f5f9;
  }
  .admin-table--stack td.admin-user-actions::before,
  .admin-table--stack td.admin-acc-actions::before {
    flex: 1 1 100%;
    margin-bottom: 2px;
  }
  .admin-table--stack td.admin-user-actions .console-btn-secondary,
  .admin-table--stack td.admin-user-actions .console-btn-danger,
  .admin-table--stack td.admin-acc-actions .console-btn-secondary {
    flex: 1 1 calc(50% - 4px);
    min-height: 40px;
    justify-content: center;
  }
  .admin-table--stack td.admin-acc-actions .admin-chat-link {
    flex: 1 1 100%;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    background: #ecfdf5;
  }
  .accounts-table--stack td.acc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid #f1f5f9;
  }
  .accounts-table--stack td.acc-actions::before {
    flex: 1 1 100%;
    margin-bottom: 2px;
  }
  .accounts-table--stack td.acc-actions button {
    flex: 1 1 calc(50% - 4px);
    min-height: 40px;
    margin: 0;
  }
  .accounts-table--stack td.acc-proxy.mono {
    background: #f8fafc;
    padding: 8px 10px;
    border-radius: 8px;
    max-height: none;
    font-size: 0.78rem;
    word-break: break-all;
  }
}
.admin-col-proxy,
.admin-table td.admin-td-proxy {
  white-space: nowrap;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.admin-user-actions .console-btn-secondary,
.admin-user-actions .console-btn-danger {
  padding: 6px 12px;
  white-space: nowrap;
}

.admin-td-owner {
  min-width: 7.5rem;
  max-width: 11rem;
}
.admin-owner-select {
  display: block;
  width: 100%;
  max-width: 10rem;
  margin: 0;
  padding: 6px 8px;
  font-size: 0.82rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}
.admin-owner-unassigned {
  color: #b45309;
  font-weight: 600;
}
.admin-acc-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}
.admin-acc-actions .console-btn-secondary,
.admin-acc-actions .console-btn-danger {
  margin: 0;
  padding: 6px 12px;
  font-size: 0.82rem;
  white-space: nowrap;
}
.admin-acc-actions .admin-chat-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #059669;
  text-decoration: none;
  padding: 6px 4px;
}
.admin-acc-actions .admin-chat-link:hover { text-decoration: underline; }
.admin-role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: lowercase;
}
.admin-role-badge.super { background: #fef3c7; color: #92400e; }
.admin-role-badge.disabled { background: #fee2e2; color: #991b1b; }
.acc-session {
  font-size: 0.78rem;
  max-width: 11rem;
  line-height: 1.35;
}
.acc-session--ok { color: #047857; }
.acc-session--warn { color: #b45309; }
.acc-session--err { color: #b91c1c; }
.console-check-block { display: block; margin: 10px 0 6px; }
.admin-role-badge.user { background: #f1f5f9; color: #475569; }
.audit-feed {
  margin-top: 12px;
  max-height: min(520px, 60vh);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.audit-feed:empty { display: none; }
.audit-empty { margin: 8px 0 0; text-align: center; }
.audit-entry {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  border-left-width: 4px;
}
.audit-entry.audit-action-send { border-left-color: #06c755; }
.audit-entry.audit-action-unsend { border-left-color: #f59e0b; }
.audit-entry.audit-action-admin_destroy { border-left-color: #ef4444; }
.audit-entry-head {
  margin: 0 0 4px;
  font-size: 0.78rem;
  color: #64748b;
}
.audit-entry-meta {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: #334155;
}
.audit-entry-body {
  margin: 0;
  font-size: 0.92rem;
  color: #0f172a;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}
.console-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.console-toolbar-wrap { margin-top: 4px; }
.console-toolbar .console-btn-secondary { margin: 0; flex: 1 1 auto; min-width: 0; }
.console-btn-block { width: 100%; margin-top: 4px; }
.console-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 8px;
}
.console-check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
  flex: 1 1 100%;
}
@media (min-width: 480px) {
  .console-check-inline { flex: 1 1 auto; }
}
.console-card-admin {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 48%);
}
.hint-details-nested {
  margin: 0 0 10px;
  padding: 8px 10px;
  background: #f8fafc;
  border-color: #e2e8f0;
}
.console-result {
  margin-top: 10px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.console-result:empty { display: none; }
label { display: block; margin: 8px 0; font-size: 0.9rem; }
input, select, textarea { margin-top: 4px; padding: 6px; max-width: 100%; box-sizing: border-box; }
button { margin-top: 8px; padding: 8px 16px; cursor: pointer; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 0.9rem; }
th, td { border-bottom: 1px solid #eee; padding: 8px; text-align: left; }
.mono-mid { font-family: Consolas, "Courier New", monospace; font-size: 0.78rem; word-break: break-all; }
.acc-active-star { color: #06c755; font-weight: 700; margin-left: 2px; }
.acc-actions { white-space: nowrap; }
.acc-actions button { margin: 2px 4px 2px 0; padding: 4px 10px; font-size: 0.8rem; }
.mono { font-family: Consolas, monospace; font-size: 0.85rem; white-space: pre-wrap; background: #f0f0f0; padding: 10px; border-radius: 6px; max-height: 360px; overflow: auto; }
.pin { font-size: 1.8rem; letter-spacing: 0.2em; color: #0a0; font-weight: bold; }
.hint { color: #666; font-size: 0.85rem; }

.broadcast-image-row input[type="file"] { display: block; margin-top: 6px; max-width: 100%; }
.broadcast-image-preview { display: block; max-width: 240px; max-height: 180px; margin: 8px 0; border-radius: 6px; border: 1px solid #ddd; }
.broadcast-image-preview.hidden { display: none; }

.broadcast-steps { display: flex; flex-direction: column; gap: 10px; margin: 0 0 8px; }
.broadcast-step {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
}
.broadcast-step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}
.broadcast-step-head select {
  min-width: 5.5em;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}
.broadcast-step-body textarea {
  width: 100%;
  min-height: 3.2em;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 16px;
  box-sizing: border-box;
}
.broadcast-step-body input[type="file"] { max-width: 100%; margin-top: 4px; }
.broadcast-step-preview {
  display: block;
  max-width: 200px;
  max-height: 140px;
  margin-top: 6px;
  border-radius: 4px;
  border: 1px solid #ccc;
}
.broadcast-step-preview.hidden { display: none; }
details { margin: 12px 0; padding: 8px; border: 1px solid #eee; border-radius: 6px; }
header label.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; margin: 0; }
#activeAccount { min-width: 160px; margin-top: 0; }
.hidden { display: none !important; }
.join-form .question-label {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-weight: 600;
  color: #1e40af;
  white-space: pre-wrap;
  font-size: 0.88rem;
  line-height: 1.45;
}
.question-label { font-weight: 600; color: #1e40af; white-space: pre-wrap; }
.chat-list {
  max-height: 320px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px;
  margin: 8px 0 0;
  background: #f8fafc;
}
.chat-list label { display: flex; align-items: flex-start; gap: 8px; padding: 6px 28px 6px 4px; border-bottom: 1px solid #f0f0f0; cursor: pointer; position: relative; }
.unread-badge { display: inline-block; min-width: 1.1em; padding: 1px 6px; margin-left: 4px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 0.7rem; font-weight: 700; line-height: 1.3; }
.chat-list .unread-badge { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); margin-left: 0; }
.chat-list label:hover { background: #fafafa; }
.chat-list label.chat-admin {
  background: linear-gradient(90deg, #fffbeb 0%, #fff 28%);
  border-left: 4px solid #d97706;
  padding-left: 8px;
}
.chat-list label.chat-admin-co {
  border-left-color: #2563eb;
  background: linear-gradient(90deg, #eff6ff 0%, #fff 28%);
}
.role-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: middle;
}
.role-badge.admin { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.role-badge.co_admin { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.join-pending-badge { color: #b45309; font-size: 0.8rem; font-weight: 600; margin-left: 4px; }
.join-request-list { margin-top: 10px; }
.join-request-list table { font-size: 0.85rem; }
.join-request-list .btn-sm { padding: 4px 10px; margin: 0 4px 0 0; font-size: 0.8rem; }
.jr-toolbar, .jr-pager { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; align-items: center; }
.jr-search-wrap { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; margin: 0; }
.jr-search { min-width: 200px; max-width: 280px; padding: 6px 8px; margin: 0; border: 1px solid #cbd5e1; border-radius: 6px; }
.jr-search:focus { outline: 2px solid #2563eb; border-color: #2563eb; }
.btn-primary-sm { background: #06c755; color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.btn-primary-sm:hover { background: #05a847; }
.jr-th-check { width: 2.2rem; text-align: center; }
.jr-wrap table { width: 100%; font-size: 0.85rem; }
.chat-list .mid { font-size: 0.75rem; color: #888; font-family: Consolas, monospace; }
.err { color: #b91c1c; }
.msg-feed { margin-top: 10px; max-height: 420px; overflow: auto; border: 1px solid #e5e7eb; border-radius: 8px; background: #fafafa; }
.msg-feed table { width: 100%; font-size: 0.85rem; margin: 0; }
.msg-feed td, .msg-feed th { padding: 6px 8px; vertical-align: top; }
.msg-out { background: #ecfdf5; }
.msg-in { background: #fff; }
.msg-read { color: #047857; font-weight: 600; white-space: nowrap; }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }

@media (max-width: 768px) {
  body:not(.is-logged-in) {
    padding-bottom: 0;
  }
  .login-screen {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  .console-header-top {
    align-items: flex-start;
  }
  .console-header-top .console-user-row {
    flex: 1 1 100%;
    justify-content: space-between;
  }
  .console-header-top .console-user {
    text-align: left;
  }
  .console-header-intro { padding-left: 12px; padding-right: 12px; }
  .console-header-pin { padding-left: 12px; padding-right: 12px; }
  .console-title { font-size: 1rem; }
  .console-user-row {
    margin-bottom: 0;
  }
  .console-btn-ghost {
    padding: 5px 10px;
    font-size: 0.78rem;
  }
  .console-kpi-strip {
    margin-bottom: 10px;
  }
  .console-kpi {
    padding: 8px 8px;
  }
  .console-kpi-value {
    font-size: 1.15rem;
  }
  .console-main { padding: 10px 10px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .console-chat-btn { min-height: 40px; }
  .console-select { width: 100%; flex: 1 1 100%; font-size: 16px; }
  .console-account-controls { flex-direction: column; align-items: stretch; }
  .console-btn-grid-3 { grid-template-columns: 1fr; }
  .console-btn-grid-3 button { min-height: 44px; font-size: 0.9rem; }
  .console-form-grid-2 { grid-template-columns: 1fr; }
  .console-toolbar .console-btn-secondary { min-height: 44px; width: 100%; }
  .auth-row { flex-direction: column; align-items: stretch; }
  .auth-row label { width: 100%; }
  .auth-row input, .auth-row select { width: 100%; min-height: 44px; font-size: 16px; }
  .auth-row button, button { touch-action: manipulation; }
  .console-table-wrap:not(:has(.accounts-table--stack)) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .console-table:not(.accounts-table--stack):not(.admin-table--stack) { min-width: 520px; }
  .admin-accounts-table:not(.admin-table--stack) { min-width: 640px; }
  th, td { padding: 10px 8px; font-size: 0.82rem; }
  .acc-actions { white-space: normal; }
  .acc-actions button { min-height: 34px; margin-bottom: 4px; }
  .chat-list { max-height: min(50vh, 420px); }
}
.admin-td-muted { color: #64748b; font-size: 0.82rem; }

@media (max-width: 480px) {
  h1 { font-size: 1.05rem; }
  .panel h2 { font-size: 1.05rem; }
  .console-kpi-strip {
    grid-template-columns: 1fr 1fr;
  }
  .console-kpi:last-child {
    grid-column: 1 / -1;
  }
  .console-header-visual-caption {
    font-size: 0.58rem;
    max-width: 70%;
  }
}


