/* ─────────────────────────────────────────
   Scop Tasks · by Kariah
   World-class task management UI
───────────────────────────────────────── */

:root {
  --bg: #100d0a;
  --surface: rgba(255,255,255,0.07);
  --surface-hi: rgba(255,255,255,0.12);
  --border: rgba(255,255,255,0.12);
  --border-hi: rgba(255,255,255,0.22);
  --text: #f5ede0;
  --muted: #b89e88;
  --accent: #f07800;
  --accent-warm: #ffc06a;
  --accent-glow: rgba(240,120,0,0.28);
  --accent-dim: rgba(240,120,0,0.15);
  --danger: #e05555;
  --success: #3dd68c;
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --hdr-h: 60px;
  --shadow: 0 8px 32px rgba(0,0,0,0.45);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.3);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 50% at 15% 0%, rgba(240,120,0,0.13) 0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 85% 100%, rgba(255,176,78,0.09) 0%, transparent 50%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 80% at center, black 30%, transparent 100%);
  z-index: 0;
}

.hidden { display: none !important; }

/* ── Typography ── */
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.18rem; }
h3 { font-size: 1.05rem; }

/* ── Auth Gate ── */
.auth-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(240,120,0,0.14) 0%, transparent 60%),
    var(--bg);
}

.auth-card-wrap {
  width: min(440px, 100%);
  background: rgba(22,16,11,0.98);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(240,120,0,0.08);
  padding: 36px 32px 32px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.auth-brand {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.auth-by {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.auth-title {
  margin-bottom: 6px;
  font-size: 1.6rem;
  color: var(--text);
}

.auth-sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-form { display: grid; gap: 14px; }

.auth-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

/* ── Field ── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input, select {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 11px 13px;
  background: rgba(255,255,255,0.07);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

input:focus, select:focus {
  border-color: rgba(240,120,0,0.55);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

input::placeholder { color: #7a6655; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a9937f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 30px;
}

input[type="time"] { color-scheme: dark; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 16px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--accent);
  color: #1c0900;
  box-shadow: 0 2px 12px rgba(240,120,0,0.3);
}

.btn-primary:hover {
  background: #ff8a10;
  box-shadow: 0 4px 20px rgba(240,120,0,0.45);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover { background: var(--surface-hi); border-color: var(--border-hi); }

.btn-sm { padding: 7px 12px; font-size: 0.82rem; border-radius: 9px; }

.btn-danger { color: #ffb3b3; background: rgba(224,85,85,0.1); border-color: rgba(224,85,85,0.2); }

/* ── Toast ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  z-index: 2000;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-hi);
  background: rgba(22,16,12,0.96);
  font-size: 0.86rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  backdrop-filter: blur(12px);
}

.toast.show { opacity: 1; }

/* ── App Shell ── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--hdr-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: rgba(18,14,10,0.95);
  border-bottom: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04);
}

.hdr-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.hdr-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.hdr-sep { color: var(--muted); font-size: 0.85rem; }

.hdr-by { color: var(--accent-warm); font-size: 0.82rem; font-weight: 500; }

.hdr-center {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hdr-date {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.sync-chip {
  font-size: 0.76rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.sync-chip.live {
  color: #6ff0b0;
  background: rgba(61,214,140,0.1);
  border-color: rgba(61,214,140,0.22);
}

.hdr-stats {
  display: flex;
  gap: 18px;
  flex-shrink: 0;
}

.hstat {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.hstat strong { font-size: 1rem; font-weight: 700; color: var(--text); }
.hstat span { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.hdr-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

/* ── Header icon buttons ── */
.hdr-icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  padding: 0;
}

.hdr-icon-btn:hover,
.hdr-icon-btn.active {
  background: var(--surface-hi);
  border-color: var(--border-hi);
  color: var(--text);
}

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

/* Profile button with avatar style */
.profile-btn {
  border-radius: 50%;
  width: 34px;
  height: 34px;
}

/* ── Dropdown panels ── */
.hdr-panel-wrap { position: relative; }

.hdr-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 600;
  width: 300px;
  background: rgba(16,12,9,0.98);
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  padding: 0;
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  overflow: hidden;
}

.hdr-dropdown-right {
  left: auto;
  right: 0;
}

.dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.dropdown-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-warm);
}

.notif-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.notif-list {
  padding: 12px 16px;
  max-height: 280px;
  overflow-y: auto;
}

.dropdown-empty {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

.notif-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
}

.notif-item:last-child { border-bottom: none; }

.notif-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-warm);
}

.notif-text { flex: 1; min-width: 0; }
.notif-text strong { display: block; font-weight: 600; color: var(--text); }
.notif-text span { color: var(--muted); font-size: 0.78rem; }

.profile-email {
  margin: 0;
  padding: 12px 16px 8px;
  font-size: 0.84rem;
  color: var(--muted);
  word-break: break-all;
  border-bottom: 1px solid var(--border);
}

.profile-actions {
  padding: 10px 16px 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Legacy compat */
.acct-email {
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Composer ── */
.composer-wrap {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
}

.composer-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.task-input {
  flex: 1;
  border-radius: var(--radius-lg) !important;
  padding: 12px 18px !important;
  font-size: 0.96rem !important;
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.18) !important;
  min-width: 0;
  color: var(--text) !important;
}

.task-input:focus {
  border-color: rgba(240,120,0,0.5) !important;
  box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

.composer-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.add-btn {
  flex-shrink: 0;
  background: var(--accent) !important;
  color: #1c0900 !important;
}
.datepicker-wrap { position: relative; }

.dp-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 10px 13px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}

.dp-trigger:hover { border-color: var(--border-hi); background: var(--surface-hi); }
.dp-trigger.open { border-color: rgba(240,120,0,0.5); box-shadow: 0 0 0 3px var(--accent-glow); }

.dp-popup {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 500;
  width: 270px;
  background: rgba(18,14,10,0.98);
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dp-month-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.dp-nav-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: background 0.12s;
}

.dp-nav-btn:hover { background: var(--surface-hi); }

.dp-day-labels,
.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.dp-day-labels { margin-bottom: 4px; }

.dp-day-labels span {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 2px 0;
}

/* Calendar day cells (rendered by JS with class .day) */
.day {
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.82rem;
  transition: background 0.12s, border-color 0.12s;
}

.day:hover { background: var(--surface-hi); }

.day.today { border-color: rgba(240,120,0,0.4); color: var(--accent-warm); }

.day.active {
  background: var(--accent);
  color: #1c0900;
  font-weight: 700;
  border-color: transparent;
}

.day.has-tasks::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-warm);
  position: absolute;
  bottom: 3px;
}

.day.has-tasks { position: relative; }

.day.empty { visibility: hidden; cursor: default; }

/* ── Time + Reminder inputs ── */
.time-input {
  width: 118px !important;
  flex-shrink: 0;
}

.reminder-select {
  width: 136px !important;
  flex-shrink: 0;
}


/* ── Workspace ── */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 0;
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 20px 100px;
  align-items: start;
}

/* ── Tasks section ── */
.tasks-section { min-width: 0; }

.tasks-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.filter-bar {
  display: flex;
  gap: 6px;
}

.filter-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 13px;
  transition: all 0.15s;
}

.filter-btn:hover { color: var(--text); border-color: var(--border-hi); }

.filter-btn.active {
  background: var(--accent-dim);
  border-color: rgba(240,120,0,0.4);
  color: var(--accent-warm);
}

.count-badge {
  display: inline-flex;
  min-width: 18px;
  justify-content: center;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  font-size: 0.75rem;
}

/* ── Task cards ── */
.section-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin: 18px 0 8px;
}

.task {
  border: 1px solid rgba(255,255,255,0.11);
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  padding: 13px 14px;
  transition: border-color 0.15s, background 0.15s;
}

.task:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.1); }

.task.done-item { opacity: 0.5; }

.task-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.task-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  background: transparent;
  color: transparent;
  cursor: pointer;
  font-size: 0.7rem;
  transition: all 0.15s;
}

.checkbox.done {
  background: var(--accent);
  border-color: var(--accent);
  color: #1c0900;
}

.task-body { flex: 1; min-width: 0; }

.task-text {
  font-size: 0.93rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-text.striked { color: var(--muted); text-decoration: line-through; }

.task-time {
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--muted);
}

.task-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Subtasks ── */
.subtasks {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.subtask-list { display: grid; gap: 4px; }

.subtask-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  padding: 5px 8px;
}

.subtask-left {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.subtask-check {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: transparent;
  cursor: pointer;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.12s;
}

.subtask-check.done {
  background: rgba(240,120,0,0.22);
  border-color: rgba(255,176,78,0.4);
  color: var(--accent-warm);
}

.subtask-text {
  font-size: 0.83rem;
  color: #ddc9b5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subtask-text.done { text-decoration: line-through; color: var(--muted); }

.subtask-delete {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0 4px;
  transition: color 0.12s;
}

.subtask-delete:hover { color: var(--danger); }

.subtask-controls {
  margin-top: 7px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}

.subtask-input {
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 0.85rem;
}

.subtask-add {
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 0.83rem;
}

/* ── Empty state ── */
.empty {
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: var(--radius-lg);
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  background: rgba(255,255,255,0.025);
}

.empty-icon { font-size: 1.8rem; margin-bottom: 8px; }

/* ── Loading skeleton ── */
.loading-row {
  height: 58px;
  margin-bottom: 8px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ── Side panel ── */
.side-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  padding-left: 20px;
}

.side-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.side-eyebrow {
  margin: 0 0 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--accent-warm);
}

.timer-headline {
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: 6px;
}

.side-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.account-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-title {
  font-size: 0.88rem;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.78rem;
  padding: 3px 10px;
}

.status-live {
  background: rgba(61,214,140,0.1);
  border-color: rgba(61,214,140,0.22);
  color: #6ff0b0;
}

.status-offline {
  background: rgba(240,120,0,0.08);
  border-color: rgba(240,120,0,0.2);
  color: #ffb87a;
}

/* ── Bottom nav (mobile) ── */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(380px, calc(100% - 24px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid var(--border-hi);
  background: rgba(13,11,9,0.92);
  backdrop-filter: blur(16px);
  z-index: 999;
  box-shadow: var(--shadow);
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 8px 6px;
  transition: all 0.15s;
}

.nav-btn.active {
  color: var(--accent-warm);
  background: var(--accent-dim);
  border-color: rgba(240,120,0,0.25);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
    padding-bottom: 92px;
  }

  .side-panel {
    padding-left: 0;
    grid-template-columns: 1fr 1fr;
  }

  .hdr-stats { display: none; }
}

@media (max-width: 720px) {
  .composer-bar { flex-direction: column; align-items: stretch; }
  .composer-controls { flex-wrap: wrap; }
  .task-input { border-radius: var(--radius) !important; }
  .time-input, .reminder-select { flex: 1; width: auto !important; }
  .add-btn { width: 100%; justify-content: center; }
  .hdr-center { display: none; }
  .acct-email { display: none; }
  .side-panel { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .app-header { padding: 0 14px; gap: 10px; }
  .hdr-by { display: none; }
  .composer-wrap { padding: 10px 14px; }
  .workspace { padding: 14px 14px 92px; }
}

/* ── Forgot password / change password form ── */
.auth-link-row {
  text-align: center;
  margin-top: 10px;
}

.auth-text-btn {
  background: none;
  border: none;
  color: var(--accent-warm);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-text-btn:hover { color: var(--accent); }

.auth-back-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.auth-back-btn {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.auth-back-btn:hover { color: var(--text); }

/* ── Profile edit section ── */
.profile-section {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.profile-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 10px;
}

.profile-field-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.profile-field-row label {
  font-size: 0.78rem;
  color: var(--muted);
}

.profile-field-row input {
  padding: 9px 12px;
  font-size: 0.86rem;
}

.profile-save-btn {
  width: 100%;
}

/* ── Mobile: panels become full-screen overlays ── */
@media (max-width: 600px) {
  .hdr-dropdown {
    position: fixed;
    top: var(--hdr-h);
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 0 0 20px 20px;
    max-height: 70vh;
    overflow-y: auto;
  }

  .hdr-dropdown-right {
    left: 0;
    right: 0;
  }

  .hdr-stats { display: none; }
  .hdr-sep, .hdr-by { display: none; }
  .hdr-center { display: none; }
}

/* ── Custom select wrapper (fix double-arrow issue) ── */
select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a9937f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 11px center !important;
  background-size: 10px 6px !important;
  padding-right: 30px !important;
  background-color: rgba(255,255,255,0.07) !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 138, 0, 0.15), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255, 181, 98, 0.14), transparent 30%),
    linear-gradient(180deg, #0a0806 0%, #140f0a 48%, #0d0a08 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 90%);
}

h1,
h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 0.96;
}

h2 {
  font-size: 1.22rem;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.23em;
}

.muted-copy,
.section-caption,
.notice-text,
.roadmap-list,
.install-hint,
.gate-footnote,
.field span,
.hero-stat-label,
.hero-metric span,
.day-label,
.task-time,
.section-label {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-gate-card {
  width: min(540px, 100%);
  padding: 28px;
}

.gate-title {
  margin-bottom: 12px;
  max-width: 14ch;
}

.gate-footnote {
  margin-top: 12px;
  font-size: 0.86rem;
}

.app-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 16px 104px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.92fr);
  gap: 18px;
  padding: 22px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -92px;
  top: -110px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 0, 0.22) 0%, transparent 72%);
}

.hero-copy,
.hero-panel {
  position: relative;
  z-index: 1;
}

.hero-text {
  margin: 12px 0 0;
  line-height: 1.55;
  max-width: 58ch;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 179, 98, 0.2);
  background: rgba(255, 179, 98, 0.1);
  font-size: 0.82rem;
  padding: 8px 12px;
}

.tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(255, 138, 0, 0.14);
}

.hero-panel {
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-stat {
  margin-bottom: 14px;
}

.hero-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.06rem;
}

.hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hero-metric {
  min-height: 90px;
  border-radius: 16px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.17);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-metric strong {
  font-size: 1.56rem;
}

.install-btn {
  align-self: flex-start;
}

.notice {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 1fr);
  gap: 16px;
  padding: 18px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(255, 138, 0, 0.1), rgba(255, 138, 0, 0.03));
}

.notice-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.84fr);
  gap: 16px;
}

.workspace-main,
.workspace-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.composer-card,
.calendar-card,
.focus-card,
.timer-card,
.auth-card,
.roadmap-card {
  padding: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head.compact {
  align-items: center;
}

.section-caption {
  font-size: 0.9rem;
  line-height: 1.35;
}

.composer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 152px 170px 122px;
  gap: 10px;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
  border-color: var(--accent-glow);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.13);
}

input::placeholder {
  color: #b3977f;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #caa17e 50%), linear-gradient(135deg, #caa17e 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% - 2px), calc(100% - 15px) calc(50% - 2px);
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

input[type="time"] {
  color-scheme: dark;
}

.btn {
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 11px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn:active {
  transform: translateY(0);
}

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

.btn-secondary,
.btn-danger,
.btn-icon {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
  color: #ffc3bc;
}

.cal-nav {
  display: flex;
  gap: 7px;
}

.day-labels,
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.day-label {
  text-align: center;
  font-size: 0.78rem;
}

.calendar {
  margin-top: 10px;
}

.day {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: #dec2a6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.88rem;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.day:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.day.today {
  border-color: rgba(255, 179, 98, 0.46);
}

.day.active {
  background: linear-gradient(135deg, rgba(255, 138, 0, 0.3), rgba(255, 181, 98, 0.17));
  border-color: rgba(255, 179, 98, 0.45);
  color: var(--text);
  font-weight: 700;
}

.day.has-tasks {
  color: var(--accent-strong);
}

.day.empty {
  visibility: hidden;
}

.timer-card h2 {
  margin-top: 3px;
  font-size: 1.6rem;
  line-height: 1.1;
}

.filter-bar {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.filter-btn,
.nav-btn {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  padding: 8px 12px;
}

.filter-btn.active,
.nav-btn.active {
  color: var(--text);
  border-color: rgba(255, 179, 98, 0.34);
  background: rgba(255, 138, 0, 0.12);
}

.count-badge {
  display: inline-flex;
  min-width: 22px;
  justify-content: center;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.section-label {
  margin: 0 0 10px;
  text-transform: uppercase;
  font-size: 0.73rem;
  letter-spacing: 0.18em;
}

.task {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  margin-bottom: 10px;
  padding: 12px;
}

.task.done-item {
  opacity: 0.62;
}

.task-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.task-left {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.checkbox {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.checkbox.done {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: transparent;
  color: #2d1603;
}

.task-text {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-text.striked {
  color: var(--muted);
  text-decoration: line-through;
}

.task-time {
  margin-top: 4px;
  font-size: 0.82rem;
}

.task-actions {
  display: flex;
  gap: 8px;
}

.subtasks {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.subtask-list {
  display: grid;
  gap: 6px;
}

.subtask-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 8px;
}

.subtask-left {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.subtask-check {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.subtask-check.done {
  background: rgba(255, 138, 0, 0.25);
  border-color: rgba(255, 179, 98, 0.45);
  color: #ffe2bf;
}

.subtask-text {
  font-size: 0.85rem;
  color: #e8d6c3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subtask-text.done {
  text-decoration: line-through;
  color: var(--muted);
}

.subtask-delete {
  border: none;
  background: transparent;
  color: #ffc4be;
  cursor: pointer;
  font-weight: 700;
}

.subtask-controls {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.subtask-input {
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.subtask-add {
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 0.84rem;
}

.empty {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 34px 14px;
  text-align: center;
  color: var(--muted);
}

.empty-icon {
  font-size: 1.9rem;
  margin-bottom: 8px;
}

.loading-row {
  height: 60px;
  margin-bottom: 9px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

.auth-user,
.auth-actions,
.auth-form,
.roadmap-list {
  display: grid;
  gap: 10px;
}

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

.status-live {
  background: rgba(47, 214, 139, 0.13);
  border-color: rgba(47, 214, 139, 0.25);
  color: #9af0c5;
}

.status-offline {
  background: rgba(255, 138, 0, 0.1);
  border-color: rgba(255, 138, 0, 0.25);
  color: #ffd3a2;
}

.roadmap-list {
  margin: 10px 0 0;
  padding-left: 18px;
  line-height: 1.65;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(31, 24, 18, 0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.toast.show {
  opacity: 1;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 20px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(20, 15, 11, 0.9);
  backdrop-filter: blur(12px);
  z-index: 999;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.nav-icon {
  font-size: 1rem;
}

@media (max-width: 1080px) {
  .hero,
  .workspace-grid,
  .notice {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .composer-grid {
    grid-template-columns: minmax(0, 1fr) 1fr;
  }

  .composer-grid .btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 16px 12px 100px;
  }

  .hero-stat-grid,
  .auth-actions,
  .subtask-controls {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: start;
  }

  .task-top {
    flex-direction: column;
  }

  .task-actions {
    width: 100%;
    justify-content: flex-end;
  }

  h1 {
    max-width: none;
  }
}
