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

:root {
  --brand:       #D7B46A;
  --brand-dark:  #B89446;
  --brand-light: rgba(215,180,106,0.14);
  --ink:         #F5F5F0;
  --ink-2:       #D8D6CD;
  --ink-3:       #A8A49A;
  --ink-4:       #6F6C65;
  --surface:     #17191D;
  --surface-2:   #08090B;
  --surface-3:   #23252A;
  --surface-4:   #2D3036;
  --border:      rgba(255,255,255,0.10);
  --border-2:    rgba(215,180,106,0.24);
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --shadow-sm:   0 1px 0 rgba(255,255,255,0.04), 0 8px 24px rgba(0,0,0,0.18);
  --shadow-md:   0 16px 40px rgba(0,0,0,0.24);
  --shadow-lg:   0 24px 60px rgba(0,0,0,0.45);
  --nav-h:       64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--surface-2);
  color: var(--ink);
  min-height: 100dvh;
  overflow-x: hidden;
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
}

/* ── Layout ─────────────────────────────────────────────────── */
#app { display: flex; flex-direction: column; min-height: 100dvh; }

.screen { display: none; flex-direction: column; flex: 1; }
.screen.active { display: flex; }

/* ── Top bar ─────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(9,10,12,0.94);
  padding: 0 20px;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 1px 0 var(--border), 0 10px 28px rgba(0,0,0,0.30);
  backdrop-filter: blur(18px);
}

.topbar-logo {
  display: flex; align-items: center; gap: 10px;
}

.logo-mark {
  width: 32px; height: 32px;
  background: var(--brand);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #111; font-size: 16px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.16), 0 10px 24px rgba(215,180,106,0.16);
}

.topbar-name { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 0; }
.topbar-action { color: var(--brand); font-size: 22px; background: rgba(215,180,106,0.10); border: 1px solid var(--border-2); border-radius: 10px; cursor: pointer; padding: 4px; line-height: 1; }
.topbar-action:hover { color: #fff; }

/* ── Bottom nav ──────────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: rgba(21,24,29,0.96);
  border-top: 1px solid var(--border);
  display: flex;
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -10px 28px rgba(0,0,0,0.34);
  backdrop-filter: blur(18px);
}

.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; padding: 10px 0;
  cursor: pointer; border: none; background: none;
  color: var(--ink-4); font-size: 10px; font-weight: 500;
  letter-spacing: 0.03em; text-transform: uppercase;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.nav-item i { font-size: 22px; transition: color 0.15s; }
.nav-item.active { color: var(--brand); }
.nav-item.active i { color: var(--brand); }

/* ── Scroll content area ─────────────────────────────────────── */
.scroll-area {
  flex: 1; overflow-y: auto;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  -webkit-overflow-scrolling: touch;
}

/* ── Summary strip ────────────────────────────────────────────── */
.summary-strip {
  background: linear-gradient(180deg, #08090B, #111318);
  padding: 0 20px 24px;
  display: grid; grid-template-columns: repeat(3,1fr); gap: 10px;
}

.stat-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.stat-val { font-size: 22px; font-weight: 700; color: var(--brand); }
.stat-lbl { font-size: 10px; color: var(--ink-3); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Section headers ──────────────────────────────────────────── */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 10px;
}

.section-title { font-size: 13px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; }
.section-link { font-size: 13px; color: var(--brand); font-weight: 650; cursor: pointer; background: rgba(215,180,106,0.10); border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 7px 9px; display: inline-flex; align-items: center; gap: 5px; }

/* ── Project cards ───────────────────────────────────────────── */
.cards-list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }

.proj-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.proj-card:active { transform: scale(0.985); box-shadow: var(--shadow-sm); }

.proj-card-inner { padding: 14px 16px; }

.proj-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.proj-card-name { font-size: 15px; font-weight: 650; color: var(--ink); line-height: 1.3; flex: 1; }
.proj-card-client { font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 650; white-space: nowrap;
  flex-shrink: 0;
}

.status-en_progreso,
.status-pendiente,
.status-completado {
  background: rgba(255,255,255,0.06);
  color: var(--ink-2);
  border: 1px solid var(--border);
}
.status-completado { color: var(--brand); border-color: var(--border-2); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dot-en_progreso,
.dot-pendiente,
.dot-completado { background: var(--brand); opacity: 0.76; }

.proj-progress { margin-bottom: 12px; }
.prog-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.prog-label { font-size: 12px; color: var(--ink-3); }
.prog-pct { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.prog-track { height: 5px; background: var(--surface-3); border-radius: 5px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--brand); border-radius: 5px; transition: width 0.4s ease; }
.prog-fill.done { background: var(--brand); }

.proj-card-footer { display: flex; align-items: center; justify-content: space-between; }

.avatars { display: flex; }
.av {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  margin-right: -7px;
  border: 2px solid var(--surface);
}
.av-orange,
.av-blue,
.av-teal,
.av-purple { background: rgba(215,180,106,0.14); color: var(--brand); }

.due-tag { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-3); }
.due-tag.urgent,
.due-tag.soon { color: var(--brand); }

.proj-type-bar {
  height: 3px;
  background: var(--brand);
}
.type-Cocina,
.type-Baño,
.type-Sala,
.type-Fachada,
.type-Otro { background: var(--brand); opacity: 0.82; }

/* ── FAB ─────────────────────────────────────────────────────── */
.fab {
  position: fixed; bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px); right: 20px;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--brand);
  color: #111; font-size: 24px;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px rgba(215,180,106,0.20);
  transition: transform 0.15s, box-shadow 0.15s;
  z-index: 45;
  -webkit-tap-highlight-color: transparent;
}
.fab:active { transform: scale(0.93); box-shadow: 0 6px 18px rgba(215,180,106,0.16); }

/* ── Detail sheet ────────────────────────────────────────────── */
.sheet-overlay {
  display: none; position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,0.62);
  align-items: flex-end;
}
.sheet-overlay.open { display: flex; }

.sheet {
  width: 100%; max-height: 92dvh;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.28s cubic-bezier(0.32,0.72,0,1);
}

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

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

.sheet-head {
  padding: 12px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sheet-title { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.sheet-sub   { font-size: 13px; color: var(--ink-3); margin-top: 2px; }

.sheet-body {
  flex: 1; overflow-y: auto;
  padding: 0 0 calc(var(--safe-bottom) + 20px);
  -webkit-overflow-scrolling: touch;
}

.sheet-close {
  position: absolute; top: 14px; right: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-3); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); font-size: 16px;
}

/* Sheet sections */
.s-section { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.s-section:last-child { border-bottom: none; }
.s-section-title { font-size: 11px; font-weight: 700; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-item { }
.info-lbl { font-size: 11px; color: var(--ink-4); margin-bottom: 2px; }
.info-val { font-size: 14px; font-weight: 600; color: var(--ink); }
.info-val.full { grid-column: 1/-1; }
.info-val.brand { color: var(--brand); }

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

.task-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: all 0.15s;
  background: var(--surface); color: transparent; font-size: 12px;
}
.task-check.done { background: var(--brand); border-color: var(--brand); color: #111; }

.task-body { flex: 1; min-width: 0; }
.task-text { font-size: 14px; color: var(--ink); }
.task-text.done { text-decoration: line-through; color: var(--ink-4); }
.task-who { font-size: 12px; color: var(--ink-3); margin-top: 1px; }

/* Team chips */
.team-chips { display: flex; flex-direction: column; gap: 8px; }
.team-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
}
.team-chip .av { width: 34px; height: 34px; font-size: 12px; margin-right: 0; border: none; flex-shrink: 0; }
.team-chip-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.team-chip-role { font-size: 12px; color: var(--ink-3); }

/* Photos */
.photos-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.photo-thumb {
  aspect-ratio: 1; border-radius: var(--radius-md);
  background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; cursor: pointer; overflow: hidden;
  border: 1px solid var(--border);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-add {
  aspect-ratio: 1; border-radius: var(--radius-md);
  border: 1.5px dashed var(--border-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; cursor: pointer;
  color: var(--ink-4); font-size: 11px;
  -webkit-tap-highlight-color: transparent;
}
.photo-add i { font-size: 22px; color: var(--brand); }
.photo-add:active { background: var(--surface-3); }

/* Notes */
.notes-box {
  background: var(--surface-2); border-radius: var(--radius-md);
  padding: 12px; font-size: 14px; color: var(--ink-2); line-height: 1.6;
  border: 1px solid var(--border);
}

/* Add task */
.add-task-row {
  display: flex; gap: 8px; margin-top: 10px;
}
.add-task-input {
  flex: 1; padding: 8px 12px;
  border: 1px solid var(--border-2); border-radius: var(--radius-md);
  font-size: 14px; color: var(--ink); background: var(--surface-2);
  font-family: inherit;
}
.add-task-input:focus { outline: none; border-color: var(--brand); }
.add-task-btn {
  padding: 8px 14px; background: var(--brand); color: #111;
  border: none; border-radius: var(--radius-md); font-size: 13px;
  font-weight: 600; cursor: pointer;
}

/* ── Modal / Drawer ─────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 70;
  background: rgba(0,0,0,0.62);
  align-items: flex-end;
}
.modal-overlay.open { display: flex; }

.modal {
  width: 100%; max-height: 95dvh;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex; flex-direction: column;
  animation: slideUp 0.28s cubic-bezier(0.32,0.72,0,1);
}

.modal-handle { width: 36px; height: 4px; background: var(--border-2); border-radius:4px; margin: 10px auto 0; }
.modal-head { padding: 12px 20px 14px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font-size: 17px; font-weight: 700; }
.modal-close { background: var(--surface-3); border: none; border-radius: 50%; width: 28px; height: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 16px; }

.modal-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; -webkit-overflow-scrolling: touch; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--border); padding-bottom: calc(12px + var(--safe-bottom)); display: flex; gap: 10px; }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.form-input, .form-select, .form-textarea {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px; color: var(--ink); background: var(--surface-2);
  font-family: inherit; width: 100%;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--brand); background: var(--surface); }
.form-textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.form-section-label {
  font-size: 11px; font-weight: 700; color: var(--ink-4);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.worker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.worker-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--surface-2);
}
.worker-toggle.selected { border-color: var(--border-2); background: var(--brand-light); }
.worker-toggle .av { width: 28px; height: 28px; font-size: 10px; margin-right: 0; border: none; flex-shrink: 0; }
.worker-toggle-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.worker-toggle-role { font-size: 11px; color: var(--ink-3); }

.btn-primary { flex: 1; padding: 13px; background: var(--brand); color: #111; border: none; border-radius: var(--radius-md); font-size: 16px; font-weight: 650; cursor: pointer; }
.btn-primary:active { background: var(--brand-dark); }
.btn-secondary { padding: 13px 20px; background: var(--surface-3); color: var(--ink-2); border: none; border-radius: var(--radius-md); font-size: 16px; font-weight: 600; cursor: pointer; }

/* ── Equipo screen ───────────────────────────────────────────── */
.worker-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; margin: 0 16px 10px;
  box-shadow: var(--shadow-sm);
}
.worker-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.worker-header .av { width: 44px; height: 44px; font-size: 15px; margin: 0; border: none; flex-shrink: 0; }
.worker-header-main { flex: 1; min-width: 0; }
.worker-header-name { font-size: 16px; font-weight: 650; }
.worker-header-role { font-size: 13px; color: var(--ink-3); }
.worker-header-phone { font-size: 12px; color: var(--brand); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.worker-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icon-btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px;
}
.icon-btn.danger { color: var(--ink-3); border-color: var(--border); background: rgba(255,255,255,0.04); }
.worker-info {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px; margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px; line-height: 1.45;
}
.worker-info div { display: flex; align-items: flex-start; gap: 6px; }
.worker-projects { display: flex; flex-direction: column; gap: 6px; }
.worker-proj-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.worker-proj-row:last-child { border: none; }

/* ── Mensajes screen ─────────────────────────────────────────── */
.message-composer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin: 0 16px 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-composer .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.messages-list-inner { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.message-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 14px;
}
.message-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.message-route { font-size: 14px; font-weight: 650; color: var(--ink); }
.message-date { font-size: 12px; color: var(--ink-4); margin-top: 2px; }
.message-text { font-size: 14px; color: var(--ink-2); line-height: 1.55; white-space: pre-wrap; }

/* ── Calendar screen ─────────────────────────────────────────── */
.cal-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin: 0 16px 10px;
  display: flex; overflow: hidden; box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.cal-date-block { width: 60px; flex-shrink: 0; background: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cal-day { font-size: 24px; font-weight: 700; color: #fff; line-height: 1; }
.cal-month { font-size: 11px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.06em; }
.cal-body { flex: 1; padding: 12px 14px; }
.cal-name { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.cal-client { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.cal-foot { display: flex; align-items: center; justify-content: space-between; }
.days-badge { font-size: 12px; font-weight: 600; }
.days-badge.ok,
.days-badge.soon,
.days-badge.late { color: var(--brand); }

/* ── Toast ───────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + var(--safe-bottom) + 80px); left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 30px;
  font-size: 13px; font-weight: 500;
  opacity: 0; transition: all 0.2s;
  white-space: nowrap; z-index: 90;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Install banner ──────────────────────────────────────────── */
.install-banner {
  display: none;
  background: rgba(215,180,106,0.10); color: var(--ink);
  padding: 12px 16px; margin: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-2);
  align-items: center; gap: 10px;
  font-size: 13px; cursor: pointer;
}
.install-banner.show { display: flex; }
.install-banner i { font-size: 20px; flex-shrink: 0; }
.install-text { flex: 1; line-height: 1.4; }
.install-text strong { display: block; font-weight: 700; }

/* ── Project tools ───────────────────────────────────────────── */
.project-tools {
  padding: 14px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-box {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: rgba(21,24,29,0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.search-box i { color: var(--ink-4); font-size: 18px; flex-shrink: 0; }
.search-box input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.search-box input::placeholder { color: var(--ink-4); }

.filter-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.filter-tab {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
}

.filter-tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #111;
}

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--ink-4); }
.empty-state i { font-size: 48px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 15px; }

/* ── Status actions ──────────────────────────────────────────── */
.status-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.status-action {
  min-height: 38px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.status-action.active {
  background: var(--brand-light);
  border-color: var(--brand);
  color: var(--brand);
}

.danger-zone { background: rgba(255,255,255,0.02); }
.btn-danger {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (min-width: 720px) {
  body { background: #050608; }
  #app { max-width: 520px; margin: 0 auto; background: var(--surface-2); box-shadow: 0 0 0 1px var(--border); }
  .bottom-nav { left: 50%; right: auto; width: min(520px, 100%); transform: translateX(-50%); }
  .fab { right: calc(50% - min(260px, 50vw) + 20px); }
  .sheet-overlay, .modal-overlay { justify-content: center; }
  .sheet, .modal { max-width: 520px; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
}

.cal-date-block { background: #111318; }
.cal-day { color: var(--brand); }
.cal-month { color: var(--ink-3); }
