/* ── Ark Task Hub — Executive Dark ── */

/* ── Fonts: Playfair Display (display) + Satoshi via CDN ── */

:root {
  /* Backgrounds — deeper, richer navy-blacks */
  --bg-deep: #06080d;
  --bg-surface: #0c0f17;
  --bg-card: #111420;
  --bg-elevated: #171b29;
  --bg-hover: #1c2132;

  /* Borders — slightly more visible for structure */
  --border: rgba(255, 255, 255, 0.05);
  --border-subtle: rgba(255, 255, 255, 0.03);
  --border-active: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(59, 130, 246, 0.25);

  /* Text — crisper hierarchy */
  --text-primary: #f0f2f7;
  --text-secondary: #8891a5;
  --text-muted: #4d5570;
  --text-faint: #2d3348;

  /* Company accents */
  --accent-seac: #3b82f6;
  --accent-seac-bg: rgba(59, 130, 246, 0.08);
  --accent-seac-glow: rgba(59, 130, 246, 0.15);
  --accent-verde: #10b981;
  --accent-verde-bg: rgba(16, 185, 129, 0.08);
  --accent-security: #ef4444;
  --accent-security-bg: rgba(239, 68, 68, 0.08);
  --accent-all: #8b5cf6;

  /* Status */
  --status-todo: #818cf8;
  --status-progress: #fbbf24;
  --status-done: #34d399;
  --status-blocked: #f87171;

  /* Priority */
  --priority-high: #f87171;
  --priority-medium: #fbbf24;
  --priority-low: #64748b;

  /* Geometry */
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows — layered for depth */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.08);

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.2s;
}

/* ── Reset ── */

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

body {
  font-family: 'Satoshi', 'DM Sans', -apple-system, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: 'ss01' on, 'cv01' on;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

/* Subtle noise texture on body */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.015'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

::selection {
  background: rgba(59, 130, 246, 0.3);
  color: #fff;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--text-faint);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Layout ── */

.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Sidebar ── */

.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 10;
}

.brand { margin-bottom: 40px; padding: 0 8px; }
.brand h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.75px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand span {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 3px;
  display: block;
  margin-top: 4px;
  font-weight: 500;
}

/* ── Navigation ── */

.nav-section { margin-bottom: 24px; }
.nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--text-faint);
  margin-bottom: 8px;
  padding-left: 12px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease);
  margin-bottom: 1px;
  position: relative;
}
.nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  border-radius: 0 2px 2px 0;
  background: var(--accent-seac);
}

.nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--bg-deep);
  color: var(--text-muted);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 22px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidebar-footer .nav-item { font-size: 12px; }

/* ── Main Content ── */

.main-content {
  padding: 36px 44px;
  overflow-y: auto;
  position: relative;
}

/* ── Header ── */

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.header-bar h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.75px;
}

/* ── Buttons ── */

.btn {
  padding: 8px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border-active);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: 'Satoshi', 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.01em;
}
.btn:hover {
  background: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent-seac);
  border-color: var(--accent-seac);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}
.btn-primary:hover {
  background: #4f8ff7;
  border-color: #4f8ff7;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ── Stat Cards ── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: all var(--duration) var(--ease);
}
.stat-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  opacity: 0.03;
  pointer-events: none;
}
.stat-card.todo::before { background: linear-gradient(90deg, var(--status-todo), transparent); }
.stat-card.todo::after { background: linear-gradient(180deg, var(--status-todo), transparent); }
.stat-card.progress::before { background: linear-gradient(90deg, var(--status-progress), transparent); }
.stat-card.progress::after { background: linear-gradient(180deg, var(--status-progress), transparent); }
.stat-card.done::before { background: linear-gradient(90deg, var(--status-done), transparent); }
.stat-card.done::after { background: linear-gradient(180deg, var(--status-done), transparent); }
.stat-card.blocked::before { background: linear-gradient(90deg, var(--status-blocked), transparent); }
.stat-card.blocked::after { background: linear-gradient(180deg, var(--status-blocked), transparent); }

.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.stat-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 34px;
  font-weight: 400;
  letter-spacing: -1px;
}

/* ── Filters ── */

.filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-chip {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: 'Satoshi', 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  letter-spacing: 0.01em;
}
.filter-chip:hover {
  border-color: var(--border-active);
  color: var(--text-secondary);
  background: var(--bg-card);
}
.filter-chip.active {
  background: var(--bg-elevated);
  border-color: var(--border-active);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.search-input {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: 'Satoshi', 'DM Sans', sans-serif;
  font-size: 13px;
  width: 200px;
  outline: none;
  transition: all var(--duration) var(--ease);
}
.search-input:focus {
  border-color: var(--accent-seac);
  box-shadow: 0 0 0 3px var(--accent-seac-bg);
  width: 240px;
}
.search-input::placeholder { color: var(--text-faint); }

/* ── Task List ── */

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

.task-row {
  display: grid;
  grid-template-columns: 36px 1fr 120px 100px 100px 110px 40px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  transition: all var(--duration) var(--ease);
}
.task-row:hover {
  border-color: var(--border-active);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

/* ── Checkbox ── */

.task-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--text-faint);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration) var(--ease);
  flex-shrink: 0;
}
.task-checkbox:hover {
  border-color: var(--status-done);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.2);
}
.task-checkbox.checked {
  background: var(--status-done);
  border-color: var(--status-done);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.25);
}
.task-checkbox.checked::after {
  content: '\2713';
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.task-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.task-title.completed {
  text-decoration: line-through;
  color: var(--text-muted);
  text-decoration-color: var(--text-faint);
}

/* ── Tags & Badges ── */

.company-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  text-align: center;
  white-space: nowrap;
}
.company-tag.seac { background: var(--accent-seac-bg); color: var(--accent-seac); }
.company-tag.todeverde { background: var(--accent-verde-bg); color: var(--accent-verde); }
.company-tag.security { background: var(--accent-security-bg); color: var(--accent-security); }

.status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.25px;
}
.status-badge.todo { background: rgba(129, 140, 248, 0.1); color: var(--status-todo); }
.status-badge.in-progress { background: rgba(251, 191, 36, 0.1); color: var(--status-progress); }
.status-badge.done { background: rgba(52, 211, 153, 0.1); color: var(--status-done); }
.status-badge.blocked { background: rgba(248, 113, 113, 0.1); color: var(--status-blocked); }

.priority-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
  box-shadow: 0 0 4px currentColor;
}
.priority-cell {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  text-transform: capitalize;
}

.due-date { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.due-date.overdue { color: var(--status-blocked); font-weight: 600; }

.stale-indicator {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  color: var(--status-blocked);
  background: rgba(248, 113, 113, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.note-indicator {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  color: var(--accent-seac);
  background: var(--accent-seac-bg);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 700;
}

/* ── Icon Buttons ── */

.icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all var(--duration) var(--ease);
}
.icon-btn:hover {
  background: var(--bg-deep);
  color: var(--text-primary);
}
.icon-btn.danger:hover {
  color: var(--status-blocked);
  background: rgba(248, 113, 113, 0.08);
}

/* ── Empty State ── */

.empty-state { text-align: center; padding: 80px 40px; color: var(--text-muted); }
.empty-state .icon { font-size: 40px; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

/* ── Modal — Frosted Glass ── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 13, 0.75);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: rgba(17, 20, 32, 0.92);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-xl);
  width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(59, 130, 246, 0.05);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.3s var(--ease);
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 24px 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.5px;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration) var(--ease);
}
.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
}

.modal-body { padding: 24px 28px 28px; }

/* ── Forms ── */

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Satoshi', 'DM Sans', sans-serif;
  font-size: 13px;
  outline: none;
  transition: all var(--duration) var(--ease);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-seac);
  box-shadow: 0 0 0 3px var(--accent-seac-bg);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-faint); }
.form-group textarea { resize: vertical; min-height: 64px; }
.form-group select { cursor: pointer; }
.form-group select option { background: var(--bg-deep); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 8px; }

/* ── Settings ── */

.settings-section { margin-bottom: 32px; }
.settings-section h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 10px;
  transition: border-color var(--duration) var(--ease);
}
.settings-card:hover { border-color: var(--border-active); }
.settings-card h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-card p { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }

.founder-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.founder-row input {
  flex: 1;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Satoshi', 'DM Sans', sans-serif;
  font-size: 12.5px;
  outline: none;
  transition: border-color var(--duration) var(--ease);
}
.founder-row input:focus {
  border-color: var(--accent-seac);
  box-shadow: 0 0 0 3px var(--accent-seac-bg);
}

.next-digest-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--accent-seac-bg);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--accent-seac);
  margin-top: 10px;
}

/* ── Activity ── */

.activity-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  box-shadow: 0 0 5px currentColor;
}
.activity-time { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

/* ── Date Picker ── */

.date-picker-wrap { position: relative; }
.date-picker-trigger {
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Satoshi', 'DM Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.date-picker-trigger:hover { border-color: var(--border-active); }
.date-picker-trigger.open {
  border-color: var(--accent-seac);
  box-shadow: 0 0 0 3px var(--accent-seac-bg);
}
.date-picker-trigger .placeholder { color: var(--text-faint); }
.date-picker-trigger .cal-icon { color: var(--text-muted); font-size: 14px; }

.cal-dropdown {
  position: relative;
  z-index: 10;
  background: rgba(17, 20, 32, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  width: 100%;
  margin-top: 8px;
  display: none;
  animation: calIn 0.2s var(--ease);
  box-sizing: border-box;
}
.cal-dropdown.visible { display: block; }

@keyframes calIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cal-header .cal-title { font-size: 13px; font-weight: 600; letter-spacing: -0.02em; }

.cal-nav {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.1s;
}
.cal-nav:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-active);
}

.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; margin-bottom: 4px; }
.cal-weekdays span {
  text-align: center;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-faint);
  font-weight: 700;
  padding: 4px 0;
}

.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }

.cal-day {
  aspect-ratio: 1;
  width: 100%;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: 'Satoshi', 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
  margin: 0 auto;
}
.cal-day:hover { background: var(--bg-elevated); }
.cal-day.other-month { color: var(--text-faint); opacity: 0.4; }
.cal-day.today {
  border: 1.5px solid var(--accent-seac);
  color: var(--accent-seac);
}
.cal-day.selected {
  background: var(--accent-seac);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.cal-footer {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  justify-content: space-between;
}
.cal-footer button {
  flex: 1;
  padding: 5px 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: 'Satoshi', 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.1s;
}
.cal-footer button:hover { border-color: var(--border-active); color: var(--text-primary); }
.cal-footer button.today-btn { border-color: rgba(59, 130, 246, 0.3); color: var(--accent-seac); }

/* ── Toast ── */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: rgba(17, 20, 32, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  animation: toastIn 0.35s var(--ease);
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.success { border-left: 3px solid var(--status-done); }
.toast.error { border-left: 3px solid var(--status-blocked); }
.toast.info { border-left: 3px solid var(--accent-seac); }

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

/* ── Lock Screen ── */

.lock-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
/* Ambient glow behind lock card */
.lock-screen::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.lock-card {
  background: rgba(17, 20, 32, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-xl);
  padding: 48px;
  width: 380px;
  text-align: center;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  z-index: 1;
}
.lock-card h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 38px;
  font-weight: 400;
  margin-bottom: 2px;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.lock-card .lock-sub {
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 40px;
  font-weight: 600;
}
.lock-card input {
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Satoshi', 'DM Sans', sans-serif;
  font-size: 16px;
  text-align: center;
  letter-spacing: 6px;
  outline: none;
  transition: all var(--duration) var(--ease);
  margin-bottom: 14px;
}
.lock-card input:focus {
  border-color: var(--accent-seac);
  box-shadow: 0 0 0 3px var(--accent-seac-bg);
}
.lock-card input.shake { animation: shake 0.4s; }

.lock-card .lock-btn {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-lg);
  border: none;
  background: var(--accent-seac);
  color: #fff;
  font-family: 'Satoshi', 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.3);
}
.lock-card .lock-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}
.lock-card .lock-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.lock-error {
  color: var(--status-blocked);
  font-size: 12px;
  margin-top: 12px;
  min-height: 18px;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* ── Notes ── */

.notes-section {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.notes-section h4 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}
.notes-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }

.note-item {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 9px 12px;
  position: relative;
  transition: border-color var(--duration) var(--ease);
}
.note-item:hover { border-color: var(--border); }
.note-item .note-text {
  font-size: 12.5px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}
.note-item .note-meta {
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.note-item .note-del { opacity: 0; transition: opacity 0.15s; }
.note-item:hover .note-del { opacity: 1; }

.note-add { display: flex; gap: 6px; }
.note-add textarea {
  flex: 1;
  padding: 7px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Satoshi', 'DM Sans', sans-serif;
  font-size: 12.5px;
  resize: none;
  min-height: 34px;
  max-height: 100px;
  outline: none;
  transition: border-color var(--duration) var(--ease);
}
.note-add textarea:focus {
  border-color: var(--accent-seac);
  box-shadow: 0 0 0 3px var(--accent-seac-bg);
}
.note-add button { align-self: flex-end; }

/* ── Mobile Toggle ── */

.mobile-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 400;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(17, 20, 32, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
}

/* ── Responsive ── */

@media (max-width: 900px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: -280px;
    width: 280px;
    z-index: 500;
    transition: left 0.3s var(--ease);
    height: 100vh;
  }
  .sidebar.mobile-open { left: 0; }
  .main-content { padding: 24px 20px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .task-row { grid-template-columns: 32px 1fr 90px 40px; }
  .task-row .priority-cell,
  .task-row .due-date,
  .task-row .status-badge { display: none; }
  .mobile-toggle { display: flex !important; }
}
