/* ═══════════════════════════════════════════
   Toggl 2.0 Onboarding Prototype — Styles
   ═══════════════════════════════════════════

   Used by: onboarding-prototype.html (deployed as dist/index.html)

   CSS class prefixes:
     .ls-*    → left sidebar elements  (ls = left-sidebar)
     .wizard-*→ onboarding wizard overlay
     .cal-*   → calendar grid and controls
     .timer-* → timer bar above the calendar
     .tour-*  → guided tour tooltips
     .trial-* → reverse trial popup
     .task-*  → right-hand task panel
     .gs-*    → "get started" checklist (legacy, may be unused)

   Layout (4-column flex):
     left-sidebar | main-area (timer-bar + calendar-controls + calendar-grid) | task-panel

   Sidebar uses `ls-` prefix (not `sidebar-` used in styles.css / index.html)
   because these are separate pages with separate stylesheets.
   ═══════════════════════════════════════════ */

/* ───────── Reset & Variables ───────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:        #f6f6f6;
  --bg-card:   #ffffff;
  --bg-hover:  #f2f2f2;
  --bg-input:  #fbfbfb;
  --border:    #cacaca;
  --text:      #171717;
  --text-dim:  #8a8a8a;
  --accent:    #2e2e2e;
  --accent-dim: rgba(0,0,0,.07);
  --accent-dark: #171717;
  --red:       #8a8a8a;
  --green:     #5c5c5c;
  --yellow:    #7a7a7a;
  --pink:      #999;
  --radius:    8px;
  --radius-lg: 16px;
  --sidebar-w: 200px;
  --icon-strip-w: 44px;
  --topbar-h:  0px;
}
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow: hidden;
  padding-top: var(--topbar-h);
}
button { cursor: pointer; font-family: inherit; }
input  { font-family: inherit; }


/* ════════════════════════════════════════
   WIZARD OVERLAY
   ════════════════════════════════════════ */
.wizard-overlay {
  position: fixed; inset: 0;
  background: #f6f6f6; z-index: 9000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity .4s, transform .4s;
}
.wizard-overlay.hidden { opacity: 0; pointer-events: none; transform: translateY(20px); }

.wizard-brand {
  position: absolute; top: 32px; left: 40px;
  font-size: 1.8rem; font-weight: 800; letter-spacing: -.5px; color: var(--accent);
}


.wizard-skip {
  position: absolute; bottom: 24px; right: 40px;
  color: var(--text-dim); font-size: 1rem; background: none; border: none;
  text-decoration: underline; text-underline-offset: 3px;
}
.wizard-skip:hover { color: var(--text); }

.wizard-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 44px 56px 40px;
  max-width: 620px; width: 90%; text-align: center; position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
}
.wizard-card h2 { font-size: 1.65rem; font-weight: 700; margin-bottom: 8px; }
.wizard-card .subtitle { color: var(--text-dim); margin-bottom: 24px; font-size: 1rem; }

/* ── Progress bar ── */
.wizard-progress {
  height: 4px; background: var(--border); border-radius: 2px;
  margin-bottom: 8px; overflow: hidden;
}
.wizard-progress-fill {
  height: 100%; background: var(--accent); border-radius: 2px;
  transition: width .4s ease;
}
.wizard-step-label {
  font-size: .78rem; color: var(--text-dim); margin-bottom: 24px;
}

/* ── Goal cards (Step 1) ── */
.wizard-goal-cards {
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px;
  text-align: left;
}
.wizard-goal-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-input); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 13px 16px; color: var(--text); font-size: .98rem;
  transition: all .15s; cursor: pointer; position: relative;
}
.wizard-goal-card:hover { border-color: var(--accent); background: var(--bg-hover); }
.wizard-goal-card.selected {
  border-color: var(--accent); background: var(--accent-dim);
}
.wizard-goal-card .goal-label { flex: 1; font-weight: 500; }
.wizard-goal-card .goal-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border); flex-shrink: 0;
  transition: all .15s;
}
.wizard-goal-card.selected .goal-check {
  border-color: var(--accent); background: var(--accent);
}

/* Other field */
.wizard-other-field { margin-bottom: 24px; }
.wizard-other-field input {
  width: 100%; background: var(--bg-input); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 13px 16px; color: var(--text);
  font-size: .98rem; outline: none; transition: border-color .15s;
}
.wizard-other-field input::placeholder { color: var(--text-dim); }
.wizard-other-field input:focus { border-color: var(--accent); }

/* ── Pills (Step 2) ── */
.wizard-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.wizard-pill {
  background: transparent; border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 13px 24px; color: var(--text); font-size: 1rem; transition: all .15s;
  text-align: left;
}
.wizard-pill:hover { border-color: var(--accent); background: var(--accent-dim); }
.wizard-pill.selected { border-color: var(--accent); background: var(--accent-dim); color: var(--text); font-weight: 600; }

/* ── Industry chips (Step 3) ── */
.wizard-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.wizard-chip {
  background: transparent; border: 1.5px solid var(--border); border-radius: 20px;
  padding: 9px 18px; color: var(--text); font-size: .92rem; transition: all .15s;
}
.wizard-chip:hover { border-color: var(--accent); }
.wizard-chip.selected { border-color: var(--accent); background: var(--accent-dim); color: var(--text); font-weight: 600; }

/* ── Role cards (Team lead / Team member) ── */
.wizard-role-cards {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px;
  text-align: left;
}
.wizard-role-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-input); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; color: var(--text); font-size: 1rem;
  transition: all .15s; cursor: pointer; position: relative;
}
.wizard-role-card:hover { border-color: var(--accent); background: var(--bg-hover); }
.wizard-role-card.selected {
  border-color: var(--accent); background: var(--accent-dim);
}
.wizard-role-card .role-icon {
  width: 28px; height: 28px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; color: var(--text-dim);
}
.wizard-role-card.selected .role-icon { color: var(--accent); }
.wizard-role-card .role-icon svg { width: 24px; height: 24px; }
.wizard-role-card .role-label { flex: 1; font-weight: 500; }
.wizard-role-card .role-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border); flex-shrink: 0;
  transition: all .15s;
}
.wizard-role-card.selected .role-check {
  border-color: var(--accent); background: var(--accent);
}

/* ── Invite team emails ── */
.wizard-invite-emails {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px;
  text-align: left;
}
.wizard-invite-row {
  display: flex; align-items: center; gap: 10px;
}
.wizard-invite-row .invite-email-icon {
  width: 24px; height: 24px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; color: var(--text-dim);
}
.wizard-invite-row .invite-email-icon svg { width: 20px; height: 20px; }
.wizard-invite-row input {
  flex: 1; background: var(--bg-input); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; color: var(--text);
  font-size: .98rem; outline: none; transition: border-color .15s;
}
.wizard-invite-row input::placeholder { color: var(--text-dim); }
.wizard-invite-row input:focus { border-color: var(--accent); }
.invite-remove-btn {
  width: 28px; height: 28px; border-radius: 4px; background: none;
  border: none; color: var(--text-dim); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
  transition: all .12s; cursor: pointer;
}
.invite-remove-btn:hover { background: var(--bg-hover); color: var(--text); }
.invite-remove-btn svg { width: 16px; height: 16px; }

/* ── Project inputs (Step 4) ── */
.wizard-project-inputs {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px;
  text-align: left;
}
.wizard-project-row {
  display: flex; align-items: center; gap: 10px;
}
.wizard-project-row .project-folder-icon {
  width: 24px; height: 24px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; color: var(--text-dim);
}
.wizard-project-row .project-folder-icon svg { width: 20px; height: 20px; }
.wizard-project-row input {
  flex: 1; background: var(--bg-input); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; color: var(--text);
  font-size: .98rem; outline: none; transition: border-color .15s;
}
.wizard-project-row input::placeholder { color: var(--text-dim); }
.wizard-project-row input:focus { border-color: var(--accent); }
.project-remove-btn {
  width: 28px; height: 28px; border-radius: 4px; background: none;
  border: none; color: var(--text-dim); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
  transition: all .12s; cursor: pointer;
}
.project-remove-btn:hover { background: var(--bg-hover); color: var(--text); }
.project-remove-btn svg { width: 16px; height: 16px; }
.wizard-add-more {
  background: none; border: none; color: var(--accent);
  font-size: .92rem; font-weight: 600; cursor: pointer;
  padding: 6px 0; margin-bottom: 20px; transition: color .12s;
}
.wizard-add-more:hover { color: var(--accent-dark); }

/* ── Integrations (Step 5) ── */
.wizard-integrations-list {
  display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px;
}
.wizard-integration-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-input); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; text-align: left;
  transition: border-color .15s;
}
.wizard-integration-card:hover { border-color: #b8b8b8; }
.integration-icon {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.integration-icon svg { width: 28px; height: 28px; }
.integration-info { flex: 1; min-width: 0; }
.integration-name { font-weight: 600; font-size: 1rem; color: var(--text); }
.integration-desc { font-size: .85rem; color: var(--text-dim); margin-top: 2px; }
.integration-connect-btn {
  padding: 8px 20px; border-radius: var(--radius);
  background: var(--bg-card); border: 1.5px solid var(--border);
  font-size: .88rem; font-weight: 600; color: var(--text);
  cursor: pointer; transition: all .15s; white-space: nowrap; flex-shrink: 0;
}
.integration-connect-btn:hover { border-color: var(--accent); background: var(--accent-dim); }
.integration-connect-btn.connected {
  border-color: var(--green); background: rgba(0,0,0,.05);
  color: var(--green); cursor: default;
}

/* ── Nav buttons ── */
.wizard-nav { display: flex; gap: 12px; justify-content: center; }
.wizard-nav .btn {
  padding: 12px 32px; border-radius: var(--radius); font-size: 1rem; font-weight: 600;
  border: 1.5px solid var(--border); transition: all .15s;
}
.btn-secondary { background: transparent; color: var(--text); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent) !important; }
.btn-primary:hover { background: var(--accent-dark); }

/* ════════════════════════════════════════
   APP LAYOUT — icon-strip | sidebar | main | task-panel
   ════════════════════════════════════════ */
.app-container {
  display: flex; width: 100vw; height: calc(100vh - var(--topbar-h));
  opacity: 0; transition: opacity .5s;
}
.app-container.visible { opacity: 1; }

/* ──── Left Sidebar Navigation ──── */
.left-sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  height: 100vh; position: sticky; top: 0;
  background: #fbfaf8; border-right: 1px solid #cecbc6;
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  transition: width .25s ease, min-width .25s ease;
  flex-shrink: 0; z-index: 20;
}
.left-sidebar.collapsed {
  width: 0; min-width: 0; border-right: none; overflow: hidden;
}

/* Workspace Name */
.ls-workspace {
  display: flex; align-items: center; gap: 8px;
  padding: 20px 14px 16px; cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.ls-workspace-name {
  font-size: 16px; font-weight: 700; color: var(--text);
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ls-workspace-chevron { color: var(--text-dim); flex-shrink: 0; }

/* Top Actions */
.ls-actions {
  padding: 10px 8px 4px;
  display: flex; flex-direction: column; gap: 2px;
}
.ls-actions .ls-nav-item.active {
  background: rgba(83,142,156,.13); color: #538e9c; font-weight: 600;
}
.ls-actions .ls-nav-item.active svg { stroke: #538e9c; }

/* Sidebar Timer Bar */
.ls-timer-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 6px;
  background: rgba(83,142,156,.11); color: #538e9c; font-size: 14px;
}
.ls-timer-bar svg { flex-shrink: 0; color: #538e9c; stroke: #538e9c; }
.ls-timer-display { flex: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.ls-timer-stop-btn {
  border: none; background: transparent; cursor: pointer;
  display: flex; align-items: center; padding: 0; flex-shrink: 0;
}

/* Nav Item */
.ls-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 6px;
  color: var(--text-dim); font-size: 14px; text-decoration: none;
  cursor: pointer; transition: all .12s; white-space: nowrap;
  border: none; background: none; width: 100%; text-align: left;
}
.ls-nav-item:hover { background: var(--bg-hover); color: var(--text); }
.ls-nav-item.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.ls-nav-item.active svg { stroke: var(--accent); }
.ls-nav-item svg { flex-shrink: 0; }

/* Sections (Plan, Manage, Admin) */
.ls-section { padding: 4px 8px; }
.ls-section-label {
  padding: 10px 10px 4px; color: var(--text-dim);
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
}
.ls-section-items {
  display: flex; flex-direction: column; gap: 1px;
}

/* Admin Section at bottom */
.ls-admin-section { padding-bottom: 12px; }

/* Sidebar Footer (Share feedback) */
.ls-footer {
  margin-top: auto; padding: 8px;
  border-top: 1px solid var(--border);
}

/* ──── Main area ──── */
.main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* Sidebar trial card */
.ls-trial-card {
  margin: 8px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.ls-trial-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.ls-trial-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #5c5c5c;
  background: #d1d1d1;
  padding: 3px 8px;
  border-radius: 4px;
}
.ls-trial-badge svg { color: #7a7a7a; }
.ls-trial-dismiss {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}
.ls-trial-dismiss:hover { color: var(--text); }
.ls-trial-days {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.ls-trial-desc {
  font-size: .75rem;
  color: var(--text-dim);
  line-height: 1.4;
  margin-bottom: 8px;
}
.ls-trial-link {
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ──── Timer bar ──── */
.timer-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--bg-card);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.timer-input {
  flex: 1; background: none; border: none; color: var(--text);
  font-size: 1rem; outline: none; padding: 6px 0; min-width: 100px;
}
.timer-input::placeholder { color: var(--text-dim); }
.timer-meta { display: flex; align-items: center; gap: 2px; }
.timer-meta-btn {
  background: none; border: none; color: var(--text-dim);
  padding: 5px; border-radius: 4px; transition: color .12s;
  display: flex; align-items: center; justify-content: center;
}
.timer-meta-btn:hover { color: var(--text); }
.timer-meta-btn svg { width: 17px; height: 17px; }

/* Timer divider */
.timer-divider {
  width: 1px; height: 24px; background: var(--border);
  margin: 0 4px; flex-shrink: 0;
}

/* Timer mode dropdown — compact, visible only when running */
#modeDivider { display: none; } /* hidden until timer runs */
.timer-mode-dropdown {
  position: relative; flex-shrink: 0;
  display: none; /* hidden until timer runs */
}
.timer-mode-dropdown.visible { display: block; }
.timer-mode-trigger {
  display: flex; align-items: center; gap: 2px;
  background: none; border: 1px solid var(--border); border-radius: 6px;
  color: var(--text-dim); padding: 4px 6px; cursor: pointer;
  transition: all .12s;
}
.timer-mode-trigger:hover { background: var(--bg-hover); color: var(--text); }
.trigger-icon svg { width: 15px; height: 15px; display: block; }
.trigger-chevron { width: 12px; height: 12px; opacity: .5; }

/* Dropdown menu */
.timer-mode-menu {
  display: none; position: absolute; top: calc(100% + 4px); right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.10);
  padding: 4px; z-index: 100; min-width: 150px;
}
.timer-mode-menu.open { display: block; }
.timer-mode-option {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: none; color: var(--text-dim);
  padding: 7px 10px; border-radius: 5px; font-size: .82rem;
  font-weight: 500; cursor: pointer; transition: all .1s;
  white-space: nowrap;
}
.timer-mode-option:hover { background: var(--bg-hover); color: var(--text); }
.timer-mode-option.active { color: var(--accent); font-weight: 600; }
.timer-mode-option svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── Pomodoro inline settings (inside dropdown) ── */
.pomo-settings {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .25s ease, opacity .2s ease, padding .25s ease;
  padding: 0 2px;
}
.pomo-settings.visible {
  max-height: 200px; opacity: 1; padding: 0 2px 2px;
}
.pomo-settings-divider {
  height: 1px; background: var(--border); margin: 4px 6px 8px;
}
.pomo-setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 3px 10px; gap: 12px;
}
.pomo-setting-label {
  font-size: .78rem; color: var(--text-dim); font-weight: 500;
  white-space: nowrap;
}
.pomo-stepper {
  display: flex; align-items: center; gap: 4px;
}
.pomo-stepper-btn {
  width: 22px; height: 22px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--bg-hover);
  color: var(--text-dim); font-size: .85rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .1s; line-height: 1;
  padding: 0;
}
.pomo-stepper-btn:hover { background: var(--border); color: var(--text); }
.pomo-stepper-value {
  font-size: .82rem; font-weight: 600; color: var(--text);
  min-width: 22px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.pomo-stepper-unit {
  font-size: .72rem; color: var(--text-dim); min-width: 20px;
}

.timer-display {
  font-variant-numeric: tabular-nums; font-size: 1rem;
  color: var(--text-dim); min-width: 70px; text-align: right;
  font-weight: 500; flex-shrink: 0; letter-spacing: 0.01em;
}
.timer-display.running { color: var(--accent); }
.play-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .1s; flex-shrink: 0;
}
.play-btn:hover { background: var(--accent-dark); transform: scale(1.05); }
.play-btn.recording { background: #8a8a8a; }
.play-btn svg { width: 16px; height: 16px; }

/* Context menu wrapper — always visible */
.timer-context-menu-wrap {
  position: relative; flex-shrink: 0; display: block;
}

/* Three-dot trigger button inside the wrap */
.timer-context-btn {
  width: 30px; height: 30px; border-radius: 6px;
  background: none; border: none; color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .12s; flex-shrink: 0;
}
.timer-context-btn:hover { background: var(--bg-hover); color: var(--text); }
.timer-context-btn svg { width: 18px; height: 18px; }

/* Context menu dropdown */
.timer-context-menu {
  display: none; position: absolute; top: calc(100% + 4px); right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12);
  padding: 4px; z-index: 100; min-width: 140px;
}
.timer-context-menu.open { display: block; }
.timer-context-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: none; color: var(--text);
  padding: 8px 12px; border-radius: 5px; font-size: .85rem;
  font-weight: 500; cursor: pointer; transition: all .1s;
  white-space: nowrap;
}
.timer-context-menu-item:hover { background: var(--bg-hover); }
.timer-context-menu-item.delete { color: #d32f2f; }
.timer-context-menu-item.delete:hover { background: #ffeaea; }
.timer-context-menu-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.context-menu-shortcut {
  margin-left: auto; font-size: .75rem; color: var(--text-dim);
  opacity: .6; font-weight: 400;
}
.timer-context-menu-item.disabled {
  opacity: .4; pointer-events: none;
}

/* ──── Calendar controls ──── */
.calendar-controls {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; gap: 8px; flex-wrap: wrap;
}
.cal-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-right { display: flex; align-items: center; gap: 6px; }

.cal-nav {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border); border-radius: 20px;
  overflow: hidden; background: var(--bg-card);
}
.cal-nav-btn {
  background: none; border: none; color: var(--text-dim);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: .92rem; flex-shrink: 0;
  transition: background .12s, color .12s;
}
.cal-nav-btn:hover { background: var(--bg-hover); color: var(--text); }
.cal-nav .cal-nav-icon {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); flex-shrink: 0; padding: 0 2px;
}
.cal-nav .cal-nav-icon svg { width: 16px; height: 16px; }
.cal-nav .week-label {
  font-size: .85rem; font-weight: 500; white-space: nowrap;
  padding: 0 4px; color: var(--text);
}

/* Days dropdown */
.days-dropdown-wrap { position: relative; }
.days-dropdown-btn {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); padding: 6px 14px; border-radius: 20px;
  font-size: .82rem; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.days-dropdown-btn:hover { border-color: var(--accent); }
.days-dropdown-btn svg { width: 12px; height: 12px; color: var(--text-dim); flex-shrink: 0; }
.days-dropdown-menu {
  position: absolute; top: calc(100% + 4px); left: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); min-width: 130px;
  box-shadow: 0 8px 24px rgba(0,0,0,.11);
  z-index: 100; display: none;
}
.days-dropdown-menu.open { display: block; }
.days-dropdown-item {
  padding: 8px 14px; font-size: .82rem; color: var(--text-dim);
  cursor: pointer; transition: all .1s;
  background: none; border: none; width: 100%; text-align: left; display: block;
}
.days-dropdown-item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.days-dropdown-item:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.days-dropdown-item:hover { background: var(--bg-hover); color: var(--text); }
.days-dropdown-item.active { color: var(--accent); background: var(--accent-dim); }


/* View tabs (Calendar / Log history) */
.cal-views {
  display: flex; gap: 0; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 20px;
  overflow: hidden; background: var(--bg-card);
}
.cal-view-btn {
  background: none; border: none;
  color: var(--text-dim); padding: 6px 16px; font-size: .82rem; font-weight: 500;
  transition: all .12s;
}
.cal-view-btn:not(:first-child) { border-left: 1px solid var(--border); }
.cal-view-btn.active { background: var(--accent); color: #fff; }
.cal-view-btn:hover:not(.active) { background: var(--bg-hover); }

/* Small icon buttons (cogwheel, task toggle) */
.cal-icon-btn {
  background: none; border: none; color: var(--text-dim);
  width: 30px; height: 30px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s; flex-shrink: 0;
}
.cal-icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.cal-icon-btn svg { width: 17px; height: 17px; }

.task-toggle-btn {
  background: none; border: 1px solid var(--border); color: var(--text-dim);
  width: 30px; height: 30px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s; flex-shrink: 0;
}
.task-toggle-btn:hover { background: var(--bg-hover); color: var(--text); }
.task-toggle-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.task-toggle-btn svg { width: 17px; height: 17px; }

/* ──── Calendar body (wraps calendar + task popup panel at same height) ──── */
.calendar-body { flex: 1; display: flex; overflow: hidden; }

/* ──── Calendar grid ──── */
.calendar-area { flex: 1; display: flex; overflow: hidden; min-width: 0; }
.calendar-grid { flex: 1; overflow-y: auto; position: relative; }

.cal-day-headers {
  display: grid;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.cal-day-header {
  padding: 8px 6px; text-align: center; font-size: .78rem;
  color: var(--text-dim); border-left: 1px solid var(--border);
}
.cal-day-header:first-child { border-left: none; }
.cal-day-header .day-num {
  font-size: 1.5rem; font-weight: 700; color: var(--text); line-height: 1.2;
}
.cal-day-header .day-num.today { color: var(--accent); }
.cal-day-header .day-name { font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; }
.cal-day-header .day-tracked { font-size: .75rem; color: var(--text-dim); margin-top: 2px; }

.cal-hours { display: grid; }
.cal-hour-label {
  padding: 0 6px; font-size: .75rem; color: var(--text-dim); white-space: nowrap;
  height: 60px; display: flex; align-items: flex-start;
  justify-content: flex-end; padding-top: 0;
  border-top: 1px solid var(--border);
}
.cal-hour-cell {
  height: 60px; border-left: 1px solid var(--border);
  border-top: 1px solid var(--border); position: relative;
}

/* Time entry blocks */
.time-entry-block {
  position: absolute; left: 2px; right: 2px;
  background: var(--accent-dim); border-left: 3px solid var(--accent);
  border-radius: 4px; padding: 4px 8px;
  font-size: .82rem; color: var(--accent);
  z-index: 5; overflow: hidden;
  animation: fadeInEntry .4s ease;
}
.time-entry-block .entry-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.time-entry-block .entry-time { font-size: .75rem; color: var(--text-dim); }
.time-entry-block.running {
  border-color: #8a8a8a; background: rgba(0,0,0,.07); color: #5c5c5c;
}
@keyframes fadeInEntry {
  from { opacity: 0; transform: scaleY(.8); }
  to   { opacity: 1; transform: scaleY(1); }
}

/* ──── Task panel ──── */
.task-panel {
  width: 260px; min-width: 260px; background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: width .3s ease, min-width .3s ease, opacity .25s ease;
  overflow: hidden; flex-shrink: 0;
}
.task-panel.collapsed {
  width: 0; min-width: 0; opacity: 0; border-left: none; overflow: hidden;
}
.task-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: .92rem; flex-shrink: 0;
}
.task-panel-header .panel-title { display: flex; align-items: center; gap: 8px; }
.task-panel-header .panel-actions { display: flex; gap: 2px; }
.panel-action-btn {
  background: none; border: none; color: var(--text-dim);
  width: 28px; height: 28px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.panel-action-btn:hover { background: var(--bg-hover); color: var(--text); }
.panel-action-btn svg { width: 15px; height: 15px; }
.plus-btn {
  background: none; border: none; color: var(--text-dim);
  font-size: 1.1rem; padding: 0 4px; line-height: 1;
}
.plus-btn:hover { color: var(--accent); }

.task-list { flex: 1; overflow-y: auto; padding: 6px 0; }
.task-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; font-size: .88rem; cursor: pointer;
  transition: background .12s;
}
.task-item:hover { background: var(--bg-hover); }
.task-checkbox {
  width: 17px; height: 17px; border-radius: 50%; border: 2px solid var(--border);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.task-item:hover .task-checkbox { border-color: var(--accent); }
.add-task-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; color: var(--text-dim); font-size: .82rem;
  background: none; border: none; width: 100%;
  transition: color .12s; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
}
.add-task-btn:hover { color: var(--accent); }

/* ──── Task popup panel (opens next to calendar) ──── */
.task-popup-panel {
  width: 420px; min-width: 420px; background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden; flex-shrink: 0;
  transition: width .3s ease, min-width .3s ease, opacity .25s ease;
}
.task-popup-panel.collapsed {
  width: 0; min-width: 0; opacity: 0; border-left: none; overflow: hidden;
}

/* Header — always visible, never scrolls */
.tpp-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: #fafafa; flex-shrink: 0;
}
.tpp-header-left { display: flex; align-items: center; gap: 10px; }
.tpp-header-right { display: flex; align-items: center; gap: 4px; }

.tpp-checkbox {
  width: 22px; height: 22px; border: 2px dashed #ccc; border-radius: 50%;
  background: transparent; cursor: pointer; flex-shrink: 0;
  transition: border-color .15s;
}
.tpp-checkbox:hover { border-color: #999; }
.tpp-checkbox.small { width: 18px; height: 18px; }

.tpp-type-selector {
  display: flex; align-items: center; gap: 5px; padding: 5px 10px;
  background: #f0f0f0; border-radius: 6px; cursor: pointer;
  font-size: .82rem; font-weight: 500; color: var(--text);
  transition: background .15s;
}
.tpp-type-selector:hover { background: #e5e5e5; }

.tpp-play-btn {
  width: 30px; height: 30px; border: none; background: var(--accent); color: #fff;
  cursor: pointer; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; transition: all .15s; margin-right: 6px;
}
.tpp-play-btn:hover { background: var(--accent-dark); transform: scale(1.05); }
.tpp-play-btn svg { width: 14px; height: 14px; margin-left: 1px; }

.tpp-icon-btn {
  width: 28px; height: 28px; border: none; background: transparent; color: #999;
  cursor: pointer; border-radius: 6px; display: flex; align-items: center;
  justify-content: center; transition: all .15s;
}
.tpp-icon-btn:hover { background: var(--bg-hover); color: var(--text); }

/* Scrollable content */
.tpp-content {
  flex: 1; overflow-y: auto; padding: 16px;
}

.tpp-task-name-row {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px;
}
.tpp-task-name-row .tpp-checkbox { margin-top: 2px; }

.tpp-task-input {
  flex: 1; font-size: 1.1rem; font-weight: 500; background: transparent;
  border: none; color: var(--text); padding: 0; outline: none;
}
.tpp-task-input::placeholder { color: #bbb; }

.tpp-description {
  width: 100%; min-height: 48px; background: transparent; border: none;
  color: #666; font-size: .88rem; resize: none; line-height: 1.5;
  padding-left: 28px; margin-bottom: 12px; font-family: inherit; outline: none;
}
.tpp-description::placeholder { color: #bbb; }

/* Sections */
.tpp-section {
  padding: 12px 0; border-top: 1px solid var(--border);
}
.tpp-section-header {
  display: flex; align-items: center; gap: 6px;
  font-size: .88rem; font-weight: 500; color: var(--text);
}
.tpp-section-header svg { color: #999; }

.tpp-add-btn {
  display: flex; align-items: center; gap: 6px; padding: 6px 0;
  background: transparent; border: none; color: #999; font-size: .75rem;
  font-weight: 500; text-transform: uppercase; letter-spacing: .5px;
  cursor: pointer; transition: color .15s;
}
.tpp-add-btn:hover { color: var(--text); }
.tpp-add-btn svg { width: 12px; height: 12px; }

/* Metadata items */
.tpp-meta-section { border-top: 1px solid var(--border); padding-top: 8px; }

.tpp-meta-item {
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.tpp-meta-item:last-child { border-bottom: none; }

.tpp-meta-item.clickable {
  display: flex; align-items: center; gap: 6px; color: #999;
  cursor: pointer; font-size: .78rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .5px;
  transition: color .15s;
}
.tpp-meta-item.clickable:hover { color: var(--text); }
.tpp-meta-item.clickable svg { width: 12px; height: 12px; }

.tpp-meta-label {
  font-size: .7rem; text-transform: uppercase; color: #999;
  letter-spacing: .5px; margin-bottom: 6px; display: block;
}

.tpp-assignee {
  display: flex; align-items: center; gap: 8px; margin-top: 4px;
}
.tpp-avatar {
  width: 24px; height: 24px; background: #e0e0e0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; font-weight: 600; color: #666;
}
.tpp-assignee-name { font-size: .88rem; color: var(--text); }

.tpp-status {
  display: flex; align-items: center; gap: 6px; margin-top: 4px;
}
.tpp-status-dot {
  width: 14px; height: 14px; border-radius: 3px; background: #999;
}
.tpp-status span { font-size: .88rem; color: var(--text); }

/* Footer */
.tpp-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 10px 14px; border-top: 1px solid var(--border);
  background: #fafafa; flex-shrink: 0;
}
.tpp-cancel-btn {
  padding: 8px 16px; background: #f0f0f0; border: none; border-radius: 6px;
  color: #666; font-size: .82rem; cursor: pointer; transition: background .15s;
}
.tpp-cancel-btn:hover { background: #e5e5e5; }
.tpp-create-btn {
  padding: 8px 18px; background: var(--accent); border: none; border-radius: 6px;
  color: #fff; font-size: .82rem; font-weight: 500; cursor: pointer;
  transition: background .15s;
}
.tpp-create-btn:hover { background: var(--accent-dark); }

/* ──── Tour tooltips ──── */
.tooltip-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.22);
  z-index: 8000; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.tooltip-overlay.active { opacity: 1; pointer-events: auto; }

.tour-tooltip {
  position: fixed; background: var(--accent); color: #fff;
  border-radius: var(--radius); padding: 16px 20px;
  max-width: 280px; z-index: 8100;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
  box-shadow: 0 8px 32px rgba(0,0,0,.17);
}
.tour-tooltip.active { opacity: 1; pointer-events: auto; }
.tour-tooltip .step-indicator {
  font-size: .7rem; font-weight: 700; opacity: .6;
  margin-bottom: 6px; letter-spacing: .5px; text-transform: uppercase;
}
.tour-tooltip h4 { font-size: .95rem; margin-bottom: 4px; }
.tour-tooltip p  { font-size: .82rem; opacity: .9; line-height: 1.4; }
.tour-tooltip .tour-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px;
}
.tour-tooltip .tour-skip {
  background: none; border: none; color: rgba(255,255,255,.8);
  font-size: .78rem; cursor: pointer; padding: 0;
  text-decoration: underline; text-underline-offset: 2px;
  transition: color .15s;
}
.tour-tooltip .tour-skip:hover { color: #fff; }
.tour-tooltip .step-indicator {
  font-size: .7rem; font-weight: 700; opacity: .6;
  letter-spacing: .5px; text-transform: uppercase;
}
.tour-tooltip .tour-dismiss {
  position: absolute; top: 8px; right: 8px;
  background: none; border: none; color: rgba(255,255,255,.5);
  font-size: 1.2rem; line-height: 1; cursor: pointer;
  width: 24px; height: 24px; display: flex;
  align-items: center; justify-content: center;
  border-radius: 4px; transition: all .15s;
}
.tour-tooltip .tour-dismiss:hover {
  color: #fff; background: rgba(255,255,255,.15);
}
.tour-tooltip::before { content: ''; position: absolute; border: 8px solid transparent; }
.tour-tooltip.arrow-top::before       { bottom: 100%; left: 24px; border-bottom-color: var(--accent); }
.tour-tooltip.arrow-top-right::before { bottom: 100%; right: 24px; left: auto; border-bottom-color: var(--accent); }
.tour-tooltip.arrow-left::before      { right: 100%; top: 18px; border-right-color: var(--accent); }
.tour-tooltip.arrow-bottom::before    { top: 100%; left: 24px; border-top-color: var(--accent); }


/* ════════════════════════════════════════
   REVERSE TRIAL POPUP
   ════════════════════════════════════════ */
.trial-popup-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.50);
  z-index: 8500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .4s ease;
}
.trial-popup-overlay.active {
  opacity: 1; pointer-events: auto;
}

.trial-popup-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 44px 48px 40px;
  max-width: 440px; width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.20);
  transform: translateY(20px) scale(.97);
  transition: transform .4s ease;
}
.trial-popup-overlay.active .trial-popup-card {
  transform: translateY(0) scale(1);
}

.trial-popup-icon {
  margin-bottom: 20px;
}
.trial-popup-icon svg {
  color: var(--accent);
}

.trial-popup-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -.3px;
}

.trial-popup-subtitle {
  color: var(--text-dim);
  font-size: .92rem;
  line-height: 1.5;
  margin-bottom: 28px;
}

.trial-popup-features {
  list-style: none;
  text-align: left;
  margin: 0 auto 32px;
  max-width: 300px;
}
.trial-popup-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  font-size: .92rem;
  color: var(--text);
}

.trial-feature-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.trial-feature-check svg {
  width: 13px; height: 13px;
}

.trial-popup-cta {
  display: block;
  width: 100%;
  padding: 13px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  margin-bottom: 12px;
}
.trial-popup-cta:hover {
  background: var(--accent-dark);
}

.trial-popup-link {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: .85rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.trial-popup-link:hover {
  color: var(--text);
}

/* ──── Utility ──── */
.hidden { display: none !important; }

/* ──── Responsive ──── */
@media (max-width: 1100px) {
  .left-sidebar { --sidebar-w: 170px; width: 170px; min-width: 170px; }
  .task-panel { width: 220px; min-width: 220px; }
  .task-popup-panel { width: 360px; min-width: 360px; }
  .timer-mode-btn .mode-label { display: none; }
  .timer-mode-btn { padding: 5px 7px; }
}
@media (max-width: 900px) {
  .left-sidebar { width: 0; min-width: 0; border-right: none; overflow: hidden; }
  .task-panel { width: 200px; min-width: 200px; }
  .task-popup-panel { width: 320px; min-width: 320px; }
}
@media (max-width: 700px) {
  .task-panel { width: 0; min-width: 0; opacity: 0; border-left: none; overflow: hidden; }
  .task-popup-panel.collapsed { width: 0; min-width: 0; }
  .timer-meta { display: none; }
  .timer-divider { display: none; }
  .cal-nav .week-label { font-size: .78rem; }
}
