/* ═══════════════════════════════════════════════════════════
   TaskForge — Design System v2
   Dark Navy · Professional SaaS · Linear-inspired
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800&family=Geist+Mono:wght@400;500&display=swap');

:root {
  color-scheme: dark;

  /* ── Base surfaces ── */
  --bg:          #030711;
  --bg-2:        #060d1a;
  --sidebar:     #060d1a;
  --panel:       #0a1628;
  --panel-2:     #0d1c32;
  --panel-3:     #112238;
  --card:        #0c1a2e;
  --card-hover:  #0f2040;

  /* ── Borders ── */
  --line:        rgba(148, 176, 220, 0.10);
  --line-med:    rgba(148, 176, 220, 0.16);
  --line-strong: rgba(148, 176, 220, 0.24);

  /* ── Typography ── */
  --text:        #e8f0fe;
  --text-soft:   #8fa5c5;
  --text-muted:  #4e6480;

  /* ── Accent palette ── */
  --blue:        #3b82f6;
  --blue-bright: #60a5fa;
  --blue-dim:    #1d4ed8;
  --blue-glow:   rgba(59, 130, 246, 0.15);
  --green:       #34d399;
  --green-dim:   rgba(52, 211, 153, 0.12);
  --orange:      #fb923c;
  --orange-dim:  rgba(251, 146, 60, 0.12);
  --purple:      #a78bfa;
  --purple-dim:  rgba(167, 139, 250, 0.12);
  --red:         #f87171;
  --red-dim:     rgba(248, 113, 113, 0.12);
  --cyan:        #22d3ee;

  /* ── Shadows & Effects ── */
  --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow:      0 4px 24px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3);
  --shadow-lg:   0 20px 60px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.4);
  --glow-blue:   0 0 24px rgba(59, 130, 246, 0.12), 0 0 48px rgba(59, 130, 246, 0.06);

  /* ── Layout ── */
  --radius-sm:   6px;
  --radius:      8px;
  --radius-lg:   12px;
  --sidebar-width: 248px;
  --sidebar-collapsed-width: 72px;

  font-family: 'Geist', 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 90% 10%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled, input:disabled, textarea:disabled, select:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

/* ── Form Controls ─────────────────────────────────────── */
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line-med);
  border-radius: var(--radius);
  background: rgba(3, 7, 17, 0.60);
  color: var(--text);
  outline: none;
  padding: 10px 12px;
  font-size: 0.9rem;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

textarea { resize: vertical; min-height: 88px; }
select { appearance: none; }

input::placeholder, textarea::placeholder { color: var(--text-muted); }

input:focus, textarea:focus, select:focus {
  border-color: rgba(59, 130, 246, 0.60);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.10);
  background: rgba(3, 10, 25, 0.90);
}

label {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ── Utilities ─────────────────────────────────────────── */
.is-hidden   { display: none !important; }
.muted       { color: var(--text-muted); }
.text-soft   { color: var(--text-soft); }

.as-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue-bright);
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Brand ─────────────────────────────────────────────── */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-lockup strong {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: block;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

/* ── Buttons ────────────────────────────────────────────── */
.tab-button,
.ghost-button,
.primary-button,
.danger-button,
.link-button,
.icon-menu {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 140ms ease;
  white-space: nowrap;
}

.primary-button {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: rgba(99, 150, 255, 0.40);
  color: #fff;
  padding: 0 16px;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.30), inset 0 1px 0 rgba(255,255,255,0.08);
}

.primary-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.40), inset 0 1px 0 rgba(255,255,255,0.10);
  transform: translateY(-1px);
}

.ghost-button, .icon-menu {
  background: rgba(10, 22, 40, 0.80);
  border-color: var(--line-med);
  color: var(--text-soft);
  padding: 0 14px;
}

.ghost-button:hover:not(:disabled), .icon-menu:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: rgba(15, 32, 56, 0.90);
  color: var(--text);
}

.danger-button {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.28);
  color: #fca5a5;
  padding: 0 14px;
}

.danger-button:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.45);
}

.link-button {
  min-height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--blue-bright);
  text-decoration: none;
  font-size: 0.85rem;
}

.link-button:hover { color: #93c5fd; }

.tab-button {
  background: transparent;
  color: var(--text-soft);
  padding: 0 14px;
}

.tab-button.active {
  background: rgba(59, 130, 246, 0.14);
  color: var(--text);
  border-color: rgba(59, 130, 246, 0.30);
}

.nav-button { width: 100%; }

/* ── Page Loader ────────────────────────────────────────── */
.page-loader {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
}

.page-loader h1 {
  margin: 0;
  font-size: 2.8rem;
  letter-spacing: -0.03em;
}

/* ── Auth Screen ────────────────────────────────────────── */
.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(24px, 5vw, 72px);
}

.auth-brand { max-width: 640px; }

.auth-brand h1 {
  margin: 24px 0 12px;
  font-size: 4rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
}

.auth-brand p:not(.eyebrow) {
  max-width: 520px;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

.auth-panel {
  border: 1px solid var(--line-med);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(12, 26, 46, 0.95) 0%, rgba(6, 13, 26, 0.95) 100%);
  box-shadow: var(--shadow-lg), var(--glow-blue);
  padding: 24px;
  backdrop-filter: blur(12px);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius);
  background: rgba(2, 6, 15, 0.80);
  margin-bottom: 24px;
  border: 1px solid var(--line);
}

.stacked-form, .compact-form { display: grid; gap: 14px; }
.compact-form.is-disabled { opacity: 0.55; }

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.api-config {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ── App Shell ──────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.app-shell:has(.sidebar:hover) {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 6px;
  padding: 16px 12px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(6, 13, 26, 0.99) 0%, rgba(3, 7, 17, 0.99) 100%);
}

.sidebar-brand {
  justify-content: center;
  padding: 4px 6px 10px;
  margin-bottom: 2px;
}

.sidebar:hover .sidebar-brand {
  justify-content: flex-start;
}

.brand-label,
.nav-label,
.sidebar-user-info {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateX(-6px);
  transition: max-width 180ms ease, opacity 140ms ease, transform 140ms ease;
  white-space: nowrap;
}

.sidebar:hover .brand-label,
.sidebar:hover .nav-label,
.sidebar:hover .sidebar-user-info {
  max-width: 160px;
  opacity: 1;
  transform: translateX(0);
}

.sidebar-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 20, 36, 0.60);
  padding: 14px;
}

.sidebar-label {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 200;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 0 4px;
}

/* ── Nav ────────────────────────────────────────────────── */
.page-nav {
  display: grid;
  align-content: start;
  gap: 2px;
}

.nav-section-label {
  margin: 8px 0 4px;
  padding: 0 8px;
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.nav-link {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-soft);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0 10px;
  text-decoration: none;
  text-align: left;
  transition: all 130ms ease;
}

.sidebar:hover .nav-link {
  justify-content: flex-start;
}

.nav-link:hover {
  background: rgba(59, 130, 246, 0.06);
  color: var(--text);
  border-color: var(--line);
}

.nav-link.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue-bright);
  border-color: rgba(59, 130, 246, 0.22);
  font-weight: 600;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.nav-link .nav-icon { color: inherit; opacity: 0.8; }
.nav-link.active .nav-icon { opacity: 1; }

/* ── Sidebar User ───────────────────────────────────────── */
.sidebar-user {
  display: grid;
  grid-template-columns: auto 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 20, 36, 0.60);
  padding: 5px;
  margin-top: 4px;
}

.sidebar:hover .sidebar-user {
  grid-template-columns: auto minmax(0, 1fr) auto;
  justify-content: stretch;
}

.sidebar-user strong,
.sidebar-user span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user strong { font-size: 0.85rem; font-weight: 600; }
.sidebar-user span { color: var(--text-muted); font-size: 0.75rem; }

/* ── Avatar ─────────────────────────────────────────────── */
.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a5f, #0f2040);
  color: var(--blue-bright);
  font-weight: 700;
  font-size: 0.78rem;
  border: 1px solid rgba(59, 130, 246, 0.20);
}

.avatar-large { width: 60px; height: 60px; font-size: 1.4rem; flex-shrink: 0; }

/* ── Workspace ──────────────────────────────────────────── */
.workspace {
  min-width: 0;
  padding: 28px 32px;
}

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.topbar h1 {
  margin: 0 0 4px;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
}

.topbar p { margin: 0; }

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.topbar-org-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.org-header-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line-med);
  flex-shrink: 0;
}

/* ── Status Chips & Tags ────────────────────────────────── */
.status-chip, .count-pill, .tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(10, 22, 40, 0.80);
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.count-pill {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  justify-content: center;
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.24);
  color: var(--blue-bright);
  font-size: 0.72rem;
}

.status-chip.subdued { color: var(--text-muted); }

.tag.high   { background: var(--red-dim);    border-color: rgba(248, 113, 113, 0.24); color: #fca5a5; }
.tag.medium { background: var(--orange-dim); border-color: rgba(251, 146, 60, 0.24);  color: #fdba74; }
.tag.low    { background: var(--green-dim);  border-color: rgba(52, 211, 153, 0.24);  color: #6ee7b7; }
.tag.done   { background: var(--green-dim);  border-color: rgba(52, 211, 153, 0.24);  color: #6ee7b7; }

/* ── Dashboard Command Bar ──────────────────────────────── */
.dashboard-command {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.org-search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 240px;
  max-width: 480px;
  background: rgba(6, 14, 28, 0.80);
  border: 1px solid var(--line-med);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.org-search-box:focus-within {
  border-color: rgba(59, 130, 246, 0.50);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.org-search-box .search-icon {
  padding: 0 10px 0 14px;
  color: var(--text-muted);
  font-size: 1rem;
  flex-shrink: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.org-search-box input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 12px 10px 0;
  font-size: 0.875rem;
  min-width: 0;
}

.org-search-box input:focus { box-shadow: none; }

.org-search-box .ghost-button {
  border: none;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0 14px;
  min-height: 100%;
  font-size: 0.8rem;
}

.dashboard-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.dashboard-summary strong {
  color: var(--text-soft);
  font-weight: 600;
}

/* ── Dashboard Content ──────────────────────────────────── */
.dashboard-content { display: grid; gap: 24px; }

/* ── Panel & Cards ──────────────────────────────────────── */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(12, 26, 46, 0.70) 0%, rgba(6, 14, 28, 0.70) 100%);
  box-shadow: var(--shadow-sm);
  min-width: 0;
  padding: 20px;
}

.confirm-dialog, .metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(12, 26, 46, 0.90) 0%, rgba(6, 14, 28, 0.90) 100%);
  box-shadow: var(--shadow);
}

.panel-heading { margin-bottom: 16px; }
.panel-heading h2, .panel-heading h3 {
  margin: 0;
  letter-spacing: -0.02em;
  font-size: 1rem;
  font-weight: 600;
}

.panel-heading.horizontal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ── Orgs Section (Dashboard) ───────────────────────────── */
.orgs-board { }

.orgs-board > .panel-heading {
  margin-bottom: 20px;
}

.orgs-board > .panel-heading h2 {
  font-size: 1.1rem;
}

/* ── Org Cards Grid ─────────────────────────────────────── */
.orgs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.org-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(12, 26, 46, 0.80) 0%, rgba(7, 15, 30, 0.80) 100%);
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
  cursor: pointer;
}

.org-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  background: linear-gradient(180deg, rgba(15, 32, 64, 0.90) 0%, rgba(9, 19, 40, 0.90) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.30), 0 0 0 1px rgba(59, 130, 246, 0.12);
}

.org-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.org-card-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.20), rgba(37, 99, 235, 0.10));
  border: 1px solid rgba(59, 130, 246, 0.20);
  display: grid;
  place-items: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--blue-bright);
  overflow: hidden;
  flex-shrink: 0;
}

.org-card-info {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.org-card-info strong {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  color: var(--text);
}

.org-card-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-card-divider {
  height: 1px;
  background: var(--line);
  margin-bottom: 14px;
}

.org-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.org-stat {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(3, 7, 17, 0.40);
  text-align: center;
}

.org-stat strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}

.org-stat small {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.org-card-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid var(--line-med);
  border-radius: var(--radius);
  background: rgba(59, 130, 246, 0.08);
  color: var(--blue-bright);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 140ms ease;
  cursor: pointer;
}

.org-card:hover .org-card-action {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.35);
}

/* ── Invites Panel ──────────────────────────────────────── */
.invites-grid { display: grid; gap: 8px; }

.invite-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 18, 34, 0.60);
  padding: 12px 14px;
}

.invite-card strong, .invite-card span { display: block; }
.invite-card span { color: var(--text-muted); font-size: 0.80rem; margin-top: 2px; }

/* ── Metrics Grid ───────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.metrics-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.metric-card {
  min-height: 110px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  align-items: center;
  padding: 16px;
}

.metric-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 500;
}

.metric-card strong {
  display: block;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.metric-card small { grid-column: 2; color: var(--text-muted); font-size: 0.75rem; }

.metric-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  grid-row: span 3;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 700;
}

.accent-purple .metric-icon { background: var(--purple-dim); color: #c4b5fd; border: 1px solid rgba(167,139,250,0.20); }
.accent-blue   .metric-icon { background: var(--blue-glow);  color: var(--blue-bright); border: 1px solid rgba(59,130,246,0.20); }
.accent-green  .metric-icon { background: var(--green-dim);  color: #6ee7b7; border: 1px solid rgba(52,211,153,0.20); }
.accent-orange .metric-icon { background: var(--orange-dim); color: #fdba74; border: 1px solid rgba(251,146,60,0.20); }

/* ── Content Grid ───────────────────────────────────────── */
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.50fr);
  gap: 16px;
}

.span-3 { grid-column: 1 / -1; }

.content-grid { display: grid; gap: 16px; }
.content-grid.two-columns {
  grid-template-columns: minmax(260px, 0.70fr) minmax(300px, 1.30fr);
}

/* ── Project & Task Rows ────────────────────────────────── */
.project-rows, .member-stack, .task-table, .activity-list { display: grid; gap: 8px; }

.project-row {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) minmax(140px, 0.8fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 17, 31, 0.60);
  text-decoration: none;
  color: var(--text);
  transition: border-color 130ms, background 130ms;
}

.project-row:hover { border-color: var(--line-med); background: rgba(12, 26, 46, 0.70); }

.row-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--blue-glow);
  border: 1px solid rgba(59,130,246,0.16);
  color: var(--blue-bright);
  font-weight: 700;
  font-size: 0.75rem;
}

.row-title { display: grid; gap: 2px; min-width: 0; }
.row-title strong, .member-line strong, .task-main strong { overflow-wrap: anywhere; font-size: 0.88rem; font-weight: 600; }
.row-title span, .member-line span, .task-main span { color: var(--text-muted); font-size: 0.80rem; }

.progress-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--blue-bright));
}

.member-line, .task-row, .activity-item {
  display: grid;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 17, 31, 0.60);
  padding: 11px 12px;
}

.member-line { grid-template-columns: auto minmax(0, 1fr) auto auto; }

.member-edit-btn { font-size: 0.75rem; padding: 4px 10px; min-height: 30px; }

.task-row { grid-template-columns: auto minmax(200px, 1fr) auto auto auto auto; }

.task-row.done {
  border-color: rgba(52, 211, 153, 0.20);
  background: rgba(52, 211, 153, 0.04);
}

.task-row.done .task-main strong {
  color: var(--text-soft);
  text-decoration: line-through;
}

.task-check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 176, 220, 0.28);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.65rem;
}

.task-actions { display: flex; gap: 6px; justify-content: flex-end; }
.task-actions button { min-height: 30px; font-size: 0.75rem; padding: 0 10px; }

.activity-item { grid-template-columns: auto minmax(0, 1fr); }

.activity-dot {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-glow);
  color: var(--blue-bright);
  font-weight: 700;
  border: 1px solid rgba(59,130,246,0.16);
}

/* ── Invite Result ──────────────────────────────────────── */
.invite-result-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(6, 14, 27, 0.70);
  padding: 12px;
  margin-top: 10px;
}

.invite-result-name { color: var(--text); overflow-wrap: anywhere; font-size: 0.88rem; font-weight: 600; }
.invite-result-id, .invite-result-error { font-size: 0.80rem; }
.invite-result-error { margin: 0; color: var(--red); }

/* ── Empty States ───────────────────────────────────────── */
.empty-state {
  min-height: 50vh;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-med);
  border-radius: var(--radius-lg);
  background: rgba(6, 13, 26, 0.50);
  text-align: center;
  padding: 32px;
}

.empty-state h2 {
  max-width: 600px;
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.empty-copy {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--text-muted);
  padding: 14px;
  text-align: center;
  font-size: 0.875rem;
}

/* ── Stat link ──────────────────────────────────────────── */
.stat-link {
  justify-self: start;
  color: var(--blue-bright);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ── Toasts ─────────────────────────────────────────────── */
.toast-region {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  border: 1px solid var(--line-med);
  border-radius: var(--radius);
  background: rgba(9, 18, 34, 0.98);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  font-size: 0.875rem;
  backdrop-filter: blur(8px);
}

.toast.success { border-color: rgba(52, 211, 153, 0.35); }
.toast.error   { border-color: rgba(248, 113, 113, 0.40); }

/* ── Dialogs ────────────────────────────────────────────── */
.confirm-dialog {
  width: min(440px, calc(100vw - 28px));
  color: var(--text);
  padding: 0;
}

.confirm-dialog::backdrop { background: rgba(0, 0, 0, 0.70); }

.confirm-dialog form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.confirm-dialog h2, .confirm-dialog p { margin: 0; }

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── Avatar Upload ──────────────────────────────────────── */
.avatar-upload {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.avatar-upload:hover::after {
  content: "✎";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.55);
  font-size: 0.9rem;
  color: white;
  border-radius: var(--radius);
}

.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

/* ── Profile Page ───────────────────────────────────────── */
.profile-orgs-grid { display: grid; gap: 8px; }

.org-profile-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 17, 31, 0.55);
  padding: 11px;
}

.org-profile-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--blue-glow);
  border: 1px solid rgba(59,130,246,0.16);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue-bright);
  overflow: hidden;
  flex-shrink: 0;
}

.profile-link { color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.88rem; }
.profile-link:hover { color: var(--blue-bright); }

.member-profile-link { color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.85rem; }
.member-profile-link:hover { color: var(--blue-bright); }

/* ── Task Page ──────────────────────────────────────────── */
.task-description-text {
  font-size: 0.90rem;
  line-height: 1.65;
  padding: 4px 0;
  white-space: pre-wrap;
  color: var(--text-soft);
}

.task-action-stack { display: grid; gap: 8px; }
.task-action-stack button { width: 100%; justify-content: center; }

/* ── User Search ────────────────────────────────────────── */
.user-search-results {
  margin-top: 6px;
  border: 1px solid var(--line-med);
  border-radius: var(--radius);
  background: rgba(8, 17, 31, 0.95);
  overflow: hidden;
}

.user-search-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  transition: background 100ms ease;
  font-size: 0.875rem;
}

.user-search-row:last-child { border-bottom: none; }
.user-search-row:hover { background: rgba(59, 130, 246, 0.08); }
.user-search-row strong { font-size: 0.875rem; font-weight: 600; }

.invite-user-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.invite-user-row:last-child { border-bottom: none; }

.avatar-sm { width: 28px; height: 28px; font-size: 0.68rem; }

/* ── Dashboard Hero ─────────────────────────────────────── */
.dashboard-hero h1 {
  font-size: 2rem;
  letter-spacing: -0.04em;
}

/* ── Org Switcher ───────────────────────────────────────── */
.org-switcher {
  min-height: 40px;
  background: rgba(18, 34, 60, 0.90);
}

/* ── Sidebar Block ──────────────────────────────────────── */
.sidebar-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 20, 36, 0.60);
  padding: 12px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1280px) {
  .orgs-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

@media (max-width: 1100px) {
  .metrics-grid,
  .metrics-grid.compact { grid-template-columns: repeat(2, minmax(140px, 1fr)); }

  .overview-grid,
  .content-grid.two-columns { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; }

  .app-shell,
  .app-shell:has(.sidebar:hover) {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    grid-template-rows: none;
  }

  .sidebar-brand,
  .nav-link {
    justify-content: flex-start;
  }

  .brand-label,
  .nav-label,
  .sidebar-user-info {
    max-width: 160px;
    opacity: 1;
    transform: none;
  }

  .sidebar-user {
    grid-template-columns: auto minmax(0, 1fr) auto;
    justify-content: stretch;
  }

  .workspace { padding: 20px; }
  .topbar { display: grid; }
  .topbar-actions { justify-content: stretch; }
  .org-search-box { min-width: 100%; max-width: none; }

  .project-row, .task-row, .invite-card { grid-template-columns: 1fr; }
  .row-icon, .task-check { display: none; }
}

@media (max-width: 640px) {
  .orgs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .auth-screen, .workspace, .sidebar { padding: 16px; }

  .metrics-grid,
  .metrics-grid.compact { grid-template-columns: 1fr; }

  .inline-form, .api-config { grid-template-columns: 1fr; }

  .auth-brand h1 { font-size: 2.4rem; }
  .topbar h1, .empty-state h2 { font-size: 1.6rem; }
  .page-loader h1 { font-size: 2rem; }
}

/* ═══════════════════════════════════════════════════════════
   Organization Page — Refatoração UI/UX v3
   Linear · Vercel · Stripe Dashboard inspired
═══════════════════════════════════════════════════════════ */

/* ── Sidebar limpa ──────────────────────────────────────── */
.sidebar-clean {
  grid-template-rows: auto auto 1fr auto;
  gap: 4px;
}

.sidebar-spacer { flex: 1; }

.sidebar-logout {
  min-height: 32px;
  padding: 0 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.sidebar-logout:hover {
  color: var(--red);
  background: transparent;
}

.sidebar-user-info {
  min-width: 0;
  flex: 1;
}

.sidebar-user-info a {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-info span {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Org Header Bar ─────────────────────────────────────── */
.org-header-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px 32px;
  align-items: start;
  padding: 28px 32px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.40) 0%, transparent 100%);
  margin: -28px -32px 28px;
}

.org-header-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.org-header-text h1 {
  margin: 0 0 3px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
}

.org-header-text .eyebrow { margin-bottom: 4px; }

.org-header-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Coluna de meta */
.org-header-meta {
  align-self: center;
}

.org-meta-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.org-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.org-meta-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.org-meta-id-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.org-meta-id-value {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--text-soft);
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid var(--line-med);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  letter-spacing: 0.02em;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-id-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line-med);
  border-radius: var(--radius-sm);
  background: rgba(10, 22, 40, 0.70);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 130ms ease;
  cursor: pointer;
}

.copy-id-btn:hover {
  border-color: rgba(59, 130, 246, 0.35);
  color: var(--blue-bright);
  background: rgba(59, 130, 246, 0.06);
}

/* Role badge */
.role-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: rgba(167, 139, 250, 0.08);
  color: #c4b5fd;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.01em;
}

/* API badge */
.api-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.24);
  background: rgba(52, 211, 153, 0.08);
  color: #6ee7b7;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.api-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.60);
  animation: api-pulse 2s ease infinite;
  flex-shrink: 0;
}

@keyframes api-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Header actions */
.org-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: center;
}

.org-header-actions .primary-button {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Workspace para organização ─────────────────────────── */
.workspace-org {
  padding: 28px 32px;
}

/* ── Metrics Strip ──────────────────────────────────────── */
.metrics-strip {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(12, 26, 46, 0.60) 0%, rgba(6, 14, 28, 0.60) 100%);
  padding: 0 20px;
  height: 64px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.metric-strip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 0 16px;
}

.metric-strip-item:first-child { padding-left: 0; }
.metric-strip-item:last-child { padding-right: 0; }

.metric-strip-item > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.metric-strip-item strong {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}

.metric-strip-item span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-strip-divider {
  width: 1px;
  height: 32px;
  background: var(--line-med);
  flex-shrink: 0;
}

.metric-strip-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.metric-strip-icon--purple {
  background: rgba(167, 139, 250, 0.10);
  border: 1px solid rgba(167, 139, 250, 0.18);
  color: #c4b5fd;
}

.metric-strip-icon--blue {
  background: rgba(59, 130, 246, 0.10);
  border: 1px solid rgba(59, 130, 246, 0.18);
  color: var(--blue-bright);
}

.metric-strip-icon--green {
  background: rgba(52, 211, 153, 0.10);
  border: 1px solid rgba(52, 211, 153, 0.18);
  color: #6ee7b7;
}

/* ── Org Layout ─────────────────────────────────────────── */
.org-body { display: grid; gap: 20px; }

.org-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: start;
}

.org-main-col, .org-side-col {
  display: grid;
  gap: 16px;
}

.org-projects-panel { min-height: 320px; }

/* Botão inline de novo projeto no panel */
.new-project-inline-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  font-size: 0.80rem;
  padding: 0 10px;
}

/* ── Member Table ───────────────────────────────────────── */
.member-table { display: grid; gap: 0; }

.member-line {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  background: transparent;
}

.member-line:last-child { border-bottom: none; }

.member-line .row-title span {
  font-size: 0.72rem;
  text-transform: capitalize;
  color: var(--text-muted);
}

/* ── Project Rows melhorados ────────────────────────────── */
.project-row {
  grid-template-columns: auto minmax(160px, 1fr) minmax(100px, 0.7fr) 40px auto;
  border-radius: var(--radius);
  transition: border-color 130ms, background 130ms, transform 130ms;
}

.project-row:hover {
  border-color: rgba(59, 130, 246, 0.30);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.20);
}

/* ── Invite Search ──────────────────────────────────────── */
.invite-search-wrap { display: grid; gap: 0; }

.invite-search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-med);
  border-radius: var(--radius);
  background: rgba(3, 7, 17, 0.60);
  overflow: hidden;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.invite-search-box:focus-within {
  border-color: rgba(59, 130, 246, 0.50);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.invite-search-icon {
  padding: 0 8px 0 12px;
  color: var(--text-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.invite-search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 8px 10px 0;
  font-size: 0.875rem;
  min-width: 0;
}

.invite-search-input:focus { box-shadow: none; }

.invite-search-trigger {
  border: none;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0 14px;
  min-height: 100%;
  font-size: 0.80rem;
  height: 42px;
}

/* Resultado do invite */
.invite-result-card {
  border-radius: 0 0 var(--radius) var(--radius);
  border-top: none;
  margin-top: -2px;
}

.invite-user-row {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.invite-user-row:last-child { border-bottom: none; }

/* ── Modal: Novo Projeto ────────────────────────────────── */
.project-modal {
  border: 1px solid var(--line-med);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.99) 0%, rgba(6, 13, 26, 0.99) 100%);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(59, 130, 246, 0.06);
  color: var(--text);
  width: min(480px, calc(100vw - 32px));
  padding: 0;
  max-height: 90vh;
  overflow: auto;
}

.project-modal::backdrop {
  background: rgba(2, 6, 15, 0.75);
  backdrop-filter: blur(4px);
}

.project-modal[open] {
  animation: modal-in 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.project-modal-inner { padding: 24px; }

.project-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.project-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.project-modal-header .eyebrow { margin-bottom: 4px; }

.modal-close-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(10, 22, 40, 0.60);
  color: var(--text-muted);
  transition: all 130ms ease;
  flex-shrink: 0;
  padding: 0;
  min-height: unset;
}

.modal-close-btn:hover {
  border-color: var(--line-med);
  color: var(--text);
  background: rgba(15, 32, 56, 0.90);
}

.project-modal-form {
  display: grid;
  gap: 16px;
}

.label-optional {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.78em;
}

.project-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.project-modal-actions .primary-button {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Responsive: Org Header ─────────────────────────────── */
@media (max-width: 1100px) {
  .org-header-bar {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  .org-header-meta {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .org-header-actions {
    grid-row: 1;
    grid-column: 2;
  }
  .org-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .org-header-bar {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: -20px -20px 20px;
    padding: 20px;
  }
  .org-header-actions { grid-column: 1; }
  .org-meta-row { gap: 14px; flex-wrap: wrap; }
  .metrics-strip { height: auto; padding: 14px 16px; flex-wrap: wrap; gap: 12px; }
  .metric-strip-divider { display: none; }
  .metric-strip-item { flex: none; padding: 0; }
  .workspace-org { padding: 20px; }
}

.metric-strip-icon--orange {
  background: rgba(251, 146, 60, 0.10);
  border: 1px solid rgba(251, 146, 60, 0.18);
  color: #fdba74;
}


/* ===== Ajuste: usuário da sidebar mais compacto ===== */
.sidebar-user{
  padding: 8px 10px;
  gap: 8px;
  min-height: 54px;
}

.sidebar-user .avatar{
  width: 28px;
  height: 28px;
  font-size: .7rem;
}

.sidebar-user strong{
  font-size: .82rem;
}

.sidebar-user span{
  font-size: .68rem;
}

.sidebar-user .ghost-button,
.sidebar-user button{
  min-height: 32px;
  padding: 0 10px;
  font-size: .75rem;
}

/* Ajuste extra para telas menores */
@media (max-width: 560px){
  .sidebar-user{
    padding: 8px;
  }
}
