:root {
  --bg: #f7f6f3;
  --panel: #ffffff;
  --panel-soft: #f3f2ee;
  --panel-raised: #ffffff;
  --text: #171717;
  --muted: #706f6a;
  --subtle: #3f3f3c;
  --border: #ddd9d2;
  --border-strong: #bdbbb4;
  --danger: #9b3b30;
  --warn: #8a6420;
  --success: #2d5a47;
  --radius: 10px;
  --control-height: 34px;
  --nav-emphasis-bg: rgba(201, 169, 98, 0.16);
  --nav-emphasis-fg: #3f3f3c;
  --tab-active-bg: rgba(201, 169, 98, 0.22);
  --tab-active-fg: #171717;
  --tab-active-border: #c9a962;
  --tab-active-count-bg: rgba(168, 134, 68, 0.2);
  --tab-active-count-fg: #5c4212;
  --accent: #c9a962;
  --accent-deep: #a88748;
  --brand-gold: #a88748;
  --shadow: 0 4px 18px rgba(23, 23, 23, 0.06);
  font-family: "Sora", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select {
  font: inherit;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px clamp(20px, 4vw, 48px) 40px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 12% -5%, rgba(201, 169, 98, 0.14), transparent 58%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(45, 90, 71, 0.07), transparent 52%),
    linear-gradient(180deg, #faf9f6 0%, var(--bg) 38%, #f3f1ec 100%);
}

.auth-page--centered {
  padding-left: 20px;
  padding-right: 20px;
}

.auth-page--centered .auth-shell {
  width: min(420px, 100%);
  grid-template-columns: minmax(0, 1fr);
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  display: grid;
  gap: 28px;
  align-items: stretch;
}

.auth-welcome {
  display: none;
}

.auth-welcome .brand {
  justify-content: center;
  margin-bottom: 28px;
}

.auth-welcome-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.auth-welcome-title {
  margin: 0;
  max-width: 18ch;
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 2.8vw, 2.15rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--text);
}

.auth-welcome-lead {
  margin: 14px 0 0;
  max-width: 36ch;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.auth-welcome-title em {
  font-style: italic;
  color: var(--subtle);
}

@media (min-width: 900px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 400px);
    gap: 32px;
  }

  .auth-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 20px;
  }
}

@media (max-width: 899px) {
  .auth-page {
    align-items: flex-start;
    padding-top: 56px;
  }

  .auth-card {
    margin-top: 4px;
  }
}

.auth-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.auth-card {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 32px 28px;
  color: var(--text);
  box-shadow:
    0 1px 2px rgba(23, 23, 23, 0.04),
    0 16px 44px rgba(23, 23, 23, 0.07);
}

.auth-page--centered .auth-card {
  max-width: 400px;
  margin: 0 auto;
  padding: 28px 28px 24px;
}

.auth-page--centered .auth-card .brand {
  justify-content: center;
  margin-bottom: 18px;
  font-size: 18px;
}

.auth-page--centered .auth-card .brand-mark {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.auth-page--centered .auth-card h1 {
  text-align: center;
  font-size: 22px;
}

.auth-page--centered .auth-card-lead {
  text-align: center;
  margin-bottom: 4px;
}

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.field-label-row label {
  margin: 0;
  min-width: 0;
}

.auth-forgot-link {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-forgot-link:hover {
  color: var(--warn);
}

.auth-forgot-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.auth-page--centered .auth-card h1,
.auth-page--centered .auth-card-lead,
.auth-page--centered .auth-card .brand {
  text-align: center;
}

.auth-form,
.auth-switch,
.auth-terms {
  text-align: left;
}

.auth-card-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.auth-card-lead {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.auth-card .brand {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 20px;
}

.auth-form {
  margin-top: 20px;
}

.auth-submit {
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
}

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #141210;
  color: #f4efe6;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}

.brand-name {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}

.brand-word {
  color: var(--text);
}

.brand-wise {
  color: var(--accent-deep);
  font-weight: 600;
}

.sidebar .brand {
  font-size: 17px;
  margin-bottom: 12px;
}

.sidebar .brand-mark {
  width: 24px;
  height: 24px;
  font-size: 9.5px;
  letter-spacing: -0.03em;
}

.auth-card h1,
.page-title {
  margin: 0;
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.auth-card h1 {
  margin-top: 0;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.form {
  display: grid;
  gap: 13px;
  margin-top: 22px;
}

.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.auth-terms input {
  margin-top: 3px;
}

.auth-terms a {
  color: var(--accent-deep);
}

.field label {
  display: block;
  margin-bottom: 5px;
  color: var(--subtle);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: var(--panel);
  color: var(--text);
  outline: 0;
}

.field input[readonly] {
  background: var(--panel-soft);
  color: var(--muted);
}

.field input:focus,
.field select:focus {
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.16);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--control-height);
  min-height: var(--control-height);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.btn:hover:not(:disabled):not([disabled]) {
  background: var(--panel-soft);
  border-color: var(--border-strong);
  color: var(--text);
  opacity: 1;
}

.btn:disabled,
.btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

.btn.is-busy,
.icon-action.is-busy {
  position: relative;
  cursor: wait;
  pointer-events: none;
  color: transparent;
}

.btn.is-busy[disabled],
.icon-action.is-busy[disabled] {
  opacity: 1;
}

.btn.is-busy::after,
.icon-action.is-busy::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  border-top-color: var(--text);
  animation: pickwise-btn-spin 0.65s linear infinite;
}

.icon-action.is-busy::after {
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
}

.btn-primary.is-busy::after,
.btn-danger.is-busy::after,
.btn-warn.is-busy::after {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

.inline-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  vertical-align: -2px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  border-top-color: var(--muted);
  animation: pickwise-btn-spin 0.65s linear infinite;
}

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

.btn-primary {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}

.btn-primary:hover:not(:disabled):not([disabled]) {
  background: var(--warn);
  border-color: var(--warn);
  color: #fff;
  opacity: 1;
  filter: none;
}

.btn-danger,
.btn-warn {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.btn-danger:hover:not(:disabled):not([disabled]),
.btn-warn:hover:not(:disabled):not([disabled]) {
  opacity: .86;
  background: var(--text);
  color: #fff;
}

.btn-secondary {
  background: var(--panel);
  border-color: var(--border-strong);
  color: var(--text);
  font-weight: 600;
}

.btn-secondary:hover:not(:disabled):not([disabled]) {
  opacity: 1;
  background: var(--panel-soft);
  color: var(--text);
}

.btn.btn-compact {
  height: 30px;
  min-height: 30px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 7px;
}

.btn.btn-back {
  background: var(--panel);
  border-color: var(--border-strong);
  color: var(--subtle);
  font-size: 12px;
  font-weight: 600;
  height: 30px;
  min-height: 30px;
  padding: 0 12px;
}

.btn.btn-back:hover:not(:disabled):not([disabled]) {
  opacity: 1;
  background: var(--panel-soft);
  color: var(--text);
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover:not(:disabled):not([disabled]) {
  opacity: 1;
  background: var(--panel-soft);
  color: var(--text);
}

.link {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  padding: 0;
}

.error {
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid #e2b8ae;
  border-radius: var(--radius);
  color: var(--danger);
  background: #fff2ef;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.error.hidden {
  display: none;
}

.success {
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid #b8dcc0;
  border-radius: var(--radius);
  color: #1f6b36;
  background: #effaf2;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.shell {
  --sidebar-width: 236px;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  min-height: 0;
}

.shell--sidebar-collapsed {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  grid-column: 1;
  grid-row: 1;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100vh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
  min-width: 0;
  z-index: 1;
}

.sidebar-brand {
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  letter-spacing: 0.015em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.sidebar-nav-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.shell--sidebar-collapsed .sidebar-nav-scroll {
  overflow: visible;
}

.sidebar-brand-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.sidebar-collapse-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
}

.sidebar-collapse-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s ease;
}

.sidebar-collapse-btn:hover,
.sidebar-collapse-btn:focus-visible {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--panel-soft);
  outline: none;
}

.shell--sidebar-collapsed .sidebar-collapse-btn svg {
  transform: rotate(180deg);
}

.shell--sidebar-collapsed .main {
  grid-column: 2;
}

.shell--sidebar-collapsed .sidebar {
  overflow: visible;
  z-index: 5;
}

.shell--sidebar-collapsed .brand-name {
  display: none;
}

.shell--sidebar-collapsed .sidebar-brand {
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  gap: 8px;
}

.shell--sidebar-collapsed .sidebar-brand-main {
  justify-content: center;
  flex: 0;
}

.shell--sidebar-collapsed .nav {
  margin-top: 8px;
  overflow: visible;
}

.shell--sidebar-collapsed .nav-section .nav-group button,
.shell--sidebar-collapsed .nav-section > button,
.shell--sidebar-collapsed .nav button {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  width: var(--sidebar-width);
  min-height: 40px;
  padding: 0;
  gap: 0;
  overflow: visible;
  z-index: 1;
  border-radius: 0;
}

.shell--sidebar-collapsed .nav button svg,
.shell--sidebar-collapsed .nav button img.icon-jira {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  margin: 0;
}

.shell--sidebar-collapsed .nav button span:not(.nav-status-dot):not(.nav-activity-dot) {
  display: none;
}

.shell--sidebar-collapsed .nav button.active {
  background: var(--nav-emphasis-bg);
  color: var(--text);
  box-shadow: inset 2px 0 0 var(--accent-deep);
  z-index: 2;
}

.shell--sidebar-collapsed .nav button:is(:hover, :focus-visible) {
  width: max-content;
  grid-template-columns: var(--sidebar-width) max-content;
  justify-items: stretch;
  background: var(--sidebar-bg, #f0eeea);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-deep);
  border-radius: 0 10px 10px 0;
  box-shadow: 4px 6px 22px rgba(23, 23, 23, 0.08);
  z-index: 70;
  outline: none;
}

.shell--sidebar-collapsed .nav button:is(:hover, :focus-visible) svg,
.shell--sidebar-collapsed .nav button:is(:hover, :focus-visible) img.icon-jira {
  justify-self: center;
}

.shell--sidebar-collapsed .nav button:is(:hover, :focus-visible) span:not(.nav-status-dot):not(.nav-activity-dot) {
  display: block;
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  padding-right: 16px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
}

.shell--sidebar-collapsed .account {
  padding: 10px 8px 12px;
  justify-items: center;
}

.shell--sidebar-collapsed .account-head strong,
.shell--sidebar-collapsed .account > .muted,
.shell--sidebar-collapsed .account > .pill {
  display: none;
}

.shell--sidebar-collapsed .account-head {
  width: 100%;
  justify-content: center;
}

.shell--sidebar-collapsed .account-menu-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

.shell--sidebar-collapsed .account-menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  padding: 0;
}

.shell--sidebar-collapsed .account-menu-btn-icon {
  display: none;
}

.shell--sidebar-collapsed .account-menu-btn:hover,
.shell--sidebar-collapsed .account-menu-btn[aria-expanded="true"] {
  background: transparent;
}

.shell--sidebar-collapsed .account-menu-btn:hover .account-avatar,
.shell--sidebar-collapsed .account-menu-btn[aria-expanded="true"] .account-avatar {
  box-shadow: 0 0 0 2px var(--border-strong);
}

.shell--sidebar-collapsed .account-menu {
  left: calc(100% + 10px);
  right: auto;
  bottom: 0;
  min-width: 200px;
}

.shell--sidebar-collapsed #logoutBtn {
  display: none;
}

.shell--sidebar-collapsed .account:not(:has(.account-menu-wrap)) #logoutBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 0;
}

.shell--sidebar-collapsed .account:not(:has(.account-menu-wrap)) #logoutBtn span {
  display: none;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-logout svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.sidebar-brand .brand-wise {
  color: var(--accent-deep);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 18px;
}

.nav-section {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nav-section + .nav-section {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-group-label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--muted) 72%, transparent);
  padding: 0 16px 2px;
  line-height: 1.2;
  user-select: none;
  pointer-events: none;
}

.shell--sidebar-collapsed .nav-group-label {
  display: none;
}

.nav-section .nav-group button,
.nav-section > button {
  padding: 4px 16px;
  min-height: 30px;
}

.shell--sidebar-collapsed .nav-section + .nav-section {
  margin-top: 5px;
  padding-top: 5px;
}

.nav button {
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 8px 16px;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.nav button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

img.icon-jira {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
}

.nav button:hover,
.nav button:focus-visible {
  background: var(--nav-emphasis-bg);
  color: var(--nav-emphasis-fg);
  outline: none;
}

.nav button.active {
  background: var(--nav-emphasis-bg);
  color: var(--nav-emphasis-fg);
  font-weight: 700;
}

.nav button .nav-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-status-dot--ok {
  background: #3d8f4a;
  box-shadow: 0 0 0 1px rgba(20, 18, 16, 0.12);
}

.nav-status-dot--warn {
  background: #c9922b;
  box-shadow: 0 0 0 1px rgba(20, 18, 16, 0.12);
}

.nav button .nav-activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-left: auto;
  background: var(--sidebar-blue, #5b8def);
  box-shadow: 0 0 0 1px rgba(20, 18, 16, 0.12);
}

.nav button .nav-activity-dot[hidden] {
  display: none;
}

.shell--sidebar-collapsed .nav button .nav-status-dot {
  display: none;
}

.shell--sidebar-collapsed .nav button .nav-activity-dot {
  display: none;
}

.account {
  margin-top: auto;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 14px;
  display: grid;
  gap: 5px;
}

.account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.account-head strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.account-menu-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.account-menu-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-menu-btn svg {
  width: 16px;
  height: 16px;
}

.account-avatar {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: var(--nav-emphasis-bg);
  color: var(--nav-emphasis-fg);
  line-height: 1;
}

.shell--sidebar-collapsed .account-avatar {
  display: inline-flex;
}

.account-menu-btn:hover,
.account-menu-btn[aria-expanded="true"] {
  background: var(--panel-soft);
  color: var(--text);
}

.account-menu {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 188px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  z-index: 40;
}

.account-menu.open {
  display: grid;
  gap: 2px;
}

.account-menu-item {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-menu-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted);
}

#logoutMenuBtn {
  display: none;
}

.shell--sidebar-collapsed #logoutMenuBtn {
  display: flex;
}

.account-menu-item--logout {
  border-top: 1px solid var(--border);
  margin-top: 2px;
  padding-top: 10px;
  border-radius: 0 0 8px 8px;
}

.account-menu-item:hover,
.account-menu-item:focus-visible {
  background: var(--panel-soft);
  outline: none;
}

.main {
  grid-column: 2;
  grid-row: 1;
  padding: clamp(16px, 2vw, 24px);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  max-height: 100vh;
  max-height: 100dvh;
  background: var(--bg);
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.page-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.page-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.admin-only-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-only-tag svg,
.search-wrap svg,
.icon-action svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.people-page .people-tabs-bar {
  margin-bottom: 14px;
  flex-shrink: 0;
}

.people-page > .page-head,
.people-page > .people-toolbar {
  flex-shrink: 0;
}

.admin-table-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
}

.admin-table-page > .page-head,
.admin-table-page > .people-toolbar {
  flex-shrink: 0;
}

.people-page .panel.panel--table,
.admin-table-page .panel.panel--table {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.people-page .panel-table-scroll,
.admin-table-page .panel-table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.people-page .people-roles-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.people-page .people-tabs-bar .tier-nav {
  justify-content: flex-start;
}

.people-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.people-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.jira-config-panel {
  margin-bottom: 14px;
  padding: 18px 20px 20px;
  overflow: visible;
}

.settings-page .page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.settings-page .page-title {
  margin: 0;
}

.settings-page .page-head-lead {
  margin: 5px 0 0;
  max-width: 62ch;
}

.settings-form {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 640px;
}

.settings-form .field label {
  display: block;
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--subtle);
}

.settings-form .field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  outline: 0;
}

.settings-form .field input[readonly] {
  background: var(--panel-soft);
  color: var(--muted);
}

.settings-form .field input:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 1px rgba(23, 23, 23, 0.08);
}

.settings-form .field-hint {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.settings-form .field-hint .view-all-link {
  font-size: inherit;
}

.settings-form .modal-form-fields {
  gap: 14px;
}

.settings-toggle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
}

.settings-toggle input {
  margin-top: 2px;
}

.jira-config-form {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 640px;
}

.jira-push-toggle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.jira-config-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
  padding-top: 8px;
}

.jira-config-status {
  margin: 0;
}

.jira-config-status.is-ok {
  color: #2d6b3a;
  font-size: 13px;
}

.jira-config-status.is-error {
  color: #9b2c2c;
  font-size: 13px;
}

.jira-config-test {
  margin: 0;
  font-size: 13px;
  color: var(--mid);
}

.jira-config-test.is-error {
  color: #9b2c2c;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  width: min(320px, 100%);
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
}

.search {
  width: 100%;
  min-height: 18px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.35;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
}

.search::placeholder {
  color: var(--muted);
}

.list-search,
.toolbar-search,
.filter-select {
  height: var(--control-height);
  min-height: var(--control-height);
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel);
  font: inherit;
  font-size: 13.5px;
  line-height: 1;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
}

.list-search,
.toolbar-search {
  color: var(--text);
}

.filter-select {
  min-width: 150px;
  color: var(--subtle);
  cursor: pointer;
}

.list-search::placeholder,
.toolbar-search::placeholder {
  color: var(--muted);
}

.list-search:focus,
.toolbar-search:focus,
.filter-select:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 1px rgba(23, 23, 23, 0.08);
}

.filter-panel {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-soft);
  flex-shrink: 0;
}

.filter-panel__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 0 0 auto;
}

.filter-field__label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.filter-field .filter-select,
.filter-field .list-search {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: var(--control-height);
  min-height: var(--control-height);
  box-sizing: border-box;
}

.filter-panel__actions .btn {
  height: var(--control-height);
  min-height: var(--control-height);
}

.filter-field--search {
  flex: 1 1 200px;
  width: 200px;
  min-width: 180px;
  max-width: 280px;
}

.filter-field--assignee,
.filter-field--actor {
  flex: 1 1 180px;
  width: 180px;
  min-width: 160px;
  max-width: 240px;
}

.filter-field--status,
.filter-field--period,
.filter-field--project {
  flex: 0 0 148px;
  width: 148px;
  min-width: 132px;
  max-width: 200px;
}

.filter-field--date {
  flex: 0 0 152px;
  width: 152px;
}

.filter-field--custom.hidden {
  display: none;
}

.filter-panel__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
  padding-left: 4px;
}

.filter-panel__active {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.filter-panel__summary {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .filter-panel__actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .filter-field--search,
  .filter-field--assignee,
  .filter-field--actor {
    flex: 1 1 100%;
    max-width: none;
  }
}

.add-person-btn {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: var(--radius);
  font-size: 13px;
}

.add-person-btn span {
  font-size: 18px;
  line-height: 0;
  font-weight: 400;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.panel.panel--table {
  padding: 0;
}

.panel-table-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

.panel .admin-list-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.panel .admin-list-table.resizable-table {
  width: auto;
}

.panel .admin-list-table th,
.panel .admin-list-table td {
  padding: var(--table-cell-py, 6px) var(--table-cell-px, 12px);
  border-bottom: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.panel .admin-list-table th {
  background: var(--panel-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--th-size);
  font-weight: var(--th-weight);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: var(--lh-table-header);
}

.panel .admin-list-table tbody tr:last-child td {
  border-bottom: 0;
}

.panel .admin-list-table .col-list-actions {
  white-space: nowrap;
}

.panel .admin-list-table .col-list-actions .actions,
.panel .admin-list-table .actions {
  justify-content: center;
  width: 100%;
}

.panel .admin-list-table.resizable-table td:first-child {
  white-space: normal;
}

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

th, td {
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  font-size: 13.5px;
  overflow: hidden;
  word-break: break-word;
}

.panel table:not(.admin-list-table):not(.pack-decisions-table):not(.pack-decisions-table--browse) th:last-child,
.panel table:not(.admin-list-table):not(.pack-decisions-table):not(.pack-decisions-table--browse) td:last-child {
  width: auto;
  min-width: 108px;
  white-space: nowrap;
  overflow: visible;
  text-align: right;
}

th {
  background: var(--panel-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

tr:last-child td { border-bottom: 0; }
tr.disabled td { color: #aaa7a1; }

.person-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel .admin-list-table .person-cell {
  justify-content: center;
}

.panel .admin-list-table .person-cell > div {
  text-align: center;
}

.panel .admin-list-table .person-email-row,
.panel .admin-list-table .key-prefix-cell {
  justify-content: center;
}

.person-name {
  overflow: hidden;
  color: var(--text);
  font-size: inherit;
  font-weight: 700;
  line-height: var(--lh-table);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-email {
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

.dot-active { background: #5a9825; }
.dot-disabled { background: #a09f9b; }

.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 23px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--panel-soft);
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
}

tr.disabled .role-badge {
  border-color: var(--border);
  color: #aaa7a1;
}

.status-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--subtle);
}

.added-cell {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--subtle);
  background: var(--panel-soft);
  font-size: 13px;
  font-weight: 700;
}

.actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.panel .icon-action {
  width: 28px;
  height: 28px;
}

.panel .icon-action svg {
  width: 15px;
  height: 15px;
}

.icon-action {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-action:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.icon-action[data-tip] {
  position: relative;
}

.icon-action-tip {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--muted, #64748b);
  font-family: var(--font-sans, "DM Sans", sans-serif);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  padding: 0;
  pointer-events: none;
  position: fixed;
  white-space: nowrap;
  z-index: 10000;
}

.icon-action + .icon-action {
  position: relative;
}

.icon-action + .icon-action::before {
  content: "";
  position: absolute;
  left: -3px;
  width: 1px;
  height: 16px;
  background: var(--border);
}

.roles-grid {
  display: grid;
  gap: 14px;
  max-width: 980px;
  margin: 0 auto;
}

.role-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
}

.role-card strong {
  font-size: 13.5px;
}

.role-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.placeholder {
  max-width: 640px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.overlay {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0,0,0,.18);
  z-index: 20;
}

.overlay.open { display: block; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(380px, 100%);
  height: 100vh;
  transform: translateX(100%);
  transition: transform .2s ease;
  background: var(--panel);
  border-left: 1px solid var(--border);
  z-index: 21;
  display: flex;
  flex-direction: column;
}

.drawer.open { transform: translateX(0); }

.drawer-head,
.drawer-foot {
  padding: 16px 18px 13px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-head strong {
  font-size: 14px;
  line-height: 1.2;
}

.drawer-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.drawer-foot {
  border-top: 1px solid var(--border);
  border-bottom: 0;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 18px 13px;
}

.drawer-body {
  padding: 18px;
  overflow: auto;
  flex: 1;
}

.drawer .error {
  margin-top: 0;
  margin-bottom: 14px;
}

.drawer .field {
  margin-bottom: 14px;
}

.drawer .field label {
  margin-bottom: 5px;
  color: var(--subtle);
  font-size: 12.5px;
  font-weight: 600;
}

.drawer .field-hint {
  margin: -6px 0 14px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.drawer .field input,
.role-select-display {
  min-height: 34px;
  border-radius: var(--radius);
  padding: 7px 10px;
  font-size: 13px;
}

.role-select-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--muted);
}

.role-card-list {
  display: none;
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}

.role-card-list.open {
  display: block;
}

.role-option {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.role-option:last-child {
  border-bottom: 0;
}

.role-option:hover,
.role-option.selected {
  background: var(--panel-soft);
}

.role-option .role-badge {
  width: 32px;
  height: 23px;
  font-size: 12px;
}

.role-option-body {
  display: grid;
  gap: 4px;
}

.role-option-body strong {
  font-size: 13.5px;
}

.role-option-desc {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.role-option-perms {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.role-option-perms span {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 2px 6px;
  font-size: 10px;
}

.drawer-foot .btn {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: var(--radius);
  font-size: 13px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.18);
  z-index: 30;
}

.modal.open { display: flex; }

.modal-card {
  width: min(380px, calc(100vw - 32px));
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 20px;
}

.modal-card .error {
  margin-top: 0;
  margin-bottom: 12px;
}

.modal-card-wide {
  width: min(720px, calc(100vw - 32px));
}

.people-import-card {
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.people-import-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.people-import-upload {
  cursor: pointer;
}

.people-import-file {
  font-size: 13.5px;
}

.people-import-error {
  margin-bottom: 12px;
}

.people-import-summary {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.import-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.import-pill--ready {
  background: #edf7ee;
  color: #2f6b34;
}

.import-pill--rejected {
  background: #fff1f0;
  color: #9b2c2c;
}

.import-pill--existing {
  background: #f3f1ed;
  color: var(--muted);
}

.decisions-import-topics {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.decisions-import-topic-card {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}

.decisions-import-topic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.decisions-import-topic-head strong {
  font-size: 14px;
}

.decisions-import-rejected-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.people-import-table-wrap {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.people-import-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.people-import-table th,
.people-import-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.people-import-table th {
  position: sticky;
  top: 0;
  background: var(--panel-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.import-row--rejected {
  background: #fff9f8;
}

.import-reason {
  color: var(--muted);
  max-width: 220px;
}

.resizable-table {
  table-layout: fixed;
  width: auto;
}

.resizable-table th.rt-col-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-right: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resizable-table td {
  display: table-cell;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resizable-table tr {
  display: table-row;
}

.resizable-table td.col-list-actions,
.resizable-table th.col-list-actions {
  overflow: visible;
  text-overflow: clip;
}

.resizable-table td.col-list-actions .list-row-actions,
.resizable-table td.col-list-actions .actions {
  overflow: visible;
}

.resizable-table td.col-status.list-meta {
  white-space: normal;
  line-height: 1.35;
}

.resizable-table td[data-col-wrap="1"] {
  white-space: normal;
}

.resizable-table .rt-col-resize {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
  z-index: 3;
}

.resizable-table .rt-col-resize::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 1px;
  background: transparent;
  transition: background 0.15s ease, width 0.15s ease, left 0.15s ease;
}

.resizable-table .rt-col-resize:hover::before,
.resizable-table .rt-col-resize:focus-visible::before,
body.rt-col-resizing .resizable-table .rt-col-resize::before {
  left: 3px;
  width: 2px;
  background: #8f8b84;
}

.resizable-table .rt-col-resize:focus-visible {
  outline: none;
}

body.rt-col-resizing {
  cursor: col-resize;
  user-select: none;
}

.resizable-table .col-tier,
.resizable-table .col-num,
.resizable-table .col-author,
.resizable-table .col-status,
.resizable-table .col-updated,
.resizable-table .col-list-actions {
  width: auto;
  min-width: 0;
  max-width: none;
}

.policy-packs-page .resizable-table th:first-child,
.policy-packs-page .resizable-table td:first-child {
  min-width: 0 !important;
  width: auto !important;
}

.policy-packs-page .resizable-table .col-updated.list-meta,
.policy-packs-page .resizable-table .col-num.list-meta {
  white-space: nowrap;
}

.policy-packs-page .resizable-table .list-policy-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.policy-packs-page .resizable-table td:first-child {
  white-space: normal;
}

.modal-title {
  margin: 0 0 8px;
  font-size: 18px;
}

.modal-lead {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.45;
}

.api-key-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.api-key-reveal {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.api-key-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.35;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: var(--panel-soft);
}

.api-key-hint {
  margin: 12px 0 0;
  font-size: 13px;
}

.api-key-meta {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.api-key-meta > div {
  display: grid;
  gap: 2px;
}

.api-key-meta dt {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.api-key-meta dd {
  margin: 0;
  font-size: 13px;
}

.warn-box {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #e8d19d;
  border-radius: var(--radius);
  background: #fff8e8;
  color: var(--subtle);
  font-size: 13.5px;
  line-height: 1.45;
}

.key-prefix-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.key-prefix-btn:hover {
  text-decoration: underline;
}

.modal-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.notice-host {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.18);
  z-index: 40;
  padding: 16px;
}

.notice-host.open {
  display: flex;
}

.notice-card {
  width: min(420px, calc(100vw - 32px));
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.notice-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.notice-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #edf7ee;
  color: var(--success);
}

.notice-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notice-copy {
  min-width: 0;
}

.notice-title {
  margin: 2px 0 6px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.notice-body {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.notice-actions {
  margin-top: 18px;
}

.tablet-topbar {
  display: none;
}

.shell-nav-overlay {
  display: none;
}

body.shell-nav-body-lock {
  overflow: hidden;
}

/* Table polish only — keeps desktop sidebar shell above 768px (laptops). */
@media (max-width: 1024px) {
  .page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .page-head .page-controls-actions,
  .page-head .tasks-page-head-actions {
    width: 100%;
    margin-left: 0;
  }

  .people-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .people-toolbar-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .people-toolbar-actions .btn {
    flex: 1 1 auto;
  }

  .icon-action {
    width: 44px;
    height: 44px;
  }

  .panel .icon-action {
    width: 44px;
    height: 44px;
  }

  .filter-panel__actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .filter-field--search,
  .filter-field--assignee,
  .filter-field--actor {
    flex: 1 1 100%;
    max-width: none;
  }
}

/* Phone / narrow tablet: overlay nav drawer. */
@media (max-width: 768px) {
  .tablet-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin: calc(-1 * clamp(16px, 2vw, 24px)) calc(-1 * clamp(16px, 2vw, 24px)) 14px;
    padding: 10px clamp(16px, 2vw, 24px);
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 4;
  }

  .tablet-nav-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
  }

  .tablet-nav-open-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .tablet-nav-open-btn:hover,
  .tablet-nav-open-btn:focus-visible {
    border-color: var(--border-strong);
    background: var(--panel-soft);
    outline: none;
  }

  .tablet-topbar-brand {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .shell-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.32);
    z-index: 28;
  }

  .shell--nav-open .shell-nav-overlay {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    max-width: 280px;
    height: 100%;
    max-height: 100dvh;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    z-index: 30;
    box-shadow: 8px 0 28px rgba(15, 23, 42, 0.12);
    border-right: 1px solid var(--border);
    border-bottom: 0;
  }

  .shell--nav-open .sidebar {
    transform: translateX(0);
  }

  .main {
    grid-column: 1;
    width: 100%;
  }

  .sidebar-collapse-btn {
    display: none;
  }

  .shell--sidebar-collapsed .brand-name,
  .shell--sidebar-collapsed .nav button span,
  .shell--sidebar-collapsed .account-head strong,
  .shell--sidebar-collapsed .account > .muted,
  .shell--sidebar-collapsed .account > .pill,
  .shell--sidebar-collapsed .nav-group-label {
    display: revert;
  }

  .shell--sidebar-collapsed .sidebar-brand {
    flex-direction: row;
    align-items: center;
    padding: 12px 12px 10px;
  }

  .shell--sidebar-collapsed .nav button {
    display: flex;
    width: 100%;
    min-height: 44px;
    padding: 8px 16px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    grid-template-columns: none;
    position: static;
    overflow: hidden;
  }

  .shell--sidebar-collapsed .nav button span {
    opacity: 1;
    width: auto;
    padding: 0;
    pointer-events: auto;
  }

  .shell--sidebar-collapsed .account {
    padding: 12px 16px 14px;
    justify-items: stretch;
  }

  .shell--sidebar-collapsed .account-menu-btn {
    width: auto;
    height: auto;
  }

  .shell--sidebar-collapsed .account-menu-btn-icon {
    display: inline-flex;
  }

  .shell--sidebar-collapsed .account-menu {
    left: 0;
    right: 0;
    bottom: calc(100% + 8px);
  }

  .shell--sidebar-collapsed #logoutBtn {
    display: inline-flex;
  }

  .nav button {
    min-height: 44px;
    padding: 10px 16px;
  }

  .nav-section .nav-group button,
  .nav-section > button {
    min-height: 44px;
  }

  .account-menu-btn {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 768px) and (hover: hover) and (pointer: fine) {
  .shell--sidebar-collapsed .nav button:is(:hover, :focus-visible) {
    width: 100%;
    grid-template-columns: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

.billing-plans-panel {
  margin-bottom: 16px;
  padding: 16px 18px 18px;
  overflow: visible;
}

.billing-page-panel {
  padding: 20px 22px 18px;
  overflow: visible;
}

.billing-plan-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
}

.billing-plan-strip-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
  min-width: 0;
}

.billing-plan-name {
  font-size: 1.05rem;
  font-weight: 600;
}

.billing-plan-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-raised);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.billing-plan-lead {
  margin: 10px 0 0;
  font-size: 14px;
  max-width: 62ch;
}

.billing-limits-block {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.billing-section-head {
  margin-bottom: 14px;
}

.billing-section-label {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--subtle);
}

.billing-section-lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  max-width: 68ch;
}

.billing-limit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.billing-limit-item {
  display: grid;
  gap: 8px;
}

.billing-limit-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.billing-limit-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.billing-limit-count {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.billing-limit-sep,
.billing-limit-max {
  font-weight: 500;
  color: var(--muted);
}

.billing-page-footer {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.billing-summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 10px 12px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-raised);
}

.billing-summary-plan {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  min-width: 0;
}

.billing-summary-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.billing-summary-plan strong {
  font-size: 1.05rem;
}

.billing-summary-meta {
  font-size: 13px;
  color: var(--muted);
}

.billing-summary-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.billing-summary-metric {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  font-size: 12px;
  white-space: nowrap;
}

.billing-summary-metric-label {
  color: var(--muted);
}

.billing-plans-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 16px;
}

.billing-plans-head h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.billing-plans-head p {
  margin: 0;
  font-size: 13px;
}

.billing-plans-panel .panel-head {
  margin-bottom: 16px;
}

.billing-plans-panel .panel-head h2 {
  margin: 0 0 4px;
}

.billing-plans-panel .panel-head p {
  margin: 0;
}

.billing-current-head h2 {
  margin: 4px 0 0;
}

.billing-status-line {
  margin: 6px 0 0;
}

.billing-usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.billing-usage-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--panel-raised);
}

.billing-usage-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.billing-usage-value {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.billing-usage-meter {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 55%, transparent);
  overflow: hidden;
}

.billing-usage-meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-deep);
  transition: width 0.2s ease;
}

.billing-usage-meter--warn > span {
  background: #c98a1a;
}

.billing-usage-meter--high > span {
  background: #c94c4c;
}

.billing-limit-notice {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.billing-limit-notice--warn {
  color: #a66b12;
}

.billing-limit-cta {
  margin: 12px 0 0;
  font-size: 13px;
}

.billing-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.billing-plan-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.billing-billing-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--panel-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.billing-period-btn {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
}

.billing-period-btn.is-active {
  background: var(--tab-active-bg);
  color: var(--tab-active-fg);
}

.billing-save {
  font-size: 12px;
  color: var(--success);
  font-weight: 600;
  margin-left: 4px;
}

.billing-plan-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--panel-raised);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: 0 1px 2px rgba(20, 18, 16, 0.05);
}

.billing-plan-card.is-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(201, 169, 98, 0.25), 0 1px 2px rgba(20, 18, 16, 0.05);
}

.billing-plan-card h3 {
  margin: 0 0 8px;
}

.billing-plan-price {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.billing-plan-price span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.billing-plan-trial,
.billing-plan-estimate {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 500;
}

.billing-plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  font-size: 14px;
  flex: 1 1 auto;
}

.billing-plan-features li {
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}

.billing-plan-features li:last-child {
  border-bottom: 0;
}

.billing-test-note {
  margin-top: 12px;
}

.billing-early-access-copy {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.billing-early-access-copy h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.billing-early-access-copy p {
  margin: 0 0 12px;
}

.billing-plans-panel--simple .billing-early-access-copy--solo {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.billing-plans-panel--simple .billing-early-access-copy--solo p {
  margin: 0;
}

.billing-plan-btn {
  margin-top: auto;
  width: 100%;
}

@media (max-width: 900px) {
  .billing-plan-grid--two {
    grid-template-columns: 1fr;
  }
}

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

@media (max-width: 640px) {
  .billing-plan-grid {
    grid-template-columns: 1fr;
  }

  .billing-summary-bar,
  .billing-plans-head {
    align-items: stretch;
  }

  .billing-summary-metrics {
    width: 100%;
  }
}
