:root {
  --bg: #eef2f8;
  --panel: #ffffff;
  --panel-soft: #f5f8fc;
  --text: #172033;
  --muted: #63708a;
  --line: #d8e0ed;
  --brand: #356dff;
  --brand-strong: #224ed1;
  --danger: #c8434d;
  --success: #2f8c57;
  --warning-bg: rgba(208, 73, 56, 0.16);
  --success-bg: rgba(47, 140, 87, 0.16);
  --shadow: 0 18px 45px rgba(29, 42, 72, 0.12);
  --sidebar-width: 320px;
  --radius: 20px;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(53, 109, 255, 0.14), transparent 32%),
    linear-gradient(180deg, #f7f9fd 0%, #eef2f8 100%);
}

body.mobile-sidebar-lock {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.auth-body {
  min-height: 100vh;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.auth-card {
  width: min(100%, 480px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.auth-card-wide {
  width: min(100%, 560px);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
}

.auth-brand h1,
.workspace-header h1,
.blank-state h1 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
}

.auth-brand p,
.workspace-header p,
.blank-state p,
.sidebar-hint,
.muted-note {
  color: var(--muted);
  line-height: 1.5;
}

.auth-form,
.stacked-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.auth-form label,
.stacked-form label {
  display: grid;
  gap: 8px;
}

.auth-form span,
.stacked-form span {
  font-size: 14px;
  color: var(--muted);
}

.checkbox-field {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.checkbox-field input[type="checkbox"] {
  margin: 0;
}

.checkbox-field span {
  font-size: 14px;
  color: var(--text);
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, #63708a 50%),
    linear-gradient(135deg, #63708a 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 2px),
    calc(100% - 16px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

textarea {
  resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.btn {
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
}

.btn-secondary {
  background: #111c36;
  color: #fff;
}

.btn-quiet {
  background: var(--panel-soft);
  color: var(--text);
}

.btn-small {
  padding: 8px 12px;
  font-size: 14px;
}

.compact-icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  border-radius: 12px;
  text-align: center;
}

.icon-glyph {
  display: block;
  line-height: 1;
}

.compact-icon-button-plus {
  font-size: 22px;
  font-weight: 500;
}

.compact-icon-button-stream {
  font-size: 24px;
  font-weight: 700;
}

.compact-icon-button-plus .icon-glyph,
.compact-icon-button-stream .icon-glyph {
  transform: translateY(-2px);
}

.auth-links {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-links a {
  color: var(--brand);
  font-weight: 600;
}

.alert {
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 18px;
}

.alert p {
  margin: 0;
}

.alert-error {
  background: rgba(200, 67, 77, 0.12);
  color: #8f1d31;
}

.alert-success {
  background: rgba(47, 140, 87, 0.12);
  color: #17653d;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

.mobile-topbar {
  display: none;
}

.mobile-user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mobile-user-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mobile-user-copy strong,
.mobile-user-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-user-copy span {
  color: var(--muted);
  font-size: 13px;
}

.sidebar-overlay {
  display: none;
}

.app-shell.menu-collapsed {
  grid-template-columns: 88px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 16px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  border-right: 1px solid rgba(216, 224, 237, 0.7);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-top,
.section-title-row,
.workspace-header,
.timeline-nav,
.modal-head,
.modal-actions,
.detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.user-card-details {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.user-card-details span {
  color: var(--muted);
  font-size: 14px;
}

.user-card-details strong,
.user-card-details span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-avatar,
.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(53, 109, 255, 0.18), rgba(34, 78, 209, 0.12));
  color: #24479c;
  border: 1px solid rgba(53, 109, 255, 0.18);
}

.ghost-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
}

.ghost-icon-button span {
  width: 16px;
  height: 2px;
  background: var(--text);
  display: block;
}

.sidebar-section {
  background: var(--panel-soft);
  border: 1px solid rgba(216, 224, 237, 0.65);
  border-radius: 16px;
  padding: 12px;
}

.sidebar-section h2,
.settings-card h2,
.detail-checklist h4,
.checklist-editor h4 {
  margin: 0;
  font-size: 16px;
}

.project-nav {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.project-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.team-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.team-nav {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.project-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}

.project-breadcrumbs a {
  color: var(--muted);
}

.project-breadcrumbs a:hover {
  color: var(--brand);
}

.project-link,
.sidebar-link,
.team-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border-radius: 12px;
  padding: 9px 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  min-width: 0;
  border: 1px solid rgba(216, 224, 237, 0.55);
}

.project-item .project-link {
  flex: 1 1 auto;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.project-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(8px);
  transition: max-width 0.2s ease, opacity 0.16s ease, transform 0.2s ease;
}

.project-item:hover .project-link,
.project-item:focus-within .project-link {
  transform: translateX(-4px);
}

.project-item:hover .project-item-actions,
.project-item:focus-within .project-item-actions {
  max-width: 80px;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.team-item .team-link {
  flex: 1 1 auto;
}

.project-link:hover,
.sidebar-link:hover,
.team-link:hover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(53, 109, 255, 0.14);
}

.sidebar-item-body {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.2;
}

.sidebar-item-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-link-depth-1 {
  margin-left: 16px;
}

.project-link-depth-2 {
  margin-left: 32px;
}

.project-link-depth-3,
.project-link-depth-4,
.project-link-depth-5 {
  margin-left: 48px;
}

.project-link.active,
.sidebar-link.active {
  background: linear-gradient(135deg, rgba(53, 109, 255, 0.18), rgba(53, 109, 255, 0.08));
  border: 1px solid rgba(53, 109, 255, 0.16);
}

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

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.sidebar-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.project-inline-action {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid rgba(53, 109, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: #24479c;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.project-inline-action .icon-glyph {
  transform: translateY(-1px);
}

.project-inline-action:hover {
  background: linear-gradient(135deg, rgba(53, 109, 255, 0.18), rgba(34, 78, 209, 0.12));
}

.project-delete-action,
.team-delete-action,
.stream-delete-action {
  color: var(--danger);
  border-color: rgba(200, 67, 77, 0.18);
}

.project-delete-action:hover,
.team-delete-action:hover,
.stream-delete-action:hover {
  background: rgba(200, 67, 77, 0.1);
}

.action-icon {
  font-weight: 700;
  line-height: 1;
}

.app-shell.menu-collapsed .sidebar {
  padding: 18px 12px;
  overflow: hidden;
}

.app-shell.menu-collapsed .sidebar-top,
.app-shell.menu-collapsed .section-title-row,
.app-shell.menu-collapsed .sidebar-bottom {
  justify-content: center;
}

.app-shell.menu-collapsed .user-card {
  width: 42px;
  justify-content: center;
}

.app-shell.menu-collapsed .user-card-details,
.app-shell.menu-collapsed .section-title-row h2,
.app-shell.menu-collapsed .sidebar-hint,
.app-shell.menu-collapsed .empty-note,
.app-shell.menu-collapsed .nav-label,
.app-shell.menu-collapsed .sidebar-item-meta,
.app-shell.menu-collapsed .project-item-actions,
.app-shell.menu-collapsed .project-inline-action,
.app-shell.menu-collapsed .action-label {
  display: none;
}

.app-shell.menu-collapsed .sidebar-section {
  padding: 10px 8px;
}

.app-shell.menu-collapsed .project-nav {
  justify-items: center;
}

.app-shell.menu-collapsed .team-nav {
  justify-items: center;
}

.app-shell.menu-collapsed .project-link,
.app-shell.menu-collapsed .sidebar-link,
.app-shell.menu-collapsed .sidebar-action-button,
.app-shell.menu-collapsed .team-link {
  width: 42px;
  min-width: 42px;
  padding: 4px;
  justify-content: center;
}

.app-shell.menu-collapsed .project-link-depth-1,
.app-shell.menu-collapsed .project-link-depth-2,
.app-shell.menu-collapsed .project-link-depth-3,
.app-shell.menu-collapsed .project-link-depth-4,
.app-shell.menu-collapsed .project-link-depth-5 {
  margin-left: 0;
}

.workspace {
  padding: 18px;
  min-width: 0;
}

.workspace-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: start !important;
  justify-content: space-between;
  gap: 20px;
}

.workspace-header-info {
  min-width: 0;
  max-width: 760px;
  padding-right: 16px;
}

.workspace-header-actions {
  display: flex;
  justify-content: flex-end;
  justify-self: end;
  align-self: start;
  margin-left: auto;
  min-width: max-content;
}

.toolbar {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  flex-direction: column;
  gap: 8px;
  flex-wrap: nowrap;
  width: min(720px, 100%);
}

.toolbar-top-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  width: 100%;
}

.toolbar-icon-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.toolbar-open-focus {
  min-height: 46px;
  padding-inline: 16px;
  border-radius: 999px;
  font-weight: 700;
}

.pomodoro-widget {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(216, 224, 237, 0.9);
  background: linear-gradient(180deg, rgba(253, 254, 255, 0.96), rgba(244, 247, 252, 0.96));
  box-shadow: 0 10px 24px rgba(29, 42, 72, 0.06);
}

.sidebar-link-button {
  width: 100%;
  text-align: left;
}

.pomodoro-widget-head,
.pomodoro-widget-controls,
.pomodoro-widget-actions,
.pomodoro-history-item {
  display: flex;
  align-items: center;
}

.pomodoro-widget-head {
  justify-content: space-between;
  gap: 12px;
}

.pomodoro-widget-head strong {
  font-size: 15px;
}

.pomodoro-widget-head span,
.pomodoro-empty,
.pomodoro-history-item span,
.pomodoro-history-item time {
  font-size: 12px;
  color: var(--muted);
}

.pomodoro-widget-summary,
.pomodoro-widget-controls {
  gap: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.pomodoro-widget-summary {
  justify-content: space-between;
}

#pomodoroModal .pomodoro-widget {
  margin-bottom: 4px;
}

#pomodoroModal .pomodoro-widget-history {
  max-height: 220px;
  overflow: auto;
}

.pomodoro-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 240px;
}

.pomodoro-field-small {
  flex: 0 0 118px;
}

.pomodoro-field span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6f7d95;
}

.pomodoro-field select {
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 14px;
}

.pomodoro-timebox {
  display: grid;
  gap: 3px;
  min-width: 156px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(67, 125, 255, 0.08);
  border: 1px solid rgba(67, 125, 255, 0.14);
}

.pomodoro-timebox span {
  font-size: 12px;
  color: #63708a;
}

.pomodoro-timebox strong {
  font-size: 26px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #1a2640;
}

.pomodoro-widget-actions {
  gap: 8px;
  flex-wrap: wrap;
}

.pomodoro-widget-actions .hidden {
  display: none;
}

.pomodoro-widget-history {
  display: grid;
  gap: 8px;
}

.pomodoro-history-item {
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(241, 245, 252, 0.85);
}

.pomodoro-history-item > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pomodoro-history-item strong {
  font-size: 13px;
  line-height: 1.2;
}

.pomodoro-empty {
  margin: 0;
}

.btn-large {
  min-height: 48px;
  padding-inline: 22px;
  font-size: 16px;
}

.pomodoro-overlay {
  position: fixed;
  inset: 0;
  z-index: 52;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 12, 24, 0.72);
  backdrop-filter: blur(10px);
}

.pomodoro-overlay-card {
  width: min(100%, 720px);
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(216, 224, 237, 0.28);
  background:
    radial-gradient(circle at top, rgba(67, 125, 255, 0.18), transparent 38%),
    rgba(11, 18, 34, 0.92);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
  color: #f4f8ff;
  display: grid;
  gap: 18px;
  text-align: center;
}

.pomodoro-overlay-card .eyebrow,
.pomodoro-overlay-hint,
.pomodoro-overlay-complete p {
  color: rgba(227, 235, 249, 0.76);
}

.pomodoro-overlay-card h2,
.pomodoro-overlay-complete h3,
.pomodoro-overlay-task {
  margin: 0;
}

.pomodoro-overlay-task {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.2;
}

.pomodoro-overlay-timer {
  font-size: clamp(68px, 10vw, 116px);
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.pomodoro-overlay-hint {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

.pomodoro-overlay-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pomodoro-overlay-complete {
  display: grid;
  gap: 14px;
  padding-top: 6px;
}

.pomodoro-overlay-complete h3 {
  font-size: 24px;
}

.detail-meta-secondary {
  margin-top: -4px;
  font-size: 13px;
  color: #6a7891;
}

.view-switch,
.scale-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(241, 245, 252, 0.96), rgba(233, 239, 248, 0.96));
  border: 1px solid rgba(216, 224, 237, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 20px rgba(29, 42, 72, 0.06);
}

.view-switch button,
.scale-group button {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: #66748c;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.view-switch button:hover,
.scale-group button:hover {
  color: var(--text);
}

.view-switch button.active,
.scale-group button.active {
  background: rgba(255, 255, 255, 0.96);
  color: #1a2233;
  border-color: rgba(232, 236, 243, 0.95);
  box-shadow: 0 6px 18px rgba(29, 42, 72, 0.08);
}

.timeline-shell,
.workspace-filters,
.list-shell,
.month-shell,
.settings-card,
.blank-state {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(216, 224, 237, 0.72);
  padding: 14px;
}

.daily-focus {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 18, 36, 0.56);
  backdrop-filter: blur(12px);
  animation: dailyFocusFadeIn 180ms ease;
}

.daily-focus-card {
  position: relative;
  width: min(100%, 1180px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  display: grid;
  gap: 18px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(216, 224, 237, 0.72);
  background:
    radial-gradient(circle at top left, rgba(53, 109, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 254, 0.98));
  animation: dailyFocusCardIn 220ms ease;
}

.daily-focus-dismiss {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(216, 224, 237, 0.92);
  background: rgba(255, 255, 255, 0.96);
  color: #5f6d8a;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(29, 42, 72, 0.08);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.daily-focus-dismiss:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 1);
  color: var(--text);
}

.daily-focus-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-right: 52px;
}

.daily-focus-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.daily-focus-head h2 {
  margin: 8px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
}

.daily-focus-head p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.5;
}

.daily-focus-list {
  display: grid;
  gap: 12px;
}

.daily-focus-list-items {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.daily-focus-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.daily-focus-main,
.daily-focus-aside {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.daily-focus-aside {
  position: sticky;
  top: 0;
  align-self: start;
}

.daily-focus-schedule,
.daily-focus-placeholder {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(248, 250, 255, 0.96);
  border: 1px solid rgba(216, 224, 237, 0.78);
}

.daily-focus-calendar {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.daily-focus-accordion {
  border-radius: 16px;
  border: 1px solid rgba(216, 224, 237, 0.78);
  background: rgba(255, 255, 255, 0.86);
  overflow: hidden;
}

.daily-focus-accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 800;
  color: #22304a;
}

.daily-focus-accordion summary::-webkit-details-marker {
  display: none;
}

.daily-focus-accordion summary span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: #66748c;
  background: rgba(241, 245, 252, 0.96);
}

.daily-focus-accordion[open] summary {
  border-bottom: 1px solid rgba(216, 224, 237, 0.72);
}

.planning-schedule-block {
  display: grid;
  gap: 14px;
}

.planning-schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.planning-schedule-caption {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #71809c;
}

.planning-schedule-day {
  display: grid;
  gap: 10px;
}

.planning-schedule-day-title {
  font-size: 13px;
  font-weight: 800;
  color: #40506d;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.planning-schedule-timeline {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.planning-schedule-hour-rail {
  position: relative;
  height: 648px;
}

.planning-schedule-hour-rail span {
  position: absolute;
  right: 0;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 700;
  color: #8290aa;
}

.planning-schedule-grid {
  position: relative;
  min-height: 648px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(216, 224, 237, 0.82);
  overflow: hidden;
  padding-left: 4px;
}

.planning-schedule-grid > span {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px solid rgba(221, 228, 240, 0.92);
  color: transparent;
  font-size: 0;
}

.planning-schedule-grid > span::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 16px;
  border-top: 1px solid rgba(208, 217, 232, 0.98);
}

.planning-schedule-item {
  position: absolute;
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(216, 224, 237, 0.82);
  box-shadow: 0 8px 22px rgba(46, 64, 101, 0.08);
  overflow: hidden;
}

.planning-schedule-item-meeting {
  background: rgba(226, 239, 255, 0.75);
  border-color: rgba(170, 199, 248, 0.95);
}

.planning-schedule-item-task {
  background: rgba(236, 249, 240, 0.86);
  border-color: rgba(180, 221, 191, 0.92);
}

.planning-schedule-item-buffer {
  background: rgba(248, 242, 223, 0.86);
  border-color: rgba(233, 215, 167, 0.92);
}

.planning-schedule-content {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.planning-schedule-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.planning-schedule-head strong {
  font-size: 13px;
  line-height: 1.25;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planning-schedule-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #324463;
  background: rgba(255, 255, 255, 0.82);
}

.planning-schedule-details {
  font-size: 11px;
  line-height: 1.35;
  color: #5f6d8a;
}

.planning-recommendation-copy {
  display: grid;
  gap: 6px;
}

.planning-recommendation-copy p {
  margin: 0;
}

.daily-focus-placeholder strong {
  font-size: 15px;
}

.daily-focus-placeholder p {
  margin: 0;
  line-height: 1.55;
  color: #55647f;
}

.skeleton-stack {
  display: grid;
  gap: 12px;
}

.daily-focus-skeleton-card {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(216, 224, 237, 0.72);
  background: rgba(255, 255, 255, 0.82);
}

.daily-focus-skeleton-line,
.daily-focus-skeleton-slot {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(224, 231, 242, 0.9);
}

.daily-focus-skeleton-line::after,
.daily-focus-skeleton-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  animation: dailyFocusSkeletonPulse 1.3s ease-in-out infinite;
}

.daily-focus-skeleton-line {
  height: 12px;
}

.daily-focus-skeleton-line.is-wide {
  width: 88%;
}

.daily-focus-skeleton-line.is-short {
  width: 54%;
}

.daily-focus-skeleton-timeline {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.daily-focus-skeleton-hours {
  display: grid;
  gap: 34px;
  padding-top: 6px;
}

.daily-focus-skeleton-hours span {
  font-size: 12px;
  font-weight: 700;
  color: #94a0b7;
}

.daily-focus-skeleton-grid {
  display: grid;
  gap: 12px;
  min-height: 360px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(216, 224, 237, 0.82);
  background: rgba(255, 255, 255, 0.96);
}

.daily-focus-skeleton-slot {
  height: 56px;
  border-radius: 14px;
}

.planning-unscheduled {
  display: grid;
  gap: 8px;
}

.planning-unscheduled-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.planning-unscheduled-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #6a4d17;
  background: rgba(248, 237, 196, 0.92);
}

@media (max-width: 1100px) {
  .daily-focus-layout {
    grid-template-columns: 1fr;
  }

  .daily-focus-aside {
    position: static;
  }
}

.daily-focus-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.daily-focus-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.daily-focus-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5f6d8a;
}

.mini-segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(241, 245, 252, 0.95);
  border: 1px solid rgba(216, 224, 237, 0.82);
}

.mini-segmented-control button {
  border: 0;
  background: transparent;
  color: #5f6d8a;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.mini-segmented-control button.active {
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(29, 42, 72, 0.08);
}

.daily-focus-meeting-list {
  display: grid;
  gap: 10px;
}

.daily-focus-meeting {
  border: 1px solid rgba(216, 224, 237, 0.72);
  background: rgba(240, 246, 255, 0.92);
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  box-shadow: 0 8px 20px rgba(29, 42, 72, 0.04);
}

.daily-focus-item {
  border: 1px solid rgba(216, 224, 237, 0.72);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(29, 42, 72, 0.04);
}

.daily-focus-item:hover {
  border-color: rgba(53, 109, 255, 0.18);
  background: rgba(255, 255, 255, 0.98);
}

.daily-focus-item.is-overdue {
  border-color: rgba(239, 103, 103, 0.32);
  background: rgba(255, 246, 246, 0.94);
}

.daily-focus-item-head,
.daily-focus-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.daily-focus-item-head strong {
  font-size: 18px;
  color: var(--text);
}

.daily-focus-item-title,
.task-list-title-row,
.timeline-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.daily-focus-item-title strong,
.task-list-title-row .task-link-button,
.timeline-card-heading .timeline-card-title {
  min-width: 0;
}

.daily-focus-item-head span,
.daily-focus-item-meta {
  color: var(--muted);
  font-size: 13px;
}

.daily-focus-overdue-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(235, 90, 90, 0.12);
  color: #ba3a3a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.meeting-source-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(53, 109, 255, 0.12);
  color: #2550a8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.daily-focus-placeholder {
  border: 1px dashed rgba(53, 109, 255, 0.24);
  background: rgba(53, 109, 255, 0.06);
  border-radius: 18px;
  padding: 18px;
}

.daily-focus-placeholder strong {
  display: block;
  margin-bottom: 6px;
}

.daily-focus-placeholder p,
.daily-focus-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

@keyframes dailyFocusFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes dailyFocusCardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dailyFocusSkeletonPulse {
  100% {
    transform: translateX(100%);
  }
}

.workspace-filters {
  margin-bottom: 12px;
}

.sync-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.sync-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(216, 224, 237, 0.8);
  background: rgba(255, 255, 255, 0.92);
}

.sync-status-chip.is-online,
.sync-status-chip.is-clear {
  color: #24529e;
  background: rgba(53, 109, 255, 0.08);
  border-color: rgba(53, 109, 255, 0.16);
}

.sync-status-chip.is-offline,
.sync-status-chip.is-pending,
.sync-status-chip.is-syncing {
  color: #8d5a10;
  background: rgba(245, 182, 66, 0.14);
  border-color: rgba(245, 182, 66, 0.24);
}

.sync-status-text {
  color: var(--muted);
  font-size: 13px;
}

.timeline-nav {
  margin-bottom: 8px;
}

.timeline-nav-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.label-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.label-filter-list,
.detail-labels {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.label-chip,
.task-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.label-chip {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.label-chip.active,
.task-label {
  background: linear-gradient(135deg, rgba(53, 109, 255, 0.18), rgba(34, 78, 209, 0.12));
  color: #24479c;
  border: 1px solid rgba(53, 109, 255, 0.2);
}

.priority-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
}

.priority-badge.priority-p0 {
  color: #a62632;
  background: #ffe7e9;
  border-color: #f4b8bd;
}

.priority-badge.priority-p1 {
  color: #ad4b15;
  background: #fff0e5;
  border-color: #f3c5a6;
}

.priority-badge.priority-p2 {
  color: #86600a;
  background: #fff6d9;
  border-color: #ead48b;
}

.priority-badge.priority-p3 {
  color: #315b9f;
  background: #eaf1ff;
  border-color: #bfd0f2;
}

.priority-badge.priority-p4 {
  color: #657087;
  background: #f0f2f6;
  border-color: #d6dbe5;
}

.list-toolbar,
.month-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.list-filter-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 220px));
  gap: 10px;
}

.list-filter-group label {
  display: grid;
  gap: 8px;
}

.list-filter-group span {
  font-size: 14px;
  color: var(--muted);
}

.project-task-tree {
  display: grid;
  gap: 16px;
}

.task-project-group {
  border: 1px solid rgba(216, 224, 237, 0.72);
  border-radius: 18px;
  background: linear-gradient(180deg, #fcfdff, #f5f8fc);
  padding: 16px;
}

.task-project-depth-1 {
  margin-left: 18px;
}

.task-project-depth-2,
.task-project-depth-3 {
  margin-left: 36px;
}

.task-project-header h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.task-project-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.task-project-children {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.task-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.task-list-branch {
  display: grid;
  gap: 8px;
}

.task-list-children {
  display: grid;
  gap: 8px;
  margin-left: 26px;
}

.task-list-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(216, 224, 237, 0.72);
  border-radius: 16px;
  background: var(--stream-tint, rgba(255, 255, 255, 0.88));
  border-color: var(--stream-tint-border, rgba(216, 224, 237, 0.72));
}

.task-list-item.is-done {
  background: rgba(47, 140, 87, 0.08);
}

.task-list-item.is-dependent {
  position: relative;
}

.task-list-item.is-dependent::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  border-radius: 999px;
  background: rgba(53, 109, 255, 0.18);
}

.task-radio {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(53, 109, 255, 0.4);
  background: #fff;
  cursor: pointer;
  margin-top: 3px;
}

.task-radio.checked {
  background: radial-gradient(circle at center, #2f8c57 42%, #ffffff 44%);
  border-color: #2f8c57;
}

.task-list-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.task-link-button {
  border: none;
  background: transparent;
  padding: 0;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.task-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 13px;
}

.month-caption {
  font-size: 20px;
  font-weight: 700;
  color: #36425c;
  text-transform: capitalize;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--line);
}

.month-week {
  grid-column: 1 / -1;
  position: relative;
  background: var(--line);
}

.month-week-days,
.month-week-spans {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
}

.month-weekday {
  background: #f8fbff;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #51607d;
}

.month-day {
  min-height: calc(98px + var(--month-span-stack-height, 0px));
  background: rgba(255, 255, 255, 0.94);
  padding: 10px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
}

.month-day.is-muted {
  background: #f5f7fb;
}

.month-day.is-nonworking {
  background:
    linear-gradient(180deg, rgba(232, 85, 85, 0.08), rgba(232, 85, 85, 0.05)),
    rgba(255, 255, 255, 0.94);
}

.month-day.is-today {
  background:
    linear-gradient(180deg, rgba(67, 125, 255, 0.09), rgba(67, 125, 255, 0.05)),
    rgba(255, 255, 255, 0.97);
  box-shadow: inset 0 0 0 2px rgba(67, 125, 255, 0.18);
}

.month-day-number {
  font-size: 14px;
  font-weight: 700;
  color: #36425c;
}

.month-day-number.is-today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(67, 125, 255, 0.14);
  color: #21489b;
}

.month-day-tasks {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  padding-top: calc(var(--month-span-stack-height, 0px) + 4px);
}

.month-week-spans {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  z-index: 2;
  align-items: start;
  padding: 0;
  background: transparent;
  grid-auto-rows: minmax(0, auto);
  row-gap: 10px;
  pointer-events: none;
}

.month-span-task {
  display: grid;
  gap: 2px;
  align-content: start;
  min-width: 0;
  margin: 0 6px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--stream-tint-border, rgba(53, 109, 255, 0.18));
  background: var(--stream-tint, linear-gradient(135deg, rgba(53, 109, 255, 0.16), rgba(34, 78, 209, 0.08)));
  color: var(--stream-tint-text, #23458f);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  pointer-events: auto;
}

.month-span-task.is-done {
  border-color: rgba(47, 140, 87, 0.2);
  background: rgba(47, 140, 87, 0.12);
  color: #1d6a41;
}

.month-span-task-title {
  display: block;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.month-span-task-title .priority-badge {
  margin-right: 4px;
  vertical-align: 1px;
}

.month-span-edge {
  display: inline;
  opacity: 0.7;
}

.month-span-task-assignee,
.month-span-task-project {
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.month-span-task-project {
  opacity: 0.78;
}

.month-meeting {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(67, 125, 255, 0.2);
  background: linear-gradient(135deg, rgba(53, 109, 255, 0.12), rgba(53, 109, 255, 0.06));
  color: #244c9f;
  border-radius: 12px;
  padding: 7px 9px;
}

.month-meeting-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.month-meeting-time {
  font-size: 11px;
  opacity: 0.82;
}

.month-task {
  display: grid;
  gap: 3px;
  border: 1px solid var(--stream-tint-border, rgba(53, 109, 255, 0.18));
  background: var(--stream-tint, linear-gradient(135deg, rgba(53, 109, 255, 0.16), rgba(34, 78, 209, 0.08)));
  color: var(--stream-tint-text, #23458f);
  border-radius: 12px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.month-task.is-done {
  border-color: rgba(47, 140, 87, 0.2);
  background: rgba(47, 140, 87, 0.12);
  color: #1d6a41;
}

.month-task-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.month-task-project {
  font-size: 11px;
  opacity: 0.78;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.timeline-container {
  position: relative;
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fdfefe, #f4f7fb);
}

.timeline-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 240px minmax(900px, 1fr);
  background: rgba(253, 254, 255, 0.94);
}

.timeline-header-left,
.timeline-row-label {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  background: #fbfcff;
}

.timeline-header-grid,
.timeline-row-grid {
  position: relative;
  min-width: 900px;
  width: 100%;
  border-right: 1px solid rgba(216, 224, 237, 0.85);
}

.timeline-header-grid {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
}

.timeline-header-left {
  border-bottom: 1px solid var(--line);
}

.timeline-header-row {
  display: flex;
  min-width: 100%;
}

.timeline-header-row-years {
  border-bottom: 1px solid rgba(216, 224, 237, 0.85);
  background: #f8fbff;
}

.timeline-header-row-months {
  border-bottom: 1px solid rgba(216, 224, 237, 0.85);
  background: #fbfcff;
}

.timeline-header-row-days {
  background: rgba(255, 255, 255, 0.94);
}

.timeline-year-cell,
.timeline-month-cell,
.timeline-day-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  text-align: center;
  border-right: 1px solid rgba(216, 224, 237, 0.85);
}

.timeline-year-cell {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #36425c;
}

.timeline-month-cell {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #51607d;
  text-transform: capitalize;
}

.timeline-day-cell {
  min-height: 40px;
  padding: 10px 8px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}

.timeline-day-cell.is-nonworking {
  background: rgba(232, 85, 85, 0.08);
  color: #8d5961;
}

.timeline-day-cell.is-today {
  background: rgba(67, 125, 255, 0.12);
  color: #21489b;
  font-weight: 700;
  box-shadow: inset 0 -2px 0 rgba(67, 125, 255, 0.32);
}

.timeline-board {
  position: relative;
}

.timeline-today-day {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(180deg, rgba(67, 125, 255, 0.08), rgba(67, 125, 255, 0.04));
  border-left: 1px solid rgba(67, 125, 255, 0.2);
  border-right: 1px solid rgba(67, 125, 255, 0.2);
  pointer-events: none;
  z-index: 0;
}

.timeline-row {
  display: grid;
  grid-template-columns: 240px minmax(900px, 1fr);
  min-height: 110px;
  position: relative;
}

.timeline-row-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  user-select: none;
  padding: 16px 18px;
  border-right: 1px solid var(--stream-label-border, var(--line));
  border-bottom: 1px solid rgba(216, 224, 237, 0.65);
  background: color-mix(in srgb, var(--stream-label-bg, #fbfcff) 86%, rgba(255, 255, 255, 0.72));
  box-sizing: border-box;
  position: relative;
  z-index: 6;
  backdrop-filter: blur(12px) saturate(1.08);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
}

.timeline-row-label::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 42%);
  pointer-events: none;
  z-index: 0;
}

.timeline-row-label > * {
  position: relative;
  z-index: 1;
}

.stream-label-top {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.stream-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stream-chip-button {
  border: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  max-width: 100%;
}

.stream-chip-button:hover {
  color: var(--brand);
}

.stream-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
  width: 100%;
  align-items: start;
}

.stream-meta-line {
  font-size: 12px;
  line-height: 1.2;
  color: #5f6d8a;
  min-width: 0;
}

.stream-meta-line strong {
  color: var(--text);
  font-weight: 700;
}

.stream-artifact-links {
  display: inline;
}

.stream-artifact-links a {
  color: #24479c;
  text-decoration: none;
}

.stream-artifact-links a:hover {
  text-decoration: underline;
}

.drag-handle {
  cursor: grab;
  color: var(--muted);
}

.timeline-row-grid {
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(var(--day-width) - 1px),
    rgba(216, 224, 237, 0.86) calc(var(--day-width) - 1px),
    rgba(216, 224, 237, 0.86) var(--day-width)
  );
  background-size: 100% 100%;
  background-repeat: no-repeat;
  border-bottom: 1px solid rgba(216, 224, 237, 0.65);
  position: relative;
  z-index: 1;
}

.timeline-nonworking-day {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(232, 85, 85, 0.08);
  pointer-events: none;
  z-index: 0;
}

.stream-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 2px dashed rgba(53, 109, 255, 0.32);
  pointer-events: none;
  z-index: 1;
}

.stream-marker::before {
  content: "";
  position: absolute;
  top: 8px;
  left: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.95);
}

.stream-marker-label {
  position: absolute;
  top: 8px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid currentColor;
}

.stream-marker-deadline.is-planned,
.stream-marker-milestone.is-planned {
  color: #356dff;
}

.stream-marker-deadline.is-soon,
.stream-marker-milestone.is-soon {
  color: #c9831c;
}

.stream-marker-deadline.is-urgent,
.stream-marker-milestone.is-urgent {
  color: #e16a1e;
}

.stream-marker-deadline.is-overdue,
.stream-marker-milestone.is-overdue {
  color: #c8434d;
}

.timeline-card {
  position: absolute;
  height: 118px;
  box-sizing: border-box;
  padding: 8px 12px 10px;
  border-radius: 16px;
  background: linear-gradient(135deg, #4f7cff, #2c57d4);
  color: #fff;
  box-shadow: 0 12px 20px rgba(33, 57, 133, 0.16);
  cursor: grab;
  user-select: none;
  overflow: visible;
  z-index: 2;
}

.timeline-card-compact {
  height: 92px;
  padding: 8px 10px;
  border-radius: 14px;
}

.timeline-card.done {
  background: linear-gradient(135deg, rgba(47, 140, 87, 0.86), rgba(70, 165, 106, 0.86));
}

.timeline-card.overdue {
  background: linear-gradient(135deg, rgba(200, 67, 77, 0.82), rgba(225, 114, 88, 0.82));
}

.timeline-card.pending-sync {
  background: linear-gradient(135deg, #f0a93b, #dd7d2d);
  box-shadow: 0 16px 24px rgba(170, 110, 32, 0.2);
}

.timeline-card-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.timeline-card-assignee {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-card .priority-badge {
  margin-top: 1px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
}

.timeline-card .priority-p0 {
  background: rgba(122, 15, 27, 0.72);
}

.timeline-card .priority-p1 {
  background: rgba(154, 63, 13, 0.68);
}

.timeline-card .priority-p2 {
  background: rgba(116, 81, 5, 0.68);
}

.timeline-card .priority-p3 {
  background: rgba(20, 48, 108, 0.58);
}

.timeline-card .priority-p4 {
  background: rgba(53, 63, 83, 0.5);
}

.timeline-card-sync-state {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.95;
}

.timeline-card-labels {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  max-height: 20px;
  overflow: hidden;
}

.timeline-card-label {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  font-size: 10px;
  font-weight: 600;
}

.timeline-card-dates {
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.84;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-card-compact .timeline-card-title {
  -webkit-line-clamp: 2;
  font-size: 13px;
}

.timeline-card-compact .timeline-card-sync-state {
  margin-top: 3px;
  font-size: 10px;
}

.card-resize {
  position: absolute;
  top: 0;
  right: -3px;
  width: 10px;
  height: 100%;
  cursor: ew-resize;
}

.card-link-dot {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
  border: 2px solid rgba(17, 28, 54, 0.55);
  cursor: crosshair;
  z-index: 3;
}

.card-link-dot-left {
  left: -8px;
}

.card-link-dot-right {
  right: -8px;
}

.card-link-dot.is-source {
  background: #ffd873;
}

.card-link-dot-left.is-target {
  background: #b7d2ff;
  box-shadow: 0 0 0 4px rgba(83, 134, 255, 0.16);
}

.relations-layer {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 4;
}

.relation-path {
  fill: none;
  stroke: rgba(53, 109, 255, 0.48);
  stroke-width: 3;
  stroke-linecap: round;
}

.relation-hitbox {
  fill: none;
  stroke: transparent;
  stroke-width: 18;
  pointer-events: stroke;
}

.relation-group {
  pointer-events: visiblePainted;
}

.relation-path-preview {
  stroke: rgba(53, 109, 255, 0.7);
  stroke-dasharray: 8 6;
}

.relation-delete-control {
  opacity: 0;
  pointer-events: all;
  cursor: pointer;
  transition: opacity 120ms ease;
}

.relation-group:hover .relation-delete-control {
  opacity: 1;
}

.relation-delete-control circle {
  fill: rgba(255, 255, 255, 0.96);
  stroke: rgba(200, 67, 77, 0.38);
  stroke-width: 1.5;
}

.relation-delete-control line {
  stroke: #c8434d;
  stroke-width: 2;
  stroke-linecap: round;
}

.blank-state {
  margin-top: 60px;
  display: grid;
  justify-items: start;
  gap: 12px;
}

.context-menu {
  position: fixed;
  z-index: 30;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 14px;
  padding: 8px;
}

.context-menu button {
  border: none;
  background: transparent;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.context-menu button:hover {
  background: var(--panel-soft);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 18, 36, 0.5);
  backdrop-filter: blur(8px);
}

.hidden {
  display: none !important;
}

.modal-card {
  width: min(100%, 560px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.modal-card-large {
  width: min(100%, 760px);
}

.btn-danger {
  background: rgba(200, 67, 77, 0.12);
  color: #a2343b;
  border: 1px solid rgba(200, 67, 77, 0.22);
}

.btn-danger:hover {
  background: rgba(200, 67, 77, 0.18);
}

.form-grid,
.settings-grid {
  display: grid;
  gap: 20px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checklist-item,
.detail-checklist-item {
  display: grid;
  align-items: center;
  gap: 12px;
}

.checklist-item {
  grid-template-columns: 18px minmax(0, 1fr) auto;
  margin-bottom: 10px;
}

.detail-checklist-item {
  grid-template-columns: 18px minmax(0, 1fr);
  margin-bottom: 10px;
}

.checklist-editor,
#checklistItems {
  display: grid;
  gap: 10px;
}

.card-capacity-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(214, 137, 38, 0.3);
  border-radius: 14px;
  background: rgba(255, 247, 226, 0.94);
  color: #6f4b12;
}

.card-capacity-warning > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.card-capacity-warning strong {
  color: #5d3b08;
}

.card-capacity-warning p {
  margin: 0;
  color: #795722;
  font-size: 13px;
  line-height: 1.4;
}

.card-capacity-warning .btn {
  flex: 0 0 auto;
  color: #70480b;
  border-color: rgba(186, 119, 25, 0.28);
  background: rgba(255, 255, 255, 0.72);
}

.stream-milestone-items {
  display: grid;
  gap: 10px;
}

.stream-milestone-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px auto;
  gap: 10px;
  align-items: center;
}

.section-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stream-artifact-items {
  display: grid;
  gap: 10px;
}

.stream-artifact-item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1.1fr) auto;
  gap: 10px;
  align-items: center;
}

.checklist-item input[type="text"] {
  min-width: 0;
  width: 100%;
}

.remove-checklist-item {
  border: none;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  padding: 0 6px;
  white-space: nowrap;
}

.detail-markdown {
  color: var(--text);
  line-height: 1.6;
  margin: 18px 0;
}

.detail-markdown h1,
.detail-markdown h2,
.detail-markdown h3 {
  margin-top: 18px;
}

.detail-meta {
  color: var(--muted);
  font-size: 14px;
}

.settings-page .workspace-header {
  margin-bottom: 18px;
}

.settings-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
}

.settings-hero-copy {
  min-width: 0;
}

.settings-hero-badge {
  min-width: 260px;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(245, 248, 253, 0.98));
  border: 1px solid rgba(216, 224, 237, 0.72);
  box-shadow: 0 10px 24px rgba(29, 42, 72, 0.05);
}

.settings-hero-badge strong {
  font-size: 18px;
}

.settings-hero-badge span {
  color: var(--muted);
  font-size: 14px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.settings-column {
  display: grid;
  gap: 18px;
}

.settings-card {
  padding: 18px;
  gap: 12px;
}

.settings-card-head {
  display: grid;
  gap: 6px;
  margin-bottom: 4px;
}

.settings-card-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.settings-card-accent {
  background:
    radial-gradient(circle at top right, rgba(53, 109, 255, 0.1), transparent 26%),
    rgba(255, 255, 255, 0.96);
}

.settings-project-chip {
  display: inline-grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(247, 250, 255, 0.96);
  border: 1px solid rgba(216, 224, 237, 0.72);
}

.settings-project-chip strong {
  font-size: 22px;
}

.settings-inline-result {
  min-height: 22px;
}

.vacation-ranges {
  display: grid;
  gap: 10px;
}

.vacation-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.vacation-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#inviteForm {
  margin-top: 6px;
}

.settings-subform {
  margin-top: 6px;
}

.team-people-list {
  display: grid;
  gap: 16px;
}

.team-person-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(216, 224, 237, 0.78);
  background: rgba(250, 252, 255, 0.92);
}

.team-person-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.team-person-head strong {
  font-size: 20px;
}

.team-person-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.team-person-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(241, 245, 252, 0.92);
}

.team-person-notes {
  margin: 0;
  color: #52617c;
  line-height: 1.5;
}

.team-person-logs {
  margin-top: 4px;
}

.team-person-log-list {
  display: grid;
  gap: 10px;
  padding: 12px 16px 16px;
}

.team-person-log-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(220, 227, 238, 0.9);
}

.team-person-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-person-log-item p {
  margin: 0;
  line-height: 1.45;
  color: #52617c;
}

.team-person-log-item p span {
  font-weight: 700;
  color: var(--text);
}

.settings-empty-project {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed rgba(216, 224, 237, 0.9);
  background: rgba(247, 250, 255, 0.86);
}

.settings-empty-project p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .settings-hero-badge {
    min-width: 0;
  }
}

.empty-note {
  color: var(--muted);
  margin: 12px 0 0;
}

@media (max-width: 1180px) {
  .app-shell,
  .app-shell.menu-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 30;
    width: min(360px, calc(100vw - 32px));
    height: 100vh;
    min-height: 100vh;
    transform: translateX(-110%);
    transition: transform 0.24s ease;
    box-shadow: 0 24px 48px rgba(22, 31, 54, 0.2);
  }

  .app-shell.mobile-sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 24;
    background: rgba(17, 28, 54, 0.26);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
  }

  .app-shell.mobile-sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(216, 224, 237, 0.75);
    backdrop-filter: blur(18px);
  }

  .mobile-topbar .ghost-icon-button {
    flex: 0 0 auto;
  }

  .mobile-user-badge {
    margin-left: auto;
  }

  .sidebar-top {
    justify-content: space-between;
  }

  .sidebar-top #sidebarToggle {
    display: inline-flex;
  }

  .workspace-header-actions,
  .toolbar {
    width: 100%;
    min-width: 0;
  }

  .pomodoro-widget-controls {
    align-items: stretch;
  }

  .pomodoro-timebox {
    flex: 1 1 100%;
    min-width: 0;
  }

  .timeline-header,
  .timeline-row {
    grid-template-columns: 180px minmax(900px, 1fr);
  }

  .month-day {
    min-height: calc(90px + var(--month-span-stack-height, 0px));
    padding: 8px;
    gap: 8px;
  }

  .month-day-tasks {
    gap: 6px;
  }

  .month-task,
  .month-meeting,
  .month-span-task {
    padding: 6px 8px;
    border-radius: 10px;
  }

  .month-task-title,
  .month-span-task-title {
    font-size: 12px;
  }

  .month-task-project,
  .month-meeting-time,
  .month-span-task-project,
  .month-span-task-assignee {
    font-size: 10px;
  }

  .month-meeting-title {
    font-size: 11px;
    line-height: 1.2;
  }
}

@media (max-width: 720px) {
  .workspace,
  .sidebar {
    padding: 18px;
  }

  .mobile-topbar {
    padding: 10px;
  }

  .mobile-user-copy strong {
    font-size: 14px;
  }

  .mobile-user-copy span {
    font-size: 12px;
  }

  .toolbar,
  .workspace-header,
  .timeline-nav,
  .modal-head,
  .modal-actions,
  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-header {
    display: flex;
    gap: 14px;
  }

  .workspace-header-actions {
    justify-self: auto;
    width: 100%;
    margin-left: 0;
    min-width: 0;
  }

  .toolbar {
    align-items: flex-start;
    width: 100%;
    flex-wrap: wrap;
  }

  .toolbar-top-row {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .toolbar-icon-actions {
    justify-content: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .card-capacity-warning {
    align-items: stretch;
    flex-direction: column;
  }

  .card-capacity-warning .btn {
    width: 100%;
  }

  .stream-milestone-item {
    grid-template-columns: 1fr;
  }

  .stream-artifact-item {
    grid-template-columns: 1fr;
  }

  .month-grid {
    border-radius: 14px;
  }

  .month-weekday {
    padding: 10px 6px;
    font-size: 12px;
  }

  .month-day {
    min-height: calc(82px + var(--month-span-stack-height, 0px));
    padding: 6px;
    gap: 6px;
  }

  .month-day-number {
    font-size: 13px;
  }

  .month-task,
  .month-meeting,
  .month-span-task {
    padding: 6px 7px;
  }

  .month-task-title,
  .month-meeting-title,
  .month-span-task-title {
    font-size: 11px;
  }

  .month-task-project,
  .month-meeting-time,
  .month-span-task-project,
  .month-span-task-assignee {
    font-size: 9px;
  }
}
