:root {
  --sidebar: #1e293b;
  --sidebar-hover: #334155;
  --sidebar-active: #475569;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #f8fafc;
  --sidebar-border: #334155;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --line: #e8eaed;
  --line-soft: #f0f1f3;
  --text: #111827;
  --text-2: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #3d5a80;
  --brand-hover: #2d4a6f;
  --green: #0d9f6e;
  --green-soft: #e8f8f1;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --hover: #f3f4f6;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 8px 30px rgba(16, 24, 40, 0.06);
  --radius: 14px;
  --radius-lg: 18px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --sidebar-w: 248px;
  --header-h: 64px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
}
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: none;
  background: none;
}
a {
  color: inherit;
  text-decoration: none;
}

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  border-right: 1px solid var(--sidebar-border);
}
.sidebar-brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--sidebar-border);
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--sidebar-active);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 12px;
}
.brand-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.brand-sub {
  font-size: 12px;
  color: var(--sidebar-text);
  margin-top: 2px;
}
.nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.nav-item,
.nav-exit {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--sidebar-text);
  font-weight: 500;
  font-size: 13px;
  text-align: left;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-item:hover,
.nav-exit:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  font-weight: 600;
  box-shadow: inset 3px 0 0 #64748b;
}
.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sidebar-border);
  flex-shrink: 0;
}
.nav-item.active .nav-dot {
  background: #cbd5e1;
}
.sidebar-bottom {
  padding: 0 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-foot {
  padding: 8px 12px;
  font-size: 11px;
  color: #64748b;
}

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-wrap {
  position: relative;
  min-width: 280px;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
}
.search-wrap input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px 0 34px;
  background: #fff;
}
.program-chip {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  padding: 8px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}

.content {
  padding: 24px;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.page-header h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.page-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.panel {
  padding: 18px 20px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-title {
  font-size: 15px;
  font-weight: 700;
}
.table-card {
  overflow: hidden;
}
.table-scroll {
  overflow-x: auto;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.kpi .label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kpi .value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}
.grid-2eq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  transition: 0.15s var(--ease);
}
.btn:hover {
  background: #f8fafc;
}
.btn.sm {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 8px;
}
.btn.primary {
  background: #111827;
  border-color: #111827;
  color: #fff;
}
.btn.primary:hover {
  background: #000;
}
.btn.danger {
  color: var(--red);
  background: #fff;
  border-color: #fecaca;
}
.btn.danger:hover {
  background: var(--red-soft);
}
.btn.ghost {
  background: transparent;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f3f4f6;
  color: var(--text-2);
}
.chip.ok {
  background: var(--green-soft);
  color: var(--green);
}
.chip.warn {
  background: var(--amber-soft);
  color: var(--amber);
}
.chip.info {
  background: #eef2ff;
  color: #4338ca;
}
.chip.violet {
  background: #f3e8ff;
  color: #7c3aed;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
}
.check-row input {
  width: auto;
  margin: 0;
}

.sub-pick {
  cursor: pointer;
  transition: background 0.15s ease;
}
.sub-pick:hover {
  background: #f8fafc;
}
.sub-fulltext {
  white-space: pre-wrap;
  font: inherit;
  margin: 0 0 18px;
  background: #f8fafc;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  line-height: 1.55;
  font-size: 14px;
  color: var(--text);
  max-height: min(48vh, 420px);
  overflow: auto;
}
.rate-panel {
  background: linear-gradient(180deg, #fbfcfe 0%, #f4f6fa 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px 14px;
}
.rate-panel-head {
  margin-bottom: 14px;
}
.rate-panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.rate-exemplary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}
.rate-exemplary:hover {
  border-color: #c7d2fe;
}
.rate-exemplary.on {
  border-color: #818cf8;
  background: #eef2ff;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.15);
}
.rate-exemplary-box {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  border: 2px solid #cbd5e1;
  background: #fff;
  position: relative;
  transition: all 0.15s ease;
}
.rate-exemplary.on .rate-exemplary-box {
  border-color: #4f46e5;
  background: #4f46e5;
}
.rate-exemplary.on .rate-exemplary-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.rate-exemplary-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rate-exemplary-copy b {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.rate-exemplary-copy small {
  font-size: 12px;
  color: var(--muted-2);
  line-height: 1.35;
}

table.data {
  width: 100%;
  border-collapse: collapse;
}
table.data th,
table.data td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
table.data th {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #fafbfc;
}
table.data td {
  font-size: 14px;
}
table.data tr:last-child td {
  border-bottom: none;
}
.name-cell b {
  display: block;
  font-weight: 700;
}
.name-cell .sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.row-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  min-width: 110px;
}
.assignment-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  margin: 0 -8px;
  border-radius: 12px;
  border-bottom: none;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.assignment-row + .assignment-row {
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  margin: 0;
}
.assignment-row:hover,
.assignment-row:focus-visible {
  background: var(--hover);
}
.assignment-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 110px;
}
.list-row {
  padding: 12px 14px;
  margin: 0 -6px;
  border-radius: 12px;
  border-bottom: none;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.list-row + .list-row {
  border-top: 1px solid var(--line-soft);
}
.list-row:hover,
.list-row:focus-visible {
  background: var(--hover);
}
.list-row:last-child {
  border-bottom: none;
}
.small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}

.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}
.field textarea {
  min-height: 110px;
  resize: vertical;
}
.field-help {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-wrap.open {
  display: flex;
}
.modal {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow: auto;
}
.modal h3 {
  margin: 0 0 14px;
  font-size: 18px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #111827;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s var(--ease);
  z-index: 120;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: none;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}
.filter-chip.active {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
}
.filter-chip .count {
  opacity: 0.7;
  font-weight: 700;
}
.bulk-actions-bar {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line-soft);
}
.bulk-actions-bar.show {
  display: flex;
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.code-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.code-row input {
  width: 120px;
  letter-spacing: 0.2em;
  font-weight: 700;
  text-align: center;
  font-size: 18px;
}
table.data th.participants-check,
table.data td.participants-check {
  width: 40px;
  text-align: center;
}
table.data a.table-link {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}
table.data a.table-link:hover {
  text-decoration: underline;
}

/* Custom select */
.custom-select {
  position: relative;
  min-width: 180px;
}
.custom-select-btn {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}
.custom-select-btn.sm {
  height: 32px;
  font-size: 12px;
  border-radius: 8px;
}
.custom-select-menu {
  display: none;
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 220px;
  max-height: 280px;
  overflow: auto;
  background: #1e293b;
  color: #f8fafc;
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow);
}
.custom-select.open .custom-select-menu {
  display: block;
}
.custom-select-option {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 500;
}
.custom-select-option:hover,
.custom-select-option.active {
  background: #3b82f6;
  color: #fff;
}

.filter-bar {
  align-items: flex-start;
}
.filter-chips-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-tag-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Drawer / profile */
.drawer-wrap {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}
.drawer-wrap.open {
  pointer-events: auto;
}
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: 0.2s var(--ease);
}
.drawer-wrap.open .drawer-backdrop {
  opacity: 1;
}
.drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(440px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateX(104%);
  transition: transform 0.25s var(--ease);
  display: flex;
  flex-direction: column;
}
.drawer-wrap.open .drawer {
  transform: none;
}
.drawer-head {
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.drawer-head h3 {
  margin: 4px 0 8px;
  font-size: 20px;
}
.drawer-code {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.drawer-ava {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.drawer-body {
  padding: 16px 20px 28px;
  overflow: auto;
  flex: 1;
}
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.info-tile {
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px;
}
.info-tile .lbl {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.info-tile .val {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 800;
}
.drawer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.accordion {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
}
.accordion.open {
  border-color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.15);
}
.accordion-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
}
.accordion-head .meta {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}
.accordion-body {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line-soft);
}
.accordion.open .accordion-body {
  display: block;
}
.item-block {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.item-block:last-child {
  border-bottom: none;
}
.feedback-text {
  margin-top: 6px;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}

.modal.modal-lg {
  width: min(720px, 100%);
}
.modal.modal-form {
  width: min(520px, 100%);
}
.modal-hero {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.modal-hero h2 {
  margin: 4px 0 0;
  font-size: 22px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-grid .field.full {
  grid-column: 1 / -1;
}
.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 700;
}
.tag-pill button {
  color: inherit;
  opacity: 0.7;
  font-size: 14px;
  line-height: 1;
}
.group-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.group-card:hover,
.group-card:focus-visible {
  background: var(--hover);
  border-color: var(--line);
  box-shadow: none;
}
.card.group-card:hover {
  background: var(--hover);
}
table.data tbody tr[data-open-profile],
table.data tbody tr[data-goto-tag],
table.data tbody tr.clickable-row,
table.data tbody tr[data-open-feedback] {
  cursor: pointer;
}
table.data tbody tr[data-open-profile]:hover td,
table.data tbody tr[data-goto-tag]:hover td,
table.data tbody tr.clickable-row:hover td,
table.data tbody tr[data-open-feedback]:hover td {
  background: var(--hover);
}
.acc-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.acc-block:hover {
  border-color: var(--line);
  background: var(--hover);
}
.member-row:hover {
  background: var(--hover);
}
.acc-block.open {
  border-color: #93c5fd;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.12);
}
.acc-block-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
}
.acc-block-head b {
  display: block;
  font-size: 15px;
}
.acc-block-body {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line-soft);
}
.acc-block.open .acc-block-body {
  display: block;
}
.acc-chevron {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.acc-block.open .acc-chevron {
  transform: rotate(180deg);
}

@media (max-width: 700px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .kpi-grid,
  .grid-2,
  .grid-2eq {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    width: 100%;
  }
  .shell {
    flex-direction: column;
  }
  .main {
    margin-left: 0;
  }
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, #fff7f0, #eceff4 55%, #e4e8ef);
  padding: 24px;
}
.login-gate.hidden { display: none; }
.login-card {
  width: min(380px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 18px 50px rgba(20, 24, 40, 0.12);
  display: grid;
  gap: 8px;
}
.login-card .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #111;
  color: #fff;
  font-weight: 800;
  margin-bottom: 4px;
}
.login-card h1 { margin: 0; font-size: 28px; }
.login-card p { margin: 0 0 8px; color: #6b7280; }
.login-card label { font-size: 12px; color: #6b7280; font-weight: 600; }
.login-card input {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  margin-bottom: 6px;
}
.login-error { color: #c0392b; min-height: 18px; font-size: 13px; margin: 0; }
.shell.blurred { filter: blur(2px); pointer-events: none; user-select: none; }
.nav-exit {
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.feedback-fields { display: grid; gap: 10px; }
.feedback-field .feedback-text { margin-top: 4px; }
.activity-list { display: grid; gap: 8px; }
.activity-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.activity-row.points {
  border-color: rgba(47, 157, 99, 0.35);
  background: rgba(47, 157, 99, 0.06);
}
.activity-row.clickable { cursor: pointer; }
.activity-row.clickable:hover { border-color: #cbd5e1; }
.activity-pts {
  font-weight: 800;
  color: #1f7a4d;
  white-space: nowrap;
}
.chart-area { margin-top: 12px; height: 220px; }
.activity-chart-svg { width: 100%; height: 220px; display: block; }
.chart-area-fill { fill: rgba(61, 90, 128, 0.12); }
.chart-line { fill: none; stroke: #3d5a80; stroke-width: 2.5; }
.upload-box-admin {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.upload-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--hover);
  font-size: 12px;
}
