@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap&subset=cyrillic');

:root {
  color-scheme: light;
  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #f8fafc;
  --bg-active: #eef2ff;

  --border-subtle: #e2e8f0;
  --border-hairline: #edf2f7;
  --border-strong: #cbd5e1;
  --border-focus: #4f46e5;
  --border-focus-ring: rgba(79, 70, 229, 0.16);

  --text-main: #0f172a;
  --text-sub: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  /* Stitch Design Tokens */
  --accent-indigo: #4f46e5;
  --accent-indigo-hover: #4338ca;
  --accent-indigo-light: #eef2ff;
  --accent-mint: #10b981;
  --accent-mint-light: #ecfdf5;
  --accent-coral: #ef4444;
  --accent-coral-light: #fee2e2;
  --accent-amber: #f59e0b;
  --accent-amber-light: #fef3c7;
  --accent-cyan: #0284c7;
  --accent-cyan-light: #f0f9ff;
  --accent-violet: #8b5cf6;
  --accent-violet-light: #f5f3ff;

  /* Legacy variable bindings */
  --paper: var(--bg-surface);
  --surface: var(--bg-surface);
  --ink: var(--text-main);
  --muted: var(--text-muted);
  --line: var(--border-subtle);
  --green: var(--accent-mint);
  --green-dark: var(--accent-indigo);
  --green-soft: var(--accent-indigo-light);
  --green-pale: var(--accent-mint-light);
  --terracotta: var(--accent-coral);
  --lilac: var(--accent-violet);
  --gold: var(--accent-amber);
  --radius: 10px;
  --shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-card-hover: 0 6px 16px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.03);
  --shadow-drawer: -12px 0 35px rgba(15, 23, 42, 0.08);

  font-family: 'Plus Jakarta Sans', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg-canvas);
  color: var(--text-main);
  font-size: 13.5px;
  line-height: 1.5;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
a { color: inherit; text-decoration: none; }

[hidden], #projectsPanel .empty-state[hidden], .filter-row[hidden], .work-section[hidden], .greeting-sub[hidden], .projects-panel[hidden], #homeOverview[hidden], #homeWidgets[hidden], .summary-grid.home-summary-grid-hidden, #authRoot[hidden], .app-shell[hidden], .mobile-tabs[hidden], #dataStatus[hidden], .data-status[hidden], .calendar-container[hidden], .reports-container[hidden], .business-container[hidden], .portfolio-editor[hidden], .goal-editor[hidden], .modal-backdrop[hidden] {
  display: none !important;
}

/* Authentication Screen */
#authRoot {
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-screen {
  width: min(100% - 32px, 420px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.auth-brand {
  align-self: flex-start;
  margin: 0 0 24px 4px;
}
.auth-card {
  width: 100%;
  padding: 36px 32px;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
}
.auth-card > .eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent-indigo);
  font-weight: 700;
  text-transform: uppercase;
}
.auth-card h1 {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.6px;
  color: var(--text-main);
}
.auth-subtitle {
  margin: 8px 0 24px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}
.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-card label {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}
.auth-card input {
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #ffffff;
  color: var(--text-main);
  font-size: 13px;
  transition: all 0.15s ease;
}
.auth-card input:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px var(--border-focus-ring);
}
.auth-card form > button {
  height: 42px;
  margin-top: 14px;
  border: 0;
  border-radius: 9px;
  background: var(--accent-indigo);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
  transition: all 0.15s ease;
}
.auth-card form > button:hover {
  background: var(--accent-indigo-hover);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}
.auth-card form > button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.auth-error {
  padding: 12px 14px;
  border: 1px solid #fecdd3;
  border-radius: 9px;
  background: #fff1f2;
  color: #be123c;
  font-size: 12px;
  line-height: 1.45;
}
.auth-switch {
  margin: 22px 0 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}
.auth-switch button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-indigo);
  font-weight: 650;
  cursor: pointer;
}
.auth-footnote {
  margin: 18px 10px 0;
  color: var(--text-dim);
  text-align: center;
  font-size: 11px;
}

/* App Shell & Sidebar (Matches Stitch Image 2) */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 16px 12px 14px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  margin: 0 0 16px 6px;
  font-family: 'Manrope', sans-serif;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text-main);
}
.brand-dot { color: var(--accent-indigo); }
.brand-symbol {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 2px;
}
.brand-symbol i {
  display: block;
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent-indigo), #38bdf8);
}
.brand-symbol i:nth-child(1) { height: 8px; }
.brand-symbol i:nth-child(2) { height: 17px; }
.brand-symbol i:nth-child(3) { height: 12px; }

.workspace-switch {
  height: 48px;
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  text-align: left;
  gap: 9px;
  cursor: pointer;
  transition: all 0.15s ease;
  overflow: hidden;
}
.workspace-switch:hover {
  background: var(--bg-canvas);
  border-color: var(--border-strong);
}
.workspace-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-indigo);
  color: #ffffff;
  font-weight: 750;
  font-size: 13px;
}
.workspace-copy, .profile-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.workspace-copy strong, .workspace-copy span, .profile-copy strong, .profile-copy span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 140px;
}
.workspace-copy small, .workspace-copy span + span, .profile-copy small, .profile-copy span + span {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 140px;
}
.chevrons {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--text-dim);
  font-size: 12px;
}

.quick-create {
  margin: 12px 0 16px;
  height: 38px;
  background: var(--accent-indigo);
  color: #fff;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.25);
  transition: all 0.15s ease;
}
.quick-create:hover {
  background: var(--accent-indigo-hover);
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.35);
}
.plus-mark {
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}
.quick-create kbd, .search-button kbd {
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 10px;
  background: rgba(0, 0, 0, 0.12);
}

.nav-caption, .nav-section-head, .eyebrow {
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}
.nav-caption { margin: 0 8px 6px; }
.primary-nav, .project-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-link, .project-link {
  height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.12s ease;
}
.nav-link:hover, .project-link:hover {
  background: var(--bg-canvas);
  color: var(--text-main);
}
.nav-link.active, .project-link.project-active {
  background: var(--accent-indigo-light);
  color: var(--accent-indigo);
  font-weight: 650;
}
.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 15px;
  line-height: 1;
  color: var(--text-muted);
}
.nav-link.active .nav-icon { color: var(--accent-indigo); }
.nav-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 1px 7px;
  border-radius: 99px;
  font-weight: 600;
}
.unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-coral);
  margin-left: auto;
  margin-right: 4px;
}

.nav-section-head {
  margin: 18px 8px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-section-head button {
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
}
.nav-section-head button:hover { color: var(--text-main); }
.project-color {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.project-color.coral { background: var(--accent-coral); }
.project-color.lilac { background: var(--accent-violet); }
.project-color.mint { background: var(--accent-mint); }
.project-color.blue { background: var(--accent-indigo); }

.all-projects {
  margin-top: 6px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border-radius: 6px;
}
.all-projects:hover { background: var(--bg-canvas); color: var(--text-main); }
.all-projects span {
  font-size: 10px;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 99px;
  font-weight: 600;
}

.sidebar-spacer { flex: 1; min-height: 14px; }

.help-link {
  height: 32px;
  padding: 0 10px;
  margin-bottom: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  background: var(--bg-surface);
  color: var(--text-sub);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.help-link:hover { background: var(--bg-canvas); }
.help-icon {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1f5f9;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-sub);
}
.external-arrow { margin-left: auto; color: var(--text-dim); }

.profile-card {
  height: 48px;
  padding: 0 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  gap: 9px;
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-indigo);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.avatar-me {
  background: linear-gradient(135deg, var(--accent-indigo) 0%, #06b6d4 100%);
}
.profile-menu {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}
.profile-menu:hover { color: var(--text-main); }

/* Main Area & Topbar */
.main-area {
  margin-left: 260px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 56px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}
.breadcrumbs strong {
  color: var(--text-main);
  font-weight: 650;
}
.crumb-slash { color: var(--border-strong); }

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-button {
  position: relative;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}
.icon-button:hover { color: var(--text-main); }
.search-button {
  min-width: 210px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  background: var(--bg-canvas);
  justify-content: flex-start;
  font-size: 12.5px;
  color: var(--text-muted);
}
.search-button:hover {
  background: #ffffff;
  border-color: var(--border-strong);
}
.search-button span { font-size: 12px; color: var(--text-muted); }
.search-button kbd {
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #64748b;
  font-size: 10px;
  background: #ffffff;
}
.top-bell {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
}
.top-bell i {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-coral);
}
.avatar-top {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}
.mobile-brand { display: none; }

/* Page Content */
.page-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 32px 48px;
  width: 100%;
}
.greeting-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
}
.greeting-row h1 {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: -0.5px;
  color: var(--text-main);
}
.greeting-row h1 .greeting-sparkle{
  color: var(--accent-indigo);
  font-size: 20px;
  margin-left: 4px;
}
.greeting-sub {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}
.greeting-sub strong {
  color: var(--accent-indigo);
  font-weight: 650;
}
.create-task-button {
  height: 36px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-indigo);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.25);
  transition: all 0.15s ease;
}
.create-task-button:hover {
  background: var(--accent-indigo-hover);
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.35);
}
.create-task-button span { font-size: 16px; font-weight: 400; }

/* Home Overview & Week Focus Banner (Hidden in Stitch design) */
.home-overview {
  display: none !important;
  margin-top: 4px;
}
.home-week-focus {
  display: none !important;
  padding: 20px 24px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}
.home-focus-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.home-focus-head .eyebrow {
  margin: 0 0 3px;
  color: var(--accent-indigo);
  font-size: 10px;
}
.home-focus-head .eyebrow strong {
  margin-left: 6px;
  color: var(--accent-coral);
}
.home-focus-head h2, .home-widget-card h2 {
  margin: 0;
  color: var(--text-main);
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.3px;
}
.home-focus-subtitle {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 12.5px;
}
.home-progress-ring {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(closest-side, #ffffff 78%, transparent 81% 99%), conic-gradient(var(--accent-indigo) var(--home-progress, 0%), #e2e8f0 0);
  border: 1px solid var(--border-subtle);
}
.home-progress-ring strong {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  line-height: 1;
  color: var(--text-main);
}
.home-progress-ring span {
  font-size: 9px;
  color: var(--text-muted);
}

/* Stat Buttons in Week Focus */
.home-week-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.home-stat {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-canvas);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.12s;
}
.home-stat:hover { background: #f1f5f9; border-color: var(--border-strong); }
.home-stat strong { font-weight: 700; color: var(--text-main); }
.home-stat-overdue {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}
.home-stat-overdue strong { color: #be123c; }

/* Next Task Row */
.home-next {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-hairline);
}
.home-next-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.home-next-task {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-canvas);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.12s;
  text-align: left;
}
.home-next-task:hover {
  background: var(--accent-indigo-light);
  border-color: #c7d2fe;
}
.home-check-mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
}
.home-next-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}
.home-next-arrow {
  color: var(--accent-indigo);
  font-size: 13px;
}
.home-focus-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
}
.home-focus-empty strong { color: var(--text-main); font-weight: 600; }
.home-focus-empty span:not(.home-empty-flower) { color: var(--text-muted); }
.home-focus-empty button {
  margin-left: auto;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: var(--accent-indigo);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

/* Secondary Dashboard Grid */
.home-secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.home-widget-card {
  padding: 20px 22px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}
.home-widget-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.home-widget-link {
  border: 0;
  background: none;
  color: var(--accent-indigo);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.home-project-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 4px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--bg-canvas);
  cursor: pointer;
  text-align: left;
}
.home-project-card:hover { border-color: var(--border-strong); background: #f1f5f9; }
.home-project-name { font-size: 12.5px; font-weight: 600; color: var(--text-main); flex: 1; }
.home-project-meta { font-size: 11px; color: var(--text-muted); }
.home-project-progress {
  width: 60px;
  height: 5px;
  border-radius: 3px;
  background: #e2e8f0;
  overflow: hidden;
}
.home-project-progress i {
  display: block;
  height: 100%;
  width: var(--home-progress, 0%);
  background: var(--accent-indigo);
}
.home-project-percent { font-size: 11px; font-weight: 600; color: var(--text-sub); width: 32px; text-align: right; }
.home-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: 7px;
  background: var(--bg-canvas);
}
.home-person-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-indigo);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
}
.home-person-copy { display: flex; flex-direction: column; flex: 1; }
.home-person-copy strong { font-size: 12px; color: var(--text-main); }
.home-person-copy span { font-size: 11px; color: var(--text-muted); }
.home-person-total {
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  padding: 1px 6px;
  border-radius: 99px;
  color: var(--text-sub);
}
.home-widget-empty {
  padding: 20px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}
.home-widget-empty button {
  margin-top: 8px;
  padding: 5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

/* 3 Summary Stat Cards (Matches Stitch Image 2) */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.summary-card {
  padding: 18px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  transition: all 0.15s ease;
}
.summary-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card-hover);
}
.summary-card svg {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  display: block !important;
  overflow: visible !important;
}
.summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.summary-top span:first-child {
  font-size: 11px;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}
.summary-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 750;
}
.summary-icon.lilac { background: var(--accent-indigo-light); color: var(--accent-indigo); }
.summary-icon.mint { background: var(--accent-mint-light); color: var(--accent-mint); }
.summary-icon.peach { background: var(--accent-coral-light); color: var(--accent-coral); }

.summary-bottom {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.summary-bottom strong {
  font-family: 'Manrope', sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text-main);
  line-height: 1;
}
.summary-bottom > span:nth-child(2) {
  font-size: 12px;
  color: var(--text-muted);
}
.summary-spark {
  margin-left: auto;
  color: var(--accent-indigo);
  font-size: 16px;
}
.mini-bars {
  height: 24px;
  margin-left: auto;
  display: flex;
  align-items: flex-end;
  gap: 3px;
}
.mini-bars i, .mini-bars div {
  width: 5px;
  border-radius: 2px 2px 0 0;
  background: #6ffbbe;
  height: 8px;
}
.mini-bars i:nth-child(1), .mini-bars div:nth-child(1) { height: 8px; }
.mini-bars i:nth-child(2), .mini-bars div:nth-child(2) { height: 14px; }
.mini-bars i:nth-child(3), .mini-bars div:nth-child(3) { height: 11px; }
.mini-bars i:nth-child(4), .mini-bars div:nth-child(4) { height: 18px; }
.mini-bars i:nth-child(5), .mini-bars div:nth-child(5) { height: 24px; background: #006c49; }

.calendar-mini {
  margin-left: auto;
  padding: 2px 7px;
  border: 1px solid #fecdd3;
  border-radius: 5px;
  background: var(--accent-coral-light);
  color: #be123c;
  font-size: 10px;
  font-weight: 700;
}

/* Work Section, Task Table & Controls (Matches Stitch Image 2) */
.work-section { margin-top: 28px; }
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-heading .eyebrow { margin-bottom: 3px; }
.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  letter-spacing: -0.3px;
  font-weight: 750;
  color: var(--text-main);
}
.task-total {
  min-width: 20px;
  height: 18px;
  padding: 1px 6px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #f1f5f9;
  color: var(--text-muted);
  font: 600 11px 'Plus Jakarta Sans', sans-serif;
}
.view-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-button {
  height: 32px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text-sub);
  font-size: 12px;
  cursor: pointer;
}
.filter-button:hover { background: var(--bg-canvas); border-color: var(--border-strong); }
.view-toggle {
  height: 32px;
  display: flex;
  padding: 2px;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  background: #f1f5f9;
}
.view-tab {
  width: auto;
  min-width: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.view-tab:hover { color: var(--text-main); }
.view-tab.selected {
  background: #ffffff;
  color: var(--accent-indigo);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.filter-chip {
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
}
.filter-chip:hover { border-color: var(--border-strong); color: var(--text-main); }
.filter-chip.active {
  background: var(--accent-indigo-light);
  border-color: #c7d2fe;
  color: var(--accent-indigo);
  font-weight: 650;
}
.filter-chip span { margin-left: 4px; color: var(--accent-indigo); font-weight: 700; }

.list-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  height: 30px;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text-muted);
}
.list-search input {
  width: 140px;
  border: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 12px;
  outline: none;
}
.list-search input::placeholder { color: var(--text-dim); }

.task-view { min-height: 160px; }
.task-group { margin-bottom: 22px; }
.group-title {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.section-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-indigo);
}
.section-dot.purple { background: var(--accent-indigo); }
.section-dot.green { background: var(--accent-mint); }
.section-dot.gray { background: var(--text-dim); }
.group-count { color: var(--text-dim); font-size: 11px; font-weight: 500; }
.group-line { flex: 1; height: 1px; background: var(--border-hairline); }

/* Task Row (Pixel-Perfect from Stitch Image 2) */
.task-row {
  min-height: 46px;
  display: grid;
  grid-template-columns: 22px minmax(200px, 1fr) minmax(110px, 160px) 72px 90px 85px 24px;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  margin-bottom: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: all 0.12s ease;
}
.task-row:hover {
  border-color: #c7d2fe;
  background: #fcfdfe;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.04);
}
.task-row.active, .task-row.selected {
  border-left: 3px solid var(--accent-indigo);
  background: #f8faff;
  border-color: #c7d2fe;
}
.task-check {
  width: 17px;
  height: 17px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1.5px solid #cbd5e1;
  border-radius: 50%;
  background: #ffffff;
  color: #fff;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.12s;
}
.task-check:hover {
  border-color: var(--accent-mint);
  background: var(--accent-mint-light);
}
.task-check.checked {
  border-color: var(--accent-mint);
  background: var(--accent-mint);
}

.task-title, .kanban-title {
  overflow: hidden;
  border: 0;
  background: none;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.12s;
}
.task-title:hover, .kanban-title:hover { color: var(--accent-indigo); }
.task-row.is-done .task-title {
  text-decoration: line-through;
  color: var(--text-dim);
}

.task-label {
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
}
.task-label i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.task-label.coral { background: var(--accent-coral-light); color: #be123c; }
.task-label.lilac { background: var(--accent-violet-light); color: #6d28d9; }
.task-label.mint { background: var(--accent-mint-light); color: #047857; }
.task-label.blue { background: var(--accent-cyan-light); color: #0369a1; }

.priority-pill {
  width: max-content;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.priority-urgent { background: #fee2e2; color: #dc2626; }
.priority-high { background: #fef3c7; color: #b45309; }
.priority-low { background: #ecfdf5; color: #047857; }
.priority-normal { background: #f1f5f9; color: #475569; }

.task-owner {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-sub);
  font-size: 11px;
}
.task-owner .avatar { width: 22px; height: 22px; font-size: 9px; }

.task-due {
  color: var(--text-muted);
  font-size: 11.5px;
  white-space: nowrap;
}
.task-due.due-today {
  color: #dc2626;
  font-weight: 650;
  background: #fee2e2;
  padding: 1px 6px;
  border-radius: 4px;
}
.task-more {
  border: 0;
  background: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  text-align: center;
}
.task-more:hover { color: var(--text-main); }

.completed-group { margin-top: 18px; }
.completed-group .task-row { opacity: 0.65; }

/* Kanban / Board View */
.board-view {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding-top: 8px;
}
@media (max-width: 900px) {
  .board-view {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .board-view {
    grid-template-columns: 1fr;
  }
}
.board-column { min-width: 0; }
.board-column > header {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 650;
  padding: 0 4px;
}
.board-column > header b {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  background: #e2e8f0;
  padding: 1px 6px;
  border-radius: 99px;
}
.board-cards {
  min-height: 160px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px dashed var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-canvas);
  transition: all 0.15s ease;
}
.board-cards.drag-over {
  border-color: #4f46e5 !important;
  background: #eff4ff !important;
}
.kanban-card {
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: var(--shadow-subtle);
  transition: all 0.15s ease;
  cursor: grab;
  user-select: none;
}
.kanban-card:active {
  cursor: grabbing;
}
.kanban-card.is-dragging {
  opacity: 0.4;
  transform: scale(0.98);
}
.calendar-task-chip {
  cursor: grab;
}
.calendar-task-chip:active {
  cursor: grabbing;
}
.calendar-day.drag-over {
  background: #eff4ff !important;
  outline: 2px dashed #4f46e5;
}
.kanban-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}
.kanban-card-top, .kanban-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kanban-card .task-label { max-width: calc(100% - 25px); }
.kanban-card .task-check { width: 16px; height: 16px; }
.kanban-title {
  display: block;
  width: 100%;
  margin: 10px 0 12px;
  padding: 0;
  line-height: 1.45;
  white-space: normal;
  font-size: 13px;
}
.kanban-card-bottom { color: var(--text-muted); font-size: 11px; }
.kanban-card-bottom .avatar { width: 22px; height: 22px; font-size: 9px; }
.board-empty {
  margin: 24px 4px;
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
}

/* Modal for New Task (Centered) */
.modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.task-modal {
  width: min(100%, 520px);
  padding: 28px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
  animation: modal-in 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.modal-top .eyebrow { font-size: 10px; color: var(--accent-indigo); }
.modal-top h2 {
  margin: 4px 0 0;
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  letter-spacing: -0.4px;
  color: var(--text-main);
}
.modal-top h2 span { color: var(--accent-indigo); }
.modal-close {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  background: var(--bg-canvas);
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}
.modal-close:hover { background: #f1f5f9; color: var(--text-main); }
.task-modal form { margin-top: 18px; }
.task-modal label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 600;
}
.task-modal input, .task-modal select, .task-modal textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-main);
  font-size: 13px;
}
.task-modal input:focus, .task-modal select:focus, .task-modal textarea:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px var(--border-focus-ring);
}
.modal-fields, .detail-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.modal-actions > span { color: var(--text-dim); font-size: 11px; }
.modal-actions button {
  height: 36px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-indigo);
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.25);
}
.modal-actions button:hover { background: var(--accent-indigo-hover); }

/* SLIDE-OUT RIGHT DRAWER for Task Details (Pixel-Perfect from Stitch Image 2) */
@media (max-width: 1023px) {
  .modal-backdrop.detail-backdrop {
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    padding: 0;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }
  .modal-backdrop.detail-backdrop[hidden] {
    display: none !important;
  }
  .detail-modal {
    width: min(100%, 540px);
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: 0;
    border-left: 1px solid var(--border-subtle);
    background: #ffffff;
    box-shadow: var(--shadow-drawer);
    overflow-y: auto;
    animation: drawer-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 24px;
  }
}
@media (min-width: 1024px) {
  .modal-backdrop.detail-backdrop {
    position: static;
    display: block;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    width: 100%;
    z-index: 10;
  }
  .modal-backdrop.detail-backdrop[hidden] {
    display: none !important;
  }
  .detail-modal {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 100px);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    box-shadow: var(--shadow-card);
    overflow-y: auto;
    padding: 20px;
    animation: none;
  }
}
@keyframes drawer-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.detail-header h2 {
  max-width: 440px;
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.4px;
  color: var(--text-main);
}
.detail-modal textarea, .comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-main);
  font: inherit;
  font-size: 13px;
  resize: vertical;
}
.detail-modal textarea:focus, .comment-form textarea:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px var(--border-focus-ring);
}
.detail-save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}
.detail-save-row span { font-size: 12px; color: var(--text-muted); }
.detail-save-row button {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-indigo);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.detail-save-row button:hover { background: var(--accent-indigo-hover); }

.comments-section, .detail-subtasks, .detail-attachments, .detail-approval-request, .detail-activity {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.comments-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.comments-heading h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-main);
}
.comments-heading > span {
  padding: 1px 7px;
  border-radius: 99px;
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
}
.comment-list {
  max-height: 180px;
  overflow-y: auto;
  margin-top: 10px;
}
.comment-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.comment-meta strong { font-size: 12px; color: var(--text-main); }
.comment-meta time { font-size: 11px; color: var(--text-dim); }
.comment-item p {
  margin: 3px 0 0;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.5;
  background: var(--bg-canvas);
  padding: 8px 12px;
  border-radius: 8px;
}
.comment-form {
  display: grid;
  grid-template-columns: 28px 1fr 34px;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.comment-form button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-indigo);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.comment-form button:hover { background: var(--accent-indigo-hover); }

.subtask-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.subtask-form input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text-main);
  font-size: 12px;
}
.subtask-form button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 7px;
  background: var(--accent-indigo-light);
  color: var(--accent-indigo);
  font-size: 16px;
  cursor: pointer;
}
.attachment-picker {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 7px;
  color: var(--accent-indigo);
  font-size: 12px;
  cursor: pointer;
}
.attachment-picker:hover { background: var(--accent-indigo-light); }

/* Projects Panel */
.projects-panel { margin-top: 10px; }
.project-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.project-panel-head button {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-indigo);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.project-card {
  padding: 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: all 0.15s ease;
}
.project-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

/* Calendar Container */
.calendar-container { margin-top: 10px; }
.calendar-panel {
  padding: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.calendar-day {
  min-height: 80px;
  padding: 8px;
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  background: var(--bg-canvas);
}
.calendar-day.today {
  border-color: var(--accent-indigo);
  background: var(--accent-indigo-light);
}

/* Reports Container */
.reports-container { margin-top: 10px; }
.report-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.report-card {
  padding: 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

/* Business Container */
.business-container { margin-top: 10px; }
.business-card {
  padding: 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}

/* Toast */
.toast {
  position: fixed;
  z-index: 100;
  bottom: 24px;
  right: 24px;
  padding: 10px 18px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  animation: toast-in 0.2s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Footer */
.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 48px;
  padding: 20px 0;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 12px;
}

/* Responsive Media Queries */
@media(max-width:650px){.calendar-panel { padding: 12px; }}

@media (max-width: 900px) {
  .home-secondary-grid, .summary-grid {
    grid-template-columns: 1fr;
  }
  .board-view {
    grid-template-columns: 1fr;
  }
  .detail-modal { width: 100%; }
}

@media (max-width: 760px) {
  .sidebar { display: none; }
  .main-area { margin-left: 0; }
  .mobile-brand { display: block; }
  .mobile-tabs {
    position: fixed;
    z-index: 20;
    bottom: 0;
    inset-inline: 0;
    height: 56px;
    background: #ffffff;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-around;
  }
  .page-content { padding: 20px 16px 70px; }
  .task-row {
    grid-template-columns: 22px 1fr 22px;
  }
  .task-label, .priority-pill, .task-owner, .task-due {
    display: none;
  }
}

@media (max-width: 480px) {
  .view-tools {
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .view-toggle {
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
  }
  .view-tab {
    width: auto !important;
    min-width: 32px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 12px !important;
  }
  #workTitle {
    margin-top: 4px !important;
    font-size: 16px !important;
  }
}


/* =====================================================================
   KHURAA — Stitch 1:1 layer (self-contained, no Tailwind dependency)
   ===================================================================== */
:root {
  --k-bg: #f7f8fc;
  --k-surface: #ffffff;
  --k-border: #e6e9f2;
  --k-border-strong: #d7dbe8;
  --k-ink: #0b1c30;
  --k-ink-2: #464555;
  --k-muted: #777587;
  --k-indigo: #4f46e5;
  --k-indigo-deep: #3525cd;
  --k-indigo-soft: #e5eeff;
  --k-indigo-softer: #eff4ff;
  --k-green: #006c49;
  --k-green-soft: #d6fbe9;
  --k-red: #95002b;
  --k-red-soft: #ffdadb;
  --k-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .04);
  --k-shadow-lg: 0 6px 24px rgba(15, 23, 42, .07), 0 2px 6px rgba(15, 23, 42, .04);
}
body { background: var(--k-bg); font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--k-ink); }
.material-symbols-outlined { font-size: 18px; line-height: 1; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20; user-select: none; }
.k-sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.app-shell { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.k-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: 260px;
  background: var(--k-surface); border-right: 1px solid var(--k-border);
  display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto;
}
.k-side-top { display: flex; flex-direction: column; }
.k-ws { display: flex; align-items: center; gap: 10px; width: 100%; padding: 16px; border: 0; border-bottom: 1px solid var(--k-border); background: transparent; cursor: pointer; text-align: left; }
.k-ws-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--k-indigo); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.k-ws-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.k-ws-copy strong { font-size: 14px; font-weight: 700; color: var(--k-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-ws-copy small { font-size: 11.5px; color: var(--k-muted); font-weight: 500; }
.k-ws-chev { color: var(--k-muted); }
.k-create { margin: 16px; height: 40px; border: 0; border-radius: 8px; background: var(--k-indigo); color: #fff; font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; box-shadow: 0 1px 3px rgba(79, 70, 229, .3); }
.k-create:hover { background: var(--k-indigo-deep); }
.k-create .material-symbols-outlined { font-size: 20px; }
.k-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.k-nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--k-ink-2); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; list-style: none; }
.k-nav-link::-webkit-details-marker { display: none; }
.k-nav-link:hover { background: var(--k-indigo-softer); color: var(--k-ink); }
.k-nav-link.active { background: var(--k-indigo-soft); color: var(--k-indigo-deep); font-weight: 600; }
.k-nav-link > span:nth-child(2) { flex: 1; }
.k-count { min-width: 22px; padding: 1px 8px; border-radius: 99px; background: #dce9ff; color: var(--k-ink-2); font-size: 11px; font-weight: 700; text-align: center; }
.k-count-red { background: var(--k-red-soft); color: var(--k-red); }
.k-more > .k-nav-link { color: var(--k-muted); }
.k-more[open] > summary { color: var(--k-ink); }
.k-more > a { padding-left: 24px; font-size: 13px; }
.k-pinned { padding: 22px 16px 8px; }
.k-pinned-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding: 0 4px; }
.k-pinned-head span { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--k-muted); }
.k-pinned-head button { border: 0; background: none; color: var(--k-muted); cursor: pointer; padding: 0; font-size: 18px; }
.k-project-nav { display: flex; flex-direction: column; gap: 2px; }
.k-project-nav .project-link { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 6px; color: var(--k-ink-2); font-size: 13.5px; text-decoration: none; }
.k-project-nav .project-link:hover, .k-project-nav .project-active { background: var(--k-indigo-softer); color: var(--k-ink); }
.k-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--k-indigo); }
.k-dot.blue { background: #4f46e5; } .k-dot.lilac { background: #6d28d9; } .k-dot.mint { background: #047857; } .k-dot.coral { background: #be123c; }
.k-all-projects { margin-top: 6px; padding: 4px; border: 0; background: none; color: var(--k-muted); font-size: 12px; cursor: pointer; }
.k-all-projects span { margin-left: 4px; padding: 0 6px; border-radius: 99px; background: #eef1f6; }
.k-side-bottom { border-top: 1px solid var(--k-border); padding: 10px 12px; }
.k-help { display: none; }
.k-profile { display: flex; align-items: center; gap: 10px; }
.k-profile-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.k-profile-copy strong { font-size: 13px; color: var(--k-ink); }
.k-profile-copy small { font-size: 11px; color: var(--k-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Shared atoms ---------- */
.k-avatar { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--k-indigo-deep); color: #fff; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; font-style: normal; flex-shrink: 0; cursor: default; }
button.k-avatar { cursor: pointer; }
.k-avatar-sm { width: 24px; height: 24px; font-size: 9.5px; }
.k-avatar.t-ts { background: #6ffbbe; color: #005236; }
.k-avatar.t-ba { background: #dce9ff; color: #3323cc; }
.k-avatar.t-da { background: #e5eeff; color: #3525cd; }
.k-icon-btn { position: relative; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--k-ink-2); display: inline-grid; place-items: center; cursor: pointer; }
.k-icon-btn:hover { background: var(--k-indigo-softer); color: var(--k-ink); }
.k-btn-primary, .k-btn-white, .k-btn-outline, .k-btn-share { height: 36px; padding: 0 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.k-btn-primary { border: 0; background: var(--k-indigo); color: #fff; box-shadow: 0 1px 3px rgba(79, 70, 229, .3); }
.k-btn-primary:hover { background: var(--k-indigo-deep); }
.k-btn-white { border: 1px solid var(--k-border); background: #fff; color: var(--k-ink); box-shadow: var(--k-shadow); }
.k-btn-white .material-symbols-outlined { color: var(--k-muted); }
.k-btn-outline { border: 1px solid var(--k-border); background: #fff; color: var(--k-ink-2); }
.k-btn-share { border: 0; background: #e2dfff; color: #3323cc; }
.k-btn-sm { height: 30px; padding: 0 12px; font-size: 12px; }
.k-caret { margin-left: 2px; padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, .3); }

/* ---------- Main + Topbar ---------- */
.k-main { margin-left: 260px; flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.k-topbar { position: sticky; top: 0; z-index: 25; height: 60px; padding: 0 28px; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--k-border); display: flex; align-items: center; justify-content: space-between; gap: 16px; backdrop-filter: blur(8px); }
.k-mobile-menu { display: none; border: 0; background: none; cursor: pointer; }
.k-crumbs { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--k-ink-2); white-space: nowrap; }
.k-crumbs span:first-child, .k-crumbs strong { color: var(--k-ink); font-weight: 600; }
.k-crumbs i { font-style: normal; color: #c7c4d8; }
.k-top-actions { display: flex; align-items: center; gap: 10px; }
.k-quick-search { position: relative; display: flex; align-items: center; }
.k-quick-search > .material-symbols-outlined { position: absolute; left: 10px; color: var(--k-muted); }
.k-quick-search input { width: 230px; height: 36px; padding: 0 44px 0 34px; border: 1px solid var(--k-border); border-radius: 8px; background: var(--k-bg); color: var(--k-ink); font-size: 12.5px; outline: none; }
.k-quick-search input:focus { border-color: var(--k-indigo); background: #fff; }
.k-quick-search kbd { position: absolute; right: 8px; padding: 1px 6px; border: 1px solid var(--k-border); border-radius: 4px; background: #fff; color: var(--k-muted); font-size: 10px; font-family: inherit; }
.k-bell i { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: #bf0f3c; border: 1.5px solid #fff; }

/* ---------- Page ---------- */
.page-content.k-page { max-width: none; margin: 0; padding: 22px 28px 48px; width: 100%; }
.k-content { display: flex; flex-direction: column; gap: 18px; }
.k-greeting { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.k-greeting-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.k-greeting h1 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; color: var(--k-ink); }
.k-greeting h1 .greeting-sparkle { display: none; }
.k-date-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: var(--k-indigo-soft); color: var(--k-ink-2); font-size: 12px; font-weight: 600; }
.k-date-pill .material-symbols-outlined { font-size: 14px; }
.k-greeting-sub { margin: 6px 0 0; font-size: 13px; color: var(--k-ink-2); }
.k-greeting-sub strong { color: var(--k-indigo-deep); }
.k-greeting-actions { display: flex; gap: 8px; }

/* Stat cards */
.summary-grid.k-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; }
.summary-grid.k-stats.home-summary-grid-hidden { display: none; }
.k-stat { display: flex; flex-direction: column; justify-content: space-between; min-height: 112px; padding: 16px 18px; background: var(--k-surface); border: 1px solid var(--k-border); border-radius: 12px; box-shadow: var(--k-shadow); }
.k-stat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.k-stat-label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--k-muted); margin-bottom: 8px; }
.k-stat-value { display: flex; align-items: baseline; gap: 8px; }
.k-stat-value strong { font-size: 30px; line-height: 1; font-weight: 700; color: var(--k-ink); letter-spacing: -.02em; }
.k-stat-value span { font-size: 12.5px; color: var(--k-ink-2); }
.k-stat-value.k-green strong { color: var(--k-green); }
.k-stat-value.k-red strong { color: var(--k-red); }
.k-stat-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: 11px; color: var(--k-muted); }
.k-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.k-chip .material-symbols-outlined { font-size: 14px; }
.k-chip-indigo { background: #dce9ff; color: var(--k-indigo-deep); }
.k-chip-green { background: var(--k-green-soft); color: var(--k-green); }
.k-chip-red { background: var(--k-red-soft); color: var(--k-red); }
.k-chip-red i { width: 6px; height: 6px; border-radius: 50%; background: var(--k-red); }
.k-ring { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
.k-ring svg { width: 48px; height: 48px; transform: rotate(-90deg); display: block; }
.k-ring circle { fill: none; stroke-width: 4; }
.k-ring-bg { stroke: var(--k-indigo-soft); }
.k-ring-fg { stroke: var(--k-indigo); stroke-linecap: round; transition: stroke-dashoffset .4s ease; }
.k-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: var(--k-indigo-deep); }
.k-bars { display: flex; align-items: flex-end; gap: 5px; height: 34px; }
.k-bars i { width: 9px; border-radius: 2px 2px 0 0; background: #6ffbbe; }
.k-bars i:nth-child(1) { height: 13px; } .k-bars i:nth-child(2) { height: 20px; } .k-bars i:nth-child(3) { height: 16px; } .k-bars i:nth-child(4) { height: 26px; } .k-bars i:nth-child(5) { height: 34px; background: var(--k-green); }
.k-timer { width: 38px; height: 38px; border-radius: 10px; background: var(--k-red-soft); color: var(--k-red); display: grid; place-items: center; flex-shrink: 0; }
.k-timer .material-symbols-outlined { font-size: 22px; }

/* Toolbar */
.work-section.k-work { margin: 0; display: flex; flex-direction: column; gap: 16px; }
.k-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 10px; background: var(--k-surface); border: 1px solid var(--k-border); border-radius: 12px; box-shadow: var(--k-shadow); }
.k-tabs, .k-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.k-tab { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--k-ink-2); font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.k-tab:hover { background: var(--k-indigo-softer); color: var(--k-ink); }
.k-tab.selected { background: var(--k-indigo-soft); color: var(--k-indigo-deep); font-weight: 700; }
.k-tab-dot { display: none; width: 6px; height: 6px; border-radius: 50%; background: var(--k-indigo); }
.k-tab.selected .k-tab-dot { display: inline-block; }
.k-search { position: relative; display: flex; align-items: center; }
.k-search .material-symbols-outlined { position: absolute; left: 9px; font-size: 16px; color: var(--k-muted); }
.k-search input { width: 190px; height: 32px; padding: 0 10px 0 30px; border: 1px solid transparent; border-radius: 8px; background: var(--k-bg); font-size: 12px; color: var(--k-ink); outline: none; }
.k-search input:focus { border-color: var(--k-indigo); background: #fff; }
.k-status { display: flex; align-items: center; gap: 2px; height: 32px; padding: 0 4px 0 10px; border-radius: 8px; background: var(--k-bg); }
.k-status-label { font-size: 12px; color: var(--k-ink-2); margin-right: 4px; }
.k-status .filter-chip { height: 24px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--k-ink-2); font-size: 12px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.k-status .filter-chip.active { background: #fff; color: var(--k-ink); font-weight: 700; box-shadow: var(--k-shadow); }
.k-status .filter-chip span { color: var(--k-muted); font-weight: 600; }
.k-select-pill { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px 0 10px; border-radius: 8px; background: var(--k-bg); font-size: 12px; color: var(--k-ink-2); }
.k-select-pill select { border: 0; background: transparent; font-size: 12px; font-weight: 700; color: var(--k-ink); outline: none; cursor: pointer; }

/* Grid */
.work-grid.k-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 20px; align-items: start; }
.work-grid.k-grid:has(#detailBackdrop[hidden]) { grid-template-columns: minmax(0, 1fr); }
.k-detail-col:has(#detailBackdrop[hidden]) { display: none; }
.k-list-col { min-width: 0; }
.k-detail-col { position: sticky; top: 76px; min-width: 0; }

/* Task groups */
.k-group { margin-bottom: 18px; }
.k-group-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 10px; }
.k-group-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--k-ink); }
.k-group-title .material-symbols-outlined { font-size: 18px; color: var(--k-muted); }
.k-group-count { padding: 1px 7px; border-radius: 99px; background: var(--k-indigo-soft); color: var(--k-indigo-deep); font-size: 10.5px; font-weight: 700; }
.k-group-meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--k-muted); }
.k-group-meta button { border: 0; background: none; color: var(--k-muted); cursor: pointer; padding: 0; }
.k-group-done summary { list-style: none; cursor: pointer; }
.k-group-done summary::-webkit-details-marker { display: none; }
.k-group-done:not([open]) .k-group-title .material-symbols-outlined { transform: rotate(-90deg); }

.k-list-col .task-row {
  display: flex; flex-direction: column; gap: 6px; min-height: 0;
  margin: 0 0 8px; padding: 12px 14px 12px 16px;
  background: var(--k-surface); border: 1px solid var(--k-border); border-radius: 10px;
  box-shadow: var(--k-shadow); cursor: pointer; transition: box-shadow .15s, border-color .15s;
  grid-template-columns: none;
}
.k-list-col .task-row:hover { border-color: var(--k-border-strong); box-shadow: 0 4px 12px rgba(15, 23, 42, .06); }
.k-list-col .task-row.active { border-left: 4px solid var(--k-indigo); padding-left: 13px; box-shadow: var(--k-shadow-lg); background: linear-gradient(to right, rgba(226, 223, 255, 0.45), #ffffff); }
.k-row-main { display: flex; align-items: center; gap: 12px; }
.k-row-main .task-check { width: 16px; height: 16px; flex-shrink: 0; padding: 0; border: 1.5px solid #9aa3c7; border-radius: 50%; background: #fff; color: #fff; font-size: 10px; display: grid; place-items: center; cursor: pointer; }
.k-row-main .task-check:hover { border-color: var(--k-indigo); background: var(--k-indigo-softer); }
.k-row-main .task-check.checked { border-color: #10b981; background: #10b981; }
.k-row-main .task-title { flex: 1; min-width: 0; padding: 0; border: 0; background: none; text-align: left; font-size: 14.5px; font-weight: 600; color: var(--k-ink); white-space: normal; overflow: visible; cursor: pointer; letter-spacing: -.005em; }
.task-row.is-done .k-row-main .task-title { color: #94a3b8; text-decoration: line-through; }
.k-row-right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.k-row-right .task-more, .k-row-right .k-chev { border: 0; background: none; color: var(--k-muted); font-size: 16px; cursor: pointer; padding: 0 2px; }
.k-row-right .k-chev { color: var(--k-ink-2); }
.k-prio { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 5px; font-size: 10.5px; font-weight: 700; }
.k-prio.urgent { background: var(--k-red-soft); color: var(--k-red); }
.k-prio.urgent::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--k-red); }
.k-prio.high { background: #e5eeff; color: var(--k-indigo-deep); }
.k-prio.normal { background: #e8edf6; color: var(--k-ink-2); }
.k-prio.medium { background: #e2dfff; color: #3323cc; }
.k-prio.low { background: #eef1f6; color: var(--k-muted); }
.k-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding-left: 28px; font-size: 11.5px; color: var(--k-ink-2); }
.k-row-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.k-row-meta .material-symbols-outlined { font-size: 14px; color: var(--k-muted); }
.k-proj { font-weight: 600; }
.k-proj.blue { color: #4f46e5; } .k-proj.lilac { color: #6d28d9; } .k-proj.mint { color: #047857; } .k-proj.coral { color: #be123c; }
.k-due.today, .k-due.today .material-symbols-outlined { color: var(--k-red); font-weight: 600; }
.k-due.overdue, .k-due.overdue .material-symbols-outlined { color: var(--k-red); }
.k-row-meta .k-sep { color: #c7c4d8; }
.k-add-row { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 40px; margin: 0 0 8px; padding: 0 14px; border: 1px solid var(--k-border); border-radius: 10px; background: #fff; color: var(--k-ink-2); font-size: 12.5px; cursor: pointer; }
.k-add-row:hover { border-color: var(--k-indigo); color: var(--k-indigo); }
.k-add-row > span { display: inline-flex; align-items: center; gap: 8px; }
.k-add-row .material-symbols-outlined { color: var(--k-indigo); }
.k-add-row kbd { padding: 1px 6px; border: 1px solid var(--k-border); border-radius: 4px; background: var(--k-bg); color: var(--k-muted); font: inherit; font-size: 10px; }

/* ---------- Detail panel ---------- */
.k-detail-col .modal-backdrop.detail-backdrop { position: static; display: block; inset: auto; padding: 0; background: none; backdrop-filter: none; z-index: auto; }
.k-detail-col .modal-backdrop.detail-backdrop[hidden] { display: none; }
.k-detail.detail-modal { width: 100%; max-width: none; height: auto; max-height: calc(100vh - 96px); overflow-y: auto; padding: 0; margin: 0; background: #fff; border: 1px solid var(--k-border); border-radius: 14px; box-shadow: var(--k-shadow-lg); animation: none; transform: none; }
.k-detail form#detailForm { padding: 0 18px; }
.k-detail-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 -18px; padding: 12px 14px 10px 18px; background: #fff; }
.k-detail-pills { display: flex; gap: 6px; }
.k-detail-tools { display: flex; gap: 0; }
.k-pill-select { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 8px; border-radius: 7px; font-size: 12px; font-weight: 700; cursor: pointer; }
.k-pill-select select { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; outline: none; cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 2px; }
.k-pill-status { background: #dce9ff; color: var(--k-indigo-deep); }
.k-pill-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--k-indigo); }
.k-pill-priority { background: var(--k-red-soft); color: var(--k-red); border: 1px solid #ffb2b7; }
.k-pill-priority .material-symbols-outlined { font-size: 15px; }
.k-pill-priority.p-high { background: #e5eeff; color: var(--k-indigo-deep); border-color: #c3c0ff; }
.k-pill-priority.p-normal, .k-pill-priority.p-low { background: #eef1f6; color: var(--k-ink-2); border-color: var(--k-border); }
.k-detail-title { display: block; width: 100%; margin: 6px 0 14px; padding: 0; border: 0; background: transparent; resize: none; overflow: hidden; field-sizing: content; min-height: 1.2em; font: inherit; font-size: 24px; line-height: 1.22; font-weight: 700; letter-spacing: -.02em; color: var(--k-ink); outline: none; }
.k-detail-title:focus { background: var(--k-indigo-softer); border-radius: 6px; }
.k-props { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; margin-bottom: 16px; background: #f8f9ff; border: 1px solid var(--k-border); border-radius: 10px; }
.k-prop { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 32px; font-size: 12.5px; }
.k-prop-key { display: flex; align-items: center; gap: 6px; color: var(--k-ink-2); }
.k-prop-key .material-symbols-outlined { font-size: 16px; color: var(--k-muted); }
.k-prop-val { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--k-ink); font-weight: 600; }
.k-prop-val select, .k-prop-val input { min-width: 0; flex: 1; height: 28px; padding: 0 4px; border: 1px solid transparent; border-radius: 6px; background: transparent; font: inherit; font-weight: 600; color: inherit; outline: none; cursor: pointer; }
.k-prop-val select:hover, .k-prop-val input:hover, .k-prop-val select:focus, .k-prop-val input:focus { border-color: var(--k-border-strong); background: #fff; }
.k-due-val { color: #bf0f3c; }
.k-due-val .material-symbols-outlined { font-size: 15px; }
.k-project-val { color: var(--k-indigo-deep); }
.k-project-val i { width: 7px; height: 7px; border-radius: 50%; background: var(--k-indigo); }
.k-block-label { display: block; margin: 0 0 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .07em; color: var(--k-ink-2); }
.k-desc { display: block; width: 100%; min-height: 96px; padding: 10px 12px; border: 1px solid var(--k-border); border-radius: 10px; background: #f8f9ff; font: inherit; font-size: 13px; line-height: 1.6; color: var(--k-ink-2); resize: vertical; outline: none; field-sizing: content; }
.k-desc:focus { border-color: var(--k-indigo); background: #fff; }
.k-save-row { display: flex; justify-content: flex-end; padding: 10px 0 4px; }
.k-section { margin: 0; padding: 14px 18px; border-top: 1px solid var(--k-border); }
.k-sub-head { display: flex; align-items: center; justify-content: space-between; }
.k-sub-pct { font-size: 11px; font-weight: 700; color: var(--k-green); }
.detail-callout { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: rgba(220, 233, 255, 0.6); color: #3525cd; font-size: 12px; font-weight: 500; line-height: 1.4; margin-top: 8px; }
.detail-callout .material-symbols-outlined { font-size: 16px; flex-shrink: 0; }
.detail-tags-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; }
.k-detail .subtask-progress { height: 5px; margin: 0 0 10px; border-radius: 99px; background: #e5eeff; overflow: hidden; }
.k-detail .subtask-progress i { display: block; height: 100%; width: var(--subtask-progress, 0%); border-radius: 99px; background: #006c49; }
.k-detail .subtask-row { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
.k-detail .subtask-check { width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0; padding: 0; border: 1.5px solid #9aa3c7; border-radius: 3px; background: #fff; color: #fff; font-size: 10px; display: grid; place-items: center; cursor: pointer; }
.k-detail .subtask-check.is-done { background: #006c49; border-color: #006c49; }
.k-detail .subtask-title { font-size: 12.5px; line-height: 1.45; color: var(--k-ink); }
.k-detail .subtask-title.is-done { color: var(--k-muted); text-decoration: line-through; }
.k-detail .detail-empty, .k-detail .comments-empty { margin: 0 0 6px; font-size: 12px; color: var(--k-muted); }
.k-sub-form { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--k-indigo); }
.k-sub-form input { flex: 1; height: 28px; border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--k-ink); outline: none; }
.k-sub-form input::placeholder { color: var(--k-indigo); }
.k-attach { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 7px 12px; border: 1px dashed var(--k-border-strong); border-radius: 8px; color: var(--k-indigo); font-size: 12px; font-weight: 600; cursor: pointer; }
.k-attach small { color: var(--k-muted); font-weight: 500; }
.k-detail .attachment-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 6px; border: 1px solid var(--k-border); border-radius: 10px; background: #f8f9ff; transition: background 0.15s; }
.k-detail .attachment-row:hover { background: #eff4ff; }
.k-detail .attachment-icon { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; background: #ffdadb; color: #95002b; font-size: 12px; flex-shrink: 0; }
.k-detail .attachment-copy { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 12px; }
.k-detail .attachment-copy strong { font-weight: 600; color: #0b1c30; }
.k-detail .attachment-copy small { color: var(--k-muted); font-size: 11px; }
.k-detail .attachment-row button { border: 0; background: none; cursor: pointer; color: var(--k-ink-2); padding: 4px; border-radius: 4px; }
.k-detail .attachment-row button:hover { background: #e5eeff; color: #3525cd; }
.k-detail .comment-list { max-height: none; margin: 0; }
.k-detail .comment-item { display: grid; grid-template-columns: 24px 1fr; gap: 8px; margin-bottom: 10px; }
.k-detail .comment-item .avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--k-indigo-deep); color: #fff; display: grid; place-items: center; font-size: 9.5px; font-style: normal; font-weight: 700; }
.k-detail .comment-item p { margin: 3px 0 0; padding: 8px 10px; border-radius: 8px; background: #f8f9ff; font-size: 12px; color: var(--k-ink-2); }
.k-comment-form { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; }
.k-comment-form textarea { flex: 1; min-height: 34px; padding: 8px 10px; border: 1px solid var(--k-border); border-radius: 8px; font: inherit; font-size: 12px; resize: none; outline: none; field-sizing: content; }
.k-comment-form textarea:focus { border-color: var(--k-indigo); }
.k-comment-form button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--k-indigo); color: #fff; display: grid; place-items: center; cursor: pointer; }
.k-detail .activity-row { display: flex; gap: 8px; padding: 4px 0; font-size: 11.5px; color: var(--k-muted); }
.k-detail .activity-row > i { width: 6px; height: 6px; margin-top: 6px; border-radius: 50%; background: #c7c4d8; flex-shrink: 0; }
.k-detail .activity-row p { margin: 0; color: var(--k-ink-2); }
.k-detail .activity-row small, .k-detail .activity-row time { display: block; font-size: 11px; }
.k-advanced summary { list-style: none; cursor: pointer; margin: 0; }
.k-advanced summary::-webkit-details-marker { display: none; }
.k-advanced .detail-approval-request { display: grid; gap: 8px; margin: 10px 0; }
.k-advanced label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--k-ink-2); }
.k-advanced select, .k-advanced input { height: 30px; padding: 0 8px; border: 1px solid var(--k-border); border-radius: 6px; font: inherit; font-size: 12px; }
.k-advanced .task-workflow-details form { display: grid; gap: 6px; margin: 6px 0 12px; }
.k-advanced .task-workflow-details button { height: 30px; border: 0; border-radius: 6px; background: var(--k-indigo-soft); color: var(--k-indigo-deep); font-weight: 600; font-size: 12px; cursor: pointer; }
.k-advanced .comments-heading h3 { font-size: 11px; letter-spacing: .06em; }

/* Home: hide legacy blocks not in Stitch */
.k-content > #homeOverview, .k-content > #homeWidgets, .k-content > .page-footer { display: none !important; }

/* Board view inside new layout */
.k-list-col .board-view { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .work-grid.k-grid { grid-template-columns: minmax(0, 1fr) 340px; }
  .k-quick-search input { width: 170px; }
}
@media (max-width: 1023px) {
  .work-grid.k-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .k-detail-col { position: static; }
  .k-detail-col .modal-backdrop.detail-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; background: rgba(15, 23, 42, .35); }
  .k-detail.detail-modal { width: min(100%, 460px); max-height: none; height: 100vh; border-radius: 0; }
  .summary-grid.k-stats { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .k-sidebar { transform: translateX(-100%); transition: transform .2s; }
  body.sidebar-open .k-sidebar { transform: none; box-shadow: var(--k-shadow-lg); }
  .k-main { margin-left: 0; }
  .k-mobile-menu { display: grid; }
  .k-crumbs span, .k-crumbs i, .k-btn-outline, .k-btn-share, .k-quick-search { display: none; }
  .page-content.k-page { padding: 16px 14px 80px; }
}

/* ---------- Phase 4: Web Launch, Touch Workflows, Onboarding & Public Landing ---------- */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(11, 28, 48, 0.42);
  backdrop-filter: blur(2px);
}
.sidebar-backdrop[hidden] { display: none !important; }

.onboarding-banner {
  background: linear-gradient(90deg, #f8f9ff 0%, #eff4ff 100%);
  border-bottom: 1px solid #e2e8f0;
}
.onboarding-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.onboarding-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.onboarding-steps-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.onboarding-step {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #464555;
}
.onboarding-step.is-done {
  background: rgba(111, 251, 190, 0.25);
  border-color: #4edea3;
  color: #006c49;
}
.onboarding-step.is-pending {
  cursor: pointer;
  color: #3525cd;
  border-color: #c3c0ff;
  background: #f8f9ff;
}
.onboarding-step.is-pending:hover {
  background: #e5eeff;
}

/* Touchscreen-friendly Board & Calendar Controls (Works without Drag & Drop) */
.kanban-touch-moves,
.calendar-touch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
}
.touch-chip-btn {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8f9ff;
  color: #3525cd;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.touch-chip-btn:hover,
.touch-chip-btn:active {
  background: #e5eeff;
  border-color: #4f46e5;
}
.calendar-agenda-item {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 8px;
}
.calendar-agenda-item .calendar-agenda-task {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

/* Public Landing, Pricing, Beta, Legal & Support */
.public-topbar {
  width: min(1120px, 100%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.public-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.public-nav-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.85);
  color: #0b1c30;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.public-nav-btn.active,
.public-nav-btn:hover {
  background: #e5eeff;
  border-color: #4f46e5;
  color: #3525cd;
}
.auth-landing-layout {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
}
.public-hero-pitch {
  padding: 12px 4px;
}
.public-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e5eeff;
  color: #3525cd;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.public-hero-title {
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.18;
  font-weight: 800;
  color: #0b1c30;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.public-hero-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #464555;
  margin: 0 0 16px;
}
.public-feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.public-feature-pills span {
  padding: 5px 11px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  color: #0b1c30;
}
.public-info-panel {
  width: min(1120px, 100%);
  margin-top: 20px;
  padding: 22px 24px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 12px 32px rgba(11, 28, 48, 0.08);
}
.public-info-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.public-info-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 800;
  color: #0b1c30;
}
.public-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8f9ff;
  font-size: 18px;
  cursor: pointer;
}
.public-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.public-price-card {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8f9ff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.public-price-card.featured {
  background: #ffffff;
  border: 2px solid #4f46e5;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}
.price-badge {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 99px;
  background: #e2e8f0;
  color: #464555;
  font-size: 10px;
  font-weight: 800;
}
.price-badge.featured {
  background: #e5eeff;
  color: #3525cd;
}
.price-amount {
  font-size: 22px;
  font-weight: 800;
  color: #0b1c30;
}
.price-amount small {
  font-size: 12px;
  font-weight: 500;
  color: #777587;
}
.public-price-card ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: #0b1c30;
  display: grid;
  gap: 4px;
}
.public-form {
  display: grid;
  gap: 10px;
}
.public-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.public-form input,
.public-form select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font: inherit;
  font-size: 13px;
}
.public-submit-btn {
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  border: 0;
  background: #4f46e5;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  justify-self: start;
}
.public-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.public-link-btn {
  border: 0;
  background: none;
  color: #3525cd;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.public-link-btn:hover { text-decoration: underline; }

/* Tablet & Mobile Responsive Polish */
@media (max-width: 1024px) {
  .auth-landing-layout {
    grid-template-columns: 1fr;
  }
  .public-pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .k-list-col .board-view {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
  }
  .k-list-col .board-view .board-column {
    min-width: 270px;
    flex: 0 0 270px;
    scroll-snap-align: start;
  }
}
@media (max-width: 640px) {
  .public-pricing-grid,
  .public-form-grid {
    grid-template-columns: 1fr;
  }
  .topbar.k-topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .top-actions #searchOpen {
    width: 130px;
  }
  .top-actions #shareBtn span[data-i18n],
  .top-actions #topFilterBtn span[data-i18n] {
    display: none;
  }
}

/* Universal .hidden utility */
.hidden {
  display: none !important;
}

@media (max-width: 480px) {
  .topbar.k-topbar {
    padding: 0 10px !important;
    gap: 6px !important;
    height: 52px !important;
    overflow: hidden;
  }
  .breadcrumbs {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    max-width: 120px !important;
    overflow: hidden !important;
  }
  .breadcrumbs span:not(#crumbTitle),
  .breadcrumbs .crumb-slash {
    display: none !important;
  }
  #crumbTitle {
    display: block !important;
    max-width: 110px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 13px !important;
  }
  .top-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: auto !important;
  }
  .top-actions .relative:has(#searchOpen),
  .top-actions #searchOpen {
    display: none !important;
  }
  #topFilterBtn,
  #shareBtn {
    display: none !important;
  }
  .lang-switcher {
    padding: 1px !important;
  }
  .lang-btn {
    height: 26px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
  }
  .view-tools {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
  }
  .view-toggle {
    display: inline-flex !important;
    align-items: center !important;
    height: 34px !important;
  }
  .view-tab {
    width: auto !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }
  #workTitle {
    display: none !important;
  }
  .toast {
    bottom: 74px !important;
    max-width: calc(100% - 24px) !important;
  }
}


