/* ========== DESIGN TOKENS — Apple-inspired: light canvas · quiet surfaces · dark rail ========== */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Accent — Apple HIG system palette (saturated) */
  --color-primary: #0A84FF;
  --color-primary-dark: #0071E3;
  --color-primary-light: #64D2FF;
  --color-primary-bg: rgba(10, 132, 255, 0.14);
  --color-primary-bg-strong: rgba(10, 132, 255, 0.22);
  /* Semantic status — Apple system colors */
  --color-success: #30D158;
  --color-success-bg: rgba(48, 209, 88, 0.15);
  --color-warning: #FF9F0A;
  --color-warning-bg: rgba(255, 159, 10, 0.15);
  --color-danger: #FF453A;
  --color-danger-bg: rgba(255, 69, 58, 0.15);
  --color-info: #64D2FF;
  --color-info-bg: rgba(100, 210, 255, 0.15);
  --color-purple: #BF5AF2;
  --color-purple-bg: rgba(191, 90, 242, 0.15);
  --color-yellow: #FFD60A;
  --color-yellow-bg: rgba(255, 214, 10, 0.15);
  --color-indigo: #5E5CE6;
  --color-pink: #FF375F;
  /* Page + surfaces */
  --color-bg: #F5F5F7;
  --color-bg-alt: #EEF1F4;
  --color-surface: #FFFFFF;
  --color-surface-2: #F8F9FB;
  --color-surface-3: #EEF2F6;
  --color-surface-muted: #E9EDF2;
  --color-surface-hover: #F4F6F9;
  /* Fills */
  --color-fill: rgba(17, 24, 39, 0.04);
  --color-fill-2: rgba(17, 24, 39, 0.06);
  --color-fill-3: rgba(17, 24, 39, 0.09);
  --color-fill-onlight: rgba(17, 24, 39, 0.04);
  --color-fill-onlight-2: rgba(17, 24, 39, 0.06);
  /* Separators */
  --color-border: rgba(17, 24, 39, 0.10);
  --color-border-soft: rgba(17, 24, 39, 0.07);
  --color-border-strong: rgba(17, 24, 39, 0.16);
  --color-border-onlight: rgba(17, 24, 39, 0.10);
  --color-border-onlight-soft: rgba(17, 24, 39, 0.07);
  /* Labels */
  --color-text: #151821;
  --color-text-secondary: #4F5867;
  --color-text-muted: #6D7685;
  --color-text-quaternary: rgba(21, 24, 33, 0.45);
  --color-text-onlight: #151821;
  --color-text-onlight-secondary: #4F5867;
  --color-text-onlight-muted: #6D7685;
  --color-text-light: #5F6876;
  /* Status inks + subtle surfaces */
  --color-neutral-ink: #546173;
  --color-neutral-bg: #F2F5F8;
  --color-neutral-border: #D7DEE7;
  --color-info-ink: #155E75;
  --color-info-bg-soft: #EEF6FF;
  --color-info-border: #C6DBF3;
  --color-success-ink: #166534;
  --color-success-bg-soft: #EDF8F0;
  --color-success-border: #CAE7D3;
  --color-warning-ink: #9A5C07;
  --color-warning-bg-soft: #FFF5E8;
  --color-warning-border: #F1D6A5;
  --color-danger-ink: #B42318;
  --color-danger-bg-soft: #FFF1F0;
  --color-danger-border: #F0C6C1;
  /* Sidebar (intentional dark rail) */
  --color-sidebar-bg: #111318;
  --color-sidebar-bg-translucent: rgba(17, 19, 24, 0.9);
  --color-sidebar-text: #F7F8FA;
  --color-sidebar-text-muted: #A7B0BD;
  --color-sidebar-hover: rgba(255, 255, 255, 0.07);
  --color-sidebar-active-bg: rgba(10, 132, 255, 0.18);
  --color-sidebar-active-text: #FFFFFF;
  /* Radii — iOS 20/24 on cards, 8/12 on controls */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  /* Shadows — soft against light bg */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-float: 0 18px 42px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 64px -18px rgba(15, 23, 42, 0.28), 0 12px 32px -16px rgba(15, 23, 42, 0.18);
  --shadow-popover: 0 18px 44px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-focus: 0 0 0 4px rgba(10, 132, 255, 0.25);
  /* Typography */
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', 'Segoe UI', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, 'Menlo', monospace;
  /* Layout */
  --sidebar-width: 220px;
  --header-height: 60px;
  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 200ms var(--ease-out);
  --transition-slow: 320ms var(--ease-out);
}

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--color-text-onlight);
  background: var(--color-bg);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga";
  font-size: 14px;
}
/* Page-level headings render on the LIGHT page bg → dark text */
h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.022em; line-height: 1.15; color: var(--color-text-onlight); }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.019em; line-height: 1.2; color: var(--color-text-onlight); }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.014em; line-height: 1.3; color: var(--color-text-onlight); }
h4 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.33; color: var(--color-text-onlight); }
p { color: var(--color-text-onlight); }
a { color: var(--color-primary); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.75; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
.mono, .font-mono { font-family: var(--font-mono); }
.hidden { display: none !important; }

.card h1, .card h2, .card h3, .card h4, .card p,
.modal h1, .modal h2, .modal h3, .modal h4 { color: var(--color-text); }
.sidebar h1, .sidebar h2, .sidebar h3, .sidebar h4 { color: var(--color-sidebar-text); }
.card p, .modal-body p { color: var(--color-text-secondary); }
.sidebar p { color: var(--color-sidebar-text-muted); }

/* ========== APP LAYOUT ========== */
#app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--color-sidebar-bg);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--color-sidebar-text);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
}
.sidebar.hidden { display: none; }

.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  transition: margin-left var(--transition);
}
.main-wrapper.full-width { margin-left: 0; }

@media (min-width: 769px) {
  body.sidebar-collapsed .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-width)));
  }

  body.sidebar-collapsed .main-wrapper {
    margin-left: 0;
  }
}

.header {
  height: var(--header-height);
  background: rgba(245, 245, 247, 0.80);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border-onlight-soft);
  display: flex;
  align-items: center;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.content {
  flex: 1;
  padding: 24px 28px;
  max-width: 1320px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
}

.content--public {
  max-width: none;
  padding: 0;
  margin: 0;
}

/* ========== SIDEBAR — Charcoal card-rail ========== */
.sidebar-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--color-sidebar-text-muted);
  font-size: 16px;
  padding: 14px 18px;
}

.sidebar-brand {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
}
.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-info) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.30);
}
.brand-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-sidebar-text);
  letter-spacing: -0.02em;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  min-height: 36px;
  border-radius: 10px;
  color: var(--color-sidebar-text-muted);
  transition: background var(--transition), color var(--transition);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.003em;
}
.nav-link:hover { background: var(--color-sidebar-hover); color: var(--color-sidebar-text); }
.nav-link.active {
  background: var(--color-sidebar-active-bg);
  color: var(--color-primary);
  font-weight: 600;
}
.nav-link.active .nav-icon { color: var(--color-primary); }
.nav-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  color: inherit;
  flex-shrink: 0;
  opacity: 0.9;
}

.sidebar-user {
  padding: 14px 14px 16px;
  border-top: 1px solid var(--color-border-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-info) 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
  flex-shrink: 0;
  letter-spacing: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { color: var(--color-sidebar-text); font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-logout {
  background: transparent;
  border: none;
  color: var(--color-sidebar-text-muted);
  font-size: 14px;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  transition: background var(--transition), color var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-logout:hover { background: var(--color-sidebar-hover); color: var(--color-danger); }

/* ========== HEADER ========== */
.header-content { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.header-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.header-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text-onlight-secondary);
  font-size: 15px;
  transition: background var(--transition), color var(--transition);
}
.header-menu-toggle:hover {
  background: var(--color-fill-onlight);
  color: var(--color-text-onlight);
}
.header-menu-toggle.is-collapsed {
  background: var(--color-fill-onlight);
  color: var(--color-text-onlight);
}
.header-title { font-size: 17px; font-weight: 700; color: var(--color-text-onlight); letter-spacing: -0.016em; }
.header-subtitle { font-size: 12px; color: var(--color-text-onlight-secondary); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

.notification-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--color-text-onlight-secondary);
  font-size: 16px;
  transition: background var(--transition), color var(--transition);
}
.notification-bell:hover { background: var(--color-fill-onlight); color: var(--color-text-onlight); }

.notification-bell__count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--color-danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notification-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(400px, calc(100vw - 32px));
  padding: 16px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-float);
  z-index: 120;
  color: var(--color-text);
}

.notification-popover__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.notification-popover__header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.notification-popover__header p,
.notification-popover__empty span {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.notification-popover__empty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 4px 4px;
}

.notification-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification-item {
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  overflow: hidden;
  transition: background var(--transition);
}
.notification-item:hover { background: var(--color-surface-3); }

.notification-item.is-unread {
  border-color: transparent;
  background: var(--color-primary-bg);
}

.notification-item__summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
}

.notification-item__summary::-webkit-details-marker {
  display: none;
}

.notification-item__copy {
  min-width: 0;
}

.notification-item__title {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-text);
  font-weight: 500;
}

.notification-item__meta {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.notification-item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.notification-item__status {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.notification-item__dismiss {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--color-fill);
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.notification-item__dismiss:hover { background: var(--color-surface-hover); color: var(--color-text); border-color: var(--color-border); }

.notification-item__body {
  padding: 0 14px 14px;
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.notification-list--archive .notification-item__dismiss {
  display: none;
}

/* ========== CARDS — quiet light surfaces ========== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow-card);
  color: var(--color-text);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-1px); border-color: var(--color-border-strong); box-shadow: var(--shadow-md); }
.card-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  font-weight: 600;
}
.card-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
  letter-spacing: -0.025em;
  font-feature-settings: 'tnum' on, 'lnum' on;
}
.card-footer { font-size: 13px; color: var(--color-text-secondary); margin-top: 8px; font-weight: 500; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.chart-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow-card);
  color: var(--color-text);
}
.chart-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chart-card h3::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--color-primary);
  border-radius: 2px;
  flex-shrink: 0;
}
.chart-container { position: relative; height: 240px; }

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

/* ========== BUTTONS — Apple system controls ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition), opacity var(--transition), transform var(--transition);
  white-space: nowrap;
  min-height: 36px;
  font-family: inherit;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: 0 2px 10px rgba(10, 132, 255, 0.25); }
.btn-primary:hover { background: var(--color-primary-dark); box-shadow: 0 4px 14px rgba(10, 132, 255, 0.35); }
.btn-success { background: var(--color-success); color: #fff; }
.btn-success:hover { background: #28B94B; }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: #E0332A; }
/* Outline on LIGHT page chrome */
.btn-outline {
  background: transparent;
  border-color: var(--color-border-onlight);
  color: var(--color-text-onlight);
}
.btn-outline:hover { background: var(--color-fill-onlight); border-color: var(--color-text-onlight-muted); }
/* Inside app surfaces, outline buttons stay quiet and readable */
.card .btn-outline, .modal .btn-outline {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}
.card .btn-outline:hover, .modal .btn-outline:hover { border-color: var(--color-border-strong); color: var(--color-text); background: var(--color-surface-hover); }
/* Quiet white button */
.btn-white { background: #FFFFFF; color: #000; }
.btn-white:hover { background: var(--color-surface-2); }
.btn-secondary { background: var(--color-surface-3); color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover { background: var(--color-surface-hover); }
.btn-sm { padding: 6px 14px; font-size: 13px; min-height: 30px; }
.btn-lg { padding: 14px 28px; font-size: 15px; min-height: 48px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ========== FORMS — calm light controls ========== */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
  letter-spacing: -0.003em;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 15px;
  background: var(--color-surface);
  color: var(--color-text);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
  min-height: 44px;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--color-text-muted); }
.form-input:hover,
.form-select:hover,
.form-textarea:hover { background: var(--color-surface-hover); border-color: var(--color-border-strong); }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  background: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386868B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.form-textarea { resize: vertical; min-height: 88px; padding: 12px 16px; }
.form-error { font-size: 12px; color: var(--color-danger); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-input.error,
.form-select.error { border-color: var(--color-danger); box-shadow: 0 0 0 4px rgba(255, 69, 58, 0.20); }

/* ========== BADGES — Apple pill style with alpha color tints ========== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: none;
  line-height: 1.4;
}
.badge-primary { background: var(--color-primary-bg); color: var(--color-primary-dark); }
.badge-success { background: var(--color-success-bg-soft); color: var(--color-success-ink); }
.badge-warning { background: var(--color-warning-bg-soft); color: var(--color-warning-ink); }
.badge-danger { background: var(--color-danger-bg-soft); color: var(--color-danger-ink); }
.badge-info { background: var(--color-info-bg-soft); color: var(--color-info-ink); }
.badge-default { background: var(--color-neutral-bg); color: var(--color-text-secondary); }

.badge-priority-low { background: var(--color-neutral-bg); color: var(--color-text-muted); }
.badge-priority-medium { background: var(--color-info-bg-soft); color: var(--color-primary-dark); }
.badge-priority-high { background: var(--color-warning-bg-soft); color: var(--color-warning-ink); }
.badge-priority-urgent { background: var(--color-danger-bg-soft); color: var(--color-danger-ink); }

/* Status dot pills (Apple convention — dot + label) */
.badge-dot { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; }
.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background: currentColor;
}

/* ========== TABLES — quiet light tables ========== */
.table-wrapper { overflow-x: auto; margin-bottom: 20px; }
.table-wrapper--compact { margin-bottom: 0; }
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  color: var(--color-text);
}
thead { background: transparent; }
th {
  padding: 14px 18px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}
td {
  padding: 14px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--color-border-soft);
  color: var(--color-text);
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--color-surface-hover); }
tbody tr:nth-child(even) { background: var(--color-surface-2); }
tbody tr:nth-child(even):hover { background: var(--color-surface-hover); }

/* ========== TASK CARDS ========== */
.task-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.task-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-border-strong); }
.task-card.overdue { border-left: 3px solid var(--color-danger); }
.task-card.due-soon { border-left: 3px solid var(--color-warning); }
.task-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.task-title { font-size: 1rem; font-weight: 600; }
.task-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.task-desc { font-size: 0.85rem; color: var(--color-text-secondary); margin-bottom: 10px; }
.task-desc--compact {
  margin-bottom: 10px;
  max-width: 58ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-assignee, .task-unassigned { font-size: 0.82rem; color: var(--color-text-secondary); margin-bottom: 8px; display: block; }
.task-unassigned { color: var(--color-warning); font-style: italic; }
.task-meta { display: flex; gap: 16px; font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 8px; flex-wrap: wrap; }
.time-remaining { color: var(--color-info); font-weight: 500; }
.task-actions { display: flex; gap: 6px; margin-top: 8px; }
.task-list { display: flex; flex-direction: column; gap: 10px; }

.task-card--manager {
  padding: 14px 16px;
  border-radius: 16px;
}

.task-card--manager .task-card-header {
  margin-bottom: 6px;
}

.task-card--manager .task-title {
  font-size: 0.98rem;
  line-height: 1.35;
}

.task-summary-line--manager {
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.task-summary-token {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--color-text-secondary);
}

.task-summary-token--warning {
  border-color: var(--color-warning-border);
  background: var(--color-warning-bg-soft);
  color: var(--color-warning-ink);
}

.task-summary-token--danger {
  border-color: var(--color-danger-border);
  background: var(--color-danger-bg-soft);
  color: var(--color-danger-ink);
}

.task-card--manager .task-footer {
  margin-top: 2px;
  align-items: center;
}

.task-actions--manager {
  margin-top: 0;
  flex-wrap: wrap;
}

.task-action-link {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--color-text-muted);
}

.task-action-link:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.task-action-link--danger {
  color: var(--color-danger);
}

.worker-tracker-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.worker-tracker-summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.worker-tracker-summary__heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.worker-tracker-summary__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.worker-tracker-summary__controls {
  max-width: 260px;
}

.worker-tracker-team-select {
  min-width: 220px;
}

.worker-tracker-summary__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.worker-tracker-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 49, 50, 0.12);
  background: rgba(255, 255, 255, 0.88);
}

.worker-tracker-stat--danger {
  border-color: rgba(198, 64, 64, 0.22);
  background: rgba(255, 242, 242, 0.92);
}

.worker-tracker-stat--warning {
  border-color: rgba(182, 126, 41, 0.22);
  background: rgba(255, 248, 238, 0.92);
}

.worker-tracker-stat--info {
  border-color: rgba(56, 97, 141, 0.22);
  background: rgba(243, 247, 252, 0.92);
}

.worker-tracker-stat__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
}

.worker-tracker-stat__value {
  font-size: 1.15rem;
  color: var(--color-text);
}

.worker-tracker-summary__hint {
  margin: 0;
  color: var(--color-text-light);
}

.worker-tracker-grid {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
}

.worker-tracker-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.worker-tracker-section--detail {
  min-height: 320px;
}

.worker-tracker-member-list,
.worker-tracker-task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.worker-tracker-member-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 49, 50, 0.1);
  background: rgba(255, 255, 255, 0.95);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.worker-tracker-member-row:hover,
.worker-tracker-member-row:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 49, 50, 0.08);
  border-color: rgba(15, 49, 50, 0.2);
}

.worker-tracker-member-row.is-active {
  border-color: rgba(17, 91, 122, 0.35);
  background: rgba(242, 249, 252, 0.98);
}

.worker-tracker-member-row__identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.worker-tracker-member-row__name {
  color: var(--color-text);
}

.worker-tracker-member-row__meta {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.worker-tracker-member-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.worker-tracker-member-metric {
  min-width: 76px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(247, 249, 250, 0.95);
  border: 1px solid rgba(15, 49, 50, 0.08);
}

.worker-tracker-member-metric--danger {
  background: rgba(255, 242, 242, 0.95);
  border-color: rgba(198, 64, 64, 0.18);
}

.worker-tracker-member-metric--warning {
  background: rgba(255, 248, 238, 0.95);
  border-color: rgba(182, 126, 41, 0.18);
}

.worker-tracker-member-metric__label {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

.worker-tracker-member-metric__value {
  color: var(--color-text);
}

.worker-tracker-task-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 49, 50, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

.worker-tracker-task-row__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.worker-tracker-task-row__titleline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.worker-tracker-task-row__title {
  font-size: 1rem;
  color: var(--color-text);
}

.worker-tracker-task-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--color-text-light);
  font-size: 0.92rem;
}

.worker-tracker-task-row__update {
  margin: 0;
  color: var(--color-text-light);
  font-size: 0.92rem;
}

.worker-tracker-task-row__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* ============================================================
 * Worker Tracker — hierarchical drilldown (.wt-*)
 *   Team rows -> Worker rows -> Task rows, plus Unassigned panel.
 *   Dense, enterprise, no chart-heavy visuals, no giant cards.
 * ========================================================== */

.wt-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-variant-numeric: tabular-nums;
}

/* --- Top bar --- */
.wt-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.wt-topbar__title { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wt-topbar__heading {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin: 0;
}
.wt-topbar__sub {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}
.wt-topbar__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.wt-topbar__select {
  min-width: 200px;
  width: 100%;
  height: 34px;
  padding: 0 30px 0 10px;
  font-size: 0.85rem;
}
.wt-topbar__open-tasks { height: 34px; padding: 0 14px; font-size: 0.85rem; }

/* --- Teams stack (one flat list, no nested cards) --- */
.wt-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wt-stack__caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 4px;
}
.wt-stack__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.wt-stack__hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* --- Team row --- */
.wt-team {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-text-muted);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.wt-team:hover { box-shadow: var(--shadow-sm); }
.wt-team.is-open { box-shadow: var(--shadow-sm); }

.wt-team--good { border-left-color: var(--color-success); }
.wt-team--warning { border-left-color: var(--color-warning); }
.wt-team--danger { border-left-color: var(--color-danger); }
.wt-team--neutral { border-left-color: #A6AFBB; }
.wt-team--unknown { border-left-color: var(--color-neutral-border); }

.wt-team__header {
  width: 100%;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 200px auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.wt-team__header:hover { background: var(--color-surface-hover); }
.wt-team.is-open > .wt-team__header { background: var(--color-info-bg-soft); }

.wt-team__identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wt-team__name {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wt-team__sub {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wt-team__body {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-2);
  padding: 6px 0 8px;
}

/* --- Worker row (nested, 24px indent) --- */
.wt-worker {
  border-top: 1px solid var(--color-border-soft);
  margin-left: 24px;
}
.wt-worker:first-child { border-top: 0; }
.wt-worker__header {
  width: 100%;
  display: grid;
  grid-template-columns: 20px 28px minmax(0, 1fr) 180px auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 8px;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-radius: 6px;
}
.wt-worker__header:hover { background: var(--color-surface-hover); }
.wt-worker.is-open > .wt-worker__header { background: var(--color-info-bg-soft); }

.wt-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--color-primary-bg);
  color: var(--color-primary-dark);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}

.wt-worker__identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.wt-worker__name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wt-worker__title {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wt-worker__body {
  padding: 2px 18px 10px 56px;
  background: transparent;
}

/* --- Tasks (nested, 48px total indent from team edge) --- */
.wt-tasks {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  overflow: hidden;
}
.wt-task {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px 9px 0;
  border-top: 1px solid var(--color-border-soft);
}
.wt-task:first-child { border-top: 0; }
.wt-task:hover { background: var(--color-surface-hover); }
.wt-task.is-overdue { background: var(--color-danger-bg-soft); }

.wt-task__prio {
  align-self: stretch;
  display: block;
  width: 4px;
  background: #A6AFBB;
  border-radius: 0 2px 2px 0;
}
.wt-task__prio--low    { background: #8C97A6; }
.wt-task__prio--medium { background: var(--color-primary); }
.wt-task__prio--high   { background: var(--color-warning); }
.wt-task__prio--urgent { background: var(--color-danger); }

.wt-task__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wt-task__titleline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wt-task__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wt-task__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--color-text-secondary);
  font-size: 0.78rem;
}
.wt-task__due { white-space: nowrap; }
.wt-task__due.is-overdue { color: var(--color-danger); font-weight: 600; }
.wt-task__progress { display: inline-flex; align-items: center; gap: 6px; min-width: 120px; }
.wt-task__progress-pct { color: var(--color-text-secondary); font-size: 0.75rem; }
.wt-task__note {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  max-width: 420px;
  overflow: hidden;
}
.wt-task__note-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.wt-task__note-text {
  color: var(--color-text-secondary);
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wt-task__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--transition);
}
.wt-task:hover .wt-task__actions,
.wt-task:focus-within .wt-task__actions { opacity: 1; }

/* --- Progress bars --- */
.wt-progress {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wt-bar {
  position: relative;
  display: inline-block;
  flex: 1 1 auto;
  height: 6px;
  min-width: 80px;
  max-width: 160px;
  background: var(--color-surface-3);
  border-radius: 999px;
  overflow: hidden;
}
.wt-bar--empty { background: var(--color-surface-3); }
.wt-bar__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #007AFF, #3b9eff);
  border-radius: inherit;
  transition: width 0.3s ease;
}
.wt-team--good .wt-bar__fill { background: linear-gradient(90deg, #16a34a, #22c55e); }
.wt-team--warning .wt-bar__fill { background: linear-gradient(90deg, #d97706, #f59e0b); }
.wt-team--danger .wt-bar__fill { background: linear-gradient(90deg, #dc2626, #ef4444); }

.wt-pct {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text);
  min-width: 38px;
  text-align: right;
  flex-shrink: 0;
}

.wt-ibar {
  position: relative;
  display: inline-block;
  width: 80px;
  height: 4px;
  background: var(--color-surface-3);
  border-radius: 999px;
  overflow: hidden;
  vertical-align: middle;
}
.wt-ibar__fill {
  display: block;
  height: 100%;
  background: var(--color-primary);
  border-radius: inherit;
}

/* --- Metric cluster (Open / Overdue / Blocked / Unassigned) --- */
.wt-metrics {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  overflow: hidden;
  flex-shrink: 0;
}
.wt-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 4px 10px;
  border-left: 1px solid var(--color-border);
  line-height: 1.1;
}
.wt-metric:first-child { border-left: 0; }
.wt-metric__label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.wt-metric__value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}
.wt-metric--danger { background: var(--color-danger-bg); }
.wt-metric--danger .wt-metric__value { color: var(--color-danger); }
.wt-metric--danger .wt-metric__label { color: var(--color-danger); }
.wt-metric--warning { background: var(--color-warning-bg); }
.wt-metric--warning .wt-metric__value { color: var(--color-warning-ink); }
.wt-metric--warning .wt-metric__label { color: var(--color-warning-ink); }
.wt-metric--info { background: var(--color-info-bg); }
.wt-metric--info .wt-metric__value { color: var(--color-info-ink); }
.wt-metric--info .wt-metric__label { color: var(--color-info-ink); }

/* --- Worker state pill --- */
.wt-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 110px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.wt-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  flex-shrink: 0;
}
.wt-pill--good    { background: var(--color-success-bg-soft); color: var(--color-success-ink); border-color: var(--color-success-border); }
.wt-pill--warning { background: var(--color-warning-bg-soft); color: var(--color-warning-ink); border-color: var(--color-warning-border); }
.wt-pill--danger  { background: var(--color-danger-bg-soft);  color: var(--color-danger-ink); border-color: var(--color-danger-border); }
.wt-pill--info    { background: var(--color-info-bg-soft);    color: var(--color-info-ink); border-color: var(--color-info-border); }

/* --- Chips (status/priority inline) --- */
.wt-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--color-border);
  background: var(--color-neutral-bg);
  color: var(--color-text-secondary);
  white-space: nowrap;
}
.wt-chip--status-todo        { background: var(--color-neutral-bg); color: var(--color-neutral-ink); border-color: var(--color-neutral-border); }
.wt-chip--status-in_progress { background: var(--color-info-bg-soft); color: var(--color-primary-dark); border-color: var(--color-info-border); }
.wt-chip--status-blocked     { background: var(--color-danger-bg-soft); color: var(--color-danger-ink); border-color: var(--color-danger-border); }
.wt-chip--status-completed   { background: var(--color-success-bg-soft); color: var(--color-success-ink); border-color: var(--color-success-border); }
.wt-chip--status-cancelled   { background: var(--color-neutral-bg); color: var(--color-text-muted); border-color: var(--color-neutral-border); }

.wt-chip--prio-low    { background: var(--color-neutral-bg); color: var(--color-text-muted); border-color: var(--color-neutral-border); }
.wt-chip--prio-medium { background: var(--color-info-bg-soft); color: var(--color-primary-dark); border-color: var(--color-info-border); }
.wt-chip--prio-high   { background: var(--color-warning-bg-soft); color: var(--color-warning-ink); border-color: var(--color-warning-border); }
.wt-chip--prio-urgent { background: var(--color-danger-bg-soft); color: var(--color-danger-ink); border-color: var(--color-danger-border); }

.wt-chip--team {
  background: var(--color-info-bg-soft);
  color: var(--color-primary-dark);
  border-color: var(--color-info-border);
}

/* --- Chevron --- */
.wt-chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  transition: transform 0.15s ease;
}

/* --- Loading / empty / error rows --- */
.wt-loading,
.wt-empty,
.wt-error {
  padding: 12px 24px;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}
.wt-error { color: var(--color-danger); }

/* --- Unassigned panel (separate, compact) --- */
.wt-unassigned {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.wt-unassigned__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-2);
}
.wt-unassigned__title { display: flex; align-items: center; gap: 10px; }
.wt-unassigned__label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text);
}
.wt-unassigned__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}
.wt-unassigned__hint {
  font-size: 0.78rem;
  color: var(--color-text-secondary);
}
.wt-unassigned__list {
  display: flex;
  flex-direction: column;
}
.wt-u-task {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px 9px 0;
  border-top: 1px solid var(--color-border-soft);
}
.wt-u-task:first-child { border-top: 0; }
.wt-u-task:hover { background: var(--color-surface-hover); }
.wt-u-task__main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wt-u-task__titleline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wt-u-task__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wt-u-task__meta {
  font-size: 0.78rem;
  color: var(--color-text-secondary);
}
.wt-u-task__actions { display: flex; gap: 6px; }

/* --- Responsive --- */
@media (max-width: 960px) {
  .wt-team__header {
    grid-template-columns: 20px minmax(0, 1fr);
    grid-auto-rows: auto;
    row-gap: 8px;
  }
  .wt-team__header .wt-progress,
  .wt-team__header .wt-metrics {
    grid-column: 1 / -1;
  }
  .wt-worker__header {
    grid-template-columns: 20px 28px minmax(0, 1fr);
    row-gap: 6px;
  }
  .wt-worker__header .wt-progress,
  .wt-worker__header .wt-metrics,
  .wt-worker__header .wt-pill {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .wt-worker__body { padding-left: 24px; }
  .wt-task {
    grid-template-columns: 4px minmax(0, 1fr);
    row-gap: 6px;
  }
  .wt-task__actions {
    grid-column: 2 / -1;
    opacity: 1;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .wt-worker { margin-left: 12px; }
  .wt-worker__body { padding-left: 12px; padding-right: 12px; }
  .wt-metrics { flex-wrap: wrap; }
  .wt-metric { min-width: 72px; flex: 1 1 72px; }
}

@media (max-width: 480px) {
  .wt-topbar__actions {
    width: 100%;
  }

  .wt-topbar__select,
  .wt-topbar__open-tasks {
    width: 100%;
    min-width: 0;
  }

  .wt-topbar__open-tasks {
    display: inline-flex;
    justify-content: center;
  }

  .wt-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .wt-metric {
    min-width: 0;
    padding: 6px 4px;
  }
}

.calendar-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.calendar-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.calendar-toolbar__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.calendar-month-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-month-label {
  margin: 0;
  font-size: 1.25rem;
  color: var(--color-text);
}

.calendar-team-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-team-toggle {
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text-secondary);
  border-radius: var(--radius-full);
  padding: 8px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.calendar-team-toggle:hover,
.calendar-team-toggle:focus-visible {
  border-color: rgba(17, 91, 122, 0.32);
  color: var(--color-text);
}

.calendar-team-toggle.is-active {
  border-color: rgba(17, 91, 122, 0.38);
  background: rgba(242, 249, 252, 0.98);
  color: var(--color-primary-dark);
}

.calendar-toolbar__summary {
  margin: 0;
  color: var(--color-text-light);
}

.calendar-empty-note {
  margin: -4px 0 0;
  color: var(--color-text-light);
}

.calendar-grid-wrap {
  overflow-x: auto;
}

.calendar-grid {
  min-width: 860px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--color-border);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
}

.calendar-weekday {
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
}

.calendar-day {
  min-height: 150px;
  padding: 10px 10px 12px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
}

.calendar-day:nth-child(7n) {
  border-right: none;
}

.calendar-day--outside {
  background: #fbfcfd;
}

.calendar-day--today {
  background: rgba(242, 249, 252, 0.98);
}

.calendar-day__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-day__number {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
}

.calendar-day--outside .calendar-day__number {
  color: var(--color-text-muted);
}

.calendar-day__events {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-event {
  width: 100%;
  border: 1px solid rgba(17, 91, 122, 0.14);
  border-left: 3px solid var(--color-info);
  background: rgba(243, 247, 252, 0.9);
  color: var(--color-text);
  border-radius: 12px;
  padding: 8px 9px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.calendar-event:hover,
.calendar-event:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 49, 50, 0.08);
}

.calendar-event--completed {
  border-left-color: #15803d;
  background: rgba(240, 253, 244, 0.92);
}

.calendar-event--blocked {
  border-left-color: #d97706;
  background: rgba(255, 248, 238, 0.94);
}

.calendar-event--overdue,
.calendar-event--urgent {
  border-left-color: var(--color-danger);
  background: rgba(254, 242, 242, 0.94);
}

.calendar-event--high {
  border-left-color: var(--color-warning);
}

.calendar-event__title {
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
}

.calendar-event__meta {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--color-text-light);
}

.calendar-task-modal {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calendar-task-modal__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.calendar-task-modal__title {
  margin: 0;
  font-size: 1.05rem;
}

.calendar-task-modal__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.calendar-task-modal__stat {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 49, 50, 0.1);
  background: rgba(255, 255, 255, 0.92);
}

.calendar-task-modal__stat-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 4px;
}

.calendar-task-modal__stat-value {
  color: var(--color-text);
}

.calendar-task-modal__text {
  margin: 0;
  color: var(--color-text);
  line-height: 1.6;
}

.calendar-task-modal__text--muted {
  color: var(--color-text-light);
}

.task-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-accordion {
  padding: 0;
  overflow: hidden;
}

.task-accordion__summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
}

.task-accordion__summary::-webkit-details-marker {
  display: none;
}

.task-accordion__head {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-accordion__title {
  font-size: 0.96rem;
}

.task-accordion__summary-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.task-accordion__due {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: #f8fafc;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.task-accordion__due--warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: #fffbeb;
  color: #92400e;
}

.task-accordion__due--danger {
  border-color: rgba(239, 68, 68, 0.28);
  background: #fef2f2;
  color: #b91c1c;
}

.task-accordion__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--color-primary-bg);
  color: var(--color-primary-dark);
  font-size: 1rem;
  font-weight: 700;
}

.task-accordion__icon::before {
  content: '+';
}

.task-accordion[open] .task-accordion__icon::before {
  content: '-';
}

.task-accordion__body {
  padding: 0 16px 16px;
}

/* ========== PROGRESS BAR ========== */
.progress-bar-container {
  background: #e2e8f0;
  border-radius: var(--radius-full);
  height: 8px;
  position: relative;
  margin-bottom: 8px;
  overflow: visible;
}
.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  transition: width 0.4s ease;
  min-width: 0;
}
.progress-label {
  position: absolute;
  right: 0;
  top: -18px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--color-text-secondary);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; color: var(--color-text); }
.empty-state p { font-size: 0.9rem; }

/* ========== LOADING ========== */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--color-text-secondary);
  gap: 12px;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== TOASTS — dark card floating on screen ========== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-float);
  color: var(--color-text);
  transform: translateX(120%);
  transition: transform var(--transition-slow);
  font-size: 13px;
  min-width: 280px;
}
.toast.show { transform: translateX(0); }
.toast-success { border-left: 3px solid var(--color-success); }
.toast-error { border-left: 3px solid var(--color-danger); }
.toast-info { border-left: 3px solid var(--color-info); }
.toast-icon { font-size: 15px; flex-shrink: 0; }
.toast-msg { flex: 1; color: var(--color-text); }
.toast-close { background: none; border: none; font-size: 16px; color: var(--color-text-muted); padding: 0 0 0 8px; transition: color var(--transition); }
.toast-close:hover { color: var(--color-text); }

/* ========== MODAL — light sheet on scrim ========== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  animation: modal-fadein 0.2s ease;
}
.modal-backdrop.hidden { display: none; }
@keyframes modal-fadein { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  animation: modal-slideup 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-slideup { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--color-border);
}
.modal-title { font-size: 18px; font-weight: 700; letter-spacing: -0.016em; color: var(--color-text); }
.modal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--color-text-muted);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  transition: background var(--transition), color var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--color-surface-hover); color: var(--color-text); }
.modal-body { padding: 22px 26px; color: var(--color-text); font-size: 14px; line-height: 1.55; }
.modal-footer {
  padding: 16px 26px 20px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ========== LOGIN PAGE — WHITE card on light bg (pre-auth exception) ========== */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  width: 100%;
  background: var(--color-bg);
}
.login-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-onlight-soft);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  color: var(--color-text-onlight);
}
.login-card h1, .login-card h2, .login-card h3, .login-card p { color: var(--color-text-onlight); }
.login-brand {
  margin-bottom: 32px;
}
.login-brand h1 { font-size: 28px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; letter-spacing: -0.022em; color: var(--color-text-onlight); }
.login-brand p { font-size: 15px; color: var(--color-text-onlight-secondary); margin-top: 8px; font-weight: 400; }
.login-brand .brand-icon { width: 32px; height: 32px; border-radius: 9px; }
/* Inputs on the white login card revert to light style */
.login-card .form-input,
.login-card .form-select,
.login-card .form-textarea {
  height: 50px;
  padding: 0 16px;
  background: #FFFFFF;
  border: 1px solid #D2D2D7;
  border-radius: var(--radius-md);
  color: var(--color-text-onlight);
  font-size: 17px;
  text-align: left;
}
.login-card .form-input::placeholder { color: #86868B; }
.login-card .form-input:focus,
.login-card .form-select:focus,
.login-card .form-textarea:focus {
  background: #FFFFFF;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.25);
}
.login-card .form-label { text-align: left; color: var(--color-text-onlight-secondary); font-size: 13px; font-weight: 500; }
.login-card .btn-primary {
  width: 100%;
  height: 48px;
  font-size: 17px;
  font-weight: 600;
  margin-top: 8px;
}
.login-back-link {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  cursor: pointer;
  transition: opacity var(--transition);
  display: inline-block;
}
.login-back-link:hover { opacity: 0.7; }
.login-error {
  background: rgba(255, 59, 48, 0.10);
  color: #FF3B30;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
  text-align: left;
}
.login-error.show { display: block; }

/* ---- Auth: dual-mode (Sign in / Sign up) scaffolding ---- */
.login-card--auth { padding: 40px 36px; max-width: 460px; }
.login-card--auth .login-brand { margin-bottom: 22px; }
.login-card--auth .login-brand h1 { font-size: 24px; }
.login-card--auth .login-brand p { font-size: 14px; margin-top: 6px; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #EFEFF4;
  border-radius: 12px;
  padding: 3px;
  margin: 0 0 24px;
  gap: 2px;
}
.auth-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-onlight-secondary);
  border-radius: 9px;
  cursor: pointer;
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.auth-tab:hover { color: var(--color-text-onlight); }
.auth-tab.is-active {
  background: #FFFFFF;
  color: var(--color-text-onlight);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.auth-form-slot { display: flex; flex-direction: column; }
.auth-form-slot form { display: flex; flex-direction: column; gap: 14px; text-align: left; }

.form-row { display: grid; gap: 12px; }
.form-row--two { grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) {
  .form-row--two { grid-template-columns: 1fr; }
}

.auth-toggle-line {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-onlight-secondary);
}
.auth-toggle-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
}
.auth-toggle-link:hover { text-decoration: underline; }

/* ---- Role picker (Manager / Employee) ---- */
.role-picker {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  grid-template-columns: 1fr;
}
.role-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--color-border-onlight);
  border-radius: 12px;
  background: #FFFFFF;
  cursor: pointer;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background 160ms var(--ease-out);
}
.role-option:hover { border-color: rgba(10, 132, 255, 0.4); }
.role-option__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.role-option__indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-onlight);
  background: #FFFFFF;
  flex-shrink: 0;
  margin-top: 2px;
  transition: border-color 160ms var(--ease-out), background 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
  position: relative;
}
.role-option__copy { display: flex; flex-direction: column; gap: 2px; }
.role-option__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-onlight);
}
.role-option__desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--color-text-onlight-secondary);
}
.role-option:has(.role-option__input:checked) {
  border-color: var(--color-primary);
  background: rgba(10, 132, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.14);
}
.role-option:has(.role-option__input:checked) .role-option__indicator {
  border-color: var(--color-primary);
  background: var(--color-primary);
  box-shadow: inset 0 0 0 3px #FFFFFF;
}
.role-option__input:focus-visible + .role-option__indicator {
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.25);
}

/* ---- Demo autofill panel ---- */
.auth-demo {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--color-fill-onlight);
  border: 1px solid var(--color-border-onlight);
  border-radius: 12px;
  text-align: left;
}
.auth-demo__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.auth-demo__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-onlight);
}
.auth-demo__sub {
  font-size: 12px;
  color: var(--color-text-onlight-secondary);
}
.auth-demo__code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: #FFFFFF;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--color-border-onlight);
  color: var(--color-text-onlight);
}
.auth-demo__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.auth-demo__btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 12px;
  height: auto;
  line-height: 1.3;
  text-align: left;
}
.auth-demo__btn-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-onlight);
}
.auth-demo__btn-email {
  font-size: 11px;
  color: var(--color-text-onlight-secondary);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .auth-demo__actions { grid-template-columns: 1fr; }
}

/* ---- Auth: inline notice banner ---- */
.auth-notice {
  display: none;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}
.auth-notice.show { display: flex; }
.auth-notice__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
}
.auth-notice__text {
  flex: 1;
  color: var(--color-text-onlight);
}
.auth-notice--success {
  background: rgba(48, 209, 88, 0.12);
  border: 1px solid rgba(48, 209, 88, 0.35);
}
.auth-notice--success .auth-notice__icon { background: #30D158; }
.auth-notice--info {
  background: rgba(10, 132, 255, 0.10);
  border: 1px solid rgba(10, 132, 255, 0.30);
}
.auth-notice--info .auth-notice__icon { background: #0A84FF; }

/* ---- Auth: pending verification state ---- */
.auth-tabs.is-hidden { display: none; }
.auth-pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 4px 4px;
  gap: 10px;
}
.auth-pending__icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 132, 255, 0.12);
  color: #0A84FF;
  font-size: 22px;
  margin-bottom: 4px;
}
.auth-pending__title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text-onlight);
  margin: 0;
}
.auth-pending__copy {
  font-size: 14px;
  color: var(--color-text-onlight-secondary);
  margin: 0;
  max-width: 340px;
  line-height: 1.45;
}
.auth-pending__email {
  margin: 6px 0 0;
  padding: 10px 14px;
  background: var(--color-fill-onlight);
  border: 1px solid var(--color-border-onlight);
  border-radius: 10px;
  font-size: 13px;
  color: var(--color-text-onlight);
  width: 100%;
  box-sizing: border-box;
  word-break: break-all;
}
.auth-pending__email-label {
  color: var(--color-text-onlight-secondary);
}
.auth-pending__hint {
  font-size: 12px;
  color: var(--color-text-onlight-secondary);
  margin: 0;
  max-width: 340px;
  line-height: 1.45;
}
.auth-pending__cta {
  margin-top: 10px;
}

/* ---- Manager Teams: split join-access block ---- */
.join-access-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.join-access-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.03);
}
.join-access-block__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.join-access-block__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 260px;
}
.join-access-block__eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.join-access-block__eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.join-access-block__eyebrow--employee { color: var(--color-info); }
.join-access-block__eyebrow--manager { color: var(--color-purple); }
.join-access-block--manager { border-color: rgba(191, 90, 242, 0.32); }
.join-access-block--employee { border-color: rgba(100, 210, 255, 0.32); }
.join-access-block__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}
.join-access-block__note {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--color-text-secondary);
}
.join-access-block__regen { flex-shrink: 0; }

/* ========== PAGINATION ========== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
}
.pagination button {
  padding: 0 12px;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-onlight-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.pagination button:hover:not(:disabled):not(.active) { background: var(--color-fill-onlight); color: var(--color-text-onlight); }
.pagination button.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.pagination button:disabled { opacity: 0.35; cursor: not-allowed; }
.pagination-info { font-size: 12px; color: var(--color-text-onlight-muted); }

/* Pagination inside a dark card */
.card .pagination button, .modal .pagination button { color: var(--color-text-secondary); }
.card .pagination button:hover:not(:disabled):not(.active),
.modal .pagination button:hover:not(:disabled):not(.active) { background: var(--color-surface-hover); color: var(--color-text); }

/* ========== SEGMENTED CONTROL — Apple iOS style ========== */
.segmented {
  display: inline-flex;
  padding: 3px;
  background: #E5E5EA;
  border-radius: var(--radius-md);
  gap: 2px;
}
.segmented__option {
  min-height: 30px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-onlight);
  background: transparent;
  border: none;
  border-radius: 8px;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), opacity var(--transition);
  cursor: pointer;
  opacity: 0.6;
}
.segmented__option:hover { opacity: 1; }
.segmented__option.is-active {
  background: #FFFFFF;
  color: #000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  opacity: 1;
  font-weight: 600;
}

/* Segmented control inside app surfaces */
.card .segmented, .modal .segmented { background: var(--color-surface-3); }
.card .segmented__option, .modal .segmented__option { color: var(--color-text-muted); }
.card .segmented__option:hover, .modal .segmented__option:hover { color: var(--color-text); }
.card .segmented__option.is-active, .modal .segmented__option.is-active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* ========== FILTERS BAR ========== */
.filters-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group label { font-size: 0.75rem; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.filter-group select, .filter-group input {
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  min-width: 140px;
  background: var(--color-surface);
  color: var(--color-text);
}

.filters-bar__actions {
  margin-left: auto;
  align-items: center;
}

.weekday-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.weekday-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-muted);
  font-size: 0.9rem;
  color: var(--color-text);
}

.team-member-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.team-member-picker__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #f8fafc;
}

.team-member-picker__item strong {
  display: block;
  font-size: 0.9rem;
}

.team-member-picker__item span {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

/* ========== SUMMARY STRIP ========== */
.summary-strip {
  display: flex;
  gap: 24px;
  padding: 14px 20px;
  background: var(--color-primary-bg);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.summary-item { display: flex; flex-direction: column; }
.summary-item .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-primary-dark); font-weight: 600; }
.summary-item .value { font-size: 1.2rem; font-weight: 700; color: var(--color-primary-dark); }

/* ========== TEAM / MEMBER CARDS ========== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.team-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.team-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-primary-light); }
.team-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.team-card p { font-size: 0.85rem; color: var(--color-text-secondary); margin-bottom: 10px; }
.team-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.member-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.member-avatar {
  width: 42px; height: 42px;
  border-radius: var(--radius-full);
  background: var(--color-primary-bg);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem;
  flex-shrink: 0;
}
.member-info h4 { font-size: 0.95rem; font-weight: 600; }
.member-info p { font-size: 0.8rem; color: var(--color-text-secondary); }

/* ========== SECTION HELPERS ========== */
.section { margin-bottom: 28px; }
.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.inline-list { display: flex; flex-direction: column; gap: 8px; }
.inline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.inline-item .title { font-weight: 600; }
.inline-item .meta { font-size: 0.8rem; color: var(--color-text-muted); display: flex; gap: 12px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-hamburger { display: block; }
  .main-wrapper { margin-left: 0; }
  .content { padding: 20px 16px; }
  .header { padding: 0 16px; }
  .header-main { gap: 10px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .chart-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .filters-bar { flex-direction: column; }
  .dashboard-top-split { grid-template-columns: 1fr; }
  .dashboard-summary-table__metric,
  .dashboard-summary-table__value { width: auto; }
}

/* ========== ENHANCED DASHBOARDS ========== */
.page-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 24px 26px;
  margin-bottom: 18px;
  border-radius: 18px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  background:
    radial-gradient(circle at top right, rgba(165, 180, 252, 0.35), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, rgba(0, 122, 255, 0.08) 56%, #f8fafc 100%);
  box-shadow: var(--shadow-md);
}

.page-hero--compact {
  padding: 20px 22px;
}

.page-hero__content,
.page-hero__meta {
  position: relative;
  z-index: 1;
}

.page-hero__content {
  max-width: 700px;
}

.page-hero__eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary-dark);
  margin-bottom: 10px;
}

.page-hero__title {
  font-size: clamp(1.65rem, 2.8vw, 2.3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.page-hero__description {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  max-width: 65ch;
}

.page-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 340px;
}

.page-hero__actions {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.page-hero--employee {
  margin-bottom: 0;
  min-height: 100%;
}

.page-hero--manager .page-hero__meta {
  max-width: 420px;
}

.page-hero--employee .page-hero__meta {
  justify-content: flex-start;
  max-width: none;
  margin-top: 16px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 122, 255, 0.16);
  color: var(--color-primary-dark);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.filters-bar--hero {
  box-shadow: var(--shadow-sm);
}

.card-grid--dashboard {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.dashboard-top-split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}

.dashboard-summary-table-card {
  padding: 18px;
  border-radius: 18px;
}

.dashboard-summary-table {
  border: 1px solid var(--color-border);
}

.dashboard-summary-table tbody th,
.dashboard-summary-table tbody td {
  vertical-align: top;
  background: transparent;
}

.dashboard-summary-table__metric {
  width: 68%;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.9rem;
  color: var(--color-text);
}

.dashboard-summary-table__label {
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.dashboard-summary-table__note {
  display: block;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.dashboard-summary-table__value {
  width: 32%;
  text-align: right;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primary-dark);
}

.dashboard-stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.dashboard-stat-card--warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
}

.dashboard-stat-card--danger {
  border-color: rgba(239, 68, 68, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%);
}

.chart-grid--dashboard {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ========== MANAGER DASHBOARD V2 ========== */

.mgr-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.mgr-header__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.mgr-header__desc {
  color: var(--color-text-secondary);
  font-size: 0.88rem;
  margin: 4px 0 0;
}

.mgr-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.mgr-stat-strip__cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.mgr-stat-strip__cell--danger { border-left: 3px solid var(--color-danger); }
.mgr-stat-strip__cell--warning { border-left: 3px solid var(--color-warning); }
.mgr-stat-strip__cell--info { border-left: 3px solid var(--color-info); }

.mgr-stat-strip__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
}

.mgr-stat-strip__value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.mgr-flow {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mgr-attention-list,
.mgr-people-list {
  display: flex;
  flex-direction: column;
}

.mgr-attention-row,
.mgr-people-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.mgr-attention-row:last-child,
.mgr-people-row:last-child {
  border-bottom: none;
}

.mgr-attention-row__main,
.mgr-people-row__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mgr-attention-row__title {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mgr-attention-row__assignee,
.mgr-people-row__main span {
  color: var(--color-text-secondary);
  font-size: 0.82rem;
}

.mgr-attention-row__meta,
.mgr-people-row__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.mgr-attention-row__due {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.mgr-section-footer {
  padding-top: 12px;
  margin-top: 4px;
}

/* ============================================================
 * Manager Dashboard — calm, attention-first (.dash-*)
 *   Greeting band · Attention strip · Attention queue · Team health
 *   Typography-led, minimal cards, no chart-heavy visuals.
 * ========================================================== */

.dash-page {
  display: flex;
  flex-direction: column;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}
.dash-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* --- Greeting band --- */
.dash-greet {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 4px 0 0;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 16px;
}
.dash-greet__left { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dash-greet__eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.dash-greet__line {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1.15;
}
.dash-greet__name { color: var(--color-primary-dark); }
.dash-greet__teamline {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--color-text-secondary);
}
.dash-greet__teamline-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.dash-greet__teamline-value { color: var(--color-text); font-weight: 600; }

.dash-inline-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed var(--color-border);
  padding: 1px 18px 1px 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-text-muted) 50%),
                    linear-gradient(135deg, var(--color-text-muted) 50%, transparent 50%);
  background-position: calc(100% - 9px) 55%, calc(100% - 4px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.dash-inline-select:focus {
  outline: none;
  border-bottom-color: var(--color-primary);
}

.dash-greet__right { flex-shrink: 0; }
.dash-greet__callout {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  box-shadow: var(--shadow-sm);
}
.dash-greet__callout.is-active {
  background: var(--color-danger-bg-soft);
  border-color: var(--color-danger-border);
  color: var(--color-danger-ink);
}
.dash-greet__callout-num {
  font-size: 1rem;
  font-weight: 800;
  color: inherit;
}
.dash-greet__callout-text { font-weight: 500; }

/* --- Attention strip (4 indicators, no cards) --- */
.dash-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: transparent;
}
.dash-ind {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 22px 18px;
  border-left: 1px solid var(--color-border);
}
.dash-ind:first-child { border-left: 0; }
.dash-ind__head { display: inline-flex; align-items: center; gap: 8px; }
.dash-ind__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--color-text-muted);
  display: inline-block;
}
.dash-ind--danger .dash-ind__dot { background: var(--color-danger); box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.dash-ind--warning .dash-ind__dot { background: var(--color-warning); box-shadow: 0 0 0 3px rgba(245,158,11,0.15); }
.dash-ind--info .dash-ind__dot { background: var(--color-info); box-shadow: 0 0 0 3px rgba(6,182,212,0.15); }
.dash-ind--good .dash-ind__dot { background: var(--color-success); box-shadow: 0 0 0 3px rgba(34,197,94,0.15); }
.dash-ind--calm .dash-ind__dot { background: #A6AFBB; }
.dash-ind__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.dash-ind__value {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.dash-ind--danger .dash-ind__value { color: var(--color-danger); }
.dash-ind--warning .dash-ind__value { color: #b45309; }
.dash-ind--info .dash-ind__value { color: #0e7490; }
.dash-ind--good .dash-ind__value { color: #166534; }
.dash-ind--calm .dash-ind__value { color: var(--color-text-muted); }
.dash-ind__sub {
  font-size: 0.78rem;
  color: var(--color-text-secondary);
}

/* --- Section heads (shared by queue + teams) --- */
.dash-sec__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.dash-sec__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.dash-sec__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 0 8px;
  height: 20px;
  border-radius: 999px;
  background: var(--color-surface-3);
  color: var(--color-text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
}
.dash-sec__count.is-active {
  background: var(--color-primary);
  color: #fff;
}
.dash-sec__hint {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
}

/* --- Attention queue --- */
.dash-queue {
  display: flex;
  flex-direction: column;
}
.dash-queue__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--color-border);
}
.dash-queue__empty {
  padding: 18px 0;
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  font-style: italic;
  border-top: 1px solid var(--color-border);
}
.dash-qrow {
  display: grid;
  grid-template-columns: 28px 4px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s ease;
}
.dash-qrow:hover { background: var(--color-surface-hover); }
.dash-qrow__rank {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}
.dash-qrow__rail {
  align-self: stretch;
  display: block;
  width: 4px;
  border-radius: 2px;
  background: #A6AFBB;
}
.dash-qrow__rail--danger { background: var(--color-danger); }
.dash-qrow__rail--warning { background: var(--color-warning); }
.dash-qrow__rail--info { background: var(--color-info); }
.dash-qrow__rail--good { background: var(--color-success); }

.dash-qrow__main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dash-qrow__line1 {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}
.dash-qrow__reason {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--color-neutral-bg);
  color: var(--color-text-secondary);
}
.dash-qrow__reason--danger  { background: var(--color-danger-bg-soft); color: var(--color-danger-ink); }
.dash-qrow__reason--warning { background: var(--color-warning-bg-soft); color: var(--color-warning-ink); }
.dash-qrow__reason--info    { background: var(--color-info-bg-soft); color: var(--color-info-ink); }
.dash-qrow__reason--good    { background: var(--color-success-bg-soft); color: var(--color-success-ink); }
.dash-qrow__title {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--color-text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-qrow__line2 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  flex-wrap: wrap;
}
.dash-meta { color: var(--color-text-secondary); }
.dash-meta--danger { color: var(--color-danger); font-weight: 600; }
.dash-meta--warning { color: var(--color-warning-ink); font-weight: 600; }
.dash-meta--info { color: var(--color-info-ink); font-weight: 600; }
.dash-sep { color: var(--color-text-muted); }

.dash-qrow__go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s ease;
}
.dash-qrow__go:hover { color: var(--color-primary-dark); }
.dash-qrow:hover .dash-qrow__go { color: var(--color-primary-dark); }
.dash-qrow__go-label {
  opacity: 0;
  transition: opacity 0.15s ease;
}
.dash-qrow:hover .dash-qrow__go-label,
.dash-qrow:focus-within .dash-qrow__go-label { opacity: 1; }
.dash-qrow__chev {
  font-size: 0.95rem;
  line-height: 1;
}

.dash-queue__more {
  margin-top: 10px;
  align-self: flex-start;
  font-size: 0.82rem;
  color: var(--color-primary-dark);
  font-weight: 600;
}
.dash-queue__more:hover { text-decoration: underline; }

/* --- Team health rows --- */
.dash-teams { display: flex; flex-direction: column; }
.dash-teams__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border);
}
.dash-teams__empty {
  padding: 14px 0;
  color: var(--color-text-secondary);
  font-style: italic;
}
.dash-trow {
  display: grid;
  grid-template-columns: 10px minmax(0, 1.4fr) minmax(0, 1fr) 160px auto;
  align-items: center;
  gap: 14px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.15s ease;
}
.dash-trow:hover { background: var(--color-surface-hover); }
.dash-trow__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #A6AFBB;
  justify-self: center;
}
.dash-trow__dot--danger { background: var(--color-danger); }
.dash-trow__dot--warning { background: var(--color-warning); }
.dash-trow__dot--good { background: var(--color-success); }
.dash-trow__dot--neutral { background: #A6AFBB; }
.dash-trow__dot--calm { background: #8C97A6; }

.dash-trow__identity { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dash-trow__name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-trow__sub {
  font-size: 0.78rem;
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-trow__metrics {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
  flex-wrap: wrap;
}
.dash-trow__hint { color: var(--color-text-muted); font-size: 0.78rem; font-style: italic; }
.dash-tm { display: inline-flex; align-items: baseline; gap: 5px; }
.dash-tm__label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.dash-tm__value { font-size: 0.92rem; font-weight: 700; color: var(--color-text); }
.dash-tm--danger .dash-tm__value,
.dash-tm--danger .dash-tm__label { color: var(--color-danger); }
.dash-tm--warning .dash-tm__value,
.dash-tm--warning .dash-tm__label { color: var(--color-warning-ink); }

.dash-trow__completion {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.dash-trow__completion--muted { color: var(--color-text-muted); font-size: 0.82rem; }
.dash-trow__bar {
  position: relative;
  flex: 1 1 auto;
  min-width: 80px;
  height: 4px;
  border-radius: 999px;
  background: var(--color-surface-3);
  overflow: hidden;
}
.dash-trow__barfill {
  display: block;
  height: 100%;
  background: var(--color-primary);
  border-radius: inherit;
  transition: width 0.3s ease;
}
.dash-trow__barfill--danger { background: var(--color-danger); }
.dash-trow__barfill--warning { background: var(--color-warning); }
.dash-trow__barfill--good { background: var(--color-success); }
.dash-trow__barfill--calm { background: var(--color-primary); }
.dash-trow__pct {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text);
  min-width: 40px;
  text-align: right;
}

.dash-trow__go {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.dash-trow:hover .dash-trow__go,
.dash-trow:focus .dash-trow__go {
  opacity: 1;
  color: var(--color-primary-dark);
}

/* --- Quiet navigation footer --- */
.dash-nav {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0 8px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.dash-nav__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-right: 2px;
}
.dash-nav__link {
  color: var(--color-text-secondary);
  font-weight: 600;
  transition: color 0.15s ease;
}
.dash-nav__link:hover { color: var(--color-primary-dark); text-decoration: underline; }
.dash-nav__sep { color: var(--color-border); }

/* --- Responsive --- */
@media (max-width: 960px) {
  .dash-greet {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .dash-strip { grid-template-columns: repeat(2, 1fr); }
  .dash-ind { border-left: 0; border-top: 1px solid var(--color-border); }
  .dash-ind:nth-child(1), .dash-ind:nth-child(2) { border-top: 0; }
  .dash-ind:nth-child(2n) { border-left: 1px solid var(--color-border); }
  .dash-trow {
    grid-template-columns: 10px minmax(0, 1fr);
    row-gap: 8px;
  }
  .dash-trow__metrics,
  .dash-trow__completion,
  .dash-trow__go {
    grid-column: 2 / -1;
  }
  .dash-trow__go { opacity: 1; }
  .dash-qrow {
    grid-template-columns: 28px 4px minmax(0, 1fr);
    row-gap: 6px;
  }
  .dash-qrow__go {
    grid-column: 3 / -1;
    justify-self: flex-end;
  }
  .dash-qrow__go-label { opacity: 1; }
}

@media (max-width: 560px) {
  .dash-strip { grid-template-columns: 1fr; }
  .dash-ind { border-left: 0 !important; border-top: 1px solid var(--color-border); }
  .dash-ind:first-child { border-top: 0; }
  .dash-greet__line { font-size: 1.35rem; }
  .dash-ind__value { font-size: 1.7rem; }
}

.chart-card--enhanced {
  border-radius: 16px;
  padding: 18px;
}

.chart-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.chart-card__top p {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  max-width: 36ch;
}

.chart-card--empty {
  min-height: 320px;
}

.chart-card__empty {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  color: var(--color-text-secondary);
}

.chart-card__empty strong {
  font-size: 1rem;
  color: var(--color-text);
}

.chart-card__empty span {
  font-size: 0.86rem;
  max-width: 28ch;
}

.insight-strip {
  margin: 24px 0;
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-2) 100%);
  box-shadow: var(--shadow-sm);
}

.insight-strip__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.insight-strip__header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.insight-strip__header p {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  max-width: 60ch;
}

.insight-strip__grid,
.rollup-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.rollup-card {
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 18px;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.rollup-card__label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: 14px;
}

.rollup-card__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rollup-card__metric,
.metrics-panel__item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}

.rollup-card__metric span,
.metrics-panel__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.rollup-card__metric strong,
.metrics-panel__value {
  font-size: 0.98rem;
  color: var(--color-text);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.dashboard-section {
  border-radius: 16px;
  padding: 18px;
}

.section-header--stacked {
  align-items: flex-start;
}

.section-subtitle {
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  max-width: 62ch;
}

.dashboard-task-list {
  gap: 12px;
}

.dashboard-task-list--compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.deadline-list,
.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deadline-item,
.breakdown-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}

.deadline-item__main,
.breakdown-item__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.deadline-item__main span,
.breakdown-item__copy span {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
}

.deadline-item__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
}

.breakdown-item__value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.dashboard-member-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.member-card--dashboard {
  align-items: flex-start;
  min-height: 116px;
}

.dashboard-collapsible {
  margin-top: 24px;
}

.dashboard-collapsible__summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.dashboard-collapsible__summary::-webkit-details-marker {
  display: none;
}

.dashboard-collapsible__copy {
  min-width: 0;
}

.dashboard-collapsible__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--color-primary-bg);
  color: var(--color-primary-dark);
  font-size: 1.2rem;
  font-weight: 700;
}

.dashboard-collapsible__icon::before {
  content: '+';
}

.dashboard-collapsible[open] .dashboard-collapsible__icon::before {
  content: '-';
}

.dashboard-collapsible__body {
  margin-top: 14px;
}

.task-metrics-grid,
.metrics-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.table-wrapper--mini th,
.table-wrapper--mini td {
  padding: 10px 12px;
}

.task-card-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.task-team-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: var(--radius-full);
  background: var(--color-primary-bg);
  color: var(--color-primary-dark);
  font-size: 0.76rem;
  font-weight: 700;
}

.task-summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.task-week,
.task-progress-title {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
}

.task-progress-block {
  margin: 10px 0 12px;
}

.task-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.task-progress-value {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.progress-bar-container--lg {
  height: 10px;
}

.task-meta-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
}

.task-meta-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.task-meta-value {
  font-size: 0.9rem;
  color: var(--color-text);
}

.task-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.task-note {
  font-size: 0.84rem;
  color: var(--color-text-secondary);
  max-width: 60ch;
}

.task-note--muted {
  color: var(--color-text-muted);
}

.task-note--compact {
  margin: 0;
  max-width: 52ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-inline-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.task-inline-chip {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: #f8fafc;
}

.task-inline-chip--warning {
  border-color: rgba(245, 158, 11, 0.22);
  background: #fffbeb;
}

.task-inline-chip--danger {
  border-color: rgba(239, 68, 68, 0.22);
  background: #fef2f2;
}

.task-inline-chip__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.task-inline-chip__value {
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--color-text);
}

.task-card--compact {
  padding: 12px 14px;
  border-radius: 16px;
}

.task-card--compact .task-card-header {
  margin-bottom: 6px;
}

.task-card--compact .task-title {
  font-size: 0.95rem;
  line-height: 1.3;
}

.task-card--compact .task-team-pill {
  padding: 6px 9px;
  font-size: 0.72rem;
}

.task-card--compact .task-summary-line {
  margin-bottom: 10px;
}

.task-card--compact .task-assignee,
.task-card--compact .task-unassigned,
.task-card--compact .task-week,
.task-card--compact .task-progress-title {
  font-size: 0.78rem;
}

.task-card--compact .task-progress-block {
  margin: 10px 0 12px;
}

.task-card--compact .progress-bar-container--lg {
  height: 8px;
}

.task-card--compact .task-footer {
  margin-top: 10px;
  align-items: center;
}

.task-card--compact .task-actions {
  margin-top: 0;
}

.profile-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-shell--manager {
  gap: 20px;
}

.profile-hero {
  align-items: stretch;
}

.profile-hero__identity {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 26px;
  background: linear-gradient(135deg, #007AFF 0%, #0062CC 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.profile-avatar--sm {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-size: 1.15rem;
}

.profile-action-card {
  min-width: 290px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.profile-action-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.profile-action-card p {
  font-size: 0.84rem;
  color: var(--color-text-secondary);
}

.profile-action-card__grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.profile-action-card__footnote {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
}

.profile-action-card--quiet {
  min-width: 260px;
  background: rgba(255, 255, 255, 0.78);
}

.profile-action-card--quiet p {
  max-width: 30ch;
}

.profile-team-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.team-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.team-card--highlight {
  border-color: var(--color-info-border);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.profile-member-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.member-card--interactive {
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.member-card--interactive:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.join-access-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.join-access-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  flex-wrap: wrap;
}

.join-access-row__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 240px;
}

.join-access-row__label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.join-access-row__value {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-text);
  overflow-wrap: anywhere;
}

.join-access-row__note {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
}

.join-access-row__action {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.join-shell {
  display: flex;
  justify-content: center;
}

.join-card {
  width: min(680px, 100%);
  padding: 22px 24px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.join-card__header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.join-card__title {
  font-size: 1.55rem;
  line-height: 1.05;
}

.join-card__description {
  color: var(--color-text-secondary);
  max-width: 58ch;
}

.join-invite-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--color-info-border);
  background: var(--color-info-bg-soft);
}

.join-invite-banner strong {
  font-size: 0.92rem;
  color: var(--color-primary-dark);
}

.join-invite-banner span {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.join-status {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.join-status--info {
  background: var(--color-info-bg-soft);
  border-color: var(--color-info-border);
  color: var(--color-primary-dark);
}

.join-status--success {
  background: var(--color-success-bg-soft);
  border-color: var(--color-success-border);
  color: var(--color-success-ink);
}

.join-status--error {
  background: var(--color-danger-bg-soft);
  border-color: var(--color-danger-border);
  color: var(--color-danger-ink);
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.join-form__actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 4px;
}

.join-helper-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.join-helper-item {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

.join-card__footer {
  display: flex;
  justify-content: flex-end;
}

.support-card,
.profile-inline-card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}

.profile-inline-card strong {
  font-size: 0.95rem;
}

.dashboard-section--featured {
  grid-column: span 2;
}

.profile-details-card {
  background:
    radial-gradient(circle at top right, rgba(10, 132, 255, 0.08), transparent 30%),
    linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-2) 100%);
}

.profile-details-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-details-feature {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-details-feature__header,
.profile-details-feature__identity {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-details-feature__copy h4 {
  font-size: 1.18rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.profile-details-feature__copy p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.profile-contact-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--color-info-border);
  background: var(--color-surface);
}

.profile-contact-strip__label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.profile-contact-strip__value {
  font-size: 1.08rem;
  line-height: 1.45;
  color: var(--color-text);
  overflow-wrap: anywhere;
}

.profile-details-feature__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.profile-editor-card {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.profile-editor-card .form-group {
  margin-bottom: 0;
}

.profile-editor-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.profile-editor-card__copy h5 {
  font-size: 1.02rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.profile-editor-card__copy p {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
}

.profile-editor-card__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.profile-editor-readonly {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}

.profile-editor-readonly__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.profile-editor-readonly__value {
  color: var(--color-text);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.profile-editor-note {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  max-width: 36ch;
}

.member-email {
  margin: 6px 0 8px;
  font-size: 0.8rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.member-email--compact {
  color: var(--color-text-secondary);
}

.member-email--muted {
  color: var(--color-text-muted);
}

.profile-stack-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.support-modal p {
  color: var(--color-text-secondary);
  margin-bottom: 10px;
}

.support-list {
  padding-left: 18px;
  color: var(--color-text);
}

.support-list li + li {
  margin-top: 8px;
}

.profile-modal-shell {
  display: flex;
  flex-direction: column;
}

.profile-modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-modal-header__copy h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.profile-modal-header__copy p {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
}

.profile-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.profile-modal-grid--compact {
  grid-template-columns: minmax(0, 1fr);
  max-width: 560px;
}


@media (max-width: 1024px) {
  .page-hero {
    flex-direction: column;
  }

  .page-hero__meta {
    justify-content: flex-start;
    max-width: none;
  }
}

@media (max-width: 768px) {
  .page-hero {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .page-hero__actions {
    justify-content: flex-start;
  }

  .page-hero__title {
    font-size: 1.7rem;
  }

  .dashboard-top-split {
    grid-template-columns: 1fr;
  }

  .dashboard-layout,
  .profile-modal-grid {
    grid-template-columns: 1fr;
  }

  .deadline-item,
  .mgr-header,
  .mgr-attention-row,
  .mgr-people-row,
  .task-footer,
  .chart-card__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .task-metrics-grid,
  .task-inline-metrics,
  .metrics-panel,
  .mgr-stat-strip,
  .rollup-card__metrics,
  .profile-action-card__grid {
    grid-template-columns: 1fr;
  }

  .dashboard-summary-table__value {
    text-align: left;
  }

  .worker-tracker-grid {
    grid-template-columns: 1fr;
  }

  .worker-tracker-summary__heading,
  .worker-tracker-member-row,
  .worker-tracker-task-row,
  .calendar-toolbar__top,
  .calendar-task-modal__top {
    flex-direction: column;
    align-items: stretch;
  }

  .worker-tracker-member-metrics,
  .worker-tracker-task-row__actions {
    justify-content: flex-start;
  }

  .calendar-grid {
    min-width: 720px;
  }

  .calendar-day {
    min-height: 130px;
  }

  .calendar-month-nav {
    justify-content: flex-start;
  }

  .calendar-task-modal__meta {
    grid-template-columns: 1fr;
  }

  .profile-hero__identity,
  .profile-modal-header,
  .team-card__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-section--featured {
    grid-column: span 1;
  }

  .profile-details-feature__header,
  .profile-details-feature__identity,
  .profile-editor-card__head,
  .profile-editor-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-editor-card__meta {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================= */
/* Employee Tasks page — calm, execution-focused layout                      */
/* ========================================================================= */

.etasks {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 28px 32px;
}

.etasks-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.etasks-top__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.etasks-top__summary {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.etasks-top__controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.etasks-filter {
  appearance: none;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 7px 30px 7px 12px;
  font-size: 13px;
  color: var(--color-text);
  background-image: linear-gradient(45deg, transparent 50%, var(--color-text-muted) 50%),
                    linear-gradient(135deg, var(--color-text-muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 10px) 50%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.etasks-filter:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.etasks-empty {
  padding: 48px 24px;
  text-align: center;
  background: var(--color-surface-2);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
}

.etasks-empty h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}

.etasks-empty p {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* --- Group ------------------------------------------------------------- */
.etasks-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.etasks-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: left;
  font: inherit;
  width: 100%;
}

.etasks-group__header--toggle {
  cursor: pointer;
}

.etasks-group__title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.etasks-group__chevron {
  display: inline-flex;
  width: 14px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.etasks-group__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.etasks-group__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--color-surface-3);
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.etasks-group__subtitle {
  font-size: 12px;
  color: var(--color-text-muted);
}

.etasks-group--danger .etasks-group__title { color: var(--color-danger-ink); }
.etasks-group--danger .etasks-group__count { background: var(--color-danger-bg-soft); color: var(--color-danger-ink); }

.etasks-group--info .etasks-group__title { color: var(--color-info-ink); }
.etasks-group--info .etasks-group__count { background: var(--color-info-bg-soft); color: var(--color-info-ink); }

.etasks-group--completed .etasks-group__title { color: var(--color-text-secondary); }

.etasks-group__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* --- Row --------------------------------------------------------------- */
.etasks-row {
  position: relative;
  display: grid;
  grid-template-columns: 4px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px 14px 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.etasks-row:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}

.etasks-row.is-muted {
  opacity: 0.72;
  background: var(--color-surface-2);
}

.etasks-row__rail {
  align-self: stretch;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: #A6AFBB;
}

.etasks-row__rail--low { background: #A6AFBB; }
.etasks-row__rail--medium { background: var(--color-primary); }
.etasks-row__rail--high { background: #f59e0b; }
.etasks-row__rail--urgent { background: #ef4444; }

.etasks-row__main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.etasks-row__title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.etasks-row__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  word-break: break-word;
}

.is-muted .etasks-row__title {
  color: var(--color-text-secondary);
  text-decoration: line-through;
  text-decoration-color: rgba(100, 116, 139, 0.35);
}

.etasks-row__team {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-neutral-bg);
  border-radius: 999px;
}

.etasks-row__chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.etasks-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  background: var(--color-neutral-bg);
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

.etasks-chip--status-todo { background: var(--color-neutral-bg); color: var(--color-neutral-ink); }
.etasks-chip--status-in_progress { background: var(--color-info-bg-soft); color: var(--color-primary-dark); }
.etasks-chip--status-blocked { background: var(--color-danger-bg-soft); color: var(--color-danger-ink); }
.etasks-chip--status-completed { background: var(--color-success-bg-soft); color: var(--color-success-ink); }
.etasks-chip--status-cancelled { background: var(--color-neutral-bg); color: var(--color-text-muted); }

.etasks-chip--priority-low { background: transparent; color: var(--color-text-muted); box-shadow: inset 0 0 0 1px var(--color-border); }
.etasks-chip--priority-medium { background: var(--color-info-bg-soft); color: var(--color-primary-dark); }
.etasks-chip--priority-high { background: var(--color-warning-bg-soft); color: var(--color-warning-ink); }
.etasks-chip--priority-urgent { background: var(--color-danger-bg-soft); color: var(--color-danger-ink); }

.etasks-row__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.etasks-row__due {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.etasks-row__due-label {
  color: var(--color-text-muted);
}

.etasks-row__due--none {
  color: var(--color-text-muted);
  font-style: italic;
}

.etasks-row__time-left {
  color: var(--color-text-secondary);
}

.etasks-row__time-left.is-overdue {
  color: var(--color-danger-ink);
  font-weight: 500;
}

.etasks-row__est {
  color: var(--color-text-muted);
}

.etasks-row__progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.etasks-row__progress-bar {
  flex: 1;
  min-width: 80px;
  max-width: 220px;
  height: 6px;
  background: var(--color-surface-3);
  border-radius: 999px;
  overflow: hidden;
}

.etasks-row__progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.25s ease;
}

.etasks-row__progress-fill--neutral { background: #A6AFBB; }
.etasks-row__progress-fill--warning { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.etasks-row__progress-fill--info { background: linear-gradient(90deg, #60a5fa, #3b82f6); }
.etasks-row__progress-fill--success { background: linear-gradient(90deg, #34d399, #22c55e); }

.etasks-row__progress-pct {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  min-width: 32px;
  text-align: right;
}

.etasks-row__note {
  margin: 4px 0 0;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--color-text-secondary);
  background: var(--color-surface-2);
  border-left: 2px solid var(--color-border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.45;
}

/* --- Actions ----------------------------------------------------------- */
.etasks-row__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.etasks-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.etasks-btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.etasks-btn--primary:hover {
  background: #0062CC;
}

.etasks-btn--ghost {
  color: var(--color-text-secondary);
  border-color: var(--color-border);
  background: var(--color-surface);
}

.etasks-btn--ghost:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
  background: var(--color-surface-hover);
}

.etasks-btn--icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.etasks-btn--icon:hover {
  color: var(--color-success-ink);
  border-color: var(--color-success-border);
  background: var(--color-success-bg-soft);
}

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 720px) {
  .etasks {
    padding: 18px 16px 28px;
  }

  .etasks-row {
    grid-template-columns: 4px 1fr;
    align-items: flex-start;
    padding: 12px 14px 12px 0;
  }

  .etasks-row__actions {
    grid-column: 2;
    margin-top: 8px;
    width: 100%;
    justify-content: flex-end;
  }

  .etasks-row__progress-bar {
    max-width: none;
  }

  .etasks-top {
    align-items: flex-start;
  }
}

/* ========================================================================= */
/* Profile page — simple account surface for both roles                      */
/* ========================================================================= */

.prof {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 28px 32px;
  max-width: 880px;
}

/* --- Identity header --------------------------------------------------- */
.prof-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.prof-identity__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-info-bg-soft);
  color: var(--color-primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.prof-identity__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.prof-identity__name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.prof-identity__name {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.005em;
}

.prof-identity__tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-neutral-bg);
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.prof-identity__subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.prof-identity__email {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* --- Shared section shell --------------------------------------------- */
.prof-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.prof-section__header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prof-section__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prof-section__sub {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* --- Account form ------------------------------------------------------ */
.prof-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.prof-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.prof-field--wide {
  grid-column: 1 / -1;
}

.prof-field__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.prof-field__input {
  appearance: none;
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.prof-field__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.prof-field__input--textarea {
  resize: vertical;
  min-height: 60px;
  line-height: 1.4;
}

.prof-form__readonly {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  padding: 12px 14px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.prof-readonly {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.prof-readonly__label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prof-readonly__value {
  font-size: 13px;
  color: var(--color-text);
  word-break: break-word;
}

.prof-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.prof-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  font-family: inherit;
}

.prof-btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.prof-btn--primary:hover {
  background: #0062CC;
}

.prof-btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Team context rows ------------------------------------------------- */
.prof-context {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prof-context__row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
}

.prof-context__label {
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  font-weight: 500;
  padding-top: 2px;
}

.prof-context__value {
  color: var(--color-text);
}

.prof-context__value--muted {
  color: var(--color-text-muted);
  font-style: italic;
}

.prof-context__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prof-context__chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-neutral-bg);
  border-radius: 999px;
}

/* --- Notifications archive wrapper ------------------------------------ */
/* Neutralizes the heavy card styling from the shared archive component.  */
.prof-archive > .dashboard-collapsible,
.prof-archive > .dashboard-section,
.prof-archive > .card {
  padding: 18px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.prof-archive .dashboard-collapsible__summary {
  padding: 0;
  gap: 12px;
}

.prof-archive .section-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text);
}

.prof-archive .section-subtitle {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.prof-archive .dashboard-collapsible__body {
  margin-top: 14px;
  padding: 0;
}

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 720px) {
  .prof {
    padding: 18px 16px 28px;
  }

  .prof-form__grid,
  .prof-form__readonly {
    grid-template-columns: 1fr;
  }

  .prof-context__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .prof-identity {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ========================================================================= */
/* Employee Calendar — due-date view, calm & consistent                      */
/* ========================================================================= */

.cal {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 28px 32px;
}

/* --- Top: title + month nav ------------------------------------------- */
.cal-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.cal-top__heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-top__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.cal-top__sub {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.cal-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.cal-nav__btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  line-height: 1;
}

.cal-nav__btn:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.cal-nav__btn--step {
  width: 28px;
  height: 28px;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cal-nav__btn--today {
  font-weight: 500;
  padding: 6px 12px;
  color: var(--color-primary);
}

.cal-nav__btn--today:hover {
  background: var(--color-info-bg-soft);
}

.cal-nav__btn--today.is-disabled,
.cal-nav__btn--today:disabled {
  color: var(--color-text-muted);
  cursor: default;
  background: transparent;
}

.cal-nav__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  padding: 0 8px;
  min-width: 120px;
  text-align: center;
}

/* --- Team chips ------------------------------------------------------- */
.cal-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cal-chip {
  appearance: none;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  font-family: inherit;
  line-height: 1.2;
}

.cal-chip:hover {
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.cal-chip.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.cal-meta {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

.cal-empty {
  margin: 4px 0 0;
  padding: 28px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-secondary);
  background: var(--color-surface-2);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
}

/* --- Month grid ------------------------------------------------------- */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  gap: 1px;
}

.cal-weekday {
  background: var(--color-surface-2);
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 104px;
  padding: 8px 8px 10px;
  background: var(--color-surface);
  transition: background 0.15s ease;
}

.cal-day.is-outside {
  background: var(--color-surface-2);
}

.cal-day.is-today {
  background: var(--color-info-bg-soft);
  box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.28);
}

.cal-day__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cal-day__num {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1;
}

.cal-day.is-outside .cal-day__num {
  color: var(--color-text-quaternary);
  font-weight: 500;
}

.cal-day.is-today .cal-day__num {
  color: var(--color-primary);
}

.cal-day__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text-muted);
}

.cal-day.is-today .cal-day__dot {
  background: var(--color-primary);
}

.cal-day__events {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

/* --- Event pills ------------------------------------------------------ */
.cal-pill {
  appearance: none;
  display: grid;
  grid-template-columns: 3px 1fr;
  gap: 6px;
  width: 100%;
  padding: 4px 6px 4px 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  overflow: hidden;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.cal-pill:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-hover);
}

.cal-pill:active {
  transform: translateY(1px);
}

.cal-pill__rail {
  display: block;
  align-self: stretch;
  background: #A6AFBB;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.cal-pill--default .cal-pill__rail { background: #A6AFBB; }
.cal-pill--high .cal-pill__rail { background: #f59e0b; }
.cal-pill--urgent .cal-pill__rail { background: #ef4444; }
.cal-pill--overdue .cal-pill__rail { background: #dc2626; }
.cal-pill--blocked .cal-pill__rail { background: #b91c1c; }
.cal-pill--done .cal-pill__rail { background: var(--color-success); }

.cal-pill__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  padding: 1px 0;
}

.cal-pill__title {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-pill__team {
  font-size: 10px;
  color: var(--color-text-muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}

.cal-pill--done .cal-pill__title {
  color: var(--color-text-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(148, 163, 184, 0.5);
}

.cal-pill--overdue .cal-pill__title,
.cal-pill--blocked .cal-pill__title {
  color: var(--color-danger-ink);
}

.cal-more {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 2px 6px;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-primary);
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius-sm);
}

.cal-more:hover {
  background: var(--color-info-bg-soft);
}

/* --- Day list modal --------------------------------------------------- */
.cal-daylist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* --- Task detail modal ------------------------------------------------ */
.cal-modal {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 2px 0;
}

.cal-modal__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cal-modal__chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  background: var(--color-neutral-bg);
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

.cal-modal__chip--status-todo { background: var(--color-neutral-bg); color: var(--color-neutral-ink); }
.cal-modal__chip--status-in_progress { background: var(--color-info-bg-soft); color: var(--color-primary-dark); }
.cal-modal__chip--status-blocked { background: var(--color-danger-bg-soft); color: var(--color-danger-ink); }
.cal-modal__chip--status-completed { background: var(--color-success-bg-soft); color: var(--color-success-ink); }
.cal-modal__chip--status-cancelled { background: var(--color-neutral-bg); color: var(--color-text-muted); }

.cal-modal__chip--priority-low { background: transparent; color: var(--color-text-muted); box-shadow: inset 0 0 0 1px var(--color-border); }
.cal-modal__chip--priority-medium { background: var(--color-info-bg-soft); color: var(--color-primary-dark); }
.cal-modal__chip--priority-high { background: var(--color-warning-bg-soft); color: var(--color-warning-ink); }
.cal-modal__chip--priority-urgent { background: var(--color-danger-bg-soft); color: var(--color-danger-ink); }

.cal-modal__chip--team {
  background: var(--color-info-bg-soft);
  color: var(--color-primary-dark);
}

.cal-modal__due {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 12px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

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

.cal-modal__due-value {
  color: var(--color-text);
  font-weight: 500;
}

.cal-modal__due--overdue,
.cal-modal__due--blocked {
  background: var(--color-danger-bg-soft);
  border-color: var(--color-danger-border);
}

.cal-modal__due--overdue .cal-modal__due-value,
.cal-modal__due--blocked .cal-modal__due-value {
  color: var(--color-danger-ink);
}

.cal-modal__progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cal-modal__progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.cal-modal__progress-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.cal-modal__progress-bar {
  height: 6px;
  background: var(--color-surface-3);
  border-radius: 999px;
  overflow: hidden;
}

.cal-modal__progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.25s ease;
}

.cal-modal__progress-fill--neutral { background: #A6AFBB; }
.cal-modal__progress-fill--warning { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.cal-modal__progress-fill--info { background: linear-gradient(90deg, #60a5fa, #3b82f6); }
.cal-modal__progress-fill--success { background: linear-gradient(90deg, #34d399, #22c55e); }

.cal-modal__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text);
}

.cal-modal__note {
  margin: 0;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-secondary);
  background: var(--color-surface-2);
  border-left: 2px solid var(--color-border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.cal-modal__assignee {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 820px) {
  .cal {
    padding: 18px 16px 28px;
  }

  .cal-top {
    align-items: flex-start;
  }

  .cal-day {
    min-height: 82px;
    padding: 6px;
  }

  .cal-pill__team {
    display: none;
  }

  .cal-nav__label {
    min-width: 96px;
    font-size: 13px;
  }
}

@media (max-width: 560px) {
  .cal {
    overflow-x: auto;
    padding-bottom: 20px;
  }

  .cal-grid {
    min-width: 640px;
  }

  .cal-weekday {
    padding: 6px 4px;
    font-size: 10px;
  }

  .cal-day {
    min-height: 84px;
  }

  .cal-day__num {
    font-size: 11px;
  }

  .cal-pill {
    padding: 3px 4px 3px 0;
  }

  .cal-pill__title {
    font-size: 11px;
  }
}

/* ========================================================================= */
/* Manager Tasks — row-based, consistent with .etasks / .wt / .dash           */
/* ========================================================================= */

.mtasks {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 28px 32px;
}

/* --- Top band --------------------------------------------------------- */
.mtasks-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.mtasks-top__heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mtasks-top__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.mtasks-top__sub {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* --- Toolbar ---------------------------------------------------------- */
.mtasks-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.mtasks-toolbar__filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mtasks-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mtasks-filter {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.mtasks-filter__label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.mtasks-select {
  appearance: none;
  display: block;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 0 30px 0 12px;
  font-size: 13px;
  line-height: 1.2;
  color: var(--color-text);
  font-family: inherit;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-text-muted) 50%),
                    linear-gradient(135deg, var(--color-text-muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 10px) 50%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: border-color 0.15s ease;
  min-width: 140px;
}

.mtasks-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

/* --- Buttons ---------------------------------------------------------- */
.mtasks-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1.3;
}

.mtasks-btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.mtasks-btn--primary:hover:not(:disabled) {
  background: #0062CC;
}

.mtasks-btn--ghost {
  color: var(--color-text-secondary);
  border-color: var(--color-border);
  background: var(--color-surface);
}

.mtasks-btn--ghost:hover:not(:disabled) {
  color: var(--color-text);
  border-color: var(--color-border-strong);
  background: var(--color-surface-hover);
}

.mtasks-btn--icon {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--color-text-secondary);
  border-color: var(--color-border);
  background: var(--color-surface);
}

.mtasks-btn--icon:hover:not(:disabled) {
  color: var(--color-success-ink);
  border-color: var(--color-success-border);
  background: var(--color-success-bg-soft);
}

.mtasks-btn--icon.mtasks-btn--danger:hover:not(:disabled) {
  color: var(--color-danger-ink);
  border-color: var(--color-danger-border);
  background: var(--color-danger-bg-soft);
}

.mtasks-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Area + list + empty ---------------------------------------------- */
.mtasks-area {
  min-height: 80px;
}

.mtasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mtasks-empty {
  padding: 40px 24px;
  text-align: center;
  background: var(--color-surface-2);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
}

.mtasks-empty h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.mtasks-empty p {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* --- Row -------------------------------------------------------------- */
.mtasks-row {
  position: relative;
  display: grid;
  grid-template-columns: 4px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px 14px 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mtasks-row:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}

.mtasks-row__rail {
  align-self: stretch;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: #A6AFBB;
}

.mtasks-row__rail--low { background: #A6AFBB; }
.mtasks-row__rail--medium { background: var(--color-primary); }
.mtasks-row__rail--high { background: #f59e0b; }
.mtasks-row__rail--urgent { background: #ef4444; }

.mtasks-row__main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.mtasks-row__title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mtasks-row__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  word-break: break-word;
}

.mtasks-row__team {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-neutral-bg);
  border-radius: 999px;
}

.mtasks-row__chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mtasks-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  background: var(--color-neutral-bg);
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

.mtasks-chip--status-todo { background: var(--color-neutral-bg); color: var(--color-neutral-ink); }
.mtasks-chip--status-in_progress { background: var(--color-info-bg-soft); color: var(--color-primary-dark); }
.mtasks-chip--status-blocked { background: var(--color-danger-bg-soft); color: var(--color-danger-ink); }
.mtasks-chip--status-completed { background: var(--color-success-bg-soft); color: var(--color-success-ink); }
.mtasks-chip--status-cancelled { background: var(--color-neutral-bg); color: var(--color-text-muted); }

.mtasks-chip--priority-low { background: transparent; color: var(--color-text-muted); box-shadow: inset 0 0 0 1px var(--color-border); }
.mtasks-chip--priority-medium { background: var(--color-info-bg-soft); color: var(--color-primary-dark); }
.mtasks-chip--priority-high { background: var(--color-warning-bg-soft); color: var(--color-warning-ink); }
.mtasks-chip--priority-urgent { background: var(--color-danger-bg-soft); color: var(--color-danger-ink); }

.mtasks-chip--assignee {
  background: var(--color-info-bg-soft);
  color: var(--color-primary-dark);
}

.mtasks-chip--assignee.is-unassigned {
  background: var(--color-warning-bg-soft);
  color: var(--color-warning-ink);
  box-shadow: inset 0 0 0 1px var(--color-warning-border);
}

.mtasks-row__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.mtasks-row__due {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mtasks-row__due-label { color: var(--color-text-muted); }

.mtasks-row__due--none {
  color: var(--color-text-muted);
  font-style: italic;
}

.mtasks-row__time-left.is-overdue {
  color: var(--color-danger-ink);
  font-weight: 500;
}

.mtasks-row__est { color: var(--color-text-muted); }

.mtasks-row__progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.mtasks-row__progress-bar {
  flex: 1;
  min-width: 80px;
  max-width: 220px;
  height: 6px;
  background: var(--color-surface-3);
  border-radius: 999px;
  overflow: hidden;
}

.mtasks-row__progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.25s ease;
}

.mtasks-row__progress-fill--neutral { background: #A6AFBB; }
.mtasks-row__progress-fill--warning { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.mtasks-row__progress-fill--info { background: linear-gradient(90deg, #60a5fa, #3b82f6); }
.mtasks-row__progress-fill--success { background: linear-gradient(90deg, #34d399, #22c55e); }

.mtasks-row__progress-pct {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  min-width: 32px;
  text-align: right;
}

.mtasks-row__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* --- Pagination ------------------------------------------------------- */
.mtasks-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 2px 2px;
}

.mtasks-pagination__info {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 820px) {
  .mtasks { padding: 18px 16px 28px; }
  .mtasks-toolbar__filters { width: 100%; }
  .mtasks-select { min-width: 120px; flex: 1 1 140px; }
  .mtasks-row {
    grid-template-columns: 4px 1fr;
    align-items: flex-start;
  }
  .mtasks-row__actions {
    grid-column: 2;
    margin-top: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .mtasks-toolbar {
    align-items: stretch;
  }

  .mtasks-toolbar__filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  .mtasks-toolbar__filters .mtasks-filter {
    width: 100%;
  }

  .mtasks-toolbar__filters .mtasks-filter:nth-child(1),
  .mtasks-toolbar__filters .mtasks-filter:nth-child(4) {
    grid-column: 1 / -1;
  }

  .mtasks-toolbar__actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .mtasks-select {
    width: 100%;
    min-width: 0;
  }
}

/* ========================================================================= */
/* Manager Teams — flat cards + member rows                                   */
/* ========================================================================= */

.mteams {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 28px 32px;
}

.mteams--detail {
  gap: 16px;
}

.mteams-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.mteams-top__heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mteams-top__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.mteams-top__sub {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.mteams-top__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mteams-desc {
  margin: -4px 0 0;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  max-width: 680px;
}

/* --- Buttons (share .mtasks-btn tokens) ------------------------------- */
.mteams-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1.3;
}

.mteams-btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.mteams-btn--primary:hover:not(:disabled) {
  background: #0062CC;
}

.mteams-btn--ghost {
  color: var(--color-text-secondary);
  border-color: var(--color-border);
  background: var(--color-surface);
}

.mteams-btn--ghost:hover:not(:disabled) {
  color: var(--color-text);
  border-color: var(--color-border-strong);
  background: var(--color-surface-hover);
}

.mteams-btn--icon {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--color-text-muted);
  border-color: var(--color-border);
  background: var(--color-surface);
}

.mteams-btn--danger:hover:not(:disabled) {
  color: var(--color-danger-ink);
  border-color: var(--color-danger-border);
  background: var(--color-danger-bg-soft);
}

/* --- Team list grid --------------------------------------------------- */
.mteams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.mteams-team {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.mteams-team:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}

.mteams-team.is-primary {
  box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.28);
}

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

.mteams-team__name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.mteams-team__desc {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mteams-team__stats {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--color-border);
}

.mteams-team__stat {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.mteams-team__stat-num {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.mteams-team__stat-label {
  color: var(--color-text-muted);
}

/* --- Chips ------------------------------------------------------------ */
.mteams-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  background: var(--color-neutral-bg);
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

.mteams-chip--custom {
  background: var(--color-info-bg-soft);
  color: var(--color-primary-dark);
}

.mteams-chip--manager {
  background: var(--color-warning-bg-soft);
  color: var(--color-warning-ink);
}

/* --- Section ---------------------------------------------------------- */
.mteams-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

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

.mteams-section__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mteams-section__meta {
  font-size: 12px;
  color: var(--color-text-muted);
}

.mteams-empty {
  padding: 24px 12px;
  text-align: center;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
}

.mteams-empty h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.mteams-empty p {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-secondary);
}

/* --- Member list ------------------------------------------------------ */
.mteams-member-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mteams-member {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.mteams-member:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-hover);
}

.mteams-member__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-info-bg-soft);
  color: var(--color-primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.mteams-member__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.mteams-member__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mteams-member__title {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mteams-member__chips {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 720px) {
  .mteams { padding: 18px 16px 28px; }
  .mteams-grid { grid-template-columns: 1fr; }
  .mteams-top { align-items: flex-start; }
  .mteams-top__actions { width: 100%; }
  .mteams-member {
    grid-template-columns: 36px 1fr auto;
  }
  .mteams-member__chips { display: none; }
}

@media (max-width: 560px) {
  .mteams--detail .mteams-top__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mteams--detail .mteams-top__actions .mteams-btn {
    width: 100%;
    justify-content: center;
  }

  .mteams--detail .mteams-top__actions .mteams-btn--primary {
    grid-column: 1 / -1;
  }

  .join-access-block__head {
    flex-direction: column;
    align-items: stretch;
  }

  .join-access-block__regen {
    width: 100%;
  }

  .join-access-row {
    gap: 12px;
  }

  .join-access-row__copy,
  .join-access-row__action {
    width: 100%;
    flex-basis: 100%;
  }

  .join-access-row__action .btn {
    width: 100%;
    justify-content: center;
  }
}

.mteams-empty__action {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

/* ========================================================================= */
/* Employee Join Team — focused single-column layout                         */
/* ========================================================================= */

.ejoin {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 28px 32px;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.ejoin-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.ejoin-card__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ejoin-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.ejoin-card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.ejoin-card__desc {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.ejoin-invite {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--color-info-bg-soft);
  border: 1px solid var(--color-info-border);
}

.ejoin-invite strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary-dark);
}

.ejoin-invite span {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.ejoin-status {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-size: 13px;
  line-height: 1.4;
  background: var(--color-surface-2);
  color: var(--color-text-secondary);
}

.ejoin-status--info {
  background: var(--color-info-bg-soft);
  border-color: var(--color-info-border);
  color: var(--color-primary-dark);
}

.ejoin-status--success {
  background: var(--color-success-bg-soft);
  border-color: var(--color-success-border);
  color: var(--color-success-ink);
}

.ejoin-status--error {
  background: var(--color-danger-bg-soft);
  border-color: var(--color-danger-border);
  color: var(--color-danger-ink);
}

.ejoin-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ejoin-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.ejoin-input {
  appearance: none;
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ejoin-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.14);
}

.ejoin-input:disabled {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.ejoin-form__actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 4px;
}

.ejoin-actions {
  display: flex;
  justify-content: flex-start;
}

.ejoin-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  font-family: inherit;
  line-height: 1.3;
}

.ejoin-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ejoin-btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.ejoin-btn--primary:hover:not(:disabled) {
  background: #0062CC;
}

.ejoin-btn--ghost {
  color: var(--color-text-secondary);
  border-color: var(--color-border);
  background: var(--color-surface);
}

.ejoin-btn--ghost:hover:not(:disabled) {
  color: var(--color-text);
  border-color: var(--color-border-strong);
  background: var(--color-surface-hover);
}

.ejoin-card__footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
  border-top: 1px solid var(--color-border);
  margin-top: 4px;
}

.ejoin-helpers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.ejoin-helpers__title {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ejoin-helpers__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ejoin-helpers__item {
  position: relative;
  padding: 2px 0 2px 16px;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.ejoin-helpers__item::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text-muted);
}

@media (max-width: 640px) {
  .ejoin { padding: 18px 16px 28px; }
  .ejoin-card { padding: 16px 16px; }
  .ejoin-helpers { padding: 14px 16px; }
}

/* ========================================================================= */
/* Landing page — calm, focused product intro                                 */
/* ========================================================================= */

/* ═══════════════════════════════════════════════════════════════════════
   Landing page (.lp-*) — Apple marketing aesthetic
   Reference: htmltest/Frontend/css/landing.css
   Pattern: translucent fixed nav + huge hero + alternating section bgs
   ═══════════════════════════════════════════════════════════════════════ */
.lp {
  min-height: 100vh;
  background: #FFFFFF;
  color: var(--color-text-onlight);
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.lp h1,
.lp h2,
.lp h3,
.lp h4 {
  color: var(--color-text-onlight);
  font-family: var(--font-sans);
}

.lp p {
  color: var(--color-text-onlight-secondary);
}

/* --- Top nav (translucent, fixed) ------------------------------------- */
.lp-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border-onlight);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: none;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.lp-top > * {
  max-width: 1120px;
}

.lp-top__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.lp-top__mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  display: inline-block;
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.25);
}

.lp-top__name {
  font-size: 19px;
  font-weight: 700;
  color: var(--color-text-onlight);
  letter-spacing: -0.02em;
}

/* Nav-placed primary button: smaller, pill */
.lp-top .lp-btn {
  padding: 8px 18px;
  font-size: 13px;
}

/* --- Eyebrow (shared) ------------------------------------------------- */
.lp-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
}

/* --- Hero ------------------------------------------------------------- */
.lp-hero {
  max-width: 980px;
  margin: 0 auto;
  padding: calc(52px + 96px) 24px 96px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  background: #FFFFFF;
}

.lp-hero__title {
  margin: 0;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text-onlight);
  max-width: 900px;
}

.lp-hero__sub {
  margin: 0 auto;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.4;
  color: var(--color-text-onlight-secondary);
  max-width: 640px;
  font-weight: 400;
}

.lp-hero__actions {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- Buttons (Apple pill) --------------------------------------------- */
.lp-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-onlight);
  border-radius: 980px;
  cursor: pointer;
  font-family: var(--font-sans);
  line-height: 1.3;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms var(--ease-out), border-color 200ms var(--ease-out), color 200ms var(--ease-out), transform 120ms var(--ease-out), box-shadow 200ms var(--ease-out);
  text-decoration: none;
}

.lp-btn:active {
  transform: scale(0.98);
}

.lp-btn--lg {
  padding: 14px 30px;
  font-size: 17px;
  font-weight: 500;
}

.lp-btn--primary {
  background: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 1px 2px rgba(10, 132, 255, 0.2);
}

.lp-btn--primary:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
}

.lp-btn--ghost {
  color: var(--color-text-onlight);
  border-color: rgba(0, 0, 0, 0.18);
  background: transparent;
}

.lp-btn--ghost:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.28);
  text-decoration: none;
}

/* --- Section shell ---------------------------------------------------- */
.lp-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 100px 24px;
  width: 100%;
  box-sizing: border-box;
}

.lp-how {
  background: #FBFBFD;
  max-width: none;
  width: 100%;
}

.lp-how > * {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.lp-roles {
  background: #F5F5F7;
  max-width: none;
  width: 100%;
}

.lp-roles > * {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.lp-section__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 48px;
  text-align: center;
  align-items: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.lp-section__title {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--color-text-onlight);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* --- How it works ----------------------------------------------------- */
.lp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.lp-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 36px 32px;
  background: #FFFFFF;
  border: 1px solid var(--color-border-onlight);
  border-radius: 20px;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.lp-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
}

.lp-step__num {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' on, 'lnum' on;
}

.lp-step__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text-onlight);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.lp-step__copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-text-onlight-secondary);
}

/* --- Roles ------------------------------------------------------------ */
.lp-roles__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.lp-role {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 40px 36px;
  background: #FFFFFF;
  border: 1px solid var(--color-border-onlight);
  border-radius: 20px;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.lp-role:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
}

.lp-role__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text-onlight);
  letter-spacing: -0.02em;
}

.lp-role__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lp-role__item {
  position: relative;
  padding: 2px 0 2px 22px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-text-onlight-secondary);
}

.lp-role__item::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
}

/* --- Final CTA -------------------------------------------------------- */
.lp-cta {
  max-width: 980px;
  margin: 0 auto;
  padding: 110px 24px 120px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: #FFFFFF;
}

.lp-cta__title {
  margin: 0;
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 700;
  color: var(--color-text-onlight);
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 760px;
}

.lp-cta__sub {
  margin: 0 0 16px;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--color-text-onlight-secondary);
  font-weight: 400;
}

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 880px) {
  .lp-top { padding: 0 20px; }
  .lp-hero { padding: calc(52px + 64px) 20px 64px; gap: 18px; }
  .lp-section { padding: 72px 20px; }
  .lp-cta { padding: 72px 20px 88px; }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-roles__grid { grid-template-columns: 1fr; }
  .lp-section__head { margin-bottom: 36px; }
}

@media (max-width: 480px) {
  .lp-top__name { font-size: 17px; }
  .lp-hero__actions .lp-btn--lg { width: 100%; }
  .lp-hero__actions { flex-direction: column; width: 100%; gap: 10px; }
}

/* ========================================================================= */
/* Visual system normalization — active product spine                        */
/* ========================================================================= */

.dash-page,
.wt-page,
.mtasks,
.etasks,
.mteams,
.prof,
.cal,
.ejoin,
.lp {
  color: var(--color-text);
}

.dash-strip {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.dash-greet {
  border-bottom-color: var(--color-border);
}

.dash-greet__callout {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.dash-greet__callout.is-active {
  background: var(--color-danger-bg-soft);
  border-color: var(--color-danger-border);
  color: var(--color-danger-ink);
}

.dash-sec__count {
  background: var(--color-surface-3);
  color: var(--color-text-secondary);
}

.dash-queue__list,
.dash-teams__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 0;
}

.dash-qrow,
.dash-trow {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  border-bottom: 0;
}

.dash-qrow {
  padding: 12px 14px 12px 10px;
}

.dash-trow {
  padding: 12px 14px 12px 10px;
}

.dash-qrow:hover,
.dash-trow:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-strong);
}

.dash-qrow__reason {
  background: var(--color-neutral-bg);
  color: var(--color-text-secondary);
  border: 1px solid transparent;
}

.dash-qrow__reason--danger {
  background: var(--color-danger-bg-soft);
  color: var(--color-danger-ink);
  border-color: var(--color-danger-border);
}

.dash-qrow__reason--warning {
  background: var(--color-warning-bg-soft);
  color: var(--color-warning-ink);
  border-color: var(--color-warning-border);
}

.dash-qrow__reason--info {
  background: var(--color-info-bg-soft);
  color: var(--color-info-ink);
  border-color: var(--color-info-border);
}

.dash-qrow__reason--good {
  background: var(--color-success-bg-soft);
  color: var(--color-success-ink);
  border-color: var(--color-success-border);
}

.dash-qrow__go,
.dash-trow__go,
.dash-nav__sep {
  color: var(--color-text-muted);
}

.dash-meta--warning,
.dash-ind--warning .dash-ind__value,
.dash-tm--warning .dash-tm__value,
.dash-tm--warning .dash-tm__label {
  color: var(--color-warning-ink);
}

.dash-meta--info,
.dash-ind--info .dash-ind__value {
  color: var(--color-info-ink);
}

.dash-ind--good .dash-ind__value {
  color: var(--color-success-ink);
}

.dash-ind--calm .dash-ind__dot,
.dash-trow__dot--neutral {
  background: #A6AFBB;
}

.dash-trow__dot--calm {
  background: #8C97A6;
}

.dash-trow__bar {
  background: var(--color-surface-3);
}

.wt-team,
.wt-tasks,
.wt-unassigned,
.wt-metrics {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.wt-team__header:hover,
.wt-task:hover,
.wt-u-task:hover {
  background: var(--color-surface-hover);
}

.wt-team.is-open > .wt-team__header,
.wt-worker.is-open > .wt-worker__header {
  background: var(--color-info-bg-soft);
}

.wt-team__body {
  background: var(--color-surface-2);
  border-top-color: var(--color-border);
}

.wt-worker,
.wt-task,
.wt-u-task {
  border-top-color: var(--color-border-soft);
}

.wt-worker__header:hover {
  background: var(--color-surface-hover);
}

.wt-task.is-overdue {
  background: var(--color-danger-bg-soft);
}

.wt-bar,
.wt-ibar,
.dash-trow__bar,
.mtasks-row__progress-bar,
.etasks-row__progress-bar,
.cal-modal__progress-bar {
  background: var(--color-surface-3);
}

.wt-bar--empty {
  background: var(--color-surface-3);
}

.wt-metric {
  background: var(--color-surface-2);
  border-left-color: var(--color-border-soft);
}

.wt-metric--danger {
  background: var(--color-danger-bg-soft);
}

.wt-metric--danger .wt-metric__value,
.wt-metric--danger .wt-metric__label {
  color: var(--color-danger-ink);
}

.wt-metric--warning {
  background: var(--color-warning-bg-soft);
}

.wt-metric--warning .wt-metric__value,
.wt-metric--warning .wt-metric__label {
  color: var(--color-warning-ink);
}

.wt-metric--info {
  background: var(--color-info-bg-soft);
}

.wt-metric--info .wt-metric__value,
.wt-metric--info .wt-metric__label {
  color: var(--color-info-ink);
}

.wt-pill--good {
  background: var(--color-success-bg-soft);
  color: var(--color-success-ink);
  border-color: var(--color-success-border);
}

.wt-pill--warning {
  background: var(--color-warning-bg-soft);
  color: var(--color-warning-ink);
  border-color: var(--color-warning-border);
}

.wt-pill--danger {
  background: var(--color-danger-bg-soft);
  color: var(--color-danger-ink);
  border-color: var(--color-danger-border);
}

.wt-pill--info {
  background: var(--color-info-bg-soft);
  color: var(--color-info-ink);
  border-color: var(--color-info-border);
}

.wt-chip,
.mtasks-chip,
.etasks-chip,
.cal-modal__chip,
.mteams-chip,
.prof-context__chip,
.mtasks-row__team,
.etasks-row__team {
  background: var(--color-neutral-bg);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-neutral-border);
}

.wt-chip--status-todo,
.mtasks-chip--status-todo,
.etasks-chip--status-todo,
.cal-modal__chip--status-todo {
  background: var(--color-neutral-bg);
  color: var(--color-neutral-ink);
  border-color: var(--color-neutral-border);
}

.wt-chip--status-in_progress,
.mtasks-chip--status-in_progress,
.etasks-chip--status-in_progress,
.cal-modal__chip--status-in_progress {
  background: var(--color-info-bg-soft);
  color: var(--color-primary-dark);
  border-color: var(--color-info-border);
}

.wt-chip--status-blocked,
.mtasks-chip--status-blocked,
.etasks-chip--status-blocked,
.cal-modal__chip--status-blocked {
  background: var(--color-danger-bg-soft);
  color: var(--color-danger-ink);
  border-color: var(--color-danger-border);
}

.wt-chip--status-completed,
.mtasks-chip--status-completed,
.etasks-chip--status-completed,
.cal-modal__chip--status-completed {
  background: var(--color-success-bg-soft);
  color: var(--color-success-ink);
  border-color: var(--color-success-border);
}

.wt-chip--status-cancelled,
.mtasks-chip--status-cancelled,
.etasks-chip--status-cancelled,
.cal-modal__chip--status-cancelled {
  background: var(--color-neutral-bg);
  color: var(--color-text-muted);
  border-color: var(--color-neutral-border);
}

.wt-chip--prio-low,
.mtasks-chip--priority-low,
.etasks-chip--priority-low,
.cal-modal__chip--priority-low {
  background: var(--color-neutral-bg);
  color: var(--color-text-muted);
  border-color: var(--color-neutral-border);
  box-shadow: none;
}

.wt-chip--prio-medium,
.mtasks-chip--priority-medium,
.etasks-chip--priority-medium,
.cal-modal__chip--priority-medium {
  background: var(--color-info-bg-soft);
  color: var(--color-primary-dark);
  border-color: var(--color-info-border);
}

.wt-chip--prio-high,
.mtasks-chip--priority-high,
.etasks-chip--priority-high,
.cal-modal__chip--priority-high {
  background: var(--color-warning-bg-soft);
  color: var(--color-warning-ink);
  border-color: var(--color-warning-border);
}

.wt-chip--prio-urgent,
.mtasks-chip--priority-urgent,
.etasks-chip--priority-urgent,
.cal-modal__chip--priority-urgent {
  background: var(--color-danger-bg-soft);
  color: var(--color-danger-ink);
  border-color: var(--color-danger-border);
}

.wt-chip--team,
.cal-modal__chip--team,
.mtasks-chip--assignee,
.mteams-chip--custom {
  background: var(--color-info-bg-soft);
  color: var(--color-primary-dark);
  border-color: var(--color-info-border);
}

.mtasks-chip--assignee.is-unassigned,
.mteams-chip--manager {
  background: var(--color-warning-bg-soft);
  color: var(--color-warning-ink);
  border-color: var(--color-warning-border);
}

.wt-unassigned__head,
.prof-form__readonly,
.prof-archive > .dashboard-collapsible,
.prof-archive > .dashboard-section,
.prof-archive > .card,
.cal-empty,
.mtasks-empty,
.etasks-empty,
.mteams-empty,
.ejoin-input:disabled {
  background: var(--color-surface-2);
}

.mteams-team,
.mteams-section,
.mteams-member,
.prof-identity,
.prof-section,
.ejoin-card,
.ejoin-helpers,
.cal-nav,
.cal-day,
.cal-pill {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.mteams-team:hover,
.mteams-member:hover,
.mtasks-row:hover,
.etasks-row:hover,
.cal-pill:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-strong);
}

.mteams-empty,
.mtasks-empty,
.etasks-empty,
.cal-empty {
  border-color: var(--color-border);
}

.prof-identity__avatar,
.mteams-member__avatar,
.wt-avatar {
  background: var(--color-info-bg-soft);
  color: var(--color-primary-dark);
}

.prof-identity__tag {
  background: var(--color-neutral-bg);
  color: var(--color-text-secondary);
}

.cal-nav {
  background: var(--color-surface);
}

.cal-nav__btn:hover {
  background: var(--color-surface-hover);
}

.cal-chip {
  background: var(--color-surface);
  border-color: var(--color-border);
}

.cal-chip:hover {
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.cal-day.is-outside {
  background: var(--color-surface-2);
}

.cal-day.is-today {
  background: var(--color-info-bg-soft);
  box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.28);
}

.cal-pill__rail,
.mtasks-row__rail,
.etasks-row__rail {
  box-shadow: none;
}

.cal-pill--default .cal-pill__rail,
.mtasks-row__rail--low,
.etasks-row__rail--low {
  background: #A6AFBB;
}

.cal-pill--high .cal-pill__rail,
.mtasks-row__rail--high,
.etasks-row__rail--high {
  background: var(--color-warning);
}

.cal-pill--urgent .cal-pill__rail,
.mtasks-row__rail--urgent,
.etasks-row__rail--urgent {
  background: var(--color-danger);
}

.cal-pill--overdue .cal-pill__rail,
.cal-pill--blocked .cal-pill__rail {
  background: var(--color-danger-ink);
}

.cal-pill--done .cal-pill__rail {
  background: var(--color-success);
}

.cal-more:hover {
  background: var(--color-info-bg-soft);
}

.ejoin-invite,
.ejoin-status--info {
  background: var(--color-info-bg-soft);
  border-color: var(--color-info-border);
}

.ejoin-invite strong,
.ejoin-status--info {
  color: var(--color-primary-dark);
}

.ejoin-status--success {
  background: var(--color-success-bg-soft);
  border-color: var(--color-success-border);
  color: var(--color-success-ink);
}

.ejoin-status--error {
  background: var(--color-danger-bg-soft);
  border-color: var(--color-danger-border);
  color: var(--color-danger-ink);
}

.lp-top {
  background: rgba(255, 255, 255, 0.78);
  border-bottom-color: var(--color-border);
}

.lp-step,
.lp-role {
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.lp-step:hover,
.lp-role:hover {
  box-shadow: var(--shadow-md);
}
