:root {
  color-scheme: light;
  --ink: #322747;
  --muted: #665e74;
  --forest: #6441a5;
  --moss: #ede5fa;
  --paper: #f4f4f4;
  --line: #e3dbee;
  --coral: #6743a3;
}

.project-file-panel { margin: 28px 0 48px; padding: clamp(16px, 3vw, 32px); border: 1px solid var(--line); background: #ffffff80; }
.project-file-panel h2 { overflow-wrap: anywhere; }
.project-file-panel select { max-width: 100%; padding: 10px; font: inherit; }

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans TC", "DM Sans", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  background-image: radial-gradient(#34473d12 0.65px, transparent 0.65px);
  background-size: 9px 9px;
}
a { color: inherit; }
button, input { font: inherit; }
.topbar {
  min-height: 78px;
  padding: 0 clamp(20px, 6vw, 88px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #f4f4f4ee;
}
.brand { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; }
.brand-mark {
  width: 38px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: #fff;
  font: 700 18px/1 "DM Sans", sans-serif;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; }
.brand small { color: var(--muted); font-size: 11px; }
.topnav { display: flex; align-items: center; gap: clamp(14px, 3vw, 34px); }
.topnav a, .nav-logout { color: var(--muted); font-size: 13px; text-decoration: none; }
.topnav a:hover, .nav-logout:hover { color: var(--forest); }
.topnav form { margin: 0; }
.nav-logout { padding: 7px 0; border: 0; background: none; cursor: pointer; }
.page-shell { width: min(1120px, calc(100% - 40px)); min-height: calc(100vh - 142px); margin: 0 auto; }
.site-footer {
  min-height: 64px;
  padding: 18px clamp(20px, 6vw, 88px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.site-footer span { margin-left: 12px; color: #89938b; }
.flash-stack { padding-top: 16px; }
.flash { margin: 0; padding: 10px 14px; border-left: 3px solid var(--coral); background: #fff4ef; font-size: 13px; }
.flash-error { color: #803b2b; }
.login-layout {
  min-height: min(700px, calc(100vh - 144px));
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(310px, .9fr);
  align-items: center;
  gap: clamp(48px, 9vw, 128px);
  padding: 60px clamp(4px, 5vw, 64px);
}
.login-intro { position: relative; min-height: 410px; padding: 30px 0; display: flex; flex-direction: column; justify-content: center; }
.login-intro::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -12% 0 -18%;
  background: var(--forest);
  clip-path: polygon(0 0, 100% 0, 89% 100%, 0 100%);
}
.login-intro { color: #f4f4f4; padding-left: clamp(28px, 5vw, 68px); }
.eyebrow { margin: 0 0 14px; color: var(--coral); font: 700 10px/1.5 "DM Sans", sans-serif; letter-spacing: 0.12em; }
.login-intro .eyebrow { color: #b6d2a9; }
.login-intro h1 { margin: 0; font-size: clamp(38px, 5vw, 64px); font-weight: 600; line-height: 1.3; }
.login-intro h1 span { color: #b6d2a9; }
.intro-copy { max-width: 340px; margin: 22px 0 36px; color: #d2ded5; font-size: 14px; }
.intro-rule { display: flex; gap: 6px; }
.intro-rule span { width: 28px; height: 3px; background: #b6d2a9; }
.intro-rule span:nth-child(2) { width: 12px; opacity: .6; }
.intro-rule span:nth-child(3) { width: 5px; opacity: .35; }
.intro-note { margin: 42px 0 0; color: #b6c4bb; font: 600 9px/1.5 "DM Sans", sans-serif; letter-spacing: .1em; }
.intro-note span { padding: 0 8px; color: var(--coral); }
.login-panel { width: min(100%, 380px); justify-self: center; }
.panel-heading h2 { margin: 0; font-size: 27px; font-weight: 600; }
.panel-heading > p:last-child { margin: 6px 0 26px; color: var(--muted); font-size: 13px; }
.login-form { display: grid; gap: 9px; }
.login-form label { margin-top: 7px; font-size: 12px; font-weight: 600; }
.login-form input {
  width: 100%; height: 47px; padding: 0 13px;
  border: 1px solid #cbd2c9; border-radius: 2px;
  outline: none; background: #fffefa;
}
.login-form input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px #6441a518; }
.primary-button {
  min-height: 48px; margin-top: 15px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  border: 0; border-radius: 2px; background: var(--coral); color: white;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.primary-button:hover { background: #ae4f37; transform: translateY(-1px); }
.primary-button span { font-size: 19px; }
.login-footnote { margin-top: 18px; color: var(--muted); font-size: 11px; }
.dashboard-heading { padding: clamp(54px, 8vw, 94px) 0 34px; border-bottom: 1px solid var(--line); }
.dashboard-heading h1, .catalog-heading h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); font-weight: 600; line-height: 1.3; }
.dashboard-heading > p:last-child { margin: 10px 0 0; color: var(--muted); }
.workspace-row { border-bottom: 1px solid var(--line); }
.workspace-link { min-height: 112px; display: grid; grid-template-columns: 72px 1fr 32px; align-items: center; text-decoration: none; }
.workspace-index { color: var(--coral); font: 600 12px "DM Sans", sans-serif; }
.workspace-copy strong, .workspace-copy small { display: block; }
.workspace-copy strong { font-size: 16px; }
.workspace-copy small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.workspace-arrow { color: var(--coral); font-size: 20px; transition: transform .18s ease; }
.workspace-link:hover .workspace-arrow { transform: translate(3px, -3px); }
.migration-note { margin-top: 28px; color: var(--muted); font-size: 12px; }
.catalog-heading { padding: 64px 0 25px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.result-count { margin: 0 0 5px; color: var(--muted); font-size: 12px; }
.result-count strong { margin-right: 4px; color: var(--coral); font: 600 20px "DM Sans", sans-serif; }
.table-scroll { overflow-x: auto; border-top: 1px solid var(--forest); }
.project-table { width: 100%; border-collapse: collapse; text-align: left; }
.project-table th { padding: 14px 12px; color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.project-table td { padding: 16px 12px; border-top: 1px solid var(--line); font-size: 13px; vertical-align: top; }
.project-table tbody tr { transition: background .15s ease; }
.project-table tbody tr:hover { background: #e9eee7; }
.project-table th:first-child, .project-table td:first-child { padding-left: 4px; }
.team-id { color: var(--coral); font: 600 12px "DM Sans", sans-serif; white-space: nowrap; }
.project-title { min-width: 220px; font-weight: 600; }
.video-link { color: var(--forest); font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.empty-state { min-height: 180px; display: flex; align-items: center; gap: 24px; border-top: 1px solid var(--line); }
.empty-index { color: var(--coral); font: 600 28px "DM Sans", sans-serif; }
.empty-state h2 { margin: 0; font-size: 17px; }
.empty-state p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 700px) {
  .topbar { min-height: 68px; padding: 0 18px; }
  .topnav { gap: 13px; }
  .topnav a, .nav-logout { font-size: 11px; }
  .brand { gap: 8px; }
  .brand-mark { width: 32px; }
  .page-shell { width: min(100% - 32px, 1120px); }
  .login-layout { min-height: auto; grid-template-columns: 1fr; gap: 38px; padding: 28px 0 48px; }
  .login-intro { min-height: 270px; margin: 0 -16px; padding-left: 32px; }
  .login-intro::before { inset: 0 0 0 0; clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); }
  .login-intro h1 { font-size: 42px; }
  .intro-copy { margin: 12px 0 18px; }
  .intro-note { margin-top: 22px; }
  .login-panel { width: 100%; padding: 0 8px; }
  .catalog-heading { padding-top: 40px; }
  .project-table { min-width: 720px; }
  .workspace-link { grid-template-columns: 42px 1fr 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Shared visual language and accessible interaction states. */
:root { --paper: #f4f5f7; --line: #e6deee; --muted: #5c687a; --coral: #6743a3; }
body { background-image: none; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 3px solid #6944a5; outline-offset: 4px; }
button, select, input { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 20; background: white; padding: 12px 20px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.topbar { min-height: 88px; background: #fff; }
.brand-mark { width: 42px; border-radius: 13px 13px 13px 3px; }
.brand strong { font-size: 16px; letter-spacing: .06em; }
.brand small { margin-top: 1px; letter-spacing: .1em; }
.topnav a { padding: 10px 15px; border-radius: 8px; font-weight: 500; }
.topnav a[aria-current="page"] { color: var(--forest); background: #eee6fa; }
.nav-logout { min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 8px; }
.topnav a:hover, .nav-logout:hover { background: #f2ebfa; }
.page-shell { min-height: calc(100dvh - 153px); }
.site-footer { background: #fff; display: flex; justify-content: space-between; align-items: center; }
.login-layout { min-height: max(620px, calc(100dvh - 153px)); padding: 54px 0; gap: clamp(36px, 7vw, 96px); grid-template-columns: 1.1fr 1fr; }
.login-intro { isolation: isolate; min-height: 520px; padding: 52px 42px; overflow: hidden; border-radius: 24px; background: var(--forest); box-shadow: 0 16px 40px #6441a512; }
.login-intro::before { z-index: -1; inset: auto -160px -200px auto; width: 440px; height: 440px; border: 1px solid #ffffff20; border-radius: 50%; background: transparent; clip-path: none; box-shadow: 0 0 0 55px #ffffff06, 0 0 0 110px #ffffff05; }
.login-intro h1 { font-size: clamp(40px, 4.3vw, 60px); letter-spacing: -.05em; }
.login-intro .eyebrow { font-size: 10px; letter-spacing: .17em; margin-bottom: 28px; }
.intro-copy { line-height: 1.9; max-width: 280px; }
.intro-note { margin-top: 62px; }
.login-panel { width: 100%; max-width: 420px; padding: 36px; background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 36px #6441a507; }
.panel-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 24px; background: #edf2e9; color: var(--forest); border-radius: 12px; font-size: 25px; }
.panel-heading .eyebrow { color: var(--muted); font-size: 10px; margin-bottom: 8px; }
.panel-heading h2 { font-size: 28px; letter-spacing: -.03em; }
.login-form { gap: 8px; }
.login-form label { margin-top: 10px; font-size: 13px; }
.login-form input { height: 50px; background: #fbfcfa; border-radius: 9px; font-size: 16px; }
.login-form input::placeholder { color: #78847c; font-size: 13px; }
.primary-button { min-height: 50px; border-radius: 9px; background: var(--forest); padding: 0 18px; font-size: 14px; }
.primary-button:hover { background: #503280; }
.login-footnote { text-align: center; padding-top: 8px; }
.flash { border-radius: 8px; padding: 14px 18px; }
.dashboard-heading { position: relative; margin-top: 40px; padding: 44px; border: 1px solid #e2d6f0; border-radius: 20px; background: #eee6fa; }
.dashboard-heading .eyebrow { color: #594181; }
.dashboard-heading h1 { font-size: clamp(28px, 4vw, 42px); overflow-wrap: anywhere; }
.role-badge { display: inline-flex; position: absolute; top: 36px; right: 36px; padding: 6px 13px; border: 1px solid #ded0ef; border-radius: 30px; font-size: 12px; background: #faf7fd; }
.section-label { display: flex; align-items: center; justify-content: space-between; margin: 34px 0 16px; }
.section-label h2 { font-size: 17px; font-weight: 600; margin: 0; }
.section-label > span { font: 600 10px "DM Sans", sans-serif; letter-spacing: .12em; color: var(--muted); }
.workspace-row { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.workspace-link { padding: 26px; gap: 20px; grid-template-columns: 56px 1fr 32px; }
.workspace-index { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: #eee6fa; color: var(--forest); font-size: 28px; }
.workspace-arrow { color: var(--forest); }
.workspace-row:hover { border-color: #a8bca9; box-shadow: 0 6px 20px #6441a506; }
.migration-note { margin-bottom: 44px; }
.catalog-heading { padding-top: 44px; }
.catalog-heading h1 { font-size: clamp(30px, 4vw, 40px); }
.section-description { color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.result-count { white-space: nowrap; padding: 8px 14px; background: #eee6fa; border-radius: 8px; }
.result-count strong { color: var(--forest); }
.catalog-tools { display: flex; align-items: end; gap: 14px; background: white; padding: 20px; border: 1px solid var(--line); border-radius: 14px; }
.catalog-tools label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 7px; }
.search-field { flex: 1; min-width: 0; }
.category-field { width: 210px; }
.catalog-tools input, .catalog-tools select { width: 100%; height: 46px; border: 1px solid #ccd6cb; background: #fafbf8; border-radius: 8px; padding: 0 12px; font-size: 14px; color: var(--ink); }
.filter-button { height: 46px; padding: 0 22px; border: 0; border-radius: 8px; color: white; background: var(--forest); cursor: pointer; white-space: nowrap; }
.filter-button:hover { background: #503280; }
.filter-button span { margin-left: 12px; }
.reset-link { font-size: 12px; white-space: nowrap; padding: 12px 0; text-underline-offset: 4px; }
.catalog-summary { font-size: 12px; color: var(--muted); margin: 20px 2px 12px; }
.table-scroll { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 48px; }
.project-table th { background: #f2ebfa; padding: 15px 18px; color: #55466e; font-size: 12px; }
.project-table td { padding: 22px 18px; line-height: 1.85; }
.project-table th:first-child, .project-table td:first-child { padding-left: 22px; }
.project-table tbody tr:hover { background: #fcf9ff; }
.team-id { color: #655479; }
.project-title { max-width: 380px; overflow-wrap: anywhere; }
.category-tag { display: inline-block; background: #f0e8fa; color: #533583; border-radius: 5px; padding: 2px 8px; font-size: 11px; }
.video-link { display: inline-flex; padding: 4px 10px; border: 1px solid #d9e1d4; border-radius: 6px; text-decoration: none; }
.video-link:hover { background: #eee6fa; }
.empty-state { min-height: 240px; justify-content: center; border: 1px dashed #cad6c5; border-radius: 14px; background: #fff; padding: 28px; margin-bottom: 40px; }
@media (max-width: 850px) {
  .login-layout { gap: 26px; }
  .login-intro { padding: 36px 28px; }
  .login-panel { padding: 28px; }
  .catalog-tools { flex-wrap: wrap; }
  .category-field { width: 170px; }
}
@media (max-width: 700px) {
  .topbar { padding: 16px; gap: 16px; flex-wrap: wrap; }
  .brand strong { font-size: 14px; }
  .topnav { width: 100%; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
  .topnav a { font-size: 12px; padding: 10px 12px; }
  .topnav form { margin-left: auto; }
  .nav-logout { font-size: 12px; }
  .login-layout { grid-template-columns: 1fr; padding: 24px 0 36px; min-height: auto; }
  .login-intro { min-height: 260px; margin: 0; padding: 28px; border-radius: 16px; }
  .login-intro::before { inset: auto -230px -320px auto; clip-path: none; }
  .login-intro h1 { font-size: 38px; }
  .login-intro .eyebrow { margin-bottom: 14px; }
  .intro-copy { margin-bottom: 20px; }
  .intro-note { margin-top: 24px; }
  .login-panel { max-width: 100%; padding: 28px; border-radius: 16px; }
  .panel-icon { display: none; }
  .dashboard-heading { margin-top: 24px; padding: 28px 24px; }
  .role-badge { position: static; margin-bottom: 16px; }
  .dashboard-heading .eyebrow { margin-bottom: 10px; }
  .workspace-link { padding: 20px; gap: 14px; grid-template-columns: 44px 1fr 20px; }
  .workspace-index { width: 44px; height: 48px; font-size: 24px; }
  .workspace-copy strong { font-size: 15px; }
  .section-label > span { font-size: 9px; }
  .catalog-heading { padding-top: 28px; align-items: start; }
  .result-count { padding: 6px 10px; font-size: 11px; }
  .section-description { max-width: 230px; }
  .catalog-tools { padding: 16px; gap: 12px; }
  .search-field { flex-basis: 100%; }
  .category-field { width: auto; flex: 1; }
  .catalog-tools input, .catalog-tools select { font-size: 16px; }
  .table-scroll { border: 0; border-radius: 0; overflow: visible; background: transparent; }
  .project-table { display: block; min-width: 0; }
  .project-table thead { display: none; }
  .project-table tbody { display: grid; gap: 14px; }
  .project-table tr { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; }
  .project-table td, .project-table td:first-child { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 10px; padding: 7px 0; border: 0; min-width: 0; max-width: none; overflow-wrap: anywhere; white-space: normal; }
  .project-table td::before { content: attr(data-label); font: 400 11px/1.85 "Noto Sans TC", sans-serif; color: var(--muted); }
  .project-table td.project-title { font-size: 16px; }
  .category-tag, .video-link { justify-self: start; }
  .site-footer { flex-wrap: wrap; gap: 6px; padding: 18px; }
  .site-footer span { margin-left: 0; }
  .empty-state { gap: 14px; padding: 24px 20px; }
}

.student-import-form { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 20px; margin: 20px 0; border: 1px solid var(--line); background: white; }
.student-import-form input[type=file] { max-width: 100%; }
.student-import-form button { border: 0; background: var(--forest); color: white; padding: 12px 20px; cursor: pointer; }
.student-import-table { overflow-x: auto; margin-bottom: 32px; }
.student-import-table table { width: 100%; border-collapse: collapse; background: white; }
.student-import-table th, .student-import-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }

/* Portal login: layered blue curves and a compact centered card. */
.login-page { min-height: 100vh; min-height: 100dvh; background: #f4f4f4; position: relative; isolation: isolate; }
.login-page::before { content: ""; position: fixed; z-index: -1; width: 160vmax; height: 160vmax; left: -87vmax; top: -4vmax; border-radius: 50%; background: #8a6bb7; box-shadow: 0 0 0 12px #aa95ca, 0 0 0 23px #e6deef; pointer-events: none; }
.login-page .topbar, .login-page .site-footer { display: none; }
.login-page .page-shell { width: 100%; min-height: 100vh; min-height: 100dvh; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
.login-page .flash-stack { padding: 0; width: min(400px, 100%); }
.login-page .flash { background: #fff4ef; box-shadow: 0 2px 6px #0001; }
.portal-card { width: min(400px, 100%); background: white; border-radius: 4px; overflow: hidden; box-shadow: 0 2px 5px #0004; }
.portal-heading { padding: 24px 20px; text-align: center; background: #6441a5; color: white; }
.portal-heading p, .portal-heading h1 { margin: 0; font-size: 23px; font-weight: 500; line-height: 1.5; }
.portal-body { padding: 38px 40px 40px; }
.portal-description { margin: 4px 0 18px; color: #555; font-size: 15px; }
.portal-form { display: grid; gap: 16px; }
.portal-field { min-height: 56px; display: flex; background: #f1f1f1; border: 1px solid transparent; }
.portal-field:focus-within { border-color: #6441a5; box-shadow: 0 0 0 3px #6441a520; }
.portal-field-icon { width: 46px; flex-shrink: 0; display: grid; place-items: center; color: #666; }
.portal-field-icon svg { width: 21px; height: 21px; }
.portal-input { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 5px 12px 5px 0; background: #efe6fa; }
.portal-input label { color: #626b78; font-size: 12px; }
.portal-input input { width: 100%; min-width: 0; padding: 0; border: 0; border-radius: 0; outline: none; color: #2f2046; background: transparent; font-size: 16px; line-height: 1.5; }
.portal-submit { min-height: 38px; margin-top: 22px; border: 0; border-radius: 5px; background: #6743a3; color: white; font-weight: 600; cursor: pointer; box-shadow: 0 2px 4px #0004; }
.portal-submit:hover { background: #503280; }
.portal-help { margin: 24px 0 0; text-align: center; color: #727983; font-size: 11px; }
@media (max-width: 480px) {
  .portal-body { padding: 28px 24px 30px; }
  .portal-heading p, .portal-heading h1 { font-size: 21px; }
  .login-page .page-shell { padding: 28px 20px; }
}

.users-list { display: grid; gap: 16px; margin-bottom: 40px; }
.user-card { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 24px; overflow-wrap: anywhere; }
.user-card p { color: var(--muted); font-size: 13px; }
.user-edit-form { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; }
.user-edit-form label { display: grid; gap: 6px; flex: 1; min-width: 140px; }
.user-edit-form input, .user-edit-form select { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; }
.user-delete { margin-top: 20px; color: #9a3027; }
.user-delete summary { cursor: pointer; width: fit-content; padding: 8px 0; }
.user-delete button { padding: 10px 16px; background: #9a3027; color: white; border: 0; border-radius: 6px; cursor: pointer; }

.role-help { margin: 0 0 16px; padding: 14px 18px; border: 1px solid #e2d6f0; border-radius: 8px; background: #f8f3fd; color: #55466e; font-size: 13px; }
.role-help > strong { color: #533583; }
.role-help ul { margin: 8px 0 0; padding-left: 20px; }
.role-help li + li { margin-top: 6px; }

.create-user-panel { margin: 24px 0 32px; }
.user-create-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.user-create-form label { display: grid; gap: 6px; }
.user-create-form input, .user-create-form select { width: 100%; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; }
.create-role-help { grid-column: 1 / -1; margin: 0; }
.user-create-form button { justify-self: start; }
@media (max-width: 600px) { .user-create-form { grid-template-columns: 1fr; } }

.create-user-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.create-user-heading h2 { margin: 0; }
.create-user-heading a { display: inline-flex; align-items: center; text-decoration: none; }
.user-create-form input[type="checkbox"] { width: auto; min-height: auto; margin-right: 6px; }

.report-pages { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px; margin: 16px 0; }
.report-page { display: block; max-width: 100%; height: auto; margin: 0 auto; border: 1px solid var(--line); background: white; }
.report-page-picker select {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.password-input { position: relative; }
.password-input:has(.password-toggle:not([hidden])) input { padding-right: 48px; }
.password-toggle {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.password-toggle svg { vertical-align: middle; }
.password-toggle[aria-pressed="false"] .password-toggle-slash { display: none; }

.admin-layout {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 44px);
  width: min(1440px, calc(100% - 48px));
  margin-inline: auto;
}
.admin-content { width: 100%; min-width: 0; padding-bottom: 40px; }
.admin-sidebar {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 4px;
  margin-top: 28px;
  padding: 8px;
  background: #f4eefb;
  border-radius: 16px;
}
.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding-inline: 16px;
  border-radius: 24px;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.admin-sidebar a:hover { background: #ebe0f8; }
.admin-sidebar a[aria-current="page"] { background: #e7d9fa; color: #38235b; font-weight: 700; }
.admin-sidebar svg { flex: none; }
.admin-account { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); width: calc(100% - 32px); gap: 0; }
  .admin-sidebar { position: static; display: flex; overflow-x: auto; margin-top: 16px; }
}
