:root {
  color-scheme: light;
  --auth-bg: #edf3f0;
  --auth-panel: #ffffff;
  --auth-ink: #17211d;
  --auth-muted: #65716c;
  --auth-line: rgba(39, 65, 55, .15);
  --auth-accent: #247d6e;
  --auth-accent-dark: #19695d;
  --auth-danger: #b94234;
  --auth-success: #19695d;
  --auth-radius: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body.auth-body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--auth-bg);
  background-image:
    radial-gradient(circle at 8% 0, rgba(36, 125, 110, .08), transparent 34%),
    radial-gradient(circle at 96% 0, rgba(182, 121, 36, .05), transparent 30%);
  background-repeat: no-repeat;
  background-size: 100% 320px;
  color: var(--auth-ink);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select { font: inherit; }

.auth-shell {
  width: min(1840px, calc(100% - 20px));
  margin: 0 auto;
  padding: 10px 0 16px;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  margin-bottom: 0;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  padding: 0 18px;
  background:
    radial-gradient(circle at 16% 0, rgba(68, 171, 149, .16), transparent 38%),
    linear-gradient(115deg, #14231e 0%, #1a2c26 58%, #17251f 100%);
  box-shadow: 0 14px 34px rgba(18, 38, 30, .16);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f8fbf9;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
}

.auth-brand img {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.auth-topbar-note {
  color: rgba(248, 251, 249, .62);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .015em;
}

.auth-nav { display: flex; align-items: center; gap: 10px; }
.auth-nav a, .auth-link-button {
  border: 0;
  background: transparent;
  color: #36506f;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.auth-main {
  display: grid;
  min-height: calc(100vh - 78px);
  place-items: center;
  padding: 34px 16px 56px;
}

.auth-card {
  position: relative;
  width: min(100%, 440px);
  overflow: hidden;
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 1px 2px rgba(18, 38, 30, .04), 0 20px 48px rgba(18, 38, 30, .11);
  padding: 30px 30px 28px 34px;
}

.auth-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #257a6d, #ba7b25 58%, #b94234);
  content: "";
}

.auth-card h1, .auth-page-heading h1 {
  margin: 0;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: clamp(27px, 4vw, 34px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.auth-card > p, .auth-page-heading p {
  margin: 9px 0 0;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.5;
}

body[data-auth-page="login"] {
  background-color: #edf3f0;
  background-image:
    radial-gradient(circle at 10% 8%, rgba(36, 125, 110, .11), transparent 28%),
    radial-gradient(circle at 92% 88%, rgba(217, 93, 69, .06), transparent 28%);
  background-size: auto;
}

.auth-login-shell {
  width: min(1180px, calc(100% - 48px));
  padding: 24px 0;
}

.auth-login-topbar {
  min-height: 48px;
  border: 0;
  border-radius: 0;
  padding: 0 4px;
  background: transparent;
  box-shadow: none;
}

.auth-login-topbar .auth-brand { color: #15362e; }
.auth-login-topbar .auth-brand img { width: 30px; height: 30px; }
.auth-login-topbar .auth-brand span { font-size: 20px; }
.auth-login-topbar .auth-topbar-note { color: #6a7772; }

.auth-login-main {
  min-height: calc(100vh - 96px);
  padding: 28px 0 48px;
}

.auth-login-layout {
  display: grid;
  width: min(100%, 960px);
  min-height: 570px;
  grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr);
  overflow: hidden;
  border: 1px solid rgba(29, 64, 53, .13);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 2px 3px rgba(18, 38, 30, .04), 0 28px 72px rgba(18, 38, 30, .13);
}

.auth-login-story {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 46px 44px 38px;
  background:
    radial-gradient(circle at 4% 8%, rgba(70, 181, 155, .24), transparent 34%),
    radial-gradient(circle at 94% 94%, rgba(217, 93, 69, .18), transparent 34%),
    linear-gradient(145deg, #173c33, #102920 72%);
  color: #f7fbf9;
}

.auth-login-story::after {
  position: absolute;
  right: -64px;
  bottom: -86px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255, 255, 255, .025), 0 0 0 78px rgba(255, 255, 255, .018);
  content: "";
}

.auth-story-mark {
  display: flex;
  height: 38px;
  align-items: flex-end;
  gap: 6px;
}
.auth-story-mark span {
  width: 7px;
  border-radius: 999px;
  background: #6fd4bd;
}
.auth-story-mark span:nth-child(1) { height: 15px; opacity: .55; }
.auth-story-mark span:nth-child(2) { height: 28px; }
.auth-story-mark span:nth-child(3) { height: 20px; background: #f27b64; }

.auth-login-story h1 {
  max-width: 9ch;
  margin: 0;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: clamp(36px, 4.2vw, 52px);
  line-height: .98;
  letter-spacing: -.055em;
}
.auth-login-story > div > p {
  max-width: 34ch;
  margin: 22px 0 0;
  color: rgba(247, 251, 249, .72);
  font-size: 15px;
  line-height: 1.65;
}
.auth-story-footnote {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(247, 251, 249, .58);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .025em;
}

.auth-login-card {
  display: flex;
  width: auto;
  flex-direction: column;
  justify-content: center;
  overflow: visible;
  border: 0;
  border-radius: 0;
  padding: 48px 58px;
  box-shadow: none;
}
.auth-login-card::before { display: none; }

.auth-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  border-radius: 12px;
  padding: 4px;
  background: #eef3f1;
}
.auth-mode-tab {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #69756f;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background 160ms ease, box-shadow 160ms ease, color 160ms ease;
}
.auth-mode-tab:hover { color: #1d4b40; }
.auth-mode-tab[aria-selected="true"] {
  background: #fff;
  color: #173c33;
  box-shadow: 0 1px 2px rgba(18, 38, 30, .08), 0 5px 14px rgba(18, 38, 30, .06);
}
.auth-mode-tab:focus-visible { outline: 3px solid rgba(36, 125, 110, .22); outline-offset: 1px; }
.auth-mode-tab[hidden] + .auth-mode-tab,
.auth-mode-tabs:has(.auth-mode-tab[hidden]) { grid-template-columns: 1fr; }

.auth-login-heading { margin-top: 34px; }
.auth-login-heading h1 {
  margin: 0;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1.05;
  letter-spacing: -.045em;
}
.auth-login-heading p {
  margin: 10px 0 0;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.55;
}

.auth-login-card .auth-form { gap: 18px; margin-top: 28px; }
.auth-login-card .auth-field { gap: 8px; }
.auth-login-card .auth-field label {
  color: #45534d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.auth-login-card .auth-field input {
  min-height: 50px;
  border-color: rgba(39, 65, 55, .16);
  border-radius: 11px;
  background: #f8faf9;
  padding: 12px 14px;
}
.auth-login-card .auth-field input::placeholder { color: #9aa49f; }
.auth-login-card .auth-field small {
  color: #7a8580;
  font-size: 11px;
  line-height: 1.35;
}
.auth-login-card .auth-primary {
  min-height: 50px;
  margin-top: 2px;
  border-radius: 11px;
  font-size: 14px;
}
.auth-login-card .auth-error,
.auth-login-card .auth-success { margin-top: 22px; }
.auth-form-note {
  margin: -6px 0 0;
  color: #77827d;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.auth-form { display: grid; gap: 16px; margin-top: 24px; }
.auth-field { display: grid; gap: 6px; }
.auth-field label {
  color: #56635d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.auth-field input, .auth-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(39, 65, 55, .17);
  border-radius: 10px;
  background: #f7faf8;
  color: var(--auth-ink);
  padding: 10px 12px;
  outline: none;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.auth-field input:hover, .auth-field select:hover {
  border-color: rgba(36, 125, 110, .28);
  background: #fff;
}
.auth-field input:focus, .auth-field select:focus {
  border-color: var(--auth-accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(36, 125, 110, .11);
}

.auth-primary, .auth-secondary, .auth-danger-button {
  min-height: 44px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 16px;
}
.auth-primary {
  border: 1px solid var(--auth-accent-dark);
  background: linear-gradient(180deg, #2b8878, #1f7063);
  color: #fff;
  box-shadow: 0 7px 16px rgba(36, 125, 110, .2);
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.auth-primary:hover {
  background: linear-gradient(180deg, #247d6e, #19695d);
  box-shadow: 0 9px 20px rgba(36, 125, 110, .25);
  transform: translateY(-1px);
}
.auth-primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}
.auth-secondary { border: 1px solid #c8d0dc; background: #fff; color: #263a55; }
.auth-danger-button { border: 1px solid #f0b8b3; background: #fff7f6; color: var(--auth-danger); }
button:disabled { cursor: wait; opacity: .62; }

.auth-plan-prompt { align-content: start; }
.auth-plan-prompt > strong { font-family: "Space Grotesk", sans-serif; font-size: 18px; }
.auth-plan-prompt > p { margin: -6px 0 2px; color: var(--auth-muted); font-size: 13px; line-height: 1.55; }

.auth-public-shell { width: min(1120px, calc(100% - 40px)); padding-top: 22px; }
.auth-public-main { min-height: calc(100vh - 96px); padding: 36px 16px 58px; }
.plan-shell { width: min(100%, 780px); }
.plan-heading { margin-bottom: 24px; text-align: center; }
.auth-step-label {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--auth-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.plan-heading h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(34px, 6vw, 52px);
  letter-spacing: -.05em;
  line-height: 1;
}
.plan-heading p { margin: 12px 0 0; color: var(--auth-muted); }
.plan-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 34px;
  border: 1px solid rgba(39, 65, 55, .15);
  border-radius: 22px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 24px 64px rgba(18, 38, 30, .12);
  padding: 36px;
}
.plan-badge {
  color: var(--auth-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.plan-price { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; }
.plan-price strong { font-family: "Space Grotesk", sans-serif; font-size: 45px; letter-spacing: -.05em; }
.plan-price span, .plan-trial, .plan-action p { color: var(--auth-muted); font-size: 13px; }
.plan-trial { margin: 8px 0 0; line-height: 1.5; }
.plan-features { display: grid; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.plan-features li { position: relative; padding-left: 24px; font-size: 14px; line-height: 1.45; }
.plan-features li::before { position: absolute; left: 0; color: var(--auth-accent); content: "✓"; font-weight: 800; }
.plan-action { display: flex; flex-direction: column; justify-content: center; border-left: 1px solid var(--auth-line); padding-left: 34px; }
.plan-action .auth-primary { min-height: 52px; }
.plan-action p { margin: 12px 6px 0; line-height: 1.45; text-align: center; }
.plan-signin { margin: 20px 0 0; color: var(--auth-muted); font-size: 13px; text-align: center; }
.plan-signin a { color: var(--auth-accent-dark); font-weight: 700; }
.plan-shell > .auth-error { margin-top: 18px; }
.complete-signup-card { width: min(100%, 520px); padding: 38px 38px 34px 42px; }
.complete-signup-card .auth-form { margin-top: 28px; }
.complete-signup-card input[readonly] { color: #4d5a55; background: #eef3f1; }

.auth-error, .auth-success {
  margin: 18px 0 0;
  border-radius: 9px;
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.45;
}
.auth-error { border: 1px solid rgba(185, 66, 52, .18); background: #fff0ed; color: var(--auth-danger); }
.auth-success { border: 1px solid rgba(36, 125, 110, .18); background: #e8f5f0; color: var(--auth-success); }

.auth-page { min-height: auto; place-items: initial; }
.auth-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.auth-page-heading h1 { font-size: 34px; }
.auth-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.auth-panel { border: 1px solid var(--auth-line); border-radius: 14px; background: #fff; overflow: hidden; }
.auth-panel-head { padding: 19px 20px; border-bottom: 1px solid var(--auth-line); }
.auth-panel-head h2 { margin: 0; font-size: 17px; }
.auth-panel-head p { margin: 5px 0 0; color: var(--auth-muted); font-size: 13px; }
.auth-panel-body { padding: 20px; }

.user-table { width: 100%; border-collapse: collapse; }
.user-table th { color: var(--auth-muted); font-size: 11px; letter-spacing: .055em; text-align: left; text-transform: uppercase; }
.user-table th, .user-table td { border-bottom: 1px solid #e8ecf2; padding: 13px 16px; }
.user-table tbody tr { cursor: pointer; }
.user-table tbody tr:hover, .user-table tbody tr.selected { background: #f4f7fb; }
.user-name { display: block; font-weight: 700; }
.user-email { color: var(--auth-muted); font-size: 12px; }
.role-label, .status-label {
  display: inline-flex;
  border-radius: 999px;
  background: #edf3fc;
  color: #2b5795;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  text-transform: capitalize;
}
.status-label.disabled { background: #fff1f0; color: var(--auth-danger); }

.detail-stack { display: grid; gap: 18px; }
.detail-list { display: grid; gap: 9px; margin: 0; }
.detail-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; font-size: 14px; }
.detail-row dt { color: var(--auth-muted); }
.detail-row dd { margin: 0; overflow-wrap: anywhere; }
.plain-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.plain-list li { border: 1px solid #e2e7ef; border-radius: 9px; padding: 10px 11px; }
.private-list-summary { display: grid; gap: 3px; }
.private-list-events { display: grid; gap: 6px; margin: 7px 0 0; padding: 0; list-style: none; }
.plain-list .private-list-events li {
  display: grid;
  gap: 2px;
  border: 0;
  border-top: 1px solid #edf0f5;
  border-radius: 0;
  padding: 7px 0 0;
  font-size: 13px;
}
.private-list-event small { color: var(--auth-muted); font-size: 11px; }
.muted { color: var(--auth-muted); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.invite-result { overflow-wrap: anywhere; }

.app-auth-view {
  display: grid;
  width: 100%;
  margin: 0;
  padding: 0 0 12px;
  color: var(--ink);
  gap: 12px;
}
.app-auth-view[hidden] { display: none; }

body:not(.gtd-sheet-body):has(.app-auth-view:not([hidden])) .app-topbar {
  margin-bottom: 14px;
  border-radius: 18px;
}

.app-auth-view .auth-page-heading {
  position: relative;
  align-items: center;
  min-height: 92px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 18px 15px 20px;
  background:
    linear-gradient(90deg, rgba(36, 125, 110, .12), transparent 44%),
    linear-gradient(180deg, #fffefa, #f4f7f3);
  box-shadow: var(--panel-shadow);
}
.app-auth-view .auth-page-heading::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, #257a6d, #ba7b25 55%, #b94234);
  content: "";
}
.app-auth-view .auth-page-heading h1 {
  color: var(--ink);
  font-family: "Space Grotesk", "IBM Plex Sans", system-ui, sans-serif;
  font-size: clamp(1.55rem, 2vw, 2.05rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
}
.app-auth-view .auth-page-heading p {
  max-width: 72ch;
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: .88rem;
  line-height: 1.45;
}
.app-auth-view #invitePanel { margin: 0; }

.app-auth-view .auth-panel {
  border-color: var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--panel-shadow);
}
.app-auth-view .auth-panel-head {
  padding: 14px 16px;
  border-bottom-color: var(--line);
  background: linear-gradient(180deg, #ffffff, #f4f7f5);
}
.app-auth-view .auth-panel-head h2 {
  color: var(--ink);
  font-family: "Space Grotesk", "IBM Plex Sans", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.app-auth-view .auth-panel-head p {
  color: var(--ink-soft);
  font-size: .76rem;
  line-height: 1.4;
}
.app-auth-view .auth-panel-body { padding: 14px; }

.app-auth-view .auth-field { gap: 5px; }
.app-auth-view .auth-field label,
.app-auth-view .auth-field > span {
  color: #64716b;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.app-auth-view .auth-field input,
.app-auth-view .auth-field select {
  min-height: 40px;
  border-color: rgba(39, 65, 55, .14);
  border-radius: 10px;
  background: #f7faf8;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.app-auth-view .auth-field input:hover,
.app-auth-view .auth-field select:hover { border-color: rgba(36, 125, 110, .24); background: #fff; }
.app-auth-view .auth-field input:focus,
.app-auth-view .auth-field select:focus {
  border-color: rgba(36, 125, 110, .48);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(36, 125, 110, .1);
}
.app-auth-view .auth-field input::placeholder { color: rgba(23, 33, 29, .4); }

.app-auth-view .auth-primary,
.app-auth-view .auth-secondary,
.app-auth-view .auth-danger-button {
  min-height: 38px;
  border-radius: 9px;
  padding: 8px 14px;
  font-size: .8rem;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(18, 38, 30, .05);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.app-auth-view .auth-primary {
  border-color: #19695d;
  background: linear-gradient(180deg, #2b8878, #1f7063);
  color: #fff;
  box-shadow: 0 7px 16px rgba(36, 125, 110, .2);
}
.app-auth-view .auth-primary:hover {
  border-color: #14584e;
  background: linear-gradient(180deg, #247d6e, #19695d);
  box-shadow: 0 9px 20px rgba(36, 125, 110, .25);
  transform: translateY(-1px);
}
.app-auth-view .auth-secondary {
  border-color: rgba(39, 65, 55, .16);
  background: linear-gradient(180deg, #fff, #f2f6f4);
  color: #34413b;
}
.app-auth-view .auth-secondary:hover {
  border-color: rgba(36, 125, 110, .3);
  background: #f7fbf9;
  color: var(--accent-deep);
  box-shadow: 0 5px 14px rgba(18, 38, 30, .08);
  transform: translateY(-1px);
}

.app-auth-view .auth-grid { gap: 14px; }
.app-auth-view .user-directory-head { gap: 13px; }
.app-auth-view .user-filter-bar {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  background: #f7f9f6;
}
.app-auth-view .user-table-wrap { background: #fff; scrollbar-color: rgba(36, 125, 110, .3) transparent; }
.app-auth-view .user-table thead { background: #f1f5f3; }
.app-auth-view .user-table th {
  color: #5a6761;
  font-family: "IBM Plex Mono", monospace;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.app-auth-view .user-table th,
.app-auth-view .user-table td { border-bottom-color: var(--line); }
.app-auth-view .user-table tbody tr:nth-child(even) { background: #fafcfb; }
.app-auth-view .user-table tbody tr:hover { background: #edf7f3; }
.app-auth-view .user-table tbody tr.selected {
  background: #e3f2ed;
  box-shadow: inset 4px 0 0 var(--accent);
}
.app-auth-view .user-name { color: var(--ink); }
.app-auth-view .user-email { color: var(--ink-soft); font-family: "IBM Plex Mono", monospace; font-size: .7rem; }
.app-auth-view .role-label,
.app-auth-view .status-label {
  border: 1px solid rgba(36, 125, 110, .18);
  border-radius: 999px;
  background: #e5f3ee;
  color: var(--accent-deep);
  font-family: "IBM Plex Mono", monospace;
  font-size: .67rem;
  letter-spacing: .015em;
  padding: 4px 8px;
}
.app-auth-view .status-label.disabled {
  border-color: rgba(185, 66, 52, .2);
  background: #fff0ed;
  color: #a5372c;
}
.app-auth-view .user-empty-state { color: var(--ink-soft); }
.app-auth-view .user-detail-panel { border-top: 3px solid rgba(36, 125, 110, .72); }

.app-auth-view .detail-list { gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.app-auth-view .detail-row {
  min-height: 42px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 9px 11px;
  background: #fff;
  font-size: .8rem;
}
.app-auth-view .detail-row:nth-child(even) { background: #fafcfb; }
.app-auth-view .detail-row:last-child { border-bottom: 0; }
.app-auth-view .detail-row dt {
  color: #64716b;
  font-family: "IBM Plex Mono", monospace;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.app-auth-view .detail-row dd { color: var(--ink); font-weight: 650; }
.app-auth-view .plain-list li {
  border-color: var(--line);
  border-radius: 9px;
  background: #f8faf9;
}
.app-auth-view .plain-list .private-list-events li { border-top-color: var(--line); background: transparent; }
.app-auth-view .private-list-event small,
.app-auth-view .muted { color: var(--ink-soft); }

.app-auth-view .auth-error,
.app-auth-view .auth-success { margin: 0; border: 1px solid transparent; }
.app-auth-view .auth-error { border-color: rgba(185, 66, 52, .18); background: #fff0ed; color: #a5372c; }
.app-auth-view .auth-success { border-color: rgba(36, 125, 110, .18); background: #e8f5f0; color: #19695d; }
.auth-form-inline {
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) 170px auto;
  align-items: end;
}
.auth-form-inline .button-row { flex-wrap: nowrap; }
.auth-grid-users { grid-template-columns: minmax(0, 1.5fr) minmax(360px, .75fr); }
.user-directory-head { display: grid; gap: 17px; }
.user-filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 150px;
  gap: 10px;
  align-items: end;
}
.user-filter-bar .auth-field { gap: 5px; }
.user-filter-bar .auth-field span { color: var(--auth-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.user-filter-bar .auth-field input,
.user-filter-bar .auth-field select { min-height: 40px; }
.user-table-wrap { max-height: min(68vh, 760px); overflow: auto; }
.user-table thead { position: sticky; top: 0; z-index: 1; }
.user-empty-state { color: var(--auth-muted); text-align: center; padding: 28px !important; }
.user-detail-panel { position: sticky; top: 12px; max-height: calc(100vh - 36px); overflow: auto; }
.account-panel { width: 100%; }
.app-auth-view .account-panel .auth-panel-body { padding: 14px; }
.app-auth-view .account-panel .detail-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.app-auth-view .account-panel .detail-row {
  display: grid;
  min-height: 64px;
  align-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px;
  background: linear-gradient(180deg, #fff, #f7faf8);
  box-shadow: 0 8px 18px rgba(18, 38, 30, .045);
}
.app-auth-view .account-panel .detail-row dd { font-size: .95rem; overflow-wrap: anywhere; }
.app-auth-view .billing-panel { margin-top: 14px; }
.app-auth-view .billing-panel-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.app-auth-view .billing-summary {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 11px;
}
.app-auth-view .billing-summary strong {
  display: block;
  color: var(--ink);
  font-size: .9rem;
}
.app-auth-view .billing-summary p { margin: 4px 0 0; font-size: .76rem; line-height: 1.45; }
.app-auth-view .billing-status-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #9aa59f;
  box-shadow: 0 0 0 1px rgba(39, 65, 55, .16);
}
.app-auth-view .billing-summary.is-active .billing-status-dot {
  background: #2b8878;
  box-shadow: 0 0 0 1px rgba(36, 125, 110, .32), 0 0 0 5px rgba(36, 125, 110, .08);
}
.app-auth-view .billing-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; }
.app-auth-view .billing-actions button[hidden] { display: none; }
.app-auth-view .billing-actions button[aria-busy="true"] { cursor: wait; opacity: .68; }

@media (max-width: 820px) {
  .auth-public-shell { width: min(100% - 28px, 680px); }
  .plan-card { grid-template-columns: 1fr; gap: 28px; padding: 30px; }
  .plan-action { border-top: 1px solid var(--auth-line); border-left: 0; padding-top: 28px; padding-left: 0; }
  .auth-shell { width: min(100% - 22px, 680px); padding-top: 16px; }
  .auth-topbar { margin-bottom: 0; }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-page-heading { align-items: start; flex-direction: column; }
  .user-table th:nth-child(3), .user-table td:nth-child(3) { display: none; }
  .app-auth-view { padding-bottom: 12px; }
  .app-auth-view .auth-page-heading { align-items: flex-start; min-height: 0; padding: 17px 16px 17px 20px; }
  .auth-form-inline { grid-template-columns: 1fr; }
  .user-filter-bar { grid-template-columns: 1fr 1fr; }
  .user-search-field { grid-column: 1 / -1; }
  .user-detail-panel { position: static; max-height: none; }
  .app-auth-view .account-panel .detail-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-auth-view .billing-panel-body { align-items: stretch; flex-direction: column; }
  .app-auth-view .billing-actions { justify-content: flex-start; }
  .auth-login-shell { width: min(100% - 32px, 680px); padding-top: 18px; }
  .auth-login-main { min-height: calc(100vh - 82px); padding: 18px 0 40px; }
  .auth-login-layout { min-height: 0; grid-template-columns: 1fr; }
  .auth-login-story { min-height: 210px; padding: 30px 32px 28px; }
  .auth-login-story h1 { max-width: 12ch; font-size: 38px; }
  .auth-login-story > div > p { max-width: 48ch; margin-top: 14px; }
  .auth-story-footnote { display: none; }
  .auth-login-card { padding: 38px 42px 44px; }
}

@media (max-width: 520px) {
  .auth-public-shell { width: 100%; padding: 0; }
  .auth-public-main { min-height: calc(100vh - 60px); padding: 28px 14px 36px; }
  .plan-heading { margin-bottom: 20px; }
  .plan-heading h1 { font-size: 36px; }
  .plan-card { border-radius: 18px; padding: 24px 20px; }
  .plan-price strong { font-size: 40px; }
  .complete-signup-card { padding: 30px 24px 28px 28px; }
  .auth-shell { width: 100%; padding: 0; }
  .auth-topbar {
    min-height: 52px;
    border-width: 0 0 1px;
    border-radius: 0;
    padding: 0 16px;
  }
  .auth-main { min-height: calc(100vh - 52px); padding: 28px 14px 44px; place-items: start center; }
  .auth-card { padding: 26px 21px 24px 25px; }
  .auth-nav { gap: 6px; }
  .detail-row { grid-template-columns: 1fr; gap: 2px; }
  .user-table th, .user-table td { padding: 11px 10px; }
  .app-auth-view .account-panel .detail-list { grid-template-columns: 1fr; }
  .app-auth-view .account-panel .detail-row { min-height: 64px; }
  .auth-login-shell { width: 100%; padding: 0; }
  .auth-login-topbar {
    min-height: 60px;
    border-bottom: 1px solid rgba(39, 65, 55, .1);
    padding: 0 18px;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(12px);
  }
  .auth-login-topbar .auth-topbar-note { display: none; }
  .auth-login-main { min-height: calc(100vh - 60px); padding: 16px 14px 28px; }
  .auth-login-layout { border-radius: 18px; }
  .auth-login-story { min-height: 170px; padding: 26px 24px; }
  .auth-story-mark { height: 24px; }
  .auth-story-mark span:nth-child(1) { height: 10px; }
  .auth-story-mark span:nth-child(2) { height: 20px; }
  .auth-story-mark span:nth-child(3) { height: 14px; }
  .auth-login-story h1 { max-width: 13ch; font-size: 31px; }
  .auth-login-story > div > p { margin-top: 10px; font-size: 13px; line-height: 1.5; }
  .auth-login-card { padding: 28px 22px 32px; }
  .auth-login-heading { margin-top: 26px; }
  .auth-login-heading h1 { font-size: 30px; }
  .auth-login-card .auth-form { margin-top: 24px; }
}
