:root {
  color-scheme: light;
  --ink: #1b2540;
  --muted: #788198;
  --line: #e8ebf2;
  --paper: #fff;
  --canvas: #f5f7fb;
  --purple: #6254d9;
  --purple-dark: #4f42c5;
  --navy: #202b49;
  --green: #2a946e;
  --red: #c45059;
  font-family: "DM Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.brand { display: inline-flex; gap: 11px; align-items: center; color: var(--ink); text-decoration: none; font-family: Manrope, sans-serif; font-size: 18px; font-weight: 800; letter-spacing: -.7px; }
.brand-logo { display: block; width: min(270px, 100%); height: auto; }
.brand-light { font-weight: 500; color: #777f91; }
.eyebrow { margin: 0 0 10px; color: #969eb0; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Manrope, "Segoe UI", sans-serif; letter-spacing: -.5px; }

/* Authentication */
.auth-shell { display: grid; grid-template-columns: minmax(330px, .84fr) 1.55fr; min-height: 100vh; background: var(--paper); }
.auth-intro { display: flex; flex-direction: column; justify-content: space-between; padding: 45px clamp(35px, 6vw, 88px); color: #fff; background: radial-gradient(ellipse at 82% 86%, #5264bb66, transparent 38%), linear-gradient(145deg, #202b49, #27365d); }
.auth-intro .brand { color: #fff; }
.auth-intro .brand-light { color: #c4c9dc; }
.intro-copy { max-width: 430px; margin: auto 0; padding: 70px 0; }
.intro-copy .eyebrow { color: #b6b8ff; }
.intro-copy h1 { margin-bottom: 20px; font-size: clamp(36px, 4vw, 53px); line-height: 1.11; letter-spacing: -2px; }
.intro-copy > p:last-child { max-width: 360px; color: #c2c9dc; font-size: 15px; line-height: 1.8; }
.intro-note { color: #ccd2e3; font-size: 12px; }
.signal-dot, .live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #54c597; box-shadow: 0 0 0 4px #54c59721; }
.auth-main { display: grid; align-items: center; padding: 45px clamp(28px, 5vw, 76px); }
.auth-card { width: min(100%, 860px); margin: auto; }
.auth-heading { margin: 0 auto 30px; text-align: center; }
.auth-heading h2 { margin: 0 0 8px; font-size: 30px; }
.auth-heading > p:last-child { margin-bottom: 0; color: var(--muted); }
.auth-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.auth-columns > form { padding: 25px 26px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.auth-columns > .register-form { background: #fafbfe; }
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.form-stack h3 { margin: 0 0 2px; font-size: 17px; }
.form-stack label { display: flex; flex-direction: column; gap: 7px; color: #424d64; font-size: 12px; font-weight: 600; }
input, select, textarea { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #dfe3ec; border-radius: 7px; outline: 0; color: var(--ink); background: #fff; transition: border-color .16s, box-shadow .16s; }
input:focus, select:focus, textarea:focus { border-color: #8378e7; box-shadow: 0 0 0 3px #6254d91c; }
textarea { resize: vertical; line-height: 1.55; }
label small, .form-stack small { color: var(--muted); font-size: 10px; font-weight: 400; }
.captcha-label span { align-self: flex-start; padding: 3px 8px; border-radius: 5px; color: #4f42c5; background: #f0efff; font-weight: 700; }
.captcha-label { display: grid !important; grid-template-columns: 1fr auto; align-items: center; }
.captcha-label input { grid-column: 1 / -1; }
.button { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; gap: 9px; padding: 9px 15px; border: 1px solid transparent; border-radius: 7px; font-size: 12px; font-weight: 700; text-decoration: none; transition: background .15s, transform .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: var(--purple); }
.button.primary:hover { background: var(--purple-dark); }
.button.secondary { border-color: #e1e4ed; color: #424d64; background: #fff; }
.button.secondary:hover { background: #f7f7fc; }
.button.danger { color: #ae3945; background: #fff1f1; }
.button.small { min-height: 30px; padding: 6px 10px; font-size: 11px; }
.button.full { width: 100%; }
.demo-box { margin-top: 20px; padding: 17px 19px; border: 1px solid #dddafb; border-radius: 11px; background: #f8f7ff; }
.demo-box h3 { margin: 0; font-size: 15px; }
.demo-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 13px 0 8px; }
.demo-accounts p { display: grid; gap: 4px; margin: 0; padding: 11px; border: 1px solid #e8e6fa; border-radius: 8px; background: #fff; }
.demo-accounts strong { margin-bottom: 3px; font-size: 12px; }
.demo-accounts span, .demo-box > small { color: var(--muted); font-size: 10px; }
.demo-accounts code { overflow-wrap: anywhere; color: #4f42c5; font: 600 11px "DM Sans", sans-serif; user-select: all; }
.privacy-note { margin: 17px 0 0; color: #8a92a4; font-size: 11px; text-align: center; }
.notice { margin: 0 0 17px; padding: 11px 14px; border: 1px solid #cce9d9; border-radius: 8px; color: #28684d; background: #f0faf4; font-size: 12px; }
.notice.error { border-color: #f2d3d5; color: #a13e47; background: #fff5f5; }

/* Authenticated workspace */
.app-shell { display: grid; min-height: 100vh; grid-template-columns: 245px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 27px 17px 17px; border-right: 1px solid var(--line); background: #fff; }
.sidebar .brand { margin: 0 8px 48px; }
.side-label { margin: 0 10px 12px; color: #a0a6b5; font-size: 9px; font-weight: 700; letter-spacing: 1.35px; }
.side-nav { display: grid; gap: 5px; }
.nav-item { display: flex; min-height: 42px; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 7px; color: #6d768b; background: transparent; font-size: 12px; text-align: left; }
.nav-item > span { width: 18px; color: #969eb0; font-size: 17px; text-align: center; }
.nav-item b { display: grid; width: 20px; height: 20px; margin-left: auto; place-items: center; border-radius: 50%; color: #6155cf; background: #f0efff; font-size: 10px; }
.nav-item:hover { color: var(--ink); background: #f8f8fc; }
.nav-item.active { color: #5146c1; background: #f0efff; font-weight: 700; }
.nav-item.active > span { color: #6254d9; }
.sidebar-bottom { margin-top: auto; }
.security-card { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 20px; padding: 13px 11px; border: 1px solid #ebeafa; border-radius: 9px; background: #faf9ff; }
.security-icon { color: #6759d6; font-size: 16px; }
.security-card strong, .security-card small, .profile-mini strong, .profile-mini small { display: block; }
.security-card strong { margin: 2px 0 4px; font-size: 11px; }
.security-card small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.profile-mini { display: flex; gap: 9px; align-items: center; padding: 15px 3px 2px; border-top: 1px solid var(--line); }
.avatar { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 50%; color: #5e51d1; background: #efedff; font-weight: 700; }
.profile-mini strong { max-width: 130px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-mini small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.logout-form { margin-left: auto; }
.icon-button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 6px; color: #7d8699; background: transparent; font-size: 16px; }
.icon-button:hover { color: var(--red); background: #fff3f3; }
.workspace { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 clamp(25px, 4vw, 62px); }
.topbar { display: flex; min-height: 64px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); color: #737c90; font-size: 11px; }
.breadcrumb { color: #a0a6b5; }
.breadcrumb-separator { margin: 0 9px; color: #c6cad4; }
.topbar-right { display: flex; align-items: center; font-size: 10px; }
.live-dot { width: 7px; height: 7px; margin-right: 7px; }
.print-button { margin-left: 18px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; color: #646d81; background: #fff; font-size: 10px; }
.mobile-logout { display: none; margin-left: 7px; }
.mobile-logout button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; color: #646d81; background: #fff; font-size: 10px; }
.dashboard-section { display: none; padding: 36px 0 18px; }
.dashboard-section.active { display: block; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 26px; }
.page-heading .eyebrow { margin-bottom: 9px; }
.page-heading h1 { margin: 0 0 7px; font-size: clamp(24px, 2.5vw, 31px); }
.page-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; }
.date-pill, .role-pill, .count-pill { padding: 8px 11px; border: 1px solid var(--line); border-radius: 7px; color: #747d90; background: #fff; font-size: 10px; white-space: nowrap; }
.role-pill { color: #5c51c9; border-color: #e1defe; background: #f8f7ff; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 19px; }
.metric-card { position: relative; min-height: 137px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.metric-icon { position: absolute; top: 16px; right: 16px; display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; font-size: 15px; }
.metric-icon.purple { color: #6759d7; background: #f1efff; }
.metric-icon.gold { color: #b58324; background: #fff7e6; }
.metric-icon.blue { color: #4883b5; background: #ecf6fd; }
.metric-icon.green { color: #338264; background: #eaf8f1; }
.metric-label { display: block; margin: 2px 0 12px; color: #9299a9; font-size: 9px; font-weight: 700; letter-spacing: .9px; }
.metric-card > strong { display: block; font: 700 27px Manrope, sans-serif; letter-spacing: -1px; }
.metric-card > strong em { color: #9299a9; font: 500 12px "DM Sans", sans-serif; letter-spacing: 0; }
.metric-card > small { display: block; margin-top: 5px; color: #9299a9; font-size: 10px; }
.content-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 15px; margin-bottom: 15px; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.panel-heading { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 19px; }
.panel-heading .eyebrow { margin-bottom: 5px; }
.panel-heading h2, .guide-panel h2 { margin: 0; font-size: 16px; }
.text-button { padding: 4px; border: 0; color: #6254d9; background: transparent; font-size: 10px; font-weight: 700; white-space: nowrap; }
.text-button:hover { color: #3e34a4; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #fafbfc; }
th { padding: 11px 14px; color: #969eae; font-size: 9px; font-weight: 700; letter-spacing: .75px; white-space: nowrap; }
td { padding: 12px 14px; border-top: 1px solid #f0f1f5; color: #697389; font-size: 11px; vertical-align: middle; }
.strong-cell { color: #303b54; font-weight: 700; }
.rating-stars { color: #e7ad3d; letter-spacing: 1px; white-space: nowrap; }
.compact-list { padding: 0 18px 9px; }
.compact-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-top: 1px solid #f0f1f5; }
.status-dot { width: 7px; height: 7px; flex: 0 0 7px; margin-top: 5px; border-radius: 50%; background: #e9b653; }
.status-dot.resolved { background: #50ad83; }
.compact-item > div { min-width: 0; flex: 1; }
.compact-item strong { display: block; color: #3a455d; font-size: 11px; }
.compact-item p { margin: 4px 0 0; color: #838b9d; font-size: 10px; line-height: 1.45; }
.status-badge { display: inline-block; padding: 4px 7px; border-radius: 5px; color: #92702b; background: #fff7e7; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status-badge.resolved, .status-badge.active { color: #277554; background: #eaf8f1; }
.status-badge.in_review { color: #4d70a3; background: #eff5ff; }
.status-badge.rejected, .status-badge.suspended { color: #a3464e; background: #fff0f0; }
.status-badge.pending { color: #92702b; background: #fff7e7; }
.empty-state { padding: 27px 15px; color: #9199a9; text-align: center; }
.recent-activity { margin-bottom: 10px; }
.activity-row { display: flex; gap: 11px; align-items: center; padding: 10px 20px; border-top: 1px solid #f2f3f6; }
.activity-marker { width: 7px; height: 7px; border-radius: 50%; background: #8478e8; }
.activity-row strong, .activity-row small { display: block; }
.activity-row strong { color: #3f4960; font-size: 11px; text-transform: capitalize; }
.activity-row small { margin-top: 4px; color: #949bac; font-size: 9px; }
.subheading { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.description-cell { min-width: 190px; max-width: 400px; line-height: 1.6; overflow-wrap: anywhere; }
.inline-form, .button-group { display: flex; gap: 6px; align-items: center; }
.inline-form select { min-width: 105px; min-height: 30px; padding: 5px 7px; font-size: 10px; }
.nowrap { white-space: nowrap; }
.details-cell { max-width: 260px; overflow-wrap: anywhere; color: #737d91; font-family: Consolas, monospace; font-size: 10px; }
.block { display: block; margin-top: 5px; color: #8c94a3; font-size: 9px; font-weight: 400; }
.student-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, .65fr); gap: 15px; margin-bottom: 16px; }
.feedback-panel { padding-bottom: 18px; }
.feedback-panel .form-stack, .student-grid > .panel > .form-stack { padding: 0 19px; }
.feedback-panel .panel-heading, .student-grid > .panel .panel-heading { padding-bottom: 10px; }
.optional { color: #9299a9; font-size: 10px; font-weight: 400; }
.rating-field { padding: 0; border: 0; }
.rating-field legend { margin-bottom: 10px; color: #424d64; font-size: 12px; font-weight: 600; }
.rating-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rating-options label { position: relative; display: block; cursor: pointer; }
.rating-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rating-options > label > span { display: flex; min-height: 56px; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #e3e6ee; border-radius: 7px; color: #414b61; background: #fff; font-size: 15px; font-weight: 700; }
.rating-options small { margin-top: 3px; color: #9299a9; font-size: 8px; font-weight: 400; }
.rating-options input:checked + span { border-color: #8679e9; color: #5347c5; background: #f5f3ff; box-shadow: 0 0 0 2px #6254d91c; }
.rating-options input:focus-visible + span { outline: 2px solid #6254d9; outline-offset: 2px; }
.guide-panel { align-self: stretch; padding: 23px 20px; background: linear-gradient(145deg, #fff, #faf9ff); }
.guide-icon { display: grid; width: 34px; height: 34px; margin-bottom: 20px; place-items: center; border-radius: 10px; color: #6254d9; background: #f0efff; font-size: 18px; }
.guide-panel h2 { margin-bottom: 12px; }
.guide-panel ul { margin: 0; padding-left: 17px; color: #747d90; font-size: 11px; line-height: 1.85; }
.guide-panel > p:last-child { margin: 0; color: #747d90; font-size: 11px; line-height: 1.7; }
.history-panel { margin-bottom: 15px; }
.count-pill { padding: 6px 9px; }
.page-notice { margin-top: 18px; margin-bottom: -16px; }
.app-footer { display: flex; justify-content: space-between; padding: 18px 2px 20px; color: #9aa1af; font-size: 9px; }
.footer-dot { margin: 0 5px; }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 215px minmax(0, 1fr); }
  .workspace { padding-right: 25px; padding-left: 25px; }
  .content-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-intro { min-height: 235px; padding: 22px 25px; }
  .intro-copy { padding: 33px 0 23px; }
  .intro-copy h1 { font-size: 33px; }
  .intro-copy > p:last-child { margin-bottom: 0; font-size: 13px; }
  .intro-note { display: none; }
  .auth-main { padding: 30px 18px; }
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 12px 15px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin: 0 4px 13px; }
  .side-label, .sidebar-bottom { display: none; }
  .mobile-logout { display: block; }
  .side-nav { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 8px; }
  .nav-item { min-width: max-content; min-height: 36px; padding: 0 9px; font-size: 10px; }
  .nav-item > span { font-size: 14px; }
  .nav-item b { width: 17px; height: 17px; }
  .workspace { padding: 0 17px; }
  .topbar { min-height: 51px; }
  .dashboard-section { padding-top: 25px; }
  .student-grid { grid-template-columns: 1fr; }
  .guide-panel { padding: 18px; }
  .guide-icon { margin-bottom: 12px; }
  .app-footer { gap: 8px; flex-direction: column; }
}
@media (max-width: 480px) {
  .auth-columns { grid-template-columns: 1fr; gap: 14px; }
  .auth-columns > form { padding: 20px; }
  .demo-accounts { grid-template-columns: 1fr; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 24px; }
  .date-pill, .role-pill { margin-top: 8px; }
  .metric-grid { gap: 9px; }
  .metric-card { min-height: 122px; padding: 14px; }
  .metric-card > strong { font-size: 24px; }
  .metric-icon { top: 12px; right: 12px; width: 25px; height: 25px; }
  .panel-heading { padding: 14px; }
  th, td { padding: 10px; }
  .topbar-right { font-size: 0; }
  .print-button { font-size: 10px; }
  .rating-options { gap: 4px; }
  .rating-options > label > span { min-height: 49px; }
}
@media print {
  body { color: #111; background: #fff; }
  .sidebar, .topbar, .app-footer, .print-only-hidden, .button, .text-button, .icon-button, form { display: none !important; }
  .app-shell { display: block; }
  .workspace { max-width: none; padding: 0; }
  .dashboard-section { display: none !important; padding: 0; }
  .dashboard-section.active { display: block !important; }
  .panel, .metric-card { break-inside: avoid; border-color: #bbb; }
  .table-wrap { overflow: visible; }
  th, td { padding: 6px; color: #222; font-size: 9px; }
}

/* Midnight violet visual refresh */
:root {
  color-scheme: dark;
  --ink: #f3efff;
  --muted: #a5a0bd;
  --line: #ffffff19;
  --paper: #171326;
  --canvas: #0c0a13;
  --purple: #956bff;
  --purple-dark: #7952e8;
  --navy: #171326;
  --green: #63d6a4;
  --red: #ff8296;
  font-family: "DM Sans", "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 75% -15%, #713ee42a, transparent 37rem),
    radial-gradient(ellipse at 0% 60%, #4b269719, transparent 32rem),
    var(--canvas);
  color: var(--ink);
}

::selection { color: #fff; background: #7852db; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #b39aff;
  outline-offset: 3px;
}
.brand { color: #f7f3ff; }
.brand-light { color: #b7afcd; }
.eyebrow { color: #a9a0c4; }

/* Sign-in: layered gradients and subtle ambient motion */
.auth-shell {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(330px, .92fr) 1.38fr;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 80% 8%, #8a53eb15, transparent 38rem),
    #100d19;
}
.auth-intro {
  position: relative;
  z-index: 0;
  min-height: 100vh;
  overflow: hidden;
  padding: 43px clamp(35px, 5vw, 75px);
  border-right: 1px solid #ffffff0d;
  background:
    radial-gradient(ellipse at 23% 74%, #a34dfd42, transparent 34%),
    radial-gradient(ellipse at 90% 19%, #6655ff3d, transparent 34%),
    linear-gradient(150deg, #1a1230 0%, #17112a 46%, #110e1d 100%);
}
.auth-intro::before, .auth-intro::after {
  position: absolute;
  z-index: -1;
  width: 260px;
  height: 260px;
  border: 1px solid #c6a9ff20;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.auth-intro::before { top: 28%; right: -155px; box-shadow: 0 0 90px #8852ff21, inset 0 0 65px #8654ff12; animation: orbit 18s linear infinite; }
.auth-intro::after { right: -110px; bottom: -180px; width: 330px; height: 330px; border-color: #b88aff16; animation: orbit 25s linear infinite reverse; }
.auth-intro .brand-light { color: #c9bcdf; }
.intro-copy { max-width: 470px; }
.intro-copy .eyebrow { color: #c1a6ff; }
.intro-orbit { position: relative; z-index: 0; width: fit-content; max-width: 100%; margin: 0 0 20px; }
.intro-orbit-track { position: absolute; z-index: 1; inset: -18px -24px; border: 1px solid #d5bbff28; border-radius: 50%; pointer-events: none; transform: rotate(-12deg); animation: intro-orbit 28s linear infinite; }
.intro-star { position: absolute; display: block; color: #f0e5ff; font-size: 13px; font-weight: 700; line-height: 1; text-shadow: 0 0 7px #e3c9ff, 0 0 17px #a36aff; animation: star-shine 3.6s ease-in-out infinite; }
.intro-star-one { top: -5px; left: 50%; }
.intro-star-two { top: 54%; right: -5px; animation-delay: -1.2s; }
.intro-star-three { bottom: 1px; left: 18%; font-size: 8px; animation-delay: -2.4s; }
.intro-copy h1 { position: relative; z-index: 0; max-width: 450px; margin-bottom: 0; font-size: clamp(38px, 4vw, 58px); text-wrap: balance; animation: intro-dance 6.5s ease-in-out infinite, intro-glow 4.8s ease-in-out infinite; }
.intro-copy > p:last-child { color: #c0b9d1; }
.intro-note { color: #d3cce4; }
.signal-dot, .live-dot { background: #68e1aa; box-shadow: 0 0 0 4px #54c59721, 0 0 16px #54c59788; }
.auth-main { position: relative; z-index: 1; padding: 8px clamp(26px, 4vw, 62px); }
.auth-card { width: min(100%, 520px); max-width: 520px; margin: auto; animation: rise-in .7s cubic-bezier(.2,.8,.2,1) both; }
.auth-heading { margin-bottom: 14px; }
.auth-heading h2 { color: #f6f2ff; font-size: 29px; text-transform: uppercase; animation: welcome-glow 4.2s ease-in-out infinite; }
.welcome-letter { display: inline-block; animation: welcome-hop 5s ease-in-out infinite; animation-delay: calc(var(--letter-index) * 90ms); }
.welcome-space { width: .3em; }
.auth-heading > p:last-child { color: #a8a2bb; }
.auth-switcher { display: grid; justify-items: center; gap: 5px; width: 164px; margin: 0 auto 9px; }
.auth-switch-labels { display: flex; width: 100%; justify-content: space-between; }
.auth-switch { padding: 2px 6px; border: 0; color: #aaa2bd; background: transparent; font: 700 11px "DM Sans", sans-serif; cursor: pointer; transition: color .2s; }
.auth-switch:hover, .auth-switch.active { color: #d7c2ff; }
.auth-switch:focus-visible { border-radius: 3px; outline: 2px solid #b39aff; outline-offset: 2px; }
.auth-toggle-control { position: relative; width: 68px; height: 30px; }
.auth-toggle-checkbox { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.auth-toggle-track { position: absolute; inset: 7px 0; border-radius: 10px; background: linear-gradient(100deg, #c2a4ff, #7951db); cursor: pointer; }
.auth-toggle-track::before { position: absolute; top: -6px; left: -4px; display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #ffffff22; border-radius: 50%; color: #e9ddff; background: linear-gradient(145deg, #302342, #171322); box-shadow: 0 4px 12px #0805108c, inset 0 1px #ffffff18; content: "↔"; font-size: 15px; transition: transform .45s cubic-bezier(.2,.72,.2,1); }
.auth-toggle-checkbox:checked + .auth-toggle-track::before { transform: translateX(46px) rotate(180deg); }
.auth-toggle-checkbox:focus-visible + .auth-toggle-track { outline: 2px solid #d5c1ff; outline-offset: 4px; }
.auth-columns { display: block; position: relative; height: clamp(280px, 42vh, 330px); perspective: 1500px; filter: drop-shadow(0 18px 26px #05030b75) drop-shadow(0 0 18px #8155e72b); }
.auth-card-inner { display: grid; height: 100%; grid-template-rows: minmax(0, 1fr); transform-style: preserve-3d; transition: transform .75s cubic-bezier(.2,.72,.2,1); }
.auth-columns.is-flipped .auth-card-inner { transform: rotateY(180deg); }
.auth-card-inner::before {
  grid-area: 1 / 1;
  border: 1px solid #bd9aff70;
  border-radius: 13px;
  background: linear-gradient(145deg, #40285f, #241a36 64%, #171322);
  box-shadow: 0 16px 36px #05020a75, 0 0 24px #8755df2b, inset 0 1px #ffffff20;
  content: "";
  transform: translateZ(-5px);
}
.auth-card-inner > form {
  grid-area: 1 / 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  backface-visibility: hidden;
  transform: translateZ(5px);
  position: relative;
  overflow: auto;
  padding: 14px 18px;
  border-color: #bd9aff4d;
  border-radius: 11px;
  background: linear-gradient(135deg, #392451 0%, #271b3d 54%, #181322 100%);
  box-shadow: 0 16px 42px #05020a75, 0 0 0 1px #b58aff18, 0 0 27px #8755df36, inset 0 1px #ffffff1c, inset 0 -18px 34px #09071135;
  transition: border-color .25s, box-shadow .25s;
}
.auth-card-inner > form::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: url("../images/constellation-pattern.svg") center / 100% 100% no-repeat;
  content: "";
  opacity: .42;
  pointer-events: none;
  animation: constellation-shimmer 18s ease-in-out infinite;
}
.auth-card-inner > form { scrollbar-color: #7656af #171322; scrollbar-width: thin; }
.auth-card-inner > form > * { position: relative; z-index: 1; }
.auth-card-inner > form:hover { border-color: #c5a5ffad; box-shadow: 0 20px 48px #05020a85, 0 0 0 1px #b58aff28, 0 0 34px #8755e755, inset 0 1px #ffffff20, inset 0 -18px 34px #09071135; }
.auth-card-inner > .register-form { background: linear-gradient(135deg, #40285f 0%, #291d40 52%, #181322 100%); transform: rotateY(180deg) translateZ(5px); }
.auth-card-inner > .login-form { justify-content: center; gap: 10px; overflow: hidden; }
.auth-card-inner > .register-form { gap: 10px; }
.verification-copy { margin: 0; color: #b7aecb; font-size: 12px; line-height: 1.65; }
.verification-copy strong { color: #e7dcff; overflow-wrap: anywhere; }
.verification-code { letter-spacing: .3em; text-align: center; }
.form-stack h3 { color: #f1ecff; }
.form-stack label { color: #c3bdd5; }
.auth-card-inner input, .auth-card-inner select { min-height: 40px; }
.auth-card-inner .button { min-height: 38px; }
.auth-card-inner .captcha-label { gap: 4px; }
.auth-card-inner .auth-icon-field { position: relative; }
.auth-card-inner .auth-icon-field > input { padding-left: 42px; }
.auth-field-icon { position: absolute; z-index: 1; top: 14px; left: 13px; display: grid; width: 18px; height: 18px; place-items: center; color: #b99aff; pointer-events: none; }
.auth-field-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
input, select, textarea {
  border-color: #ffffff1b;
  border-radius: 8px;
  color: #f6f3ff;
  background-color: #100e18;
  box-shadow: inset 0 1px 3px #00000020;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
input:hover, select:hover, textarea:hover { border-color: #a687ef60; }
input:focus, select:focus, textarea:focus { border-color: #a184ff; background-color: #151121; box-shadow: 0 0 0 3px #956bff29, 0 0 22px #956bff13; }
input::placeholder, textarea::placeholder { color: #77718d; }
select option { color: #f6f3ff; background: #181423; }
label small, .form-stack small { color: #9992ae; }
.captcha-label span { border: 1px solid #a68aff40; color: #d3baff; background: #8d5cff20; }
.button { border-radius: 9px; transition: background .2s, border-color .2s, color .2s, box-shadow .2s, transform .2s; }
.button:hover { transform: translateY(-2px); }
.button.primary { background: linear-gradient(115deg, #a277ff, #7047e7); box-shadow: 0 7px 20px #8155e740; }
.button.primary:hover { background: linear-gradient(115deg, #b18aff, #8159f0); box-shadow: 0 10px 26px #8155e75e; }
.button.secondary { border-color: #ffffff1c; color: #e8e1f8; background: #ffffff08; }
.button.secondary:hover { border-color: #a184ff7a; color: #fff; background: #956bff1b; }
.button.danger { color: #ff9baa; background: #ff6b8518; }
.button.danger:hover { background: #ff6b8529; }
.button:active { transform: translateY(0) scale(.985); }
.demo-box { position: relative; overflow: hidden; margin-top: 12px; padding: 12px 14px; border: 1px solid #bd9aff70; border-radius: 13px; background: linear-gradient(120deg, #1b1429 0%, #362153 62%, #241638 100%); box-shadow: 0 12px 30px #05020a70, 0 0 0 1px #b58aff17, 0 0 26px #8755e740, inset 0 1px #ffffff20, inset 0 -16px 30px #09071130; }
.demo-box::before { position: absolute; top: -55px; right: -30px; width: 170px; height: 145px; border-radius: 50%; background: #a477ff2b; filter: blur(24px); content: ""; pointer-events: none; }
.demo-box h3 { color: #f0eaff; }
.demo-box .eyebrow { color: #bc9cff; }
.demo-accounts { gap: 8px; margin: 8px 0 4px; }
.demo-account {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 3px 7px;
  padding: 8px 9px;
  border: 1px solid #ffffff14;
  border-radius: 9px;
  color: #a9a2bb;
  background: #100d1c9c;
  text-align: left;
  transition: transform .2s, border-color .2s, background .2s, box-shadow .2s;
}
.demo-account:hover { transform: translateY(-2px); border-color: #a784f47a; background: #241a37; box-shadow: 0 7px 22px #07050e50; }
.demo-account:active { transform: scale(.985); }
.demo-account strong { display: flex; grid-column: 1 / -1; justify-content: space-between; gap: 7px; margin-bottom: 1px; color: #f1ecff; font-size: 11px; }
.demo-account > span { color: #a49bb9; font-size: 10px; }
.demo-account code { overflow-wrap: anywhere; color: #c4aaff; font-size: 10px; text-align: right; }
.demo-fill { color: #ad8aff; font-size: 9px; font-weight: 600; }
.demo-status { min-height: 0; margin: 0; color: #a8e7c7; font-size: 10px; }
.demo-box > small { position: relative; display: block; color: #9991ad; line-height: 1.5; }
.privacy-note { margin: 9px 0 0; color: #8c859f; font-size: 10px; }
.notice { border-color: #3a8261; color: #a6edca; background: #17443058; }
.notice.error { border-color: #9b4457; color: #ffb6c0; background: #541d2a55; }
.password-field { position: relative; }
.password-field input { padding-right: 58px; }
.password-toggle { position: absolute; top: 8px; right: 9px; padding: 5px 7px; border: 0; border-radius: 5px; color: #bca3f6; background: transparent; font-size: 10px; font-weight: 700; }
.password-toggle:hover { color: #fff; background: #ffffff0c; }

/* Dashboard: a calm dark workspace with violet highlights */
.app-shell { background: transparent; }
.sidebar { z-index: 3; border-color: #ffffff12; background: linear-gradient(180deg, #171322, #110f19); box-shadow: 12px 0 35px #03020820; }
.sidebar .brand { color: #f4efff; }
.sidebar .brand-logo { width: min(205px, 100%); }
.side-label { color: #837b98; }
.nav-item { border-radius: 9px; color: #aaa3bd; transition: color .2s, background .2s, transform .2s; }
.nav-item > span { color: #9189a7; transition: color .2s, transform .2s; }
.nav-item:hover { transform: translateX(2px); color: #f1ebff; background: #ffffff0a; }
.nav-item:hover > span { color: #bea5ff; transform: scale(1.08); }
.nav-item.active { color: #e7dcff; background: linear-gradient(100deg, #8e60e929, #8e60e90b); box-shadow: inset 2px 0 #a27aff; }
.nav-item.active > span { color: #b798ff; }
.nav-item b { color: #d5c2ff; background: #9868ff2b; }
.security-card { border-color: #a985ff20; background: linear-gradient(130deg, #8c5aee19, #ffffff04); }
.security-icon { color: #b391ff; }
.security-card strong { color: #eee8ff; }
.security-card small { color: #a69fba; }
.profile-mini { border-color: #ffffff13; }
.avatar { color: #eee6ff; background: linear-gradient(145deg, #9c72f1, #5740a7); box-shadow: 0 4px 13px #8354dd35; }
.profile-mini strong { color: #eee9fa; }
.profile-mini small { color: #958da8; }
.icon-button { color: #a59db8; }
.icon-button:hover { color: #ff9baa; background: #ff6b8518; }
.workspace { max-width: 1700px; }
.topbar { position: sticky; z-index: 2; top: 0; border-color: #ffffff13; color: #a9a2ba; background: #0c0a13d9; backdrop-filter: blur(16px); }
.breadcrumb { color: #827a94; }
.breadcrumb-separator { color: #5b536b; }
.print-button, .mobile-logout button { border-color: #ffffff1a; color: #c9c2d8; background: #ffffff08; transition: border-color .2s, background .2s, color .2s; }
.print-button:hover, .mobile-logout button:hover { border-color: #a27aff70; color: #fff; background: #956bff19; }
.dashboard-section.active { animation: section-in .42s ease both; }
.page-heading h1 { color: #f1edfc; }
.page-heading p:not(.eyebrow) { color: #a49db5; }
.date-pill, .role-pill, .count-pill { border-color: #ffffff19; color: #bcb4cd; background: #ffffff07; }
.role-pill { border-color: #a37aff3c; color: #d4c2ff; background: #956bff13; }
.metric-card, .panel {
  border-color: #ffffff15;
  border-radius: 13px;
  background: linear-gradient(145deg, #1b1727, #15121e 78%);
  box-shadow: 0 12px 36px #05030b20, inset 0 1px #ffffff08;
}
.metric-card { overflow: hidden; transition: transform .25s, border-color .25s, box-shadow .25s; animation: rise-in .55s both; }
.metric-card:nth-child(2) { animation-delay: .07s; }
.metric-card:nth-child(3) { animation-delay: .14s; }
.metric-card:nth-child(4) { animation-delay: .21s; }
.metric-card::after { position: absolute; right: -38px; bottom: -73px; width: 130px; height: 130px; border-radius: 50%; background: #a178ff0e; filter: blur(8px); content: ""; transition: transform .3s, background .3s; }
.metric-card:hover { transform: translateY(-4px); border-color: #a27aff40; box-shadow: 0 18px 38px #05030b35, 0 0 30px #956bff0c; }
.metric-card:hover::after { transform: scale(1.3); background: #a178ff19; }
.metric-icon.purple { color: #c8b3ff; background: #966cff27; }
.metric-icon.gold { color: #ffd58a; background: #db9f3620; }
.metric-icon.blue { color: #94caff; background: #5098e51b; }
.metric-icon.green { color: #8ce2b7; background: #52b8861c; }
.metric-label { color: #9b94ad; }
.metric-card > strong { position: relative; z-index: 1; color: #f5f0ff; }
.metric-card > strong em, .metric-card > small { color: #a39bb4; }
.content-grid > .panel, .recent-activity, .student-grid > .panel, .history-panel { animation: rise-in .55s .12s both; }
.panel-heading { border-bottom-color: #ffffff08; }
.panel-heading h2, .guide-panel h2 { color: #eee9fa; }
.text-button { color: #b99aff; transition: color .2s, transform .2s; }
.text-button:hover { transform: translateX(2px); color: #d3baff; }
thead { background: #ffffff06; }
th { color: #918aa4; }
td { border-top-color: #ffffff0d; color: #b1abc0; }
.strong-cell { color: #e6e0f3; }
.rating-stars { color: #f7c66d; text-shadow: 0 0 12px #f7c66d30; }
.compact-item { border-top-color: #ffffff0e; }
.compact-item strong { color: #e7e1f1; }
.compact-item p { color: #a59eb4; }
.status-dot { box-shadow: 0 0 12px #edba5d50; }
.status-dot.resolved { box-shadow: 0 0 12px #50ad8350; }
.status-badge { color: #f2cf89; background: #bb8b2a1c; }
.status-badge.resolved, .status-badge.active { color: #8ce0b5; background: #44bd841b; }
.status-badge.in_review { color: #a4caff; background: #4387ce20; }
.status-badge.rejected, .status-badge.suspended { color: #ffa5b1; background: #ee60731a; }
.empty-state { color: #9c95ad; }
.activity-row { border-top-color: #ffffff0d; }
.activity-marker { background: #b28aff; box-shadow: 0 0 13px #a274ff90; }
.activity-row strong { color: #e1dbed; }
.activity-row small, .subheading { color: #9f98b1; }
.description-cell { color: #c2bbd0; }
.inline-form select { min-height: 30px; }
.details-cell { color: #ada5bd; }
.feedback-panel .panel-heading, .student-grid > .panel .panel-heading { border-bottom: 0; }
.rating-field legend { color: #d4cde1; }
.rating-options label { transition: transform .2s; }
.rating-options label:hover { transform: translateY(-3px); }
.rating-options > label > span { border-color: #ffffff1a; color: #dfd8ec; background: #100e18; transition: border-color .2s, background .2s, box-shadow .2s, transform .2s; }
.rating-options small { color: #9e97ae; }
.rating-options input:checked + span { border-color: #ad8aff; color: #e6d9ff; background: #8757df2b; box-shadow: 0 0 0 2px #956bff20, 0 0 20px #956bff16; }
.rating-options input:focus-visible + span { outline-color: #c7aaff; }
.guide-panel { border-color: #9b79e925; background: radial-gradient(ellipse at 100% 0%, #8f5be515, transparent 65%), linear-gradient(145deg, #1c1829, #15121e); }
.guide-icon { color: #ccb7ff; background: #956bff24; box-shadow: 0 0 20px #956bff14; }
.guide-panel ul, .guide-panel > p:last-child { color: #b0a9c1; }
.page-notice { box-shadow: 0 8px 26px #0002; }
.app-footer { color: #817a91; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(13px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes section-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes orbit {
  from { transform: rotate(0deg) translateX(7px); }
  to { transform: rotate(360deg) translateX(7px); }
}
@keyframes intro-dance {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-5px) rotate(-.35deg); }
}
@keyframes intro-glow {
  0%, 100% { text-shadow: 0 0 8px #c9a8ff18; }
  50% { text-shadow: 0 0 14px #c9a8ff70, 0 0 30px #9b64ff40; }
}
@keyframes intro-orbit {
  from { transform: rotate(-12deg); }
  to { transform: rotate(348deg); }
}
@keyframes star-shine {
  0%, 38%, 66%, 100% { opacity: .48; transform: scale(.78); }
  50%, 58% { opacity: 1; transform: scale(1.35); }
}
@keyframes constellation-shimmer {
  0%, 100% { opacity: .34; filter: brightness(.9); }
  50% { opacity: .58; filter: brightness(1.15) drop-shadow(0 0 4px #a579ff30); }
}
@keyframes welcome-hop {
  0%, 68%, 100% { transform: translateY(0); }
  74% { transform: translateY(-6px); }
  80% { transform: translateY(0); }
  85% { transform: translateY(-3px); }
  90% { transform: translateY(0); }
}
@keyframes welcome-glow {
  0%, 100% { text-shadow: 0 0 8px #c9a8ff20; }
  50% { text-shadow: 0 0 13px #c9a8ff85, 0 0 26px #9b64ff52; }
}

@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-intro { min-height: 245px; border-right: 0; border-bottom: 1px solid #ffffff10; }
  .auth-intro .brand-logo { width: min(240px, 100%); }
  .auth-intro::before { top: 18%; right: -170px; }
  .auth-intro::after { right: -130px; bottom: -230px; }
  .sidebar { border-bottom-color: #ffffff14; }
  .side-nav { scrollbar-width: thin; scrollbar-color: #7656af transparent; }
  .nav-item:hover { transform: none; }
  .topbar { margin: 0 -17px; padding: 0 17px; }
}
@media (max-width: 480px) {
  .auth-intro { min-height: 220px; padding: 21px 22px; }
  .sidebar .brand-logo { width: min(190px, 100%); }
  .intro-copy h1 { font-size: 34px; }
  .auth-main { padding: 28px 14px; }
  .auth-card-inner > form { padding: 19px; }
  .demo-box { padding: 15px; }
  .demo-account { min-width: 0; }
  .demo-account strong { align-items: flex-start; }
  .metric-card { border-radius: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-card-inner { transition-duration: .01ms; }
  .auth-card-inner > form::after { animation: none; opacity: .42; }
  .welcome-letter, .auth-heading h2 { animation: none; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
@media print {
  :root { color-scheme: light; --ink: #111; --muted: #555; --line: #bbb; }
  body, .workspace, .dashboard-section.active { color: #111; background: #fff; }
  .metric-card, .panel { color: #111; background: #fff; box-shadow: none; }
  .page-heading h1, .panel-heading h2, td, .strong-cell { color: #222; }
  .topbar { position: static; background: #fff; }
}
.demo-sandbox-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 -12px;
  padding: 10px 13px;
  border: 1px solid #a77cff45;
  border-radius: 9px;
  color: #c9b9e8;
  background: linear-gradient(100deg, #8555dc20, #ffffff06);
  font-size: 11px;
}
.demo-sandbox-banner strong { color: #e0ceff; }
@media (max-width: 480px) {
  .demo-sandbox-banner { align-items: flex-start; flex-direction: column; gap: 3px; }
}

/* Dashboard preferences and quick-start tutorial */
.topbar-crumbs { display: flex; align-items: center; min-width: 0; white-space: nowrap; }
.topbar-right { gap: 8px; }
.toolbar-controls { display: flex; align-items: center; gap: 6px; margin-left: 9px; }
.toolbar-button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid #ffffff1a;
  border-radius: 8px;
  color: #c9c2d8;
  background: #ffffff08;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .18s, border-color .18s, background .18s, transform .18s;
}
.toolbar-button:hover { transform: translateY(-1px); border-color: #a27aff70; color: #fff; background: #956bff19; }
.theme-icon { color: #d3baff; font-size: 15px; line-height: 1; }
.help-icon { display: inline-grid; width: 17px; height: 17px; place-items: center; border: 1px solid currentColor; border-radius: 50%; color: #c9adff; font-size: 11px; font-weight: 700; line-height: 1; }
.help-icon.large { width: 35px; height: 35px; font-size: 19px; }
.language-control select {
  width: auto;
  min-width: 89px;
  min-height: 32px;
  padding: 5px 24px 5px 9px;
  border-color: #ffffff1a;
  border-radius: 8px;
  color: #d7d0e5;
  background-color: #171322;
  font-size: 10px;
  cursor: pointer;
}
.language-control select:focus { border-color: #a184ff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.password-field { padding-right: 0; }
.password-toggle { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; color: #bca3f6; }
.form-stack label[hidden] { display: none !important; }
.eye-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.help-dialog {
  width: min(440px, calc(100vw - 32px));
  max-width: 440px;
  padding: 26px;
  border: 1px solid #a77cff4a;
  border-radius: 18px;
  color: #f3efff;
  background: radial-gradient(ellipse at 100% 0%, #8f5be51b, transparent 60%), #191523;
  box-shadow: 0 25px 90px #0009, inset 0 1px #ffffff12;
}
.help-dialog::backdrop { background: #08060ebd; backdrop-filter: blur(5px); }
.help-dialog[open] { animation: rise-in .24s ease both; }
.help-dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.dialog-close { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #ffffff19; border-radius: 8px; color: #c4bdd3; background: #ffffff08; font-size: 21px; line-height: 1; }
.dialog-close:hover { color: #fff; background: #ffffff14; }
.help-dialog .eyebrow { color: #b99aff; }
.help-dialog h2 { margin: 0 0 10px; color: #f5f0ff; font: 700 22px Manrope, sans-serif; letter-spacing: -.4px; }
.help-copy { min-height: 72px; margin: 0; color: #bcb4cd; font-size: 13px; line-height: 1.75; }
.tutorial-progress { display: flex; gap: 6px; margin: 22px 0; }
.tutorial-dot { width: 7px; height: 7px; border-radius: 50%; background: #ffffff2a; transition: width .2s, background .2s; }
.tutorial-dot.active { width: 21px; border-radius: 8px; background: #a77cff; }
.help-dialog-actions { display: flex; justify-content: space-between; gap: 10px; }
.help-dialog-actions button:disabled { opacity: .4; cursor: not-allowed; transform: none; }

html[data-theme="light"] {
  color-scheme: light;
  --ink: #25203a;
  --muted: #716b82;
  --line: #e8e2f1;
  --paper: #fff;
  --canvas: #f5f2fa;
}
html[data-theme="light"] body {
  color: #29243a;
  background: radial-gradient(ellipse at 78% -15%, #8c57e51c, transparent 38rem), #f5f2fa;
}
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  border-color: #ded7ea;
  color: #302941;
  background-color: #fff;
  box-shadow: inset 0 1px 2px #39245d0a;
}
html[data-theme="light"] input:hover,
html[data-theme="light"] select:hover,
html[data-theme="light"] textarea:hover { border-color: #b9a4df; }
html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  border-color: #8d68d1;
  color: #302941;
  background-color: #fff;
  box-shadow: 0 0 0 3px #956bff20;
}
html[data-theme="light"] select option { color: #302941; background: #fff; }
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #81798f; }
html[data-theme="light"] .form-stack h3,
html[data-theme="light"] .form-stack label,
html[data-theme="light"] .rating-field legend { color: #514a62; }
html[data-theme="light"] .form-stack small,
html[data-theme="light"] label small { color: #777086; }
html[data-theme="light"] .sidebar { border-color: #e6dfef; background: linear-gradient(180deg,#fff,#f8f6fc); box-shadow: 12px 0 35px #40266f0a; }
html[data-theme="light"] .sidebar .brand { color: #29243a; }
html[data-theme="light"] .side-label { color: #888198; }
html[data-theme="light"] .nav-item { color: #615a72; }
html[data-theme="light"] .nav-item > span { color: #837b94; }
html[data-theme="light"] .nav-item:hover { color: #302744; background: #eee8f8; }
html[data-theme="light"] .nav-item.active { color: #5633a7; background: linear-gradient(100deg,#8755df1b,#8755df08); }
html[data-theme="light"] .nav-item.active > span { color: #7144c6; }
html[data-theme="light"] .nav-item b { color: #5e3aab; background: #8c60db1c; }
html[data-theme="light"] .security-card { border-color: #e8def8; background: linear-gradient(130deg,#8c5aee0d,#fff); }
html[data-theme="light"] .security-card strong, html[data-theme="light"] .profile-mini strong { color: #342b49; }
html[data-theme="light"] .security-card small, html[data-theme="light"] .profile-mini small { color: #746d83; }
html[data-theme="light"] .profile-mini { border-color: #e8e2f1; }
html[data-theme="light"] .avatar { color: #fff; }
html[data-theme="light"] .workspace { color: #29243a; }
html[data-theme="light"] .topbar { border-color: #e6dfef; color: #696278; background: #f8f6fbe8; }
html[data-theme="light"] .breadcrumb { color: #827a91; }
html[data-theme="light"] .breadcrumb-separator { color: #bdb5c9; }
html[data-theme="light"] .print-button, html[data-theme="light"] .mobile-logout button,
html[data-theme="light"] .toolbar-button { border-color: #e2dbea; color: #524a62; background: #fff; }
html[data-theme="light"] .toolbar-button:hover, html[data-theme="light"] .print-button:hover { border-color: #9c79e4; color: #4d2a99; background: #f5f0ff; }
html[data-theme="light"] .theme-icon, html[data-theme="light"] .help-icon { color: #7047bf; }
html[data-theme="light"] .language-control select { border-color: #e2dbea; color: #4f485e; background-color: #fff; }
html[data-theme="light"] .page-heading h1 { color: #28223a; }
html[data-theme="light"] .page-heading p:not(.eyebrow) { color: #716a80; }
html[data-theme="light"] .date-pill, html[data-theme="light"] .role-pill, html[data-theme="light"] .count-pill { border-color: #e5dfed; color: #655d73; background: #fff; }
html[data-theme="light"] .role-pill { border-color: #e3d6fa; color: #5c399d; background: #f5f0ff; }
html[data-theme="light"] .metric-card, html[data-theme="light"] .panel {
  border-color: #e6dfef;
  color: #332c43;
  background: linear-gradient(145deg,#fff,#fbf9fe 78%);
  box-shadow: 0 10px 28px #39245d0b, inset 0 1px #ffffff;
}
html[data-theme="light"] .metric-card:hover { border-color: #cdb9ef; box-shadow: 0 16px 34px #39245d14; }
html[data-theme="light"] .metric-card::after { background: #9a6eea0a; }
html[data-theme="light"] .metric-icon.purple { color: #7048bd; background: #8e61df16; }
html[data-theme="light"] .metric-icon.gold { color: #986313; background: #dda9361d; }
html[data-theme="light"] .metric-icon.blue { color: #3673a5; background: #5098e51a; }
html[data-theme="light"] .metric-icon.green { color: #277b57; background: #52b8861a; }
html[data-theme="light"] .metric-label, html[data-theme="light"] .metric-card > small { color: #797187; }
html[data-theme="light"] .metric-card > strong { color: #2e273e; }
html[data-theme="light"] .metric-card > strong em { color: #777084; }
html[data-theme="light"] .panel-heading { border-bottom-color: #f0ecf4; }
html[data-theme="light"] .panel-heading h2, html[data-theme="light"] .guide-panel h2 { color: #302941; }
html[data-theme="light"] .text-button { color: #633eae; }
html[data-theme="light"] thead { background: #f7f4fa; }
html[data-theme="light"] th { color: #797187; }
html[data-theme="light"] td { border-top-color: #eee9f3; color: #655d73; }
html[data-theme="light"] .strong-cell { color: #382f49; }
html[data-theme="light"] .compact-item { border-top-color: #eee9f3; }
html[data-theme="light"] .compact-item strong { color: #3a314b; }
html[data-theme="light"] .compact-item p { color: #716a80; }
html[data-theme="light"] .empty-state { color: #797187; }
html[data-theme="light"] .activity-row { border-top-color: #eee9f3; }
html[data-theme="light"] .activity-marker { background: #8156cf; box-shadow: 0 0 10px #8156cf55; }
html[data-theme="light"] .activity-row strong { color: #463c59; }
html[data-theme="light"] .activity-row small, html[data-theme="light"] .subheading { color: #777086; }
html[data-theme="light"] .description-cell, html[data-theme="light"] .details-cell { color: #5e576d; }
html[data-theme="light"] .rating-options span { border-color: #e4deec; color: #484057; background: #fff; }
html[data-theme="light"] .rating-options small { color: #797187; }
html[data-theme="light"] .rating-options input:checked + span { border-color: #8d68d1; color: #5a378f; background: #f2ecfc; box-shadow: 0 0 0 2px #956bff18; }
html[data-theme="light"] .guide-panel { border-color: #e5dcf2; background: radial-gradient(ellipse at 100% 0%,#8f5be50b,transparent 65%),linear-gradient(145deg,#fff,#faf8fd); }
html[data-theme="light"] .guide-icon { color: #714bb8; background: #956bff18; }
html[data-theme="light"] .guide-panel ul, html[data-theme="light"] .guide-panel > p:last-child { color: #675f76; }
html[data-theme="light"] .demo-sandbox-banner { border-color: #cbb8eb; color: #594c70; background: linear-gradient(100deg,#8555dc0c,#fff); }
html[data-theme="light"] .demo-sandbox-banner strong { color: #55348e; }
html[data-theme="light"] .app-footer { color: #817a8e; }
html[data-theme="light"] .help-dialog { border-color: #ddd1ef; color: #302941; background: radial-gradient(ellipse at 100% 0%,#8f5be512,transparent 60%),#fff; box-shadow: 0 25px 90px #24163b38,inset 0 1px #fff; }
html[data-theme="light"] .help-dialog .eyebrow { color: #704bb5; }
html[data-theme="light"] .help-dialog h2 { color: #302941; }
html[data-theme="light"] .help-copy { color: #655d73; }
html[data-theme="light"] .dialog-close { border-color: #e5dfed; color: #655d73; background: #f8f6fb; }
html[data-theme="light"] .help-icon.large { color: #714bb8; }

.analytics-panel { margin-bottom: 20px; }
.analytics-panel > .panel-heading { align-items: flex-start; }
.analytics-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 18px 20px 10px;
}
.analytics-filters label { display: grid; gap: 6px; color: #a9a1ba; font-size: 10px; font-weight: 600; }
.analytics-filters input, .analytics-filters select { min-width: 0; min-height: 36px; padding: 7px 9px; font-size: 11px; }
.analytics-filter-actions { display: flex; gap: 7px; }
.analytics-filter-actions .button { min-height: 36px; padding: 7px 10px; font-size: 10px; }
.analytics-note { margin: 4px 20px 14px; color: #9f98b1; font-size: 10px; line-height: 1.5; }
.analytics-error { margin: 0 20px 12px; }
.analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 20px 20px; }
.analytics-chart { min-width: 0; padding: 14px; border: 1px solid #ffffff0e; border-radius: 10px; background: #ffffff04; }
.analytics-chart h3 { margin: 0 0 13px; color: #e7e1f1; font-size: 12px; }
.bar-chart { display: grid; gap: 10px; min-height: 35px; }
.chart-row { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(40px, 2fr) 28px; gap: 9px; align-items: center; }
.chart-label { overflow: hidden; color: #aaa3ba; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.chart-track { display: block; width: 100%; height: 8px; overflow: hidden; appearance: none; border: 0; border-radius: 8px; background: #ffffff12; }
.chart-track::-webkit-progress-bar { border-radius: 8px; background: #ffffff12; }
.chart-track::-webkit-progress-value { border-radius: 8px; background: linear-gradient(90deg, #7357dc, #bc81ff); transition: width .35s ease; }
.chart-track::-moz-progress-bar { border-radius: 8px; background: linear-gradient(90deg, #7357dc, #bc81ff); }
.chart-count { color: #ded5f0; font-size: 10px; text-align: right; }
.chart-empty { margin: 0; color: #a9a1ba; font-size: 11px; }
html[data-theme="light"] .analytics-filters label { color: #655d73; }
html[data-theme="light"] .analytics-note, html[data-theme="light"] .chart-label, html[data-theme="light"] .chart-empty { color: #716a80; }
html[data-theme="light"] .analytics-chart { border-color: #eee8f5; background: #faf8fd; }
html[data-theme="light"] .analytics-chart h3 { color: #302941; }
html[data-theme="light"] .chart-track, html[data-theme="light"] .chart-track::-webkit-progress-bar { background: #e8e1f0; }
html[data-theme="light"] .chart-count { color: #342b49; }
html[data-theme="light"] .analytics-filters input, html[data-theme="light"] .analytics-filters select { color: #29243a; background: #fff; }
@media (max-width: 1050px) {
  .analytics-filters { grid-template-columns: repeat(3, minmax(100px, 1fr)); }
  .analytics-filter-actions { grid-column: span 3; }
}
@media (max-width: 600px) {
  .analytics-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; }
  .analytics-filter-actions { grid-column: span 2; }
  .analytics-grid { grid-template-columns: 1fr; padding: 0 14px 14px; }
  .analytics-note { margin-right: 14px; margin-left: 14px; }
  .chart-row { grid-template-columns: minmax(78px, .9fr) minmax(35px, 1.6fr) 24px; gap: 7px; }
}

@media (max-width: 1050px) {
  .topbar-right { gap: 6px; }
  .toolbar-controls { gap: 4px; margin-left: 4px; }
  .toolbar-button { padding: 5px 7px; }
}
@media (max-width: 760px) {
  .topbar { gap: 8px; }
  .topbar-crumbs { overflow: hidden; text-overflow: ellipsis; }
  .topbar-right { flex: 0 0 auto; gap: 5px; }
  .community-label, .topbar-right > .live-dot { display: none; }
  .toolbar-controls { margin: 0; }
  .toolbar-button { min-height: 30px; }
  .print-button { margin-left: 0; }
}
@media (max-width: 480px) {
  .topbar { flex-wrap: wrap; padding: 7px 0; }
  .topbar-crumbs { display: none; }
  .topbar-right { flex-wrap: wrap; max-width: 100%; font-size: 10px; }
  .toolbar-button { gap: 4px; padding: 4px 6px; font-size: 9px; }
  .language-control select { min-width: 74px; padding-left: 6px; font-size: 9px; }
  .theme-toggle > [data-i18n] { display: none; }
  .help-button > [data-i18n] { display: none; }
  .help-icon { width: 18px; height: 18px; }
  .topbar-crumbs { font-size: 9px; }
}

.feedback-steps { margin: 0 0 18px; padding: 19px; border: 1px solid #ffffff15; border-radius: 13px; background: radial-gradient(ellipse at 100% 0%, #956bff16, transparent 56%), linear-gradient(130deg, #1d1929, #15121e); }
.feedback-steps-heading { margin: 0 0 14px; }
.feedback-steps-heading .eyebrow { margin-bottom: 5px; color: #b69af2; }
.feedback-steps-heading h2 { margin: 0 0 4px; color: #f0eafa; font-size: 17px; }
.feedback-steps-heading p:last-child { margin: 0; color: #a9a1ba; font-size: 11px; }
.feedback-steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.feedback-step { display: flex; min-width: 0; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid #ffffff10; border-radius: 10px; background: #ffffff05; }
.feedback-step-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; color: #d3bbff; background: #956bff20; font-size: 17px; }
.feedback-step-number { display: block; margin-bottom: 3px; color: #a78be2; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.feedback-step h3 { margin: 0 0 4px; color: #eee8f8; font-size: 11px; }
.feedback-step p { margin: 0; color: #a69fb5; font-size: 10px; line-height: 1.45; }
.office-picker { min-width: 0; margin: 0; padding: 0; border: 0; }
.office-picker legend { margin-bottom: 4px; color: #ded7ea; font-size: 12px; font-weight: 700; }
.office-picker > p { margin: 0 0 10px; color: #9f98b1; font-size: 10px; }
.office-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.form-stack .office-option { position: relative; display: block; min-width: 0; cursor: pointer; }
.office-option input { position: absolute; top: 10px; left: 10px; width: 1px; min-height: 0; height: 1px; padding: 0; border: 0; overflow: hidden; opacity: 0; }
.office-option-card { display: grid; min-height: 72px; grid-template-columns: 28px minmax(0, 1fr); gap: 3px 8px; align-content: center; padding: 9px; border: 1px solid #ffffff17; border-radius: 9px; background: #100e18; transition: border-color .2s, background .2s, box-shadow .2s, transform .2s; }
.office-option:hover .office-option-card { transform: translateY(-2px); border-color: #a27aff55; }
.office-option input:checked + .office-option-card { border-color: #ae8cff; background: linear-gradient(145deg, #8659d82b, #20182d); box-shadow: 0 0 0 2px #956bff20, 0 7px 20px #956bff10; }
.office-option input:focus-visible + .office-option-card { outline: 2px solid #c7aaff; outline-offset: 2px; }
.office-option-icon { display: grid; width: 27px; height: 27px; grid-row: span 2; place-items: center; border-radius: 8px; color: #d2baff; background: #956bff20; font-size: 14px; font-weight: 700; }
.office-option-card strong { align-self: end; color: #e8e1f3; font-size: 10px; line-height: 1.2; }
.office-option-card small { align-self: start; color: #a59db4; font-size: 8px; font-weight: 400; line-height: 1.3; }
.rating-star { color: #f4c76d; font-size: 25px; line-height: 1; text-shadow: 0 0 12px #f4c76d30; }
.rating-options input:checked + span .rating-star { color: #ffd884; text-shadow: 0 0 13px #f4c76d75; }
.rating-options small { font-size: 8px; }

html[data-theme="light"] .feedback-steps { border-color: #e8e0f2; background: radial-gradient(ellipse at 100% 0%, #956bff12, transparent 56%), linear-gradient(130deg, #fff, #faf8fd); }
html[data-theme="light"] .feedback-steps-heading .eyebrow, html[data-theme="light"] .feedback-step-number { color: #7653bb; }
html[data-theme="light"] .feedback-steps-heading h2, html[data-theme="light"] .feedback-step h3 { color: #302941; }
html[data-theme="light"] .feedback-steps-heading p:last-child, html[data-theme="light"] .feedback-step p { color: #70677f; }
html[data-theme="light"] .feedback-step { border-color: #ece6f3; background: #fff; }
html[data-theme="light"] .feedback-step-icon, html[data-theme="light"] .office-option-icon { color: #714bb8; background: #956bff18; }
html[data-theme="light"] .office-picker legend { color: #403650; }
html[data-theme="light"] .office-picker > p { color: #756d82; }
html[data-theme="light"] .office-option-card { border-color: #e7e1ed; background: #fff; }
html[data-theme="light"] .office-option input:checked + .office-option-card { border-color: #9872d0; background: linear-gradient(145deg, #f8f3ff, #fff); }
html[data-theme="light"] .office-option-card strong { color: #3d334d; }
html[data-theme="light"] .office-option-card small { color: #746b81; }
html[data-theme="light"] .rating-star { color: #c28b22; }
html[data-theme="light"] .rating-options input:checked + span .rating-star { color: #d69921; }

@media (max-width: 760px) {
  .feedback-steps { padding: 15px; }
  .feedback-steps-grid { grid-template-columns: 1fr; }
  .feedback-step { align-items: center; }
  .office-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .office-options { grid-template-columns: 1fr; }
  .office-option-card { min-height: 58px; }
}
