/* DEN Ops v2 — Light theme (PourOps sibling) */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Oswald:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&family=Special+Elite&display=swap');

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

:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface2: #f4efe6;
  --surface3: #ece4d6;
  --border: #e4dacb;
  --border2: #d6c8b2;
  --text: #1c1712;
  --text2: #6b5d4d;
  --text3: #9a8a76;
  --gold: #b8860b;
  --gold2: #d4a017;
  --gold-dim: rgba(184,134,11,0.12);
  --gold-glow: rgba(184,134,11,0.2);
  --cream: #3d2800;
  --red: #b01c1c;
  --red-glow: rgba(176,28,28,0.15);
  --red-dim: rgba(176,28,28,0.1);
  --green: #2e7d32;
  --green-dim: rgba(46,125,50,0.12);
  --blue: #1565c0;
  --blue-dim: rgba(21,101,192,0.12);
  --orange: #b55c00;
  --orange-dim: rgba(181,92,0,0.12);
  --purple: #6a1b9a;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-xs: 3px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-display: 'Bebas Neue', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  --font-accent: 'Special Elite', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

html { height: 100%; overscroll-behavior: none; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  min-height: 100svh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(ellipse 80% 45% at 50% -8%, rgba(184,134,11,0.07), transparent 55%);
  background-attachment: scroll;
}

/* ── Topbar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 52px;
  background: var(--surface);
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.topbar-brand {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 4px;
  color: var(--text);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-brand em { font-style: normal; color: var(--gold); }

.preview-badge {
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  margin-left: 8px;
}

/* ── App shell layout ── */
#app-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 52px);
}

#layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(60px + var(--safe-bottom));
}

@media (min-width: 1024px) {
  #layout {
    flex-direction: row;
    padding-bottom: 0;
  }
  #sidebar-nav {
    width: 220px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    min-height: calc(100dvh - 52px);
    background: var(--surface);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 52px;
    height: calc(100dvh - 52px);
    overflow-y: auto;
  }
  #main-content {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 220px);
  }
  #sidebar-content {
    width: 480px;
    flex-shrink: 0;
    border-left: 1px solid var(--border);
    overflow-y: auto;
    max-height: calc(100dvh - 52px);
    position: sticky;
    top: 52px;
  }
  .bottom-nav { display: none !important; }
}

#main-content {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ── Desktop sidebar nav ── */
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: none;
  color: var(--text2);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.2s var(--ease);
}
.sidebar-nav-item:hover { background: var(--surface2); color: var(--text); }
.sidebar-nav-item.active { background: var(--gold-dim); color: var(--gold); }
.sidebar-nav-item .nav-icon { font-size: 16px; }

/* ── Bottom nav (mobile) ── */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 4500;
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 8px 4px max(8px, var(--safe-bottom));
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 0;
  min-height: 48px;
  border: none;
  background: none;
  color: var(--text3);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.2s var(--ease);
  -webkit-tap-highlight-color: rgba(184,134,11,0.2);
  touch-action: manipulation;
}
.nav-item .nav-icon { font-size: 18px; line-height: 1; }
.nav-item.active { color: var(--gold); }

/* ── Pipeline ── */
.pipeline-header {
  padding: 12px 16px 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 52px;
  z-index: 10;
}
.pipeline-search-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pipeline-search {
  flex: 1; min-width: 180px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text);
  outline: none;
}
.pipeline-search:focus { border-color: var(--gold); }
.pipeline-filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.filter-pill.active { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }
.pipeline-toolbar { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.sandbox-toggle { font-size: 12px; color: var(--text3); display: flex; align-items: center; gap: 6px; cursor: pointer; }

.pipeline-board {
  display: flex;
  gap: 0;
  overflow-x: auto;
  min-height: 400px;
  padding-bottom: 16px;
}
@media (min-width: 1024px) {
  .pipeline-board { flex-wrap: nowrap; align-items: flex-start; }
}

.pipeline-col {
  flex-shrink: 0;
  width: 280px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.pipeline-col:last-child { border-right: none; }

.pipeline-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 8px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}
.pipeline-col-title {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}
.pipeline-col-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  margin-left: auto;
}
.pipeline-col-toggle {
  background: none; border: none; cursor: pointer; color: var(--text3); font-size: 16px;
}
.pipeline-col-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.pipeline-col--collapsed .pipeline-col-body { display: none; }
.pipeline-empty { color: var(--text3); font-size: 13px; padding: 16px 8px; text-align: center; }

/* ── Stage colors ── */
.stage-inquiry { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(21,101,192,0.3); }
.stage-hold { background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(181,92,0,0.3); }
.stage-deposit { background: var(--green-dim); color: var(--green); border: 1px solid rgba(46,125,50,0.3); }
.stage-confirmed { background: var(--green); color: #fff; }
.stage-completed { background: var(--surface3); color: var(--text3); border: 1px solid var(--border); }
.stage-cancelled { background: var(--red-dim); color: var(--red); border: 1px solid rgba(176,28,28,0.3); }

/* ── Pipeline cards ── */
.pipeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s var(--ease);
  position: relative;
}
.pipeline-card:hover { border-color: var(--gold); box-shadow: 0 2px 10px rgba(0,0,0,0.08); transform: translateY(-1px); }

.pipeline-card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pipeline-card-stage { font-family: var(--font-body); font-size: 10px; font-weight: 600; letter-spacing: 1.5px; padding: 2px 7px; border-radius: var(--radius-xs); text-transform: uppercase; }
.pipeline-card-sandbox { font-size: 9px; padding: 2px 6px; background: var(--surface3); color: var(--text3); border-radius: var(--radius-xs); border: 1px solid var(--border); font-family: var(--font-mono); }
.pipeline-card-hold { font-size: 10px; font-family: var(--font-mono); font-weight: 600; color: var(--orange); margin-left: auto; }
.hold-expired { color: var(--red); }
.pipeline-card-name { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: 0.5px; }
.pipeline-card-meta { display: flex; gap: 8px; font-size: 12px; color: var(--text2); font-family: var(--font-mono); }
.pipeline-card-money { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--gold); }
.dep-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: var(--radius-xs); letter-spacing: 1px; }
.dep-paid { background: var(--green-dim); color: var(--green); border: 1px solid rgba(46,125,50,0.3); }
.dep-due { background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(181,92,0,0.3); }

/* ── Detail view ── */
.detail-view { display: flex; flex-direction: column; height: 100%; }
.detail-topbar {
  display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 52px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.detail-back {
  background: none; border: none; color: var(--gold); font-family: var(--font-body);
  font-size: 15px; font-weight: 600; letter-spacing: 1px; cursor: pointer;
  padding: 8px 0; min-height: 44px; white-space: nowrap;
}
.detail-topbar-title { flex: 1; font-family: var(--font-body); font-size: 16px; font-weight: 600; color: var(--text); letter-spacing: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.detail-tabs {
  display: flex; overflow-x: auto; gap: 0;
  background: var(--surface2); border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.detail-tabs::-webkit-scrollbar { display: none; }
.detail-tab {
  padding: 12px 18px; border: none; background: none; border-bottom: 2px solid transparent;
  font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text2); cursor: pointer; white-space: nowrap;
  transition: all 0.2s var(--ease);
}
.detail-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

.detail-panels { flex: 1; overflow-y: auto; }
.detail-panel { display: none; padding: 16px; }
.detail-panel.active { display: block; }

/* ── KV grid ── */
.kv-grid { display: flex; flex-direction: column; gap: 0; }
.kv-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.kv-row:last-child { border-bottom: none; }
.kv-row--full { flex-direction: column; gap: 4px; }
.kv-label { font-family: var(--font-body); font-size: 11px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: var(--text3); min-width: 100px; flex-shrink: 0; padding-top: 2px; }
.kv-val { font-size: 14px; color: var(--text); flex: 1; }
.kv-pre { white-space: pre-wrap; font-family: var(--font-mono); font-size: 12px; line-height: 1.5; }
.kv-mono { font-family: var(--font-mono); font-weight: 700; color: var(--gold); }
.kv-grid--compact .kv-row { padding: 7px 0; }
.kv-grid--compact .kv-label { min-width: 80px; font-size: 10px; }
.kv-grid--compact .kv-val { font-size: 13px; }

.contact-link { color: var(--gold); text-decoration: none; }
.contact-link:hover { text-decoration: underline; }

/* ── Request tab ── */
.request-layout { display: flex; gap: 16px; flex-wrap: wrap; }
.request-col { flex: 1; min-width: 260px; }
.request-col-title { font-family: var(--font-display); font-size: 16px; letter-spacing: 2px; color: var(--text); margin-bottom: 10px; }

.edit-form { display: flex; flex-direction: column; gap: 10px; }
.form-label { display: flex; flex-direction: column; gap: 4px; font-family: var(--font-accent); font-size: 10px; color: var(--text3); letter-spacing: 2px; text-transform: uppercase; }
.form-input, .form-select {
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-xs);
  padding: 10px 12px; font-family: var(--font-ui); font-size: 15px; color: var(--text);
  outline: none; transition: border-color 0.2s; min-height: 44px; width: 100%;
}
.form-input:focus, .form-select:focus { border-color: var(--gold); }
.form-select { -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 10px) calc(50% - 2px);
  background-size: 6px 6px; background-repeat: no-repeat; padding-right: 30px;
}

.diff-label { font-size: 11px; color: var(--text3); letter-spacing: 1px; margin-bottom: 4px; }
.diff-row { font-size: 12px; font-family: var(--font-mono); padding: 4px 0; }
.diff-key { color: var(--text3); }
.diff-val { color: var(--gold); font-weight: 700; }
.request-diff { margin: 8px 0; padding: 8px; background: var(--surface2); border-radius: var(--radius-xs); border-left: 3px solid var(--gold); }
.request-diff:empty { display: none; }

/* ── Price tab ── */
.price-legacy-tag { display: inline-block; background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(181,92,0,0.3); font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 2px; padding: 4px 10px; border-radius: var(--radius-xs); margin-bottom: 14px; text-transform: uppercase; }
.price-breakdown { display: flex; flex-direction: column; gap: 0; }
.price-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text2); }
.price-row:last-child { border-bottom: none; }
.price-row--total { font-family: var(--font-display); font-size: 20px; letter-spacing: 2px; color: var(--text); }
.price-row--deposit { color: var(--gold); font-weight: 700; }
.price-amount { font-family: var(--font-mono); font-weight: 700; color: var(--text); }
.price-row--total .price-amount { color: var(--gold); font-size: 20px; }
.price-note { font-size: 12px; color: var(--text3); margin-top: 12px; font-style: italic; }

/* ── Activity ── */
.activity-feed, .activity-feed-global { display: flex; flex-direction: column; gap: 0; }
.activity-entry, .activity-global-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.activity-entry--session, .activity-global-row--session { background: var(--gold-dim); }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-top: 5px; flex-shrink: 0; }
.activity-body { flex: 1; }
.activity-text { font-size: 14px; color: var(--text); line-height: 1.4; }
.activity-who { font-family: var(--font-mono); font-size: 11px; color: var(--gold); margin-left: 6px; }
.activity-id { font-family: var(--font-mono); font-size: 10px; color: var(--text3); margin-top: 2px; }
.activity-time { font-family: var(--font-mono); font-size: 11px; color: var(--text3); margin-top: 2px; }
.activity-empty { color: var(--text3); font-size: 14px; padding: 32px 16px; text-align: center; }
.activity-view-header { padding: 16px 16px 8px; }

/* ── Actions bar ── */
.detail-actions-bar {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 12px 16px; display: flex; flex-direction: column; gap: 8px;
  position: sticky; bottom: 0; z-index: 10;
}
.actions-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.actions-note-area { padding-top: 8px; border-top: 1px solid var(--border); }

/* ── Buttons ── */
.btn {
  padding: 10px 18px; border-radius: var(--radius-sm); font-family: var(--font-body);
  font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  border: none; cursor: pointer; min-height: 40px; transition: all 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold2); }
.btn-green { background: var(--green); color: #fff; }
.btn-ghost { background: var(--surface2); color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(176,28,28,0.3); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-print { background: none; border: 1px solid var(--gold); color: var(--gold); font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 2px; padding: 8px 16px; border-radius: var(--radius-xs); cursor: pointer; margin-top: 16px; }
.btn-save-changes { margin-top: 12px; width: 100%; padding: 12px; background: var(--gold); color: #fff; border: none; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; }

/* ── Deposit screen ── */
.deposit-view { display: flex; flex-direction: column; }
.deposit-body { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.deposit-booking-info { padding: 12px 0; }
.deposit-name { font-family: var(--font-display); font-size: 20px; letter-spacing: 2px; }
.deposit-meta { font-family: var(--font-mono); font-size: 12px; color: var(--text2); margin-top: 4px; }
.deposit-link-card { background: var(--surface2); border: 1px solid var(--gold); border-radius: var(--radius); padding: 16px; }
.deposit-link-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.deposit-link-label { font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; }
.deposit-custom-tag { font-size: 9px; padding: 2px 6px; background: var(--orange-dim); color: var(--orange); border-radius: var(--radius-xs); border: 1px solid rgba(181,92,0,0.3); }
.deposit-url { font-family: var(--font-mono); font-size: 12px; color: var(--text2); word-break: break-all; margin-bottom: 12px; }
.deposit-action-card { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.deposit-action-title { font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 2px; color: var(--text3); text-transform: uppercase; margin-bottom: 8px; }
.deposit-action-preview { font-size: 13px; color: var(--text2); font-family: var(--font-ui); margin-bottom: 10px; line-height: 1.4; }
.deposit-sms, .deposit-email {
  display: inline-block; padding: 10px 18px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; text-decoration: none; color: var(--text2);
  background: var(--surface); border: 1px solid var(--border); cursor: pointer;
  transition: all 0.2s var(--ease);
}
.deposit-sms:hover, .deposit-email:hover { border-color: var(--gold); color: var(--gold); }
.deposit-copy { margin-top: 0; }
.deposit-mark-hold { width: 100%; padding: 12px; background: var(--gold); color: #fff; border: none; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 2px; cursor: pointer; }
.deposit-disclaimer { font-size: 11px; color: var(--text3); font-style: italic; }

/* ── Calendar ── */
.calendar-view { padding: 0; }
.cal-nav { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 52px; z-index: 5; }
.cal-nav-btn { background: none; border: 1px solid var(--border); color: var(--text2); width: 36px; height: 36px; border-radius: var(--radius-xs); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cal-nav-btn:hover { border-color: var(--gold); color: var(--gold); }
.cal-month-label { font-family: var(--font-display); font-size: 20px; letter-spacing: 3px; color: var(--text); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
.cal-day-name { text-align: center; padding: 8px 4px; font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text3); background: var(--surface2); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal-day { min-height: 90px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; }
.cal-day--empty { background: var(--surface2); }
.cal-day--today .cal-day-num { color: var(--gold); font-weight: 700; }
.cal-day-num { font-family: var(--font-mono); font-size: 12px; color: var(--text3); }
.cal-chip { font-size: 10px; padding: 2px 6px; border-radius: var(--radius-xs); border: none; cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.cal-week-list { padding: 0 16px 16px; }
.cal-week-section { margin-bottom: 16px; }
.cal-week-date { font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 2px; color: var(--text3); text-transform: uppercase; padding: 10px 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.cal-week-entry { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: none; cursor: pointer; margin-bottom: 4px; text-align: left; }
.cal-week-name { font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--text); }
.cal-week-stage { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; }
.cal-empty { color: var(--text3); padding: 32px 16px; text-align: center; }

/* ── Settings ── */
.settings-view { padding: 16px; max-width: 480px; }

/* ── Screen titles ── */
.screen-title { font-family: var(--font-display); font-size: 24px; letter-spacing: 4px; color: var(--text); margin-bottom: 8px; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: calc(80px + var(--safe-bottom)); left: 50%; right: auto;
  max-width: min(92vw, 400px);
  transform: translateX(-50%) translateY(60px);
  background: var(--green); color: #fff;
  padding: 12px 20px; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; text-align: center; z-index: 9000;
  opacity: 0; transition: all 0.3s var(--ease-spring); pointer-events: none;
  text-transform: uppercase; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-preview { background: var(--gold); }
.toast.toast-error { background: var(--red); }
.toast.toast-info { background: var(--blue); }

/* ── Sign-in card ── */
.signin-card {
  position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 24px;
}
.signin-inner {
  background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--gold);
  border-radius: var(--radius); padding: 32px 28px; width: 100%; max-width: 360px; text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.signin-inner h2 { font-family: var(--font-display); font-size: 24px; letter-spacing: 4px; color: var(--text); margin-bottom: 8px; }
.signin-inner p { color: var(--text2); font-size: 14px; line-height: 1.5; }
.signin-inner a { color: var(--gold); }

/* ── Print ── */
@media print {
  .bottom-nav, .detail-topbar, .detail-tabs, .detail-actions-bar,
  .pipeline-header, .topbar, #sidebar-nav, .no-print { display: none !important; }
  .detail-panel { display: block !important; }
  body { background: white; color: black; }
  .kv-label { color: #555; }
  .kv-val { color: #000; }
  .sheet-brand { font-family: serif; font-size: 20px; font-weight: bold; margin-bottom: 16px; }
}
@media not print {
  .sheet-print-header { display: none; }
}

/* ── Sheet panel print header ── */
.sheet-print-header { display: none; }

/* ── Sling / Staff schedule ── */
.sling-filter-bar {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 68px; z-index: 4;
}
.sling-toggle {
  padding: 4px 10px; border-radius: var(--radius-xs); font-family: var(--font-body);
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  border: 1px solid var(--border); background: var(--surface2); color: var(--text2);
  cursor: pointer; transition: all 0.15s var(--ease);
}
.sling-toggle.active { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }
.sling-toggle:disabled { opacity: 0.4; cursor: default; }
.sling-unavail-chip {
  padding: 4px 10px; border-radius: var(--radius-xs); font-family: var(--font-body);
  font-size: 11px; letter-spacing: 1px; background: var(--surface2); color: var(--text3);
  border: 1px solid var(--border); font-style: italic;
}
.cal-shift-bar {
  font-size: 10px; padding: 2px 6px; border-radius: var(--radius-xs);
  border: 1px solid var(--border2); background: transparent; color: var(--text3);
  text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%; font-family: var(--font-mono);
}
.cal-week-shift {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-radius: var(--radius-xs); border: 1px solid var(--border);
  margin-bottom: 3px; font-family: var(--font-mono); font-size: 12px; color: var(--text3);
}

/* Staffing card in event sheet */
.staffing-card {
  margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface2);
}
.staffing-card-title {
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
  letter-spacing: 2px; color: var(--text3); text-transform: uppercase; margin-bottom: 8px;
}
.staffing-flag {
  display: inline-block; padding: 3px 8px; border-radius: var(--radius-xs);
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
  letter-spacing: 1px; margin-bottom: 8px;
}
.staffing-flag--red { background: var(--red-dim); color: var(--red); border: 1px solid rgba(176,28,28,0.3); }
.staffing-flag--orange { background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(181,92,0,0.3); }
.staffing-flag--green { background: var(--green-dim); color: var(--green); border: 1px solid rgba(46,125,50,0.3); }
.staffing-shift-list { display: flex; flex-direction: column; gap: 4px; }
.staffing-shift-item {
  font-family: var(--font-mono); font-size: 11px; color: var(--text2);
  padding: 3px 0; border-top: 1px solid var(--border);
}
.staffing-shift-item:first-child { border-top: none; }
.staffing-none { font-family: var(--font-mono); font-size: 11px; color: var(--text3); font-style: italic; }

/* Warning dot on pipeline cards */
.staffing-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  margin-left: 2px; vertical-align: middle;
}
.staffing-dot--red { background: var(--red); }
.staffing-dot--orange { background: var(--orange); }
.staffing-dot--green { background: var(--green); }

/* ── Responsive ── */
@media (max-width: 1023px) {
  .request-layout { flex-direction: column; }
  #sidebar-content { display: none; }
}

/* fix (review): [hidden] must win over component display rules — hidden sign-in card was blocking all taps */
[hidden] { display: none !important; }
/* fix (review): sidebar nav is desktop-only; mobile uses the bottom nav */
@media (max-width: 1023px) { #sidebar-nav { display: none; } }
/* fix (review): no empty right pane when no booking is open (calendar/activity get full width) */
@media (min-width: 1024px) { #sidebar-content:empty { display: none; } }

/* fix (review): calendar header sticks inside the #main-content scroller, so offset from 0 (52px hid the first week row) */
.cal-nav { top: 0; }
/* fix (review): keep all 7 weekdays on screen; long shift labels truncate instead of widening columns */
.cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-grid > * { min-width: 0; }
.cal-grid .cal-day * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Agenda-list (calendar ≤ 640px) ── */
.cal-agenda-list { padding: 0 12px 80px; }
.cal-agenda-section { margin-bottom: 12px; }
.cal-agenda-day-header {
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
  letter-spacing: 2px; color: var(--text3); text-transform: uppercase;
  padding: 10px 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 8px;
}
.cal-agenda-card {
  display: flex; flex-direction: column; gap: 5px;
  width: 100%; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer; text-align: left;
  margin-bottom: 8px;
  -webkit-tap-highlight-color: rgba(184,134,11,0.2); touch-action: manipulation;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.cal-agenda-card:active { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-glow); }
.cal-agenda-time-guests {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text3);
}
.cal-agenda-name {
  font-family: var(--font-body); font-size: 16px; font-weight: 600;
  color: var(--text); letter-spacing: 0.3px;
}
.cal-agenda-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.cal-agenda-coverage {
  display: inline-block; padding: 3px 8px; border-radius: var(--radius-xs);
  font-family: var(--font-body); font-size: 10px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
}
.cal-agenda-coverage--ok  { background: var(--green-dim); color: var(--green); border: 1px solid rgba(46,125,50,0.3); }
.cal-agenda-coverage--warn { background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(181,92,0,0.3); }
.cal-agenda-coverage--none { background: var(--red-dim); color: var(--red); border: 1px solid rgba(176,28,28,0.3); }
.cal-agenda-conflict {
  display: inline-block; padding: 3px 8px; border-radius: var(--radius-xs);
  font-family: var(--font-body); font-size: 10px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(181,92,0,0.3);
}
.cal-agenda-shift {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-radius: var(--radius-xs); border: 1px solid var(--border);
  margin-bottom: 4px; font-family: var(--font-mono); font-size: 12px; color: var(--text3);
}
.cal-agenda-empty { color: var(--text3); padding: 32px 0; text-align: center; font-size: 14px; }
.cal-agenda-jump-btn {
  display: block; width: 100%; margin-top: 12px; padding: 12px 16px;
  background: var(--gold-dim); border: 1px solid var(--gold); border-radius: var(--radius);
  color: var(--gold); font-family: var(--font-body); font-size: 13px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; cursor: pointer; text-align: center;
  min-height: 44px;
}

/* ── Phone (≤ 640px) layout overrides ── */
@media (max-width: 640px) {
  /* Fix 2: white/light PourOps theme on phone */
  :root {
    --bg: #ffffff;
    --surface: #f6f7f9;
    --surface2: #f0f2f5;
    --surface3: #e8eaee;
    --border: #e5e7eb;
    --border2: #d1d5db;
    --text: #111827;
    --text2: #374151;
    --text3: #9ca3af;
    --radius: 12px;
  }
  body { background-image: none; }

  /* Replace mono/accent event text with Inter on phone */
  .cal-agenda-name,
  .cal-agenda-time-guests,
  .pipeline-card-name,
  .pipeline-card-meta { font-family: var(--font-ui); }

  /* Bold numerals for guests/$ on phone */
  .cal-agenda-time-guests span { font-weight: 600; }
  .pipeline-card-money { font-weight: 700; }

  /* Pipeline: stack columns vertically — no horizontal scroll */
  .pipeline-board { flex-direction: column; overflow-x: hidden; min-height: 0; }
  .pipeline-col { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .pipeline-col:last-child { border-bottom: none; }

  /* Fix 4: filter pills single horizontally-scrollable row */
  .sling-filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    min-height: 44px;
    padding: 0 12px;
    gap: 8px;
    align-items: center;
  }
  .sling-filter-bar::-webkit-scrollbar { display: none; }
  .sling-toggle, .sling-unavail-chip {
    flex-shrink: 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
  }
  .pipeline-filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .pipeline-filter-pills::-webkit-scrollbar { display: none; }
  .filter-pill { flex-shrink: 0; min-height: 44px; display: inline-flex; align-items: center; }

  /* All interactive targets ≥44px tall */
  .btn { min-height: 44px; }
  .detail-tab { min-height: 44px; }
  .cal-nav-btn { width: 44px; height: 44px; min-height: 44px; }

  /* Fix 5: event sheet — sticky header, single column, full-width staffing card */
  .detail-topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); }
  .detail-panels { overflow-y: visible; }
  .staffing-card { width: 100%; margin-top: 12px; margin-left: 0; margin-right: 0; }
  .request-col { min-width: 0; }

  /* Detail sheet: single-column panels */
  .detail-panel { padding: 12px; }
  .request-layout { flex-direction: column; gap: 12px; }
}
