:root {
  color-scheme: light;
  font-family: "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: #25284d;
  background: #f6f3f8;
  --ink: #25284d;
  --muted: #77758f;
  --line: rgba(117, 105, 167, .16);
  --teal: #008eaa;
  --focus: #006a8b;
  --danger: #a73548;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; min-height: 100vh; background: #fbf8f9; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0, 0, 0, 0); overflow: hidden; white-space: nowrap; border: 0; }
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.1fr);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 92% 6%, rgba(246, 225, 216, .62), transparent 30%),
    radial-gradient(ellipse at 74% 93%, rgba(218, 225, 249, .72), transparent 37%),
    #fbf8f9;
}
.auth-story {
  position: relative;
  min-height: 100vh;
  padding: 42px clamp(34px, 6vw, 88px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #f8fbff;
  background:
    radial-gradient(ellipse at 4% 7%, rgba(113, 202, 205, .22), transparent 37%),
    radial-gradient(ellipse at 100% 100%, rgba(146, 135, 201, .35), transparent 43%),
    linear-gradient(148deg, #253453 0%, #26395a 51%, #344572 100%);
}
.auth-story::before, .auth-story::after {
  content: ""; position: absolute; width: 660px; height: 660px; border: 1px solid rgba(255,255,255,.095); border-radius: 50%; pointer-events: none;
}
.auth-story::before { right: -405px; bottom: -305px; box-shadow: 0 0 0 35px rgba(255,255,255,.018), 0 0 0 90px rgba(255,255,255,.017); }
.auth-story::after { width: 450px; height: 450px; right: -275px; bottom: -200px; }
.auth-brand, .auth-content, .auth-foot { position: relative; z-index: 1; }
.auth-brand { display: inline-flex; align-items: center; gap: 14px; width: fit-content; color: white; text-decoration: none; font-weight: 650; font-size: 17px; letter-spacing: -.35px; line-height: 1.2; }
.academy-brand-copy { display: flex; flex-direction: column; gap: 5px; }
.academy-tagline { font-size: 11px; font-weight: 400; letter-spacing: 0; line-height: 1.4; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; position: relative; border: 1px solid rgba(255,255,255,.65); border-radius: 15px; background: linear-gradient(145deg, #e3dcff, #9ed5df); color: #263251; font-size: 27px; font-weight: 650; letter-spacing: -2px; box-shadow: 0 9px 25px rgba(8,20,51,.2); }
.brand-mark::after { content: ""; position: absolute; width: 8px; height: 8px; right: 5px; top: 5px; border-radius: 50%; background: #06aabd; border: 1px solid rgba(255,255,255,.7); }
.auth-content { align-self: center; max-width: 620px; padding: 72px 0 80px; }
.auth-kicker { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 21px; color: #b6dbe2; font-size: 11px; font-weight: 650; letter-spacing: 1.5px; text-transform: uppercase; }
.auth-kicker::before { content: ""; width: 19px; height: 1px; background: #42b7c4; }
.auth-content h1 { max-width: 570px; margin: 0; color: #fff; font-size: clamp(40px, 5vw, 68px); font-weight: 500; letter-spacing: -3px; line-height: 1.03; }
.auth-content > p { max-width: 415px; margin: 23px 0 0; color: rgba(242,246,255,.73); font-size: 15px; line-height: 1.85; }
.story-note { display: flex; gap: 14px; align-items: flex-start; max-width: 430px; margin-top: 45px; padding: 17px 18px; border: 1px solid rgba(255,255,255,.13); border-radius: 17px; background: rgba(255,255,255,.07); backdrop-filter: blur(12px); }
.story-note-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; color: #9ce1e3; border-radius: 11px; background: rgba(120,203,207,.14); font-size: 17px; }
.story-note strong { display: block; margin: 1px 0 5px; color: white; font-size: 12px; font-weight: 600; }
.story-note span { display: block; color: rgba(242,246,255,.65); font-size: 11px; line-height: 1.6; }
.auth-foot { color: rgba(238,242,252,.52); font-size: 10px; letter-spacing: .25px; }
.auth-main { min-width: 0; display: flex; flex-direction: column; align-items: flex-end; padding: 30px clamp(25px, 5vw, 72px) 36px; }
.auth-main-top { display: flex; align-items: center; gap: 10px; min-height: 39px; color: #89869b; font-size: 11px; }
.auth-main-top .top-dot { width: 6px; height: 6px; border-radius: 50%; background: #07a2b2; box-shadow: 0 0 0 4px rgba(7,162,178,.09); }
.auth-panel { width: min(100%, 470px); margin: auto; padding: clamp(30px, 4vw, 49px); border: 1px solid rgba(255,255,255,.92); border-radius: 27px; background: rgba(255,255,255,.78); box-shadow: 0 24px 75px rgba(68,62,108,.1), inset 0 0 0 1px rgba(120,104,165,.055); backdrop-filter: blur(25px); }
.panel-icon { width: 43px; height: 43px; display: grid; place-items: center; margin-bottom: 27px; border: 1px solid #d9f0ef; border-radius: 14px; background: linear-gradient(150deg, #e2f5f1, #eff2ff); color: #087e92; font-size: 18px; }
.academy-environment-badge { display: inline-flex; align-items: center; margin-bottom: 14px; padding: 5px 10px; border: 1px solid #cfe9e6; border-radius: 20px; background: #eff9f6; color: #176f70; font-size: 11px; font-weight: 650; }
.auth-panel h2 { margin: 0; color: #292d51; font-size: clamp(25px, 2.7vw, 32px); font-weight: 600; letter-spacing: -1px; line-height: 1.2; }
.panel-subtitle { margin: 10px 0 29px; color: #858297; font-size: 12px; line-height: 1.7; }
.login-purpose { margin: -14px 0 22px; color: #625f79; font-size: 12px; font-weight: 550; line-height: 1.6; }
.auth-form { display: grid; gap: 17px; }
.field { display: grid; gap: 7px; }
.field label { color: #565571; font-size: 11px; font-weight: 600; }
.field input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #e2deeb; border-radius: 12px; background: rgba(255,255,255,.8); color: #272b4e; font-size: 13px; transition: border-color .18s, box-shadow .18s, background .18s; }
.field input::placeholder { color: #aaa7b5; }
.field input:hover { border-color: #c8c1dc; }
.field input:focus { outline: none; border-color: #4ba7b5; box-shadow: 0 0 0 4px rgba(19,155,172,.09); background: #fff; }
.field-hint { color: #9794a3; font-size: 10px; line-height: 1.5; }
.auth-submit { min-height: 49px; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 4px; border: 1px solid rgba(255,255,255,.55); border-radius: 13px; color: #fff; background: linear-gradient(115deg, #08aeb4, #007caa); box-shadow: 0 9px 20px rgba(2,131,155,.16); font-size: 13px; font-weight: 650; transition: transform .18s, box-shadow .18s; }
.auth-submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 25px rgba(2,131,155,.24); }
.form-error, .form-success { min-height: 0; padding: 0; margin: 0; border-radius: 10px; font-size: 11px; line-height: 1.55; }
.form-error:not(:empty) { padding: 11px 12px; color: #8d2c41; border: 1px solid #f0d5d9; background: #fff5f5; }
.form-success:not(:empty) { padding: 11px 12px; color: #176a61; border: 1px solid #cce9e2; background: #f1fbf7; }
.auth-divider { height: 1px; margin: 25px 0 19px; background: linear-gradient(90deg, transparent, #e6e2ed 20%, #e6e2ed 80%, transparent); }
.auth-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px; color: #858297; font-size: 10px; }
.auth-links a, .text-link { color: #087f99; font-weight: 600; text-decoration: none; }
.auth-links a:hover, .text-link:hover { text-decoration: underline; }
.login-contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 15px; }
.login-contact p { display: grid; gap: 4px; min-width: 0; margin: 0; color: #858297; font-size: 12px; line-height: 1.5; }
.login-contact strong { color: #565571; font-size: 12px; font-weight: 650; }
.login-contact a { width: fit-content; max-width: 100%; color: #087f99; font-weight: 600; overflow-wrap: anywhere; text-decoration: none; }
.login-contact a:hover { text-decoration: underline; }
.panel-notice { display: flex; align-items: flex-start; gap: 9px; margin-top: 21px; padding-top: 16px; border-top: 1px solid rgba(117,105,167,.12); color: #8b8899; font-size: 10px; line-height: 1.65; }
.panel-notice b { color: #615e7d; font-weight: 600; }
.panel-notice-mark { color: #8a7ab6; font-size: 14px; }
.return-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 20px; color: #827f96; font-size: 11px; text-decoration: none; }
.return-link:hover { color: var(--teal); }

/* Access administration */
.admin-page { min-height: 100vh; padding: 26px clamp(16px, 4.5vw, 66px) 64px; background: radial-gradient(ellipse at 88% 4%, rgba(246,225,216,.55), transparent 25%), radial-gradient(ellipse at 24% 98%, rgba(216,226,248,.63), transparent 36%), #faf8fa; }
.admin-wrap { max-width: 1130px; margin: 0 auto; }
.admin-page-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.admin-page-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; border: 1px solid #e0dbea; border-radius: 10px; background: rgba(255,255,255,.6); color: #68657f; font-size: 12px; text-decoration: none; }
.admin-page-links a:hover { border-color: #c8c1dc; background: #fff; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 57px; padding-bottom: 22px; border-bottom: 1px solid rgba(117,105,167,.13); }
.admin-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 650; }
.admin-brand .brand-mark { width: 37px; height: 37px; border-radius: 12px; font-size: 23px; box-shadow: none; }
.admin-header-actions { display: flex; align-items: center; gap: 11px; color: #848197; font-size: 11px; }
.admin-user { display: flex; align-items: center; gap: 8px; padding-right: 12px; border-right: 1px solid var(--line); }
.admin-user-dot { width: 8px; height: 8px; border-radius: 50%; background: #0ba1a9; box-shadow: 0 0 0 4px rgba(11,161,169,.09); }
.quiet-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 35px; padding: 0 12px; border: 1px solid #e0dbea; border-radius: 10px; background: rgba(255,255,255,.6); color: #68657f; font-size: 10px; font-weight: 600; text-decoration: none; }
.quiet-button:hover { border-color: #c8c1dc; background: #fff; }
.danger-button { color: #a43b4e; }
.admin-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 42px 0 25px; }
.admin-eyebrow { margin: 0 0 11px; color: #877da8; font-size: 10px; font-weight: 650; letter-spacing: 1.4px; text-transform: uppercase; }
.admin-intro h1 { margin: 0; color: #25294c; font-size: clamp(31px, 4vw, 43px); font-weight: 550; letter-spacing: -1.8px; line-height: 1.1; }
.admin-intro p:last-child { max-width: 550px; margin: 12px 0 0; color: #858297; font-size: 12px; line-height: 1.7; }
.admin-summary { min-width: 128px; padding: 14px 17px; border: 1px solid rgba(255,255,255,.95); border-radius: 15px; background: rgba(255,255,255,.62); box-shadow: 0 6px 20px rgba(92,77,132,.045); text-align: right; }
.admin-summary strong { display: block; color: #313352; font-size: 21px; font-weight: 600; letter-spacing: -.7px; }
.admin-summary span { display: block; margin-top: 2px; color: #9390a1; font-size: 9px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .8fr); align-items: start; gap: 17px; }
.admin-card { min-width: 0; border: 1px solid rgba(255,255,255,.95); border-radius: 20px; background: rgba(255,255,255,.72); box-shadow: 0 11px 33px rgba(88,72,128,.055), inset 0 0 0 1px rgba(122,108,165,.05); backdrop-filter: blur(18px); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 21px 22px 17px; border-bottom: 1px solid rgba(117,105,167,.1); }
.card-heading { display: flex; align-items: center; gap: 11px; }
.card-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; background: #e4f2f2; color: #09839b; font-size: 15px; }
.card-icon.purple { color: #7866a9; background: #eeeafb; }
.card-head h2 { margin: 0; color: #353551; font-size: 14px; font-weight: 650; }
.card-head p { margin: 4px 0 0; color: #9290a1; font-size: 10px; line-height: 1.5; }
.count-pill { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #ebe7f2; border-radius: 20px; background: #faf9fc; color: #817d97; font-size: 9px; font-weight: 600; }
.user-list { padding: 0 13px; }
.user-row { display: flex; align-items: center; gap: 12px; min-height: 67px; padding: 12px 9px; border-bottom: 1px solid rgba(117,105,167,.095); }
.user-row:last-child { border-bottom: 0; }
.user-avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.92); border-radius: 50%; background: linear-gradient(145deg, #e3ddf8, #d8edf0); color: #625a8a; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.row-main { min-width: 0; flex: 1; }
.row-main strong { display: block; max-width: 100%; overflow: hidden; color: #45435e; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.row-main span { display: block; margin-top: 4px; color: #9996a6; font-size: 9px; }
.row-status { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: #25806e !important; }
.row-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #29a489; }
.row-status.disabled { color: #a17a73 !important; }
.row-status.disabled::before { background: #c39080; }
.role-pill { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #ece8f3; border-radius: 20px; background: #f9f7fc; color: #837c9d; font-size: 8px; font-weight: 650; text-transform: capitalize; }
.role-pill.admin { color: #6d5a9c; border-color: #e4ddf2; background: #f5f1fb; }
.row-actions { display: flex; align-items: center; gap: 6px; margin-left: 3px; }
.row-actions .quiet-button { min-height: 29px; padding: 0 9px; font-size: 9px; }
.self-label { color: #aaa7b4; font-size: 9px; white-space: nowrap; }
.empty-state { padding: 28px 15px; color: #9692a3; text-align: center; font-size: 10px; line-height: 1.7; }
.admin-form-wrap { padding: 19px 21px 22px; }
.admin-form { display: grid; gap: 11px; }
.admin-form .field input { height: 42px; font-size: 11px; }
.admin-form .auth-submit { min-height: 41px; margin-top: 0; font-size: 11px; }
.admin-alert { margin: 0 0 15px; }
.admin-refresh { color: #087f99; font-size: 10px; text-decoration: none; cursor: pointer; }
.admin-refresh:hover { text-decoration: underline; }
.admin-main-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; padding: 13px 15px; border: 1px solid rgba(221,215,235,.8); border-radius: 13px; background: rgba(255,255,255,.47); color: #89869a; font-size: 10px; line-height: 1.65; }
.admin-main-note strong { color: #615d7c; font-weight: 600; }
.admin-main-note span:first-child { color: #8c7bb6; font-size: 13px; }
.page-message { max-width: 1100px; margin: 16px auto 0; }

@media (max-width: 900px) {
  .auth-page { grid-template-columns: minmax(270px, .78fr) minmax(400px, 1.22fr); }
  .auth-story { padding: 34px 34px; }
  .auth-content h1 { font-size: 49px; }
  .auth-main { padding-right: 27px; padding-left: 27px; }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .auth-page { display: flex; flex-direction: column; min-height: 100dvh; }
  .auth-story { min-height: 0; padding: 22px 23px 26px; }
  .auth-brand { font-size: 14px; gap: 10px; }
  .brand-mark { width: 37px; height: 37px; border-radius: 12px; font-size: 23px; }
  .auth-content { padding: 32px 0 5px; }
  .auth-kicker { margin-bottom: 12px; font-size: 9px; }
  .auth-content h1 { max-width: 470px; font-size: 36px; letter-spacing: -1.9px; }
  .auth-content > p { margin-top: 11px; font-size: 12px; line-height: 1.65; }
  .story-note { display: none; }
  .auth-foot { display: none; }
  .auth-main { flex: 1; align-items: center; padding: 17px 16px 26px; }
  .auth-main-top { display: none; }
  .auth-panel { width: min(100%, 470px); margin: 0 auto; padding: 27px 23px; border-radius: 21px; }
  .panel-icon { margin-bottom: 20px; }
  .panel-subtitle { margin-bottom: 22px; }
  .admin-page { padding: 17px 15px 40px; }
  .admin-header { align-items: flex-start; gap: 8px; padding-bottom: 16px; }
  .admin-header-actions { gap: 7px; }
  .admin-user { max-width: 145px; padding-right: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-header-actions .quiet-button { min-height: 31px; padding: 0 8px; font-size: 9px; }
  .admin-intro { align-items: flex-start; padding: 31px 0 20px; }
  .admin-intro h1 { font-size: 33px; }
  .admin-intro p:last-child { font-size: 11px; }
  .admin-summary { min-width: 80px; padding: 10px 11px; }
  .admin-summary strong { font-size: 18px; }
  .admin-summary span { font-size: 8px; }
  .card-head { padding: 17px 15px 14px; }
  .user-list { padding: 0 8px; }
  .user-row { gap: 8px; padding: 11px 5px; }
  .role-pill { display: none; }
  .row-actions .quiet-button { min-height: 28px; padding: 0 7px; }
  .admin-form-wrap { padding: 16px; }
}
@media (max-width: 390px) {
  .auth-panel { padding: 24px 19px; }
  .admin-header-actions > a.quiet-button { display: none; }
  .admin-intro { gap: 10px; }
  .admin-summary { min-width: 69px; }
  .user-avatar { display: none; }
  .row-main strong { font-size: 10px; }
  .admin-header-actions .admin-user { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* Private document administration */
.documents-grid { grid-template-columns: minmax(0, 1.5fr) minmax(295px, .8fr); }
.documents-page .admin-alert:not(:empty) { margin-bottom: 18px; }
.refresh-button { min-height: 27px; padding: 0 3px; border: 0; background: transparent; font: inherit; font-size: 10px; }
.document-library-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 22px 0; color: #9894a6; font-size: 9px; }
.document-list { padding: 5px 20px 9px; }
.document-row { display: grid; gap: 12px; padding: 18px 2px; border-bottom: 1px solid rgba(117,105,167,.1); }
.document-row:last-child { border-bottom: 0; }
.document-main { min-width: 0; }
.document-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.document-title { min-width: 0; margin: 0; color: #45435e; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.55; }
.document-state { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; margin-top: 1px; padding: 4px 7px; border: 1px solid #ebe7f2; border-radius: 20px; background: #f9f7fc; color: #898097; font-size: 8px; font-weight: 650; white-space: nowrap; }
.document-state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.document-state.ready { color: #25806e; border-color: #d8ece5; background: #f3faf6; }
.document-state.processing { color: #8b6b30; border-color: #efe3c7; background: #fdf9ef; }
.document-state.error { color: #a43b4e; border-color: #efd9df; background: #fff5f6; }
.document-meta { margin: 5px 0 0; color: #9590a5; font-size: 9px; line-height: 1.65; }
.document-detail, .document-warning { margin: 9px 0 0; color: #8a819a; font-size: 10px; line-height: 1.65; overflow-wrap: anywhere; }
.document-warning { padding: 8px 10px; border: 1px solid #eadfc6; border-radius: 8px; background: #fffaf0; color: #8b6b3b; }
.document-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.document-actions .quiet-button { min-height: 29px; padding: 0 10px; font-size: 9px; }
.document-file-field input { height: auto; min-height: 45px; padding: 9px; font-size: 10px; }
.document-file-field input::file-selector-button { margin-right: 9px; padding: 7px 9px; border: 1px solid #d7dfea; border-radius: 7px; background: #f4f8fb; color: #557383; font: inherit; cursor: pointer; }
.selected-file { margin: 0; color: #858197; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.document-upload-status { min-height: 0; margin: 0; color: #17796c; font-size: 10px; line-height: 1.65; }
.document-upload-status:empty { display: none; }
.upload-policy { margin: 17px 0 0; padding-top: 14px; border-top: 1px solid rgba(117,105,167,.1); color: #928ca1; font-size: 9px; line-height: 1.7; }
.replacement-notice { display: grid; gap: 7px; padding: 12px; border: 1px solid #e4dcf1; border-radius: 11px; background: #f7f3fc; font-size: 10px; line-height: 1.6; }
.replacement-notice strong { color: #64518d; font-weight: 600; overflow-wrap: anywhere; }
.replacement-notice span { color: #8a7e9e; font-size: 9px; }
.cancel-replace { justify-self: start; padding: 0; border: 0; background: transparent; font-size: 9px; }
.document-source-note { margin-top: 17px; }
@media (max-width: 900px) { .documents-grid { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  .document-library-meta { padding-right: 16px; padding-left: 16px; }
  .document-list { padding-right: 15px; padding-left: 15px; }
  .document-title-row { gap: 9px; }
  .document-title { font-size: 11px; }
  .document-state { font-size: 8px; padding-right: 6px; padding-left: 6px; }
  .documents-page .admin-header { flex-wrap: wrap; }
  .documents-page .admin-header-actions { flex-wrap: wrap; }
}

/* Role administration keeps permissions visible at narrow widths. */
.admin-form .field select { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #e2ddec; border-radius: 10px; background: white; color: #39344f; font: inherit; font-size: 12px; }
.role-help { margin: 0; color: #777187; font-size: 11px; line-height: 1.6; }
.user-row .row-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 190px; }
.user-row .row-status { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
.row-main .role-pill { display: inline-block; margin-top: 5px; }
@media (max-width: 600px) {
  .user-row { flex-wrap: wrap; }
  .user-row .row-main { flex-basis: calc(100% - 50px); }
  .user-row .row-actions { margin-left: 42px; max-width: none; justify-content: flex-start; }
}

/* Phone forms and administration retain every action without shrinking touch targets. */
@media (max-width: 680px) {
  body, .admin-page { min-height: 100dvh; }
  .auth-page { overflow: visible; }
  .auth-story { padding: max(18px, env(safe-area-inset-top)) 20px 20px; }
  .auth-content { padding-top: 20px; }
  .auth-content h1 { font-size: 30px; letter-spacing: -1.1px; }
  .auth-main { padding: 14px max(12px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .field input, .admin-form .field input, .admin-form .field select { min-height: 48px; height: 48px; font-size: 16px; }
  .field label { font-size: 13px; }
  .field-hint, .panel-subtitle, .role-help, .form-error, .form-success { font-size: 12px; }
  .auth-links a, .return-link { min-height: 44px; display: inline-flex; align-items: center; font-size: 12px; }
  .login-purpose { font-size: 13px; }
  .login-contact { gap: 8px; }
  .login-contact p, .login-contact strong { font-size: 12px; }
  .login-contact a { min-height: 44px; display: inline-flex; align-items: center; font-size: 12px; }
  .admin-page { padding: max(14px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .admin-header { flex-wrap: wrap; gap: 12px; }
  .admin-brand { font-size: 14px; min-width: 0; }
  .admin-header-actions { width: 100%; min-width: 0; flex-wrap: wrap; gap: 8px; }
  .admin-user, .admin-header-actions .admin-user { max-width: 100%; min-width: 0; flex: 1 1 160px; font-size: 12px; padding: 0; border: 0; white-space: normal; }
  .admin-user > span:last-child { overflow-wrap: anywhere; min-width: 0; }
  .admin-header-actions > a.quiet-button { display: inline-flex; }
  .quiet-button, .admin-header-actions .quiet-button, .row-actions .quiet-button, .document-actions .quiet-button { min-height: 44px; padding: 8px 12px; font-size: 12px; }
  .admin-intro { flex-wrap: wrap; gap: 14px; padding-top: 25px; }
  .admin-intro > div:first-child { min-width: 0; flex: 1 1 200px; }
  .admin-intro h1 { font-size: 31px; }
  .admin-summary { text-align: left; min-width: 0; }
  .card-head { flex-wrap: wrap; gap: 10px; padding: 16px 14px; }
  .card-heading { min-width: 0; }
  .card-head p, .admin-intro p:last-child { font-size: 12px; }
  .row-main strong { font-size: 13px; white-space: normal; overflow-wrap: anywhere; overflow: visible; }
  .row-main span, .self-label { font-size: 11px; }
  .row-status { white-space: normal; line-height: 1.5; }
  .user-row { flex-wrap: wrap; align-items: flex-start; padding: 14px 5px; }
  .user-avatar { display: grid; }
  .user-row .row-main { flex: 1 1 calc(100% - 50px); min-width: 0; }
  .user-row .row-actions { margin-left: 0; flex-basis: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .row-main .role-pill { display: inline-block; }
  .admin-form .auth-submit { min-height: 48px; font-size: 14px; }
  .admin-main-note { font-size: 12px; }
  .admin-refresh, .refresh-button, .cancel-replace { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 10px; font-size: 12px; }
  .document-title-row, .document-library-meta { flex-wrap: wrap; }
  .document-title { font-size: 14px; }
  .document-state, .document-meta, .document-detail, .document-warning, .document-upload-status, .selected-file, .upload-policy, .replacement-notice, .replacement-notice span { font-size: 12px; }
  .document-file-field input { height: auto; min-width: 0; max-width: 100%; padding: 10px; font-size: 16px; }
  .document-file-field input::file-selector-button { min-height: 44px; font-size: 14px; }
  .documents-grid > .admin-side-column { grid-row: 1; }
  .document-upload-wrap { scroll-margin-top: 16px; }
}

.mobile-section-link { display: none; }
.password-page .password-panel { width: min(100%, 560px); margin: 36px auto 0; }
.password-panel h1 { margin: 0 0 10px; color: #292d4b; font-size: 27px; font-weight: 550; letter-spacing: -.8px; }
.password-return { margin-top: 20px; }
.password-success { display: grid; gap: 15px; }
.password-success .form-success { margin: 0; }
.password-success .quiet-button { justify-self: start; }
.account-dialog { width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #e0dbea; border-radius: 22px; background: #fcfafc; color: var(--ink); box-shadow: 0 24px 75px rgba(38, 30, 66, .22); overflow-y: auto; }
.account-dialog::backdrop { background: rgba(36, 35, 63, .4); backdrop-filter: blur(4px); }
.account-dialog-content { padding: clamp(22px, 5vw, 34px); }
.account-dialog h2 { margin: 0; font-size: 25px; letter-spacing: -.7px; }
.account-dialog .panel-subtitle { margin-bottom: 15px; }
.account-dialog-identity { margin: 0 0 20px; color: #55506d; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.account-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.account-dialog-actions .auth-submit { flex: 1 1 220px; margin: 0; padding: 10px 14px; }
.account-dialog-actions .quiet-button { min-height: 49px; }
#temporary-password-notice { margin: 0 0 18px; line-height: 1.7; }
.auth-privacy-link { margin: 19px 0 0; color: #706d83; font-size: 11px; line-height: 1.6; }
.auth-privacy-link a { color: #087f99; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }

/* Public, informational Privacy & Use page. */
.privacy-page { min-height: 100dvh; background: radial-gradient(ellipse at 93% 8%, rgba(247,228,218,.65), transparent 25%), radial-gradient(ellipse at 9% 95%, rgba(217,228,247,.67), transparent 31%), #faf8fb; }
.privacy-skip { position: absolute; top: -70px; left: 16px; z-index: 5; padding: 12px 16px; border-radius: 9px; background: white; color: #087f99; }
.privacy-skip:focus { top: 12px; }
.privacy-header { background: #253453; color: white; }
.privacy-header-inner { max-width: 1150px; min-height: 86px; margin: 0 auto; padding: 14px 25px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.privacy-header .admin-brand { color: white; font-size: 15px; }
.privacy-header-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.privacy-header-nav a { display: inline-flex; min-height: 42px; align-items: center; padding: 9px 13px; border: 1px solid rgba(255,255,255,.28); border-radius: 10px; color: white; font-size: 12px; font-weight: 600; text-decoration: none; }
.privacy-header-nav a:hover { background: rgba(255,255,255,.13); }
.privacy-wrap { max-width: 1150px; margin: 0 auto; padding: clamp(35px, 5vw, 68px) 25px 72px; }
.privacy-intro { max-width: 780px; margin-bottom: 34px; }
.privacy-intro .auth-kicker { margin-bottom: 15px; color: #087f99; }
.privacy-intro h1 { margin: 0; color: #273252; font-size: clamp(38px, 5vw, 60px); font-weight: 550; letter-spacing: -2px; line-height: 1.08; }
.privacy-intro > p:last-child { margin: 18px 0 0; color: #66667d; font-size: 15px; line-height: 1.8; }
.privacy-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 22px; }
.privacy-sections { display: grid; gap: 13px; }
.privacy-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 15px; padding: 25px 27px; border: 1px solid rgba(117,105,167,.13); border-radius: 18px; background: rgba(255,255,255,.83); box-shadow: 0 7px 25px rgba(78,65,113,.04); }
.privacy-number { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 11px; color: #087e92; background: #e6f4f3; font-size: 11px; font-weight: 700; }
.privacy-card h2 { margin: 2px 0 12px; color: #2d3555; font-size: 20px; font-weight: 620; letter-spacing: -.45px; }
.privacy-card p { margin: 0 0 11px; color: #5e5d73; font-size: 15px; line-height: 1.75; }
.privacy-card p:last-child { margin-bottom: 0; }
.privacy-card strong { color: #353852; font-weight: 650; }
.privacy-aside { position: sticky; top: 22px; padding: 27px; border-radius: 19px; background: linear-gradient(147deg, #253453, #344977); color: white; box-shadow: 0 15px 36px rgba(36,52,83,.13); }
.privacy-aside-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #a8e0e1; background: rgba(255,255,255,.11); }
.privacy-aside h2 { margin: 21px 0 11px; font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -.35px; }
.privacy-aside p { margin: 0 0 14px; color: rgba(246,248,255,.78); font-size: 13px; line-height: 1.7; }
.privacy-aside a { display: inline-flex; min-height: 36px; align-items: center; gap: 6px; color: #b6e5e8; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.privacy-aside-divider { height: 1px; margin: 22px 0; background: rgba(255,255,255,.2); }
.privacy-aside .privacy-return { width: 100%; justify-content: space-between; min-height: 44px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.28); border-radius: 10px; color: white; text-decoration: none; }
.privacy-aside .privacy-return:hover { background: rgba(255,255,255,.12); }
.privacy-footer { max-width: 1150px; margin: 0 auto; padding: 0 25px 26px; color: #88869a; font-size: 11px; }
@media (max-width: 850px) { .privacy-layout { grid-template-columns: 1fr; } .privacy-aside { position: static; } }
@media (max-width: 600px) { .privacy-header-inner { align-items: flex-start; flex-direction: column; gap: 16px; padding: 18px; } .privacy-header-nav { width: 100%; justify-content: flex-start; } .privacy-wrap { padding: 34px 16px 50px; } .privacy-intro > p:last-child { font-size: 15px; } .privacy-card { grid-template-columns: 1fr; gap: 8px; padding: 21px; } .privacy-card h2 { font-size: 19px; } .privacy-card p { font-size: 14px; } .privacy-aside { padding: 23px; } .privacy-footer { padding: 0 16px 22px; } .auth-privacy-link { font-size: 12px; } }
@media (min-width: 681px) and (max-width: 1000px) {
  .admin-header, .admin-header-actions { flex-wrap: wrap; }
  .admin-header-actions { max-width: 100%; }
}
@media (max-width: 680px) {
  .password-page .password-panel { margin-top: 22px; }
  .admin-page-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
  .admin-page-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid #e0dbea; border-radius: 10px; background: rgba(255,255,255,.6); color: #68657f; font-size: 12px; text-decoration: none; }
  #create-account-heading, #users-heading { scroll-margin-top: 16px; }
}
