:root {
  --ink: #1d2421;
  --muted: #69736e;
  --line: #d9dfdc;
  --surface: #fff;
  --canvas: #f3f6f4;
  --green: #23856d;
  --blue: #3578a8;
  --red: #b93636;
  --shadow: 0 14px 40px rgba(20, 27, 24, .13);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: 0; }
button, input, select { font: inherit; letter-spacing: 0; }
button, summary { cursor: pointer; }

.auth-page { display: grid; min-height: 100vh; min-height: 100svh; place-items: center; padding: 28px; background: #e9eeeb; }
.auth-shell { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(360px, 1fr); width: min(920px, 100%); min-height: 520px; overflow: hidden; border: 1px solid #cfd7d3; border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); }
.auth-brand { display: flex; min-width: 0; flex-direction: column; justify-content: space-between; padding: 44px; color: #fff; background: var(--ink); border-bottom: 5px solid var(--green); }
.auth-brand img { display: block; width: min(250px, 100%); height: auto; padding: 8px 10px; background: #fff; object-fit: contain; }
.auth-brand span, .auth-eyebrow, .section-title span, .account-heading > span { color: #9eb0a7; font-size: 10px; font-weight: 800; }
.auth-brand h1 { margin: 8px 0 0; font-size: 48px; line-height: 1; }
.auth-panel { align-self: center; padding: 48px 54px; }
.auth-eyebrow { color: var(--green); }
.auth-panel h2 { margin: 7px 0 24px; font-size: 25px; }
.auth-form { display: grid; gap: 16px; }
.auth-form label, .account-form label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.auth-form input, .account-form input, .account-form select, .reset-details input { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #c6cfca; border-radius: 4px; color: var(--ink); background: #fff; outline: 0; font-size: 13px; }
.auth-form input:focus, .account-form input:focus, .account-form select:focus, .reset-details input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(35, 133, 109, .12); }
.auth-form small { color: #87918c; font-size: 9px; font-weight: 500; }
.auth-submit, .account-form > button, .reset-details button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; gap: 8px; padding: 0 14px; border: 1px solid var(--green); border-radius: 4px; color: #fff; background: var(--green); font-size: 12px; font-weight: 800; }
.auth-submit:hover, .account-form > button:hover, .reset-details button:hover { background: #196d58; }
.auth-submit svg, .account-form button svg { width: 16px; height: 16px; }
.auth-message { margin: 0 0 18px; padding: 11px 12px; border-left: 3px solid var(--red); color: #852d2d; background: #f9e8e6; font-size: 11px; line-height: 1.45; }
.auth-message.success { border-color: var(--green); color: #17634f; background: #e2f1ea; }

.account-topbar { display: flex; align-items: center; justify-content: space-between; min-height: 66px; padding: 10px 22px; border-bottom: 3px solid var(--green); color: #fff; background: var(--ink); }
.account-brand img { display: block; width: min(190px, 42vw); height: auto; max-height: 43px; padding: 4px 6px; background: #fff; object-fit: contain; }
.back-command { display: inline-flex; align-items: center; gap: 7px; color: #fff; text-decoration: none; font-size: 11px; font-weight: 800; }
.back-command svg { width: 17px; height: 17px; }
.account-main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 64px; }
.account-heading { padding: 0 0 26px; border-bottom: 1px solid var(--line); }
.account-heading > span, .section-title span { color: var(--green); }
.account-heading h1 { margin: 5px 0 4px; font-size: 28px; }
.account-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.account-main > .auth-message { margin-top: 22px; }
.account-section { padding: 28px 0 32px; border-bottom: 1px solid var(--line); }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-title h2 { margin: 5px 0 0; font-size: 18px; }
.section-title > strong { min-width: 30px; text-align: right; font-size: 20px; }
.account-form { display: grid; align-items: end; gap: 12px; }
.password-form { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
.create-form { grid-template-columns: 1fr 1.2fr .7fr 1fr 1fr auto; }
.account-form > button { min-width: 152px; }
.user-list { border-top: 1px solid var(--line); }
.user-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; min-height: 78px; gap: 18px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.user-identity { display: grid; min-width: 0; gap: 3px; }
.user-identity strong, .user-identity span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-identity strong { font-size: 12px; }
.user-identity span { color: var(--muted); font-size: 10px; }
.user-identity small { color: #87918c; font-size: 9px; }
.user-state { min-width: 60px; padding: 5px 7px; border-radius: 3px; text-align: center; font-size: 8px; font-weight: 900; }
.user-state.active { color: #17634f; background: #dcefe8; }
.user-state.inactive { color: #7a4b21; background: #f5e5d5; }
.user-actions { display: flex; align-items: center; gap: 5px; }
.icon-action, .reset-details summary { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid #c7d0cb; border-radius: 4px; color: var(--muted); background: #fff; list-style: none; }
.icon-action:hover, .reset-details summary:hover { color: var(--green); border-color: var(--green); }
.icon-action svg, .reset-details summary svg { width: 15px; height: 15px; }
.reset-details { position: relative; }
.reset-details summary::-webkit-details-marker { display: none; }
.reset-details form { position: absolute; z-index: 10; top: 39px; right: 0; display: grid; width: min(300px, calc(100vw - 42px)); gap: 9px; padding: 14px; border: 1px solid #bdc8c2; border-radius: 4px; background: #fff; box-shadow: var(--shadow); }
.reset-details form strong { font-size: 11px; }
.reset-details input { min-height: 36px; font-size: 11px; }
.reset-details button { min-height: 35px; font-size: 10px; }

@media (max-width: 960px) {
  .password-form, .create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-form > button { justify-self: start; }
}

@media (max-width: 700px) {
  .auth-page { padding: 0; background: #fff; }
  .auth-shell { display: block; min-height: 100vh; min-height: 100svh; border: 0; border-radius: 0; box-shadow: none; }
  .auth-brand { min-height: 210px; padding: 28px; }
  .auth-brand h1 { font-size: 36px; }
  .auth-panel { padding: 34px 28px 44px; }
  .account-main { width: min(100% - 26px, 1120px); padding-top: 25px; }
  .password-form, .create-form { grid-template-columns: 1fr; }
  .user-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .user-actions { grid-column: 1 / -1; }
  .user-state { align-self: start; }
  .reset-details form { right: auto; left: 0; }
}
