:root {
  --brand: #6c55d9;
  --brand-strong: #5740c5;
  --brand-soft: #f1efff;
  --brand-softer: #f8f7ff;
  --aqua: #35c7ce;
  --aqua-soft: #e9fafb;
  --coral: #ff947f;
  --coral-soft: #fff0ec;
  --pink: #ec5fa7;
  --ink: #1d2939;
  --ink-soft: #475467;
  --muted: #667085;
  --muted-light: #98a2b3;
  --line: #e8e8f0;
  --line-strong: #d9dbe7;
  --surface: #ffffff;
  --surface-alt: #f8f9fc;
  --canvas: #f5f6fa;
  --success: #14866d;
  --success-soft: #e8f7f1;
  --warning: #b26a00;
  --warning-soft: #fff5df;
  --danger: #cf3c4f;
  --danger-soft: #fff0f1;
  --info: #2774ca;
  --info-soft: #edf5ff;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 3px 12px rgba(36, 32, 67, 0.07);
  --shadow-md: 0 12px 30px rgba(36, 32, 67, 0.12);
  --shadow-lg: 0 24px 60px rgba(29, 22, 62, 0.18);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --sidebar-width: 264px;
  --topbar-height: 72px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

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

button,
a,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

svg {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid rgba(108, 85, 217, 0.28);
  outline-offset: 2px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Login */
.login-page {
  position: relative;
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(380px, 0.92fr) minmax(540px, 1.08fr);
  overflow: hidden;
  background: var(--surface);
}

.login-panel {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 54px clamp(34px, 6vw, 92px);
}

.login-form-wrap {
  width: min(100%, 430px);
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 62px;
}

.login-brand img,
.brand-mark img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.login-brand strong,
.brand-copy strong {
  display: block;
  color: #37287d;
  font-size: 19px;
  font-weight: 760;
  letter-spacing: 0.04em;
  line-height: 1.05;
}

.login-brand > span > span,
.brand-copy > span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.login-form-wrap h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.login-subtitle {
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 15px;
}

.quick-login {
  margin-top: 21px;
}

.quick-login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted-light);
  font-size: 10px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

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

.quick-login-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.quick-login-card {
  display: inline-flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 10.5px;
  font-weight: 620;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s, transform 0.16s;
}

.quick-login-card > .icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  opacity: 0.78;
}

.quick-login-card > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-login-card:hover {
  border-color: var(--line-strong);
  color: var(--brand-strong);
  background: var(--brand-softer);
}

.quick-login-card:focus-visible {
  border-color: var(--brand);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(108, 85, 217, 0.11);
}

.quick-login-card.selected {
  border-color: rgba(108, 85, 217, 0.25);
  color: var(--brand-strong);
  background: var(--brand-softer);
}

.field {
  display: grid;
  gap: 8px;
}

.field + .field {
  margin-top: 18px;
}

.field label,
.form-label {
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

.input-wrap {
  position: relative;
}

.input-wrap > .icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--muted-light);
  transform: translateY(-50%);
  pointer-events: none;
}

.input-wrap input {
  padding-left: 43px;
  padding-right: 44px;
}

.field .input-wrap input {
  padding-left: 43px;
  padding-right: 44px;
}

.input-control,
.field input,
.field select,
.field textarea,
.search-control {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: 0;
  background: var(--surface);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.field input,
.field select,
.field textarea,
.input-control {
  padding: 11px 13px;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.input-control:hover,
.search-control:hover {
  border-color: #bfc1d3;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.input-control:focus,
.search-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(108, 85, 217, 0.11);
}

.input-action {
  position: absolute;
  top: 50%;
  right: 9px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  transform: translateY(-50%);
}

.input-action:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-inline input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.text-link {
  padding: 0;
  color: var(--brand-strong);
  font-weight: 650;
  background: none;
}

.text-link:hover {
  text-decoration: underline;
}

.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 680;
  line-height: 1.2;
  transition: transform 0.16s, background 0.16s, border-color 0.16s, box-shadow 0.16s;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #755fe0 0%, #5e45cc 100%);
  box-shadow: 0 7px 17px rgba(94, 69, 204, 0.2);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 9px 20px rgba(94, 69, 204, 0.28);
}

.btn-secondary {
  border-color: var(--line-strong);
  color: #344054;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover:not(:disabled) {
  border-color: #c4c1dd;
  color: var(--brand-strong);
  background: var(--brand-softer);
}

.btn-ghost {
  color: var(--ink-soft);
  background: transparent;
}

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

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

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 35px;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 12px;
}

.login-security {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0;
  color: var(--muted-light);
  font-size: 12px;
}

.login-security .icon {
  width: 15px;
  height: 15px;
}

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -10px 0 16px;
  padding: 10px 12px;
  border: 1px solid #ffd8dc;
  border-radius: 9px;
  color: #a92f3f;
  background: var(--danger-soft);
  font-size: 12px;
}

.login-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: flex-end;
  overflow: hidden;
  padding: clamp(46px, 7vw, 92px);
  color: #fff;
  background:
    radial-gradient(circle at 72% 18%, rgba(62, 215, 218, 0.35), transparent 25%),
    radial-gradient(circle at 15% 70%, rgba(240, 92, 171, 0.25), transparent 28%),
    linear-gradient(145deg, #332274 0%, #5943b5 48%, #7354d1 100%);
}

.visual-grid {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
}

.visual-graph {
  position: absolute;
  z-index: 1;
  top: -1%;
  left: -5%;
  width: 110%;
  height: 84%;
  opacity: 0.38;
  mix-blend-mode: screen;
  pointer-events: none;
}

.visual-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.visual-kicker {
  display: block;
  margin-bottom: 15px;
  color: rgba(255,255,255,.68);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.visual-kicker::before {
  content: none;
}

.visual-content h2 {
  max-width: 580px;
  margin: 0;
  font-size: clamp(34px, 4.1vw, 56px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.07;
}

.visual-content p {
  max-width: 540px;
  margin: 20px 0 0;
  color: rgba(255,255,255,.74);
  font-size: 16px;
  line-height: 1.7;
}

/* Application shell */
.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  border-right: 1px solid #ececf3;
  background: #fff;
  transition: transform 0.25s ease;
}

.brand-mark {
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  gap: 11px;
  padding: 0 24px;
  border-bottom: 1px solid #f0f0f5;
}

.brand-mark img {
  width: 38px;
  height: 38px;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 22px 14px;
}

.nav-label {
  margin: 0 11px 8px;
  color: #a0a3b2;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav-label:not(:first-child) {
  margin-top: 25px;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 43px;
  align-items: center;
  gap: 12px;
  margin: 3px 0;
  padding: 10px 12px;
  border-radius: 9px;
  color: #5d6373;
  background: transparent;
  font-size: 13px;
  font-weight: 560;
  text-align: left;
  transition: color 0.16s, background 0.16s;
}

.nav-item:hover {
  color: var(--brand-strong);
  background: var(--brand-softer);
}

.nav-item.active {
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-weight: 680;
}

.nav-item.active::before {
  position: absolute;
  left: -14px;
  width: 3px;
  height: 25px;
  border-radius: 0 4px 4px 0;
  background: var(--brand);
  content: "";
}

.nav-item .icon {
  width: 18px;
  height: 18px;
}

.nav-count {
  display: grid;
  min-width: 22px;
  height: 20px;
  place-items: center;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--brand-strong);
  background: #fff;
  font-size: 10px;
  font-weight: 750;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid #f0f0f5;
}

.ai-sidebar-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid #e4e0ff;
  border-radius: 13px;
  background: linear-gradient(145deg, #faf9ff, #f0edff);
}

.ai-sidebar-card::after {
  position: absolute;
  top: -25px;
  right: -25px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(108, 85, 217, 0.09);
  content: "";
}

.ai-sidebar-head {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #4f39b8;
  font-size: 12.5px;
  font-weight: 720;
}

.ai-orb {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #a04dd5);
  box-shadow: 0 5px 12px rgba(108, 85, 217, 0.22);
}

.ai-orb .icon {
  width: 15px;
  height: 15px;
}

.ai-sidebar-card p {
  position: relative;
  z-index: 1;
  margin: 9px 0 11px;
  color: #746e8b;
  font-size: 11.5px;
  line-height: 1.45;
}

.ai-sidebar-card .btn {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 32px;
  font-size: 11.5px;
}

.topbar {
  position: fixed;
  z-index: 40;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(20px, 3vw, 38px);
  border-bottom: 1px solid #e9eaf1;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.topbar-left,
.topbar-actions,
.user-trigger {
  display: flex;
  align-items: center;
}

.topbar-left {
  min-width: 0;
  gap: 12px;
}

.topbar-title {
  min-width: 0;
}

.topbar-title strong,
.topbar-title span {
  display: block;
}

.topbar-title strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-title span {
  color: var(--muted-light);
  font-size: 11px;
}

.topbar-actions {
  gap: 7px;
}

.icon-btn {
  position: relative;
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink-soft);
  background: transparent;
}

.icon-btn:hover {
  border-color: var(--line);
  color: var(--brand-strong);
  background: var(--brand-softer);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--coral);
}

.mobile-menu-btn {
  display: none;
}

.user-menu-wrap {
  position: relative;
  margin-left: 5px;
}

.user-trigger {
  gap: 10px;
  padding: 4px 5px 4px 8px;
  border-radius: 11px;
  background: transparent;
}

.user-trigger:hover {
  background: var(--surface-alt);
}

.avatar {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #725ada, #9b6be0);
  box-shadow: 0 0 0 1px #ded9f6;
  font-size: 11px;
  font-weight: 750;
}

.avatar.aqua { background: linear-gradient(135deg, #239fa8, #54d1d2); box-shadow: 0 0 0 1px #c9eeee; }
.avatar.coral { background: linear-gradient(135deg, #e67863, #ffad98); box-shadow: 0 0 0 1px #f8ddd6; }
.avatar.pink { background: linear-gradient(135deg, #cf478c, #ef78b7); box-shadow: 0 0 0 1px #f2d2e3; }
.avatar.blue { background: linear-gradient(135deg, #3b75bb, #67a6e8); box-shadow: 0 0 0 1px #d7e6f6; }

.user-copy {
  text-align: left;
}

.user-copy strong,
.user-copy span {
  display: block;
}

.user-copy strong {
  max-width: 160px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy span {
  margin-top: 1px;
  color: var(--muted-light);
  font-size: 10px;
}

.chevron {
  width: 14px !important;
  height: 14px !important;
  color: var(--muted-light);
}

.dropdown {
  position: absolute;
  z-index: 100;
  top: calc(100% + 10px);
  right: 0;
  width: 224px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-md);
  animation: dropdown-in 0.16s ease-out;
}

.dropdown[hidden] {
  display: none;
}

.dropdown-head {
  padding: 10px 10px 11px;
  border-bottom: 1px solid var(--line);
}

.dropdown-head strong,
.dropdown-head span {
  display: block;
}

.dropdown-head strong { font-size: 12px; }
.dropdown-head span { margin-top: 2px; color: var(--muted); font-size: 10px; }

.dropdown-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  text-align: left;
}

.dropdown-item:hover { color: var(--brand-strong); background: var(--brand-softer); }
.dropdown-item.danger:hover { color: var(--danger); background: var(--danger-soft); }
.dropdown-item .icon { width: 16px; height: 16px; }
.dropdown-separator { height: 1px; margin: 5px 3px; background: var(--line); }

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

.main-content {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: calc(var(--topbar-height) + 26px) clamp(20px, 3vw, 38px) 38px;
}

.page {
  max-width: 1500px;
  margin: 0 auto;
}

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

.eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--brand-strong);
  font-size: 10px;
  font-weight: 740;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow .icon { width: 13px; height: 13px; }

.page-heading h1 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 31px);
  font-weight: 710;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.page-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.date-chip {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 11px;
  font-weight: 590;
}

.date-chip .icon { width: 16px; height: 16px; color: var(--brand); }

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

.metric-card,
.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.metric-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 16px;
  border-radius: var(--radius);
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric-icon {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 10px;
}

.metric-icon.purple { color: var(--brand-strong); background: var(--brand-soft); }
.metric-icon.aqua { color: #14858b; background: var(--aqua-soft); }
.metric-icon.coral { color: #c8604c; background: var(--coral-soft); }
.metric-icon.blue { color: #2c6dad; background: var(--info-soft); }
.metric-icon .icon { width: 18px; height: 18px; }

.metric-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 10px;
  font-weight: 720;
}

.metric-trend.neutral { color: var(--muted); background: var(--surface-alt); }
.metric-trend.attention { color: var(--warning); background: var(--warning-soft); }
.metric-trend .icon { width: 11px; height: 11px; }

.metric-value {
  margin: 13px 0 4px;
  font-size: 28px;
  font-weight: 730;
  letter-spacing: -0.04em;
  line-height: 1;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, 0.8fr);
  align-items: start;
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
  align-items: start;
  gap: 18px;
}

.dashboard-column {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 18px;
}

.panel {
  min-width: 0;
  border-radius: var(--radius);
}

.panel-head {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 16px;
  border-bottom: 1px solid #f0f0f5;
}

.panel-title strong,
.panel-title span {
  display: block;
}

.panel-title strong {
  font-size: 14px;
  font-weight: 690;
}

.panel-title span {
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 11.5px;
}

.panel-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  color: var(--brand-strong);
  background: transparent;
  font-size: 11.5px;
  font-weight: 670;
}

.panel-action:hover { text-decoration: underline; }
.panel-action .icon { width: 13px; height: 13px; }

.panel-body {
  padding: 16px;
}

.chart-wrap {
  position: relative;
  min-height: 0;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10.5px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.legend-dot.aqua { background: var(--aqua); }

.area-chart {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 620 / 215;
  overflow: visible;
}

.chart-gridline { stroke: #ececf3; stroke-width: 1; }
.chart-label { fill: #98a2b3; font-family: var(--font); font-size: 10px; }
.chart-line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-line-secondary { fill: none; stroke: var(--aqua); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 4 4; }
.chart-point { fill: #fff; stroke: var(--brand); stroke-width: 2; }

.pattern-list {
  display: grid;
  gap: 8px;
}

.pattern-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 11px;
  border: 1px solid #eceaf8;
  border-radius: 11px;
  background: #fcfbff;
  text-align: left;
}

.pattern-item:hover {
  border-color: #dbd5fa;
  background: var(--brand-softer);
}

.pattern-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 9px;
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.pattern-icon .icon { width: 15px; height: 15px; }
.pattern-copy { min-width: 0; padding-top: 1px; }
.pattern-copy strong { display: block; overflow: hidden; font-size: 12px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.pattern-copy p { display: -webkit-box; overflow: hidden; margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.pattern-confidence { align-self: start; padding: 4px 7px; border-radius: 999px; color: var(--success); background: var(--success-soft); font-size: 9.5px; font-weight: 740; text-transform: uppercase; }
.pattern-confidence.moderada { color: var(--warning); background: var(--warning-soft); }
.pattern-confidence.baixa { color: var(--muted); background: var(--surface-alt); }
.pattern-item > .chevron { align-self: center; }
.dashboard-pattern .pattern-confidence { margin-top: 1px; }

.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  align-items: start;
  gap: 18px;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-light);
  background: #fbfbfd;
  font-size: 10px;
  font-weight: 690;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 11px 13px;
  border-bottom: 1px solid #f0f0f5;
  color: var(--ink-soft);
  font-size: 12px;
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr.clickable:hover { background: #faf9ff; cursor: pointer; }

.person-cell {
  display: flex;
  min-width: 170px;
  align-items: center;
  gap: 9px;
}

.person-cell .avatar { width: 30px; height: 30px; font-size: 9px; }
.person-cell > div > strong,
.person-cell > div > span { display: block; }
.person-cell > div > strong { color: var(--ink); font-size: 12px; }
.person-cell > div > span { color: var(--muted-light); font-size: 10.5px; }

.table-secondary { color: var(--muted-light); font-size: 10.5px; }

.status-badge,
.tag,
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  font-weight: 650;
  white-space: nowrap;
}

.status-badge {
  padding: 5px 8px;
  font-size: 10px;
}

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

.status-badge.success { color: var(--success); background: var(--success-soft); }
.status-badge.warning { color: var(--warning); background: var(--warning-soft); }
.status-badge.danger { color: var(--danger); background: var(--danger-soft); }
.status-badge.info { color: var(--info); background: var(--info-soft); }
.status-badge.neutral { color: var(--muted); background: #f1f2f5; }

.intensity {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.intensity-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 13px;
}

.intensity-bars i {
  width: 3px;
  border-radius: 2px;
  background: #e0e1e8;
}

.intensity-bars i:nth-child(1) { height: 5px; }
.intensity-bars i:nth-child(2) { height: 7px; }
.intensity-bars i:nth-child(3) { height: 9px; }
.intensity-bars i:nth-child(4) { height: 11px; }
.intensity-bars i:nth-child(5) { height: 13px; }
.intensity-bars i.on { background: var(--brand); }
.intensity-bars.high i.on { background: var(--coral); }

.schedule-list {
  display: grid;
  gap: 0;
}

.schedule-item {
  display: grid;
  min-height: 50px;
  grid-template-columns: 48px 18px minmax(0, 1fr);
  gap: 0;
}

.schedule-time {
  padding-top: 2px;
  color: var(--muted-light);
  font-size: 10.5px;
  font-weight: 650;
}

.schedule-copy {
  min-height: 50px;
  padding: 0 0 16px 8px;
}

.schedule-track {
  position: relative;
  align-self: stretch;
  min-height: 50px;
}

.schedule-node {
  position: absolute;
  z-index: 2;
  top: 2px;
  left: 50%;
  display: block;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 1px #d8d2f5;
  transform: translateX(-50%);
}

.schedule-item:not(:last-child) .schedule-track::after {
  position: absolute;
  z-index: 1;
  top: 7px;
  bottom: -7px;
  left: 50%;
  width: 2px;
  background: #ded9f7;
  content: "";
  transform: translateX(-50%);
}

.schedule-item:last-child .schedule-copy {
  min-height: 36px;
  padding-bottom: 0;
}
.schedule-copy strong { display: block; font-size: 12px; }
.schedule-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; }

/* Student list */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}

.search-wrap {
  position: relative;
  width: min(100%, 360px);
}

.search-wrap .icon {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--muted-light);
  transform: translateY(-50%);
}

.search-control {
  min-height: 41px;
  padding: 9px 12px 9px 40px;
  font-size: 12px;
}

.view-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.view-switch button {
  display: grid;
  width: 31px;
  height: 29px;
  place-items: center;
  border-radius: 6px;
  color: var(--muted-light);
  background: transparent;
}

.view-switch button.active { color: var(--brand-strong); background: var(--brand-soft); }
.view-switch .icon { width: 15px; height: 15px; }

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

.student-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.student-card:hover {
  border-color: #d6d1f0;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.student-card-accent {
  height: 5px;
  background: linear-gradient(90deg, var(--brand), #a95fd9);
}

.student-card-accent.aqua { background: linear-gradient(90deg, #2ab5be, #6edddd); }
.student-card-accent.coral { background: linear-gradient(90deg, #ef806b, #fbb09f); }

.student-card-body { padding: 16px; }
.student-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.student-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.student-identity .avatar { width: 42px; height: 42px; font-size: 11px; }
.student-identity > div > strong,
.student-identity > div > span { display: block; }
.student-identity > div > strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.student-identity > div > span { margin-top: 3px; color: var(--muted); font-size: 11px; }

.student-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
  padding: 10px 0;
  border-top: 1px solid #f0f0f5;
  border-bottom: 1px solid #f0f0f5;
}

.student-stat { padding: 0 8px; border-right: 1px solid #f0f0f5; text-align: center; }
.student-stat:last-child { border-right: 0; }
.student-stat strong,
.student-stat span { display: block; }
.student-stat strong { font-size: 16px; }
.student-stat span { margin-top: 2px; color: var(--muted-light); font-size: 10px; line-height: 1.35; }

.student-context { min-height: 0; }
.student-context-label { margin-bottom: 6px; color: var(--muted-light); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { padding: 4px 7px; color: #6754a4; background: #f3f0ff; font-size: 10px; }
.tag.aqua { color: #247e83; background: var(--aqua-soft); }
.tag.coral { color: #ab5b49; background: var(--coral-soft); }
.tag.gray { color: var(--muted); background: #f1f2f5; }

.student-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.student-update { color: var(--muted-light); font-size: 10.5px; }

/* Student profile */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
}
.back-link:hover { color: var(--brand-strong); }
.back-link .icon { width: 14px; height: 14px; }

.student-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 17px;
  border: 1px solid #e4e0f7;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, #fff 48%, #f2efff 100%);
}

.student-hero::after {
  position: absolute;
  top: -100px;
  right: -70px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(108,85,217,.12);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 45px rgba(108,85,217,.025), 0 0 0 90px rgba(108,85,217,.02);
}

.student-hero-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
}

.student-hero-identity { display: flex; align-items: center; gap: 15px; min-width: 0; }
.student-hero-identity .avatar { width: 58px; height: 58px; font-size: 16px; }
.student-hero-identity h1 { margin: 0; font-size: 22px; font-weight: 720; letter-spacing: -.025em; }
.student-hero-identity p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.hero-status { display: inline-flex; align-items: center; gap: 5px; margin-top: 9px; color: var(--success); font-size: 10.5px; font-weight: 650; }
.hero-status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.student-hero-actions { position: relative; z-index: 2; display: flex; gap: 8px; }

.profile-tabs {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 0 21px;
  border-top: 1px solid rgba(220,216,239,.8);
  background: rgba(255,255,255,.5);
}

.profile-tab {
  position: relative;
  min-width: max-content;
  padding: 13px 12px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 610;
}
.profile-tab:hover { color: var(--brand-strong); }
.profile-tab.active { color: var(--brand-strong); font-weight: 700; }
.profile-tab.active::after { position: absolute; right: 10px; bottom: 0; left: 10px; height: 2px; border-radius: 2px 2px 0 0; background: var(--brand); content: ""; }

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .65fr);
  gap: 17px;
}

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

.info-block {
  display: flex;
  min-height: 0;
  align-items: flex-start;
  gap: 11px;
  padding: 12px;
  border: 1px solid #ececf3;
  border-radius: 11px;
  background: #fcfcfe;
}
.info-block-icon { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: var(--brand-strong); background: var(--brand-soft); }
.info-block-icon .icon { width: 15px; height: 15px; }
.info-block strong { display: block; margin-bottom: 4px; font-size: 12px; }
.info-block p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.5; }

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-bottom: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}
.summary-stat { padding: 13px 15px; background: #fff; }
.summary-stat strong,
.summary-stat span { display: block; }
.summary-stat strong { font-size: 18px; }
.summary-stat span { margin-top: 3px; color: var(--muted); font-size: 11px; }

.timeline {
  position: relative;
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 74px 25px minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
}

.timeline-date { padding-top: 4px; color: var(--muted); font-size: 10.5px; text-align: right; }
.timeline-date strong { display: block; color: var(--ink-soft); font-size: 11.5px; }
.timeline-track { position: relative; display: flex; justify-content: center; }
.timeline-track::before { position: absolute; top: 16px; bottom: -4px; left: 50%; width: 1px; background: #dedbe9; content: ""; transform: translateX(-50%); }
.timeline-item:last-child .timeline-track::before { display: none; }
.timeline-dot { position: relative; z-index: 1; display: grid; width: 23px; height: 23px; place-items: center; border: 4px solid #fff; border-radius: 50%; color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px #dcd6f8; }
.timeline-dot .icon { width: 8px; height: 8px; }
.timeline-card { margin-bottom: 10px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.timeline-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.timeline-card h4 { margin: 0; font-size: 13px; }
.timeline-card p { margin: 5px 0 9px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.timeline-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted-light); font-size: 10.5px; }
.timeline-meta span { display: inline-flex; align-items: center; gap: 4px; }
.timeline-meta .icon { width: 11px; height: 11px; }
.source-badge { margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.record-group { margin-bottom: 7px; }
.record-student-link { margin: 0 0 6px 109px; font-size: 11.5px; }

.support-card {
  overflow: hidden;
  margin-bottom: 13px;
  border: 1px solid #e8e5f6;
  border-radius: 12px;
  background: #fff;
}
.support-card-head { display: flex; align-items: center; gap: 10px; padding: 12px 13px; border-bottom: 1px solid #f0eff7; }
.support-card-head .metric-icon { width: 32px; height: 32px; }
.support-card-head > div > strong { display: block; font-size: 12px; }
.support-card-head > div > span { display: block; margin-top: 2px; color: var(--muted-light); font-size: 10.5px; }
.support-card-body { padding: 12px 13px; }
.support-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.support-list li { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.support-list li::before { width: 6px; height: 6px; flex: 0 0 auto; margin-top: 4px; border-radius: 50%; background: var(--aqua); content: ""; }
.support-date { display: block; font-size: 12px; }
.support-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; }

/* Analytics */
.analysis-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
  margin-bottom: 17px;
  padding: 17px;
  border: 1px solid #ddd7fa;
  border-radius: 14px;
  background: linear-gradient(115deg, #f6f3ff, #fbfbff 68%, #ecfbfb);
}
.analysis-banner::after { position: absolute; top: -70px; right: 11%; width: 150px; height: 150px; border-radius: 50%; background: rgba(53,199,206,.08); content: ""; }
.analysis-banner-copy { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; }
.analysis-banner-copy .ai-orb { width: 40px; height: 40px; border-radius: 12px; }
.analysis-banner-copy .ai-orb .icon { width: 19px; height: 19px; }
.analysis-banner h3 { margin: 0; font-size: 14px; }
.analysis-banner p { max-width: 740px; margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.analysis-banner .btn { position: relative; z-index: 1; flex: 0 0 auto; }

.analytics-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(290px, .65fr); align-items: start; gap: 17px; }
.analytics-cards { display: grid; gap: 10px; }
.insight-card { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.insight-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.insight-title { display: flex; align-items: flex-start; gap: 10px; }
.insight-title .pattern-icon { width: 34px; height: 34px; }
.insight-title > div > h3 { margin: 0; font-size: 13px; }
.insight-title > div > span { display: block; margin-top: 3px; color: var(--muted-light); font-size: 10.5px; }
.insight-card p { margin: 9px 0; color: var(--ink-soft); font-size: 11.5px; line-height: 1.55; }
.evidence-box { padding: 9px 10px; border-left: 3px solid var(--aqua); border-radius: 0 8px 8px 0; color: #53616a; background: #f3fbfb; font-size: 10.5px; line-height: 1.5; }
.insight-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.related-count { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10.5px; }
.related-count .icon { width: 12px; height: 12px; }

.bar-chart { display: grid; gap: 13px; }
.bar-row { display: grid; grid-template-columns: 112px minmax(0,1fr) 24px; align-items: center; gap: 8px; }
.bar-label { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 7px; overflow: hidden; border-radius: 99px; background: #eff0f4; }
.bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), #9b85ec); }
.bar-fill.aqua { background: linear-gradient(90deg, #31aeb6, #6fd7d9); }
.bar-fill.coral { background: linear-gradient(90deg, #e97c67, #ffab98); }
.bar-value { color: var(--ink-soft); font-size: 11px; font-weight: 670; text-align: right; }

.donut-wrap { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 8px 0; }
.donut { position: relative; width: 118px; height: 118px; border-radius: 50%; background: conic-gradient(var(--success) 0 58%, var(--warning) 58% 79%, #d9dbe4 79% 100%); }
.donut::after { position: absolute; inset: 20px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: #fff; font-size: 17px; font-weight: 720; content: "58%"; }
.donut-legend { display: grid; gap: 8px; }
.donut-legend .legend-item { font-size: 11px; }
.donut-legend .legend-dot.improved { background: var(--success); }
.donut-legend .legend-dot.unchanged { background: var(--warning); }
.donut-legend .legend-dot.unobserved { background: #d9dbe4; }

/* Recommendations */
.recommendation-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.recommendation-card { display: flex; min-height: 0; flex-direction: column; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.recommendation-card:hover { border-color: #d7d2ee; box-shadow: var(--shadow-sm); }
.recommendation-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.recommendation-number { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; color: var(--brand-strong); background: var(--brand-soft); font-size: 10px; font-weight: 760; }
.recommendation-card h3 { margin: 11px 0 5px; font-size: 14px; }
.recommendation-card > p { margin: 0 0 10px; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.recommendation-context { margin-top: 8px; color: var(--muted); font-size: 10.5px; }
.recommendation-context strong { color: var(--ink-soft); }
.recommendation-linkage { margin-top: 7px; color: var(--muted-light); font-size: 10px; }
.care-note { display: flex; gap: 7px; margin-top: 10px; padding: 8px 9px; border-radius: 8px; color: #7a6744; background: var(--warning-soft); font-size: 10.5px; line-height: 1.45; }
.care-note .icon { width: 13px; height: 13px; flex: 0 0 auto; margin-top: 1px; }
.recommendation-actions { display: flex; gap: 7px; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
.recommendation-actions .btn { flex: 1; }

/* Reports */
.report-list { display: grid; gap: 9px; }
.report-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.report-row:hover { border-color: #d7d2ee; box-shadow: var(--shadow-sm); }
.report-icon { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 10px; color: var(--brand-strong); background: var(--brand-soft); }
.report-icon .icon { width: 18px; height: 18px; }
.report-copy { min-width: 0; }
.report-copy strong { display: block; overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.report-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.report-meta { color: var(--muted-light); font-size: 10.5px; text-align: right; }

.report-preview { max-width: 840px; margin: 0 auto; padding: 42px 50px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.report-brand { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 2px solid var(--brand); }
.report-brand-left { display: flex; align-items: center; gap: 10px; }
.report-brand-left img { width: 35px; height: 35px; object-fit: contain; }
.report-brand-left strong { display: block; color: #3f2d91; font-size: 14px; letter-spacing: .03em; }
.report-brand-left span { display: block; color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.report-code { color: var(--muted); font-size: 10px; text-align: right; }
.report-title { margin: 28px 0 5px; font-size: 21px; letter-spacing: -.02em; }
.report-period { margin: 0 0 22px; color: var(--muted); font-size: 11.5px; }
.report-student { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 25px; padding: 14px; border-radius: 10px; background: var(--surface-alt); }
.report-student div span,
.report-student div strong { display: block; }
.report-student div span { color: var(--muted-light); font-size: 10px; text-transform: uppercase; }
.report-student div strong { margin-top: 3px; font-size: 12px; }
.report-section { margin-top: 21px; }
.report-section h3 { margin: 0 0 8px; color: #3f2d91; font-size: 14px; }
.report-section p,
.report-section li { color: #4e5968; font-size: 11.5px; line-height: 1.6; }
.report-section ul { margin: 0; padding-left: 18px; }
.report-pattern { margin: 8px 0; padding: 10px 12px; border-left: 3px solid var(--brand); background: #faf9ff; }
.report-pattern strong { display: block; font-size: 11.5px; }
.report-pattern span { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.report-disclaimer { margin-top: 25px; padding: 11px; border: 1px solid #e2e3e9; border-radius: 8px; color: var(--muted); background: #fafbfc; font-size: 10px; line-height: 1.55; }
.report-signature { display: flex; justify-content: space-between; gap: 30px; margin-top: 42px; }
.signature-line { width: 220px; padding-top: 7px; border-top: 1px solid #9ea3ad; color: var(--muted); font-size: 10px; text-align: center; }

/* Governance */
.governance-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 17px; }
.governance-card { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.governance-card .metric-icon { margin-bottom: 10px; }
.governance-card h3 { margin: 0 0 5px; font-size: 13px; }
.governance-card p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.audit-action { display: inline-flex; align-items: center; gap: 6px; }
.audit-action .icon { width: 13px; height: 13px; color: var(--brand); }

/* Guardian home */
.guardian-welcome { position: relative; display: grid; grid-template-columns: minmax(0,1.35fr) minmax(240px,.65fr); gap: 20px; overflow: hidden; margin-bottom: 17px; padding: 26px; border-radius: 16px; color: #fff; background: linear-gradient(125deg, #5740bd, #7860db 66%, #4fbdc3); }
.guardian-welcome::after { position: absolute; top: -90px; right: 20%; width: 230px; height: 230px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; content: ""; box-shadow: 0 0 0 45px rgba(255,255,255,.025); }
.guardian-welcome > div { position: relative; z-index: 1; }
.guardian-welcome h1 { max-width: 590px; margin: 0; font-size: 28px; font-weight: 680; letter-spacing: -.035em; line-height: 1.2; }
.guardian-welcome p { max-width: 570px; margin: 10px 0 18px; color: rgba(255,255,255,.78); font-size: 12.5px; line-height: 1.55; }
.guardian-welcome .btn-secondary { border-color: rgba(255,255,255,.25); color: #fff; background: rgba(255,255,255,.12); box-shadow: none; }
.guardian-student-mini { align-self: center; padding: 17px; border: 1px solid rgba(255,255,255,.18); border-radius: 13px; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); }
.guardian-student-mini .student-identity > div > strong { color: #fff; }
.guardian-student-mini .student-identity > div > span { color: rgba(255,255,255,.68); }
.guardian-mini-stats { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin-top: 15px; }
.guardian-mini-stats div { padding: 9px; border-radius: 8px; background: rgba(255,255,255,.09); }
.guardian-mini-stats strong,
.guardian-mini-stats span { display: block; }
.guardian-mini-stats strong { font-size: 15px; }
.guardian-mini-stats span { margin-top: 2px; color: rgba(255,255,255,.7); font-size: 10px; }

/* Modals */
.modal-backdrop {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 18, 35, 0.48);
  backdrop-filter: blur(3px);
  animation: fade-in .18s ease-out;
}

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

.modal {
  display: flex;
  width: min(100%, 690px);
  max-height: calc(100vh - 40px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: modal-in .22s ease-out;
}

.modal.modal-lg { width: min(100%, 860px); }
.modal.modal-sm { width: min(100%, 480px); }

@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 19px 21px; border-bottom: 1px solid var(--line); }
.modal-title { display: flex; align-items: center; gap: 11px; }
.modal-title .metric-icon { width: 36px; height: 36px; }
.modal-title h2 { margin: 0; font-size: 15px; }
.modal-title p { margin: 3px 0 0; color: var(--muted); font-size: 11.5px; }
.modal-close { display: grid; width: 33px; height: 33px; place-items: center; border-radius: 8px; color: var(--muted); background: transparent; }
.modal-close:hover { color: var(--ink); background: var(--surface-alt); }
.modal-close .icon { width: 17px; height: 17px; }
.modal-body { flex: 1; overflow-y: auto; padding: 21px; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 21px; border-top: 1px solid var(--line); background: #fdfdfe; }
.modal-foot-right { display: flex; gap: 8px; margin-left: auto; }

.steps { display: flex; align-items: center; margin-bottom: 22px; }
.step { display: flex; min-width: 0; flex: 1; align-items: center; }
.step:last-child { flex: 0 0 auto; }
.step-dot { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); background: #fff; font-size: 10.5px; font-weight: 720; }
.step.active .step-dot,
.step.done .step-dot { border-color: var(--brand); color: #fff; background: var(--brand); }
.step.done .step-dot { font-size: 0; }
.step.done .step-dot::after { font-size: 11px; content: "✓"; }
.step-label { margin-left: 7px; color: var(--muted-light); font-size: 10px; font-weight: 620; white-space: nowrap; }
.step.active .step-label { color: var(--brand-strong); }
.step-line { width: 100%; height: 1px; margin: 0 9px; background: var(--line); }
.step.done .step-line { background: var(--brand); }
.form-step[hidden] { display: none; }
.form-section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 13px; }
.form-section-title .icon { width: 15px; height: 15px; color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.form-grid .field + .field { margin-top: 0; }
.field.full { grid-column: 1 / -1; }
.field-help { margin-top: -3px; color: var(--muted-light); font-size: 10.5px; }
.required::after { margin-left: 3px; color: var(--danger); content: "*"; }

.choice-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.choice-card { position: relative; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card label { display: flex; min-height: 62px; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-soft); background: #fff; cursor: pointer; font-size: 11.5px; font-weight: 620; }
.choice-card label .metric-icon { width: 29px; height: 29px; flex: 0 0 auto; }
.choice-card input:checked + label { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-softer); box-shadow: 0 0 0 2px rgba(108,85,217,.08); }

.intensity-picker { display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; }
.intensity-option { position: relative; }
.intensity-option input { position: absolute; opacity: 0; }
.intensity-option label { display: grid; min-height: 52px; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #fff; cursor: pointer; font-size: 10px; }
.intensity-option label strong { display: block; color: var(--ink-soft); font-size: 13px; text-align: center; }
.intensity-option input:checked + label { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-soft); }
.intensity-option:nth-child(4) input:checked + label,
.intensity-option:nth-child(5) input:checked + label { border-color: var(--coral); color: #aa5545; background: var(--coral-soft); }

.tag-checks { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-check { position: relative; }
.tag-check input { position: absolute; opacity: 0; }
.tag-check label { display: inline-flex; min-height: 30px; align-items: center; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; cursor: pointer; font-size: 10.5px; }
.tag-check input:checked + label { border-color: #d7cffd; color: var(--brand-strong); background: var(--brand-soft); }

.review-box { padding: 14px; border: 1px solid #e5e2f4; border-radius: 10px; background: #faf9ff; }
.review-box h4 { margin: 0 0 9px; font-size: 12px; }
.review-student { display: flex; align-items: center; gap: 9px; }
.review-student .avatar { width: 31px; height: 31px; font-size: 9px; }
.review-student > div > strong,
.review-student > div > span { display: block; }
.review-student > div > strong { font-size: 12px; }
.review-student > div > span { color: var(--muted); font-size: 10.5px; }

.disclaimer { display: flex; gap: 9px; margin-top: 17px; padding: 10px 11px; border: 1px solid #e1e4e9; border-radius: 9px; color: var(--muted); background: #fafbfc; font-size: 10.5px; line-height: 1.5; }
.disclaimer .icon { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 1px; color: var(--info); }
.profile-choice { background: none; text-align: left; }
.profile-choice label { min-height: 82px; cursor: pointer; }
.profile-choice-name { display: block; font-size: 12px; }
.profile-choice-role { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.modal-lead { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.55; }

/* AI Assistant */
.assistant-backdrop { position: fixed; z-index: 155; inset: 0; background: rgba(25,22,43,.28); animation: fade-in .16s; }
.assistant-backdrop[hidden] { display: none; }
.assistant-drawer { position: fixed; z-index: 160; top: 0; right: 0; display: flex; width: min(100%, 430px); height: 100vh; flex-direction: column; background: #fff; box-shadow: -20px 0 55px rgba(30,24,64,.18); transform: translateX(102%); transition: transform .26s ease; }
.assistant-drawer.open { transform: translateX(0); }
.assistant-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(115deg,#f8f6ff,#f0fbfb); }
.assistant-title { display: flex; align-items: center; gap: 10px; }
.assistant-title > div > strong,
.assistant-title > div > span { display: block; }
.assistant-title > div > strong { font-size: 13px; }
.assistant-title > div > span { display: flex; align-items: center; gap: 5px; margin-top: 2px; color: var(--success); font-size: 10.5px; }
.assistant-title > div > span::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.assistant-context { padding: 10px 18px; border-bottom: 1px solid var(--line); color: var(--muted); background: #fdfdfe; font-size: 10.5px; }
.assistant-context strong { color: var(--ink-soft); }
.assistant-messages { display: flex; flex: 1; flex-direction: column; gap: 13px; overflow-y: auto; padding: 18px; }
.message { display: flex; max-width: 88%; gap: 8px; }
.message > div { min-width: 0; }
.message.assistant { align-self: flex-start; }
.message.user { align-self: flex-end; flex-direction: row-reverse; }
.message-avatar { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #fff; background: linear-gradient(135deg,var(--brand),#a45bd1); }
.message-avatar .icon { width: 13px; height: 13px; }
.message-bubble { padding: 10px 11px; border-radius: 5px 12px 12px 12px; color: var(--ink-soft); background: #f3f1fc; font-size: 12px; line-height: 1.55; }
.message.user .message-bubble { border-radius: 12px 5px 12px 12px; color: #fff; background: var(--brand); }
.message-bubble p { margin: 0; }
.message-bubble p + p { margin-top: 7px; }
.markdown-body { min-width: 0; overflow-wrap: anywhere; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child:not(.message-time) { margin-bottom: 0; }
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 { margin: 11px 0 5px; color: var(--ink); font-weight: 720; line-height: 1.3; }
.markdown-body h1 { font-size: 16px; }
.markdown-body h2 { font-size: 14px; }
.markdown-body h3,
.markdown-body h4 { font-size: 13px; }
.markdown-body ul,
.markdown-body ol { margin: 6px 0; padding-left: 18px; }
.markdown-body li { margin: 3px 0; padding-left: 1px; }
.markdown-body li::marker { color: var(--brand); font-weight: 700; }
.markdown-body blockquote { margin: 7px 0; padding: 6px 9px; border-left: 3px solid var(--brand); border-radius: 0 7px 7px 0; color: #5e5872; background: rgba(255,255,255,.55); }
.markdown-body blockquote p { margin: 0; }
.markdown-body code { padding: 1px 4px; border: 1px solid rgba(108,85,217,.12); border-radius: 4px; color: #4f39b8; background: rgba(255,255,255,.72); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.markdown-body pre { max-width: 100%; margin: 7px 0; overflow-x: auto; padding: 9px; border-radius: 7px; color: #ecebff; background: #292441; line-height: 1.5; }
.markdown-body pre code { padding: 0; border: 0; color: inherit; background: transparent; }
.markdown-body a { color: var(--brand-strong); font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.markdown-body hr { height: 1px; margin: 9px 0; border: 0; background: #dcd8ee; }
.md-table-fallback { margin: 7px 0; }
.md-table-fallback ul { margin: 0; padding: 7px 8px 7px 25px; border: 1px solid #ddd9ee; border-radius: 7px; background: rgba(255,255,255,.5); }
.md-table-fallback ul + ul { margin-top: 6px; }
.message.user .markdown-body h1,
.message.user .markdown-body h2,
.message.user .markdown-body h3,
.message.user .markdown-body h4,
.message.user .markdown-body a { color: #fff; }
.message.user .markdown-body li::marker { color: rgba(255,255,255,.82); }
.message.user .markdown-body code { border-color: rgba(255,255,255,.18); color: #fff; background: rgba(255,255,255,.12); }
.message.user .markdown-body blockquote { border-left-color: rgba(255,255,255,.75); color: rgba(255,255,255,.88); background: rgba(255,255,255,.09); }
.message-time { display: block; margin-top: 5px; color: var(--muted-light); font-size: 9.5px; }
.message.user .message-time { color: rgba(255,255,255,.65); text-align: right; }
.typing { display: inline-flex; gap: 3px; padding: 2px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted-light); animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%,60%,100% { transform: translateY(0); opacity:.45; } 30% { transform: translateY(-4px); opacity:1; } }
.suggestion-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px 34px; }
.suggestion-chip { padding: 6px 9px; border: 1px solid #ded9f5; border-radius: 999px; color: var(--brand-strong); background: #fff; font-size: 10.5px; }
.suggestion-chip:hover { background: var(--brand-soft); }
.assistant-compose { padding: 13px 16px 16px; border-top: 1px solid var(--line); }
.compose-box { display: flex; align-items: flex-end; gap: 8px; padding: 7px 7px 7px 11px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; }
.compose-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(108,85,217,.09); }
.compose-box textarea { width: 100%; max-height: 110px; min-height: 33px; padding: 7px 0; border: 0; outline: 0; resize: none; font-size: 12px; line-height: 1.45; }
.compose-send { display: grid; width: 33px; height: 33px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: #fff; background: var(--brand); }
.compose-send .icon { width: 15px; height: 15px; }
.assistant-note { margin: 7px 3px 0; color: var(--muted-light); font-size: 9.5px; text-align: center; }

/* Empty and loading states */
.empty-state { display: grid; min-height: 250px; place-items: center; padding: 35px; text-align: center; }
.empty-icon { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto 13px; border-radius: 16px; color: var(--brand-strong); background: var(--brand-soft); }
.empty-icon .icon { width: 24px; height: 24px; }
.empty-state h3 { margin: 0 0 5px; font-size: 13px; }
.empty-state p { max-width: 380px; margin: 0 auto 15px; color: var(--muted); font-size: 12px; }
.skeleton { overflow: hidden; border-radius: 6px; background: #eeedf3; }
.skeleton::after { display: block; width: 100%; height: 100%; background: linear-gradient(90deg,transparent,rgba(255,255,255,.65),transparent); content: ""; transform: translateX(-100%); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* Toast */
.toast-region { position: fixed; z-index: 400; right: 22px; bottom: 22px; display: grid; gap: 9px; width: min(calc(100% - 44px), 360px); }
.toast { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: start; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-md); animation: toast-in .22s ease-out; }
.toast.out { opacity: 0; transform: translateX(15px); transition: .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateX(15px); } to { opacity: 1; transform: none; } }
.toast-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: var(--success); background: var(--success-soft); }
.toast.error .toast-icon { color: var(--danger); background: var(--danger-soft); }
.toast.info .toast-icon { color: var(--info); background: var(--info-soft); }
.toast-icon .icon { width: 14px; height: 14px; }
.toast-copy strong,
.toast-copy span { display: block; }
.toast-copy strong { font-size: 12px; }
.toast-copy span { margin-top: 2px; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.toast-close { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 6px; color: var(--muted-light); background: transparent; }
.toast-close:hover { background: var(--surface-alt); }
.toast-close .icon { width: 13px; height: 13px; }

.sidebar-overlay { display: none; }

/* Consistent optical alignment for every icon container */
.metric-icon,
.pattern-icon,
.info-block-icon,
.ai-orb,
.report-icon,
.empty-icon,
.toast-icon,
.message-avatar,
.timeline-dot {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  text-align: center;
}

.metric-icon > .icon,
.pattern-icon > .icon,
.info-block-icon > .icon,
.ai-orb > .icon,
.report-icon > .icon,
.empty-icon > .icon,
.toast-icon > .icon,
.message-avatar > .icon,
.timeline-dot > .icon {
  display: block;
  flex: none;
  margin: 0;
  transform: none;
}

.avatar {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  text-align: center;
  letter-spacing: -0.02em;
}

.avatar-initials {
  display: block;
  width: 100%;
  line-height: 1;
  text-align: center;
  transform: translateY(0.5px);
}

.nav-item > .icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  padding: 1px;
  margin: 0;
  align-self: center;
}

@media (max-width: 1180px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .student-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .recommendation-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  :root { --sidebar-width: 248px; }
  .sidebar { transform: translateX(-102%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; z-index: 45; inset: 0; display: block; background: rgba(22,20,37,.34); }
  .sidebar-overlay[hidden] { display: none; }
  .topbar { left: 0; }
  .main-content { margin-left: 0; }
  .mobile-menu-btn { display: grid; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; }
  .dashboard-grid,
  .dashboard-layout,
  .bottom-grid,
  .profile-grid,
  .analytics-layout { grid-template-columns: 1fr; }
  .governance-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .main-content { padding-right: 15px; padding-left: 15px; }
  .topbar { padding: 0 14px; }
  .topbar-title span,
  .user-copy,
  .topbar .ai-label { display: none; }
  .user-trigger { padding-left: 3px; }
  .page-header,
  .toolbar,
  .analysis-banner { align-items: stretch; flex-direction: column; }
  .page-actions { flex-wrap: wrap; }
  .date-chip { display: none; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-grid,
  .governance-grid { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: repeat(2,1fr); }
  .info-grid,
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .student-hero-main { align-items: flex-start; flex-direction: column; }
  .student-hero-actions { width: 100%; }
  .student-hero-actions .btn { flex: 1; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .choice-card label { min-height: 60px; }
  .step-label { display: none; }
  .report-row { grid-template-columns: auto minmax(0,1fr) auto; }
  .report-meta { display: none; }
  .report-preview { padding: 28px 20px; }
  .report-student { grid-template-columns: 1fr; }
  .guardian-welcome { grid-template-columns: 1fr; }
  .guardian-student-mini { display: none; }
  .bar-row { grid-template-columns: 80px minmax(0,1fr) 25px; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-height: 94vh; border-radius: 18px 18px 0 0; }
}

@media (max-width: 440px) {
  .login-panel { padding: 32px 22px; }
  .login-brand { margin-bottom: 48px; }
  .login-options { align-items: flex-start; flex-direction: column; }
  .metrics-grid { gap: 10px; }
  .metric-card { padding: 16px; }
  .choice-grid { grid-template-columns: 1fr; }
  .intensity-picker { gap: 4px; }
  .report-row { grid-template-columns: auto minmax(0,1fr); }
  .report-row > .btn { grid-column: 1 / -1; }
  .donut-wrap { align-items: flex-start; flex-direction: column; }
}

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

@media print {
  body { background: #fff; }
  .sidebar,
  .topbar,
  .page-header,
  .report-toolbar,
  .assistant-drawer,
  .assistant-backdrop,
  .toast-region { display: none !important; }
  .main-content { margin: 0; padding: 0; }
  .report-preview { max-width: none; border: 0; box-shadow: none; }
}

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