:root {
  color-scheme: light;
  --forest: #234f42;
  --ink: #20352f;
  --muted: #596961;
  --border: #d7dfd7;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #f6f7f3;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled, input:disabled { cursor: default; }
a { color: var(--forest); }
:focus-visible { outline: 3px solid #347358; outline-offset: 3px; }
main:focus { outline: none; }
.masthead { background: #fff; border-bottom: 1px solid var(--border); }
.masthead-inner { width: min(1120px, calc(100% - 48px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 18px; }
.wordmark { display: inline-flex; gap: 10px; align-items: center; font-size: 1.4rem; font-weight: 750; color: var(--forest); letter-spacing: -.055em; text-decoration: none; }
.word-light { font-weight: 500; }
.jr-profiles { flex: 1 1 0; min-width: 0; }
.jr-profile-list {
  display: flex; align-items: center; gap: 6px; overflow-x: auto;
  padding: 4px; scrollbar-width: thin; overscroll-behavior-x: contain;
}
.jr-profile {
  display: inline-flex; flex: none; align-items: center; gap: 8px;
  max-width: min(100%, 14rem); min-height: 38px; padding: 4px 13px 4px 5px;
  border: 1px solid var(--border); border-radius: 30px; background: white;
  color: #485e52; font-size: .9rem; font-weight: 600;
}
.jr-profile:hover { border-color: #9ab6a7; }
.jr-profile:not(:only-child) { max-width: min(88%, 14rem); }
.jr-profile > span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.jr-profile[aria-selected="true"] { background: #e9f1e7; color: var(--forest); border-color: #adc5b3; }
.jr-avatar {
  display: grid; flex: none; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; background: #e9e9e1; color: #5e695b; font-size: .75rem; font-weight: 700;
}
.jr-profile[aria-selected="true"] .jr-avatar { color: white; background: var(--forest); }
.account-nav, .account-nav > form { display: flex; align-items: center; gap: 20px; margin: 0; }
.account-nav { flex-wrap: wrap; justify-content: flex-end; row-gap: 0; }
.account-nav a, .profile-settings-link, .exit-button { font-weight: 550; font-size: .9rem; }
.account-nav a { text-decoration: none; }
.profile-settings-link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 0; border: 0; background: transparent; color: var(--forest); }
.profile-settings-link .jr-icon { width: 17px; height: 17px; }
.account-nav a:hover, .profile-settings-link:hover, .back-link:hover, .inline-link:hover { text-decoration: underline; }
.exit-button { color: var(--muted); background: transparent; border: 0; padding: 10px 0; }
.auth-shell { display: grid; justify-items: center; margin: clamp(32px, 8vh, 85px) 18px; }
.account-card, .surface-panel { background: white; border: 1px solid var(--border); border-radius: 22px; padding: clamp(20px, 3.2vw, 36px); }
.account-card { width: min(100%, 460px); box-shadow: 0 16px 54px #233c2c0c; }
.account-card h1, .manage-shell h1 { font-size: clamp(1.9rem, 3.5vw, 2.75rem); line-height: 1.08; letter-spacing: -.045em; margin: 0 0 16px; }
.form-hint, .form-field small { color: var(--muted); line-height: 1.5; }
.stack-form, .stack-form fieldset { display: grid; gap: 16px; }
.form-field { display: grid; gap: 7px; color: var(--ink); font-size: .94rem; font-weight: 600; }
.form-field small { font-size: .81rem; font-weight: 400; }
.form-field > input { border: 1px solid #bdcbc0; border-radius: 10px; min-height: 44px; padding: 9px 12px; min-width: 0; width: 100%; color: var(--ink); background: #fcfdfb; }
.form-field > input:disabled { opacity: .8; }
.primary-button { background: var(--forest); border: 1px solid var(--forest); border-radius: 10px; color: white; min-height: 45px; font-size: .95rem; font-weight: 650; padding: 9px 18px; }
.primary-button:hover:not(:disabled) { background: #163d30; }
.primary-button:disabled { opacity: .6; }
.form-error, .success-note, .notice { padding: 13px 15px; border-radius: 10px; font-size: .94rem; line-height: 1.45; }
.form-error { background: #fff1ed; color: #842e20; }
.success-note { background: #ecf5e8; color: #245438; }
.manage-shell { width: min(960px, calc(100% - 40px)); margin: 32px auto 64px; }
.manage-shell h1 { margin: 16px 0 25px; }
.admin-shell { width: min(1120px, calc(100% - 48px)); }
.manage-grid { display: grid; align-items: start; gap: 20px; grid-template-columns: minmax(0, 2.2fr) minmax(255px, 1fr); }
.manage-grid > .surface-panel { min-width: 0; padding: clamp(16px, 2.3vw, 26px); }
.surface-panel h2 { margin: 0 0 22px; font-size: 1.35rem; letter-spacing: -.03em; overflow-wrap: anywhere; }
.back-link, .inline-link { font-size: .88rem; font-weight: 600; text-decoration: none; }
.count { font-size: .84rem; padding: 3px 8px; border-radius: 15px; background: #edf2e8; vertical-align: middle; }
.users-heading, .user-identity, .user-actions, .add-user, .table-action { display: flex; align-items: center; }
.users-heading { justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.users-heading h2 { margin: 0; }
.add-user { gap: 7px; min-height: 40px; padding: 7px 12px; font-size: .88rem; }
.add-user .jr-icon { width: 16px; height: 16px; }
.table-action .jr-icon { width: 18px; height: 18px; }
.users-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .92rem; }
.users-table th, .users-table td { text-align: start; padding: 12px 8px; overflow-wrap: anywhere; }
.users-table th:first-child { padding-left: 0; }
.users-table :is(td, th):last-child { padding-right: 0; }
.users-table thead th { padding-block: 9px; color: var(--muted); font-weight: 550; font-size: .8rem; }
.users-table tr { border-bottom: 1px solid #e1e7df; }
.users-table tbody tr:last-child { border-bottom: 0; }
.users-table thead th:last-child { width: 102px; }
.user-identity { gap: 9px; font-weight: 650; }
.user-actions { gap: 6px; flex-wrap: nowrap; }
.table-action, .secondary-button {
  border: 1px solid #cdd9ce; border-radius: 9px; background: white; color: var(--forest);
  font-weight: 600;
}
.table-action { justify-content: center; flex: none; width: 44px; height: 44px; padding: 0; }
.table-action:hover, .secondary-button:hover { background: #eff4ed; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.secondary-button { min-height: 44px; padding: 8px 15px; }
.form-dialog .form-error { margin: 0; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: var(--forest); background: #e4efd7; font-weight: 650; }
.settings-shell { max-width: 630px; }
.settings-panel fieldset { padding: 0; border: 0; margin: 0; min-width: 0; }
.settings-panel legend { padding: 0; font-size: 1.04rem; font-weight: 650; margin-bottom: 12px; }
.effective-date { max-width: 220px; }
.form-hint { font-size: .88rem; margin: 8px 0 22px; }
.time-pair { display: flex; flex-wrap: wrap; gap: 12px 20px; }
@media (max-width: 900px) { .manage-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .user-identity .avatar { display: none; }
  .users-table td, .users-table th { padding-inline: 5px; }
}
@media (max-width: 760px) {
  .masthead-inner:has(.jr-profiles) { flex-wrap: wrap; gap: 0 14px; padding-block: 8px; }
  .jr-profiles + .account-nav { flex: 0 0 100%; flex-wrap: wrap; justify-content: flex-start; }
  .jr-profiles + .account-nav > form { margin-left: auto; }
}
@media (max-width: 520px) {
  .masthead-inner { width: calc(100% - 32px); min-height: 58px; flex-wrap: wrap; gap: 0 16px; padding: 8px 0; }
  .account-nav { flex: 1 1 auto; flex-wrap: wrap; gap: 0 14px; justify-content: flex-end; }
  .account-nav a { padding-block: 9px; }
  .wordmark { font-size: 1.2rem; gap: 6px; }
  .wordmark img { width: 30px; height: 30px; }
  .manage-shell { width: calc(100% - 28px); }
}
@media (max-width: 450px) {
  .account-nav { flex-basis: 100%; justify-content: flex-start; }
  .account-nav > form { margin-left: auto; }
}
