/* ============================
   LUMEN Mobile — Styles
   Dark theme, touch-optimized
   ============================ */

/* ============================
   CSS Variables (matches desktop)
   ============================ */
:root {
  --bg: #0e0e10;
  --card: #111113;
  --card-hover: #18181b;
  --border: #27272a;
  --text: #e4e4e7;
  --muted: #71717a;
  --accent: #667eea;
  --accent-rgb: 102, 126, 234;
  --green: #4ade80;
  --red: #e45e5e;
  --orange: #ed8936;
  --yellow: #ecc94b;
  --purple: #9f7aea;

  --nav-height: 64px;
  --header-height: 52px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --radius: 10px;
  --radius-sm: 6px;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button { cursor: pointer; border: none; background: none; }
a { color: var(--accent); text-decoration: none; }

/* ============================
   Screens
   ============================ */
.screen { display: none; }
.screen.active { display: flex; flex-direction: column; min-height: 100dvh; }

/* ============================
   Login Screen
   ============================ */
.login-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 24px;
  max-width: 380px;
  margin: 0 auto;
  width: 100%;
}

.login-logo {
  text-align: center;
  margin-bottom: 40px;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  margin-top: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-subtitle {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 4px;
}

.login-form { display: flex; flex-direction: column; gap: 16px; }

.login-error {
  color: var(--red);
  font-size: 13px;
  min-height: 18px;
  text-align: center;
}

/* ============================
   Input Styles
   ============================ */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.input-group label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.input-group input,
.input-group select,
.input-group textarea {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--text);
  font-size: 16px; /* prevents iOS zoom */
  -webkit-appearance: none;
  appearance: none;
}

.input-group input:focus,
.input-group select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2);
}

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

.input-group.half { flex: 1; }

/* ============================
   Buttons
   ============================ */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  transition: opacity 0.15s;
}

.btn-primary:active { opacity: 0.8; }
.btn-primary:disabled { opacity: 0.5; }
.btn-full { width: 100%; }

.btn-ghost {
  background: none;
  color: var(--muted);
  padding: 10px 16px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.btn-ghost:active { background: var(--card-hover); }

.btn-small {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 4px;
}

/* ============================
   Header
   ============================ */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  padding: 0 16px;
  padding-top: var(--safe-top);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-title {
  font-size: 17px;
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--muted);
  transition: background 0.15s;
}

.header-btn:active { background: var(--card-hover); }

.header-btn.has-badge { position: relative; }
.header-btn .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.avatar-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

/* ============================
   Main Content
   ============================ */
.main-content {
  flex: 1;
  padding: 16px;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 80px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain; /* prevent pull-down browser refresh */
  scroll-behavior: smooth;
}

/* Lock body scroll when a sheet is open */
body.sheet-open { overflow: hidden; }
body.sheet-open .main-content {
  overflow: hidden;
  touch-action: none;
  pointer-events: none;
}

/* ============================
   Bottom Navigation
   ============================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 200;
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  transition: color 0.15s;
  padding: 6px 0;
  position: relative;
}

.nav-tab.active { color: var(--accent); }
.nav-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-tab svg { width: 20px; height: 20px; }

/* ============================
   Floating Action Button
   ============================ */
.fab {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.4);
  z-index: 150;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab:active { transform: scale(0.92); }
.fab.hidden { display: none; }

/* ============================
   Bottom Sheet
   ============================ */
.bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
}

.bottom-sheet.active { display: flex; flex-direction: column; justify-content: flex-end; }

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.2s;
}

.sheet-content {
  position: relative;
  background: var(--card);
  border-radius: 16px 16px 0 0;
  padding: 12px 20px calc(20px + var(--safe-bottom));
  max-height: 70dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sheet-content.sheet-tall { max-height: 85dvh; }

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 12px;
}

.sheet-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ============================
   Quick Add
   ============================ */
.qa-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

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

/* ============================
   Planner View
   ============================ */
.planner-date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -16px -16px 16px -16px;
  padding: 12px 16px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
}

.planner-date-nav .date-label {
  font-size: 17px;
  font-weight: 600;
  text-align: center;
}

.planner-date-nav .date-sub {
  font-size: 12px;
  color: var(--muted);
}

.planner-date-nav button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.planner-date-nav button:active { background: var(--card); }

/* Workload bar */
.mobile-workload {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 16px;
}

.mobile-workload-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
}

.mobile-workload-fill-mtg { background: var(--purple); transition: width 0.3s; }
.mobile-workload-fill-task { background: var(--accent); transition: width 0.3s; }
.mobile-workload.over .mobile-workload-fill-task { background: var(--red); }
.mobile-workload.busy .mobile-workload-fill-task { background: var(--orange); }

.mobile-workload-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

/* Section headers */
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 20px 0 8px;
}

.section-header:first-child { margin-top: 0; }

.section-header .count {
  background: var(--border);
  border-radius: 8px;
  padding: 1px 6px;
  font-size: 10px;
}

/* Milestone markers */
.milestone-marker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  border-left: 3px solid;
  font-size: 13px;
}

.milestone-marker .ms-project {
  font-weight: 600;
  font-size: 11px;
}

.milestone-marker .ms-name { color: var(--text); }

.milestone-marker .ms-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
}

.milestone-marker .ms-badge.due { background: rgba(228, 94, 94, 0.15); color: var(--red); }
.milestone-marker .ms-badge.start { background: rgba(74, 222, 128, 0.15); color: var(--green); }

/* Meetings */
.meeting-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.meeting-time {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 52px;
}

.meeting-title { font-size: 14px; }
.meeting-badge {
  font-size: 10px;
  background: rgba(159, 122, 234, 0.15);
  color: var(--purple);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
}

/* ============================
   Task Card
   ============================ */
.task-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 6px;
  transition: background 0.15s;
  min-height: 44px;
}

.task-card:active { background: var(--card-hover); }
.task-card.done { opacity: 0.5; }

.task-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.task-card.done .task-check {
  background: var(--green);
  border-color: var(--green);
}

.task-card.done .task-check::after {
  content: '';
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.task-card.high .task-check { border-color: var(--red); }

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

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

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

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.task-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.task-project-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.task-priority-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.task-priority-dot.high { background: var(--red); }
.task-priority-dot.low { background: var(--muted); }

.task-estimate {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.task-due { color: var(--muted); }
.task-due.overdue { color: var(--red); font-weight: 600; }

.task-blockers-badge {
  color: var(--orange);
  font-weight: 600;
}

/* ============================
   Task Detail Sheet (Editable)
   ============================ */
.td-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.td-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.td-check.done { background: var(--green); border-color: var(--green); }
.td-check.done::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.td-title-input {
  flex: 1;
  font-size: 17px;
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  padding: 4px 0 6px;
  outline: none;
}

.td-title-input:focus {
  border-bottom-color: var(--accent);
}

.td-section {
  margin-bottom: 16px;
}

.td-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.td-value {
  font-size: 14px;
  padding: 8px 0;
}

.td-project-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
}

/* Priority pills */
.td-field-row {
  display: flex;
  gap: 6px;
}

.td-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: var(--card-hover);
  color: var(--muted);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 4px;
}

.td-pill.active {
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.3);
}

/* Editable fields */
.td-select,
.td-date-input,
.td-num-input,
.td-textarea {
  width: 100%;
  background: var(--card-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-size: 15px;
  -webkit-appearance: none;
  appearance: none;
}

.td-select:focus,
.td-date-input:focus,
.td-num-input:focus,
.td-textarea:focus {
  border-color: var(--accent);
  outline: none;
}

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

.td-textarea {
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
  line-height: 1.5;
}

.td-num-input {
  max-width: 120px;
}

/* Blocker rows */
.td-blocker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.td-blocker-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  background: rgba(237, 137, 54, 0.1);
  flex-shrink: 0;
}

.td-blocker-check.done {
  color: var(--green);
  background: rgba(74, 222, 128, 0.1);
}

.td-blocker-text {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  padding: 4px 0;
  outline: none;
}

.td-blocker-text:focus { border-bottom-color: var(--accent); }

.td-blocker-remove {
  width: 24px;
  height: 24px;
  font-size: 16px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.td-add-blocker {
  font-size: 13px;
  color: var(--accent);
  padding: 6px 0;
}

/* Bottom actions */
.td-bottom-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.td-delete-btn {
  padding: 10px;
  color: var(--red);
  font-size: 13px;
  text-align: center;
  border-radius: var(--radius-sm);
}

.td-delete-btn:active { background: rgba(228, 94, 94, 0.1); }

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

.td-actions button {
  flex: 1;
  min-width: 80px;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.td-action-reschedule {
  background: var(--card-hover);
  color: var(--text);
  border: 1px solid var(--border);
}

.td-action-reschedule:active { background: var(--border); }

/* ============================
   Filter Pills
   ============================ */
.filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  margin-bottom: 12px;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-pill {
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--border);
  transition: all 0.15s;
  flex-shrink: 0;
}

.filter-pill.active {
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.3);
}

.filter-pill:active { background: var(--card-hover); }

/* Search bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px;
  margin-bottom: 12px;
}

.search-bar svg { color: var(--muted); flex-shrink: 0; }

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 0;
  font-size: 15px;
  color: var(--text);
  outline: none;
}

/* ============================
   Dashboard
   ============================ */
.dash-stats-mobile {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.dash-stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}

.dash-stat-card .num {
  font-size: 24px;
  font-weight: 700;
}

.dash-stat-card .label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.dash-stat-card.critical .num { color: var(--red); }
.dash-stat-card.warning .num { color: var(--orange); }
.dash-stat-card.ok .num { color: var(--green); }

/* Attention items */
.attention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 6px;
  border-left: 3px solid var(--muted);
}

.attention-item.critical { border-left-color: var(--red); }
.attention-item.warning { border-left-color: var(--orange); }
.attention-item.info { border-left-color: var(--yellow); }

.attention-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.attention-project {
  font-size: 11px;
  font-weight: 600;
  display: block;
}

.attention-desc {
  font-size: 13px;
  color: var(--text);
}

.attention-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

/* ============================
   Settings View
   ============================ */
.settings-section {
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.settings-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px 6px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  min-height: 48px;
}

.settings-item:first-child { border-top: none; }

.settings-item-label { font-size: 15px; }
.settings-item-value { font-size: 14px; color: var(--muted); }

.settings-item.danger .settings-item-label { color: var(--red); }

/* ============================
   Loading Spinner
   ============================ */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 0;
  color: var(--muted);
  font-size: 14px;
}

/* ============================
   Empty State
   ============================ */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.empty-state svg { margin-bottom: 12px; opacity: 0.5; }
.empty-state h3 { font-size: 16px; color: var(--text); margin-bottom: 4px; }
.empty-state p { font-size: 13px; }

/* ============================
   Toast Notifications
   ============================ */
.toast-container {
  position: fixed;
  top: calc(var(--safe-top) + 8px);
  left: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: slideDown 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  touch-action: pan-x;
  cursor: grab;
  user-select: none;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--accent); }

@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============================
   Pull to Refresh indicator
   ============================ */
.pull-indicator {
  text-align: center;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  display: none;
}

.pull-indicator.visible { display: block; }

.pull-indicator .spinner {
  width: 18px;
  height: 18px;
  margin: 0 auto 4px;
}

/* Connection status dot (replaces sync button on mobile) */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  transition: background 0.3s;
}

.status-dot.offline { background: var(--muted); }
.status-dot.syncing { background: var(--accent); animation: pulse 1s ease-in-out infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ============================
   Tablet breakpoint
   ============================ */
@media (min-width: 768px) {
  .main-content { max-width: 600px; margin: 0 auto; padding: 24px; }
  .bottom-nav { max-width: 600px; left: 50%; transform: translateX(-50%); border-radius: 16px 16px 0 0; }
  .fab { right: calc(50% - 280px); }
}
