/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #f0efeb;
  --text: #1a1a1a;
  --text-2: #6b7280;
  --text-3: #9ca3af;
  --border: #e5e3de;
  --border-2: #d1cfc9;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --sidebar-w: 220px;
  --bottom-tabs-h: 64px;
  --font: 'DM Sans', -apple-system, sans-serif;
  --transition: 150ms ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --text: #f2f2f7;
    --text-2: #aeaeb2;
    --text-3: #636366;
    --border: #2c2c2e;
    --border-2: #3a3a3c;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  }
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overscroll-behavior: none;
}

/* ===== LAYOUT ===== */
#app {
  display: flex;
  height: 100vh;
  height: -webkit-fill-available;
  overflow: hidden;
}

/* Sidebar — hidden on mobile */
#sidebar {
  display: none;
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  flex-direction: column;
  padding: 20px 0;
  overflow-y: auto;
  gap: 4px;
}

@media (min-width: 768px) {
  #sidebar { display: flex; }
}

.sidebar-logo {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
  padding: 0 16px 16px;
  color: var(--text);
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-2);
  transition: background var(--transition), color var(--transition);
  user-select: none;
}

.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); font-weight: 500; }

.nav-icon { font-size: 13px; width: 18px; text-align: center; flex-shrink: 0; }

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 16px;
}

#sidebar-projects-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
  overflow-y: auto;
}

.sidebar-project-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2);
  transition: background var(--transition), color var(--transition);
  user-select: none;
}

.sidebar-project-item:hover { background: var(--surface-2); color: var(--text); }
.sidebar-project-item.active { background: var(--surface-2); color: var(--text); }

.sidebar-project-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Main content area */
#main {
  flex: 1;
  overflow-y: auto;
  padding-bottom: var(--bottom-tabs-h);
}

@media (min-width: 768px) {
  #main { padding-bottom: 0; }
}

#view {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 32px;
}

@media (min-width: 768px) {
  #view { padding: 32px 32px 48px; }
}

/* Bottom tabs — mobile only */
#bottom-tabs {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-tabs-h);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}

@media (min-width: 768px) {
  #bottom-tabs { display: none; }
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-3);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 400;
  cursor: pointer;
  transition: color var(--transition);
  padding-bottom: 2px;
}

.tab.active { color: var(--text); font-weight: 500; }
.tab-icon { font-size: 16px; }

/* ===== TYPOGRAPHY ===== */
h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.4px; }
h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }
h3 { font-size: 15px; font-weight: 500; }

/* ===== PAGE HEADER ===== */
.page-header {
  margin-bottom: 24px;
}

.page-header h1 { line-height: 1.2; }

.page-subtitle {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 4px;
}

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* ===== SECTION ===== */
.section { margin-bottom: 32px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ===== BUTTON ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity var(--transition), background var(--transition);
}

.btn:active { opacity: 0.75; }

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}

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

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

.btn-icon {
  padding: 6px;
  border-radius: 6px;
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 14px;
  transition: background var(--transition), color var(--transition);
  font-family: var(--font);
}
.btn-icon:hover { background: var(--surface-2); color: var(--text); }

/* ===== OVERVIEW ===== */
.overview-greeting {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}

.overview-date {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 28px;
}

/* Project progress card */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  margin-bottom: 8px;
}

.project-card:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow-md);
}

.project-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.project-icon { font-size: 18px; }

.project-name {
  font-size: 15px;
  font-weight: 500;
  flex: 1;
}

.project-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}

.status-active { background: #dcfce7; color: #166534; }
.status-on-hold { background: #fef9c3; color: #854d0e; }
.status-done { background: #f0fdf4; color: #166534; }

@media (prefers-color-scheme: dark) {
  .status-active { background: #14532d; color: #86efac; }
  .status-on-hold { background: #422006; color: #fde68a; }
  .status-done { background: #14532d; color: #86efac; }
}

.progress-bar-wrap {
  background: var(--surface-2);
  border-radius: 99px;
  height: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}

.project-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.project-task-count {
  font-size: 12px;
  color: var(--text-2);
}

/* ===== TASK ITEMS ===== */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

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

.task-checkbox {
  width: 18px; height: 18px;
  border: 1.5px solid var(--border-2);
  border-radius: 5px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: background var(--transition), border-color var(--transition);
  background: var(--surface);
}

.task-checkbox.checked {
  background: var(--text);
  border-color: var(--text);
}

.task-checkbox.checked::after {
  content: '✓';
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

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

.task-text {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  word-break: break-word;
}

.task-text.done {
  text-decoration: line-through;
  color: var(--text-3);
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.badge-urgent {
  font-size: 11px;
  font-weight: 600;
  background: #fee2e2;
  color: #991b1b;
  padding: 1px 7px;
  border-radius: 99px;
}

@media (prefers-color-scheme: dark) {
  .badge-urgent { background: #450a0a; color: #fca5a5; }
}

.badge-due {
  font-size: 11px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 3px;
}

.badge-due.overdue { color: #ef4444; }
.badge-due.today { color: #f59e0b; font-weight: 500; }
.badge-due.soon { color: #3b82f6; }

.task-project-badge {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 99px;
  color: white;
  font-weight: 500;
  white-space: nowrap;
}

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

/* ===== TASK LIST CONTAINER ===== */
.task-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 16px;
}

.task-list-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-3);
  font-size: 14px;
}

/* ===== ADD TASK FORM ===== */
.add-task-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.add-task-input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

.add-task-input:focus { border-color: var(--border-2); }
.add-task-input::placeholder { color: var(--text-3); }

/* ===== INPUT / FORM ELEMENTS ===== */
input, select, textarea {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
}

.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}

.form-input:focus { border-color: var(--text-3); }

textarea.form-input {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  cursor: pointer;
}

/* Color picker */
.color-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-option {
  width: 26px; height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition), transform var(--transition);
}

.color-option:hover { transform: scale(1.1); }
.color-option.selected { border-color: var(--text); }

/* ===== PROJECT DETAIL ===== */
.project-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.project-header-icon {
  font-size: 28px;
  line-height: 1;
}

.project-header-info { flex: 1; }
.project-header-name { font-size: 20px; font-weight: 600; letter-spacing: -0.3px; }
.project-header-desc { font-size: 13px; color: var(--text-2); margin-top: 2px; }

.project-accent-bar {
  height: 3px;
  border-radius: 2px;
  margin-bottom: 20px;
}

.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}

.tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--text);
  font-weight: 500;
}

/* ===== NOTES ===== */
.notes-area {
  width: 100%;
  min-height: 300px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}

.notes-area:focus { border-color: var(--border-2); }

.notes-status {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
  text-align: right;
  height: 16px;
}

/* ===== CALENDAR ===== */

/* Full-width override for calendar view */
#view.calendar-full {
  max-width: 100%;
  padding: 20px 16px 32px;
}

@media (min-width: 768px) {
  #view.calendar-full { padding: 28px 28px 48px; }
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.calendar-month {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

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

.calendar-day-header {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 0 10px;
}

.calendar-day-header.weekend-header { color: var(--text-2); }

.calendar-day {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 7px 7px;
  min-height: 110px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .calendar-day { min-height: 130px; padding: 10px 9px 8px; }
}

.calendar-day:hover {
  border-color: var(--border-2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.calendar-day.today {
  border-color: var(--text);
  border-width: 1.5px;
}

.calendar-day.past { opacity: 0.6; }
.calendar-day.past:hover { opacity: 1; }

.calendar-day.weekend {
  background: var(--surface-2);
}

.calendar-day.empty {
  background: none;
  border-color: transparent;
  pointer-events: none;
  box-shadow: none;
}

/* Day number row */
.day-num-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.day-number {
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  line-height: 1;
  flex-shrink: 0;
}

.today .day-number {
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
}

.day-task-count {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  background: var(--surface-2);
  border-radius: 99px;
  padding: 1px 5px;
  line-height: 1.4;
}

.today .day-task-count {
  background: var(--border-2);
}

/* Event chips inside cells */
.day-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-event {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 5px 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.3;
  cursor: pointer;
  transition: opacity var(--transition);
  overflow: hidden;
}

.cal-event:hover { opacity: 0.75; }

.cal-event-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  color: var(--text);
  font-weight: 400;
}

.cal-event-flag {
  font-size: 9px;
  flex-shrink: 0;
}

.cal-event-done .cal-event-text {
  text-decoration: line-through;
  opacity: 0.5;
}

.cal-more {
  font-size: 11px;
  color: var(--text-2);
  padding: 1px 5px;
  cursor: pointer;
  font-weight: 500;
  border-radius: 4px;
  transition: background var(--transition);
}

.cal-more:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* Legend at the bottom */
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
}

.cal-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Keep old dot styles for backwards compat */
.day-dots { display: flex; flex-wrap: wrap; gap: 2px; }
.day-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ===== FINANCE ===== */
.finance-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 24px;
}

.finance-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.finance-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.finance-stat-value {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.text-income { color: #16a34a; }
.text-expense { color: #dc2626; }

.finance-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.finance-entry:last-child { border-bottom: none; }

.finance-entry-type {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.type-income { background: #dcfce7; }
.type-expense { background: #fee2e2; }

@media (prefers-color-scheme: dark) {
  .type-income { background: #14532d; }
  .type-expense { background: #450a0a; }
}

.finance-entry-info { flex: 1; min-width: 0; }

.finance-entry-desc {
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finance-entry-cat {
  font-size: 12px;
  color: var(--text-2);
}

.finance-entry-amount {
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

/* ===== MODAL ===== */
#modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

#modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  width: calc(100% - 32px);
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 201;
  box-shadow: var(--shadow-md);
}

/* On mobile, slide up from bottom */
@media (max-width: 767px) {
  #modal {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    max-height: 92vh;
  }
}

.hidden { display: none !important; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  font-family: var(--font);
}

.modal-footer {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  justify-content: flex-end;
}

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
  border: none;
}

@media (prefers-color-scheme: dark) {
  .btn-danger { background: #450a0a; color: #fca5a5; }
}

/* ===== TOAST ===== */
#toast {
  position: fixed;
  bottom: calc(var(--bottom-tabs-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  z-index: 300;
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  white-space: nowrap;
}

#toast.show {
  opacity: 1;
}

@media (min-width: 768px) {
  #toast { bottom: 20px; }
}

/* ===== BACK BUTTON ===== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
  font-family: var(--font);
  font-weight: 400;
}

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

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-3);
}

.empty-state-icon { font-size: 32px; margin-bottom: 12px; }
.empty-state-text { font-size: 14px; }

/* ===== UPCOMING ITEMS ===== */
.upcoming-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.upcoming-item:last-child { border-bottom: none; }

.upcoming-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.upcoming-text { font-size: 14px; }
.upcoming-project { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.upcoming-date { font-size: 12px; color: var(--text-2); flex-shrink: 0; margin-left: auto; }

/* ===== UTILITIES ===== */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-muted { color: var(--text-2); }

.loading {
  text-align: center;
  padding: 60px 16px;
  color: var(--text-3);
  font-size: 14px;
}

/* Calendar day task list modal */
.day-task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.day-task-item:last-child { border-bottom: none; }

/* ===== VISUAL IMPROVEMENTS ===== */

/* Project icon circle */
.project-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  line-height: 1;
}

/* Overview stat chips */
.overview-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  white-space: nowrap;
}

.stat-chip-urgent {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.stat-chip-upcoming {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.stat-chip-ok {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.stat-chip-neutral {
  color: var(--text-2);
}

@media (prefers-color-scheme: dark) {
  .stat-chip-urgent  { background: #450a0a; color: #fca5a5; border-color: #7f1d1d; }
  .stat-chip-upcoming { background: #1e3a5f; color: #93c5fd; border-color: #1e40af; }
  .stat-chip-ok { background: #14532d; color: #86efac; border-color: #166534; }
}

/* Urgent task row highlight */
.task-item.is-urgent .task-text {
  font-weight: 500;
}

.task-item.is-urgent {
  background: rgba(239, 68, 68, 0.03);
  border-radius: 8px;
  margin: 2px -6px;
  padding-left: 6px;
  padding-right: 6px;
}

@media (prefers-color-scheme: dark) {
  .task-item.is-urgent { background: rgba(239, 68, 68, 0.06); }
}

/* Notes indicator badge */
.badge-notes {
  font-size: 13px;
  opacity: 0.6;
}

/* Finance visual bar */
.finance-bar-row {
  margin: -8px 0 20px;
}

.finance-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-2);
  margin-bottom: 5px;
  font-weight: 500;
}

.finance-bar-track {
  height: 8px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
  display: flex;
}

.finance-bar-income {
  height: 100%;
  background: #16a34a;
  border-radius: 99px 0 0 99px;
  transition: width 0.4s ease;
}

.finance-bar-expense {
  height: 100%;
  background: #dc2626;
  border-radius: 0 99px 99px 0;
  transition: width 0.4s ease;
}

/* ===== OVERVIEW TABS ===== */
.overview-tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  gap: 0;
}

.overview-tab {
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.overview-tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.today-badge {
  font-size: 11px;
  font-weight: 700;
  background: #ef4444;
  color: white;
  border-radius: 99px;
  padding: 1px 6px;
  line-height: 1.4;
}

/* ===== TODAY TAB ===== */
.today-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.today-quick-add {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  align-items: center;
}

.today-project-select {
  flex: 0 0 auto;
  width: auto;
  max-width: 140px;
  padding: 8px 10px;
  font-size: 13px;
}

/* ===== NOTES (multi-note) ===== */
.notes-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.note-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.note-item:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow);
}

.note-item-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-item-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.note-item-date {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
}

.note-item-preview {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Note editor */
.note-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.note-title-input {
  width: 100%;
  font-family: var(--font);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
  padding: 4px 0 12px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  outline: none;
  margin-bottom: 14px;
  -webkit-appearance: none;
}

.note-title-input::placeholder { color: var(--text-3); }

/* ===== 5 BOTTOM TABS ===== */
@media (max-width: 767px) {
  .tab { font-size: 9px; }
  .tab-icon { font-size: 18px; }
}

/* ===== ISLAMIC HABITS ===== */
.islamic-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.islamic-date-label {
  text-align: center;
  flex: 1;
  padding: 0 8px;
}

.prayer-progress-row {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.prayer-progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: all var(--transition);
}

.prayer-progress-pill.all-done {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

@media (prefers-color-scheme: dark) {
  .prayer-progress-pill.all-done { background: #14532d; border-color: #166534; color: #86efac; }
}

/* Prayer rows */
.prayers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prayer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  gap: 12px;
}

.prayer-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 80px;
}

.prayer-name-en {
  font-size: 15px;
  font-weight: 600;
}

.prayer-name-ar {
  font-size: 14px;
  color: var(--text-2);
  font-weight: 500;
  direction: rtl;
}

.prayer-time {
  font-size: 11px;
  color: var(--text-3);
}

.prayer-options {
  display: flex;
  gap: 6px;
}

.prayer-btn {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  transition: all var(--transition);
  white-space: nowrap;
}

.prayer-btn:hover { border-color: var(--border-2); color: var(--text); }

.prayer-btn-jamaa {
  background: #f0fdf4;
  border-color: #16a34a;
  color: #166534;
  font-weight: 600;
}

.prayer-btn-alone {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .prayer-btn-jamaa { background: #14532d; border-color: #16a34a; color: #86efac; }
  .prayer-btn-alone { background: #1e3a5f; border-color: #3b82f6; color: #93c5fd; }
}

/* Habit rows */
.habits-list { display: flex; flex-direction: column; }

.habit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity var(--transition);
}

.habit-row:last-child { border-bottom: none; }
.habit-row:hover { opacity: 0.75; }

.habit-row.habit-done .habit-body .habit-en { text-decoration: line-through; opacity: 0.5; }

.habit-row.habit-today {
  position: relative;
}
.habit-row.habit-today::before {
  content: '';
  position: absolute;
  left: -16px; top: 0; bottom: 0;
  width: 3px;
  background: #f59e0b;
  border-radius: 0 2px 2px 0;
}

.habit-check {
  width: 20px; height: 20px;
  border: 1.5px solid var(--border-2);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  transition: all var(--transition);
}

.habit-check.checked {
  background: #16a34a;
  border-color: #16a34a;
}

.habit-check.checked::after {
  content: '✓'; color: white; font-size: 12px; font-weight: 700;
}

.habit-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.habit-en { font-size: 14px; font-weight: 500; }
.habit-ar { font-size: 12px; color: var(--text-2); direction: rtl; text-align: left; }

.badge-today-habit {
  font-size: 10px;
  font-weight: 700;
  background: #f59e0b;
  color: white;
  padding: 1px 6px;
  border-radius: 99px;
}

/* Stats */
.stats-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.stats-prayer-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr 52px 52px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.stats-header-row {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.stats-prayer-name { font-weight: 500; }
.stats-prayer-name small { color: var(--text-3); font-size: 11px; margin-left: 4px; }
.stats-jamaa-col, .stats-alone-col { text-align: center; }

.stats-bar-col {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stats-mini-bar {
  flex: 1;
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
}

.stats-pct {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.stats-habits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stats-habit-chip {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 10px 12px;
}

.stats-habit-label {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-habit-bar-wrap {
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 4px;
}

.stats-habit-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s;
}

.stats-habit-count {
  font-size: 11px;
  color: var(--text-2);
}

/* ===== WISHLIST ===== */
.wishlist-shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  margin-top: 8px;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-size: 14px;
  font-weight: 500;
}

.wishlist-shortcut:hover { border-color: var(--border-2); box-shadow: var(--shadow); }

.wishlist-shortcut-count {
  font-size: 13px;
  color: var(--text-2);
}

.wishlist-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wishlist-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.wishlist-item:hover { border-color: var(--border-2); box-shadow: var(--shadow); }

.wishlist-purchased { opacity: 0.55; }

.wishlist-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.wishlist-item-name {
  font-size: 15px;
  font-weight: 500;
  flex: 1;
}

.wishlist-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.wishlist-tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.wishlist-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.wishlist-priority {
  font-size: 12px;
  font-weight: 500;
}

.wishlist-notes {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 8px;
  word-break: break-word;
}

.wishlist-buy-btn {
  width: 100%;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  margin-top: 8px;
  transition: all var(--transition);
}

.wishlist-buy-btn:hover { background: var(--surface); color: var(--text); }

.wishlist-buy-done {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

@media (prefers-color-scheme: dark) {
  .wishlist-buy-done { background: #14532d; border-color: #166534; color: #86efac; }
}

/* ============================================================
   ===== SOFT ANIMATIONS ======================================
   ============================================================ */

/* View fade + slide-up on navigation */
@keyframes viewEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.view-enter { animation: viewEnter 0.28s cubic-bezier(0.22, 1, 0.36, 1); }

/* Modal entrance */
@keyframes modalPop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes backdropFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
#modal:not(.hidden) { animation: modalPop 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
#modal-backdrop:not(.hidden) { animation: backdropFade 0.2s ease; }

@media (max-width: 767px) {
  #modal:not(.hidden) { animation: modalSlideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
}

/* Cards stagger-fade on lists (subtle) */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.view-enter .project-card,
.view-enter .wishlist-item,
.view-enter .note-item,
.view-enter .prayer-row {
  animation: cardIn 0.3s ease backwards;
}
.view-enter .project-card:nth-child(2),
.view-enter .prayer-row:nth-child(2) { animation-delay: 0.03s; }
.view-enter .project-card:nth-child(3),
.view-enter .prayer-row:nth-child(3) { animation-delay: 0.06s; }
.view-enter .project-card:nth-child(4),
.view-enter .prayer-row:nth-child(4) { animation-delay: 0.09s; }
.view-enter .project-card:nth-child(5),
.view-enter .prayer-row:nth-child(5) { animation-delay: 0.12s; }
.view-enter .project-card:nth-child(6),
.view-enter .prayer-row:nth-child(6) { animation-delay: 0.15s; }

/* Checkbox pop when checked */
@keyframes checkPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.task-checkbox.checked,
.habit-check.checked { animation: checkPop 0.28s ease; }

/* Prayer button press feedback */
.prayer-btn:active,
.btn:active { transform: scale(0.96); }
.prayer-btn { transition: all var(--transition), transform 0.1s ease; }
.btn { transition: opacity var(--transition), background var(--transition), transform 0.1s ease; }

/* Progress bars grow smoothly (already have width transition; add ease) */
.progress-bar-fill,
.stats-habit-bar-fill,
.finance-bar-income,
.finance-bar-expense { transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1); }

/* Tab / nav active underline + lift */
.nav-item, .tab, .overview-tab, .tab-btn { transition: all 0.18s ease; }
.tab:active { transform: scale(0.92); }

/* Card hover lift */
.project-card, .wishlist-item, .note-item, .finance-stat {
  transition: border-color var(--transition), box-shadow var(--transition), transform 0.15s ease;
}
.project-card:hover, .wishlist-item:hover, .note-item:hover {
  transform: translateY(-1px);
}

/* Toast slide-up */
#toast {
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
#toast:not(.show) { transform: translateX(-50%) translateY(8px); }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   ===== AUTH SCREEN ==========================================
   ============================================================ */
#auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 340px;
  text-align: center;
  animation: viewEnter 0.4s cubic-bezier(0.22,1,0.36,1);
}
.auth-logo { margin-bottom: 18px; display: flex; justify-content: center; }
.auth-title { font-size: 22px; font-weight: 600; letter-spacing: -0.4px; margin-bottom: 6px; }
.auth-subtitle { font-size: 14px; color: var(--text-2); line-height: 1.5; margin-bottom: 24px; }
.auth-input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  outline: none;
  margin-bottom: 10px;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}
.auth-input:focus { border-color: var(--text-3); }
.auth-error { color: #ef4444; font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.auth-btn { width: 100%; padding: 13px; font-size: 15px; }

/* ============================================================
   ===== QURAN ================================================
   ============================================================ */
.islamic-subtabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.islamic-subtabs .overview-tab { padding: 9px 18px; }

.quran-header { text-align: center; margin-bottom: 16px; }
.quran-title { font-size: 20px; font-weight: 600; letter-spacing: -0.3px; }
.quran-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; }

.quran-progress-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.quran-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.quran-complete {
  text-align: center;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #16a34a;
}

.quran-today-card {
  background: linear-gradient(135deg, #10b98112, #6366f112);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 8px;
}
.quran-today-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #10b981;
  margin-bottom: 4px;
}
.quran-today-juz { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 14px; }
.quran-today-range { display: flex; flex-direction: column; gap: 10px; }
.quran-range-item { display: flex; flex-direction: column; gap: 2px; }
.quran-range-key {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
}
.quran-range-val { font-size: 14px; font-weight: 500; }
.quran-ar { font-size: 14px; color: var(--text-2); direction: rtl; }

.quran-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}
.quran-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.quran-cell:hover { border-color: var(--border-2); transform: translateY(-1px); }
.quran-cell.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.quran-cell.current {
  border-color: #10b981;
  border-width: 1.5px;
  box-shadow: 0 0 0 3px #10b98120;
}
.quran-cell-num {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}
.quran-cell.done .quran-cell-num { color: #16a34a; }
.quran-cell-name {
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quran-cell-page { font-size: 10px; color: var(--text-3); margin-top: 2px; }

@media (prefers-color-scheme: dark) {
  .quran-cell.done { background: #14532d; border-color: #166534; }
}

/* ============================================================
   ===== SETTINGS + TOGGLES ===================================
   ============================================================ */
.overview-settings-btn {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background var(--transition);
}
.overview-settings-btn:hover { background: var(--surface-2); }

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-label { font-size: 14px; font-weight: 500; }
.settings-row-desc { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.toggle {
  width: 46px;
  height: 28px;
  border-radius: 99px;
  background: var(--border-2);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.toggle-on { background: #10b981; }
.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1);
}
.toggle-on .toggle-knob { transform: translateX(18px); }
