@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: radial-gradient(circle at 10% 20%, #020817 0%, #020617 38%, #000212 100%);
  --bg-accent: radial-gradient(circle at 70% 10%, rgba(56, 189, 248, 0.18), transparent 55%);
  --surface: rgba(9, 16, 28, 0.86);
  --surface-soft: rgba(30, 41, 59, 0.55);
  --surface-strong: rgba(13, 23, 41, 0.94);
  --card-glow: 0 55px 120px rgba(2, 6, 23, 0.6);
  --text: #f9fbff;
  --text-soft: rgba(224, 231, 255, 0.8);
  --text-muted: rgba(148, 163, 184, 0.7);
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --accent-soft: rgba(56, 189, 248, 0.18);
  --success: #22c55e;
  --warning: #facc15;
  --danger: #f87171;
  --border: rgba(148, 163, 184, 0.22);
  --shadow-soft: 0 24px 48px rgba(2, 6, 23, 0.45);
  --shadow-strong: 0 40px 100px rgba(2, 6, 23, 0.75);
  --frost: rgba(8, 15, 27, 0.78);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: clamp(24px, 4vw, 56px);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body::before {
  content: '';
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 65vh;
  background: var(--bg-accent);
  opacity: 0.6;
  filter: blur(30px);
  pointer-events: none;
  transform: translateY(calc(var(--scroll-progress, 0) * -30px));
  transition: opacity 0.6s ease;
}

body::after {
  content: '';
  position: fixed;
  inset: auto -10% -30% -10%;
  height: 50vh;
  background: radial-gradient(circle at 40% 40%, rgba(14, 165, 233, 0.15), transparent 60%);
  filter: blur(45px);
  pointer-events: none;
}

main {
  width: min(1280px, 100%);
  background: linear-gradient(180deg, rgba(4, 9, 20, 0.95), rgba(2, 6, 23, 0.96));
  border-radius: 36px;
  box-shadow: var(--card-glow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(24px, 3vw, 44px) clamp(28px, 3.5vw, 54px);
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.92));
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.is-scrolled header,
header.is-scrolled {
  background: linear-gradient(140deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.82));
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.55);
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  color: inherit;
  text-decoration: none;
  position: relative;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.65);
  outline-offset: 6px;
  border-radius: 24px;
}

.brand:hover {
  transform: translateX(4px);
}

.brand-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  position: relative;
  background: transparent;
  display: grid;
  place-items: center;
  animation: brandOrbit 25s linear infinite;
  animation-play-state: paused;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand:hover .brand-icon {
  transform: scale(1.1) rotate(360deg);
  animation-play-state: running;
}

/* Pluto planet with rings */
.brand-icon::before {
  content: '';
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, 
    rgba(139, 92, 246, 0.9) 0%, 
    rgba(99, 102, 241, 0.85) 30%, 
    rgba(59, 130, 246, 0.9) 70%, 
    rgba(37, 99, 235, 1) 100%);
  box-shadow: 
    inset -4px -4px 12px rgba(0, 0, 0, 0.3),
    inset 2px 2px 8px rgba(255, 255, 255, 0.2),
    0 0 20px rgba(139, 92, 246, 0.5),
    0 0 40px rgba(99, 102, 241, 0.3);
  animation: planetPulse 5s ease-in-out infinite;
  animation-play-state: paused;
}

.brand:hover .brand-icon::before {
  animation-play-state: running;
}

/* Orbital ring */
.brand-icon::after {
  content: '';
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(56, 189, 248, 0.6);
  border-right-color: rgba(139, 92, 246, 0.4);
  border-bottom-color: rgba(236, 72, 153, 0.3);
  border-left-color: rgba(99, 102, 241, 0.5);
  animation: ringRotate 10s linear infinite;
  animation-play-state: paused;
}

.brand:hover .brand-icon::after {
  animation-play-state: running;
  animation-duration: 3s;
  border-width: 3px;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
}

@keyframes brandOrbit {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
}

@keyframes planetPulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 
      inset -4px -4px 12px rgba(0, 0, 0, 0.3),
      inset 2px 2px 8px rgba(255, 255, 255, 0.2),
      0 0 20px rgba(139, 92, 246, 0.4),
      0 0 30px rgba(99, 102, 241, 0.25);
  }
  50% { 
    transform: scale(1.03);
    box-shadow: 
      inset -4px -4px 12px rgba(0, 0, 0, 0.3),
      inset 2px 2px 8px rgba(255, 255, 255, 0.2),
      0 0 25px rgba(139, 92, 246, 0.5),
      0 0 45px rgba(99, 102, 241, 0.35);
  }
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

h1 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(22px, 4vw, 34px);
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 1) 0%, 
    rgba(56, 189, 248, 1) 50%, 
    rgba(139, 92, 246, 0.9) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 12s ease-in-out infinite;
  transition: all 0.4s ease;
  animation-play-state: paused;
}

.brand:hover h1 {
  animation-play-state: running;
  animation-duration: 3s;
  letter-spacing: 1px;
  transform: translateX(2px);
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.top-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ghost {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-soft);
  padding: 10px 18px;
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.45);
  color: var(--accent);
}

.ghost:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.65);
  outline-offset: 3px;
}

.ghost:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.user-chip {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: var(--accent);
  font-weight: 500;
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.3);
}

.user-chip button {
  border: none;
  background: rgba(15, 23, 42, 0.6);
  color: inherit;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.user-chip button:hover {
  transform: translateY(-2px);
}

.pill {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-soft);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.pill strong {
  color: var(--accent);
  font-weight: 600;
}

.dropdown {
  position: relative;
}

.dropdown button {
  border: none;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.dropdown button:hover {
  transform: translateY(-2px);
  background: rgba(56, 189, 248, 0.16);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 200px;
  padding: 12px;
  background: var(--surface-strong);
  border-radius: 18px;
  box-shadow: var(--shadow-strong);
  border: 1px solid var(--border);
  display: grid;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-menu button {
  width: 100%;
  justify-content: space-between;
}

main > section {
  padding: clamp(32px, 4vw, 56px);
  display: grid;
  gap: clamp(28px, 3vw, 40px);
}

.auth-shell {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.7));
  display: grid;
  gap: 24px;
  padding: clamp(36px, 6vw, 72px);
}

.auth-card {
  background: var(--surface-strong);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 44px);
  box-shadow: var(--shadow-strong);
  border: 1px solid var(--border);
  display: grid;
  gap: 18px;
}

.auth-card h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 600;
}

.auth-subtitle {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 15px;
}

label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  display: grid;
  gap: 8px;
}

input[type="text"],
input[type="password"],
input[type="date"],
textarea,
select {
  appearance: none;
  font-family: inherit;
  font-size: 15px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(10, 14, 26, 0.86);
  color: var(--text);
  caret-color: var(--accent);
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(148, 163, 184, 0.55);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.24);
  outline: none;
  background: rgba(2, 6, 23, 0.94);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button.primary {
  padding: 14px 22px;
  border-radius: 20px;
  border: none;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: white;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 20px 44px rgba(14, 165, 233, 0.45);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

button.primary:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 24px 60px rgba(14, 165, 233, 0.55);
}

button.text-btn {
  border: none;
  background: none;
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
}

.auth-switch {
  font-size: 14px;
  color: var(--text-soft);
  text-align: center;
}

.dashboard {
  display: grid;
  gap: 40px;
}

.dashboard.hidden {
  display: none;
}

.panel-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.panel {
  padding: clamp(22px, 2.4vw, 28px);
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.panel::before {
  content: '';
  position: absolute;
  inset: -40% auto auto -40%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.1), transparent 65%);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.5);
  border-color: rgba(56, 189, 248, 0.35);
}

.panel:hover::before {
  opacity: 1;
  transform: translateY(0);
}

.panel h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.clock-display {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 500;
  letter-spacing: 1px;
}

.clock-date {
  color: var(--text-soft);
  font-size: 14px;
}

/* World Clock Panel adjustments */
.panel.world-clock-initialized {
  gap: 12px;
}

/* World Clock Grid - Clean & Simple */
.world-clock-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  width: 100%;
}

.timezone-item {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(139, 92, 246, 0.05));
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

.timezone-item::before {
  content: '';
  position: absolute;
  inset: -40% auto auto -40%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12), transparent 65%);
  opacity: 0;
  transform: translate3d(0, 15px, 0) scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.timezone-item:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
}

.timezone-item:hover::before {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.timezone-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.timezone-time {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.summary-grid {
  display: grid;
  gap: 14px;
}

.focus-task-item {
  border: none;
  font-family: inherit;
}

.focus-task-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(10, 18, 34, 0.8);
  border-radius: 18px;
  border: 1px solid rgba(56, 189, 248, 0.16);
  font-size: 14px;
  color: var(--text-soft);
}

.summary-row strong {
  font-size: 20px;
  color: var(--text);
}

.summary-row small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 4px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filter-chip {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.24);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-soft);
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.filter-chip:hover {
  transform: translateY(-1px);
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.32);
}

.filter-chip.active {
  background: rgba(56, 189, 248, 0.24);
  border-color: rgba(56, 189, 248, 0.5);
  color: var(--accent);
  box-shadow: 0 18px 40px rgba(56, 189, 248, 0.25);
}

.stack {
  display: grid;
  gap: 22px;
}

#task-list {
  display: grid;
  gap: 16px;
  position: relative;
  z-index: 0;
}

/* New Compact Task Widget Design */
.task-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 18px 20px;
  display: grid;
  gap: 0;
  position: relative;
  transition: all 0.2s ease;
  overflow: visible;
  z-index: 1;
  border-radius: 20px;
}

.task-widget:hover {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.5);
}

.task-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.task-widget-main {
  flex: 1;
  min-width: 0;
}

.task-widget-title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 1) 0%, 
    rgba(56, 189, 248, 0.95) 50%, 
    rgba(139, 92, 246, 0.85) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: taskTitleGradient 8s ease-in-out infinite;
  animation-play-state: paused;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.task-widget:hover .task-widget-title {
  animation-play-state: running;
  animation-duration: 3s;
  letter-spacing: 0.3px;
}

@keyframes taskTitleGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.task-widget-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.task-due-date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Task Menu Button */
.task-menu {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Elevate entire widget when dropdown is open */
.task-widget:has(.dropdown.open),
.task-widget.menu-open {
  z-index: 9999 !important;
  position: relative;
}

.task-menu-btn {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}

.task-menu-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  transform: scale(1.05);
}

/* Dropdown menu positioning for task menu */
.task-menu .dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  z-index: 99999;
  padding: 12px;
  background: var(--surface-strong);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: grid;
  gap: 8px;
  /* Ensure visibility transitions work */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.task-menu.open .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.task-menu .dropdown-menu button {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  gap: 10px;
  border: none;
  background: rgba(15, 23, 42, 0.4);
  color: var(--text-soft);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.task-menu .dropdown-menu button:hover {
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent);
  transform: translateX(2px);
}

/* Expandable Panels */
.task-details-panel,
.task-notes-panel,
.task-collabs-panel,
.task-edit-panel {
  margin-top: 16px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(10, 18, 34, 0.85), rgba(15, 23, 42, 0.75));
  border-radius: 16px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 12px rgba(2, 6, 23, 0.4);
  animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 1000px;
  }
}

/* Details Content */
.task-details-content {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.12);
}

.detail-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  min-width: 90px;
}

.detail-value {
  font-size: 14px;
  color: var(--text);
  text-align: right;
  flex: 1;
  font-weight: 500;
}

/* Notes List */
.notes-list-compact {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.notes-list-compact::-webkit-scrollbar {
  width: 6px;
}

.notes-list-compact::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 3px;
}

.notes-list-compact::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 3px;
}

.notes-list-compact::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.6);
}

.note-compact {
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  transition: all 0.2s ease;
}

.note-compact:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(15, 23, 42, 0.95);
}

.note-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 8px;
}

.note-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.note-form-compact {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(56, 189, 248, 0.15);
}

.note-form-compact textarea {
  width: 100%;
  min-height: 70px;
  margin-bottom: 10px;
  resize: vertical;
}

/* Collaborators List */
.collabs-list-compact {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.collab-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.collab-remove {
  border: none;
  background: rgba(248, 113, 113, 0.25);
  color: var(--danger);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: 600;
}

.collab-remove:hover {
  background: rgba(248, 113, 113, 0.5);
  transform: scale(1.15);
}

/* Edit Form Grid */
.edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.edit-grid label,
.task-edit-panel > label {
  display: grid;
  gap: 8px;
}

.edit-grid label span,
.task-edit-panel > label span {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Task widget form elements styling */
.task-edit-panel input[type="text"],
.task-edit-panel input[type="date"],
.task-edit-panel select,
.task-edit-panel textarea,
.task-notes-panel textarea,
.task-collabs-panel input[type="text"] {
  appearance: none;
  font-family: inherit;
  font-size: 14px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: linear-gradient(135deg, rgba(10, 14, 26, 0.95), rgba(15, 23, 42, 0.85));
  color: var(--text);
  caret-color: var(--accent);
  transition: all 0.2s ease;
  width: 100%;
  font-weight: 500;
}

.task-edit-panel input::placeholder,
.task-edit-panel textarea::placeholder,
.task-notes-panel textarea::placeholder,
.task-collabs-panel input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.task-edit-panel input:focus,
.task-edit-panel select:focus,
.task-edit-panel textarea:focus,
.task-notes-panel textarea:focus,
.task-collabs-panel input:focus {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2), 0 4px 12px rgba(56, 189, 248, 0.15);
  outline: none;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.98), rgba(10, 18, 34, 0.95));
}

.task-edit-panel textarea {
  min-height: 80px;
  resize: vertical;
}

.task-edit-panel select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2338bdf8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.task-edit-panel select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2338bdf8' d='M6 3L11 8H1z'/%3E%3C/svg%3E");
}

/* Button styling for panels */
.task-edit-panel button.secondary,
.task-notes-panel button.secondary,
.task-collabs-panel button.secondary {
  border: none;
  background: rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  color: var(--accent);
  transition: all 0.2s ease;
  font-size: 14px;
}

.task-edit-panel button.secondary:hover,
.task-notes-panel button.secondary:hover,
.task-collabs-panel button.secondary:hover {
  background: rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.task-edit-panel button.secondary:disabled,
.task-notes-panel button.secondary:disabled,
.task-collabs-panel button.secondary:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
  background: rgba(56, 189, 248, 0.15);
}

.task-edit-panel button.ghost,
.task-notes-panel button.ghost,
.task-collabs-panel button.ghost,
.task-details-panel button.ghost {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-soft);
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 14px;
}

.task-edit-panel button.ghost:hover,
.task-notes-panel button.ghost:hover,
.task-collabs-panel button.ghost:hover,
.task-details-panel button.ghost:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Message display in panels */
.task-edit-panel .message,
.task-notes-panel .message,
.task-collabs-panel .message {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid;
  margin: 12px 0;
  min-height: auto;
  font-weight: 500;
  display: none;
  animation: slideDown 0.2s ease-out;
}

/* Success message styling */
.success-toast {
  color: #22c55e;
  font-size: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(22, 163, 74, 0.2));
  border-radius: 12px;
  border: 2px solid rgba(34, 197, 94, 0.5);
  margin-bottom: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideDown 0.25s ease-out, pulse 0.4s ease;
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0; }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}

.success-toast {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Error toast styling */
.error-toast {
  color: var(--danger);
  font-size: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.25), rgba(239, 68, 68, 0.2));
  border-radius: 12px;
  border: 2px solid rgba(248, 113, 113, 0.5);
  margin-bottom: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideDown 0.25s ease-out, pulse 0.4s ease;
  box-shadow: 0 6px 16px rgba(248, 113, 113, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.task-edit-panel .message:empty,
.task-notes-panel .message:empty,
.task-collabs-panel .message:empty {
  display: none;
}

/* Inline form styling for collaborators panel */
.task-collabs-panel .inline-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: stretch;
}

.task-collabs-panel .inline-form input {
  flex: 1;
}

.task-collabs-panel .inline-form button {
  white-space: nowrap;
}

/* Responsive adjustments for widgets */
@media (max-width: 720px) {
  .task-widget {
    padding: 16px 18px;
  }
  
  .task-widget-title {
    font-size: 15px;
  }
  
  .edit-grid {
    grid-template-columns: 1fr;
  }
  
  .task-edit-panel,
  .task-notes-panel,
  .task-collabs-panel,
  .task-details-panel {
    padding: 14px;
  }
  
  .task-menu-btn {
    width: 30px;
    height: 30px;
  }
}

.task-content {
  display: grid;
  gap: 12px;
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.task-header h4 {
  margin: 0;
  font-weight: 600;
  font-size: 19px;
}

.status-badge {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.status-UPCOMING {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.3), rgba(249, 115, 22, 0.25));
  color: #fb923c;
  border-color: rgba(251, 146, 60, 0.4);
}

.status-OVERDUE {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.3), rgba(239, 68, 68, 0.25));
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.5);
}

.status-COMPLETED {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(22, 163, 74, 0.25));
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.4);
}

.status-CANCELED {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.25), rgba(100, 116, 139, 0.2));
  color: rgba(226, 232, 240, 0.9);
  border-color: rgba(148, 163, 184, 0.35);
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-soft);
}

.task-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.task-editor {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.task-editor .row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.task-editor button.secondary {
  border: none;
  background: rgba(10, 18, 34, 0.85);
  border-radius: 18px;
  padding: 12px 18px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  transition: background 0.2s ease, transform 0.2s ease;
}

.task-editor button.secondary:hover {
  background: rgba(56, 189, 248, 0.18);
  transform: translateY(-1px);
}

.task-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.avatar-list {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.avatar {
  padding: 8px 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.6);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.avatar button {
  border: none;
  background: transparent;
  color: rgba(248, 113, 113, 0.9);
  cursor: pointer;
  font-size: 12px;
}

.inline-form {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-form input {
  width: min(220px, 100%);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(10, 18, 34, 0.85);
  color: var(--text);
}

.inline-form button {
  padding: 10px 16px;
  border-radius: 14px;
  border: none;
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.inline-form button:hover {
  transform: translateY(-1px);
  background: rgba(56, 189, 248, 0.32);
}

/* Task notes section - always visible and highlighted */
.task-notes-section {
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(139, 92, 246, 0.06));
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.task-notes-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    rgba(56, 189, 248, 0.8) 0%, 
    rgba(139, 92, 246, 0.8) 50%, 
    rgba(236, 72, 153, 0.8) 100%);
  border-radius: 20px 20px 0 0;
}

.task-notes-section h5 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(135deg, 
    rgba(56, 189, 248, 1) 0%, 
    rgba(139, 92, 246, 0.95) 50%, 
    rgba(236, 72, 153, 0.9) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: taskTitleGradient 5s ease-in-out infinite;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.task-notes-section:hover h5 {
  animation-duration: 2s;
  letter-spacing: 0.3px;
}

.notes-list {
  display: grid;
  gap: 12px;
}

.note {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.3);
  border: 1px solid rgba(56, 189, 248, 0.15);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.note::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.8), rgba(139, 92, 246, 0.6));
  border-radius: 16px 0 0 16px;
}

.note:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.25);
  border-color: rgba(56, 189, 248, 0.35);
}

.note small {
  display: block;
  color: var(--text-muted);
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
}

/* Task actions section */
.task-actions {
  margin-top: 20px;
}

.note-form-inline {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.note-form-inline textarea {
  flex: 1;
  min-width: 250px;
  min-height: 70px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid rgba(56, 189, 248, 0.25);
  background: rgba(10, 18, 34, 0.9);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  transition: all 0.2s ease;
}

.note-form-inline textarea:focus {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15), 0 4px 12px rgba(56, 189, 248, 0.2);
  outline: none;
  background: rgba(2, 6, 23, 0.95);
}

.note-form-inline textarea::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.note-form-inline button {
  align-self: flex-end;
  white-space: nowrap;
}

/* Legacy note form styles (for hidden editor section) */
.notes {
  display: grid;
  gap: 14px;
  background: rgba(10, 18, 34, 0.85);
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.18);
}

.note-form textarea {
  min-height: 80px;
  border-radius: 16px;
}

.empty-state {
  text-align: center;
  padding: 44px;
  color: var(--text-soft);
  font-size: 15px;
}

.message {
  color: var(--danger);
  font-size: 14px;
  min-height: 18px;
}

/* ---------- Calendar (improved sizing & layout) ---------- */

.calendar-shell {
  display: grid;
  gap: 16px; /* Match panel gap */
}

.calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline; /* Align baseline with h3 */
  font-size: 14px;
  color: var(--text-soft);
}

.calendar-head h3 {
  margin: 0; /* Ensure h3 has no margin like other panels */
  font-size: 18px; /* Match other panel h3 */
  font-weight: 600;
}

.calendar-head #calendar-month {
  font-size: 14px;
  color: var(--text-soft);
  font-weight: 400;
  line-height: 1.5; /* Match h3 line height for baseline alignment */
}

/* Fill the available width with consistent square day cells */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  text-align: center;
  font-size: 13px;
  align-items: start;
}

/* Weekday headers: compact row */
.calendar-grid .dow {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 8px 0 12px;
  border-radius: 8px;
}

/* Day cells take an even square footprint and center content */
.calendar-grid .day,
.calendar-grid .muted {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  padding: 0;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  font-weight: 500;
  position: relative;
}

.calendar-grid button.day {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text);
  border: 2px solid transparent;
}

.calendar-grid button.day:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  transform: scale(1.05);
}

.calendar-grid button.day.today {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(14, 165, 233, 0.25));
  color: var(--accent);
  font-weight: 700;
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.calendar-grid button.day.has-tasks {
  position: relative;
}

.calendar-grid button.day.has-tasks::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

/* Upcoming tasks - orange */
.calendar-grid button.day.has-tasks.upcoming {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.25), rgba(249, 115, 22, 0.2));
  color: #fb923c;
  font-weight: 600;
  border-color: rgba(251, 146, 60, 0.4);
}

.calendar-grid button.day.has-tasks.upcoming::after {
  background: #fb923c;
  box-shadow: 0 0 4px rgba(251, 146, 60, 0.6);
}

/* Overdue tasks - red (highest priority) */
.calendar-grid button.day.has-tasks.overdue {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.3), rgba(239, 68, 68, 0.25));
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.5);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(248, 113, 113, 0.3);
}

.calendar-grid button.day.has-tasks.overdue::after {
  background: #f87171;
  box-shadow: 0 0 6px rgba(248, 113, 113, 0.8);
  width: 5px;
  height: 5px;
}

/* Completed tasks - green */
.calendar-grid button.day.has-tasks.completed {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(22, 163, 74, 0.2));
  color: #22c55e;
  font-weight: 600;
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.calendar-grid button.day.has-tasks.completed::after {
  background: #22c55e;
  box-shadow: 0 0 4px rgba(34, 197, 94, 0.6);
}

.calendar-grid button.day.today.has-tasks.upcoming {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(251, 146, 60, 0.25));
  border-color: rgba(56, 189, 248, 0.6);
}

.calendar-grid button.day.today.has-tasks.overdue {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(248, 113, 113, 0.3));
  border-color: rgba(248, 113, 113, 0.6);
}

.calendar-grid button.day.today.has-tasks.completed {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(34, 197, 94, 0.25));
  border-color: rgba(56, 189, 248, 0.6);
}

.calendar-grid .muted {
  color: rgba(148, 163, 184, 0.3);
  background: transparent;
  cursor: default;
  pointer-events: none;
}

/* ---------- Reveal / motion ---------- */

[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Remove static will-change - browser will optimize hover/active states automatically */

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 40px 16px;
  background: rgba(2, 6, 23, 0.88);
  z-index: 100;
}

.modal.hidden {
  display: none;
}

.modal-dialog {
  background: rgba(5, 12, 24, 0.92);
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow-strong);
  width: min(720px, 100%);
  max-height: 80vh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.modal-head {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(10, 18, 34, 0.9);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.modal-head h2 {
  margin: 0;
  font-size: 20px;
}

.modal-head p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 14px;
}

.modal-body {
  margin: 0;
  padding: 24px 28px 32px;
  color: var(--text-soft);
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 13px;
  overflow: auto;
  background: rgba(2, 8, 18, 0.85);
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  white-space: pre-wrap;
  line-height: 1.5;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
}

.orbital-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.orbital-field span {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.2), transparent 60%);
  filter: blur(12px);
  opacity: 0.25;
  animation: drift 20s ease-in-out infinite;
  will-change: transform;
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(40px, -30px) scale(1.05);
  }
}

/* Pause all animations when tab is hidden to save GPU */
body.tab-hidden *,
body.tab-hidden *::before,
body.tab-hidden *::after {
  animation-play-state: paused !important;
}

@media (max-width: 900px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 720px) {
  body {
    padding: 16px;
  }

  main {
    border-radius: 28px;
  }

  header {
    padding: 20px;
  }

  main > section {
    padding: 24px;
  }

  .task-card {
    padding: 22px;
  }

  .task-editor .row {
    grid-template-columns: 1fr;
  }
  
  .world-clock-grid {
    gap: 10px;
  }
  
  .timezone-time {
    font-size: 22px;
  }
  
  .timezone-item {
    padding: 12px 14px;
  }
  
  .timezone-name {
    font-size: 13px;
  }
}