/* Actitud — herramienta interna de valoración */

:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-3: #f1f3f7;
  --border: #e0e3ea;
  --border-strong: #cbd1db;
  --text: #1a1d23;
  --muted: #6b7280;
  --muted-strong: #4b5563;
  --muted-2: #8b93a1;
  --accent: #93092b;
  --accent-h: #7a0724;
  --accent-soft: #fcf1f3;
  --danger: #ef4444;
  --danger-h: #dc2626;
  --danger-soft: #fef2f2;
  --success: #047857;
  --success-soft: #ecfdf5;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --info: #1d4ed8;
  --info-soft: #eff6ff;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --focus: 0 0 0 3px rgba(147, 9, 43, 0.14);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 {
  margin-bottom: 6px;
  font-size: 1.65rem;
  line-height: 1.25;
}

h2 {
  margin-bottom: 4px;
  font-size: 1.12rem;
  line-height: 1.3;
}

h3 {
  margin-bottom: 3px;
  font-size: 0.98rem;
  line-height: 1.35;
}

svg {
  flex: 0 0 auto;
}

svg.icon {
  width: 16px;
  height: 16px;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

::selection {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------------------------------- Layout --------------------------------- */

#app {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  height: 62px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text small {
  margin-top: 2px;
  color: var(--muted-strong);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted-strong);
  font-size: 11.5px;
  font-weight: 600;
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.user-meta strong {
  overflow: hidden;
  max-width: 200px;
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta small {
  overflow: hidden;
  max-width: 200px;
  color: var(--muted-strong);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.page.narrow {
  max-width: 920px;
}

.page.teacher-page {
  max-width: 1200px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.page-head h1 {
  margin-bottom: 4px;
}

.page-head p {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--muted-strong);
  font-size: 13.5px;
}

.crumbs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 500;
}

.crumbs:hover {
  color: var(--accent);
  text-decoration: none;
}

.crumbs svg {
  width: 14px;
  height: 14px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.nowrap {
  white-space: nowrap;
}

/* --------------------------------- Controls -------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  border-color: var(--accent-h);
  background: var(--accent-h);
}

.btn-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-2);
}

.btn-ghost {
  color: var(--muted);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-3);
  color: var(--text);
}

.btn-danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  border-color: var(--danger-h);
  background: var(--danger-h);
}

.btn-danger-ghost {
  border-color: transparent;
  color: var(--danger);
}

.btn-danger-ghost:hover:not(:disabled) {
  background: var(--danger-soft);
}

.btn-sm {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 12.5px;
}

.btn-lg {
  min-height: 44px;
  padding: 11px 18px;
  font-size: 14.5px;
}

.btn-icon {
  width: 32px;
  min-height: 32px;
  padding: 0;
}

.btn .icon {
  width: 15px;
  height: 15px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > label,
.field-label {
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
}

.field .hint {
  color: var(--muted-strong);
  font-size: 12.5px;
  line-height: 1.45;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 14.5px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.input,
.select {
  height: 42px;
  padding: 0 12px;
}

.textarea {
  min-height: 148px;
  padding: 11px 12px;
  line-height: 1.6;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted-2);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus);
}

.input-sm {
  height: 34px;
  font-size: 12.5px;
}

.field-error {
  color: var(--danger);
  font-size: 12px;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: #991b1b;
  font-size: 12.5px;
  line-height: 1.5;
}

.alert-warn {
  border-color: #fde68a;
  background: var(--warning-soft);
  color: #92400e;
}

.alert-info {
  border-color: #bfdbfe;
  background: var(--info-soft);
  color: #1e40af;
}

.alert svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --------------------------------- Loading --------------------------------- */

.boot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 100vh;
  color: var(--muted);
  font-size: 13px;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.loading-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 260px;
  color: var(--muted);
  font-size: 13px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fade-up 160ms ease both;
}

/* ---------------------------------- Login ---------------------------------- */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 32px 20px;
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 34px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.login-brand img {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
}

.login-card h1 {
  margin-bottom: 7px;
  font-size: 1.45rem;
}

.login-lead {
  margin-bottom: 24px;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.6;
}

.google-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 4px 0 2px;
}

.google-slot > div {
  max-width: 100%;
}

.login-error {
  margin-top: 16px;
}

.dev-box {
  margin-top: 22px;
  padding: 13px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.dev-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}

.dev-head .tag {
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  color: var(--muted-strong);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dev-box p {
  margin-bottom: 11px;
  color: var(--muted-strong);
  font-size: 12.5px;
  line-height: 1.5;
}

.dev-form {
  display: flex;
  gap: 6px;
}

.dev-form .input {
  flex: 1;
  min-width: 0;
  height: 38px;
  font-size: 13.5px;
}

.dev-accounts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.dev-account {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}

.dev-account:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.dev-account .role {
  color: var(--muted-strong);
  font-size: 10px;
  text-transform: uppercase;
}

.login-foot {
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
}

/* -------------------------------- Dashboard -------------------------------- */

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

.stat-card {
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-card .stat-label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted-strong);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-card .stat-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-card .stat-sub {
  color: var(--muted-strong);
  font-size: 12.5px;
}

/* ------------------------------- Assignments ------------------------------- */

.assignment-list {
  display: flex;
  flex-direction: column;
}

.assignment-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.assignment-row:last-child {
  border-bottom: 0;
}

.assignment-row:hover {
  background: var(--surface-2);
  text-decoration: none;
}

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

.assignment-title {
  display: block;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted-strong);
  font-size: 12.5px;
}

.assignment-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 190px;
}

.assignment-progress .progress {
  flex: 1;
}

.assignment-percent {
  width: 38px;
  color: var(--muted-strong);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* --------------------------------- Progress -------------------------------- */

.progress {
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
}

.progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 240ms ease;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted-strong);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.open {
  border-color: #a7f3d0;
  background: var(--success-soft);
  color: var(--success);
}

.status-badge.closed {
  border-color: var(--border);
  background: var(--surface-3);
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted-strong);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------------------------------- Panels --------------------------------- */

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
}

.panel-head h2 {
  margin-bottom: 3px;
  font-size: 1.08rem;
}

.panel-head p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 12.5px;
}

.panel-body {
  padding: 0 16px 16px;
}

.panel-separator {
  height: 1px;
  margin: 0 16px;
  background: var(--border);
}

.panel-foot {
  padding: 12px 16px 16px;
}

/* ---------------------------------- Forms ---------------------------------- */

.form-panel {
  padding: 20px;
}

.form-panel h2 {
  margin-bottom: 3px;
  font-size: 1.08rem;
}

.form-panel > p {
  margin-bottom: 18px;
  color: var(--muted-strong);
  font-size: 12.5px;
}

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

.form-section-head h2 {
  margin: 0;
}

.form-section-head p {
  margin: 3px 0 0;
  color: var(--muted-strong);
  font-size: 12.5px;
}

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

.form-grid .span-2 {
  grid-column: span 2;
}

.range-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  color: var(--muted-strong);
  font-size: 11.5px;
}

.range-hint strong {
  color: var(--text);
  font-weight: 600;
}

.criteria-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.criterion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 32px;
  gap: 8px;
  align-items: center;
}

.criterion-row .weight-wrap {
  position: relative;
}

.criterion-row .weight-wrap .input {
  padding-right: 24px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.criterion-row .weight-wrap::after {
  content: "%";
  position: absolute;
  top: 50%;
  right: 9px;
  color: var(--muted-2);
  font-size: 11px;
  transform: translateY(-50%);
}

.criteria-total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted-strong);
  font-size: 12.5px;
}

.criteria-total strong {
  color: var(--text);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.criteria-total .warn {
  color: var(--warning);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.form-error {
  margin-bottom: 14px;
}

/* --------------------------------- Detail ---------------------------------- */

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.detail-head-main {
  min-width: 0;
}

.detail-head h1 {
  margin-bottom: 6px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 14px;
  color: var(--muted-strong);
  font-size: 12.5px;
}

.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.detail-meta svg {
  width: 13px;
  height: 13px;
  color: var(--muted-2);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  max-width: 560px;
}

.summary-bar {
  margin-bottom: 18px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.summary-top span {
  color: var(--muted);
  font-size: 12px;
}

.summary-top strong {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.summary-bar .progress {
  margin-bottom: 6px;
}

.summary-bar small {
  color: var(--muted);
  font-size: 11.5px;
}

/* --------------------------------- Tables ---------------------------------- */

.table-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.data-table thead th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.data-table tbody tr:hover {
  background: #fbfcfd;
}

.data-table .num {
  text-align: center;
}

.data-table .student-col {
  min-width: 180px;
}

.row-title {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.row-title:hover {
  color: var(--accent);
}

.row-sub {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  white-space: nowrap;
}

.data-table .student-name {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.data-table .student-sub {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10.5px;
}

.rank-cell {
  width: 48px;
  text-align: center !important;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.rank-badge.r1 {
  background: var(--accent-soft);
  color: var(--accent);
}

.rank-badge.r2,
.rank-badge.r3 {
  background: var(--surface-3);
  color: var(--text);
}

.teacher-head {
  min-width: 76px;
  text-align: center !important;
}

.teacher-head .th-name {
  display: block;
  overflow: hidden;
  max-width: 120px;
  margin: 0 auto;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.teacher-head .th-sub {
  display: block;
  overflow: hidden;
  max-width: 120px;
  margin: 1px auto 0;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.score-pill.tone-1 { background: var(--danger-soft); color: #b91c1c; }
.score-pill.tone-2 { background: var(--warning-soft); color: #b45309; }
.score-pill.tone-3 { background: var(--info-soft); color: #1d4ed8; }
.score-pill.tone-4 { background: var(--success-soft); color: var(--success); }

.score-pill.lg {
  min-width: 50px;
  padding: 5px 8px;
  font-size: 13px;
}

.score-pill.empty {
  background: transparent;
  color: var(--muted-2);
  font-weight: 500;
}

.final-cell {
  min-width: 90px;
  text-align: center !important;
}

.completion-cell {
  min-width: 110px;
}

.completion-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.completion-wrap .progress {
  width: 68px;
  height: 5px;
}

.completion-wrap span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.legend-line {
  padding: 10px 16px 13px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 10.5px;
}

.table-hint {
  display: none;
  padding: 0 16px 10px;
  color: var(--muted);
  font-size: 10.5px;
}

details.criteria-details {
  border-top: 1px solid var(--border);
}

details.criteria-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

details.criteria-details summary::-webkit-details-marker {
  display: none;
}

details.criteria-details summary .summary-copy {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

details.criteria-details summary .chevron {
  width: 15px;
  height: 15px;
  color: var(--muted);
  transition: transform 140ms ease;
}

details.criteria-details[open] summary .chevron {
  transform: rotate(180deg);
}

details.criteria-details .details-body {
  border-top: 1px solid var(--border);
}

/* --------------------------------- People ---------------------------------- */

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

.people-panel .panel-head {
  padding-bottom: 10px;
}

.people-list {
  display: flex;
  flex-direction: column;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-top: 1px solid var(--border);
}

.person-info {
  flex: 1;
  min-width: 0;
}

.person-name {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-sub {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-progress {
  width: 70px;
  flex: 0 0 auto;
}

.person-progress .progress {
  height: 5px;
  margin-bottom: 2px;
}

.person-progress small {
  color: var(--muted);
  font-size: 9.5px;
}

.person-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  opacity: 0;
  transition: background 120ms ease, color 120ms ease, opacity 120ms ease;
}

.person-remove svg {
  width: 14px;
  height: 14px;
}

.person-row:hover .person-remove,
.person-remove:focus-visible {
  opacity: 1;
}

.person-remove:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.people-add {
  display: flex;
  gap: 6px;
  padding: 11px 16px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
}

.people-add .input {
  height: 32px;
  font-size: 12px;
}

.people-add > .input {
  flex: 1;
  min-width: 0;
}

.people-add-stack {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) auto;
  gap: 6px;
  width: 100%;
}

.invite-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.invite-state.sent {
  color: var(--success);
}

.invite-state::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  background: var(--danger-soft);
}

.danger-zone h3 {
  margin-bottom: 1px;
  font-size: 12.5px;
  font-weight: 600;
}

.danger-zone p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
}

/* ------------------------------ Teacher matrix ----------------------------- */

.eval-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.eval-head h1 {
  margin-bottom: 5px;
}

.eval-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.save-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.save-state .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.save-state.saving .dot {
  background: var(--warning);
  animation: pulse 900ms ease infinite;
}

.save-state.pending .dot {
  background: var(--warning);
}

.save-state.error {
  border-color: #fecaca;
  background: var(--danger-soft);
  color: var(--danger);
}

.save-state.error .dot {
  background: var(--danger);
}

.save-state:disabled {
  cursor: default;
  opacity: 0.8;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.eval-progress {
  margin-bottom: 18px;
}

.eval-progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11.5px;
}

.eval-progress-top strong {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.eval-progress .progress {
  height: 7px;
}

.matrix-panel {
  overflow: hidden;
}

.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 14px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.legend-title {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 10.5px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 600;
}

.legend .n1 { background: var(--danger-soft); color: #b91c1c; }
.legend .n2 { background: var(--warning-soft); color: #b45309; }
.legend .n3 { background: var(--info-soft); color: #1d4ed8; }
.legend .n4 { background: var(--success-soft); color: var(--success); }

.matrix-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
}

.eval-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.eval-table th,
.eval-table td {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  vertical-align: middle;
}

.eval-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
}

.eval-table thead th .crit-name {
  display: block;
  max-width: 132px;
  margin: 0 auto 2px;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}

.eval-table thead th .crit-weight {
  display: inline-block;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
}

.eval-table tbody tr:last-child th,
.eval-table tbody tr:last-child td {
  border-bottom: 0;
}

.eval-table tbody tr:hover td,
.eval-table tbody tr:hover th {
  background: #fbfcfd;
}

.eval-table .student-cell {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 190px;
  max-width: 230px;
  padding: 9px 14px;
  text-align: left;
  box-shadow: 1px 0 0 var(--border);
}

.eval-table thead .student-cell {
  z-index: 5;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.eval-table .student-name {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.eval-table .student-sub {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.eval-table .criteria-cell {
  min-width: 130px;
  padding: 7px 8px;
}

.score-group {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-2);
}

.score-btn {
  width: 28px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 100ms ease, color 100ms ease;
}

.score-btn:hover:not(:disabled) {
  background: var(--surface);
  color: var(--text);
}

.score-btn:disabled {
  cursor: default;
  opacity: 0.65;
}

.score-btn.is-selected[data-score="1"] { background: #b91c1c; color: #fff; }
.score-btn.is-selected[data-score="2"] { background: #b45309; color: #fff; }
.score-btn.is-selected[data-score="3"] { background: #1d4ed8; color: #fff; }
.score-btn.is-selected[data-score="4"] { background: var(--success); color: #fff; }

.eval-table .avg-cell {
  position: sticky;
  right: 0;
  z-index: 3;
  min-width: 76px;
  padding: 8px 12px;
  background: var(--surface);
  box-shadow: -1px 0 0 var(--border);
}

.eval-table thead .avg-cell {
  z-index: 5;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.teacher-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.teacher-note svg {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--success);
}

.complete-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 13px;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius);
  background: var(--success-soft);
}

.complete-banner .check {
  display: inline-flex;
  color: var(--success);
}

.complete-banner .check svg {
  width: 18px;
  height: 18px;
}

.complete-banner h3 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
}

.complete-banner p {
  margin: 0;
  color: #065f46;
  font-size: 11.5px;
}

.readonly-banner {
  margin-bottom: 16px;
}

/* -------------------------------- Empty/error ------------------------------ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  padding: 36px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--surface-3);
  color: var(--muted);
}

.empty-icon svg {
  width: 22px;
  height: 22px;
}

.empty-state h2 {
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.empty-state p {
  max-width: 380px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12.5px;
}

.state-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  padding: 36px 20px;
}

.state-card {
  width: 100%;
  max-width: 440px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
}

.state-icon svg {
  width: 22px;
  height: 22px;
}

.state-icon.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.state-card h1 {
  font-size: 1.3rem;
}

.state-card p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.state-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.inline-empty {
  padding: 28px 20px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.inline-empty h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 1rem;
}

.inline-empty p {
  max-width: 360px;
  margin: 0 auto 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.inline-empty .empty-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
}

.inline-empty .empty-icon svg {
  width: 19px;
  height: 19px;
}

.inline-empty .state-actions {
  gap: 6px;
}

/* ---------------------------------- Modal ---------------------------------- */

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.45);
  animation: modal-fade 120ms ease both;
}

.modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  max-height: calc(100dvh - 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.35);
  animation: modal-up 140ms ease both;
}

.modal-card:focus {
  outline: none;
}

.modal-card.wide {
  max-width: 740px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 12px;
}

.modal-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.modal-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.modal-close svg {
  width: 15px;
  height: 15px;
}

.modal-close:hover {
  background: var(--surface-3);
  color: var(--text);
}

.modal-body {
  overflow-y: auto;
  padding: 0 20px 4px;
}

.modal-body p {
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 14px;
  padding: 13px 20px 18px;
  border-top: 1px solid var(--border);
}

.modal-foot .spacer {
  flex: 1;
}

.email-frame {
  width: 100%;
  height: 420px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.modal-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0 0 12px;
  padding: 9px 11px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.modal-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 220px;
  color: var(--muted);
  font-size: 12.5px;
}

.confirm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 11px;
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
}

.confirm-icon svg {
  width: 19px;
  height: 19px;
}

.confirm-icon.warn {
  background: var(--warning-soft);
  color: var(--warning);
}

@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------- Toasts --------------------------------- */

.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: min(350px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: #1f2937;
  color: #f9fafb;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.45);
  animation: toast-in 160ms ease both;
  pointer-events: auto;
}

.toast svg {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.toast.error {
  background: #991b1b;
}

.toast.leaving {
  animation: toast-out 150ms ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(4px); }
}

/* -------------------------------- Responsive ------------------------------- */

@media (max-width: 960px) {
  .detail-head {
    flex-direction: column;
    gap: 12px;
  }

  .detail-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .form-grid,
  .people-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 820px) {
  .page {
    padding: 22px 16px 64px;
  }

  .topbar-inner {
    height: 52px;
    padding: 0 16px;
  }

  .brand-text small {
    display: none;
  }

  .topbar .user-meta {
    display: none;
  }

  .page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .page-head .btn {
    align-self: flex-start;
  }

  .stats-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stat-card {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 13px;
  }

  .stat-card .stat-label {
    margin: 0;
  }

  .stat-card .stat-sub {
    display: none;
  }

  .stat-card .stat-value {
    font-size: 1.15rem;
  }

  .panel-head,
  .form-panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  .panel-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .panel-separator {
    margin: 0 14px;
  }

  .panel-foot {
    padding-left: 14px;
    padding-right: 14px;
  }

  .summary-bar {
    padding: 11px 13px;
  }

  .person-row {
    padding-left: 14px;
    padding-right: 14px;
  }

  .person-remove {
    opacity: 1;
  }

  .people-add {
    padding-left: 14px;
    padding-right: 14px;
  }

  .people-add-stack {
    grid-template-columns: 1fr;
  }

  .danger-zone {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 14px;
  }

  .table-hint {
    display: block;
    padding-left: 14px;
    padding-right: 14px;
  }

  .legend-line {
    padding-left: 14px;
    padding-right: 14px;
  }

  .data-table th,
  .data-table td {
    padding: 9px 10px;
  }

  .data-table .student-col {
    min-width: 150px;
  }

  .eval-head {
    flex-direction: column;
    gap: 10px;
  }

  .eval-sub {
    font-size: 11.5px;
  }

  .matrix-panel {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .matrix-legend {
    padding: 0 0 10px;
    border-bottom: 0;
    background: transparent;
  }

  .matrix-scroll {
    overflow: visible;
  }

  .eval-table,
  .eval-table tbody {
    display: block;
    width: 100%;
  }

  .eval-table thead {
    display: none;
  }

  .eval-table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .eval-table tr {
    display: block;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .eval-table th,
  .eval-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 6px 0;
    border: 0;
    background: transparent !important;
    text-align: right;
    box-shadow: none !important;
  }

  .eval-table .student-cell {
    position: static;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
    text-align: left;
  }

  .eval-table .student-name {
    font-size: 14px;
  }

  .eval-table td::before {
    content: attr(data-label);
    max-width: 55%;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
  }

  .eval-table .avg-cell {
    position: static;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }

  .eval-table .avg-cell .score-pill {
    min-width: 50px;
  }

  .score-btn {
    width: 38px;
    height: 34px;
    font-size: 12.5px;
  }

  .teacher-note {
    padding: 0 2px;
  }

  .modal-backdrop {
    padding: 10px;
    align-items: flex-end;
  }

  .modal-card {
    max-height: calc(100dvh - 20px);
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .email-frame {
    height: 360px;
  }
}

@media (max-width: 640px) {
  .assignment-row {
    flex-wrap: wrap;
    gap: 9px 12px;
  }

  .assignment-main {
    flex: 1 1 100%;
  }

  .assignment-progress {
    flex: 1 1 auto;
  }

  .assignment-row .btn {
    flex: 0 0 auto;
  }

  .detail-actions {
    width: 100%;
  }

  .detail-actions .btn {
    flex: 1 1 auto;
  }

  .row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .page-head h1,
  .detail-head h1,
  .eval-head h1 {
    font-size: 1.3rem;
  }

  .login-page {
    align-items: flex-start;
    padding: 20px 14px;
  }

  .login-card {
    padding: 22px 18px;
  }

  .dev-form {
    flex-direction: column;
  }

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

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

  .criterion-row {
    grid-template-columns: 1fr 82px 30px;
    gap: 6px;
  }

  .person-progress {
    display: none;
  }

  .toasts {
    right: 14px;
    bottom: 14px;
  }

  .eval-head .status-badge {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
