/* ══════════════════════════════════════════════════════════
   Ducima Analytics — TaskFlow Pro v10
   ══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #f4f5f7;
  --surface:     #ffffff;
  --border:      #e8eaed;
  --text:        #1a1d23;
  --text-secondary: #4b5263;
  --text-muted:  #9aa0ad;
  --orange:      #f97316;
  --orange-hover:#ea6c0a;
  --orange-light:#fff4ed;
  --blue:        #3b82f6;
  --blue-light:  #eff6ff;
  --green:       #22c55e;
  --green-light: #f0fdf4;
  --red:         #ef4444;
  --red-light:   #fef2f2;
  --yellow:      #f59e0b;
  --yellow-light:#fffbeb;
  --purple:      #8b5cf6;
  --sidebar-w:   240px;
  --topbar-h:    52px;
  --radius:      3px;
  --radius-lg:   4px;
  --shadow:      0 2px 8px rgba(0,0,0,.08);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.13);
  --font: 'Inter', system-ui, sans-serif;
}

body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── App shell ────────────────────────────────────────────── */
.app-shell { display: flex; height: 100vh; overflow: hidden; }
.main-area { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.main-content { flex: 1; }

/* ── Mobile topbar ───────────────────────────────────────── */
.mobile-topbar { display: none; position: fixed; top:0; left:0; right:0; height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--border); z-index: 200; align-items: center; padding: 0 1rem; gap: .75rem; }
.mobile-menu-btn { background: none; border: none; display: flex; flex-direction: column; gap: 5px; padding: 6px; cursor: pointer; }
.mobile-menu-btn span { display: block; width: 20px; height: 2px; background: var(--text-secondary); border-radius: 2px; }
.mobile-logout { color: var(--text-muted); font-size: 1.1rem; margin-left: auto; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 299; }
.sidebar-overlay.active { display: block; }
.sidebar { width: var(--sidebar-w); min-width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; padding: 1.25rem 1.25rem 1rem; border-bottom: 1px solid var(--border); }
.sidebar-logo { width: 150px; height: auto; max-height: 48px; object-fit: contain; mix-blend-mode: multiply; }
.sidebar-close-btn { display: none; background: none; border: none; color: var(--text-muted); font-size: 1.1rem; margin-left: auto; padding: 4px; cursor: pointer; }
.sidebar-nav { padding: .75rem .75rem 0; }
.sidebar-nav-item { display: flex; align-items: center; gap: .65rem; padding: .58rem .75rem; border-radius: var(--radius); font-size: .875rem; font-weight: 500; color: var(--text-secondary); transition: background .12s, color .12s; }
.sidebar-nav-item:hover { background: var(--bg); color: var(--text); }
.sidebar-nav-item.active { background: var(--orange-light); color: var(--orange); font-weight: 600; }
.nav-icon { font-size: 1rem; width: 18px; text-align: center; flex-shrink: 0; }
.sidebar-footer { margin-top: auto; padding: 1rem; border-top: 1px solid var(--border); display: flex; align-items: center; gap: .6rem; }
.user-avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-name-sm { display: block; font-weight: 600; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logout-btn { color: var(--text-muted); font-size: 1.1rem; padding: 4px; }
.logout-btn:hover { color: var(--red); }

/* ── Workspace ───────────────────────────────────────────── */
.workspace { padding: 1.75rem 2rem; max-width: 1400px; }
.workspace-header { margin-bottom: 1.5rem; }
.workspace-title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.workspace-title { font-size: 1.35rem; font-weight: 700; color: var(--text); }
.workspace-actions { display: flex; gap: .5rem; }

/* ── Role badges ─────────────────────────────────────────── */
.role-badge-sm { display: inline-block; padding: .2rem .6rem; border-radius: 20px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.role-analyst  { background: #eff6ff; color: #3b82f6; }
.role-manager  { background: var(--orange-light); color: var(--orange); }
.role-admin    { background: #faf5ff; color: #8b5cf6; }

/* ── Stat Cards ──────────────────────────────────────────── */
.stat-cards-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; cursor: pointer; transition: box-shadow .15s, transform .1s, border-color .15s; text-decoration: none; display: block; }
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-card.active-card { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,.12); }
.overdue-card.active-card { border-color: var(--red); box-shadow: 0 0 0 3px rgba(239,68,68,.12); }
.today-card.active-card   { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(245,158,11,.12); }
.future-card.active-card  { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.stat-card-value { font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-card-label { font-size: .78rem; color: var(--text-muted); font-weight: 600; margin-top: .3rem; text-transform: uppercase; letter-spacing: .05em; }
.overdue-card .stat-card-value { color: var(--red); }
.today-card   .stat-card-value { color: var(--yellow); }
.future-card  .stat-card-value { color: var(--blue); }
.done-card    .stat-card-value { color: var(--green); }

/* ── Report Cards ────────────────────────────────────────── */
.report-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.report-card-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); gap: 1rem; flex-wrap: wrap; }
.report-card-title { font-weight: 700; font-size: .95rem; color: var(--text); display: flex; align-items: center; gap: .5rem; }
.filter-active-badge { background: var(--orange-light); color: var(--orange); font-size: .75rem; font-weight: 600; padding: .2rem .55rem; border-radius: 20px; }

/* ── Bar Chart ───────────────────────────────────────────── */
.bar-toggle-group { display: flex; gap: 2px; background: #f3f4f6; border-radius: 8px; padding: 3px; }
.bar-toggle { font-size: .78rem; font-weight: 600; padding: .3rem .7rem; border-radius: 6px; color: #6b7280; transition: background .12s, color .12s; }
.bar-toggle:hover { color: var(--text); }
.bar-toggle.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.bar-chart-wrap { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .6rem; }
.bar-row { display: flex; align-items: center; gap: .75rem; }
.bar-label { width: 150px; font-size: .83rem; font-weight: 500; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.bar-track { flex: 1; background: #f3f4f6; border-radius: 20px; height: 10px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--orange), #fb923c); border-radius: 20px; transition: width .4s ease; min-width: 4px; }
.bar-count { width: 28px; font-size: .82rem; font-weight: 700; color: var(--text); text-align: right; flex-shrink: 0; }

/* ── Data Table ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table thead th { background: #f8f9fb; padding: .7rem 1rem; text-align: left; font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table thead th.sortable { cursor: pointer; user-select: none; }
.data-table thead th.sortable:hover { color: var(--text); }
.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: #f9fafb; }
.data-table tbody td { padding: .7rem 1rem; vertical-align: middle; }
.overdue-row td:first-child { border-left: 3px solid var(--red); }
.today-row  td:first-child { border-left: 3px solid var(--yellow); }
.empty-state { text-align: center; color: var(--text-muted); padding: 2rem !important; font-size: .9rem; }
.task-name-block strong { font-weight: 600; color: var(--text); }
.task-desc-sm { color: var(--text-muted); font-size: .78rem; margin-top: .15rem; }

/* ── Status & Priority Badges ────────────────────────────── */
.status-badge { display: inline-block; padding: .2rem .55rem; border-radius: 20px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.status-to-do       { background: #f3f4f6; color: #6b7280; }
.status-in-progress { background: var(--blue-light); color: var(--blue); }
.status-in-review   { background: var(--yellow-light); color: #b45309; }
.status-done        { background: var(--green-light); color: #15803d; }
.priority-badge { display: inline-block; padding: .18rem .5rem; border-radius: 5px; font-size: .72rem; font-weight: 700; }
.priority-low      { background: var(--green-light); color: #15803d; }
.priority-medium   { background: var(--blue-light);  color: var(--blue); }
.priority-high     { background: var(--yellow-light); color: #b45309; }
.priority-critical { background: var(--red-light);   color: var(--red); }

/* Due flags */
.due-flag { display: inline-block; font-size: .68rem; font-weight: 700; padding: .12rem .4rem; border-radius: 4px; margin-left: .35rem; background: var(--red-light); color: var(--red); }
.due-flag.today { background: var(--yellow-light); color: #b45309; }
.text-danger  { color: var(--red) !important; }
.text-warning { color: #b45309 !important; }

/* Assignee chip */
.assignee-chip { display: flex; align-items: center; gap: .4rem; }
.mini-avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; flex-shrink: 0; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary { background: var(--orange); color: #fff; border: none; padding: .55rem 1rem; border-radius: var(--radius); font-size: .875rem; font-weight: 600; transition: background .15s; }
.btn-primary:hover { background: var(--orange-hover); }
.btn-ghost { background: none; border: 1px solid var(--border); color: var(--text-secondary); padding: .52rem 1rem; border-radius: var(--radius); font-size: .875rem; font-weight: 600; transition: background .12s; }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: .3rem .65rem; border-radius: 6px; font-size: .78rem; font-weight: 600; border: none; }
.btn-outline { border: 1px solid var(--border); background: transparent; color: var(--text-secondary); }
.btn-outline:hover { background: var(--bg); }
.btn-danger { background: var(--red-light); color: var(--red); }
.btn-danger:hover { background: #fecaca; }

/* ── Filters ─────────────────────────────────────────────── */
.filters-inline { display: flex; gap: .4rem; flex-wrap: wrap; }
.filter-select { padding: .4rem .65rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .82rem; color: var(--text); background: var(--surface); outline: none; cursor: pointer; }
.filter-select:focus { border-color: var(--orange); }
.filter-input { padding: .4rem .65rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .82rem; color: var(--text); background: var(--surface); outline: none; }
.filter-input:focus { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(249,115,22,.1); }
.status-quick-select { padding: .25rem .45rem; border: 1px solid var(--border); border-radius: 6px; font-size: .75rem; background: var(--surface); color: var(--text); cursor: pointer; }

/* ── Flash messages ──────────────────────────────────────── */
.flash-container { padding: .75rem 2rem 0; }
.flash { padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: .5rem; font-size: .84rem; font-weight: 500; }
.flash-success { background: var(--green-light); color: #15803d; border: 1px solid #bbf7d0; }
.flash-danger  { background: var(--red-light);   color: #b91c1c; border: 1px solid #fecaca; }
.flash-info    { background: var(--blue-light);  color: #1d4ed8; border: 1px solid #bfdbfe; }
.flash-warning { background: var(--yellow-light); color: #92400e; border: 1px solid #fde68a; }

/* ── Modals ──────────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 500; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 1.05rem; font-weight: 700; }
.modal-header button { background: none; border: none; font-size: 1.2rem; color: var(--text-muted); }
.modal-form { padding: 1.25rem 1.5rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.form-group { display: flex; flex-direction: column; gap: .3rem; }
.form-group.span-2 { grid-column: 1 / -1; }
.form-group label { font-size: .78rem; font-weight: 600; color: var(--text-secondary); }
.form-group input, .form-group select, .form-group textarea { padding: .6rem .75rem; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: .875rem; color: var(--text); background: #fafafa; outline: none; transition: border-color .12s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--orange); background: #fff; box-shadow: 0 0 0 3px rgba(249,115,22,.1); }
.modal-footer { display: flex; justify-content: flex-end; gap: .5rem; padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: #fafafa; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ── Side Panel ──────────────────────────────────────────── */
.side-panel-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 400; }
.side-panel-overlay.active { display: block; }
.side-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; background: var(--surface); border-left: 1px solid var(--border); box-shadow: -4px 0 24px rgba(0,0,0,.1); transform: translateX(100%); transition: transform .25s ease; z-index: 401; overflow-y: auto; display: flex; flex-direction: column; }
.side-panel.open { transform: translateX(0); }
.side-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.side-panel-title { font-weight: 700; font-size: .95rem; max-width: 300px; }
.side-panel-close { background: none; border: none; font-size: 1.2rem; color: var(--text-muted); padding: 4px; }
.side-panel-body { padding: 1.25rem; flex: 1; }
.panel-meta-grid { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.25rem; }
.panel-meta-row { display: flex; align-items: center; gap: .6rem; font-size: .875rem; }
.meta-lbl { width: 80px; font-size: .72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0; }
.panel-section { margin-bottom: 1.25rem; }
.panel-section-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .6rem; }
.comment-textarea { width: 100%; padding: .6rem .75rem; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: .875rem; resize: vertical; outline: none; background: #fafafa; }
.comment-textarea:focus { border-color: var(--orange); }
.comment-item { background: var(--bg); border-radius: var(--radius); padding: .6rem .8rem; margin-bottom: .5rem; }
.comment-meta { display: flex; justify-content: space-between; font-size: .72rem; color: var(--text-muted); margin-bottom: .3rem; }
.comment-meta strong { color: var(--text); }
.comment-body { font-size: .85rem; line-height: 1.5; }
.drive-link-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .83rem; color: var(--blue); background: var(--blue-light); padding: .3rem .7rem; border-radius: 20px; margin-bottom: .5rem; }

/* ── Admin inline form ───────────────────────────────────── */
.inline-add-form { display: flex; gap: .4rem; align-items: center; padding: .75rem 1.25rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }

/* ── Auth pages ──────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; }
.auth-left { width: 46%; background: #f0ece4; display: flex; flex-direction: column; justify-content: center; padding: 3.5rem 4rem; }
.auth-logo { max-width: 200px; width: 100%; height: auto; margin-bottom: 1.75rem; mix-blend-mode: multiply; }
.auth-tagline { font-size: .9rem; color: #4b5563; line-height: 1.7; margin-bottom: 2rem; max-width: 280px; }
.auth-features { display: flex; flex-direction: column; gap: .85rem; }
.auth-feature-item { display: flex; align-items: center; gap: .85rem; color: #374151; font-size: .875rem; }
.auth-feature-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.auth-feature-icon.green  { background: rgba(20,83,45,.1); }
.auth-feature-icon.gray   { background: rgba(31,41,55,.1); }
.auth-feature-icon.blue   { background: rgba(30,58,95,.1); }
.auth-feature-icon.yellow { background: rgba(180,83,9,.1); }
.auth-right { flex: 1; background: #fff; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-card { background: #fff; border-radius: 18px; box-shadow: 0 2px 40px rgba(0,0,0,.09); padding: 2.5rem 2.25rem; width: 100%; max-width: 400px; }
.auth-tabs { display: flex; background: #f3f4f6; border-radius: 10px; padding: 4px; margin-bottom: 1.75rem; gap: 2px; }
.auth-tab { flex: 1; text-align: center; padding: .55rem .5rem; border-radius: 7px; font-size: .875rem; font-weight: 600; color: #6b7280; cursor: pointer; transition: background .15s, color .15s; background: none; border: none; }
.auth-tab.active { background: #fff; color: #111; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.auth-form { display: flex; flex-direction: column; gap: .9rem; }
.auth-form .form-group { display: flex; flex-direction: column; gap: .3rem; }
.auth-form label { font-size: .8rem; font-weight: 600; color: #374151; }
.auth-form input { width: 100%; padding: .7rem .9rem; border: 1.5px solid #e5e7eb; border-radius: 9px; font-size: .9rem; color: #111; outline: none; background: #fafafa; transition: border-color .15s; }
.auth-form input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,.1); background: #fff; }
.auth-btn { width: 100%; background: var(--orange); color: #fff; border: none; padding: .82rem; border-radius: 9px; font-size: .95rem; font-weight: 700; cursor: pointer; margin-top: .25rem; transition: background .15s; }
.auth-btn:hover { background: var(--orange-hover); }
.auth-helper { text-align: center; font-size: .8rem; color: #9ca3af; margin-top: 1rem; }
.auth-helper a { color: var(--orange); font-weight: 600; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .stat-cards-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .mobile-topbar { display: flex; }
  .app-shell { padding-top: var(--topbar-h); height: auto; min-height: 100vh; overflow: visible; }
  .main-area { overflow: visible; }
  .sidebar { position: fixed; top:0; left:0; bottom:0; width: 260px; transform: translateX(-100%); transition: transform .25s ease; z-index: 300; box-shadow: 4px 0 24px rgba(0,0,0,.15); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close-btn { display: block; }
  .workspace { padding: 1rem; }
  .workspace-title-row { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .auth-left { display: none; }
  .auth-right { flex: 1; }
  .side-panel { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.span-2 { grid-column: 1; }
  .report-card-header { flex-direction: column; align-items: flex-start; }
  .bar-label { width: 100px; }
}
@media (max-width: 480px) {
  .stat-cards-row { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .stat-card { padding: .9rem 1rem; }
  .stat-card-value { font-size: 1.6rem; }
  .auth-card { padding: 2rem 1.25rem; }
}

/* ── Agency/Client sidebar hierarchy ──────────────────────── */
.sidebar-agency-item { margin-bottom: .15rem; }
.sidebar-agency-label {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem .75rem .25rem .75rem;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted);
}
.agency-name { flex: 1; }
.sidebar-clients { list-style: none; padding: 0; margin: 0 0 .4rem 0; }
.sidebar-client-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .35rem .75rem .35rem .75rem;
  font-size: .83rem; color: var(--text-secondary);
  text-decoration: none; border-radius: var(--radius);
  transition: background .12s, color .12s;
}
.sidebar-client-item:hover { background: var(--surface-hover); color: var(--text); }
.sidebar-client-item.active { background: rgba(249,115,22,.1); color: var(--orange); font-weight: 600; }
.client-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border); flex-shrink: 0;
}
.sidebar-client-item.active .client-dot { background: var(--orange); }

/* ── New status badge colours ─────────────────────────────── */
.status-build-qc           { background: #ede9fe; color: #6d28d9; }
.status-need-to-traffic    { background: #fef3c7; color: #b45309; }
.status-feedback-sent-to-client { background: #d1fae5; color: #065f46; }
.status-hold               { background: #fee2e2; color: #991b1b; }
.status-follow-up          { background: #e0f2fe; color: #0369a1; }

/* ── Two-pane layout (restore from v9) ───────────────────── */
.two-pane { display: flex; gap: 0; position: relative; }
.task-list-pane { flex: 1; min-width: 0; transition: flex .2s; }
.detail-panel {
  flex: 1; min-width: 0;
  border-left: 1px solid var(--border);
  background: var(--surface);
  overflow-y: auto;
  height: calc(100vh - 120px);
  position: sticky; top: 0;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.two-pane.has-detail .task-list-pane { flex: 1; min-width: 0; max-width: 50%; }
.detail-panel-empty { display: none !important; }
.detail-panel-header {
  padding: 1.25rem 1.25rem .75rem;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface);
  z-index: 2;
}
.detail-panel-title-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.detail-panel-title { font-size: 1rem; font-weight: 700; flex: 1; margin: 0; }
.panel-close-btn {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; font-size: 1.1rem;
  color: var(--text-muted); cursor: pointer; padding: 4px 6px;
  border-radius: var(--radius);
}
.panel-close-btn:hover { background: var(--surface-hover); color: var(--text); }
.detail-panel-body { padding: 1.25rem; }
.detail-meta-grid { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.meta-row { display: flex; align-items: flex-start; gap: .5rem; font-size: .875rem; }
.meta-val { color: var(--text); }
.detail-desc-block { margin-bottom: 1rem; }
.detail-desc-text { font-size: .875rem; color: var(--text-secondary); line-height: 1.6; margin: .35rem 0 0; }
.detail-status-block { margin-bottom: 1rem; }
.status-select-inline {
  padding: .45rem .65rem; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: .82rem; background: #fafafa;
}
.drive-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .83rem; color: var(--blue); background: var(--blue-light);
  padding: .3rem .75rem; border-radius: 20px; text-decoration: none;
  margin-bottom: .75rem;
}
.comments-section { margin-top: 1rem; }
.comments-heading { font-size: .85rem; font-weight: 700; margin-bottom: .75rem; display: flex; align-items: center; gap: .4rem; }
.comment-pill { background: var(--orange); color: #fff; font-size: .7rem; padding: 1px 7px; border-radius: 20px; }
.comments-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.comment-item { display: flex; gap: .6rem; }
.comment-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; flex-shrink: 0;
}
.you-av { background: #6d28d9; }
.comment-body { flex: 1; }
.comment-meta { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-bottom: .2rem; }
.comment-author { font-size: .8rem; font-weight: 700; }
.comment-role-tag { font-size: .68rem; padding: 1px 6px; border-radius: 4px; background: var(--bg); color: var(--text-muted); }
.comment-time { font-size: .72rem; color: var(--text-muted); }
.comment-text { font-size: .85rem; color: var(--text); line-height: 1.5; }
.no-comments-text { font-size: .83rem; color: var(--text-muted); text-align: center; padding: .5rem 0; }
.add-comment-row { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-inline { flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.comment-textarea {
  width: 100%; padding: .5rem .65rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: .85rem; resize: vertical; outline: none; background: #fafafa;
  font-family: inherit;
}
.comment-textarea:focus { border-color: var(--orange); background: #fff; }
.btn-sm-primary {
  background: var(--orange); color: #fff; border: none;
  padding: .35rem .85rem; border-radius: var(--radius);
  font-size: .8rem; font-weight: 600; cursor: pointer; align-self: flex-end;
}
.btn-sm-primary:hover { background: var(--orange-hover); }
.comment-pip { font-size: .72rem; color: var(--text-muted); margin-left: .35rem; }
.task-row { cursor: pointer; }
.row-active { background: rgba(249,115,22,.07) !important; }

/* done-card stat */
.done-card { --card-color: #6d28d9; }
.done-card .stat-card-value { color: #6d28d9; }

@media (max-width: 900px) {
  .detail-panel { display: none; }
  .two-pane.has-detail .detail-panel { display: block; width: 100%; position: fixed; top: 0; right: 0; bottom: 0; border-radius: 0; z-index: 300; box-shadow: -4px 0 24px rgba(0,0,0,.15); }
}

/* ══════════════════════════════════════════════════════════════
   COLLAPSIBLE AGENCY SIDEBAR
   ══════════════════════════════════════════════════════════════ */

.sidebar-agency-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  background: none;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: background .12s, color .12s;
}
.sidebar-agency-toggle:hover { background: var(--bg); color: var(--text); }

.agency-arrow {
  margin-left: auto;
  flex-shrink: 0;
  transition: transform .2s ease;
  color: var(--text-muted);
}
.sidebar-agency-toggle[aria-expanded="false"] .agency-arrow,
.sidebar-agency-toggle.collapsed .agency-arrow {
  transform: rotate(-90deg);
}

.sidebar-clients {
  list-style: none;
  padding-left: 1.25rem;
  margin-bottom: 0.25rem;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════
   TIME LOG BUTTON (status quick-change)
   ══════════════════════════════════════════════════════════════ */
.status-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.status-quick-btn:hover {
  background: var(--orange-light);
  border-color: var(--orange);
  color: var(--orange);
}

/* ══════════════════════════════════════════════════════════════
   TIME LOG MODAL — form-control inside modal
   ══════════════════════════════════════════════════════════════ */
.form-control {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .12s;
}
.form-control:focus { border-color: var(--orange); }

/* ══════════════════════════════════════════════════════════════
   TIME LOG MODAL — polished, spacious design
   ══════════════════════════════════════════════════════════════ */

.timelog-modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18), 0 4px 16px rgba(0,0,0,.08);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  animation: timelog-slide-in .2s ease;
}

@keyframes timelog-slide-in {
  from { opacity: 0; transform: translateY(-12px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── Header ── */
.timelog-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
  position: relative;
}

.timelog-modal-icon {
  width: 42px; height: 42px;
  background: var(--orange-light);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  border: 1px solid rgba(249,115,22,.2);
}

.timelog-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.2rem;
  line-height: 1.3;
}

.timelog-modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.timelog-close-btn {
  position: absolute;
  top: 1.1rem; right: 1.25rem;
  background: none; border: none;
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--text-muted);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.timelog-close-btn:hover {
  background: var(--red-light);
  color: var(--red);
}

/* ── Body ── */
.timelog-modal-body {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.timelog-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.timelog-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin: 0;
}

.timelog-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.timelog-optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ── Time row ── */
.timelog-time-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.timelog-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.timelog-divider {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-muted);
  padding-bottom: 0.55rem;
  flex-shrink: 0;
}

/* ── Selects & input ── */
.timelog-select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 0.9rem;
  color: var(--text);
  background: #fafafa;
  outline: none;
  cursor: pointer;
  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='%239aa0ad' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.2rem;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.timelog-select:focus {
  border-color: var(--orange);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}
.timelog-select-full { width: 100%; }

.timelog-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 0.9rem;
  color: var(--text);
  background: #fafafa;
  outline: none;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.timelog-input:focus {
  border-color: var(--orange);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}
.timelog-input::placeholder { color: var(--text-muted); }

/* ── Footer ── */
.timelog-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f0f0f0;
  margin-top: 0.25rem;
}

.timelog-btn-cancel {
  padding: 0.65rem 1.4rem;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.timelog-btn-cancel:hover {
  background: var(--bg);
  border-color: var(--border-mid);
}

.timelog-btn-save {
  padding: 0.65rem 1.6rem;
  background: var(--orange);
  border: none;
  border-radius: 9px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s, transform .1s;
  letter-spacing: 0.01em;
}
.timelog-btn-save:hover { background: var(--orange-hover); }
.timelog-btn-save:active { transform: scale(.98); }

/* ── Log Time trigger button (in detail panel & table) ── */
.btn-log-time {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s;
  white-space: nowrap;
}
.btn-log-time:hover { background: var(--orange-hover); }

/* ── Inline task update row ─────────────────────────────────────────────── */
.task-update-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
}
.update-select {
  height: 32px;
  padding: 0 .5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: .8rem;
  cursor: pointer;
  min-width: 110px;
}
.update-select-sm { min-width: 58px; }
.update-select:focus { outline: none; border-color: var(--orange); }

/* ── Comment pip circle ─────────────────────────────────────────────────── */
.comment-pip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .68rem;
  padding: 1px 6px;
  border-radius: 20px;
  margin-left: .35rem;
  white-space: nowrap;
}

/* ── Task history section ───────────────────────────────────────────────── */
.history-section { margin-bottom: 1.25rem; }
.history-list { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; }
.history-item {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .78rem;
}
.history-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
  margin-top: .25rem;
}
.history-body { display: flex; flex-direction: column; gap: .1rem; }
.history-action { color: var(--text-primary); }
.history-time { color: var(--text-muted); font-size: .72rem; }

/* ── Project view task table ────────────────────────────────────────────── */
.task-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.task-table thead th { background: #f8f9fb; padding: .7rem 1rem; text-align: left; font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.task-table tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; cursor: pointer; }
.task-table tbody tr:last-child { border-bottom: none; }
.task-table tbody tr:hover { background: #f9fafb; }
.task-table tbody tr.row-active { background: var(--orange-light, #fff5ee); }
.task-table tbody td { padding: .7rem 1rem; vertical-align: middle; }
.task-name-cell { max-width: 280px; }
.task-desc { color: var(--text-muted); font-size: .78rem; }
.date-cell { white-space: nowrap; font-size: .82rem; color: var(--text-muted); }
.row-actions { display: flex; gap: .25rem; }
@media (max-width: 640px) { .desktop-only { display: none; } }

/* ── Sidebar client task count badge ───────────────────────────────────── */
.project-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── People Picker ──────────────────────────────── */
.people-picker { position: relative; display: flex; flex-direction: column; gap: 4px; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 4px; min-height: 0; }
.pp-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: #ede9fe; color: #4f46e5; border-radius: 20px;
  padding: 2px 10px 2px 8px; font-size: 0.78rem; font-weight: 500;
}
.pp-chip button {
  background: none; border: none; cursor: pointer;
  color: #6366f1; font-size: 0.75rem; padding: 0; line-height: 1;
}
.pp-chip button:hover { color: #dc2626; }
.pp-search {
  width: 100%; border: 1.5px solid #e5e7eb; border-radius: 7px;
  padding: 0.5rem 0.85rem; font-size: 0.875rem; outline: none;
  font-family: inherit; background: #fff;
}
.pp-search:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.pp-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  z-index: 300; background: #fff;
  border: 1.5px solid #e5e7eb; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  max-height: 200px; overflow-y: auto;
}
.pp-option {
  padding: 0.5rem 0.85rem; font-size: 0.875rem; cursor: pointer;
  display: flex; align-items: center; gap: 8px; color: var(--text);
  transition: background .1s;
}
.pp-option:hover    { background: #f5f3ff; color: #4f46e5; }
.pp-option.pp-selected { background: #ede9fe; color: #4f46e5; font-weight: 600; }
.pp-option.pp-selected::after { content: '✓'; margin-left: auto; font-size: 0.8rem; }

/* Detail panel tabs */
.detail-tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 0.5rem 1rem; font-size: 0.82rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer; transition: all .15s;
}
.detail-tab:hover { color: var(--text); }
.detail-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ══════════════════════════════════════════════════════════════
   CHANGE 1 — Admin two-panel Agency→Client layout
   ══════════════════════════════════════════════════════════════ */
.admin-agency-client-panel {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.25rem;
  margin-top: 0;
  align-items: start;
}
.admin-agency-col,
.admin-client-col { margin-top: 0 !important; }

/* Agency list */
.agency-list {
  list-style: none;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 480px;
  overflow-y: auto;
}
.agency-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .12s, color .12s;
  gap: 0.5rem;
  border: 1px solid transparent;
}
.agency-list-item:hover { background: var(--bg); }
.agency-list-item.selected {
  background: var(--orange-light);
  border-color: rgba(249,115,22,.25);
}
.agency-list-info {
  display: flex; align-items: center; gap: 0.55rem; min-width: 0; flex: 1;
}
.agency-list-name {
  font-size: 0.875rem; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.agency-list-item.selected .agency-list-name { color: var(--orange); font-weight: 600; }
.agency-list-meta { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.agency-delete-btn {
  background: none; border: none; color: var(--text-muted); font-size: 0.78rem;
  padding: 2px 5px; border-radius: 4px; cursor: pointer; opacity: 0;
  transition: opacity .12s, color .12s, background .12s;
}
.agency-list-item:hover .agency-delete-btn { opacity: 1; }
.agency-delete-btn:hover { color: var(--red); background: var(--red-light); }

/* Sortable column headers */
.sortable {
  cursor: pointer; user-select: none;
  white-space: nowrap;
}
.sortable:hover { color: var(--orange); }

/* ══════════════════════════════════════════════════════════════
   CHANGE 4 — Total time badge in activity header
   ══════════════════════════════════════════════════════════════ */
.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.total-time-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: #dbeafe; color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 3px 10px; border-radius: 12px;
  font-size: 0.75rem; font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   CHANGE 5 — Inline comment edit
   ══════════════════════════════════════════════════════════════ */
.comment-edit-box {
  margin-top: 0.5rem;
}
.comment-edit-actions {
  display: flex; gap: 0.4rem; margin-top: 0.4rem; flex-wrap: wrap;
}
.comment-edit-actions .timelog-btn-cancel,
.comment-edit-actions .timelog-btn-save {
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  border-radius: 6px;
}
.comment-edit-actions .timelog-btn-cancel.danger {
  background: none;
  border: 1px solid var(--red);
  color: var(--red);
}
.comment-edit-actions .timelog-btn-cancel.danger:hover {
  background: var(--red-light);
}
.comment-actions {
  display: flex; gap: 0.5rem; margin-top: 0.35rem; flex-wrap: wrap;
}
.comment-action-btn {
  background: none; border: none;
  font-size: 0.75rem; color: var(--text-muted);
  cursor: pointer; padding: 0;
  transition: color .12s;
}
.comment-action-btn:hover { color: var(--orange); }
.comment-action-btn.danger:hover { color: var(--red); }
.comment-edited {
  font-size: 0.72rem; color: var(--text-muted);
  font-style: italic; margin-left: 0.25rem;
}

/* ══════════════════════════════════════════════════════════════
   CHANGE 6 — Pinned comment
   ══════════════════════════════════════════════════════════════ */
.comment-pinned {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.5rem;
  position: relative;
}
.pin-label {
  font-size: 0.7rem; font-weight: 700;
  color: #92400e;
  display: block;
  margin-bottom: 0.3rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── Timelog reassign section spacing ──────────────────────── */
.timelog-modal-body .timelog-section + .timelog-section {
  border-top: 1px solid #f3f4f6;
  padding-top: 1.1rem;
}

/* ── Responsive admin panel ────────────────────────────────── */
@media (max-width: 900px) {
  .admin-agency-client-panel { grid-template-columns: 1fr; }
  .agency-list { max-height: 260px; }
}

/* ══════════════════════════════════════════════════════════════
   Time Reporting Page
   ══════════════════════════════════════════════════════════════ */
.tr-tab-row { display: flex; gap: 2px; margin-bottom: 1rem; background: #f3f4f6; border-radius: 4px; padding: 3px; width: fit-content; }
.tr-tab { font-size: .82rem; font-weight: 600; padding: .35rem .85rem; border-radius: 3px; color: #6b7280; transition: background .12s, color .12s; }
.tr-tab:hover { color: var(--text); }
.tr-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.tr-filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }

/* ══════════════════════════════════════════════════════════════
   Comment toolbar (bullet points + @mention)
   ══════════════════════════════════════════════════════════════ */
.comment-toolbar { display: flex; gap: .4rem; margin-bottom: .35rem; }
.comment-tool-btn { background: #f3f4f6; border: 1px solid var(--border); border-radius: 3px; font-size: .75rem; color: var(--text-secondary); padding: .2rem .55rem; cursor: pointer; transition: background .12s, color .12s; }
.comment-tool-btn:hover { background: var(--bg); color: var(--text); }
.at-mention-wrap { position: relative; }
.at-mention-drop { position: absolute; top: 110%; left: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; box-shadow: var(--shadow-lg); min-width: 180px; z-index: 100; max-height: 200px; overflow-y: auto; }
.at-option { padding: .45rem .75rem; font-size: .83rem; cursor: pointer; color: var(--text); }
.at-option:hover { background: var(--bg); }

/* ══════════════════════════════════════════════════════════════
   Sidebar: no indent for client items
   ══════════════════════════════════════════════════════════════ */
.sidebar-clients { list-style: none; margin: 0; padding: 0; }
