: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 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 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-copy h1 { max-width: 450px; font-size: clamp(38px, 4vw, 58px); text-wrap: balance; }
.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: 50px clamp(26px, 4vw, 62px); }
.auth-card { max-width: 890px; animation: rise-in .7s cubic-bezier(.2,.8,.2,1) both; }
.auth-heading h2 { color: #f6f2ff; font-size: 32px; }
.auth-heading > p:last-child { color: #a8a2bb; }
.auth-columns { gap: 16px; }
.auth-columns > form {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-color: #ffffff16;
  border-radius: 15px;
  background: linear-gradient(155deg, #201a30, #181423 70%);
  box-shadow: 0 14px 45px #05030b30, inset 0 1px #ffffff08;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.auth-columns > form:hover { transform: translateY(-3px); border-color: #a27bff52; box-shadow: 0 20px 50px #05030b45, 0 0 30px #8353e70c; }
.auth-columns > .register-form { background: linear-gradient(155deg, #1d182d, #15121f 70%); }
.form-stack h3 { color: #f1ecff; }
.form-stack label { color: #c3bdd5; }
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: 17px; border-color: #9c79fa38; border-radius: 13px; background: linear-gradient(115deg, #281d40c9, #1a1527e8); box-shadow: inset 0 1px #ffffff0c; }
.demo-box::before { position: absolute; top: -50px; right: -35px; width: 140px; height: 140px; border-radius: 50%; background: #9d68ff12; filter: blur(2px); content: ""; pointer-events: none; }
.demo-box h3 { color: #f0eaff; }
.demo-box .eyebrow { color: #bc9cff; }
.demo-accounts { gap: 10px; }
.demo-account {
  display: grid;
  gap: 5px;
  padding: 12px;
  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; justify-content: space-between; gap: 7px; color: #f1ecff; font-size: 12px; }
.demo-account > span { color: #a49bb9; font-size: 10px; }
.demo-account code { color: #c4aaff; font-size: 11px; }
.demo-fill { color: #ad8aff; font-size: 9px; font-weight: 600; }
.demo-status { min-height: 14px; margin: 0 0 4px; color: #a8e7c7; font-size: 10px; }
.demo-box > small { position: relative; display: block; color: #9991ad; line-height: 1.5; }
.privacy-note { color: #8c859f; }
.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: 29px; 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 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); }
}

@media (max-width: 760px) {
  .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-columns > 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) {
  *, *::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; }
}
