.auth-body,
.dashboard-body {
  min-height: 100vh;
  height: auto;
  overflow: auto;
}

.dashboard-body {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dashboard-body .app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  flex: 0 0 auto;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
}

.auth-card,
.dashboard-panel {
  width: 100%;
  max-width: 920px;
  background-color: var(--panel-bg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
}

.auth-card {
  max-width: 410px;
  padding: 38px;
  box-shadow: 0 28px 70px -28px rgba(0, 102, 255, 0.22);
}

.auth-brand-min,
.top-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-brand-min {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 30px;
}

.auth-heading {
  margin-bottom: 28px;
  text-align: center;
  font-size: 1.8rem;
  line-height: 1.2;
  color: var(--text-main);
  letter-spacing: 0;
}

.auth-switch,
.empty-state p,
.survey-row p,
.survey-meta {
  color: var(--text-muted);
}

.auth-form .form-group {
  margin-bottom: 18px;
}

.auth-form .btn {
  width: 100%;
  margin-top: 4px;
  min-height: 54px;
}

.auth-error {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.9rem;
  font-weight: 700;
}

.auth-switch {
  margin-top: 24px;
  text-align: center;
  font-size: 0.9rem;
}

.auth-switch a {
  margin-left: 6px;
}

.auth-switch a,
.link-btn {
  color: var(--primary);
  text-decoration: none;
  font-weight: 800;
}

.dashboard-shell {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 30px 24px 48px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.dashboard-panel {
  padding: 34px;
}

.link-btn {
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--primary-light);
}

.link-btn.muted {
  color: var(--text-muted);
  background: #f1f5f9;
}

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

.dashboard-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0 20px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 20px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.toolbar-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  min-height: 50px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: #fff;
  color: var(--text-muted);
  box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.28);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.toolbar-search:focus-within {
  border-color: rgba(0, 102, 255, 0.45);
  background: #ffffff;
  box-shadow: 0 16px 30px -22px rgba(0, 102, 255, 0.45), 0 0 0 4px rgba(0, 102, 255, 0.06);
}

.toolbar-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 900;
}

.toolbar-search input,
.toolbar-select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-main);
  font-weight: 700;
}

.toolbar-search input {
  width: 100%;
  min-width: 180px;
  font-size: 0.92rem;
}

.toolbar-search input::placeholder {
  color: #94a3b8;
  font-weight: 700;
}

.toolbar-select-wrap {
  position: relative;
  flex: 0 0 172px;
}

.toolbar-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.8rem;
  pointer-events: none;
}

.toolbar-select {
  width: 100%;
  padding: 0 38px 0 16px;
  min-height: 50px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: #fff;
  appearance: none;
  cursor: pointer;
  box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.28);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.toolbar-select:focus {
  border-color: rgba(0, 102, 255, 0.45);
  box-shadow: 0 16px 30px -22px rgba(0, 102, 255, 0.45), 0 0 0 4px rgba(0, 102, 255, 0.06);
}

.survey-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 14px 30px -26px rgba(15, 23, 42, 0.35);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.survey-row:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 102, 255, 0.2);
  box-shadow: 0 18px 40px -28px rgba(0, 102, 255, 0.35);
}

.survey-row[hidden] {
  display: none !important;
}

.survey-row.page-hidden {
  display: none !important;
}

.survey-row h3 {
  margin-bottom: 8px;
  font-size: 1rem;
  color: var(--text-main);
}

.survey-main {
  flex: 1;
  min-width: 0;
}

.survey-row p {
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.survey-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.78rem;
}

.survey-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
}

.survey-row[data-status="draft"] .survey-status {
  background: #f1f5f9;
  color: #64748b;
}

.survey-row[data-status="dimensions_done"] .survey-status {
  background: #eef6ff;
  color: #2563eb;
}

.survey-row[data-status="survey_done"] .survey-status {
  background: #eff6ff;
  color: #0ea5e9;
}

.survey-row[data-status="result_generating"] .survey-status {
  background: #fff7ed;
  color: #f97316;
}

.survey-row[data-status="result_generating"] .survey-status::before {
  content: '';
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.45);
  animation: statusPulse 1.4s infinite;
}

.survey-row[data-status="result_done"] .survey-status {
  background: #ecfdf5;
  color: #10b981;
}

.survey-row[data-status="result_failed"] .survey-status {
  background: #fef2f2;
  color: #ef4444;
}

@keyframes statusPulse {
  70% {
    box-shadow: 0 0 0 8px rgba(249, 115, 22, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
  }
}

.survey-audience {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-muted);
  font-weight: 800;
}

.survey-updated {
  margin-left: auto;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.row-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn.small {
  padding: 9px 14px;
  font-size: 0.82rem;
  width: auto;
  min-width: 74px;
  text-decoration: none;
  white-space: nowrap;
}

.btn.small:hover,
.btn.small:focus {
  text-decoration: none;
}

.btn-danger-soft {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  box-shadow: 0 10px 20px -5px rgba(239, 68, 68, 0.25);
}

.btn-danger-soft:hover {
  background: linear-gradient(135deg, #f87171, #dc2626);
  color: #ffffff;
  box-shadow: 0 15px 25px -5px rgba(239, 68, 68, 0.35);
}

.btn-ghost {
  background: #f1f5f9;
  color: var(--text-main);
  box-shadow: none;
}

.btn-ghost:hover {
  background: #e8f1ff;
  color: var(--primary);
}

.empty-state {
  padding: 64px 16px;
  text-align: center;
}

.empty-illustration {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary-light), #f3e8ff);
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: 0 18px 36px -24px rgba(0, 102, 255, 0.5);
}

.empty-state h3 {
  margin-bottom: 10px;
  color: var(--text-main);
}

.empty-state p {
  margin-bottom: 22px;
  color: var(--text-muted);
}

.empty-action {
  width: auto;
  min-width: 180px;
  display: inline-flex;
  text-decoration: none;
}

.dashboard-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 4px;
}

.dashboard-pagination[hidden] {
  display: none !important;
}

.page-btn {
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-main);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px -16px rgba(15, 23, 42, 0.28);
  transition: all 0.18s ease;
}

.page-btn:hover:not(:disabled) {
  color: var(--primary);
  border-color: rgba(0, 102, 255, 0.45);
  transform: translateY(-1px);
}

.page-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.page-info {
  min-width: 72px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.save-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
}

.save-indicator::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.save-indicator.saved {
  background: #ecfdf5;
  color: #10b981;
}

.save-indicator.saving {
  background: #eef6ff;
  color: var(--primary);
}

.save-indicator.error {
  background: #fef2f2;
  color: #ef4444;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.28);
  opacity: 0;
  transition: opacity 0.16s ease;
}

.modal-mask[hidden] {
  display: none !important;
}

.modal-mask.show {
  opacity: 1;
}

.modal-card {
  width: min(430px, 100%);
  padding: 26px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 24px 70px -24px rgba(15, 23, 42, 0.35);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.16s ease;
}

.modal-mask.show .modal-card {
  transform: translateY(0) scale(1);
}

.modal-card h3 {
  margin-bottom: 18px;
  color: var(--text-main);
}

.danger-modal p {
  margin: -6px 0 20px;
  color: var(--text-muted);
  line-height: 1.7;
}

.modal-label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 800;
}

.modal-label input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  outline: 0;
  background: #f8fbff;
}

.modal-label input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.08);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.result-panel {
  max-width: 1100px;
}

.result-readonly {
  margin-top: 20px;
}

@media (max-width: 768px) {
  .auth-card,
  .dashboard-panel {
    padding: 22px 16px;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .survey-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-select-wrap {
    flex-basis: auto;
  }

  .row-actions,
  .row-actions .btn {
    width: 100%;
  }
}

.admin-shell {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  padding: 30px 28px 48px;
  overflow: auto;
}

.admin-sidebar {
  position: sticky;
  top: 86px;
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.admin-sidebar a {
  padding: 13px 14px;
  border-radius: 14px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 900;
  transition: all 0.18s ease;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  color: var(--primary);
  background: var(--primary-light);
}

.admin-content {
  min-width: 0;
}

.admin-panel {
  max-width: 1180px;
  padding: 34px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.admin-stats div,
.admin-model-card {
  padding: 18px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
  box-shadow: 0 14px 30px -26px rgba(15, 23, 42, 0.35);
}

.admin-stats span {
  display: block;
  color: var(--primary);
  font-size: 1.8rem;
  font-weight: 900;
}

.admin-stats em,
.admin-model-card strong {
  color: var(--text-muted);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 900;
}

.admin-model-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.admin-model-card span {
  color: var(--primary);
  font-weight: 900;
}

.admin-section-title {
  margin: 10px 0 14px;
  color: var(--text-main);
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 44px -34px rgba(15, 23, 42, 0.42);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--text-muted);
  background: linear-gradient(135deg, #f8fbff, #f4f7fb);
  font-size: 0.78rem;
  font-weight: 900;
}

.admin-table tbody tr {
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.admin-table tbody tr:hover {
  background: linear-gradient(135deg, #fbfdff, #f8fbff);
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-user-table th:first-child,
.admin-user-table td:first-child {
  width: 72px;
}

.admin-user-table {
  min-width: 0;
  table-layout: fixed;
}

.admin-user-table th:nth-child(2),
.admin-user-table td:nth-child(2) {
  width: auto;
}

.admin-user-table th:nth-child(3),
.admin-user-table td:nth-child(3) {
  width: 120px;
}

.admin-user-table th:nth-child(4),
.admin-user-table td:nth-child(4) {
  width: 78px;
  text-align: center;
}

.admin-user-table th:nth-child(5),
.admin-user-table td:nth-child(5) {
  width: 190px;
}

.admin-user-table th:last-child,
.admin-user-table td:last-child {
  width: 184px;
  text-align: center;
}

.admin-id-pill,
.admin-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 900;
}

.admin-count-pill {
  min-width: 38px;
  background: #eef6ff;
  color: var(--primary);
}

.admin-user-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-main);
  font-weight: 900;
}

.admin-time {
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.admin-role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
}

.admin-list-toolbar {
  margin-top: 0;
}

.admin-table tr.page-hidden,
.admin-table tr[hidden] {
  display: none !important;
}

.admin-empty {
  padding: 38px 16px 18px;
}

.admin-actions,
.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-actions {
  justify-content: center;
  white-space: nowrap;
}

.inline-form select,
.admin-form input,
.modal-select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  outline: 0;
  background: #fff;
  color: var(--text-main);
  font-weight: 700;
}

.modal-select {
  border-radius: 14px;
  background: #f8fbff;
}

.inline-form select {
  min-width: 118px;
  padding-right: 36px;
  appearance: none;
  cursor: pointer;
  background:
    linear-gradient(45deg, transparent 50%, #64748b 50%) right 17px center / 6px 6px no-repeat,
    linear-gradient(135deg, #ffffff, #f8fbff);
  font-weight: 900;
  box-shadow: 0 10px 24px -20px rgba(15, 23, 42, 0.4);
}

.inline-form select[name="role"] {
  border-color: rgba(0, 102, 255, 0.16);
  color: var(--text-main);
}

.inline-form select:focus,
.admin-form input:focus {
  border-color: rgba(0, 102, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.06);
}

.admin-form .form-group span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-main);
  font-size: 0.86rem;
  font-weight: 900;
}

.admin-form-section {
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.admin-form-section h3 {
  margin-bottom: 16px;
  color: var(--text-main);
  font-size: 1rem;
}

.admin-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 18px;
  color: var(--text-main);
  font-weight: 900;
}

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

.model-switch-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.model-switch-card:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 102, 255, 0.35);
  box-shadow: 0 16px 28px -24px rgba(0, 102, 255, 0.55);
}

.model-switch-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-ui {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #e2e8f0;
  box-shadow: inset 0 1px 4px rgba(15, 23, 42, 0.12);
  transition: background 0.18s ease;
}

.switch-ui::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 14px -8px rgba(15, 23, 42, 0.55);
  transition: transform 0.18s ease;
}

.model-switch-card input:checked + .switch-ui {
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
}

.model-switch-card input:checked + .switch-ui::after {
  transform: translateX(22px);
}

.switch-text {
  display: grid;
  gap: 4px;
}

.switch-text strong {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 900;
}

.switch-text em {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.5;
}

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

.admin-form-actions .btn {
  width: auto;
  min-width: 150px;
}

.admin-alert {
  margin-bottom: 18px;
  padding: 13px 15px;
  border-radius: 14px;
  font-size: 0.86rem;
  font-weight: 800;
  word-break: break-word;
}

.admin-alert.ok {
  color: #059669;
  background: #ecfdf5;
}

.admin-alert.error {
  color: #dc2626;
  background: #fef2f2;
}

.model-test-result {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.6;
  word-break: break-word;
}

.model-test-result.ok {
  color: #059669;
  background: #ecfdf5;
}

.model-test-result.error {
  color: #dc2626;
  background: #fef2f2;
}

.model-test-result.loading {
  color: var(--primary);
  background: #eef6ff;
}

.model-key-field {
  position: relative;
}

.model-key-field input {
  width: 100%;
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  transform: translateY(-50%);
  background: #eef6ff;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.password-toggle:hover {
  background: #dbeafe;
}

.admin-result-panel {
  max-width: 1120px;
}

.admin-result-summary {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.admin-result-summary div {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
}

.admin-result-summary span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.admin-result-summary strong {
  display: block;
  overflow: hidden;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-result-summary .survey-status {
  display: inline-flex;
}

.admin-result-readonly {
  padding: 26px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: #fff;
}

@media (max-width: 900px) {
  .dashboard-body.admin-body {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .admin-shell {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px 10px 34px;
    overflow: visible;
  }

  .admin-sidebar {
    position: static;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    overflow-x: auto;
    border-radius: 18px;
  }

  .admin-sidebar a {
    padding: 11px 10px;
    text-align: center;
    white-space: nowrap;
    font-size: 0.86rem;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-panel {
    padding: 22px 16px;
  }

  .admin-table {
    min-width: 680px;
  }

  .admin-user-table {
    min-width: 680px;
  }

  .admin-table th,
  .admin-table td {
    padding: 12px 12px;
  }

  .admin-model-card {
    margin-bottom: 18px;
  }

  .admin-result-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .auth-shell {
    align-items: flex-start;
    padding: 24px 12px;
  }

  .auth-card {
    padding: 28px 20px;
    border-radius: 24px;
  }

  .auth-heading {
    margin-bottom: 22px;
    font-size: 1.55rem;
  }

  .auth-brand-min {
    margin-bottom: 22px;
  }

  .admin-shell {
    padding: 10px 8px 28px;
  }

  .admin-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-sidebar a {
    font-size: 0.82rem;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .admin-stats div,
  .admin-model-card {
    padding: 14px;
  }

  .admin-stats span {
    font-size: 1.55rem;
  }

  .admin-panel {
    padding: 18px 12px;
    border-radius: 22px;
  }

  .admin-panel .card-header {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .admin-list-toolbar {
    padding: 10px;
    border-radius: 18px;
  }

  .toolbar-search {
    min-height: 46px;
    padding: 0 12px;
  }

  .toolbar-search input {
    min-width: 0;
  }

  .toolbar-select {
    min-height: 46px;
  }

  .admin-table-wrap {
    border-radius: 16px;
  }

  .admin-table {
    min-width: 650px;
    font-size: 0.82rem;
  }

  .admin-user-table {
    min-width: 650px;
  }

  .admin-table th,
  .admin-table td {
    padding: 11px 10px;
  }

  .btn.small {
    min-width: 64px;
    padding: 8px 11px;
  }

  .dashboard-pagination {
    gap: 8px;
  }

  .page-btn {
    padding: 9px 13px;
  }

  .modal-mask {
    align-items: end;
    padding: 12px;
  }

  .modal-card {
    width: 100%;
    padding: 22px 18px;
    border-radius: 22px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .btn {
    width: 100%;
  }

  .admin-model-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .model-switch-grid {
    grid-template-columns: 1fr;
  }
}
