/* ═══════════════════════════════════════════════════════════════
   shared.css — Banchee Business Hub
   Dark theme · All documents · Banchee AI
   ═══════════════════════════════════════════════════════════════ */

/* ── GOOGLE FONTS ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Fraunces:ital,wght@0,300;0,600;1,300&family=DM+Sans:wght@300;400;500&display=swap');

/* ── CSS VARIABLES ────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:        #0f0f0e;
  --surface:   #171714;
  --surface2:  #1e1e1a;
  --surface3:  #242420;

  /* Borders */
  --border:    #2a2a26;
  --border2:   #333330;

  /* Text */
  --text:      #f0ece4;
  --text-muted:#b0aa9e;
  --text-dim:  #7a7670;

  /* Accents */
  --accent:    #d4a843;   /* amber — primary */
  --accent2:   #8fb87a;   /* green — gain / positive */
  --accent3:   #7ab0d4;   /* blue */
  --accent4:   #d47a7a;   /* red — warning / loss */
  --accent5:   #c47ad4;   /* purple */

  /* Semantic aliases */
  --gain:      #8fb87a;
  --loss:      #d47a7a;
  --warn:      #d4a843;
  --info:      #7ab0d4;

  /* Calendar brand colors */
  --cal-photos:  #d4a843;
  --cal-tw:      #8fb87a;
  --cal-tbhc:    #7ab0d4;
  --cal-banchee: #c47ad4;

  /* Typography */
  --font-display: 'Fraunces', serif;
  --font-mono:    'DM Mono', monospace;
  --font-sans:    'DM Sans', sans-serif;

  /* Spacing scale */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;
}

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

/* ── BASE ─────────────────────────────────────────────────────── */
html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
}

/* ── SCROLLBAR ────────────────────────────────────────────────── */
::-webkit-scrollbar        { width: 5px; height: 5px; }
::-webkit-scrollbar-track  { background: var(--bg); }
::-webkit-scrollbar-thumb  { background: var(--border2); border-radius: 2px; }

/* ── DOCUMENT WRAPPER ─────────────────────────────────────────── */
/* Used by standalone docs loaded in iframes */
.doc-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 32px 80px;
}

/* ── PAGE HEADER ──────────────────────────────────────────────── */
.page-header {
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--border);
  padding: 28px 0 20px;
  margin-bottom: 48px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.5px;
}

.page-header h1 em {
  font-style: italic;
  color: var(--accent);
}

.page-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: right;
  line-height: 1.9;
}

/* ── SECTION ──────────────────────────────────────────────────── */
.section {
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text);
}

/* ── TAGS / PILLS ─────────────────────────────────────────────── */
.tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
  display: inline-block;
}

.tag-amber   { background: rgba(212,168,67,0.15);  color: var(--accent);  }
.tag-green   { background: rgba(143,184,122,0.15); color: var(--gain);    }
.tag-blue    { background: rgba(122,176,212,0.15); color: var(--info);    }
.tag-red     { background: rgba(212,122,122,0.15); color: var(--loss);    }
.tag-purple  { background: rgba(196,122,212,0.15); color: var(--accent5); }
.tag-neutral { background: var(--surface2);        color: var(--text-dim);}

/* Legacy pill aliases */
.pill         { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 8px; border-radius: 2px; display: inline-block; }
.pill-honey   { background: rgba(212,168,67,0.15);  color: var(--accent);  }
.pill-jobber  { background: rgba(122,176,212,0.15); color: var(--info);    }
.pill-shared  { background: rgba(143,184,122,0.15); color: var(--gain);    }
.pill-warn    { background: rgba(212,168,67,0.12);  color: var(--warn);    }

/* ── CARDS ────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px 22px;
  position: relative;
}

.card-accent-amber  { border-left: 3px solid var(--accent);  }
.card-accent-green  { border-left: 3px solid var(--gain);    }
.card-accent-blue   { border-left: 3px solid var(--info);    }
.card-accent-purple { border-left: 3px solid var(--accent5); }
.card-accent-red    { border-left: 3px solid var(--loss);    }

.card-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.card-body {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.card-note {
  font-size: 0.72rem;
  color: var(--accent);
  font-style: italic;
  margin-top: 8px;
}

.card-sub {
  font-size: 0.72rem;
  color: var(--info);
  font-family: var(--font-mono);
  margin-top: 6px;
}

/* ── TABLES ───────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.data-table th {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--text-dim);
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
  color: var(--text-muted);
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: var(--surface); }

.data-table .val {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 300;
}

.data-table .val-green { color: var(--gain); }
.data-table .val-red   { color: var(--loss); }
.data-table .val-amber { color: var(--accent); }

/* ── STAT BLOCKS ──────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 40px;
}

.stat-cell {
  background: var(--surface);
  padding: 24px 20px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
  display: block;
}

.stat-value.green  { color: var(--gain);  }
.stat-value.red    { color: var(--loss);  }
.stat-value.blue   { color: var(--info);  }

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

/* ── PRIORITY LIST ────────────────────────────────────────────── */
.priority-list {
  counter-reset: priority;
  list-style: none;
}

.priority-list li {
  counter-increment: priority;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.priority-list li::before {
  content: counter(priority);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  margin-top: 2px;
}

.p-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.p-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── PIPELINE ─────────────────────────────────────────────────── */
.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  margin-bottom: 48px;
  background: var(--border);
}

.stage {
  background: var(--surface);
  padding: 20px 16px;
  position: relative;
}

.stage-num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 4px;
}

.stage-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 10px;
}

.stage-arrow {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: var(--accent);
  clip-path: polygon(0 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0 80%);
  z-index: 2;
}

.stage:last-child .stage-arrow { display: none; }

.stage ul {
  list-style: none;
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.8;
}

/* ── TOOL GRID ────────────────────────────────────────────────── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

/* ── AUTOMATION TABLE ─────────────────────────────────────────── */
.effort {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
}
.effort.low { background: rgba(143,184,122,0.15); color: var(--gain); }
.effort.med { background: rgba(212,168,67,0.15);  color: var(--warn); }
.effort.high{ background: rgba(212,122,122,0.15); color: var(--loss); }

/* ── FOOTER ───────────────────────────────────────────────────── */
.doc-footer {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── COLOR HELPERS ────────────────────────────────────────────── */
.text-accent  { color: var(--accent);  }
.text-green   { color: var(--gain);    }
.text-red     { color: var(--loss);    }
.text-blue    { color: var(--info);    }
.text-muted   { color: var(--text-muted); }
.text-dim     { color: var(--text-dim);   }

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .pipeline { grid-template-columns: 1fr; }
  .stage { border-right: none; border-bottom: 1px solid var(--border); }
  .stage-arrow { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .doc-wrap { padding: 32px 20px 60px; }
}

/* ── GLOBAL FONT SIZE WIDGET ──────────────────────────────── */
.font-size-widget {
  position: fixed;
  bottom: 36px;
  right: 16px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.font-size-widget .fsw-label {
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 2px;
}

.font-size-widget button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
  line-height: 1;
}

.font-size-widget button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.font-size-widget .fsw-value {
  color: var(--text-muted);
  min-width: 32px;
  text-align: center;
  font-size: 11px;
}
