/* CharityManager design tokens — BoardRoom near-clone (UI-SPEC D-03…D-06) */
:root {
  --primary: #0f172a;
  --primary-hover: #1e293b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 8px;
  --radius-lg: 12px;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  --font-body: 14px;
  --font-label: 12px;
  --font-heading: 18px;
  --font-display: 24px;

  --topbar-height: 60px;
  --sidebar-width: 240px;
  --drawer-max-width: 280px;
  --canvas-max: 1440px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-page);
}

body.shell-scroll-locked {
  overflow: hidden;
}

h1, .text-display {
  font-size: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

h2, .text-heading {
  font-size: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

.text-label {
  font-size: var(--font-label);
  font-weight: 600;
  line-height: 1.4;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ——— Shell layout ——— */

.app-shell {
  min-height: 100vh;
  display: flex;
  background: var(--bg-page);
}

.shell-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: min(var(--drawer-max-width), 85vw);
  max-width: var(--drawer-max-width);
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.app-shell.drawer-open .shell-sidebar {
  transform: translateX(0);
}

.shell-sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  height: var(--topbar-height);
  padding: 0 var(--space-lg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.shell-nav {
  padding: var(--space-sm);
  flex: 1;
}

.shell-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.shell-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0 var(--space-md);
  box-shadow: var(--shadow-sm);
}

.shell-topbar-start {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
}

.shell-topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.shell-hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}

.shell-hamburger:hover {
  background: var(--bg-subtle);
}

.shell-hamburger svg {
  width: 24px;
  height: 24px;
}

.shell-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
  text-decoration: none;
  color: var(--text-primary);
}

.shell-brand-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
}

.shell-brand-icon svg {
  width: 18px;
  height: 18px;
}

.shell-brand-wordmark {
  font-size: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 35;
  background: color-mix(in srgb, #0f172a 40%, transparent);
  border: none;
  padding: 0;
  cursor: pointer;
}

.app-shell.drawer-open .shell-overlay {
  display: block;
}

.shell-page {
  flex: 1;
  width: 100%;
  max-width: var(--canvas-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 44px;
  padding: 0 var(--space-md);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: var(--font-body);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-accent:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.btn-secondary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Nav links (filled by NavMenu) */
.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--font-body);
  font-weight: 400;
  line-height: 1.3;
  max-width: 100%;
}

.nav-link:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Operator-only SysAdmin group: structural separator (D-10). No label, badge, fill or accent. */
.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

/* Shared folders section (Phase 35, UI-SPEC §A): structural separator, no label/fill/accent. */
.nav-shared {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

/* Shared folders section label (Phase 35, UI-SPEC §A): muted uppercase eyebrow. */
.nav-group-label {
  padding: var(--space-xs) var(--space-md) 0;
  font-size: var(--font-label);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-muted);
}

/* Shared-folder entry secondary owning-team label, inline after the folder name (SIDE-02). */
.nav-link-team {
  color: var(--text-muted);
  font-size: var(--font-label);
  font-weight: 400;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* User chip */
.user-chip-wrap {
  position: relative;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
  min-height: 44px;
  padding: 0 var(--space-sm);
  border: none;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.user-chip:hover {
  background: var(--bg-subtle);
}

.user-chip:disabled {
  cursor: default;
}

.user-chip-avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: var(--font-label);
  font-weight: 600;
}

.user-chip-name {
  font-size: var(--font-body);
  color: var(--text-primary);
  max-width: 16ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Account menu (D-06, D-07, D-13) — geometry from prior identity-switcher */
.account-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: transparent;
}

.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-sm));
  z-index: 51;
  display: flex;
  flex-direction: column;
  width: min(280px, calc(100vw - 32px));
  max-width: 280px;
  max-height: 50vh;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  outline: none;
}

.account-menu-list {
  list-style: none;
  margin: 0;
  padding: var(--space-xs);
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.account-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: var(--space-xs) var(--space-sm);
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--font-body);
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}

.account-menu-item:hover {
  background: var(--bg-subtle);
}

/* Team switcher section (D-01, TSES-01) */
.account-menu-section-label {
  padding: var(--space-xs) var(--space-sm) 0;
  font-size: var(--font-label);
  font-weight: 600;
  color: var(--text-muted);
}

.account-menu-team-item {
  gap: var(--space-xs);
}

.account-menu-team-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-team-name--current {
  font-weight: 600;
  color: var(--text-primary);
}

.account-menu-check {
  flex-shrink: 0;
  color: var(--accent);
}

.account-menu-divider {
  height: 1px;
  margin: var(--space-xs) 0;
  background: var(--border);
}

/* Soft-gate empty state */
.soft-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 360px;
  margin: var(--space-2xl) auto;
  padding: var(--space-xl) var(--space-md);
}

.soft-gate img {
  width: 160px;
  height: 160px;
  margin-bottom: var(--space-lg);
}

.soft-gate h1 {
  font-size: var(--font-heading);
  font-weight: 600;
  margin: 0 0 var(--space-sm);
  color: var(--text-primary);
}

.soft-gate-copy {
  margin: 0;
  font-size: var(--font-body);
  color: var(--text-secondary);
}

/* Error / not-found within shell */
.error-state {
  max-width: 360px;
  margin: var(--space-2xl) auto;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
}

.error-state h1 {
  font-size: var(--font-heading);
  margin: 0 0 var(--space-sm);
}

.error-state p {
  margin: 0;
  color: var(--text-secondary);
}

/* Page chrome (Dashboard / Meetings) */
.page-header {
  margin-bottom: var(--space-xl);
}

.page-title {
  margin: 0;
  font-size: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

.page-subtitle {
  margin: var(--space-xs) 0 0;
  font-size: var(--font-body);
  color: var(--text-secondary);
}

/* Dashboard scorecards */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Secondary 2×2 under scorecards — phone stack, desktop ≥769px two columns (UI-SPEC). */
.dashboard-secondary {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 769px) {
  .dashboard-secondary {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dashboard-secondary > .detail-card {
  min-width: 0;
}

.dashboard-secondary .detail-card-title {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dashboard-feed-panel {
  min-width: 0;
}

.dashboard-feed-heading {
  margin: 0 0 var(--space-md);
  font-size: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

.dashboard-feed-empty {
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.dashboard-feed-empty .meetings-empty-title {
  margin: 0 0 var(--space-sm);
}

.dashboard-feed-empty .meetings-empty-copy {
  margin: 0 0 var(--space-md);
}

.dashboard-feed-empty .detail-card-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-sm);
  text-decoration: none;
}

.dashboard-feed-empty .detail-card-action:hover {
  text-decoration: underline;
}

.stat-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.blue {
  background: #eff6ff;
  color: var(--accent);
}

.stat-icon.green {
  background: var(--success-bg);
  color: var(--success);
}

.stat-icon.amber {
  background: var(--warning-bg);
  color: var(--warning);
}

.stat-icon.slate {
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.stat-value {
  font-size: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: var(--space-xs);
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-label);
  font-weight: 500;
  margin-top: var(--space-sm);
  padding: 2px 8px;
  border-radius: 4px;
}

.stat-change.positive {
  background: var(--success-bg);
  color: #059669;
}

.stat-change.negative {
  background: var(--danger-bg);
  color: #dc2626;
}

.stat-change.neutral {
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.detail-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.detail-card:hover {
  box-shadow: var(--shadow-md);
}

.detail-card-eyebrow {
  margin: 0 0 var(--space-md);
  font-size: var(--font-label);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-card-title {
  margin: 0 0 var(--space-sm);
  font-size: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
}

.detail-card-meta {
  margin: 0 0 var(--space-lg);
  font-size: 13px;
  color: var(--text-secondary);
}

.detail-card-action {
  font-size: var(--font-body);
  font-weight: 600;
  color: var(--accent);
}

/* Meetings list — card stack (D-03) */
.meetings-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.meeting-card {
  display: block;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.meeting-card:hover {
  box-shadow: var(--shadow-md);
}

.meeting-card-title {
  margin: 0 0 var(--space-sm);
  font-size: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.meeting-card-meta {
  margin: 0 0 var(--space-md);
  font-size: var(--font-body);
  color: var(--text-secondary);
  line-height: 1.5;
  word-break: break-word;
}

.meetings-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 0 0 var(--space-lg);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: var(--font-label);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.filter-chip:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.filter-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.filter-chip--active {
  border-color: var(--accent);
  background: #eff6ff;
  color: var(--accent-hover);
}

.meetings-loading {
  margin: var(--space-xl) 0;
  font-size: var(--font-label);
  font-weight: 600;
  color: var(--text-muted);
}

/* Live Run — content-width column; notes use full available width (MEET-13) */
.page-meeting-live-run {
  max-width: min(100%, var(--canvas-max, 960px));
  margin-inline: auto;
  width: 100%;
}

.live-run-header {
  margin-bottom: var(--space-lg);
}

.live-run-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
}

.live-run-header-row .page-title {
  margin-bottom: var(--space-xs);
}

.live-run-start-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.live-run-section {
  margin-top: var(--space-2xl);
}

.live-run-section-title {
  margin: 0 0 var(--space-md);
  font-size: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
}

.live-run-empty-attendees {
  margin: 0;
  color: var(--text-secondary);
}

.live-run-guests-title {
  margin-top: var(--space-xl);
}

.live-run-attendees {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.live-run-attendee-row {
  margin: 0;
}

.live-run-add-item {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  align-items: center;
}

.live-run-add-item .form-input {
  flex: 1 1 12rem;
  min-width: 0;
}

.live-run-add-item .btn {
  min-height: 44px;
}

.live-run-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
}

/* Autosave indicator */
.autosave-indicator {
  margin: 0;
  font-size: var(--font-label);
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  min-height: 1.2em;
}

.autosave-indicator--idle {
  visibility: hidden;
}

.autosave-indicator--saving,
.autosave-indicator--saved {
  color: var(--text-muted);
}

.autosave-indicator--error {
  color: var(--danger);
  white-space: normal;
  max-width: 14rem;
  text-align: right;
}

/* Presence Present/Absent (D-07) — hit target ≥44px */
.presence-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.presence-toggle-name {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 0;
  flex: 1 1 8rem;
}

.presence-toggle-name--absent {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.presence-toggle-control {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-subtle);
}

.presence-toggle-btn {
  min-height: 44px;
  min-width: 5.5rem;
  padding: 0 var(--space-md);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--font-body);
  font-weight: 600;
  cursor: pointer;
}

.presence-toggle-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.presence-toggle-btn--selected.presence-toggle-btn--present {
  background: var(--success-bg);
  color: #047857;
}

.presence-toggle-btn--selected.presence-toggle-btn--absent {
  background: var(--danger-bg);
  color: #dc2626;
}

/* Agenda accordion (D-06) */
.agenda-accordion-empty {
  margin: 0 0 var(--space-md);
  color: var(--text-secondary);
}

.agenda-accordion-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.agenda-accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.agenda-accordion-heading {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.agenda-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: 100%;
  min-height: 44px;
  padding: var(--space-md);
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.agenda-accordion-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.agenda-accordion-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
}

.agenda-accordion-panel {
  padding: 0 var(--space-md) var(--space-md);
  border-top: 1px solid var(--border);
}

.agenda-accordion-notes-heading {
  display: block;
  margin-top: var(--space-sm);
}

.agenda-accordion-notes {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 96px;
  max-height: 40vh;
  resize: vertical;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.agenda-accordion-notes-readonly {
  margin: 0;
  padding: 0 var(--space-md) var(--space-md);
  color: var(--text-secondary);
  font-size: var(--font-body);
  white-space: pre-wrap;
  word-break: break-word;
}

.agenda-accordion-actions-block {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.agenda-accordion-actions-heading {
  margin: 0;
  font-size: var(--font-label);
  font-weight: 600;
  color: var(--text-primary);
}

.agenda-accordion-actions-empty {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-body);
}

.agenda-accordion-actions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.agenda-accordion-actions--collapsed {
  padding: 0 var(--space-md) var(--space-sm);
}

.agenda-accordion-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs) var(--space-sm);
}

.agenda-accordion-action-title {
  font-weight: 600;
  color: var(--text-primary);
}

.agenda-accordion-action-meta {
  color: var(--text-secondary);
  font-size: var(--font-label);
}

.agenda-accordion-action-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.agenda-accordion-action-form .btn {
  align-self: flex-start;
  min-height: 44px;
}

.meetings-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.meeting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: 44px;
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

a.meeting-row:hover {
  box-shadow: var(--shadow-md);
}

.meeting-row--static {
  cursor: default;
}

.meeting-row-main {
  min-width: 0;
  flex: 1;
}

.meeting-row-title {
  font-size: var(--font-body);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meeting-row-meta {
  margin-top: 2px;
  font-size: var(--font-label);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meetings-empty {
  max-width: 360px;
  margin: var(--space-2xl) auto;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
}

.meetings-empty-title {
  margin: 0 0 var(--space-sm);
  font-size: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
}

.meetings-empty-copy {
  margin: 0;
  font-size: var(--font-body);
  color: var(--text-secondary);
}

/* Status pills (D-09) */
.status-pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: var(--font-label);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.status-pill--scheduled {
  background: #eff6ff;
  color: var(--accent-hover);
}

.status-pill--started {
  background: var(--warning-bg);
  color: #b45309;
}

.status-pill--completed {
  background: var(--success-bg);
  color: #047857;
}

.status-pill--cancelled {
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.status-pill--muted {
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

/* Meeting detail */
.meeting-detail-header .status-pill {
  margin-top: var(--space-md);
}

.meeting-detail-description {
  margin: 0 0 var(--space-lg);
  font-size: var(--font-body);
  line-height: 1.5;
  color: var(--text-secondary);
  word-break: break-word;
}

.meeting-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 0 0 var(--space-xl);
}

.form-banner-cancelled {
  margin: 0 0 var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: var(--font-body);
  font-weight: 600;
}

.meeting-detail-section {
  margin-bottom: var(--space-xl);
}

.meeting-detail-section-title {
  margin: 0 0 var(--space-md);
  font-size: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
}

.meeting-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Keep the Add Action button spaced from the last action card by the same gap used between action cards */
.meeting-detail-list + .btn {
  margin-top: var(--space-sm);
}

.meeting-detail-list--ordered {
  list-style: none;
  padding-left: 0;
  counter-reset: meeting-detail-agenda;
}

.meeting-detail-list-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.meeting-detail-list-item-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: calc(-1 * var(--space-md));
  padding: var(--space-md);
  text-decoration: none;
  color: inherit;
  border-radius: inherit;
}

.meeting-detail-list-item-link:hover {
  background: var(--bg-subtle);
}

.meeting-detail-list--ordered > .meeting-detail-list-item {
  counter-increment: meeting-detail-agenda;
}

.meeting-detail-list--ordered > .meeting-detail-list-item > .meeting-detail-item-title::before {
  content: counter(meeting-detail-agenda) ". ";
}

.meeting-detail-item-title {
  font-size: var(--font-body);
  font-weight: 600;
  color: var(--text-primary);
}

.meeting-detail-guests-title {
  margin-top: var(--space-xl);
}

.meeting-detail-item-meta {
  font-size: var(--font-label);
  color: var(--text-secondary);
}

/* Meeting summary preview */
.page-meeting-summary {
  max-width: 720px;
}

.meeting-summary-preview {
  margin: 0 0 var(--space-xl);
}

.meeting-summary-ref {
  margin: 0 0 var(--space-xs);
  font-size: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
}

.meeting-summary-meta {
  margin: 0 0 var(--space-lg);
  font-size: var(--font-body);
  color: var(--text-secondary);
}

.meeting-summary-notes {
  margin: var(--space-xs) 0 0;
  font-size: var(--font-body);
  line-height: 1.5;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.meeting-summary-empty {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-body);
}

.meeting-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 0 0 var(--space-xl);
}

.confirm-dialog.add-action-dialog {
  width: min(100%, 480px);
  max-height: min(90vh, 720px);
  overflow: auto;
}

.add-action-dialog-form .form-field {
  margin-bottom: var(--space-md);
}

/* Meeting create / edit forms */
.page-meeting-form {
  max-width: 640px;
}

.meeting-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-label {
  font-size: var(--font-label);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* Detail pages: bold Label + Value on one horizontal row (ACTN-12 / RISK-12) */
.detail-labeled-row {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  column-gap: var(--space-md);
  align-items: center;
}

.detail-labeled-row .form-label {
  font-size: var(--font-body);
  font-weight: 700;
  margin: 0;
}

.detail-labeled-row > :not(.form-label) {
  min-width: 0;
}

.form-readonly {
  margin: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 var(--space-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--font-body);
  color: var(--text-muted);
}

.form-input {
  min-height: 44px;
  padding: 0 var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-family: inherit;
  font-size: var(--font-body);
  line-height: 1.5;
  color: var(--text-primary);
}

.form-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-input--invalid {
  border-color: var(--danger);
}

.form-textarea {
  min-height: 96px;
  padding: var(--space-sm) var(--space-md);
  resize: vertical;
}

.form-field-error {
  margin: 0;
  font-size: var(--font-label);
  font-weight: 600;
  color: var(--danger);
}

.form-banner-error {
  margin: 0;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: var(--font-body);
  font-weight: 600;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

/* Destructive confirm dialog (Discard / Cancel meeting / Reopen) */
.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: color-mix(in srgb, var(--danger) 85%, #000);
  color: #fff;
}

.confirm-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: color-mix(in srgb, #0f172a 40%, transparent);
}

/* CR-01 (iteration 2): ParticipantsDialog renders its nested ConfirmDialog as a sibling of
   .participants-dialog-backdrop, which is z-index 200. Without this lift the confirm backdrop
   (z-index 60) paints and hit-tests underneath the participants modal, so the "Remove
   participant?" prompt is obscured and every click lands on the participants backdrop and
   dismisses the whole dialog. A scoped ::deep rule cannot reach a sibling, so the relationship is
   matched globally by sibling combinator (the only place this composition exists). */
.participants-dialog-backdrop ~ .confirm-dialog-backdrop {
  z-index: 300;
}

.confirm-dialog {
  width: min(100%, 420px);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  outline: none;
}

.confirm-dialog.name-collision-dialog {
  width: min(100%, 400px);
}

.name-collision-dialog .confirm-dialog-body {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.name-collision-dialog .form-field {
  margin-bottom: var(--space-md);
}

.confirm-dialog-title {
  margin: 0 0 var(--space-sm);
  font-size: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.confirm-dialog-body {
  margin: 0 0 var(--space-lg);
  font-size: var(--font-body);
  line-height: 1.5;
  color: var(--text-secondary);
}

.confirm-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-sm);
}

.form-banner-info {
  margin: 0 0 var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  background: var(--warning-bg);
  color: #b45309;
  font-size: var(--font-body);
  font-weight: 600;
}

.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;
}

/* AttendeePicker / OwnerPicker empty (D-17) */
.picker-empty {
  margin: 0;
  padding: var(--space-sm) 0;
}

.picker-empty-heading {
  margin: 0 0 var(--space-xs);
  font-size: var(--font-body);
  font-weight: 600;
  color: var(--text-primary);
}

.picker-empty-body {
  margin: 0;
  font-size: var(--font-body);
  color: var(--text-muted);
}

.attendee-picker-empty,
.agenda-editor-empty {
  margin: 0;
  font-size: var(--font-body);
  color: var(--text-muted);
}

.attendee-picker-directory {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: var(--space-sm);
}

.attendee-picker-directory-item {
  margin: 0;
}

.attendee-picker-check {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  padding: 0 var(--space-sm);
  border-radius: var(--radius);
  cursor: pointer;
}

.attendee-picker-check:hover {
  background: var(--bg-subtle);
}

.attendee-picker-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.attendee-picker-check-label {
  font-size: var(--font-body);
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.attendee-picker-selected,
.attendee-picker-guests {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.attendee-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  max-width: 100%;
  min-height: 44px;
  padding: 0 var(--space-sm) 0 var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.attendee-chip-name {
  font-size: var(--font-body);
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.attendee-chip-guest {
  font-size: var(--font-label);
  font-weight: 600;
  color: var(--text-muted);
}

.attendee-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.attendee-chip-remove:hover {
  color: var(--danger);
}

.attendee-picker-add {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.attendee-picker-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: stretch;
}

.attendee-picker-add-row .form-input {
  flex: 1 1 180px;
  min-width: 0;
}

.owner-picker select.form-input {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* AgendaEditor */
.agenda-editor-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  counter-reset: agenda-item;
}

.agenda-editor-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: stretch;
  counter-increment: agenda-item;
}

.agenda-editor-row .form-input {
  flex: 1 1 200px;
  min-width: 0;
}

.agenda-editor-row .form-input::placeholder {
  color: var(--text-muted);
}

.agenda-editor-remove {
  flex: 0 0 auto;
}

/* Blazor validation helpers */
.valid.modified:not([type=checkbox]) {
  outline: 1px solid #26b050;
}

.invalid {
  outline: 1px solid #e50000;
}

.validation-message {
  color: #e50000;
}

.blazor-error-boundary {
  background: #b32121;
  padding: 1rem;
  color: white;
}

/* ≤768px: hamburger + drawer (base styles). ≥769px: persistent sidebar */
@media (max-width: 768px) {
  .shell-topbar {
    padding: 0 var(--space-md);
  }
}

@media (min-width: 769px) {
  .shell-sidebar {
    position: sticky;
    top: 0;
    width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    transform: none;
    flex-shrink: 0;
    height: 100vh;
  }

  .shell-hamburger {
    display: none;
  }

  .shell-topbar .shell-brand {
    display: none;
  }

  .shell-overlay {
    display: none !important;
  }

  .shell-page {
    padding: var(--space-xl) var(--space-lg);
  }

  .app-shell.drawer-open .shell-sidebar {
    transform: none;
  }
}

@media (max-width: 319px) {
  .shell-brand-wordmark {
    display: none;
  }
}

/* Action status pills (D-11) */
.status-pill--open {
  background: #eff6ff;
  color: var(--accent-hover);
}

.status-pill--in-progress {
  background: var(--warning-bg);
  color: #b45309;
}

.status-pill--closed {
  background: var(--success-bg);
  color: #047857;
}

.status-pill--reviewing {
  background: var(--warning-bg);
  color: #b45309;
}

.status-pill--mitigated {
  background: var(--success-bg);
  color: #047857;
}

.status-pill--archived {
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.risk-rating--high {
  color: var(--text-primary);
  font-weight: 600;
}

.risk-rating--medium {
  color: var(--text-secondary);
  font-weight: 600;
}

.risk-rating--low {
  color: var(--text-muted);
  font-weight: 600;
}

/* Actions list header + scan list (D-05) */
.page-actions-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .page-actions-header {
    flex-direction: column;
    align-items: stretch;
  }
}

.actions-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 0 0 var(--space-lg);
}

.action-scan-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.action-scan-list > li:last-child .action-row {
  border-bottom: none;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-xs) var(--space-md);
  align-items: center;
  min-height: 56px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  text-decoration: none;
  color: inherit;
  box-shadow: none;
}

.action-row:hover {
  background: var(--bg-subtle);
}

.action-row--overdue {
  border-left: 4px solid var(--danger);
  padding-left: 12px;
}

.action-row-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.action-row-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--font-label);
  color: var(--text-secondary);
  min-width: 0;
}

.action-row-owner {
  max-width: 16ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-row-meta-sep {
  display: none;
}

.action-row-due {
  min-width: 0;
}

.action-row-due--overdue {
  color: var(--danger);
  font-weight: 600;
}

.action-row-overdue-label {
  margin-left: var(--space-xs);
  font-size: var(--font-label);
  font-weight: 600;
  color: var(--danger);
}

@media (max-width: 768px) {
  .action-row-title {
    grid-column: 1;
    grid-row: 1;
  }

  .action-row .status-pill {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    flex-shrink: 0;
  }

  .action-row-meta {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: var(--space-xs);
  }

  .action-row-meta-sep {
    display: inline;
  }

  .action-row-owner {
    max-width: none;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
  }
}

@media (min-width: 769px) {
  .action-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .action-row-title {
    grid-column: 1;
  }

  .action-row-meta {
    grid-column: 2;
    justify-content: flex-end;
    gap: var(--space-md);
  }

  .action-row .status-pill {
    grid-column: 3;
    flex-shrink: 0;
  }
}

/* Documents empty illustration + scan list (D-03, D-04)
   DOCS-14: overflow-x:hidden forced overflow-y into a clip scrollport that trapped absolute kebabs. */
.page-documents {
  overflow: visible;
}

.documents-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.documents-upload-label {
  margin: 0;
  cursor: pointer;
}

/* Shared-from owning-team eyebrow (Phase 35, UI-SPEC §C): muted uppercase label above the title. */
.documents-shared-eyebrow {
  margin: 0 0 var(--space-xs);
  font-size: var(--font-label);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-muted);
  text-transform: uppercase;
}

.documents-upload-progress {
  margin: 0 0 var(--space-sm);
  font-size: var(--font-label);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-secondary);
}

.documents-skip-banners {
  margin: 0 0 var(--space-md);
}

.documents-skip-banners p {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.documents-skip-banners p + p {
  margin-top: var(--space-xs);
}

.documents-drop-zone {
  position: relative;
  min-height: 120px;
  overflow: visible;
}

.documents-drop-overlay {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  font-size: var(--font-body);
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
  background: color-mix(in srgb, var(--bg-subtle) 92%, transparent);
  border-radius: var(--radius-lg);
  pointer-events: none;
  z-index: 2;
}

@media (min-width: 769px) {
  .documents-drop-zone--active {
    outline: 2px dashed var(--accent);
    outline-offset: 2px;
    background: var(--bg-subtle);
    border-radius: var(--radius-lg);
  }

  .documents-drop-zone--active .documents-drop-overlay {
    display: flex;
  }
}

@media (max-width: 768px) {
  .documents-drop-overlay {
    display: none;
  }

  .documents-drop-zone--active {
    outline: none;
    background: transparent;
  }
}

.documents-empty-illustration {
  display: block;
  width: 160px;
  height: 160px;
  margin: 0 auto var(--space-lg);
}

.document-scan-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: visible;
}

.document-scan-list > li:first-child .document-row {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.document-scan-list > li:last-child .document-row {
  border-bottom: none;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 44px;
  gap: var(--space-xs) var(--space-md);
  align-items: center;
  min-height: 56px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.document-row:has(.document-row-menu) {
  z-index: 20;
}

.document-row:hover {
  background: var(--bg-subtle);
}

.document-row-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.document-row-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-label);
  font-weight: 600;
  color: var(--text-secondary);
}

.document-row-date {
  color: var(--text-muted);
}

.document-row--new {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.document-row--new .form-input {
  flex: 1 1 12rem;
  min-width: 0;
}

@media (max-width: 768px) {
  .document-row:not(.document-row--new) {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .document-row-name {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    grid-column: 1;
  }

  .document-row-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .document-row-meta {
    grid-column: 1 / -1;
  }
}

/* Documents nested browser (D-01, D-02) */
.documents-layout {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.documents-main {
  flex: 1 1 auto;
  min-width: 0;
}

/* Documents left rail: personal folder tree + shared-folders section (Phase 35, UI-SPEC §B).
   Owns the sticky/scroll behaviour so the tree and the shared list scroll together. */
.documents-sidebar {
  flex: 0 0 240px;
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  position: sticky;
  top: var(--space-md);
  max-height: calc(100vh - 8rem);
  overflow: auto;
}

.documents-tree {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) 0;
}

/* Shared folders counter + entries (Phase 35, UI-SPEC §B): plain nav links, no accent fill. */
.documents-shared {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 var(--space-sm);
}

.documents-shared-heading {
  margin: 0 0 var(--space-xs);
  padding: 0 var(--space-md);
  font-size: var(--font-label);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-muted);
}

/* Phase 35 UI-SPEC §B: "Shared Folders (x)" counter heading row (Label role, muted). */
.documents-shared-counter {
  margin: var(--space-md) 0 var(--space-xs);
  font-size: var(--font-label);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-muted);
}

.documents-tree-list,
.documents-tree-group {
  list-style: none;
  margin: 0;
  padding: 0;
}

.documents-tree-list:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.documents-tree-row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 32px;
  padding-block: var(--space-xs);
  padding-inline-end: var(--space-sm);
}

.documents-tree-row--current {
  background: var(--bg-subtle);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
}

.documents-tree-chevron {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.documents-tree-chevron--leaf {
  pointer-events: none;
}

.documents-tree-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  text-decoration: none;
  font-size: var(--font-body);
}

.documents-tree-name:hover {
  color: var(--accent-hover);
}

.documents-path-chrome {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
  margin-bottom: var(--space-md);
}

.documents-up {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.documents-breadcrumbs {
  min-width: 0;
  flex: 1 1 auto;
}

.documents-breadcrumb-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-xs);
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
  overflow: hidden;
}

.documents-breadcrumb-list--expanded {
  flex-wrap: wrap;
  overflow: visible;
}

.documents-breadcrumb-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
}

.documents-breadcrumb-item--root {
  flex: 0 1 auto;
  max-width: 40%;
}

.documents-breadcrumb-ellipsis {
  flex: 0 0 auto;
}

.documents-breadcrumb-item--current {
  flex: 1 1 auto;
  min-width: 0;
}

.documents-breadcrumb-link,
.documents-breadcrumb-current {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--font-body);
}

.documents-breadcrumb-current {
  font-weight: 600;
  color: var(--text-primary);
}

.documents-breadcrumb-ellipsis-btn {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.documents-breadcrumb-ellipsis-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .documents-tree {
    display: none;
  }
}

@media (min-width: 769px) {
  .documents-up {
    display: none;
  }
}

/* Document view + preview canvas (D-12, D-13) */
.page-document-view {
  max-width: 960px;
  margin-inline: auto;
}

.document-view-filename {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.document-view-meta {
  font-size: var(--font-label);
  font-weight: 600;
}

.document-view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 0 0 var(--space-xl);
}

.document-view-actions .btn {
  min-height: 44px;
}

.document-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 960px;
  margin: 0 auto var(--space-lg);
  padding: var(--space-lg);
}

.document-preview-status {
  margin: 0;
  font-size: var(--font-label);
  font-weight: 600;
  color: var(--text-muted);
}

.document-preview-frame {
  display: block;
  width: 100%;
  min-height: 480px;
  border: 0;
}

.document-preview-image {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  margin: 0 auto;
}

.document-preview-text {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: 70vh;
  overflow: auto;
}

.document-preview-unavailable-title {
  margin: 0 0 var(--space-xs);
  font-size: var(--font-heading);
  font-weight: 600;
}

.document-preview-unavailable-copy {
  margin: 0;
  font-size: var(--font-body);
  color: var(--text-secondary);
}

/* D-07: non-interactive value for a link that does not resolve in the current team. */
.link-unavailable {
  font-size: var(--font-body);
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  cursor: default;
}

.document-rename {
  grid-column: 1 / -1;
  min-width: 0;
}

.document-rename-stem-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
}

.document-rename-stem-row .document-rename-input {
  flex: 1 1 8rem;
}

.document-rename-input {
  width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.document-rename-extension {
  flex: 0 1 auto;
  max-width: 100%;
  font-size: var(--font-body);
  color: var(--text-secondary);
  white-space: normal;
  overflow-wrap: anywhere;
  user-select: none;
}

.document-row-actions {
  position: relative;
  justify-self: end;
}

.document-row-kebab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.document-row-kebab:hover,
.document-row-kebab:focus-visible {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.document-row-kebab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.document-row-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: transparent;
}

.document-row-menu {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-xs));
  z-index: 51;
  display: flex;
  flex-direction: column;
  min-width: 12rem;
  padding: var(--space-xs);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  outline: none;
}

.document-row-menu-item {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-sm);
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-primary);
  text-decoration: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.document-row-menu-item:hover,
.document-row-menu-item:focus-visible {
  background: var(--bg-subtle);
}

.document-row-menu-item--danger {
  color: var(--danger);
}

/* Phase 37 share/revoke dialog (UI-SPEC §B/§E): header, grants list and add-team row. */
.documents-share-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
}

.documents-share-header .confirm-dialog-title {
  margin: 0;
}

.documents-share-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.documents-share-close:hover,
.documents-share-close:focus-visible {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.documents-share-heading {
  margin: 0 0 var(--space-xs);
  font-size: var(--font-label);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-muted);
}

.documents-share-empty {
  margin: 0 0 var(--space-md);
  font-size: var(--font-body);
  color: var(--text-muted);
}

.documents-share-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 40vh;
  overflow: auto;
}

.documents-share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
}

.documents-share-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--font-body);
  color: var(--text-primary);
}

.documents-share-add {
  margin-top: var(--space-md);
}

/* Discussions scan list + thread (Phase 6) */
.discussion-row {
  align-items: start;
}

.discussion-row-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.discussion-row-preview {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discussion-row-meta {
  justify-self: end;
}

.discussion-row-time {
  white-space: nowrap;
}

.discussion-row .status-pill {
  justify-self: end;
  align-self: start;
}

@media (max-width: 768px) {
  .discussion-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .discussion-row-main {
    grid-column: 1;
    grid-row: 1;
  }

  .discussion-row .status-pill {
    grid-column: 2;
    grid-row: 1;
  }

  .discussion-row-meta {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }
}

@media (min-width: 769px) {
  .discussion-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .discussion-row-main {
    grid-column: 1;
  }

  .discussion-row-meta {
    grid-column: 2;
  }

  .discussion-row .status-pill {
    grid-column: 3;
  }
}

.discussion-thread-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-sm);
}

.discussion-thread-actions {
  margin: 0;
}

.discussion-text-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-sm);
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: var(--font-body);
  font-weight: 600;
  cursor: pointer;
}

.discussion-text-btn:hover,
.discussion-text-btn:focus-visible {
  color: var(--accent-hover);
}

.discussion-text-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.discussion-rename {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  width: 100%;
  max-width: 640px;
}

.discussion-rename-input {
  width: 100%;
  min-height: 44px;
  field-sizing: content;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  resize: none;
}

.discussion-archived-composer {
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  margin: 0 calc(-1 * var(--space-md));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

.discussion-archived-composer p {
  margin: 0;
  font-size: var(--font-body);
  color: var(--text-secondary);
}

.page-discussion-thread {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 8rem);
  gap: var(--space-md);
}

.discussion-thread-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: text;
}

.discussion-transcript {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-height: 0;
}

.message-bubble {
  position: relative;
  max-width: min(560px, 85%);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.message-bubble:has(.message-bubble-chrome) {
  padding-right: calc(var(--space-md) + 5.5rem);
}

.message-bubble-chrome {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  display: flex;
  opacity: 0;
  pointer-events: none;
}

.message-bubble:hover .message-bubble-chrome,
.message-bubble:focus-within .message-bubble-chrome,
.message-bubble--chrome-open .message-bubble-chrome {
  opacity: 1;
  pointer-events: auto;
}

.message-bubble-chrome-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.message-bubble-chrome-btn:hover,
.message-bubble-chrome-btn:focus-visible {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.message-bubble-chrome-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.message-bubble-chrome-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.message-bubble--own {
  align-self: flex-end;
  background: #eff6ff;
}

.message-bubble--other {
  align-self: flex-start;
  background: var(--bg-card);
}

.message-bubble--deleted {
  color: var(--text-muted);
}

.message-bubble-body-deleted {
  margin: 0;
  font-style: italic;
  color: var(--text-muted);
}

.message-bubble-author {
  margin: 0 0 2px;
  font-size: var(--font-label);
  font-weight: 600;
  color: var(--text-secondary);
}

.message-bubble-body {
  margin: 0;
  font-size: var(--font-body);
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-bubble-time {
  display: block;
  margin-top: 4px;
  font-size: var(--font-label);
  color: var(--text-muted);
}

.message-bubble-edited {
  display: inline-block;
  margin-left: var(--space-xs);
  font-size: var(--font-label);
  font-weight: 600;
  color: var(--text-muted);
}

.message-bubble-edit {
  width: 100%;
  min-height: 44px;
  max-height: 120px;
  field-sizing: content;
  resize: none;
  overflow-y: auto;
}

.message-bubble-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}

.message-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}

.message-reaction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 33px;
  min-height: 33px;
  padding: 0 var(--space-xs);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.message-reaction-glyph {
  font-size: calc(var(--font-display) * 0.75);
  line-height: 1;
}

.message-reaction--selected {
  background: #eff6ff;
  border-color: var(--accent);
}

.message-reaction--idle {
  display: none;
}

.message-bubble:hover .message-reaction--idle,
.message-bubble:focus-within .message-reaction--idle,
.message-bubble--chrome-open .message-reaction--idle {
  display: inline-flex;
}

.message-reaction:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.message-reaction-count {
  font-size: var(--font-label);
  font-weight: 600;
  color: var(--text-secondary);
}

.message-composer {
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  margin: 0 calc(-1 * var(--space-md));
}

.message-composer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: flex-end;
}

.message-composer-input {
  flex: 1 1 12rem;
  min-height: 44px;
  max-height: 120px;
  field-sizing: content;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-family: inherit;
  font-size: var(--font-body);
  line-height: 1.45;
  color: var(--text-primary);
  resize: none;
  overflow-y: auto;
}

.message-composer-send {
  flex: 0 0 auto;
  min-height: 44px;
}

.message-composer-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  cursor: pointer;
  font-size: var(--font-display);
  line-height: 1;
}

.message-composer-skips {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin: 0 0 var(--space-sm);
}

.message-composer-skips p {
  margin: 0;
  overflow-wrap: anywhere;
}

.message-composer-pending {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  list-style: none;
  margin: 0 0 var(--space-sm);
  padding: 0;
}

.message-composer-chip {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  max-width: 100%;
  padding: 0 0 0 var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-page);
}

.message-composer-chip-name {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--font-label);
}

.message-composer-chip-remove {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--font-display);
  line-height: 1;
  cursor: pointer;
}

.emoji-picker {
  margin: 0 0 var(--space-sm);
  padding: var(--space-sm);
  max-height: 240px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 44px);
  gap: 4px;
  justify-content: start;
}

.emoji-picker-cell {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.emoji-picker-cell:hover,
.emoji-picker-cell:focus-visible {
  background: var(--bg-page);
}

.emoji-picker-glyph {
  font-size: var(--font-display);
  line-height: 1;
}

.message-bubble-body--emoji {
  font-size: var(--font-display);
  line-height: 1.3;
}

.message-bubble-files {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.message-bubble-image {
  display: block;
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: var(--radius);
}

.discussion-file-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-page);
}

.discussion-file-chip-meta {
  margin: 0;
  font-size: var(--font-label);
  color: var(--text-secondary);
}

.discussion-file-chip-name {
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.discussion-file-chip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin: 0;
}

.discussion-file-chip-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: var(--font-label);
  font-weight: 600;
}

.discussion-load-older {
  align-self: center;
  min-height: 44px;
}

.discussion-transcript-end {
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Auth canvas (Razor credential pages) */
.auth-canvas {
  min-height: 100vh;
  margin: 0;
  background: var(--bg-page);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
}

.auth-canvas-inner {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-md);
}

.auth-brand {
  margin: 0 0 var(--space-lg);
  font-size: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  text-align: center;
  overflow-wrap: anywhere;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.auth-card h1 {
  margin: 0 0 var(--space-lg);
  font-size: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.auth-card .form-input {
  width: 100%;
}

.auth-card .form-banner-error,
.auth-card .form-field-error {
  overflow-wrap: anywhere;
}

.auth-card .input-validation-error,
.auth-card .form-input.input-validation-error {
  border-color: var(--danger);
}

.auth-card .btn {
  width: 100%;
  white-space: normal;
}

.auth-check-row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 44px;
}

.auth-check-row label {
  font-size: var(--font-body);
  font-weight: 400;
  color: var(--text-secondary);
}

.auth-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  font-size: var(--font-body);
  overflow-wrap: anywhere;
}

.auth-links a:hover,
.auth-links a:focus-visible {
  text-decoration: underline;
}

.auth-help {
  margin: 0 0 var(--space-md);
  font-size: var(--font-body);
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.auth-password-hint {
  margin: 0;
  font-size: var(--font-label);
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.auth-lockout-banner {
  margin: 0 0 var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  background: var(--warning-bg);
  color: var(--text-primary);
}

.auth-lockout-banner h1 {
  margin: 0 0 var(--space-sm);
  color: var(--warning);
}

.auth-lockout-banner p {
  margin: 0;
  font-size: var(--font-body);
  overflow-wrap: anywhere;
}

.auth-dev-banner {
  width: 100%;
  max-width: 400px;
  margin: 0 0 var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  background: var(--warning-bg);
  text-align: center;
}

.auth-dev-banner-label {
  margin: 0;
  font-size: var(--font-label);
  font-weight: 600;
  line-height: 1.4;
  color: #b45309;
}

.auth-dev-banner-copy {
  margin: var(--space-xs) 0 0;
  font-size: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.form-banner-neutral {
  margin: 0 0 var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: var(--font-body);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.form-banner-neutral p {
  margin: 0;
}

.form-banner-neutral p + p {
  margin-top: var(--space-xs);
  font-weight: 400;
}

.auth-social-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: 0;
}

.auth-social-form {
  margin: 0;
}

.btn-social {
  width: 100%;
  white-space: normal;
}

.btn-social svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.btn-social-google {
  background: #ffffff;
  border: 1px solid var(--border);
  color: #3c4043;
}

.btn-social-google:hover {
  background: var(--bg-subtle);
  color: #3c4043;
}

.btn-social-microsoft {
  background: #ffffff;
  border: 1px solid var(--border);
  color: #5e5e5e;
}

.btn-social-microsoft:hover {
  background: var(--bg-subtle);
  color: #5e5e5e;
}

.btn-social-facebook {
  background: #1877f2;
  border: 1px solid #1877f2;
  color: #ffffff;
}

.btn-social-facebook:hover {
  background: #166fe5;
  border-color: #166fe5;
  color: #ffffff;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
  color: var(--text-muted);
  font-size: var(--font-label);
  font-weight: 600;
}

.auth-divider hr {
  flex: 1;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--border);
}

.auth-divider span {
  flex-shrink: 0;
}
