:root,
[data-theme="light"] {
  color-scheme: light;
  --ink: #0b1f2a;
  --ink-soft: #4a6573;
  --foam: #eef4f6;
  --mist: #d7e8ec;
  --sea: #0e7c86;
  --sea-deep: #09565e;
  --sea-soft: rgba(14, 124, 134, 0.12);
  --signal: #e8a317;
  --signal-ink: #3d2a00;
  --signal-soft: rgba(232, 163, 23, 0.16);
  --danger: #c0392b;
  --danger-soft: rgba(176, 48, 48, 0.1);
  --success: #145c3c;
  --success-soft: rgba(31, 138, 91, 0.12);
  --radius: 14px;
  --shadow: 0 18px 50px rgba(11, 31, 42, 0.12);
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
  --max: 1120px;

  --surface: #ffffff;
  --surface-2: #f7fbfc;
  --surface-3: rgba(11, 31, 42, 0.04);
  --border: rgba(11, 31, 42, 0.08);
  --border-strong: rgba(11, 31, 42, 0.14);
  --topbar-bg: rgba(255, 255, 255, 0.86);
  --workspace-bg:
    radial-gradient(ellipse 70% 40% at 100% 0%, rgba(14, 124, 134, 0.08), transparent 55%),
    radial-gradient(ellipse 50% 35% at 0% 100%, rgba(232, 163, 23, 0.06), transparent 50%),
    linear-gradient(180deg, #f4f9fa 0%, #eef4f6 100%);
  --hero-bg:
    linear-gradient(135deg, rgba(14, 124, 134, 0.1), transparent 48%),
    linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%);
  --sidebar-bg:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(14, 124, 134, 0.22), transparent 55%),
    linear-gradient(180deg, #122029 0%, #0b1a22 100%);
  --sidebar-text: #e8f2f4;
  --sidebar-muted: rgba(232, 242, 244, 0.45);
  --sidebar-link: rgba(232, 242, 244, 0.78);
  --input-bg: #ffffff;
  --input-border: rgba(11, 31, 42, 0.14);
  --chip-sea-bg: rgba(14, 124, 134, 0.14);
  --chip-sea-fg: #0b6670;
  --chip-signal-bg: rgba(232, 163, 23, 0.18);
  --chip-signal-fg: #8a5a00;
  --menu-shadow: 0 18px 40px rgba(11, 31, 42, 0.14);
  --scrim: rgba(8, 16, 22, 0.55);
  --notice-info-bg: rgba(232, 163, 23, 0.14);
  --notice-info-border: rgba(232, 163, 23, 0.35);
  --notice-info-fg: #5c3d00;
  --notice-success-bg: rgba(31, 138, 91, 0.12);
  --notice-success-border: rgba(31, 138, 91, 0.28);
  --notice-success-fg: #145c3c;
  --notice-error-bg: rgba(176, 48, 48, 0.1);
  --notice-error-border: rgba(176, 48, 48, 0.28);
  --notice-error-fg: #8a1f1f;
}

[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8eef2;
  --ink-soft: #9bb0bb;
  --foam: #0b1217;
  --mist: #1a2830;
  --sea: #3db8c2;
  --sea-deep: #7ad4db;
  --sea-soft: rgba(61, 184, 194, 0.16);
  --signal: #f0b93a;
  --signal-ink: #2a1f05;
  --signal-soft: rgba(240, 185, 58, 0.16);
  --danger: #ef6b5e;
  --danger-soft: rgba(239, 107, 94, 0.14);
  --success: #6dcea0;
  --success-soft: rgba(109, 206, 160, 0.14);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);

  --surface: #141c22;
  --surface-2: #1a242c;
  --surface-3: rgba(255, 255, 255, 0.04);
  --border: rgba(232, 238, 242, 0.1);
  --border-strong: rgba(232, 238, 242, 0.16);
  --topbar-bg: rgba(16, 24, 30, 0.9);
  --workspace-bg:
    radial-gradient(ellipse 70% 40% at 100% 0%, rgba(61, 184, 194, 0.1), transparent 55%),
    radial-gradient(ellipse 50% 35% at 0% 100%, rgba(240, 185, 58, 0.06), transparent 50%),
    linear-gradient(180deg, #0d1419 0%, #0b1217 100%);
  --hero-bg:
    linear-gradient(135deg, rgba(61, 184, 194, 0.12), transparent 48%),
    linear-gradient(180deg, #172027 0%, #141c22 100%);
  --sidebar-bg:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(61, 184, 194, 0.2), transparent 55%),
    linear-gradient(180deg, #101920 0%, #0a1015 100%);
  --sidebar-text: #e8f2f4;
  --sidebar-muted: rgba(232, 242, 244, 0.48);
  --sidebar-link: rgba(232, 242, 244, 0.78);
  --input-bg: #10181e;
  --input-border: rgba(232, 238, 242, 0.14);
  --chip-sea-bg: rgba(61, 184, 194, 0.16);
  --chip-sea-fg: #9ee7ef;
  --chip-signal-bg: rgba(240, 185, 58, 0.16);
  --chip-signal-fg: #f6d58a;
  --menu-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --scrim: rgba(0, 0, 0, 0.62);
  --notice-info-bg: rgba(240, 185, 58, 0.12);
  --notice-info-border: rgba(240, 185, 58, 0.28);
  --notice-info-fg: #f6d58a;
  --notice-success-bg: rgba(109, 206, 160, 0.12);
  --notice-success-border: rgba(109, 206, 160, 0.28);
  --notice-success-fg: #9ee0be;
  --notice-error-bg: rgba(239, 107, 94, 0.12);
  --notice-error-border: rgba(239, 107, 94, 0.28);
  --notice-error-fg: #f3a49c;
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--foam);
  line-height: 1.55;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 1.25rem 0;
  pointer-events: none;
}

.site-header a,
.site-header .btn,
.site-header button {
  pointer-events: auto;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand span {
  color: var(--sea);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border-strong);
}

.btn-ghost:hover {
  background: var(--surface-3);
}

.btn-primary {
  background: var(--sea);
  color: #fff;
  box-shadow: 0 10px 24px rgba(14, 124, 134, 0.28);
}

.btn-primary:hover {
  background: var(--sea-deep);
}

.btn-signal {
  background: var(--signal);
  color: var(--signal-ink);
  box-shadow: 0 10px 24px rgba(232, 163, 23, 0.28);
}

.btn-signal:hover {
  filter: brightness(1.05);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 10px 24px rgba(192, 57, 43, 0.28);
}

.btn-danger:hover {
  filter: brightness(1.05);
}

.btn-block {
  width: 100%;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 85% 15%, rgba(14, 124, 134, 0.22), transparent 55%),
    radial-gradient(ellipse 55% 45% at 10% 80%, rgba(232, 163, 23, 0.16), transparent 50%),
    linear-gradient(160deg, #eef6f7 0%, #dceef1 42%, #c5e0e6 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(11, 31, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 31, 42, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  pointer-events: none;
  animation: gridDrift 28s linear infinite;
}

.hero-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orbit {
  position: absolute;
  right: -8%;
  top: 12%;
  width: min(58vw, 640px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(14, 124, 134, 0.25);
  animation: spin 48s linear infinite;
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--sea);
}

.orbit::before {
  width: 14px;
  height: 14px;
  top: 12%;
  left: 18%;
  box-shadow: 0 0 0 8px rgba(14, 124, 134, 0.12);
}

.orbit::after {
  width: 10px;
  height: 10px;
  bottom: 22%;
  right: 16%;
  background: var(--signal);
  box-shadow: 0 0 0 8px rgba(232, 163, 23, 0.14);
}

.hero-inner {
  position: relative;
  z-index: 30;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 7.5rem 0 4.5rem;
  pointer-events: auto;
}

.hero-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 9vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 0 0 1.1rem;
  max-width: 12ch;
  animation: rise 0.8s ease both;
}

.hero-brand-link {
  position: relative;
  z-index: 5;
  color: inherit;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-brand-link:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

.hero-brand-link:focus-visible {
  outline: 3px solid rgba(14, 124, 134, 0.45);
  outline-offset: 6px;
  border-radius: 8px;
}

.hero-brand em {
  font-style: normal;
  color: var(--sea);
}

.hero-copy {
  max-width: 34rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--ink-soft);
  margin: 0 0 1.75rem;
  animation: rise 0.8s ease 0.12s both;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.8s ease 0.24s both;
}

.auth-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse 70% 50% at 20% 10%, rgba(14, 124, 134, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 90%, rgba(232, 163, 23, 0.14), transparent 50%),
    linear-gradient(160deg, #eef6f7, #d7e8ec);
}

.auth-panel {
  width: min(100%, 440px);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(11, 31, 42, 0.08);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  animation: rise 0.55s ease both;
}

.auth-panel h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2rem);
  margin: 0.35rem 0 0.35rem;
  letter-spacing: -0.02em;
}

.auth-panel .lede {
  margin: 0 0 1.4rem;
  color: var(--ink-soft);
}

.auth-brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--sea);
}

.auth-role {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.65rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(14, 124, 134, 0.12);
  color: var(--sea-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Employee / staff auth — distinct from owner card auth */
.staff-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.15fr);
  background: #f4f0e8;
}

.staff-rail {
  position: relative;
  color: #f4f0e8;
  background:
    linear-gradient(165deg, rgba(232, 163, 23, 0.18), transparent 42%),
    linear-gradient(200deg, #142028 0%, #0b1f2a 55%, #163039 100%);
  overflow: hidden;
}

.staff-rail::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244, 240, 232, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 240, 232, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, black, transparent 85%);
  pointer-events: none;
}

.staff-rail-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  min-height: 100%;
  padding: clamp(1.5rem, 4vw, 3rem);
  animation: rise 0.6s ease both;
}

.staff-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
}

.staff-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.staff-logo span {
  color: var(--signal);
}

.staff-rail-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0.35rem 0 0;
  max-width: 12ch;
}

.staff-rail-copy {
  margin: 0;
  max-width: 28ch;
  color: rgba(244, 240, 232, 0.78);
  font-size: 1rem;
}

.staff-points {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.staff-points li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(244, 240, 232, 0.88);
}

.staff-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 1px;
  background: var(--signal);
}

.staff-shell .staff-main {
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background:
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(232, 163, 23, 0.16), transparent 55%),
    linear-gradient(180deg, #f7f3eb 0%, #ebe4d6 100%);
}

.staff-card {
  width: min(100%, 460px);
  background: #fffdf8;
  border: 1px solid rgba(20, 32, 40, 0.1);
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(20, 32, 40, 0.1);
  padding: 1.75rem 1.4rem;
  animation: rise 0.55s ease 0.08s both;
}

.staff-card-wide {
  width: min(100%, 520px);
}

.staff-badge {
  display: inline-flex;
  margin-bottom: 0.7rem;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  background: #142028;
  color: var(--signal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.staff-card h1 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.5vw, 2rem);
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
  color: #142028;
}

.staff-card .lede {
  margin: 0 0 1.35rem;
  color: #4a5560;
}

.staff-card .form-control {
  border-radius: 6px;
  border-color: rgba(20, 32, 40, 0.16);
  background: #fff;
}

.staff-card .form-control:focus {
  border-color: #c48a12;
  box-shadow: 0 0 0 4px rgba(232, 163, 23, 0.18);
}

.btn-staff {
  background: #142028;
  color: #fffdf8;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(20, 32, 40, 0.22);
}

.btn-staff:hover {
  background: #1d303b;
  filter: none;
}

.staff-footer {
  color: #4a5560;
}

.staff-footer a {
  color: #8a5a00;
}

.join-code-input {
  letter-spacing: 0.35em;
  font-weight: 800;
  font-size: 1.15rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.code-status {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.code-status.is-ok {
  color: #1f8a5b;
}

.code-status.is-bad {
  color: var(--danger);
}

.code-status.is-pending {
  color: #8a5a00;
}

.join-code-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: #142028;
  color: #f4f0e8;
}

.join-code-banner .label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
}

.join-code-value {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.28em;
  font-variant-numeric: tabular-nums;
  user-select: all;
}

.join-code-banner p {
  margin: 0;
  max-width: 28rem;
  color: rgba(244, 240, 232, 0.78);
  font-size: 0.92rem;
}

.join-code-actions {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

.notice {
  border-radius: 6px;
  padding: 0.9rem 1rem;
  margin-bottom: 1.15rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
}

.notice-info {
  background: var(--notice-info-bg);
  border: 1px solid var(--notice-info-border);
  color: var(--notice-info-fg);
}

.notice-success {
  background: var(--notice-success-bg);
  border: 1px solid var(--notice-success-border);
  color: var(--notice-success-fg);
}

.notice-error {
  background: var(--notice-error-bg);
  border: 1px solid var(--notice-error-border);
  color: var(--notice-error-fg);
}

.pending-meta {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.35rem;
  padding: 1rem;
  border: 1px solid rgba(20, 32, 40, 0.1);
  border-radius: 6px;
  background: #f7f3eb;
}

.pending-meta .meta-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.2rem;
}

.pending-meta .meta-value {
  font-weight: 700;
  color: #142028;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.module-card {
  display: grid;
  gap: 0.45rem;
  padding: 1.2rem 1.15rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(11, 31, 42, 0.08);
  box-shadow: 0 8px 24px rgba(11, 31, 42, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

a.module-card:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 124, 134, 0.35);
}

.module-card h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0;
  letter-spacing: -0.02em;
}

.module-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.module-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sea);
}

.module-card.is-soon .module-kicker {
  color: #8a5a00;
}

.module-cta {
  margin-top: 0.35rem;
  font-weight: 800;
  color: var(--sea-deep);
}

.module-card.is-soon {
  opacity: 0.72;
}

.module-card.is-soon .module-cta {
  color: #8a5a00;
}

.staff-module-grid {
  margin-top: 0.25rem;
}

[data-theme="dark"] .module-card {
  background: var(--surface);
  border-color: var(--border);
}

[data-theme="dark"] a.module-card:hover {
  border-color: rgba(61, 184, 194, 0.4);
}

[data-theme="dark"] .module-card h2 {
  color: var(--ink);
}

.module-banner .module-kicker {
  display: inline-block;
  margin-bottom: 0.35rem;
}

.staff-workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  background: var(--workspace-bg);
}

.staff-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.35rem;
  border-bottom: 1px solid var(--border);
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.staff-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.staff-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}

.staff-topbar-kicker {
  margin: 0 0 0.1rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sea);
}

.staff-topbar-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  border-color: rgba(14, 124, 134, 0.4);
  box-shadow: 0 0 0 4px var(--sea-soft);
}

.theme-toggle:active {
  transform: scale(0.96);
}

.theme-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

.staff-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0.55rem;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.staff-nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

.staff-nav-close {
  display: none;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.staff-nav-scrim {
  display: none;
}

.staff-app .staff-main {
  flex: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  display: block;
  place-items: unset;
  padding: 0.75rem 1rem 1.1rem;
  background: transparent;
}

.staff-app .main.staff-main {
  padding: 0.75rem 1rem 1.1rem;
}

.staff-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 0 0 0.85rem;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: none;
}

[data-theme="dark"] .staff-hero {
  box-shadow: none;
}

.staff-hero-compact {
  align-items: center;
}

.staff-hero-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sea);
}

.staff-hero-copy h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.staff-hero-copy p {
  margin: 0;
  max-width: 48ch;
  color: var(--ink-soft);
  font-weight: 600;
}

.staff-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.staff-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.staff-pill-sea {
  background: var(--chip-sea-bg);
  color: var(--chip-sea-fg);
}

.staff-pill-signal {
  background: var(--chip-signal-bg);
  color: var(--chip-signal-fg);
}

.staff-panel {
  animation: staffFadeUp 0.5s ease 0.06s both;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-head h2 {
  margin: 0;
}

.panel-sub {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.role-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.role-highlight-card {
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.role-highlight-card:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 124, 134, 0.28);
  box-shadow: var(--menu-shadow);
}

.role-highlight-index {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--sea);
}

.role-highlight-card p {
  margin: 0;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.profile-section {
  margin-bottom: 1.35rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.profile-section:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

@keyframes staffFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.account-menu {
  position: relative;
  flex: 0 0 auto;
}

.account-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: min(280px, 70vw);
  margin: 0;
  padding: 0.35rem 0.55rem 0.35rem 0.35rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.account-menu-trigger:hover,
.account-menu.is-open .account-menu-trigger {
  border-color: rgba(14, 124, 134, 0.4);
  box-shadow: 0 0 0 4px var(--sea-soft);
}

.account-menu-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
}

.account-menu-avatar-fallback {
  display: inline-grid;
  place-items: center;
  background: #142028;
  color: #9ee7ef;
  font-size: 0.78rem;
  font-weight: 800;
}

.account-menu-copy {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
  text-align: left;
}

.account-menu-name {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-meta {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-caret {
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 0.2rem;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg) translate(-1px, -1px);
  flex: 0 0 auto;
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(300px, calc(100vw - 1.5rem));
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--menu-shadow);
  z-index: 30;
  animation: staffFadeUp 0.2s ease;
}

.account-menu-panel[hidden] {
  display: none !important;
}

.account-menu-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.account-menu-head .account-menu-avatar {
  width: 2.4rem;
  height: 2.4rem;
}

.account-menu-head strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.2;
}

.account-menu-head p {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.account-menu-roles {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.account-menu-session {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  background: var(--surface-3);
}

.account-session-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.74rem;
}

.account-session-row span {
  color: var(--ink-soft);
  flex: 0 0 auto;
}

.account-session-row strong {
  text-align: right;
  font-weight: 700;
  line-height: 1.3;
  word-break: break-word;
}

.role-identity-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.role-chip {
  display: inline-flex;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
  margin: 0;
  padding: 0.22rem 0.5rem;
  border-radius: 4px;
  background: var(--chip-signal-bg);
  color: var(--chip-signal-fg);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-chip-login {
  background: var(--chip-sea-bg);
  color: var(--chip-sea-fg);
}

.role-chip-view {
  background: var(--chip-signal-bg);
  color: var(--chip-signal-fg);
}

.role-view-hint {
  flex: 0 0 4.2rem;
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.2;
  color: var(--ink-soft);
}

.account-menu-action {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(232, 163, 23, 0.4);
  border-radius: 10px;
  background: rgba(232, 163, 23, 0.12);
  color: #8a5a00;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.account-menu-action:hover {
  background: rgba(232, 163, 23, 0.2);
}

.account-menu-links {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.15rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.account-menu-links a,
.account-menu-link-btn,
.account-menu-logout button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.6rem 0.75rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-menu-links a:hover,
.account-menu-link-btn:hover,
.account-menu-logout button:hover,
.account-menu-links a.is-active {
  background: var(--sea-soft);
  color: var(--sea-deep);
}

.account-menu-logout button {
  color: var(--notice-error-fg);
}

.account-menu-logout button:hover {
  background: var(--danger-soft);
  color: var(--notice-error-fg);
}

.profile-panel {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .profile-panel {
  box-shadow: none;
  background: transparent;
}

.staff-app .panel.staff-panel {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .staff-app .panel.staff-panel {
  box-shadow: none;
  background: transparent;
}

.profile-photo-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.profile-photo-preview {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 3px solid rgba(14, 124, 134, 0.18);
}

.profile-photo-fallback {
  display: inline-grid;
  place-items: center;
  background: #142028;
  color: #9ee7ef;
  font-size: 1.2rem;
  font-weight: 800;
}

.profile-section-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.field-error {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--notice-error-fg);
}

.flash-stack {
  display: none;
}

.toast-host {
  position: fixed;
  top: 1.15rem;
  right: 1.15rem;
  z-index: 80;
  display: grid;
  gap: 0.75rem;
  width: min(100% - 1.5rem, 24.5rem);
  pointer-events: none;
}

.toast {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: start;
  padding: 0.95rem 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid transparent;
  background: var(--surface);
  box-shadow:
    0 18px 40px rgba(11, 31, 42, 0.16),
    0 2px 8px rgba(11, 31, 42, 0.08);
  overflow: hidden;
  pointer-events: auto;
  transform-origin: top right;
  animation: toastIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.toast.is-leaving {
  animation: toastOut 0.3s ease forwards;
}

.toast-icon {
  width: 2.55rem;
  height: 2.55rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  flex: 0 0 auto;
}

.toast-svg {
  width: 1.55rem;
  height: 1.55rem;
  overflow: visible;
}

.toast-ring,
.toast-tri,
.toast-check,
.toast-x,
.toast-bang {
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.toast-dot {
  stroke: none;
}

.toast-copy {
  min-width: 0;
  padding-top: 0.1rem;
}

.toast-title {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.toast-text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.45;
}

.toast-dismiss {
  margin: -0.2rem -0.15rem 0 0;
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.toast-dismiss:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  transform-origin: left center;
  animation: toastProgress linear forwards;
  animation-duration: inherit;
}

.toast[data-toast-ms="5200"] .toast-progress {
  animation-duration: 5200ms;
}

.toast.is-paused .toast-progress {
  animation-play-state: paused;
}

.toast-success {
  border-color: color-mix(in srgb, var(--success) 28%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--success) 12%, var(--surface)), var(--surface) 55%);
}

.toast-success .toast-icon {
  background: var(--success-soft);
  color: var(--success);
  animation: toastGlowSuccess 1.8s ease-in-out infinite;
}

.toast-success .toast-title { color: var(--success); }
.toast-success .toast-ring,
.toast-success .toast-check { stroke: var(--success); }
.toast-success .toast-progress { background: var(--success); }
.toast-success .toast-ring {
  stroke-dasharray: 126;
  stroke-dashoffset: 126;
  animation: toastDraw 0.55s ease forwards;
}
.toast-success .toast-check {
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: toastDraw 0.45s ease 0.28s forwards;
}

.toast-error {
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--danger) 12%, var(--surface)), var(--surface) 55%);
}

.toast-error .toast-icon {
  background: var(--danger-soft);
  color: var(--danger);
  animation: toastShake 0.7s ease 0.15s both, toastGlowError 1.6s ease-in-out 0.7s infinite;
}

.toast-error .toast-title { color: var(--danger); }
.toast-error .toast-ring,
.toast-error .toast-x { stroke: var(--danger); }
.toast-error .toast-progress { background: var(--danger); }
.toast-error .toast-ring {
  stroke-dasharray: 126;
  stroke-dashoffset: 126;
  animation: toastDraw 0.5s ease forwards;
}
.toast-error .toast-x {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: toastDraw 0.35s ease 0.22s forwards;
}

.toast-warning {
  border-color: color-mix(in srgb, var(--signal) 35%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--signal) 16%, var(--surface)), var(--surface) 55%);
}

.toast-warning .toast-icon {
  background: var(--signal-soft);
  color: var(--signal-ink);
  animation: toastBuzz 0.85s ease 0.1s both, toastGlowWarn 1.7s ease-in-out 0.8s infinite;
}

.toast-warning .toast-title { color: var(--signal-ink); }
.toast-warning .toast-tri,
.toast-warning .toast-bang { stroke: var(--signal-ink); }
.toast-warning .toast-dot { fill: var(--signal-ink); }
.toast-warning .toast-progress { background: var(--signal); }
.toast-warning .toast-tri {
  stroke-dasharray: 110;
  stroke-dashoffset: 110;
  animation: toastDraw 0.5s ease forwards;
}
.toast-warning .toast-bang,
.toast-warning .toast-dot {
  opacity: 0;
  animation: toastFadeIn 0.3s ease 0.35s forwards;
}

.toast-info,
.toast-debug {
  border-color: color-mix(in srgb, var(--sea) 30%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--sea) 12%, var(--surface)), var(--surface) 55%);
}

.toast-info .toast-icon,
.toast-debug .toast-icon {
  background: var(--sea-soft);
  color: var(--sea-deep);
  animation: toastPulse 1.8s ease-in-out infinite;
}

.toast-info .toast-title,
.toast-debug .toast-title { color: var(--sea-deep); }
.toast-info .toast-ring,
.toast-info .toast-bang,
.toast-debug .toast-ring,
.toast-debug .toast-bang { stroke: var(--sea-deep); }
.toast-info .toast-dot,
.toast-debug .toast-dot { fill: var(--sea-deep); }
.toast-info .toast-progress,
.toast-debug .toast-progress { background: var(--sea); }
.toast-info .toast-ring,
.toast-debug .toast-ring {
  stroke-dasharray: 126;
  stroke-dashoffset: 126;
  animation: toastDraw 0.5s ease forwards;
}
.toast-info .toast-bang,
.toast-info .toast-dot,
.toast-debug .toast-bang,
.toast-debug .toast-dot {
  opacity: 0;
  animation: toastFadeIn 0.3s ease 0.28s forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-12px) translateX(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-8px) translateX(16px) scale(0.96);
  }
}

@keyframes toastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@keyframes toastDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes toastFadeIn {
  to { opacity: 1; }
}

@keyframes toastShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px) rotate(-4deg); }
  40% { transform: translateX(3px) rotate(3deg); }
  60% { transform: translateX(-2px) rotate(-2deg); }
  80% { transform: translateX(2px) rotate(1deg); }
}

@keyframes toastBuzz {
  0%, 100% { transform: translateY(0) rotate(0); }
  20% { transform: translateY(-2px) rotate(-8deg); }
  40% { transform: translateY(1px) rotate(7deg); }
  60% { transform: translateY(-1px) rotate(-5deg); }
  80% { transform: translateY(0) rotate(3deg); }
}

@keyframes toastPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--sea) 35%, transparent); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 8px transparent; }
}

@keyframes toastGlowSuccess {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 30%, transparent); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

@keyframes toastGlowError {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 35%, transparent); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

@keyframes toastGlowWarn {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 40%, transparent); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

@media (max-width: 640px) {
  .toast-host {
    top: auto;
    bottom: 0.75rem;
    right: 0.65rem;
    left: auto;
    width: min(100% - 1.3rem, 17.5rem);
    gap: 0.5rem;
  }

  .toast {
    transform-origin: bottom right;
    gap: 0.55rem;
    padding: 0.65rem 0.7rem 0.75rem;
    border-radius: 12px;
    box-shadow:
      0 10px 24px rgba(11, 31, 42, 0.14),
      0 1px 4px rgba(11, 31, 42, 0.08);
  }

  .toast-icon {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 8px;
  }

  .toast-svg {
    width: 1.1rem;
    height: 1.1rem;
  }

  .toast-title {
    margin-bottom: 0.1rem;
    font-size: 0.78rem;
  }

  .toast-text {
    font-size: 0.74rem;
    line-height: 1.35;
  }

  .toast-dismiss {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 1rem;
  }

  .toast-progress {
    height: 2px;
  }
}

body.role-modal-open,
body.staff-nav-lock {
  overflow: hidden;
}

.role-modal[hidden] {
  display: none !important;
}

.role-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: end center;
  padding: 0;
}

.role-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 16, 22, 0.62);
  backdrop-filter: blur(4px);
}

.role-modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(92vh, 720px);
  overflow: auto;
  margin: 0;
  padding: 1.25rem 1.2rem 1.35rem;
  border-radius: 22px 22px 0 0;
  background:
    radial-gradient(circle at top right, rgba(232, 163, 23, 0.16), transparent 42%),
    linear-gradient(180deg, #16262f 0%, #101c23 100%);
  color: #e8f2f4;
  box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.35);
  animation: role-modal-up 0.28s ease;
}

@keyframes role-modal-up {
  from {
    transform: translateY(18px);
    opacity: 0.7;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.role-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.role-modal-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e8a317;
}

.role-modal-head h2 {
  margin: 0;
  font-family: Syne, sans-serif;
  font-size: 1.45rem;
  line-height: 1.15;
}

.role-modal-sub {
  margin: 0.45rem 0 0;
  max-width: 34ch;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(232, 242, 244, 0.68);
}

.role-modal-close {
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.role-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.role-switch-grid {
  display: grid;
  gap: 0.65rem;
}

.role-switch-option {
  display: block;
  cursor: pointer;
}

.role-switch-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-switch-option-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.role-switch-option:hover .role-switch-option-body,
.role-switch-option.is-selected .role-switch-option-body,
.role-switch-option:has(input:checked) .role-switch-option-body,
.role-switch-option:has(input:focus-visible) .role-switch-option-body {
  border-color: rgba(232, 163, 23, 0.7);
  background: rgba(232, 163, 23, 0.12);
}

.role-switch-option-label {
  font-weight: 800;
  font-size: 0.98rem;
}

.role-switch-option-path {
  font-size: 0.78rem;
  color: rgba(232, 242, 244, 0.55);
  word-break: break-all;
}

.role-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.role-modal-actions .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

@media (min-width: 720px) {
  .role-modal {
    place-items: center;
    padding: 1.5rem;
  }

  .role-modal-panel {
    border-radius: 22px;
    animation: role-modal-scale 0.24s ease;
  }

  @keyframes role-modal-scale {
    from {
      transform: translateY(10px) scale(0.98);
      opacity: 0.7;
    }
    to {
      transform: none;
      opacity: 1;
    }
  }

  .role-switch-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .module-grid {
    grid-template-columns: 1fr;
  }
}


.staff-sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--sidebar-text);
}

.staff-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.staff-brand span {
  color: #5fd0d8;
}

.staff-nav-label {
  margin: 0.25rem 0.4rem 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
}

.staff-sidebar nav {
  gap: 0.3rem;
}

.staff-sidebar nav a {
  position: relative;
  padding: 0.78rem 0.9rem;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.staff-sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.staff-sidebar nav a.active {
  background: rgba(14, 124, 134, 0.28);
  color: #fff;
  box-shadow: inset 3px 0 0 #5fd0d8;
}

.staff-sidebar-meta {
  margin-top: auto;
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 0.95rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.staff-sidebar-meta-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 242, 244, 0.45);
}

.staff-sidebar-meta strong {
  font-size: 0.88rem;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-sidebar-meta span {
  font-size: 0.78rem;
  color: rgba(232, 242, 244, 0.62);
}

.role-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.role-stat-value {
  font-size: 1.15rem !important;
  line-height: 1.25;
}

.staff-app .stat {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: staffFadeUp 0.45s ease both;
}

.staff-app .stat:nth-child(2) { animation-delay: 0.04s; }
.staff-app .stat:nth-child(3) { animation-delay: 0.08s; }
.staff-app .stat:nth-child(4) { animation-delay: 0.12s; }

.staff-app .stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(11, 31, 42, 0.08);
}

.role-highlights {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.55rem;
}

.role-highlights li {
  font-weight: 600;
  color: var(--ink-soft);
}

@media (max-width: 960px) {
  .role-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .role-highlight-grid {
    grid-template-columns: 1fr;
  }
}



.staff-card .flag-select-trigger:hover,
.staff-card .flag-select.is-open .flag-select-trigger {
  border-color: #c48a12;
  box-shadow: 0 0 0 4px rgba(232, 163, 23, 0.18);
}

.staff-card .password-rules li.is-ok {
  color: #1f8a5b;
}

@media (max-width: 860px) {
  .staff-shell {
    grid-template-columns: 1fr;
  }

  .staff-rail {
    min-height: auto;
  }

  .staff-rail-inner {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .staff-rail-title {
    max-width: none;
  }

  .staff-points {
    display: none;
  }
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  border: 1.5px solid var(--input-border);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  background: var(--input-bg);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--sea);
  box-shadow: 0 0 0 4px var(--sea-soft);
}

.text-upper {
  text-transform: uppercase;
}

.text-lower {
  text-transform: lowercase;
}

.phone-row {
  display: grid;
  grid-template-columns: minmax(132px, 0.9fr) minmax(0, 1.5fr);
  gap: 0.55rem;
  align-items: start;
}

.phone-local {
  min-width: 0;
}

.flag-select {
  position: relative;
}

.flag-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1.5px solid rgba(11, 31, 42, 0.14);
  border-radius: 12px;
  padding: 0.72rem 0.7rem;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.flag-select-trigger:hover,
.flag-select.is-open .flag-select-trigger {
  border-color: var(--sea);
  box-shadow: 0 0 0 4px rgba(14, 124, 134, 0.15);
}

.flag-img {
  width: 28px;
  height: 21px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(11, 31, 42, 0.12);
  flex-shrink: 0;
}

.flag-select-dial {
  font-weight: 700;
  font-size: 0.92rem;
  flex: 1;
  text-align: left;
}

.flag-select-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--ink-soft);
  flex-shrink: 0;
}

.flag-select-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  width: min(320px, 78vw);
  background: #fff;
  border: 1px solid rgba(11, 31, 42, 0.1);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.flag-select-search {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(11, 31, 42, 0.08);
  padding: 0.75rem 0.9rem;
  font: inherit;
  outline: none;
}

.flag-select-list {
  max-height: 240px;
  overflow: auto;
}

.flag-select-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  text-align: left;
}

.flag-select-option:hover,
.flag-select-option.is-selected {
  background: rgba(14, 124, 134, 0.08);
}

.flag-select-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
}

.flag-select-code {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.password-field {
  position: relative;
}

.password-field .password-input {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  padding: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
}

.password-toggle:hover {
  color: var(--sea-deep);
  background: rgba(14, 124, 134, 0.08);
}

.password-input.is-valid {
  border-color: #1f8a5b;
}

.password-input.is-invalid {
  border-color: var(--danger);
}

.password-rules {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.password-rules.is-active {
  opacity: 1;
}

.password-rules li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.password-rules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 1.5px solid rgba(11, 31, 42, 0.2);
  background: #fff;
}

.password-rules li.is-ok {
  color: #1f8a5b;
}

.password-rules li.is-ok::before {
  border-color: #1f8a5b;
  background: #1f8a5b;
  box-shadow: inset 0 0 0 2px #fff;
}

.password-rules li.is-bad {
  color: var(--danger);
}

.password-rules li.is-bad::before {
  border-color: var(--danger);
}

@media (max-width: 480px) {
  .phone-row {
    grid-template-columns: 1fr;
  }

  .flag-select-menu {
    width: 100%;
  }
}

.errorlist {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  color: var(--danger);
  font-size: 0.85rem;
}

.non-field-errors {
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.2);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  color: var(--danger);
  font-size: 0.9rem;
}

.auth-footer {
  margin-top: 1.25rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.auth-footer a {
  color: var(--sea-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.photo-upload {
  display: grid;
  gap: 0.65rem;
}

.photo-preview {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 1.5px dashed rgba(11, 31, 42, 0.2);
  background:
    linear-gradient(135deg, rgba(14, 124, 134, 0.12), rgba(232, 163, 23, 0.12))
    center / cover no-repeat;
  background-color: #fff;
}

.photo-preview.has-image {
  border-style: solid;
  border-color: rgba(14, 124, 134, 0.35);
}

.form-file {
  padding: 0.55rem;
}

.field-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.35rem 0.4rem;
}

.sidebar-profile img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.sidebar-profile span {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(232, 242, 244, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 250px 1fr;
}

.staff-app {
  position: relative;
}

.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 1.35rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.sidebar .brand {
  color: #fff;
  padding: 0 0.4rem;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar a {
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  color: var(--sidebar-link);
  font-weight: 600;
}

.sidebar a:hover,
.sidebar a.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-foot {
  margin-top: auto;
}

.staff-app .staff-sidebar {
  background: var(--sidebar-bg) !important;
  color: var(--sidebar-text);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.staff-app .staff-sidebar .brand,
.staff-app .staff-sidebar .brand span {
  color: #fff;
}

.staff-app .staff-sidebar .staff-brand span {
  color: #5fd0d8;
}

.staff-app .staff-sidebar nav a {
  color: var(--sidebar-link);
}

.staff-app .staff-sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.staff-app .staff-sidebar nav a.active {
  background: rgba(61, 184, 194, 0.22);
  color: #fff;
  box-shadow: inset 3px 0 0 #5fd0d8;
}

.staff-app .staff-sidebar-meta {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.staff-app .staff-sidebar-meta-label {
  color: var(--sidebar-muted);
}

.staff-app .staff-sidebar-meta strong {
  color: #fff;
}

.staff-app .staff-sidebar-meta span {
  color: rgba(232, 242, 244, 0.65);
}

[data-theme="dark"] .staff-app .staff-sidebar {
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(61, 184, 194, 0.2), transparent 55%),
    linear-gradient(180deg, #101920 0%, #0a1015 100%) !important;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.main {
  padding: 0.75rem 1rem 1.1rem;
  background: transparent;
  width: 100%;
  max-width: none;
}

.app-shell > .main {
  min-width: 0;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  margin: 0 0 0.2rem;
  letter-spacing: -0.02em;
}

.page-sub {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  box-shadow: none;
}

[data-theme="dark"] .stat {
  box-shadow: none;
}

.stat .label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat .value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  margin-top: 0.35rem;
  color: var(--ink);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.05rem;
  box-shadow: none;
}

[data-theme="dark"] .panel {
  box-shadow: none;
}

.app-shell .panel {
  max-width: none;
}

.panel h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.85rem;
  color: var(--ink);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.7rem 0.35rem;
  border-bottom: 1px solid rgba(11, 31, 42, 0.06);
}

.table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.empty {
  color: var(--ink-soft);
  padding: 0.5rem 0;
}

.badge {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--sea-soft);
  color: var(--sea-deep);
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
}

.badge-info {
  background: var(--sea-soft);
  color: var(--sea-deep);
}

.badge-warn {
  background: var(--signal-soft);
  color: var(--chip-signal-fg);
}

.badge-muted {
  background: var(--surface-3);
  color: var(--ink-soft);
}

.org-page {
  width: 100%;
  max-width: none;
  margin: 0;
}

.org-edit {
  width: min(100%, 42rem);
  margin: 0 auto;
  animation: rise 0.45s ease both;
}

.org-edit-panel .org-edit-grid + .org-edit-grid {
  margin-top: 0.95rem;
}

.org-edit-panel .form-group + .org-edit-grid {
  margin-top: 0.95rem;
}

.org-edit-intro {
  margin-bottom: 1.35rem;
}

.org-edit-back {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--sea-deep);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.org-edit-back:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.org-edit-hero {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
}

.org-edit-avatar,
.org-edit-photo-preview {
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 18px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 2px solid color-mix(in srgb, var(--sea) 22%, transparent);
}

.org-edit-avatar-fallback {
  display: inline-grid;
  place-items: center;
  background: linear-gradient(145deg, var(--sea), var(--sea-deep));
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
}

.org-edit-hero-copy {
  min-width: 0;
  flex: 1;
}

.org-edit-kicker {
  margin: 0 0 0.2rem;
  color: var(--sea-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.org-edit-hero-copy h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.org-edit-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-bottom: 0.55rem;
}

.org-edit-meta-item {
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
}

.org-edit-owner {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
}

.org-edit-owner span {
  display: inline-block;
  margin-left: 0.35rem;
  opacity: 0.85;
}

.org-edit-form {
  display: grid;
  gap: 1rem;
}

.org-edit-panel {
  padding: 1.25rem 1.3rem 1.35rem;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--sea) 4%, var(--surface)), var(--surface));
}

.org-edit-panel-head {
  margin-bottom: 1.1rem;
}

.org-edit-panel-head h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.org-edit-panel-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
}

.org-edit-photo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.org-edit-photo-fields {
  flex: 1;
  min-width: 0;
  position: relative;
}

.org-edit-file {
  display: grid;
  gap: 0.35rem;
  cursor: pointer;
}

.org-edit-file-btn {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.55rem 0.9rem;
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.org-edit-file:hover .org-edit-file-btn {
  border-color: var(--sea);
  background: var(--sea-soft);
}

.org-edit-file-hint {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
}

.org-edit-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.org-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
}

.org-edit-panel .form-group {
  margin-bottom: 0.95rem;
}

.org-edit-panel .form-group:last-child {
  margin-bottom: 0;
}

.org-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

@media (max-width: 640px) {
  .org-edit-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .org-edit-photo {
    flex-direction: column;
    align-items: flex-start;
  }

  .org-edit-grid {
    grid-template-columns: 1fr;
  }

  .org-edit-panel {
    padding: 1.05rem 1rem 1.15rem;
  }
}

.org-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.25rem;
}

.org-page-header h2 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.org-page-header p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.org-page-count {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.org-page-count strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.org-search-bar {
  margin: 0 0 1rem;
}

.org-search-input {
  width: 100%;
  max-width: 28rem;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.org-search-input::placeholder {
  color: var(--ink-soft);
  font-weight: 500;
}

.org-search-input:focus {
  border-color: var(--sea);
  box-shadow: 0 0 0 3px var(--sea-soft);
}

.org-search-empty {
  border-top: 0;
  padding-top: 0.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.org-table-shell {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.org-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.org-table-clients {
  min-width: 1320px;
}

.org-table-hr {
  min-width: 1240px;
}

.org-table th,
.org-table td {
  padding: 1.15rem 1.4rem;
  text-align: left;
  vertical-align: middle;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--ink);
}

.org-table th:last-child,
.org-table td:last-child {
  border-right: none;
}

.org-table tbody tr:last-child td {
  border-bottom: none;
}

.org-table thead th {
  background: var(--surface-3);
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
}

.org-table tbody tr:hover td {
  background: color-mix(in srgb, var(--sea) 5%, var(--surface));
}

/* Clients: roomy column floors */
.org-table-clients th:nth-child(1),
.org-table-clients td:nth-child(1) { min-width: 13.5rem; }
.org-table-clients th:nth-child(2),
.org-table-clients td:nth-child(2) { min-width: 12rem; }
.org-table-clients th:nth-child(3),
.org-table-clients td:nth-child(3) { min-width: 9.5rem; }
.org-table-clients th:nth-child(4),
.org-table-clients td:nth-child(4) { min-width: 7.5rem; }
.org-table-clients th:nth-child(5),
.org-table-clients td:nth-child(5) { min-width: 7.5rem; }
.org-table-clients th:nth-child(6),
.org-table-clients td:nth-child(6),
.org-table-clients th:nth-child(7),
.org-table-clients td:nth-child(7) {
  min-width: 5.5rem;
  text-align: center;
}
.org-table-clients th:nth-child(8),
.org-table-clients td:nth-child(8) { min-width: 7rem; }
.org-table-clients th:nth-child(9),
.org-table-clients td:nth-child(9) { min-width: 9.5rem; }

.org-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.org-identity img,
.org-identity span[aria-hidden="true"] {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  flex: 0 0 auto;
  object-fit: cover;
}

.org-identity span[aria-hidden="true"] {
  display: inline-grid;
  place-items: center;
  background: var(--sea-soft);
  color: var(--sea-deep);
  font-size: 0.8rem;
  font-weight: 800;
}

.org-identity strong {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.org-owner {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.org-owner strong {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.org-owner small {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.org-code {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface-3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.org-status {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.org-status-registered {
  background: var(--sea-soft);
  color: var(--sea-deep);
}

.org-status-active {
  background: var(--success-soft);
  color: var(--success);
}

.org-status-suspended {
  background: var(--signal-soft);
  color: var(--chip-signal-fg);
}

.org-status-pending_approval {
  background: var(--surface-3);
  color: var(--ink-soft);
}

.org-status-burned {
  background: var(--danger-soft);
  color: var(--danger);
}

/* HR: roomy column floors */
.org-table-hr th:nth-child(1),
.org-table-hr td:nth-child(1) { min-width: 14rem; }
.org-table-hr th:nth-child(2),
.org-table-hr td:nth-child(2) { min-width: 11rem; }
.org-table-hr th:nth-child(3),
.org-table-hr td:nth-child(3) { min-width: 9.5rem; }
.org-table-hr th:nth-child(4),
.org-table-hr td:nth-child(4) { min-width: 7.5rem; }
.org-table-hr th:nth-child(5),
.org-table-hr td:nth-child(5) { min-width: 9rem; }
.org-table-hr th:nth-child(6),
.org-table-hr td:nth-child(6) { min-width: 8.5rem; }
.org-table-hr th:nth-child(7),
.org-table-hr td:nth-child(7) { min-width: 7rem; }
.org-table-hr th:nth-child(8),
.org-table-hr td:nth-child(8) { min-width: 9.5rem; }

.org-metric {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
}

.org-date {
  color: var(--ink-soft);
  font-weight: 600;
  white-space: nowrap;
}

.org-empty {
  margin: 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  color: var(--ink-soft);
  font-weight: 600;
}

.org-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  white-space: nowrap;
}

.org-actions a,
.org-actions button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--sea-deep);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.org-actions a:hover,
.org-actions button:hover {
  color: var(--ink);
}

.org-actions .org-action-danger {
  color: var(--danger, #b42318);
}

.org-delete-box {
  display: grid;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  max-width: 40rem;
}

.org-delete-box p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 600;
  line-height: 1.5;
}

.org-delete-warn {
  color: var(--danger) !important;
}

.org-delete-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 960px) {
  .org-page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .org-table th,
  .org-table td {
    padding: 1rem 1.15rem;
  }
}



@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes gridDrift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 48px 48px, 48px 48px;
  }
}

@media (max-width: 960px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .app-shell:not(.staff-app) {
    grid-template-columns: 1fr;
  }

  .app-shell:not(.staff-app) .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
  }

  .app-shell:not(.staff-app) .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }

  .app-shell:not(.staff-app) .sidebar-foot {
    margin-top: 0;
    margin-left: auto;
  }

  .staff-app {
    grid-template-columns: 1fr;
  }

  .staff-nav-toggle {
    display: inline-flex;
    flex-shrink: 0;
  }

  .staff-nav-close {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
  }

  .staff-nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: var(--scrim);
    backdrop-filter: blur(2px);
  }

  .staff-nav-scrim[hidden] {
    display: none !important;
  }

  .staff-app .staff-sidebar,
  .staff-app aside.sidebar.staff-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 88vw);
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 1.15rem;
    padding: 1.2rem 1.05rem 1.35rem;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-105%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s ease, visibility 0.28s ease;
    box-shadow: 18px 0 40px rgba(0, 0, 0, 0.28);
  }

  .staff-app.nav-open .staff-sidebar,
  .staff-app.nav-open aside.sidebar.staff-sidebar {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .staff-app .staff-sidebar nav {
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
  }

  .staff-app .staff-sidebar-meta {
    margin-top: auto;
  }

  .staff-workspace {
    min-height: 100svh;
    width: 100%;
  }

  .staff-topbar {
    padding: 0.75rem 1rem;
  }

  .staff-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.15rem 1.1rem;
  }

  .staff-hero-badges {
    justify-content: flex-start;
  }

  .account-menu-copy {
    display: none;
  }

  .account-menu-trigger {
    padding: 0.3rem;
  }

  .account-menu-caret {
    display: none;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 14px;
  }

  body {
    line-height: 1.45;
  }

  .site-header {
    width: min(100% - 1.25rem, var(--max));
  }

  .hero-inner {
    width: min(100% - 1.25rem, var(--max));
    padding-top: 6.5rem;
    padding-bottom: 3.25rem;
  }

  .btn {
    padding: 0.55rem 0.9rem;
    font-size: 0.82rem;
  }

  .brand {
    font-size: 1rem;
  }

  .staff-topbar-kicker,
  .staff-hero-kicker,
  .staff-nav-label,
  .staff-sidebar-meta-label {
    font-size: 0.58rem;
  }

  .staff-topbar-heading {
    font-size: 0.95rem;
  }

  .staff-hero {
    padding: 0.95rem 0.9rem;
    margin-bottom: 0.95rem;
  }

  .staff-hero-copy h2 {
    font-size: 1.15rem;
  }

  .staff-hero-copy p,
  .page-sub,
  .panel-sub {
    font-size: 0.8rem;
  }

  .staff-pill {
    font-size: 0.62rem;
    padding: 0.25rem 0.5rem;
  }

  .stat {
    padding: 0.85rem 0.9rem;
  }

  .stat .label {
    font-size: 0.64rem;
  }

  .stat .value,
  .role-stat-value {
    font-size: 0.95rem !important;
  }

  .panel {
    padding: 0.95rem;
  }

  .panel h2,
  .profile-section-title {
    font-size: 0.95rem;
  }

  .role-highlight-card {
    padding: 0.8rem 0.85rem;
  }

  .role-highlight-index {
    font-size: 0.62rem;
  }

  .role-highlight-card p {
    font-size: 0.82rem;
  }

  .form-group label {
    font-size: 0.75rem;
  }

  .form-control {
    padding: 0.7rem 0.8rem;
    font-size: 0.85rem;
  }

  .notice {
    font-size: 0.8rem;
    padding: 0.7rem 0.8rem;
  }

  .account-menu-name {
    font-size: 0.74rem;
  }

  .account-menu-meta,
  .account-session-row,
  .role-view-hint {
    font-size: 0.62rem;
  }

  .account-menu-links a,
  .account-menu-link-btn,
  .account-menu-logout button {
    font-size: 0.78rem;
    padding: 0.5rem 0.65rem;
  }

  .role-chip {
    font-size: 0.58rem;
    padding: 0.18rem 0.4rem;
  }

  .staff-sidebar nav a {
    font-size: 0.85rem;
    padding: 0.65rem 0.75rem;
  }

  .staff-sidebar-meta strong {
    font-size: 0.8rem;
  }

  .staff-sidebar-meta span {
    font-size: 0.7rem;
  }

  .stat-grid,
  .role-stat-grid {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    margin-bottom: 1rem;
  }

  .main {
    padding: 0.7rem 0.75rem 1rem;
  }

  .staff-app .staff-main,
  .staff-app .main.staff-main {
    padding: 0.7rem 0.75rem 1rem;
  }

  .profile-photo-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .orbit {
    opacity: 0.45;
    right: -30%;
    top: 0;
  }
}
