/* ═══════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] { display: none !important; }

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--color-text-primary);
  background: var(--color-shell-bg);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; }

/* ═══════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════ */
:root {
  /* Layout */
  --sidebar-width: 200px;
  --calendar-width: 320px;
  --right-rail-width: 52px;
  --right-sidebar-width: calc(var(--calendar-width) + var(--right-rail-width));
  --column-width: 250px;
  --column-gap: 16px;
  --hour-height: 60px;
  --topbar-height: 52px;
  --daily-planning-panel-width: 300px;
  --daily-shutdown-panel-width: 320px;

  /* Colors */
  --color-shell-bg: #ecedee;
  --color-main-card-bg: #f8f8f9;
  --color-bg: #f5f4f1;
  --color-surface: #ffffff;
  --color-border: #e8e8e8;
  --color-border-light: #f0f0f0;
  --color-text-primary: #1a1a1a;
  --color-text-secondary: #555555;
  --color-text-muted: #999999;
  --color-text-tag: #9b8ec4;

  --color-nav-active-bg: #f0efec;
  --color-nav-hover-bg: #f5f4f1;

  --color-progress-track: #e5e7eb;
  --color-progress-fill: #4dcd7d;

  --color-badge-time-bg: #f3f4f6;
  --color-badge-time-text: #6b7280;

  --color-badge-scheduled-bg: #f59e0b;
  --color-badge-scheduled-text: #ffffff;

  --color-complete-fill: #4dcd7d;

  --color-event-blue: #4a90d9;
  --color-event-orange: #f59e0b;
  --color-event-green: #22c55e;
  --color-event-purple: #8b6bd9;
  --color-workday-marker: #d7d7d7;

  /* Radius */
  --radius-sm: 4px;
  --radius-card: 8px;
  --radius-nav: 7px;
  --radius-badge: 20px;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 2px 8px rgba(0,0,0,0.09);
  --shadow-view-btn: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
}

/* ═══════════════════════════════════════════════
   LOGIN SCREEN
═══════════════════════════════════════════════ */
.login-screen {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #ffffff;
}

.login-screen__left {
  flex: 0 0 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.login-screen__right {
  flex: 1;
  background: #A6C7FF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  overflow: hidden;
}

.login-screen__preview {
  max-width: 680px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.login-card {
  width: 100%;
  max-width: 340px;
}

.login-card__logo {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 48px;
}

.login-card__logo-icon {
  font-size: 18px;
  color: #f5a623;
}

.login-card__logo-text {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--color-text-primary);
}

.login-card__heading {
  font-size: 28px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.login-card__subtitle {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-form__input {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s;
}

.login-form__input::placeholder {
  color: var(--color-text-muted);
}

.login-form__input:focus {
  border-color: #93b4e8;
  box-shadow: 0 0 0 3px rgba(147, 180, 232, 0.15);
}

.login-form__error {
  padding: 10px 14px;
  font-size: 13px;
  color: #c0392b;
  background: #fdf0ef;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
}

.login-form__btn {
  width: 100%;
  padding: 12px;
  margin-top: 4px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  background: #b0b0b0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.login-form__btn:hover {
  background: #9a9a9a;
}

.login-form__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive: stack on narrow screens */
@media (max-width: 860px) {
  .login-screen {
    flex-direction: column;
  }
  .login-screen__left {
    flex: none;
    padding: 40px 24px;
  }
  .login-screen__right {
    display: none;
  }
}

/* ═══════════════════════════════════════════════
   APP SHELL
═══════════════════════════════════════════════ */
.app-shell {
  display: flex;
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: var(--color-shell-bg);
}

.main-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  min-width: 0;
  margin: 8px;
  background: var(--color-main-card-bg);
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  box-shadow: rgba(0, 0, 0, 0.05) 0px 3px 5px;
  overflow: hidden;
}

.main-card--daily-shutdown {
  overflow: visible;
}

/* ═══════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════ */
.sidebar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 5;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--color-shell-bg);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  padding: 12px 12px 16px;
  overflow: visible;
  flex-shrink: 0;
  transition: width 0.22s ease, min-width 0.22s ease, padding 0.22s ease, opacity 0.22s ease, border-color 0.22s ease;
}

.sidebar__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.sidebar__logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  margin: 7px 0 8px;
  border-radius: 4px;
  color: #787878;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  transition: background 0.12s ease;
}

.sidebar__logo:hover {
  background: #dcdcdc;
}

.logo-main {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.logo-text {
  color: #787878;
}

.logo-main:focus-visible {
  outline: 2px solid #c8c8c8;
  outline-offset: 2px;
  border-radius: 4px;
}

.logo-caret {
  width: 10px;
  height: 10px;
  color: #787878;
  flex-shrink: 0;
}

.logo-caret--up {
  display: none;
}

.logo-main[aria-expanded="true"] .logo-caret--down {
  display: none;
}

.logo-main[aria-expanded="true"] .logo-caret--up {
  display: inline-flex;
}

.sidebar__collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 0;
  padding: 0;
  border-radius: 4px;
  background: transparent;
  color: #787878;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.sidebar__collapse-btn svg {
  width: 12px;
  height: 12px;
}

.sidebar:hover .sidebar__collapse-btn {
  opacity: 1;
  pointer-events: auto;
}

.sidebar__collapse-btn:hover {
  color: #413f39;
}

/* Nav items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  margin: 2px 0;
  border-radius: 4px;
  color: #787878;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.12s ease;
  white-space: nowrap;
  overflow: hidden;
}

.nav-item:not(.nav-item--active):hover {
  background: #dcdcdc;
  color: #787878;
}

.nav-item--active {
  background: #c8c8c8;
  color: #787878;
  border-radius: 4px;
}

.nav-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #787878;
}

.nav-item--active .nav-icon {
  color: #787878;
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__section {
  margin-top: 20px;
}

/* Section headers */
.section-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #787878;
  padding: 14px 10px 4px;
}

/* ═══════════════════════════════════════════════
   MAIN BOARD
═══════════════════════════════════════════════ */
.board {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-main-card-bg);
}

.app-shell--today-view {
  --today-view-gap: 36px;
  --today-view-inline-offset: max(20px, calc((100% - var(--sidebar-width) - (var(--column-width) + var(--today-view-gap) + var(--right-sidebar-width))) / 2));
}

/* Top bar */
.board__topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 calc(var(--right-sidebar-width) + 20px) 0 calc(var(--sidebar-width) + var(--column-gap) - 8px);
  height: var(--topbar-height);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-main-card-bg);
  flex-shrink: 0;
  transition: padding-left 0.22s ease;
}

.board__topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.board__topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.board__topbar-close {
  color: #787878;
}

.board__topbar-close:hover {
  color: #413f39;
}

.sidebar-expand-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #787878;
  cursor: pointer;
  transition: color 0.12s ease;
}

.sidebar-expand-btn svg {
  width: 12px;
  height: 12px;
}

.sidebar-expand-btn:hover {
  color: #413f39;
}

.view-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 5px;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  background: #ffffff;
  font-family: inherit;
  font-size: 12px;
  color: #787878;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}

.view-btn:hover {
  color: #413f39;
}

.view-btn--active {
  background: #ffffff;
  color: #787878;
  font-weight: 600;
  box-shadow: none;
}

.view-icon {
  width: 12px;
  height: 12px;
  color: currentColor;
  flex-shrink: 0;
  pointer-events: none;
}

.view-btn__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  color: currentColor;
  cursor: pointer;
  transition: background 0.12s;
}

.view-btn__close svg {
  width: 12px;
  height: 12px;
}

.view-btn__close:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Day columns container */
.board__columns {
  flex: 1;
  display: flex;
  gap: var(--column-gap);
  padding: 20px calc(var(--right-sidebar-width) + 20px) 0 calc(var(--sidebar-width) + var(--column-gap) - 8px);
  overflow-x: auto;
  overflow-y: hidden;
  align-items: flex-start;
  scroll-behavior: smooth;
  opacity: 0;
  transition: opacity 0.2s ease-in, padding-left 0.22s ease;
}

.board__columns--instant-hide {
  opacity: 0;
  transition: none;
  pointer-events: none;
}

.board__columns--ready {
  opacity: 1;
}

.board__columns--daily-planning {
  padding-left: calc(var(--sidebar-width) + var(--daily-planning-panel-width) + 36px);
}

.board__columns--daily-shutdown {
  padding-left: calc(var(--sidebar-width) + var(--daily-shutdown-panel-width) + 36px);
}

.board--today-view .board__topbar {
  position: relative;
  z-index: 6;
  padding-left: calc(var(--sidebar-width) + 16px);
  padding-right: 16px;
}

.board--today-view .board__topbar-right {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  margin-left: 0;
  z-index: 7;
}

.board__columns--today-view {
  padding-left: calc(var(--sidebar-width) + var(--today-view-inline-offset));
  padding-right: calc(var(--right-sidebar-width) + var(--today-view-inline-offset) + var(--today-view-gap));
  overflow-x: hidden;
}

.board--daily-shutdown {
  overflow: visible;
}

.board--daily-planning[data-dp-step="4"] {
  --daily-planning-panel-width: calc(var(--column-width) * 2 + var(--column-gap));
}

.board--daily-shutdown[data-ds-step="2"] {
  --daily-shutdown-panel-width: calc(var(--column-width) * 2 + var(--column-gap));
}

.board--daily-shutdown[data-ds-step="2"] .board__columns {
  display: none;
}

.board--daily-planning[data-dp-step="4"] .day-column__header,
.board--daily-planning[data-dp-step="4"] .add-task-row,
.board--daily-planning[data-dp-step="4"] .add-task-input-wrap {
  display: none;
}

.board--daily-planning[data-dp-step="4"] .day-column {
  padding-top: 93px;
}

.board--daily-planning[data-dp-step="4"] .progress-bar {
  display: none;
}

.main-card--hide-calendar .right-sidebar {
  display: none;
}

.main-card--hide-calendar .board__topbar {
  padding-right: 20px;
}

.main-card--hide-calendar .board__columns {
  padding-right: 20px;
}

.daily-planning-panel {
  position: absolute;
  top: var(--topbar-height);
  left: calc(var(--sidebar-width) + 18px);
  bottom: 0;
  width: var(--daily-planning-panel-width);
  padding: 20px 14px 24px 8px;
  overflow-y: auto;
  z-index: 2;
  transition: left 0.22s ease;
}

.daily-shutdown-panel {
  position: absolute;
  top: var(--topbar-height);
  left: calc(var(--sidebar-width) + 18px);
  bottom: 0;
  width: var(--daily-shutdown-panel-width);
  padding: 20px 14px 24px 8px;
  overflow-x: visible;
  overflow-y: auto;
  z-index: 2;
  transition: left 0.22s ease;
}

.board--daily-shutdown[data-ds-step="1"] .daily-shutdown-panel {
  overflow: visible;
}

.app-shell.sidebar-collapsed {
  --sidebar-width: 0px;
}

.app-shell.sidebar-collapsed .sidebar {
  width: 0;
  min-width: 0;
  padding: 0;
  border-right: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.app-shell.sidebar-collapsed .sidebar-expand-btn {
  display: inline-flex;
}

.app-shell.right-sidebar-collapsed {
  --right-sidebar-width: var(--right-rail-width);
}

.daily-planning-panel__inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.daily-planning-panel__title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  color: #413f39;
}

.daily-planning-panel__subtitle {
  font-size: 14px;
  font-weight: 500;
  color: #787878;
  line-height: 1.35;
}

.daily-planning-panel__metric {
  font-size: 12px;
  font-weight: 600;
  color: #787878;
  letter-spacing: 0.02em;
}

.daily-planning-panel__workload--near {
  color: #fdbd5b;
}

.daily-planning-panel__workload--over {
  color: #eb8063;
}

.daily-planning-panel__card {
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  background: #ffffff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.daily-planning-panel__card h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  color: #413f39;
}

.daily-planning-panel__card p {
  font-size: 14px;
  font-weight: 500;
  color: #787878;
  font-style: italic;
  line-height: 1.35;
}

.daily-planning-panel__caution-title {
  color: #787878;
}

.daily-planning-panel__card .daily-planning-panel__caution-title--near {
  color: #fdbd5b;
}

.daily-planning-panel__card .daily-planning-panel__caution-title--over {
  color: #eb8063;
}

.daily-planning-panel__card--warn {
  background: #ffffff;
  border-color: #dcdcdc;
}

.daily-planning-panel__card--ok {
  background: #f1fbf3;
  border-color: #b6dcbc;
}

.daily-planning-panel__card--spaced {
  margin: 10px 0 0;
}

.daily-planning-panel__card--caution {
  margin-top: 10px;
}

.daily-planning-panel__shutdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.daily-planning-panel__time-select {
  position: relative;
  flex: 1;
}

.daily-planning-panel__time {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #787878;
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #2e2e2e;
  background: #ffffff;
  padding: 5px 8px;
  min-width: 106px;
  cursor: pointer;
  text-align: center;
  width: 100%;
  height: 36px;
}

.daily-planning-panel__time-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 190px;
  max-height: 220px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  box-shadow: 0 6px 12px #0003;
  z-index: 40;
  padding: 6px 0;
}

.daily-planning-panel__time-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #413f39;
  cursor: pointer;
  text-align: left;
}

.daily-planning-panel__time-option:hover {
  background: #f5f5f5;
}

.daily-planning-panel__time-option--selected {
  font-weight: 500;
}

.daily-planning-panel__time-option i {
  width: 18px;
  height: 18px;
}

.daily-planning-panel__time-option svg {
  width: 18px;
  height: 18px;
}

.daily-planning-panel__btn {
  border: 1px solid #c8c8c8;
  border-radius: 4px;
  background: #ffffff;
  color: #413f39;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 6px 12px;
  opacity: 0.8;
  transition: opacity 0.15s ease;
  height: 36px;
}

.daily-planning-panel__btn--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.daily-planning-panel__btn--icon svg,
.daily-planning-panel__btn--icon i {
  width: 16px;
  height: 16px;
}
.daily-planning-panel__btn:hover {
  opacity: 1;
}

.daily-planning-panel__btn--primary {
  flex: 1;
  text-align: center;
}

.daily-planning-panel__btn--complete:hover {
  border-color: #4dcd7d;
  color: #4dcd7d;
}

.daily-planning-panel__btn--success {
  background: #ffffff;
  border: 1px solid #4dcd7d;
  border-radius: 4px;
  color: #4dcd7d;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  opacity: 1;
  height: 36px;
}

.daily-planning-panel__btn--success i,
.daily-planning-panel__btn--success svg {
  width: 16px;
  height: 16px;
}

.daily-planning-panel__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 10px;
}

.daily-planning-panel__actions--spaced {
  margin-top: 10px;
}

.daily-planning-panel__actions--secondary {
  justify-content: flex-start;
}

.daily-planning-panel__actions--final .daily-planning-panel__btn--primary {
  flex: 0 0 auto;
}

.daily-planning-panel__actions--final {
  margin-top: 10px;
}

.daily-planning-panel__btn--ghost {
  width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

.daily-planning-panel__btn--ghost i,
.daily-planning-panel__btn--ghost svg {
  width: 18px;
  height: 18px;
}

.daily-planning-panel__btn-spacer {
  width: 44px;
  display: inline-block;
  height: 36px;
}

.daily-planning-panel__prompt {
  margin-top: 10px;
  padding-top: 24px;
  border-top: 1px solid #f0f0f0;
}

.daily-planning-panel__prompt-text {
  font-size: 12px;
  font-weight: 500;
  font-style: italic;
  color: #b4b4b4;
}

.daily-planning-panel__task-preview {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.daily-planning-panel__task-preview li {
  font-size: 13px;
  color: #3f3f3f;
}

.daily-planning-panel__label {
  font-size: 12px;
  font-weight: 600;
  color: #656565;
  letter-spacing: 0.03em;
}

.daily-planning-panel__textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 1px solid #d7d7d7;
  border-radius: 6px;
  padding: 9px 10px;
  font-family: inherit;
  font-size: 13px;
  color: #2f2f2f;
  line-height: 1.35;
  background: #ffffff;
}

/* textarea--share replaced by share-editor (Quill) */

/* ═══════════════════════════════════════════════
   DAILY SHUTDOWN PANEL
═══════════════════════════════════════════════ */
.daily-shutdown-panel__inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.daily-shutdown-panel__title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  color: #413f39;
}

.daily-shutdown-panel__title--section {
  margin-top: 4px;
}

.daily-shutdown-panel__subtitle {
  font-size: 14px;
  font-weight: 500;
  color: #787878;
  line-height: 1.35;
}

.daily-shutdown-panel__section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.daily-shutdown-panel__section h3 {
  font-size: 16px;
  font-weight: 600;
  color: #413f39;
  margin: 10px 0 16px;
}

.daily-shutdown-panel__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.daily-shutdown-panel__actions--review {
  margin-top: 10px;
}

.daily-shutdown-panel__actions--final .daily-shutdown-panel__btn--primary {
  flex: 0 0 auto;
}

.daily-shutdown-panel__actions--final {
  margin-top: 10px;
}

.daily-shutdown-panel__btn {
  border: 1px solid #c8c8c8;
  border-radius: 4px;
  background: #ffffff;
  color: #413f39;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 6px 12px;
  opacity: 0.8;
  transition: opacity 0.15s ease;
  height: 36px;
}

.daily-shutdown-panel__btn--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.daily-shutdown-panel__btn--icon svg,
.daily-shutdown-panel__btn--icon i {
  width: 16px;
  height: 16px;
}
.daily-shutdown-panel__btn:hover {
  opacity: 1;
}

.daily-shutdown-panel__btn--primary {
  flex: 1;
  text-align: center;
}

.daily-shutdown-panel__btn--complete:hover {
  border-color: #4dcd7d;
  color: #4dcd7d;
}

.daily-shutdown-panel__btn--ghost {
  width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

.daily-shutdown-panel__btn--ghost i,
.daily-shutdown-panel__btn--ghost svg {
  width: 18px;
  height: 18px;
}

.daily-shutdown-panel__share-editor {
  width: 100%;
}

.daily-shutdown-panel__share-editor.ql-container.ql-snow {
  border-radius: 8px;
  border: 1px solid #d9d9d9;
  background: #ffffff;
}

.daily-shutdown-panel__share-editor .ql-editor {
  min-height: 240px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #2f2f2f;
}

.daily-shutdown-panel__share-editor .ql-editor h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 8px 0 6px;
}

.daily-shutdown-panel__share-editor .ql-editor ul {
  margin: 0 0 10px 18px;
}

.daily-shutdown-panel__share-editor .ql-editor li {
  margin-bottom: 4px;
}

.daily-shutdown-panel__share-editor .ql-editor.ql-blank::before {
  color: #b4b4b4;
  font-style: italic;
}

/* Shutdown progress */
.shutdown-progress {
  position: relative;
  padding: 22px 0 68px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
}

.shutdown-progress__track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: #f0f0f0;
}

.shutdown-progress__fill {
  height: 100%;
  border-radius: inherit;
  background: var(--color-progress-fill);
}

.shutdown-progress__tick {
  position: absolute;
  top: 50%;
  transform: translateX(-50%);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #b4b4b4;
  font-size: 10px;
  font-weight: 600;
}

.shutdown-progress__tick::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -9px;
  transform: translateX(-50%);
  width: 2px;
  height: 18px;
  background: #f0f0f0;
  border-radius: 2px;
}

.shutdown-progress__callout {
  position: absolute;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 4px;
  color: #ffffff;
  min-width: 62px;
  text-align: center;
  white-space: nowrap;
}

.shutdown-progress__callout--actual {
  top: -10px;
  background: #4dcd7d;
}

.shutdown-progress__callout--actual::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #4dcd7d;
}

.shutdown-progress__callout--planned {
  bottom: 0;
  background: #b4b4b4;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-direction: column;
  text-align: center;
}

.shutdown-progress__callout--planned::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #b4b4b4;
}

.shutdown-progress__callout--planned .shutdown-progress__callout-value,
.shutdown-progress__callout--planned .shutdown-progress__callout-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: #ffffff;
}

/* Shutdown donut */
.shutdown-donut {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto;
}

.shutdown-donut__svg {
  width: 100%;
  height: 100%;
}

.shutdown-donut__track {
  fill: none;
  stroke: #f0f0f0;
  stroke-width: 24;
}

.shutdown-donut__slice {
  fill: none;
  stroke-width: 24;
  stroke-linecap: butt;
  pointer-events: stroke;
}

.shutdown-donut--empty .shutdown-donut__track {
  stroke: #e2e2e2;
}

.shutdown-donut__tooltip {
  position: absolute;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(30, 30, 30, 0.86);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translate(-50%, -120%);
  pointer-events: none;
  white-space: nowrap;
  z-index: 2;
}

.shutdown-donut__tooltip-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--swatch-color, #ffffff);
  flex: 0 0 auto;
}

.shutdown-donut__legend {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  font-size: 12px;
  color: #787878;
}

.shutdown-donut__legend--empty {
  text-align: center;
  color: #b4b4b4;
  font-size: 12px;
}

.shutdown-donut__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.shutdown-donut__legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--swatch-color, #b4b4b4);
}

.day-date--daily-hint {
  font-size: 14px;
  font-weight: 500;
  color: #787878;
  font-style: italic;
}

/* ═══════════════════════════════════════════════
   DAY COLUMNS
═══════════════════════════════════════════════ */
.day-column {
  width: var(--column-width);
  min-width: var(--column-width);
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 20px;
  position: relative;
  z-index: 0;
}

.day-column--past .day-column__header,
.day-column--past .add-task-row,
.day-column--past .add-task-input-wrap,
.day-column--past .progress-bar,
.day-column--past .column-time-total {
  opacity: 0.5;
}

.day-column--past .add-task-row:hover,
.day-column--past .add-task-row:hover + .add-task-input-wrap {
  opacity: 1;
}

.day-column--past .task-card {
  opacity: 0.5;
}

.day-column--past .task-card:hover {
  opacity: 1;
}

/* Column header */
.day-column__header {
  flex-shrink: 0;
  padding-bottom: 2px;
  position: relative;
}

.day-name {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: #413f39;
  line-height: 1.2;
  letter-spacing: 0;
}

.day-name--link {
  color: var(--color-text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.12s ease;
}

.day-name--link:hover,
.day-name--link:focus-visible {
  color: #2ca7ff;
}

.day-date {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Plan button — hidden by default, shown on header hover */
.day-column__plan-btn {
  position: absolute;
  top: 5px;
  right: 0;
  font-size: 12px;
  font-weight: 600;
  color: #b4b4b4;
  padding: 7px 5px;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease, background-color 0.12s ease, color 0.12s ease;
  border-radius: 4px;
  line-height: 1;
}

.day-column__header:hover .day-column__plan-btn {
  opacity: 1;
}

.day-column__plan-btn:hover {
  background-color: #4dcd7d;
  color: #ffffff;
  box-shadow: 0 2px 4px #0003;
  opacity: 1;
}

/* Hide plan button during daily planning */
.board--daily-planning .day-column__plan-btn {
  display: none;
}

/* Progress bar */
.progress-bar {
  height: 8px;
  margin: 0 12px;
  background: var(--color-progress-track);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.progress-bar__fill {
  height: 100%;
  background: var(--color-progress-fill);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.progress-bar--hidden {
  visibility: hidden;
}

/* Add task row */
.add-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 1px;
  cursor: pointer;
  flex-shrink: 0;
}

.add-task-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #b4b4b4;
  padding: 0;
  border-radius: var(--radius-sm);
  transition: color 0.12s ease;
  text-align: left;
}

.add-task-btn:hover {
  color: #413f39;
}

.add-task-row:hover .add-task-btn {
  color: #413f39;
}

.add-task-btn svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: currentColor;
}

.add-task-btn__label {
  color: currentColor;
}

.day-column:not(.day-column--today) .add-task-btn__label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.12s ease, opacity 0.12s ease;
}

.day-column:not(.day-column--today) .add-task-row:hover .add-task-btn__label,
.day-column:not(.day-column--today) .add-task-btn:focus-visible .add-task-btn__label {
  max-width: 120px;
  opacity: 1;
}

.day-column:not(.day-column--today) .add-task-row:hover .add-task-btn,
.day-column:not(.day-column--today) .add-task-btn:focus-visible {
  color: #413f39;
}

.column-time-total {
  font-size: 12px;
  color: #6d6d6d;
  background: #f0f0f0;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
  cursor: default;
}

/* Inline add task input */
.add-task-input-wrap {
  display: flex;
  gap: 4px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 1px;
  flex-shrink: 0;
}

.add-task-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  border-radius: 0;
  padding: 2px 4px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  background: transparent;
  color: #413f39;
}

.add-task-input::placeholder {
  color: #b4b4b4;
}

.add-task-input:focus {
  border: none;
}

.add-task-confirm {
  border: none;
  border-radius: 4px;
  background: #2ca7ff;
  color: #ffffff;
  width: 21px;
  height: 21px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.12s ease;
  flex: 0 0 auto;
}

.add-task-confirm:hover {
  background: #1f98ea;
}

.add-task-confirm svg {
  width: 12px;
  height: 12px;
  display: block;
}

/* Task list */
.task-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 20px;
}

/* ═══════════════════════════════════════════════
   TASK CARDS
═══════════════════════════════════════════════ */
.task-card {
  background: #ffffff;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 1px;
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  cursor: default;
}

.task-card:hover {
  border-color: #dcdcdc;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 3px 6px;
}

.task-card--active {
  border-color: #dcdcdc;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 3px 6px;
}

body.task-selection--keyboard-lock .task-card:hover:not(.task-card--active):not(.task-card--picker-open):not(.task-card--time-picker-open):not(.task-card--timer-open) {
  border-color: #f0f0f0;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 1px;
}

/* Complete state */
.task-card--complete {
  opacity: 0.5;
}

.task-card--complete:hover {
  opacity: 1;
}

body.task-selection--keyboard-lock .task-card--complete:hover:not(.task-card--active) {
  opacity: 0.5;
}


.task-card--ghost-today {
  opacity: 0.5;
}

.task-card--ghost-today:hover {
  opacity: 1;
}

body.task-selection--keyboard-lock .task-card--ghost-today:hover:not(.task-card--active) {
  opacity: 0.5;
}

/* Card header */
.task-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.task-card__title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.task-card__pills-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}

.task-card__scheduled-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  background: var(--color-badge-scheduled-bg);
  color: var(--color-badge-scheduled-text);
  padding: 2px 4px;
  border-radius: 4px;
  white-space: nowrap;
  width: fit-content;
}

.task-card__scheduled-pill.cal-event--blue,
.task-card__scheduled-pill.cal-event--orange,
.task-card__scheduled-pill.cal-event--green,
.task-card__scheduled-pill.cal-event--purple {
  color: #ffffff;
}

.task-card__scheduled-pill--more {
  font-size: 10px;
  font-weight: 600;
  background: none;
  color: #999;
  padding: 2px 0;
}

.task-card__title {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text-primary);
  word-break: break-word;
}

.task-card__time-badge {
  font-size: 10px;
  background-color: #f0f0f0;
  color: #787878;
  padding: 2px 4px;
  border-radius: 4px;
  white-space: nowrap;
  flex: 0 0 auto;
  margin-top: 1px;
  font-weight: 600;
  cursor: pointer;
}

.task-card__time-badge--running {
  background-color: #4dcd7d;
  color: #fff;
}

/* Daily planning: unplanned / at-capacity warning badge */
.task-card__time-badge--dp-warning {
  background-color: #fdbd5b;
  color: #7e5f30;
}

/* Daily planning: over-capacity badge */
.task-card__time-badge--dp-over {
  background-color: #eb8063;
  color: #341006;
}

/* Lucide warning icon inside time badge */
.task-card__time-badge-icon {
  width: 10px !important;
  height: 10px !important;
  margin-left: 3px;
  vertical-align: middle;
  flex-shrink: 0;
  stroke: currentColor;
}

/* Daily planning time badge tooltip */
.task-card__time-badge[data-dp-tooltip] {
  position: relative;
}
.task-card__time-badge[data-dp-tooltip]:hover::after {
  content: attr(data-dp-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  color: #333;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}

/* Card timer dropdown */
.task-card__timer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 0;
  margin: 0 -12px;
  border-top: 1px solid var(--color-border);
}

.task-card__timer-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #a7a7a7;
  padding: 0;
  display: flex;
  align-items: center;
}

.task-card__timer-btn:hover {
  color: #787878;
}

.task-card__timer-btn svg {
  width: 16px;
  height: 16px;
}

.task-card__timer-metrics {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-left: auto;
}

.task-card__timer-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.task-card__timer-label {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #787878;
}

.task-card__timer-value {
  font-size: 12px;
  font-weight: 500;
  color: #787878;
}

.task-card__timer-value--running {
  color: #4dcd7d;
  font-variant-numeric: tabular-nums;
}

.task-card__timer-metric--clickable {
  cursor: pointer;
}

.task-card__timer-metric--clickable:hover .task-card__timer-value {
  color: #B4B4B4;
}

/* Subtasks */
.task-card__subtasks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
}

.subtask {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0;
}

.subtask__check {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #b4b4b4;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #b4b4b4;
  cursor: pointer;
  padding: 0;
  margin-left: 1px;
  margin-top: 1px;
  outline: none;
  transition: border-color 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}

.subtask__check svg {
  display: block;
  width: 9px;
  height: 9px;
  color: currentColor;
  stroke-width: 3;
}

.subtask__check:hover {
  border-color: var(--color-complete-fill);
  color: var(--color-complete-fill);
}

.subtask--done .subtask__check {
  background: var(--color-complete-fill);
  border-color: var(--color-complete-fill);
  color: #ffffff;
}

.subtask--done .subtask__check svg {
  color: #ffffff;
}

.subtask--done .subtask__check:hover {
  border-color: var(--color-complete-fill);
  color: #ffffff;
}

.subtask--done .subtask__label {
  color: var(--color-text-muted);
}

.subtask__time {
  margin-left: auto;
  font-size: 10px;
  font-weight: 400;
  color: #b4b4b4;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
}

.subtask__time--active {
  color: #4dcd7d;
}

/* Card footer */
.task-card__footer {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 20px;
}

.task-card__complete-btn {
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.complete-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #b4b4b4;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  background: transparent;
}

.complete-circle svg {
  display: block;
  width: 9px;
  height: 9px;
  color: #b4b4b4;
  stroke-width: 3;
  transition: color 0.15s;
}

.task-card__complete-btn:hover .complete-circle {
  border-color: var(--color-complete-fill);
}

.task-card__complete-btn:hover .complete-circle svg {
  color: var(--color-complete-fill);
}

.task-card--complete .complete-circle {
  background: var(--color-complete-fill);
  border-color: var(--color-complete-fill);
}

.task-card--complete .task-card__complete-btn .complete-circle svg {
  color: #ffffff;
}

/* Completed past card checkmark (green filled) */
.complete-circle--done {
  background: var(--color-complete-fill);
  border-color: var(--color-complete-fill);
}

.complete-circle--done svg {
  color: #ffffff;
}

/* Rollover badge */
.task-card__rollover-badge {
  display: inline-flex;
  align-items: center;
  color: #b4b4b4;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.task-card__rollover-badge .rollover-icon {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.task-card__rollover-badge i,
.task-card__rollover-badge svg {
  width: 18px;
  height: 18px;
}

.rollover-count {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
  font-size: 9px;
  font-weight: 700;
  pointer-events: none;
}

/* Hover action icons (calendar, clock) */
.task-card__hover-icon {
  display: none;
  background: none;
  border: none;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #b4b4b4;
  cursor: pointer;
  position: relative;
}

.task-card__hover-icon i,
.task-card__hover-icon svg {
  width: 12px;
  height: 12px;
  display: block;
}

.task-card:hover .task-card__hover-icon,
.task-card--active .task-card__hover-icon,
.task-card--picker-open .task-card__hover-icon,
.task-card--time-picker-open .task-card__hover-icon,
.task-card--timer-open .task-card__hover-icon {
  display: inline-flex;
}

body.task-selection--keyboard-lock .task-card:hover:not(.task-card--active):not(.task-card--picker-open):not(.task-card--time-picker-open):not(.task-card--timer-open) .task-card__hover-icon {
  display: none;
}

/* Due date label */
.task-card__due {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 500;
  color: #787878;
  line-height: 1;
}

.task-card__due svg {
  width: 11px;
  height: 11px;
}

.task-card__due--overdue {
  color: #f25a43;
}

.task-card:hover .task-card__due,
.task-card--active .task-card__due,
.task-card--picker-open .task-card__due {
  display: none;
}

body.task-selection--keyboard-lock .task-card:hover:not(.task-card--active):not(.task-card--picker-open) .task-card__due {
  display: inline-flex;
}

.task-card__hover-icon:hover {
  color: #787878;
}

/* Integration icon */
.task-card__integration-icon {
  width: 15px;
  height: 15px;
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tag */
.task-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11.5px;
  color: #787878;
  margin-left: auto;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.12s ease;
}

.task-card__tag:hover {
  color: #413f39;
}

.task-card__tag--unassigned {
  display: none;
}

.task-card:hover .task-card__tag--unassigned,
.task-card--active .task-card__tag--unassigned,
.task-card--picker-open .task-card__tag--unassigned {
  display: inline-flex;
}

body.task-selection--keyboard-lock .task-card:hover:not(.task-card--active):not(.task-card--picker-open) .task-card__tag--unassigned {
  display: none;
}

.task-card__tag-word {
  color: inherit;
}

.task-card__tag-hash {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1;
}

/* Channel Picker Dropdown */
.channel-picker {
  position: absolute;
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  box-shadow: 0 6px 12px #0003;
  z-index: 6000;
  font-size: 13px;
  padding: 8px 0;
  min-width: 200px;
}

.channel-picker__arrow {
  position: absolute;
  top: -6px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  transform: rotate(45deg);
  border-top: 1px solid #dcdcdc;
  border-left: 1px solid #dcdcdc;
  box-shadow: none;
}

.channel-picker__header {
  padding: 0 14px 8px;
  font-size: 12px;
  color: #787878;
  font-weight: 400;
}

.channel-picker__search {
  display: block;
  width: calc(100% - 28px);
  margin: 0 14px 8px;
  padding: 6px 8px;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  border-radius: 0;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: transparent;
  color: #413f39;
}

.channel-picker__search::placeholder {
  color: #b4b4b4;
}

.channel-picker__divider {
  height: 1px;
  background: var(--color-border);
  margin: 6px 0;
}

.channel-picker__list {
  max-height: 240px;
  overflow-y: auto;
}

.channel-picker__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background-color 0.1s ease;
  position: relative;
}

.channel-picker__item:hover,
.channel-picker__item--highlighted {
  background: #f5f5f5;
}

.channel-picker__item--nested {
  padding-left: 32px;
}

.channel-picker__hash {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.channel-picker__label {
  flex: 1;
  color: #333;
}

.channel-picker__check {
  color: #999;
  font-size: 14px;
  margin-left: auto;
}

.channel-picker__manage {
  display: block;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #2ca7ff;
  text-decoration: none;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════
   RIGHT SIDEBAR
═══════════════════════════════════════════════ */
.right-sidebar {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  width: var(--right-sidebar-width);
  min-width: var(--right-sidebar-width);
  background: var(--color-main-card-bg);
  border-left: 1px solid var(--color-border);
  box-shadow: rgba(0, 0, 0, 0.05) -5px 0px 15px 0px;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  transition: width 0.22s ease, min-width 0.22s ease;
}

.app-shell--today-view .right-sidebar {
  right: var(--today-view-inline-offset);
  background: transparent;
  border-left-color: transparent;
  box-shadow: none;
}

.right-sidebar__panel {
  position: relative;
  width: var(--calendar-width);
  min-width: var(--calendar-width);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background: var(--color-main-card-bg);
  overflow: hidden;
}

.app-shell--today-view .right-sidebar__panel,
.app-shell--today-view .right-sidebar__placeholder,
.app-shell--today-view .right-rail {
  background: transparent;
}

.app-shell--today-view .right-sidebar__placeholder-header {
  border-bottom-color: transparent;
}

.app-shell--today-view .calendar-panel,
.app-shell--today-view .calendar-day-badge {
  background: transparent;
}

.app-shell--today-view .calendar-panel__header,
.app-shell--today-view .calendar-day-badge,
.app-shell--today-view .calendar-day-badge::after,
.app-shell--today-view .time-grid::before,
.app-shell--today-view .right-rail {
  border-color: transparent;
  background-color: transparent;
}

.right-sidebar__placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--color-main-card-bg);
}

.right-sidebar__placeholder-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: 12px;
  font-weight: 600;
  color: #787878;
}

.search-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #faf9f6;
}

.search-panel__search-row {
  padding: 18px 20px 0;
}

.search-panel__search-field {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0 12px;
  border-bottom: 1px solid #f0f0f0;
  background: transparent;
}

.search-panel__search-field--active {
  border-bottom-color: #2ca7ff;
}

.search-panel__search-icon {
  width: 18px;
  height: 18px;
  color: #b4b4b4;
  flex-shrink: 0;
}

.search-panel__search-icon--active {
  color: #2ca7ff;
}

.search-panel__search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #413f39;
  padding: 0 14px;
  line-height: 20px;
  outline: none;
}

.search-panel__search-input::placeholder {
  color: #b4b4b4;
  font-weight: 500;
}

.search-panel__reset-btn {
  border: 0;
  background: transparent;
  color: #787878;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  padding: 0;
  margin-left: 6px;
  cursor: pointer;
  flex-shrink: 0;
  align-self: center;
}

.search-panel__reset-btn:hover {
  background: transparent;
  color: #787878;
}

.search-panel__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 0;
  flex-wrap: wrap;
}

.search-panel__control-anchor {
  position: static;
}

.search-panel__control {
  border: 0;
  background: transparent;
  border-radius: 4px;
  padding: 6px;
  color: #787878;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.search-panel__control:hover {
  background: #f0f0f0;
  color: #413f39;
}

.search-panel__control--inactive {
  background: transparent;
  color: #787878;
}

.search-panel__control--active {
  background: rgba(219, 235, 247, 0.4);
  color: #2ca7ff;
}

.search-panel__control--active:hover {
  background: rgba(219, 235, 247, 0.4);
  color: #2ca7ff;
}

.search-panel__results {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: 12px;
  padding: 0 0 16px;
}

.search-panel__results::-webkit-scrollbar {
  width: 4px;
}

.search-panel__results::-webkit-scrollbar-track {
  background: transparent;
}

.search-panel__results::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.search-panel__empty {
  margin-top: 12px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
  color: #787878;
}

.search-result-card {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  border-top: 1px solid #f0f0f0;
  background: transparent;
  border-radius: 0;
  font-family: inherit;
  padding: 14px 20px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.search-result-card:hover {
  background: #ffffff;
}

.search-result-card:first-child {
  border-top: 0;
}

.search-result-card__title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: #787878;
  margin-bottom: 5px;
}

.search-result-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-result-card__meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.search-result-card__channel,
.search-result-card__status {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.search-result-card__channel-hash,
.search-result-card__channel-label,
.search-result-card__status {
  font-size: 12px;
  font-weight: 500;
}

.search-result-card__channel-hash {
  font-weight: 700;
  line-height: 1;
}

.search-result-card__channel-label,
.search-result-card__status {
  color: #787878;
}

.search-result-card__status svg {
  width: 13px;
  height: 13px;
  color: #787878;
  flex-shrink: 0;
}

.search-result-card__date {
  font-size: 12px;
  font-weight: 500;
  color: #787878;
  white-space: nowrap;
  flex-shrink: 0;
}

.search-result-card__date--complete {
  color: #4dcd7d;
}

.search-panel__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  min-width: 168px;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  padding: 0;
  overflow: visible;
  z-index: 7000;
}

.search-panel__dropdown--filter {
  width: 246px;
}

.search-panel__dropdown--date {
  width: 214px;
}

.search-panel__dropdown--channel {
  width: max-content;
  min-width: 0;
  max-width: 206px;
}

.search-panel__dropdown .settings-view__dropdown-arrow {
  right: auto;
  left: 18px;
}

.search-panel__dropdown-header {
  padding: 8px 14px 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: #787878;
}

.search-panel__dropdown .settings-view__dropdown-items {
  padding-bottom: 4px;
}

.search-panel__dropdown-item {
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 14px;
}

.search-panel__dropdown-item--nested {
  padding-left: 32px;
}

.search-panel__dropdown-item--nested .search-panel__dropdown-channel {
  margin-left: 18px;
}

.search-panel__dropdown-channel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.search-panel__dropdown-hash {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.search-panel__dropdown-item--disabled {
  cursor: default;
  color: #b0b0b0;
}

.search-panel__dropdown-item--disabled:hover {
  background: transparent;
}

.search-panel__coming-soon {
  font-size: 11px;
  font-weight: 600;
  color: #b0b0b0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.backlog-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 16px 20px;
  gap: 18px;
  overflow: hidden;
}

.backlog-panel__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.backlog-panel__title {
  font-size: 20px;
  font-weight: 600;
  color: #413f39;
}

.backlog-panel__filter {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.backlog-panel__filter-text {
  font-size: 14px;
  font-weight: 500;
  color: #787878;
}

.backlog-panel__list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  padding-right: 4px;
}

.backlog-panel__list::-webkit-scrollbar {
  width: 4px;
}

.backlog-panel__list::-webkit-scrollbar-track {
  background: transparent;
}

.backlog-panel__list::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.backlog-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.backlog-section__header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.backlog-section__badge {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.backlog-section__title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #413f39;
}

.backlog-section__add-btn {
  border: 0;
  background: transparent;
  color: #787878;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.backlog-section__add-btn svg {
  width: 12px;
  height: 12px;
}

.backlog-section__add-btn:hover {
  background: #78787833;
  color: #413f39;
}

.backlog-section__list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 14px;
}

.backlog-section__list.drag-over {
  min-height: 40px;
}

.backlog-section__list .task-card--placeholder {
  opacity: 0.5;
  border-color: #ece9e2;
  background: #ffffff;
  box-shadow: none;
}

.trash-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 16px 20px;
  gap: 18px;
  overflow: hidden;
}

.trash-panel__intro {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trash-panel__title {
  font-size: 20px;
  font-weight: 600;
  color: #413f39;
}

.trash-panel__description {
  font-size: 14px;
  font-weight: 500;
  color: #787878;
}

.trash-panel__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

.trash-panel__empty {
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
  color: #787878;
}

.trash-panel__list::-webkit-scrollbar {
  width: 4px;
}
.trash-panel__list::-webkit-scrollbar-track {
  background: transparent;
}
.trash-panel__list::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.archive-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.archive-panel__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.archive-panel__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 16px 20px;
  overflow: hidden;
}

.archive-panel__body--disabled {
  overflow-y: auto;
}

.archive-panel__intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.archive-panel__intro-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.archive-panel__title {
  font-size: 20px;
  font-weight: 600;
  color: #413f39;
}

.archive-panel__description,
.archive-panel__disabled-copy {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: #787878;
}

.archive-panel__days-anchor {
  align-self: flex-start;
}

.archive-panel__days-btn {
  border: 0;
  padding: 0;
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #6a6862;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.archive-panel__delete-all {
  font-size: 12px;
  font-weight: 600;
  color: #b4b4b4;
  padding: 7px 5px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.archive-panel__delete-all:hover {
  background-color: #f25a43;
  color: #ffffff;
  box-shadow: 0 2px 4px #0003;
}

.archive-panel__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

.archive-panel__empty {
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
  color: #787878;
}

.archive-panel__list::-webkit-scrollbar {
  width: 4px;
}

.archive-panel__list::-webkit-scrollbar-track {
  background: transparent;
}

.archive-panel__list::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.archive-panel__enable-btn {
  align-self: flex-start;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  background: #ffffff;
  color: #413f39;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 10px;
  cursor: pointer;
  box-shadow: 0 1px 2px #0000001a;
  transition: box-shadow 0.24s;
  margin-top: 8px;
  margin-bottom: 22px;
}

.archive-panel__enable-btn:hover {
  box-shadow: 0 2px 4px #0003;
}

.archive-panel__guide {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.archive-panel__guide + .archive-panel__guide {
  margin-top: 24px;
}

.archive-panel__guide-heading {
  font-size: 14px;
  font-weight: 600;
  color: #413f39;
  margin-bottom: 12px;
}

.archive-panel__guide-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
  color: #413f39;
  margin-bottom: 12px;
}

.archive-panel__guide-step:last-child {
  margin-bottom: 0;
}

.archive-panel__guide-badge {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #4dcd7d;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}

.archive-panel__days-dropdown {
  min-width: 116px;
}

.right-rail {
  width: var(--right-rail-width);
  min-width: var(--right-rail-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 12px 8px;
  border-left: 1px solid var(--color-border-light);
  background: var(--color-main-card-bg);
}

.app-shell--today-view .right-rail {
  border-left-color: transparent;
}

.right-rail__btn,
.right-rail__collapse {
  border: 0;
  background: transparent;
  color: #787878;
  border-radius: 10px;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.12s ease;
}

.right-rail__btn svg,
.right-rail__collapse svg {
  width: 14px;
  height: 14px;
}

.right-rail__btn:hover,
.right-rail__btn--active,
.right-rail__collapse:hover {
  background: rgba(120, 120, 120, 0.2);
  color: #413f39;
}

.right-rail__indicator {
  position: absolute;
  top: 2px;
  right: 2px;
  transform: translate(50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ff79a7;
}

.right-rail__collapse {
  opacity: 0;
  pointer-events: none;
}

.right-rail:hover .right-rail__collapse {
  opacity: 1;
  pointer-events: auto;
}

.right-rail__collapse-icon--expand {
  display: none;
}

.app-shell.right-sidebar-collapsed .right-sidebar__panel {
  display: none;
}

.app-shell.right-sidebar-collapsed .right-rail__collapse-icon--collapse {
  display: none;
}

.app-shell.right-sidebar-collapsed .right-rail__collapse-icon--expand {
  display: inline-flex;
}

.app-shell--today-view .right-rail__collapse {
  display: none;
}

/* ═══════════════════════════════════════════════
   CALENDAR PANEL
═══════════════════════════════════════════════ */
.calendar-panel {
  position: relative;
  width: 100%;
  min-width: 0;
  background: var(--color-main-card-bg);
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.calendar-panel__header {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: var(--topbar-height);
  font-size: 12px;
  font-weight: 600;
  color: #787878;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.cal-header-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.calendar-day-badge {
  position: relative;
  display: flex;
  align-items: stretch;
  padding: 12px 12px 8px 0;
  background: var(--color-main-card-bg);
  border-bottom: 1px solid var(--color-border);
  z-index: 2;
  flex-shrink: 0;
}

.calendar-day-badge::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 48px;
  width: 1px;
  background: var(--color-border);
  pointer-events: none;
}

.calendar-zoom {
  width: 48px;
  min-width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  align-self: stretch;
  gap: 4px;
  padding: 6px 0 4px;
}

.calendar-zoom__btn {
  width: 14px;
  height: 14px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border-radius: 4px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.calendar-zoom__btn:disabled {
  color: #d2d2d2;
  cursor: default;
}

.calendar-zoom__value {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
  text-transform: lowercase;
}

.calendar-day-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-left: 12px;
  gap: 0;
  visibility: hidden;
}

.calendar-day-info--ready {
  visibility: visible;
}

.calendar-day-info--past {
  visibility: visible;
}

.calendar-day-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  line-height: 1.2;
}

.calendar-day-number {
  font-size: 38px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1;
  letter-spacing: -1px;
}

.calendar-panel--past .cal-event:not(#cal-event-ghost) {
  opacity: 0.5;
}

.calendar-panel--past .calendar-day-info {
  opacity: 0.5;
}

/* Time grid */
.time-grid-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.time-grid-wrapper::-webkit-scrollbar {
  width: 4px;
}
.time-grid-wrapper::-webkit-scrollbar-track {
  background: transparent;
}
.time-grid-wrapper::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.time-grid {
  position: relative;
  padding: 0 12px 20px 0;
}

.time-grid::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 48px;
  width: 1px;
  background: var(--color-border);
  pointer-events: none;
  z-index: 0;
}

.time-grid__row {
  display: flex;
  align-items: stretch;
  height: var(--hour-height);
  border-bottom: 1px solid var(--color-border-light);
}

.time-grid__label {
  font-size: 10px;
  color: var(--color-text-muted);
  width: 48px;
  min-width: 48px;
  padding: 4px 8px 0 10px;
  text-align: right;
  line-height: 1;
}

.time-grid__track {
  flex: 1;
}

/* Workday boundary markers */
.workday-marker {
  position: absolute;
  left: 48px;
  right: 12px;
  top: calc(var(--offset, 0) * var(--hour-height));
  transform: translateY(-2.5px);
  height: 5px;
  display: flex;
  align-items: center;
  z-index: 1;
  cursor: ns-resize;
}

.workday-marker__badge {
  position: absolute;
  left: -40px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 40px;
  max-width: 48px;
  height: 24px;
  padding: 0 4px;
  border-radius: 8px;
  border: 2px solid #bdbdbd;
  background: #ffffff;
  color: #8f8f8f;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  text-transform: uppercase;
}

.workday-marker__curve {
  flex: 1;
  height: 5px;
  opacity: 0.95;
  background-image:
    linear-gradient(135deg, transparent 44%, var(--color-workday-marker) 46%, var(--color-workday-marker) 54%, transparent 56%),
    linear-gradient(225deg, transparent 44%, var(--color-workday-marker) 46%, var(--color-workday-marker) 54%, transparent 56%);
  background-size: 12px 5px, 12px 5px;
  background-position: 0 0, 6px 0;
  background-repeat: repeat-x;
}

.workday-marker:hover .workday-marker__curve,
.workday-marker.workday-marker--active .workday-marker__curve {
  filter: brightness(0.92);
}

.workday-marker:hover .workday-marker__badge,
.workday-marker.workday-marker--active .workday-marker__badge {
  opacity: 1;
}

body.is-workday-marker-dragging {
  user-select: none;
  -webkit-user-select: none;
  cursor: ns-resize;
}

/* Current time indicator */
.current-time-line {
  position: absolute;
  left: 48px;
  right: 12px;
  top: calc(var(--offset, 0) * var(--hour-height));
  transform: translateY(-1px);
  height: 2px;
  background: #f25a43;
  opacity: 0.6;
  pointer-events: none;
  z-index: 999;
}

/* Calendar events */
.cal-event {
  position: absolute;
  --cal-track-left: 52px;
  --cal-track-right: 12px;
  --lane-frac: 0;
  --lane-size: 1;
  left: calc(var(--cal-track-left) + ((100% - var(--cal-track-left) - var(--cal-track-right)) * var(--lane-frac)));
  width: calc((100% - var(--cal-track-left) - var(--cal-track-right)) * var(--lane-size));
  border-radius: 5px;
  padding: 5px 8px 4px;
  color: white;
  overflow: hidden;
  top: calc(var(--offset) * var(--hour-height));
  height: calc(var(--duration) * var(--hour-height) - 2px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  transition: top 0.15s ease, height 0.15s ease;
}

.cal-event__title {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
}

.cal-event__time {
  font-size: 10.5px;
  opacity: 0.85;
  font-weight: 400;
}

.cal-event--blue   { background-color: var(--color-event-blue); }
.cal-event--orange { background-color: var(--color-event-orange); }
.cal-event--green  { background-color: var(--color-event-green); }
.cal-event--purple { background-color: var(--color-event-purple); }

/* Actual-time event diagonal stripe overlay */
.cal-event--actual {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 3px,
    rgba(255, 255, 255, 0.22) 3px,
    rgba(255, 255, 255, 0.22) 5px
  );
}

/* ═══════════════════════════════════════════════
   DRAG AND DROP
═══════════════════════════════════════════════ */

/* Task card grab cursor */
.task-card {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: element;
}

.task-card:active {
  cursor: pointer;
}

.task-card * {
  user-select: none;
  -webkit-user-select: none;
}

/* Card being dragged */
.task-card--dragging {
  opacity: 0;
  cursor: grabbing;
  position: absolute !important;
  height: 0 !important;
  min-height: 0 !important;
  width: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-width: 0 !important;
  margin: 0 !important;
  overflow: hidden;
  box-shadow: none;
  pointer-events: none;
}

.task-card--placeholder {
  opacity: 0.45;
  border-style: dashed;
  box-shadow: none;
  pointer-events: none;
}

.task-card--pointer-ghost {
  position: fixed !important;
  left: 0;
  top: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.95;
  margin: 0 !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.is-task-reordering .task-card {
  transition: none !important;
}

.is-task-reordering .task-card:hover {
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 1px;
}

/* Column task list drop zone highlight */
.task-list.drag-over {
  min-height: 40px;
}

/* Drop position indicator line */
.drop-indicator {
  width: calc(100% - 2px);
  height: 0;
  border-top: 2px solid var(--color-progress-fill);
  pointer-events: none;
  position: absolute;
  left: 1px;
  right: 1px;
  z-index: 2;
}

/* ═══════════════════════════════════════════════
   TASK DETAIL MODAL
═══════════════════════════════════════════════ */
.task-modal-overlay {
  position: fixed;
  inset: 0;
  padding: 36px;
  background-color: rgba(43, 36, 62, 0.3);
  z-index: 4000;
}

.shortcuts-overlay {
  position: fixed;
  inset: 0;
  padding: 20px 20px 20px 36px;
  background-color: rgba(43, 36, 62, 0.3);
  z-index: 4500;
  display: flex;
  justify-content: flex-end;
}

.shortcuts-overlay__panel {
  width: min(400px, calc(var(--calendar-width) + var(--right-rail-width) + 44px));
  height: calc(100vh - 40px);
  max-height: calc(100vh - 40px);
  background: #ffffff;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shortcuts-overlay__header {
  padding: 22px 22px 24px;
  flex-shrink: 0;
}

.shortcuts-overlay__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #413f39;
}

.shortcuts-overlay__search-row {
  padding: 0 22px 24px;
  flex-shrink: 0;
}

.shortcuts-overlay__search-field {
  position: relative;
}

.shortcuts-overlay__search-icon {
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #f0f0f0;
  pointer-events: none;
}

.shortcuts-overlay__search-input {
  width: 100%;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0);
  color: #413f39;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  padding: 4px 8px 4px 30px;
  outline: none;
}

.shortcuts-overlay__search-input::placeholder {
  color: #b4b4b4;
}

.shortcuts-overlay__search-input:focus {
  border-color: #f0f0f0;
}

.shortcuts-overlay__content {
  flex: 1;
  overflow-y: auto;
  padding: 0 22px 22px;
}

.shortcuts-overlay__content::-webkit-scrollbar {
  width: 6px;
}

.shortcuts-overlay__content::-webkit-scrollbar-thumb {
  background: #e0ddd5;
  border-radius: 999px;
}

.shortcuts-overlay__empty {
  padding: 18px 2px 0;
  font-size: 14px;
  font-weight: 500;
  color: #9b988f;
}

.shortcuts-overlay__section + .shortcuts-overlay__section {
  margin-top: 26px;
}

.shortcuts-overlay__section-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: #413f39;
}

.shortcuts-overlay__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shortcuts-overlay__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.shortcuts-overlay__row--disabled {
  opacity: 0.48;
}

.shortcuts-overlay__label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: #5a5851;
}

.shortcuts-overlay__keys {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.shortcuts-overlay__sequence {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.shortcuts-overlay__joiner {
  font-size: 12px;
  font-weight: 600;
  color: #a3a09a;
  padding: 0 2px;
}

.shortcuts-overlay__key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 2px 4px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #413f39;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.shortcuts-overlay__key--literal {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 500;
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .shortcuts-overlay {
    padding: 8px;
  }

  .shortcuts-overlay__panel {
    width: min(100%, 390px);
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
  }
}

.task-modal-overlay--suppress-subtask-hover .task-modal__subtask-row:hover {
  background: transparent;
}

.task-modal-overlay--suppress-subtask-hover .task-modal__subtask-row:hover .task-modal__subtask-grab,
.task-modal-overlay--suppress-subtask-hover .task-modal__subtask-row:hover .task-modal__subtask-actions {
  opacity: 0;
  pointer-events: none;
}

.task-modal-overlay--subtask-dragging {
  cursor: grabbing;
}

.task-modal-overlay--subtask-dragging .task-modal__subtask-row {
  user-select: none;
}

.task-modal-overlay--subtask-dragging .task-modal__subtask-row:hover {
  background: transparent;
}

.task-modal-overlay--subtask-dragging .task-modal__subtask-row:hover .task-modal__subtask-grab,
.task-modal-overlay--subtask-dragging .task-modal__subtask-row:hover .task-modal__subtask-actions {
  opacity: 0;
  pointer-events: none;
}

.task-modal {
  --task-modal-time-prefix-width: 96px;
  --task-modal-time-col-width: 66px;
  height: calc(100vh - 72px);
  max-height: calc(100vh - 72px);
  max-width: 670px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.task-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: 28px 28px 0;
  flex-shrink: 0;
}

.task-modal__meta-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.task-modal__meta-label {
  font-size: 8px;
  letter-spacing: 0.5px;
  color: #8e8e8e;
  font-weight: 500;
}

.task-modal__channel {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #3f3f3f;
  font-size: 13px;
  height: 30px;
  padding: 0 8px;
  border-radius: 4px;
  margin-left: -8px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.task-modal__channel:hover {
  background: #f7f8fa;
}

.task-modal__channel-hash {
  font-weight: 500;
}

.task-modal__meta-right {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.task-modal__start {
  font-size: 16px;
  line-height: 1.1;
  color: #3c3c3c;
  font-weight: 500;
}

.task-modal__meta-start-btn {
  font-family: inherit;
  font-size: 13px;
  height: 30px;
  padding: 0 8px;
  border-radius: 4px;
  background: #ffffff;
  border: none;
  color: #3c3c3c;
  cursor: pointer;
  margin-left: -8px;
  transition: background 0.12s ease;
}

.task-modal__meta-start-btn:hover {
  background: #f7f8fa;
}

.task-modal__top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-modal__top-action {
  border: none;
  background: transparent;
  color: #b4b4b4;
  font-family: inherit;
  font-size: 13px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.task-modal__top-action:hover {
  background: #f7f8fa;
}

.task-modal__top-action--icon {
  padding: 0 4px;
}

.task-modal__top-action svg {
  width: 14px;
  height: 14px;
}

.task-modal__body {
  padding: 24px 28px 24px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.task-modal__trash-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0f0f0;
  color: #787878;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 24px;
  border-radius: 0;
  margin-top: 24px;
}

.task-modal__trash-link {
  border: 0;
  background: transparent;
  color: #2ca7ff;
  font-weight: 600;
  font-size: 14px;
  padding: 0;
  cursor: pointer;
}

.task-modal__trash-link:hover {
  text-decoration: none;
}

.task-modal__hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.task-modal__title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}

.task-modal__check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #b7b7b7;
  color: #b7b7b7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: 3px;
  background: none;
  padding: 0;
  cursor: pointer;
}

.task-modal__check:hover {
  border-color: var(--color-complete-fill);
}

.task-modal__check:hover svg {
  color: var(--color-complete-fill);
}

.task-modal__check svg {
  width: 14px;
  height: 14px;
}

.task-modal__check--complete {
  border-color: var(--color-complete-fill);
  color: #ffffff;
  background: var(--color-complete-fill);
}

.task-modal__check--complete:hover {
  border-color: var(--color-complete-fill);
}

.task-modal__check--complete:hover svg {
  color: #ffffff;
}

.task-modal__title {
  font-size: 24px;
  line-height: 1.14;
  font-weight: 500;
  color: #3d3d3d;
  letter-spacing: -0.3px;
  overflow-wrap: anywhere;
  outline: none;
}

.task-modal__hero-right {
  display: grid;
  grid-template-columns: var(--task-modal-time-prefix-width) var(--task-modal-time-col-width) var(--task-modal-time-col-width);
  align-items: start;
  column-gap: 16px;
  flex: 0 0 auto;
  padding-top: 6px;
}

.task-modal__hero-right--backlog {
  grid-template-columns: var(--task-modal-time-col-width);
  justify-content: end;
  margin-left: auto;
}

.task-modal__start-btn {
  border: 1.5px solid #f0f0f0;
  border-radius: 4px;
  background: transparent;
  color: #b4b4b4;
  padding: 6px 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  width: auto;
  min-width: 0;
  justify-self: end;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
}

.task-modal__start-btn svg {
  width: 12px;
  height: 12px;
}

.task-modal__start-btn:hover {
  border-color: #4dcd7d;
  color: #4dcd7d;
}

.task-modal__start-btn--stop {
  border-color: #f25a43;
  color: #f25a43;
}

.task-modal__start-btn--stop:hover {
  border-color: #f25a43;
  color: #f25a43;
}

.task-modal__metric-value--running {
  color: #4dcd7d !important;
  min-width: 46px;
  text-align: right;
}

.task-modal__metric {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  min-width: var(--task-modal-time-col-width);
}

.task-modal__metric-label {
  font-size: 8px;
  letter-spacing: 0.5px;
  color: #7d7d7d;
  font-weight: 500;
}

.task-modal__metric-value {
  font-size: 12px;
  line-height: 1;
  color: #5b5b5b;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.task-modal__metric-value--placeholder {
  color: #b4b4b4;
}

.task-modal__metric-value--set {
  color: #787878;
}

.task-modal__subtasks {
  margin-top: 10px;
  margin-left: -28px;
  margin-right: -28px;
}

.task-modal__subtask-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-modal__subtask-row {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) var(--task-modal-time-prefix-width) var(--task-modal-time-col-width) var(--task-modal-time-col-width);
  align-items: center;
  gap: 16px;
  min-height: 34px;
  border-radius: 0;
  margin-left: 0;
  margin-right: 0;
  padding: 2px 30px 2px 32px;
}

.task-modal__subtask-row:hover {
  background: #f7f8fa;
}

.task-modal__subtask-row--dragging {
  opacity: 0.5;
}

.task-modal__subtask-row--drop-before {
  box-shadow: inset 0 1px 0 #d4d9e1;
}

.task-modal__subtask-row--drop-after {
  box-shadow: inset 0 -1px 0 #d4d9e1;
}

.task-modal__subtask-grab {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: auto;
  color: #b4b4b4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  cursor: grab;
}

.task-modal__subtask-grab svg {
  width: 14px;
  height: 14px;
}

.task-modal__subtask-row:hover .task-modal__subtask-grab {
  opacity: 1;
}

.task-modal__subtask-grab:hover,
.task-modal__subtask-grab:active {
  opacity: 1;
}

.task-modal__subtask-check {
  -webkit-appearance: none;
  appearance: none;
  margin-top: 1px;
  width: 16px;
  height: 16px;
  border-color: #b4b4b4;
  color: #b4b4b4;
  outline: none;
}

.task-modal__subtask-check svg {
  width: 10px;
  height: 10px;
}

.task-modal__subtask-check.task-modal__check--complete {
  border-color: #4dcd7d;
  background: #4dcd7d;
  color: #ffffff;
}

.task-modal__subtask-check.task-modal__check--complete svg {
  color: #ffffff;
}

.task-modal__subtask-text {
  min-width: 0;
  outline: none;
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 24px;
  color: #b4b4b4;
  min-height: 24px;
}

.task-modal__subtask-text--filled {
  color: #3c3c3c;
}

.task-modal__subtask-text:empty::before {
  content: attr(data-placeholder);
  color: #b4b4b4;
}

.task-modal__subtask-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
}

.task-modal__subtask-row:hover .task-modal__subtask-actions {
  opacity: 1;
  pointer-events: auto;
}

.task-modal__subtask-action {
  border: none;
  background: transparent;
  color: #b4b4b4;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.task-modal__subtask-action svg {
  width: 14px;
  height: 14px;
}

.task-modal__subtask-action:hover {
  color: #787878;
}

.task-modal__subtask-time {
  border: none;
  background: transparent;
  text-align: right;
  padding: 2px 0;
  border-radius: 4px;
  min-width: 0;
}

.task-modal__subtask-time-value {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.task-modal__subtask-time-value--placeholder {
  color: #b4b4b4;
}

.task-modal__subtask-time-value--set {
  color: #787878;
}

.task-modal__subtask-time-value--running {
  color: #4dcd7d;
}

.task-modal__subtask-time:hover .task-modal__subtask-time-value--placeholder,
.task-modal__subtask-time:hover .task-modal__subtask-time-value--set {
  color: #9b9b9b;
}

.task-modal__add-subtask {
  margin-top: 2px;
  border: none;
  background: transparent;
  color: #b4b4b4;
  display: grid;
  grid-template-columns: 16px auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  font-size: 14px;
  font-weight: 500;
  min-height: 34px;
  padding: 2px 30px 2px 32px;
  justify-items: start;
  text-align: left;
}

.task-modal__add-subtask-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.task-modal__add-subtask-icon svg {
  width: 10px;
  height: 10px;
}

.task-modal__add-subtask:hover {
  color: #2ca7ff;
}

/* task-modal__notes replaced by task-modal__notes-editor (Quill) */

/* placeholder now handled by Quill's ql-blank::before */

.task-modal__divider {
  margin: 12px 0 0;
  border-top: 1px solid #ebebeb;
  flex-shrink: 0;
}

/* Timebox entries section */
.task-modal__timebox-section {
  padding: 16px 0 4px;
  margin-left: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.task-modal__timebox-heading {
  font-size: 12px;
  font-weight: 700;
  color: #787878;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.task-modal__timebox-entry {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.task-modal__timebox-date,
.task-modal__timebox-time {
  font-size: 14px;
  font-weight: 500;
  color: #413f39;
}

.task-modal__timebox-duration {
  font-size: 12px;
  font-weight: 500;
  color: #787878;
}

.task-modal__timeline {
  padding-top: 18px;
  min-height: 0;
  overflow: auto;
}

.task-modal__timeline-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 24px;
  position: relative;
}

.task-modal__timeline-list::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: #e2e2e2;
}

.task-modal__timeline-item {
  font-size: 14px;
  color: #666666;
  line-height: 1.25;
  position: relative;
}

.task-modal__timeline-item::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d7d7d7;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .task-modal__header,
  .task-modal__body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .task-modal__body {
    padding-top: 22px;
  }

  .task-modal__hero {
    flex-direction: column;
    gap: 18px;
  }

  .task-modal__title {
    font-size: 22px;
  }

  .task-modal__start {
    font-size: 16px;
  }

  .task-modal__start-btn {
    font-size: 10px;
    border-radius: 4px;
  }

  .task-modal__metric-value {
    font-size: 12px;
  }

  /* task-modal__notes responsive override now in Quill section */

  .task-modal__timeline-item {
    font-size: 13px;
  }
}

@media (max-width: 700px) {
  .task-modal-overlay {
    padding: 36px;
  }

  .task-modal__header {
    flex-direction: column;
    gap: 14px;
    padding-top: 20px;
  }

  .task-modal__meta-right {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .task-modal__top-actions {
    margin-bottom: 0;
    flex-wrap: wrap;
    row-gap: 6px;
  }
}

/* ═══════════════════════════════════════════════
   DATE PICKER DROPDOWNS
═══════════════════════════════════════════════ */

.task-modal__meta-group--start {
  position: relative;
}

.task-modal__due-wrap {
  position: relative;
  display: inline-flex;
}

.task-modal__top-action--has-due {
  color: #3c3c3c;
}

.task-modal__top-action--overdue {
  color: #f34235;
}

.task-modal__top-action--overdue:hover {
  color: #f34235;
}

.task-modal__meta-start-btn--overdue {
  color: #f34235;
}

.task-modal__meta-label--overdue {
  color: #f34235;
}

.start-date-picker,
.due-date-picker {
  position: absolute;
  top: calc(100% + 8px);
  left: -8px;
  width: 240px;
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  box-shadow: 0 6px 12px #0003;
  z-index: 5000;
  padding: 8px 0;
}

.topbar-date-picker {
  top: calc(100% + 12px);
  left: 0;
}

.topbar-date-picker .sdp__arrow {
  left: 12px;
}

.sdp__arrow {
  position: absolute;
  top: -6px;
  left: 20px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  transform: rotate(45deg);
  border-top: 1px solid #dcdcdc;
  border-left: 1px solid #dcdcdc;
  box-shadow: none;
}

.sdp__section {
  padding: 4px 0;
}

.sdp__section-label {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #787878;
  padding: 4px 14px;
}

.sdp__menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 14px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #413f39;
  cursor: pointer;
  transition: background 0.1s ease;
  text-align: left;
}

.sdp__menu-item:hover {
  background: #f5f5f5;
}

.sdp__menu-item:focus,
.sdp__menu-item:focus-visible {
  outline: none;
}

.sdp__menu-item.picker-nav-highlighted {
  background: #f5f5f5;
}

.picker-nav--keyboard .sdp__menu-item:hover:not(.picker-nav-highlighted) {
  background: transparent;
}

.sdp__menu-item:disabled {
  color: #b4b4b4;
  cursor: not-allowed;
}

.sdp__menu-item:disabled:hover {
  background: transparent;
}

.sdp__menu-item:disabled .sdp__shortcut {
  color: #b4b4b4;
}

.sdp__shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12px;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: #787878;
  font-family: inherit;
  border: none;
  background: none;
}

.sdp__shortcut-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.sdp__backlog-option-main {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.sdp__backlog-badge {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.sdp__backlog-check {
  width: 16px;
  height: 16px;
  color: #413f39;
}

.task-modal__backlog-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.task-modal__backlog-start-badge {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.sdp__divider {
  height: 1px;
  background: #ebebeb;
  margin: 4px 0;
}

.workspace-menu {
  top: calc(100% + 8px);
  left: 0;
  width: max-content;
  min-width: 200px;
  z-index: 6000;
}

.workspace-menu .ellipsis-menu__item-content {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  white-space: nowrap;
}

.workspace-menu__shortcut-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 2px 4px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #413f39;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  margin-left: auto;
}

.workspace-menu__meta {
  padding: 4px 14px 2px;
  font-size: 12px;
  font-weight: 500;
  color: #787878;
}

.workspace-menu__email {
  padding: 0 14px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #413f39;
}

.sdp-cal {
  padding: 4px 10px 8px;
}

.sdp-cal__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 8px;
}

.sdp-cal__nav-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #787878;
  padding: 2px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sdp-cal__nav-btn:hover {
  background: #f5f5f5;
  color: #666666;
}

.sdp-cal__nav-btn svg {
  width: 14px;
  height: 14px;
}

.sdp-cal__month-label {
  font-size: 13px;
  font-weight: 600;
  color: #413f39;
}

.sdp-cal__grid {
  width: 100%;
  border-collapse: collapse;
}

.sdp-cal__grid th {
  font-size: 10px;
  font-weight: 600;
  color: #b4b4b4;
  text-align: center;
  padding: 2px 0 6px;
}

.sdp-cal__grid td {
  text-align: center;
  padding: 1px 0;
}

.sdp-cal__day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 50%;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #413f39;
  cursor: pointer;
  transition: background 0.1s ease;
}

.sdp-cal__day:hover {
  background: #f0f0f0;
}

.sdp-cal__day--outside {
  color: #d0d0d0;
}

.sdp-cal__day--today {
  background: #2ca7ff;
  color: #ffffff;
}

.sdp-cal__day--today:hover {
  background: #1a96ee;
}

.sdp-cal__day--selected:not(.sdp-cal__day--today) {
  background: #d0e7fb;
  color: #2ca7ff;
}

.sdp-cal__day--disabled,
.sdp-cal__day:disabled {
  color: #d0d0d0;
  background: transparent;
  cursor: not-allowed;
}

.sdp-cal__day--disabled:hover,
.sdp-cal__day:disabled:hover {
  background: transparent;
}

/* ═══════════════════════════════════════════════
   ELLIPSIS MENU (Task Detail)
═══════════════════════════════════════════════ */
.ellipsis-menu-wrap {
  position: relative;
}

.ellipsis-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: -16px;
  width: 200px;
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  box-shadow: 0 6px 12px #0003;
  z-index: 5000;
  padding: 8px 0;
}

.ellipsis-menu .sdp__arrow {
  left: auto;
  right: 21px;
}

.ellipsis-menu__item-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ellipsis-menu__icon {
  width: 16px !important;
  height: 16px !important;
  color: #b4b4b4;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   PLANNED TIME PICKER
═══════════════════════════════════════════════ */
.task-modal__metric--planned,
.task-modal__metric--actual {
  cursor: pointer;
}

.task-modal__metric--planned:hover .task-modal__metric-value--set,
.task-modal__metric--actual:hover .task-modal__metric-value--set {
  color: #B4B4B4;
}

.task-modal__metric--planned:hover .task-modal__metric-value--placeholder,
.task-modal__metric--actual:hover .task-modal__metric-value--placeholder {
  color: #B4B4B4;
}

.task-modal__metric--disabled {
  cursor: default;
  pointer-events: none;
}

.planned-picker {
  position: absolute;
  top: calc(100% + 8px);
  right: -8px;
  width: 125px;
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  box-shadow: 0 6px 12px #0003;
  z-index: 5000;
  padding: 12px 0 8px;
  text-align: left;
}

.planned-picker__arrow {
  position: absolute;
  top: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  transform: rotate(45deg);
  border-top: 1px solid #dcdcdc;
  border-left: 1px solid #dcdcdc;
  box-shadow: none;
}

.planned-picker__header {
  font-size: 12px;
  font-weight: 400;
  color: #787878;
  padding: 0 15px 4px;
}

.planned-picker__time-display {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: #787878;
  padding: 4px 15px 8px;
  background: none;
  border: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
}

.planned-picker__time-display:hover {
  color: #413F39;
}

.planned-picker__divider {
  border-top: 1px solid #ebebeb;
  margin: 4px 0;
}

.planned-picker__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 4px 15px;
  font-size: 14px;
  font-weight: 500;
  color: #413F39;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.planned-picker__option:hover {
  background: #f5f5f5;
}

.planned-picker__option:focus,
.planned-picker__option:focus-visible,
.planned-picker__time-display:focus,
.planned-picker__time-display:focus-visible,
.planned-picker__clear:focus,
.planned-picker__clear:focus-visible {
  outline: none;
}

.planned-picker__option.picker-nav-highlighted,
.planned-picker__time-display.picker-nav-highlighted,
.planned-picker__clear.picker-nav-highlighted {
  background: #f5f5f5;
}

.picker-nav--keyboard .planned-picker__option:hover:not(.picker-nav-highlighted),
.picker-nav--keyboard .planned-picker__time-display:hover:not(.picker-nav-highlighted),
.picker-nav--keyboard .planned-picker__clear:hover:not(.picker-nav-highlighted) {
  background: transparent;
}

.planned-picker__option--selected {
  font-weight: 500;
}

.planned-picker__check {
  font-size: 14px;
  color: #413F39;
}

.planned-picker__clear {
  display: block;
  width: 100%;
  padding: 4px 15px;
  font-size: 12px;
  font-weight: 500;
  color: #2ca7ff;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.planned-picker__clear:hover {
  background: #f5f5f5;
}

/* Actual time history section */
.actual-picker__history-entry {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 15px;
  font-size: 13px;
}

.actual-picker__history-time {
  font-size: 14px;
  font-weight: 500;
  color: #413f39;
  min-width: 32px;
}

.actual-picker__history-date {
  font-size: 12px;
  font-weight: 500;
  color: #787878;
  flex: 1;
}

.actual-picker__history-delete {
  background: none;
  border: none;
  color: #f25a43;
  cursor: pointer;
  padding: 0;
  width: 14px;
  height: 14px;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* Time entry mode */
.planned-picker__time-entry {
  display: flex;
  align-items: baseline;
  padding: 8px 0 0;
  border-bottom: 1px solid #2ca7ff;
  margin: 0 15px 4px;
}

.planned-picker__input {
  width: 20px;
  font-size: 16px;
  font-weight: 500;
  color: #b4b4b4;
  border: none;
  outline: none;
  text-align: left;
  padding: 2px 0 6px;
  font-family: inherit;
  background: transparent;
}

.planned-picker__input--has-value {
  color: #413F39;
}

.planned-picker__input--hours {
  width: 12px;
}

.planned-picker__input:focus {
  background: transparent;
}

.planned-picker__colon {
  font-size: 16px;
  font-weight: 500;
  color: #b4b4b4;
  padding-bottom: 6px;
  margin: 0 2px;
}

.planned-picker__colon--has-value {
  color: #413F39;
}

.planned-picker__hint {
  font-size: 10px;
  font-weight: 500;
  color: #B4B4B4;
  padding: 6px 15px 4px;
}

.planned-picker__calculated-hint {
  font-size: 12px;
  font-weight: 500;
  color: #787878;
  padding: 8px 15px 4px;
  cursor: default;
}

/* ═══════════════════════════════════════════════
   FOCUS MODE
═══════════════════════════════════════════════ */
.focus-modal {
  position: fixed;
  inset: 8px;
  left: var(--sidebar-width);
  background: #ffffff;
  border-radius: 4px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
  transition: left 0.2s ease;
}

.focus-modal--sidebar-collapsed {
  left: 8px;
}

.focus-modal__topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
}

.focus-modal__sidebar-expand {
  display: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #787878;
  cursor: pointer;
  transition: color 0.12s ease;
}

.focus-modal__sidebar-expand svg {
  width: 12px;
  height: 12px;
}

.focus-modal__sidebar-expand:hover {
  color: #413f39;
}

.focus-modal--sidebar-collapsed .focus-modal__sidebar-expand {
  display: inline-flex;
}

.focus-modal__close {
  margin-left: auto;
}

.focus-modal__tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: #413f39;
  background: #f0f0f0;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  cursor: pointer;
}

.focus-modal__tab svg {
  width: 14px;
  height: 14px;
}

.focus-modal__content {
  --focus-actual-col: 124px;
  --focus-planned-col: 96px;
  --focus-start-col: 96px;
  flex: 1;
  overflow-y: auto;
  padding: 72px 108px 56px;
}

.focus-modal__task-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.focus-modal__title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0;
  flex: 1;
  min-width: 0;
}

.focus-modal__title-wrap .task-modal__check {
  width: 20px;
  height: 20px;
  margin-top: 8px;
  margin-right: 16px;
}

.focus-modal__title-wrap .task-modal__check svg {
  width: 10px;
  height: 10px;
}

.focus-modal__title {
  font-size: 32px;
  font-weight: 600;
  color: #413f39;
  line-height: 1.22;
  letter-spacing: 0;
  margin: 0;
  outline: none;
}

.focus-modal__metrics {
  display: grid;
  grid-template-columns: var(--focus-actual-col) var(--focus-planned-col) var(--focus-start-col);
  align-items: end;
  justify-items: end;
  gap: 16px;
  flex: 0 0 auto;
}

.focus-modal__metric {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.focus-modal__metric--clickable {
  cursor: pointer;
}

.focus-modal__metric-label {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #787878;
}

.focus-modal__actual {
  font-size: 24px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.focus-modal__actual--placeholder {
  color: #b4b4b4;
}

.focus-modal__actual--set {
  color: #787878;
}

.focus-modal__actual--running {
  color: #4dcd7d;
}

.focus-modal__planned {
  font-size: 24px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.focus-modal__planned--placeholder {
  color: #b4b4b4;
}

.focus-modal__planned--set {
  color: #787878;
}

.focus-modal__metric--clickable:hover .focus-modal__actual--placeholder,
.focus-modal__metric--clickable:hover .focus-modal__planned--placeholder {
  color: #787878;
}

.focus-modal__stop-btn {
  border: 1.5px solid #f25a43;
  border-radius: 4px;
  background: transparent;
  color: #f25a43;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  justify-content: center;
  line-height: 1;
}

.focus-modal__stop-btn svg {
  width: 12px;
  height: 12px;
}

.focus-modal__start-btn {
  border: 1.5px solid #e5e5e5;
  border-radius: 4px;
  background: transparent;
  color: #a7a7a7;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  justify-content: center;
  line-height: 1;
}

.focus-modal__start-btn svg {
  width: 12px;
  height: 12px;
}

.focus-modal__start-btn:hover {
  border-color: #4dcd7d;
  color: #4dcd7d;
}

.focus-modal__btn--hidden {
  display: none !important;
}

.focus-modal__body {
  margin-left: 0;
  padding-top: 8px;
}

.focus-modal__subtask-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 12px;
}

.focus-modal__subtask-row {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 40px;
  padding: 4px 0;
}

.focus-modal__subtask-row--active {
  background: #f7f8fa;
}

.focus-modal__subtask-row--dragging {
  opacity: 0.45;
}

.focus-modal__subtask-row--drop-before {
  box-shadow: inset 0 1px 0 #d4d9e1;
}

.focus-modal__subtask-row--drop-after {
  box-shadow: inset 0 -1px 0 #d4d9e1;
}

.focus-modal__subtask-grab {
  position: absolute;
  left: -22px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  color: #b4b4b4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  cursor: grab;
}

.focus-modal__subtask-grab svg {
  width: 12px;
  height: 12px;
}

.focus-modal__subtask-row:hover .focus-modal__subtask-grab {
  opacity: 1;
}

.focus-modal__subtask-check {
  width: 16px;
  height: 16px;
  margin-top: 0;
  justify-self: center;
}

.focus-modal__subtask-check svg {
  width: 8px;
  height: 8px;
}

.focus-modal__subtask-title {
  min-width: 0;
  outline: none;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 500;
  color: #413f38;
  min-height: 20px;
  padding-top: 0;
}

.focus-modal__subtask-title:empty::before {
  content: attr(data-placeholder);
  color: #b4b4b4;
}

.focus-modal__subtask-title--filled {
  color: #413f38;
}

.focus-modal__subtask-metrics {
  display: grid;
  grid-template-columns: var(--focus-actual-col) var(--focus-planned-col) var(--focus-start-col);
  align-items: center;
  justify-items: end;
  column-gap: 16px;
}

.focus-modal__subtask-time-btn {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
}

.focus-modal__subtask-actual,
.focus-modal__subtask-planned {
  font-size: 16px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.focus-modal__subtask-actual--placeholder,
.focus-modal__subtask-planned--placeholder {
  color: #b4b4b4;
}

.focus-modal__subtask-actual--set,
.focus-modal__subtask-planned--set {
  color: #787878;
}

.focus-modal__subtask-actual--running {
  color: #4dcd7d;
}

.focus-modal__subtask-actual--placeholder:hover,
.focus-modal__subtask-planned--placeholder:hover {
  color: #787878;
}

.focus-modal__subtask-start-btn {
  border: 1.5px solid #e5e5e5;
  border-radius: 4px;
  background: transparent;
  color: #a7a7a7;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.5px;
  font-weight: 600;
  font-family: inherit;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  line-height: 1;
}

.focus-modal__subtask-row:hover .focus-modal__subtask-start-btn,
.focus-modal__subtask-start-btn--running {
  opacity: 1;
  pointer-events: auto;
}

.focus-modal__subtask-start-btn svg {
  width: 12px;
  height: 12px;
}

.focus-modal__subtask-start-btn:hover {
  border-color: #4dcd7d;
  color: #4dcd7d;
}

.focus-modal__subtask-start-btn--running {
  border-color: #f25a43;
  color: #f25a43;
}

.focus-modal__subtask-start-btn--running:hover {
  border-color: #f25a43;
  color: #f25a43;
}

.focus-modal--subtask-dragging {
  cursor: grabbing;
}

.focus-modal--subtask-dragging .focus-modal__subtask-row {
  user-select: none;
}

.focus-modal--subtask-dragging .focus-modal__subtask-row:hover {
  background: transparent;
}

.focus-modal--subtask-dragging .focus-modal__subtask-row:hover .focus-modal__subtask-grab,
.focus-modal--subtask-dragging .focus-modal__subtask-row:hover .focus-modal__subtask-start-btn {
  opacity: 0;
  pointer-events: none;
}

.focus-modal__add-subtask {
  border: none;
  background: none;
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  justify-items: start;
  gap: 16px;
  color: #b4b4b4;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  padding: 4px 0;
  width: 100%;
  text-align: left;
}

.focus-modal__add-subtask svg {
  width: 16px;
  height: 16px;
  justify-self: center;
}

.focus-modal__add-subtask:hover {
  color: #2ca7ff;
}

/* focus-modal__notes replaced by focus-modal__notes-editor (Quill) */

/* placeholder now handled by Quill's ql-blank::before */

@media (max-width: 1200px) {
  .focus-modal__content {
    padding: 52px 56px 40px;
  }
}

@media (max-width: 760px) {
  .focus-modal {
    inset: 4px;
  }

  .focus-modal__content {
    padding: 26px 20px 20px;
  }

  .focus-modal__task-row {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .focus-modal__metrics {
    grid-template-columns: 1fr 1fr var(--focus-start-col);
  }

  .focus-modal__body {
    margin-left: 0;
  }

  .focus-modal__subtask-row {
    grid-template-columns: 20px minmax(0, 1fr);
    row-gap: 8px;
    align-items: start;
    padding: 8px 0;
  }

  .focus-modal__subtask-metrics {
    grid-column: 2;
    grid-template-columns: 1fr 1fr var(--focus-start-col);
    width: 100%;
  }

  .focus-modal__subtask-grab {
    left: -14px;
  }
}

.drop-indicator::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 0;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-progress-fill);
}

/* Calendar ghost block */
.cal-event-ghost {
  opacity: 1;
  pointer-events: none;
  border: 2px dashed rgba(255, 255, 255, 0.7);
  background: var(--color-progress-fill);
  z-index: 1000;
}

/* Drag position indicator line for calendar event repositioning */
#cal-drag-line {
  position: absolute;
  left: 44px;
  right: 12px;
  height: 2px;
  background: var(--color-progress-fill);
  border-radius: 1px;
  pointer-events: none;
  z-index: 1001;
  top: calc(var(--offset, 0) * var(--hour-height));
}

#cal-drag-line::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-progress-fill);
}

/* Movable cal-events (task-linked) */
.cal-event--movable {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.cal-event--movable:active {
  cursor: grabbing;
}

.cal-event--dragging {
  opacity: 1;
  transition: none !important;
}

/* Resize handle at bottom of calendar events */
.cal-event__resize-handle {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 10px;
  cursor: ns-resize;
  border-radius: 0 0 5px 5px;
}

.cal-event__resize-handle::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 1px;
}

/* Remove transition during resize to avoid lag */
.cal-event--resizing {
  transition: none !important;
}

/* ═══════════════════════════════════════════════
   QUILL EDITOR OVERRIDES
═══════════════════════════════════════════════ */

/* ── Task Modal Notes Editor ── */
.task-modal__notes-editor {
  margin-top: 24px;
  margin-left: 36px;
}
.task-modal__notes-editor.ql-container.ql-snow {
  border: none;
  height: auto;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}
.task-modal__notes-editor .ql-editor {
  padding: 0;
  min-height: 100px;
  color: #413f39;
  font-weight: 500;
  line-height: 1.2;
}
.task-modal__notes-editor .ql-editor.ql-blank::before {
  color: #b4b4b4;
  font-style: normal;
  left: 0;
  padding: 0;
}

/* ── Focus Modal Notes Editor ── */
.focus-modal__notes-editor {
  margin-top: 24px;
  margin-left: 36px;
}
.focus-modal__notes-editor.ql-container.ql-snow {
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
}
.focus-modal__notes-editor .ql-editor {
  padding: 0;
  min-height: 130px;
  color: #413f39;
  font-weight: 500;
  line-height: 1.25;
}
.focus-modal__notes-editor .ql-editor.ql-blank::before {
  color: #b4b4b4;
  font-style: normal;
  left: 0;
  padding: 0;
}

/* ── Daily Planning + Shutdown Share Editor ── */
.daily-planning-panel__share-editor,
.daily-shutdown-panel__share-editor {
  width: 100%;
  margin-top: 10px;
}
.daily-planning-panel__share-editor.ql-container.ql-snow,
.daily-shutdown-panel__share-editor.ql-container.ql-snow {
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  min-height: 360px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #413f39;
  line-height: 1.45;
  background: #ffffff;
  box-shadow: 0 3px 5px #0000000d;
}
.daily-planning-panel__share-editor .ql-editor,
.daily-shutdown-panel__share-editor .ql-editor {
  padding: 16px 18px;
  min-height: 360px;
}
.daily-planning-panel__share-editor .ql-editor h2,
.daily-shutdown-panel__share-editor .ql-editor h2 {
  font-size: 16px;
  font-weight: 600;
  color: #413f39;
  margin-bottom: 4px;
}
.daily-planning-panel__share-editor .ql-editor ul,
.daily-shutdown-panel__share-editor .ql-editor ul {
  padding-left: 20px;
  margin-bottom: 8px;
}
.daily-planning-panel__share-editor .ql-editor li,
.daily-shutdown-panel__share-editor .ql-editor li {
  padding-left: 4px;
}
.daily-planning-panel__share-editor .ql-editor em,
.daily-shutdown-panel__share-editor .ql-editor em {
  color: #8a8a8a;
  font-style: italic;
}
.daily-planning-panel__share-editor .ql-editor.ql-blank::before,
.daily-shutdown-panel__share-editor .ql-editor.ql-blank::before {
  color: #b4b4b4;
  font-style: normal;
}

@media (min-width: 2000px) {
  .task-modal__notes-editor .ql-container {
    font-size: 15px;
  }
  .task-modal__notes-editor .ql-editor {
    min-height: 100px;
  }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 210px;
  padding: 10px 20px;
  background: #ffb74d;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  box-shadow: 0 6px 20px #00000080;
  z-index: 99999;
  text-align: center;
  pointer-events: none;
  animation: toast-lifecycle 2.6s ease forwards;
}

.toast--dark {
  background: #282828;
  color: #e6e6e6;
}

@keyframes toast-lifecycle {
  0%   { opacity: 0; }
  11%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ═══════════════════════════════════════════════
   SETTINGS VIEW
═══════════════════════════════════════════════ */

.settings-view {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  background: var(--color-surface);
}

/* ── Sidebar ──────────────────────────────── */

.settings-view__sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--color-shell-bg);
  border-right: 1px solid var(--color-border);
  padding: 20px 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.settings-view__back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px 20px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #413f39;
  cursor: pointer;
  text-align: left;
}

.settings-view__back-icon {
  width: 16px;
  height: 16px;
  color: #787878;
  flex-shrink: 0;
}

/* no hover effect on back button */

.settings-view__nav {
  display: flex;
  flex-direction: column;
}

.settings-view__nav-header {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #787878;
  padding: 14px 20px 8px;
}

.settings-view__nav-item {
  display: block;
  width: calc(100% - 24px);
  padding: 8px 20px 8px 14px;
  border: none;
  border-left: 2px solid #dcdcdc;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #413f39;
  cursor: pointer;
  text-align: left;
  transition: color 0.12s ease;
  margin-left: 20px;
}

.settings-view__nav-item:not(.settings-view__nav-item--active):hover {
  color: #2ca7ff;
}

.settings-view__nav-item--active {
  border-left: 2px solid #413f39;
  background: #f5f5f5;
  font-weight: 600;
}

/* ── Content Area ─────────────────────────── */

.settings-view__content {
  flex: 1;
  overflow-y: auto;
  padding: 40px 48px;
}

.settings-view__content-inner {
  max-width: 640px;
}

/* ── Section Headers ──────────────────────── */

.settings-view__section {
  margin-bottom: 0;
  padding-top: 48px;
}

.settings-view__section:first-child {
  padding-top: 0;
}

.settings-view__section-title {
  font-size: 24px;
  font-weight: 500;
  color: #413f39;
  margin: 0 0 4px;
}

.settings-view__section-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #787878;
  text-decoration: none;
  margin-bottom: 8px;
}

.settings-view__section-link:hover {
  color: #555;
}

/* ── Setting Rows ─────────────────────────── */

.settings-view__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
  gap: 24px;
}

.settings-view__row-info {
  flex: 1;
  min-width: 0;
  max-width: 75%;
}

.settings-view__row-label {
  font-size: 14px;
  font-weight: 600;
  color: #413f39;
  margin: 0;
}

.settings-view__row-desc {
  font-size: 14px;
  font-weight: 500;
  color: #787878;
  margin: 2px 0 0;
}

/* ── Toggle Switch ────────────────────────── */

.settings-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #d1d5db;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.settings-toggle--on {
  background: #80c7ff;
}

.settings-toggle__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
  pointer-events: none;
}

.settings-toggle--on .settings-toggle__knob {
  transform: translateX(18px);
}

/* ── Dropdown Trigger ─────────────────────── */

.settings-view__select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: var(--color-text-primary);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.settings-view__select:hover {
  border-color: #b4b4b4;
}

.settings-view__select-icon {
  width: 14px;
  height: 14px;
  color: #787878;
  flex-shrink: 0;
}

/* ── Dropdown Panel ───────────────────────── */

.settings-view__dropdown-anchor {
  position: relative;
}

.settings-view__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  box-shadow: 0 6px 12px #0003;
  z-index: 6000;
  padding: 4px 0;
}

.settings-view__dropdown-arrow {
  position: absolute;
  top: -6px;
  right: 14px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  transform: rotate(45deg);
  border-top: 1px solid #dcdcdc;
  border-left: 1px solid #dcdcdc;
  box-shadow: none;
}

.settings-view__dropdown-items {
  max-height: 280px;
  overflow-y: auto;
}

.settings-view__dropdown--wide {
  min-width: 280px;
}

.settings-view__dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 14px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: #413f39;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s ease;
  gap: 8px;
}

.settings-view__dropdown-item:hover {
  background: #f5f5f5;
}

.settings-view__dropdown-check {
  color: #787878;
  font-size: 14px;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

/* ── Schedule Grid ────────────────────────── */

.settings-schedule__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 8px;
}

.settings-schedule__workday-heading {
  font-size: 13px;
  font-weight: 500;
  color: #787878;
  width: 60px;
  text-align: center;
  flex-shrink: 0;
}

.settings-schedule__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.settings-schedule__day {
  width: 50px;
  font-size: 14px;
  font-weight: 500;
  color: #413f39;
  flex-shrink: 0;
}

.settings-schedule__workday {
  width: 60px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
}

.settings-schedule__times {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.15s ease;
}

.settings-schedule__times--disabled {
  opacity: 0.4;
  pointer-events: none;
}

.settings-schedule__dash {
  font-size: 14px;
  color: #787878;
}

.settings-schedule__select {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: #413f39;
  cursor: pointer;
  white-space: nowrap;
}

.settings-schedule__select:hover {
  border-color: #b4b4b4;
}

/* ── Profile Section ──────────────────────── */

.settings-profile__layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 16px 0;
}

.settings-profile__fields {
  flex: 1;
  display: flex;
  gap: 12px;
}

.settings-profile__avatar-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.settings-profile__avatar {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  background: #e5a84b;
  overflow: hidden;
  flex-shrink: 0;
}

.settings-profile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-profile__upload-btn {
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  color: #413f39;
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.settings-profile__upload-btn:hover {
  background: #f5f5f5;
}

.settings-profile__input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  color: #413f39;
  outline: none;
  background: #fff;
  transition: border-color 0.12s ease;
}

.settings-profile__input::placeholder {
  color: #b4b4b4;
}

.settings-profile__input:focus {
  border-color: #b4b4b4;
}

.settings-profile__input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-profile__input-label {
  font-size: 13px;
  font-weight: 500;
  color: #787878;
}

/* ── Account Management ───────────────────── */

.settings-acct__row {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

.settings-acct__label {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.settings-acct__desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 2px 0 0;
}

/* ── Channels Section ─────────────────────── */

.settings-channels__actions {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  margin-bottom: 16px;
}

.settings-channels__btn {
  padding: 5px 10px;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #505050;
  cursor: pointer;
  box-shadow: 0 1px 2px #0000001a;
  transition: background-color 0.24s, box-shadow 0.24s;
}

.settings-channels__btn:hover {
  box-shadow: 0 2px 4px #0003;
}

.settings-channels__table {
  width: 100%;
  border-bottom: 1px solid var(--color-border);
}

.settings-channels__table-header {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #787878;
  border-bottom: 1px solid var(--color-border);
}

.settings-channels__context-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  transition: background 0.1s ease;
  border-radius: 4px;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
}

.settings-channels__context-row:hover {
  background: #f9f9f9;
}

.settings-channels__context-hash {
  font-weight: 700;
  font-size: 14px;
}

.settings-channels__channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 10px 24px;
  cursor: pointer;
  transition: background 0.1s ease;
}

.settings-channels__channel-row:hover {
  background: #f9f9f9;
}

.settings-channels__channel-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-channels__channel-hash {
  font-weight: 700;
  font-size: 14px;
}

.settings-channels__channel-name {
  font-size: 14px;
  color: #413f39;
}

.settings-channels__create-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0 8px 24px;
  margin-bottom: 24px;
  font-size: 13px;
  color: #787878;
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.settings-channels__create-link:hover {
  color: #555;
}

/* ── Channel Modal ────────────────────────── */

.settings-channel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 36, 62, 0.3);
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-channel-modal {
  background: #fff;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 10px;
  width: 500px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.settings-channel-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
}

.settings-channel-modal__title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.settings-channel-modal__header-actions {
  display: flex;
  gap: 8px;
}

.settings-channel-modal__btn {
  padding: 5px 10px;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #505050;
  cursor: pointer;
  box-shadow: 0 1px 2px #0000001a;
  transition: background-color 0.24s, box-shadow 0.24s;
}

.settings-channel-modal__btn:hover {
  box-shadow: 0 2px 4px #0003;
}

.settings-channel-modal__btn--primary {
  background: #2ca7ff;
  color: #fff;
  border-color: #2ca7ff;
}

.settings-channel-modal__btn--primary:hover {
  box-shadow: 0 2px 4px #0003;
}

.settings-channel-modal__btn--danger {
  /* default white state, turns red on confirm */
}

.settings-channel-modal__btn--danger:hover {
  box-shadow: 0 2px 4px #0003;
}

.settings-channel-modal__btn--danger-confirm {
  background: #f25a43;
  color: #fff;
  border-color: #f25a43;
}

/* close button removed */

.settings-channel-modal__body {
  padding: 0 24px 24px;
}

.archive-delete-overlay {
  position: fixed;
  inset: 0;
  z-index: 6500;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(43, 36, 62, 0.3);
  padding: 24px;
}

.archive-delete-modal {
  width: min(320px, 100%);
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 10px;
  padding: 24px;
}

.archive-delete-modal__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: #413f39;
}

.archive-delete-modal__desc {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: #413f39;
}

.archive-delete-modal__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.archive-delete-modal__btn {
  padding: 7px 10px;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  background: #ffffff;
  color: #505050;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  box-shadow: 0 1px 2px #0000001a;
  transition: box-shadow 0.24s;
}

.archive-delete-modal__btn:hover {
  box-shadow: 0 2px 4px #0003;
}

.archive-delete-modal__btn--danger {
  background: #f25a43;
  color: #ffffff;
  border-color: #f25a43;
}

.settings-channel-modal__field {
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
}

.settings-channel-modal__field-label {
  font-size: 14px;
  font-weight: 600;
  color: #413f39;
  margin: 0 0 2px;
}

.settings-channel-modal__field-desc {
  font-size: 14px;
  font-weight: 500;
  color: #787878;
  margin: 0 0 8px;
}

.settings-channel-modal__input {
  width: 100%;
  padding: 8px 0;
  border: none;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  font-family: inherit;
  font-size: 14px;
  color: #413f39;
  outline: none;
  background: #fff;
  box-sizing: border-box;
}

.settings-channel-modal__input::placeholder {
  color: #b4b4b4;
}

.settings-channel-modal__input:focus {
  border-bottom-color: #2ca7ff;
}

.settings-channel-modal__color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 8px;
}

.settings-channel-modal__color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease;
  padding: 0;
  margin: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: content-box;
}

.settings-channel-modal__color-swatch:hover {
  transform: scale(1.15);
}


.settings-channel-modal__color-swatch svg {
  width: 10px;
  height: 10px;
  color: #fff;
  stroke-width: 3;
  display: none;
}

.settings-channel-modal__color-swatch--selected svg {
  display: block;
}

.settings-channel-modal__field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* context dropdown now reuses .settings-view__select */
