:root {
  /* Light theme defaults */
  --bg: #f3f4f6;
  --bg-card: #ffffff;
  --bg-card-soft: #f9fafb;
  --border-subtle: rgba(148, 163, 184, 0.4);
  --accent: #f97316;
  --accent-2: #ec4899;
  --accent-green: #22c55e;
  --text: #020617;
  --muted: #6b7280;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --shadow: 0 18px 35px rgba(15, 23, 42, 0.18);
  --transition-fast: 150ms ease-out;
  --transition-med: 220ms ease-out;

  /* Project colors */
  --project-color-0: #6366f1;
  --project-color-1: #f97316;
  --project-color-2: #10b981;
  --project-color-3: #ec4899;
  --project-color-4: #facc15;
  --project-color-5: #22c55e;
  --project-color-6: #3b82f6;
  --project-color-7: #a855f7;
}

/* Dark mode overrides */
body.dark {
  --bg: radial-gradient(circle at top, #020617 0, #020617 50%, #000 100%);
  --bg-card: #020617;
  --bg-card-soft: #020617;
  --border-subtle: rgba(148, 163, 184, 0.5);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.9);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* App layout */

.app {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 20px;
}

.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 320px; /* left, center, right */
  gap: 18px;
  width: 100%;
  max-width: none;
}

/* bottom row full-width */
.layout-progress {
  grid-column: 1 / -1;
}

/* MAIN / TIMER */

.layout-main {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
}

body.dark .layout-main {
  background: radial-gradient(circle at 0 0, rgba(248, 250, 252, 0.04), transparent 55%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
}

.header {
  min-height: 0;
}

/* Brand in sidebar */

.layout-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand-header {
  margin-bottom: 8px;
}

.brand-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo {
  font-size: 1.1rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin: 0;
}

.logo-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Icon buttons */

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #e5e7eb;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition-med);
}

body.dark .icon-btn {
  background: rgba(15, 23, 42, 0.9);
  color: var(--muted);
}

.icon-btn:hover {
  color: #111827;
  border-color: #111827;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

body.dark .icon-btn:hover {
  color: #f9fafb;
  border-color: #e5e7eb;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.95);
}

/* Sound settings popover */

.sound-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Popover slightly overlapping the icon → no dead gap */
.sound-settings {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateX(-6px) translateY(-50%);
  min-width: 200px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  color: #020617;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
  display: none;
  z-index: 20;
}

body.dark .sound-settings {
  background: #020617;
  color: var(--text);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.9);
}

/* Keeps it open while moving from icon into panel */
.sound-wrapper:hover .sound-settings,
.sound-wrapper:focus-within .sound-settings {
  display: block;
}

.sound-settings h3 {
  margin: 0 0 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.sound-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 0.8rem;
}

.sound-row input {
  cursor: pointer;
}

/* "Working now on" chunk banner */

.now-working {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.7);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.now-working span {
  font-weight: 800;
}

/* Timer card */

.timer-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 6px;
}

/* big timer */

.timer-circle {
  position: relative;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #fefce8, #fee2e2);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.25);
  cursor: pointer;
  transition: transform var(--transition-med), box-shadow var(--transition-med);
}

.timer-circle:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 34px 80px rgba(15, 23, 42, 0.32);
}

.timer-circle:active {
  transform: translateY(-1px) scale(0.99);
}

body.dark .timer-circle {
  background: radial-gradient(circle at center, #111827, #020617);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.98);
}

.progress-ring {
  position: absolute;
  inset: 0;
  margin: auto;
  transform: rotate(-90deg);
}

.background-circle {
  stroke: rgba(148, 163, 184, 0.25);
  stroke-linecap: round;
}

.progress-ring__circle {
  stroke: url(#timerGradient);
  stroke-linecap: round;
  stroke-dasharray: 879.65; /* 2πr, r=140 */
  stroke-dashoffset: 879.65;
  filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.5));
  transition: stroke-dashoffset 0.25s ease-out;
}

/* timer content */

.timer-content {
  position: relative;
  text-align: center;
  z-index: 1;
  padding-top: 6px;
}

/* hide mode label text visually */
.mode-label {
  display: none;
}

.time-display {
  font-size: 4.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.primary-btn {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: radial-gradient(circle at 0 0, rgba(251, 191, 36, 0.25), transparent 55%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 22px 44px rgba(249, 115, 22, 0.6);
  transition: all var(--transition-med);
}

.primary-btn:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 30px 60px rgba(249, 115, 22, 0.7);
}

.primary-btn:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.5);
}

.controls {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: all var(--transition-med);
}

.controls.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.controls button {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #e5e7eb;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 5px 12px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transition: all var(--transition-fast);
}

body.dark .controls button {
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.9);
}

.controls button:hover {
  color: #111827;
  border-color: #111827;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

body.dark .controls button:hover {
  color: #f9fafb;
  border-color: #f9fafb;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.9);
}

/* tomato crown + celebration */

.tomato-crown {
  position: absolute;
  top: 10px;
  left: 25%;
  transform: translateX(-50%) rotate(-15deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.7;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  animation: crown-float 3s ease-in-out infinite;
}

.tomato-crown .crown {
  font-size: 1.7rem;
  margin-bottom: -12px;
}

.tomato-crown .tomato {
  font-size: 2.2rem;
}

@keyframes crown-float {
  0%,
  100% {
    transform: translateX(-50%) rotate(-15deg) translateY(0);
  }
  50% {
    transform: translateX(-50%) rotate(-11deg) translateY(-3px);
  }
}

.tomato-celebration {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}

.tomato-celebration.show {
  opacity: 1;
  transform: scale(1);
}

.timer-circle.pulse {
  animation: timer-pulse 0.7s ease-out;
}

@keyframes timer-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  70% {
    transform: scale(1.02);
    box-shadow: 0 0 0 18px rgba(34, 197, 94, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* mode selector */

.mode-selector {
  margin-top: 28px;
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #e5e7eb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

body.dark .mode-selector {
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.95);
}

.mode-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition-med);
}

.mode-btn.active {
  color: #fefce8;
  background: radial-gradient(circle at 0 0, rgba(251, 191, 36, 0.24), transparent 55%);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.65);
}

/* settings hover panel (durations) */

.sidebar-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.settings-icon {
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
}

/* Popover slightly overlapping the gear */
.settings-row {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateX(-6px) translateY(-50%);
  display: flex;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--bg-card-soft);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  padding: 7px 12px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-med), transform var(--transition-med);
  z-index: 15;
}

.settings-wrapper:hover .settings-row,
.settings-wrapper:focus-within .settings-row {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-6px) translateY(-50%);
}

.settings-row label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.settings-row input {
  width: 48px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 2px 4px;
  background: #f9fafb;
  color: var(--text);
  font-size: 0.78rem;
}

body.dark .settings-row input {
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
}

/* SIDEBAR CARDS */

.sidebar-card {
  width: 100%;
  background: var(--bg-card-soft);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 16px 14px 14px;
  box-shadow: var(--shadow);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.sidebar-header h2 {
  font-size: 0.95rem;
  margin: 0;
}

/* Today card in center */
.today-card {
  max-width: 420px;
}

/* buttons */

.small-btn {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #e5e7eb;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 5px 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

body.dark .small-btn {
  background: rgba(15, 23, 42, 0.9);
}

.small-btn:hover {
  color: #111827;
  border-color: #111827;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

body.dark .small-btn:hover {
  color: #f9fafb;
  border-color: #f9fafb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.95);
}

/* daily progress */

.completed-count {
  font-size: 0.82rem;
  margin-bottom: 8px;
  color: var(--muted);
}

.daily-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
}

.daily-goal-label {
  font-weight: 500;
}

.daily-bar {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.3);
  overflow: hidden;
}

.daily-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-2));
  border-radius: inherit;
  transition: width 0.3s ease-out;
}

.project-breakdown {
  color: var(--muted);
  min-height: 1em;
}

/* goal complete styling */

.daily-progress.goal-complete {
  padding: 4px 6px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.08);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4);
}

.daily-progress.goal-complete .daily-bar-fill {
  background: linear-gradient(90deg, var(--accent-green), #22c55e);
}

/* TASKS LIST */

.tasks-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
  width: 100%;
}

.tasks-list.archived {
  max-height: 180px;
}

.tasks-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px;
  border-radius: 10px;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.tasks-list-item:hover {
  background: rgba(148, 163, 184, 0.12);
}

.tasks-list-item-main {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.tasks-list-item.is-new {
  background: rgba(148, 163, 184, 0.08);
  border-radius: 999px;
  cursor: text;
}

.tasks-list-item.is-new:hover {
  background: rgba(251, 191, 36, 0.16);
}

.tasks-list-item.is-new .task-checkbox {
  opacity: 0.25;
}

.task-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.task-label {
  font-size: 0.82rem;
}

/* status dot per task */

.task-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #9ca3af; /* default: pending */
  flex-shrink: 0;
}

.tasks-list-item.done .task-status-dot {
  background: #22c55e; /* done */
}

.tasks-list.archived .task-status-dot {
  background: #6b7280; /* archived column */
}

/* current task highlight */

.tasks-list-item.is-current {
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.6);
  background: rgba(249, 115, 22, 0.08);
}

.tasks-list-item.is-current .task-status-dot {
  background: #f97316;
}

/* new task input row */
.tasks-list-item.is-new .task-checkbox {
  opacity: 0.4;
}

.task-new-input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  padding: 5px 10px;
  font-size: 0.82rem;
  background: #f9fafb;
  color: var(--text);
}

body.dark .task-new-input {
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
}

.tasks-list-item.done .task-label {
  text-decoration: line-through;
  color: var(--muted);
}

.tasks-list-actions {
  white-space: nowrap;
}

.task-icon-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0 3px;
  color: var(--muted);
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.task-icon-btn:hover {
  color: #ea580c;
  transform: translateY(-1px);
}

.task-icon-btn[data-task-action="archive"]:hover {
  color: #f59e0b;
}

.task-icon-btn[data-task-action="restore"]:hover {
  color: #16a34a;
}

/* tasks archived section */

.tasks-archived-toggle-row {
  margin-top: 6px;
  text-align: right;
}

.tasks-archived-section {
  display: none;
  margin-top: 4px;
}

.tasks-archived-section.is-open {
  display: block;
}

/* PROJECTS TABLE */

.projects-table-card {
  margin-top: 2px;
  background: var(--bg-card-soft);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 12px 12px 10px;
  box-shadow: var(--shadow);
}

body.dark .projects-table-card {
  background: rgba(15, 23, 42, 0.9);
}

.projects-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.projects-table-header h2 {
  font-size: 0.95rem;
  margin: 0;
}

.project-row {
  display: flex;
  gap: 6px;
}

.combined-project-row {
  margin-bottom: 8px;
}

.project-select {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 5px 10px;
  background: #f9fafb;
  color: var(--text);
  font-size: 0.82rem;
}

body.dark .project-select {
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
}

.projects-table-wrapper {
  max-height: 220px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  width: 100%;
}

.projects-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.projects-table thead {
  background: rgba(148, 163, 184, 0.1);
}

.projects-table th,
.projects-table td {
  padding: 4px 8px;
  text-align: left;
}

.projects-table th {
  font-weight: 600;
  color: var(--muted);
  position: sticky;
  top: 0;
  backdrop-filter: blur(4px);
}

.projects-table tbody tr {
  cursor: pointer;
  transition: background var(--transition-fast);
}

.projects-table tbody tr:nth-child(even) {
  background: rgba(148, 163, 184, 0.06);
}

.projects-table tbody tr:hover {
  background: rgba(251, 191, 36, 0.16);
}

.projects-table tbody tr.is-active {
  background: rgba(251, 191, 36, 0.25);
  box-shadow: inset 2px 0 0 #f97316;
}

body.dark .projects-table tbody tr.is-active {
  background: rgba(34, 197, 94, 0.15);
  box-shadow: inset 2px 0 0 #22c55e;
}

.projects-table-name {
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-color-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex-shrink: 0;
}

.projects-table-goal-input {
  width: 70px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 2px 6px;
  font-size: 0.76rem;
  background: #f9fafb;
  color: var(--text);
}

body.dark .projects-table-goal-input {
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
}

/* new project row */

.projects-new-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.projects-new-name-input {
  flex: 1.4;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  padding: 4px 8px;
  font-size: 0.8rem;
  background: #f9fafb;
  color: var(--text);
}

.projects-new-goal-input {
  flex: 0.8;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  padding: 4px 8px;
  font-size: 0.8rem;
  background: #f9fafb;
  color: var(--text);
}

body.dark .projects-new-name-input,
body.dark .projects-new-goal-input {
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
}

/* table actions */

.projects-table-actions {
  white-space: nowrap;
}

.table-icon-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 4px;
  color: var(--muted);
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.table-icon-btn:hover {
  color: #dc2626;
  transform: translateY(-1px);
}

.table-icon-btn[data-project-action="archive"]:hover {
  color: #f59e0b;
}

.table-icon-btn[data-project-action="restore"]:hover {
  color: #16a34a;
}

/* archived sections */

.archived-toggle-row {
  margin-top: 6px;
  text-align: right;
}

.link-btn {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.76rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.archived-section {
  display: none;
  margin-top: 6px;
}

.archived-section.is-open {
  display: block;
}

.archived-wrapper {
  max-height: 150px;
}

/* PROGRESS GRAPH CARD (bottom full-width) */

.progress-graph-card {
  margin-top: 4px;
  background: var(--bg-card-soft);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 14px 16px 16px;
  box-shadow: var(--shadow);
}

.progress-graph-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.progress-graph-header h2 {
  margin: 0;
  font-size: 0.95rem;
}

.progress-graph-subtitle {
  font-size: 0.78rem;
  color: var(--muted);
}

.progress-graph {
  width: 100%;
}

/* line chart */

.progress-graph-svg {
  width: 100%;
  height: 150px;
}

.progress-graph-grid line {
  stroke: rgba(148, 163, 184, 0.35);
  stroke-width: 0.3;
}

.progress-graph-grid .axis {
  stroke: rgba(148, 163, 184, 0.8);
  stroke-width: 0.5;
}

.progress-graph-line {
  fill: none;
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.progress-graph-legend {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.progress-graph-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.progress-graph-legend-color {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

/* MODAL */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
}

.modal-panel {
  position: relative;
  z-index: 1;
  background: #020617;
  color: #e5e7eb;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  max-width: 520px;
  width: 90%;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.95);
}

.modal-title {
  margin: 0 0 8px;
  font-size: 1rem;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
}

.feedback-frame {
  width: 100%;
  height: 320px;
  border: none;
  border-radius: 12px;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .layout-main {
    order: 1;
  }

  .layout-sidebar-left {
    order: 2;
  }

  .layout-sidebar-right {
    order: 3;
  }

  .layout-progress {
    order: 4;
  }

  .timer-circle {
    width: 320px;
    height: 320px;
  }

  .time-display {
    font-size: 3.2rem;
  }

  .projects-table-wrapper {
    max-height: 160px;
  }
}
