/* ═══════════════════════════════════════════════
   ABORN POWERS PROPOSAL BUILDER — style.css
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=DM+Serif+Display&display=swap');

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

:root {
  --gold:    #E8B800;
  --gold-lt: #FFFBEA;
  --dark:    #1E1E1E;
  --charcoal:#3D3D3D;
  --mid:     #6B6B6B;
  --light:   #F7F7F5;
  --border:  #E2E2DE;
  --white:   #ffffff;
  --red:     #c0392b;
  --page-w:  816px;
  --sidebar-w: 320px;
  --toolbar-h: 48px;
}

body {
  font-family: 'Inter', sans-serif;
  background: #EDEDEA;
  color: var(--dark);
  height: 100vh;
  overflow: hidden;
}

/* ── APP SHELL ── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

/* ── Sidebar Header ── */
.sidebar-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sidebar-logo { height: 24px; }
.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mid);
}

/* ── Dashboard / Editor toggle ── */
.sidebar-mode-tabs {
  display: flex;
  background: var(--light);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}
.mode-tab {
  flex: 1;
  padding: 6px 8px;
  border: none;
  background: none;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--mid);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.mode-tab.active {
  background: var(--white);
  color: var(--dark);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ── Primary sidebar nav tabs (Dashboard / Proposals / Media) ── */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 0 2px;
}
.nav-tab {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mid);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.12s;
  font-family: 'Inter', sans-serif;
  position: relative;
}
.nav-tab:hover {
  background: var(--light);
  color: var(--dark);
}
.nav-tab.active {
  background: var(--gold-lt);
  color: var(--dark);
}
.nav-tab.active svg {
  color: var(--gold);
}
.nav-tab svg {
  flex-shrink: 0;
  color: #ccc;
  transition: color 0.12s;
}
.nav-tab:hover svg { color: var(--mid); }

/* ── Sidebar Body ── */
.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

/* ── Sidebar Footer ── */
.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Buttons ── */
.btn {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.15s;
  letter-spacing: 0.01em;
}
.btn-primary { background: var(--dark); color: var(--white); }
.btn-primary:hover { background: #000; }
.btn-primary.loading { background: #888; cursor: not-allowed; }
.btn-secondary { background: var(--light); color: var(--charcoal); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-gold { background: var(--gold); color: var(--dark); }
.btn-gold:hover { background: #d4a700; }
.btn-danger { background: #fdecea; color: var(--red); border: 1px solid #f5c6c2; }
.btn-danger:hover { background: #fbd7d4; }
.btn-sm {
  padding: 6px 10px;
  font-size: 11.5px;
  border-radius: 5px;
  width: auto;
}

/* ── Form Elements ── */
.form-section { margin-bottom: 24px; }
.form-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mid);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}
.field-group { margin-bottom: 12px; }
label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 3px;
}
input[type="text"], input[type="email"], input[type="tel"],
input[type="number"], textarea, select {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  color: var(--dark);
  background: var(--light);
  transition: border-color 0.15s;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--gold);
  background: var(--white);
}
textarea { resize: vertical; min-height: 60px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ── Template Selector ── */
.template-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.tpl-btn {
  padding: 7px 5px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  background: var(--light);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--mid);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  line-height: 1.3;
}
.tpl-btn:hover { border-color: var(--gold); color: var(--dark); background: var(--gold-lt); }
.tpl-btn.active { border-color: var(--gold); background: var(--gold); color: var(--dark); }
.tpl-btn .tpl-icon { font-size: 13px; display: block; margin-bottom: 2px; }

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: var(--dark);
  font-size: 9px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 6px;
  letter-spacing: 0.03em;
}

/* ══════════════════════════════════════
   DASHBOARD PANEL
══════════════════════════════════════ */
.dashboard-panel { display: flex; flex-direction: column; height: 100%; }
.dashboard-search {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.dashboard-search input {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 12px 7px 32px;
  font-size: 12px;
  width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
}
.dashboard-search input:focus { border-color: var(--gold); background-color: var(--white); }

.dashboard-list { flex: 1; overflow-y: auto; padding: 12px 0; }

.template-group { margin-bottom: 4px; }
.template-group-header {
  padding: 6px 20px 4px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #bbb;
  display: flex;
  align-items: center;
  gap: 6px;
}
.template-group-header .tg-count {
  background: var(--border);
  color: var(--mid);
  border-radius: 8px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
}

.proposal-item {
  display: flex;
  align-items: center;
  padding: 9px 20px;
  cursor: pointer;
  transition: background 0.1s;
  gap: 10px;
  position: relative;
}
.proposal-item:hover { background: var(--light); }
.proposal-item.active { background: var(--gold-lt); }

.proposal-item-icon {
  width: 32px;
  height: 32px;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.proposal-item-info { flex: 1; min-width: 0; }
.proposal-item-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proposal-item-meta {
  font-size: 10.5px;
  color: var(--mid);
  margin-top: 1px;
}
.proposal-item-status {
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.status-draft    { background: #F0F0EE; color: #888; }
.status-sent     { background: #E8F4FD; color: #2980b9; }
.status-won      { background: #E8F8E8; color: #27ae60; }
.status-lost     { background: #FDECEA; color: var(--red); }

.proposal-item-delete {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  background: none;
  border: none;
  color: #bbb;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
}
.proposal-item:hover .proposal-item-delete { opacity: 1; }
.proposal-item-delete:hover { color: var(--red); background: #fdecea; }

.dashboard-empty {
  padding: 32px 20px;
  text-align: center;
  color: #bbb;
}
.dashboard-empty svg { margin-bottom: 12px; }
.dashboard-empty p { font-size: 13px; line-height: 1.6; }

.dashboard-new-btn {
  margin: 8px 20px 0;
}

/* ── Status selector in editor ── */
.status-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.status-chip {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--light);
  color: var(--mid);
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-chip:hover { border-color: var(--gold); }
.status-chip.active-draft    { background: #F0F0EE; border-color: #ccc; color: #666; }
.status-chip.active-sent     { background: #E8F4FD; border-color: #2980b9; color: #2980b9; }
.status-chip.active-won      { background: #E8F8E8; border-color: #27ae60; color: #27ae60; }
.status-chip.active-lost     { background: #FDECEA; border-color: var(--red); color: var(--red); }

/* ══════════════════════════════════════
   TOP TOOLBAR
══════════════════════════════════════ */
.top-toolbar {
  height: var(--toolbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 8px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 20;
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

.toolbar-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--charcoal);
  transition: all 0.12s;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  position: relative;
}
.toolbar-btn:hover { background: var(--light); color: var(--dark); }
.toolbar-btn.active { background: var(--gold-lt); color: var(--dark); }

.toolbar-select {
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--light);
  font-size: 11.5px;
  font-family: 'Inter', sans-serif;
  color: var(--charcoal);
  cursor: pointer;
  outline: none;
}
.toolbar-select:focus { border-color: var(--gold); }

.toolbar-proposal-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.toolbar-autosave {
  font-size: 11px;
  color: #bbb;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.toolbar-autosave.saving { color: var(--gold); }
.toolbar-autosave.saved  { color: #27ae60; }

/* ══════════════════════════════════════
   MAIN CANVAS
══════════════════════════════════════ */
.canvas-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.canvas-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: #EDEDEA;
}

/* ══════════════════════════════════════
   PROPOSAL PAGES
══════════════════════════════════════ */
.proposal-page {
  width: var(--page-w);
  min-height: 1056px;
  background: var(--white);
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
  position: relative;
  overflow: hidden;
  padding: 64px 72px;
  flex-shrink: 0;
  margin-bottom: 12px;
}

/* ── Page Header ── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 36px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.page-header-logo { height: 30px; }
.page-header-meta {
  text-align: right;
  font-size: 11px;
  color: var(--mid);
  line-height: 1.6;
}
.page-header-meta strong { color: var(--dark); font-weight: 600; }

/* ── Page Footer ── */
.page-footer {
  position: absolute;
  bottom: 24px;
  left: 72px;
  right: 72px;
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: #ccc;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

/* ── Cover Page ── */
.page-cover { padding: 64px 72px 0; display: flex; flex-direction: column; justify-content: space-between; }
.cover-logo { height: 48px; }
.cover-main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 60px 0 36px; }
.cover-gold-bar { width: 44px; height: 4px; background: var(--gold); margin-bottom: 18px; }
.cover-eyebrow {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mid); margin-bottom: 10px;
}
.cover-title {
  font-family: 'DM Serif Display', serif;
  font-size: 54px; line-height: 1.05; color: var(--dark);
  margin-bottom: 24px; font-weight: 400;
}
.cover-prepared { font-size: 12px; color: var(--mid); }
.cover-prepared strong { color: var(--dark); font-weight: 600; display: block; font-size: 13px; }
.cover-footer {
  background: var(--dark); margin: 0 -72px;
  padding: 32px 72px; display: flex;
  justify-content: space-between; align-items: flex-end;
}
.cover-footer-label { font-size: 9.5px; color: rgba(255,255,255,0.45); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 3px; }
.cover-footer-name  { font-size: 12.5px; font-weight: 700; color: var(--white); }
.cover-footer-title { font-size: 11px; color: rgba(255,255,255,0.65); }

/* ── Section Labels ── */
.section-eyebrow { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); margin-bottom: 6px; }
.section-heading  { font-family: 'DM Serif Display', serif; font-size: 36px; color: var(--dark); font-weight: 400; margin-bottom: 6px; }

/* ── Who We Are ── */
.who-we-are-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.stats-block { background: var(--dark); padding: 32px 28px; border-radius: 2px; }
.stat-item { border-bottom: 1px solid rgba(255,255,255,0.1); padding: 14px 0; }
.stat-item:first-child { padding-top: 0; }
.stat-item:last-child  { border-bottom: none; padding-bottom: 0; }
.stat-num   { font-family: 'DM Serif Display', serif; font-size: 40px; color: var(--white); line-height: 1; margin-bottom: 2px; }
.stat-label { font-size: 11px; color: rgba(255,255,255,0.5); }
.company-photo-strip { display: grid; gap: 8px; margin-top: 18px; }
.company-photo-div   { width: 100%; height: 110px; background-size: cover; background-position: center; border-radius: 2px; }

/* ── Services ── */
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.service-card { padding: 18px 0; border-top: 2px solid var(--gold); }
.service-card-title { font-size: 11.5px; font-weight: 700; color: var(--dark); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }

/* ── Difference ── */
.diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.diff-card { background: var(--light); padding: 18px 16px; border-radius: 2px; }
.diff-card-title { font-size: 11.5px; font-weight: 700; color: var(--dark); margin-bottom: 6px; display: flex; align-items: center; gap: 7px; }
.diff-card-title::before { content: ''; display: inline-block; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; flex-shrink: 0; }

/* ── Investment ── */
.fee-highlight { background: var(--dark); padding: 24px 28px; border-radius: 2px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.fee-highlight-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: rgba(255,255,255,0.5); margin-bottom: 3px; }
.fee-highlight-value { font-family: 'DM Serif Display', serif; font-size: 32px; color: var(--white); }
.fee-detail { font-size: 12px; color: rgba(255,255,255,0.6); }
.included-section h3 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dark); margin-bottom: 12px; }
.included-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.included-item { font-size: 11.5px; color: var(--charcoal); padding: 4px 0 4px 13px; position: relative; border-bottom: 1px solid var(--border); line-height: 1.4; }
.included-item::before { content: '✓'; position: absolute; left: 0; color: var(--gold); font-size: 9.5px; font-weight: 700; top: 5px; }
.transition-section { margin-top: 24px; padding: 18px 20px; border-left: 3px solid var(--gold); background: var(--light); }
.transition-section h3 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dark); margin-bottom: 8px; }
.transition-section li { font-size: 11.5px; color: var(--charcoal); padding: 3px 0 3px 14px; position: relative; list-style: none; }
.transition-section li::before { content: '→'; position: absolute; left: 0; color: var(--gold); font-size: 10px; }

/* ── Extra Services ── */
.extras-table, .project-mgmt-table { width: 100%; border-collapse: collapse; font-size: 11.5px; margin-bottom: 20px; }
.extras-table thead tr, .project-mgmt-table thead tr { background: var(--dark); color: var(--white); }
.extras-table th, .project-mgmt-table th { padding: 9px 12px; text-align: left; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.extras-table td, .project-mgmt-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); color: var(--charcoal); }
.extras-table tbody tr:nth-child(even) td, .project-mgmt-table tbody tr:nth-child(even) td { background: var(--light); }
.section-subtitle { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mid); margin: 18px 0 8px; }

/* ── Thank You ── */
.thankyou-page { display: flex; flex-direction: column; justify-content: space-between; }
.thankyou-main { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.thankyou-title { font-family: 'DM Serif Display', serif; font-size: 60px; color: var(--dark); font-weight: 400; line-height: 1; margin-bottom: 24px; }
.thankyou-sig-row { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-top: 4px; }
.thankyou-headshot { width: 72px; height: 72px; border-radius: 50%; background-size: cover; background-position: center top; margin-bottom: 7px; border: 2px solid var(--border); flex-shrink: 0; }
.thankyou-sig-name { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--dark); font-weight: 400; }
.thankyou-sig-underline { width: 120px; height: 2px; background: var(--gold); margin: 6px 0 12px; }
.contact-icon { width: 13px; height: 13px; flex-shrink: 0; }
.thankyou-sig-contact { font-size: 11.5px; color: var(--mid); line-height: 2; margin-top: 20px; }
.thankyou-sig-contact span { display: flex; align-items: center; gap: 7px; }

/* ── Photo Page ── */
.photo-cover-1  { width: 100%; height: 500px; background-size: cover; background-position: center; border-radius: 2px; }
.photo-page-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.photo-cover-2  { width: 100%; height: 320px; background-size: cover; background-position: center; border-radius: 2px; }
.photo-page-grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.photo-cover-3-main { height: 320px; background-size: cover; background-position: center; border-radius: 2px; }
.photo-page-grid-3-side { display: flex; flex-direction: column; gap: 12px; }
.photo-cover-3-side { width: 100%; height: 154px; background-size: cover; background-position: center; border-radius: 2px; }
.photo-page-caption { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-end; }
.photo-page-caption-title { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--dark); font-weight: 400; margin-bottom: 3px; }
.photo-page-caption-sub { font-size: 11.5px; color: var(--mid); }

/* ══════════════════════════════════════
   QUILL EDITOR REGIONS
══════════════════════════════════════ */
.ql-region {
  position: relative;
  border-radius: 3px;
  transition: outline 0.15s;
  outline: 2px solid transparent;
  outline-offset: 3px;
}
.ql-region:hover { outline-color: rgba(232, 184, 0, 0.3); }
.ql-region.ql-focused { outline-color: var(--gold); }

/* Make Quill feel like the document */
.ql-region .ql-editor {
  padding: 0;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.8;
  color: var(--charcoal);
  min-height: unset;
}
.ql-region .ql-editor:focus { outline: none; }
.ql-region .ql-editor p { margin-bottom: 12px; }
.ql-region .ql-editor p:last-child { margin-bottom: 0; }
.ql-region .ql-editor ul, .ql-region .ql-editor ol { padding-left: 18px; }
.ql-region .ql-editor li { margin-bottom: 4px; font-size: 12.5px; color: var(--charcoal); }
.ql-region .ql-editor strong { font-weight: 700; color: var(--dark); }
.ql-region .ql-editor em { font-style: italic; }
.ql-region .ql-editor u { text-decoration: underline; }

/* Service card list items via Quill */
.service-ql .ql-editor li { padding: 2px 0 2px 14px; position: relative; list-style: none; }
.service-ql .ql-editor li::before { content: '—'; position: absolute; left: 0; color: var(--gold); font-weight: 700; font-size: 9.5px; top: 4px; }
.service-ql .ql-editor ul { padding-left: 0; list-style: none; }

/* Quill bubble theme overrides */
.ql-bubble .ql-tooltip { z-index: 100; border-radius: 6px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.ql-bubble .ql-tooltip .ql-toolbar { padding: 6px 8px; gap: 2px; }
.ql-bubble.ql-container { border: none; }

/* Hide Quill container border */
.ql-container.ql-bubble { border: none; font-family: 'Inter', sans-serif; }
.ql-container.ql-snow  { border: none; font-family: 'Inter', sans-serif; }
.ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 6px 8px;
  background: var(--white);
}

/* Inline editable table cells */
td[contenteditable="true"], td[contenteditable="true"]:focus {
  outline: none;
  background: rgba(232,184,0,0.06);
}
td[contenteditable="true"]:focus { background: rgba(232,184,0,0.12); }

/* ══════════════════════════════════════
   IMAGE UPLOAD WIDGETS (Sidebar)
══════════════════════════════════════ */
.img-upload-zone {
  border: 2px dashed var(--border); border-radius: 6px;
  padding: 12px 10px; text-align: center; cursor: pointer;
  transition: all 0.15s; background: var(--light); margin-bottom: 8px;
}
.img-upload-zone:hover, .img-upload-zone.drag-over { border-color: var(--gold); background: var(--gold-lt); }
.img-upload-zone .drop-main { font-size: 11.5px; font-weight: 600; color: var(--charcoal); margin-top: 4px; }
.img-upload-zone .drop-sub  { font-size: 10.5px; color: var(--mid); margin-top: 1px; }

.img-thumb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 6px; }
.img-thumb-item { position: relative; border-radius: 4px; overflow: hidden; aspect-ratio: 4/3; background: var(--border); }
.img-thumb-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-thumb-remove {
  position: absolute; top: 3px; right: 3px;
  width: 16px; height: 16px; background: rgba(0,0,0,0.6);
  border: none; border-radius: 50%; color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s; padding: 0;
}
.img-thumb-item:hover .img-thumb-remove { opacity: 1; }

.headshot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.headshot-slot {
  border: 1.5px dashed var(--border); border-radius: 5px; overflow: hidden;
  aspect-ratio: 3/4; background: var(--light);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; cursor: pointer;
  transition: border-color 0.15s; position: relative; text-align: center; padding: 8px;
}
.headshot-slot:hover { border-color: var(--gold); }
.headshot-slot img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.headshot-slot-label { font-size: 10px; font-weight: 600; color: var(--mid); margin-top: 5px; line-height: 1.3; }
.headshot-slot-sub   { font-size: 9.5px; color: #bbb; margin-top: 1px; }
.headshot-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.55); color: white;
  font-size: 9px; font-weight: 600; padding: 3px 5px;
  display: flex; justify-content: space-between; align-items: center;
}
.headshot-remove-btn { background: none; border: none; color: rgba(255,255,255,0.7); cursor: pointer; padding: 0; font-size: 12px; }
.headshot-remove-btn:hover { color: white; }

/* ══════════════════════════════════════
   DOCUMENT LIBRARY (Sidebar)
══════════════════════════════════════ */
.doc-list { display: flex; flex-direction: column; gap: 5px; }
.doc-item {
  display: flex; align-items: center; gap: 7px;
  background: var(--light); border: 1px solid var(--border);
  border-radius: 5px; padding: 7px 9px; cursor: grab;
  transition: box-shadow 0.15s, border-color 0.15s; user-select: none;
}
.doc-item:active { cursor: grabbing; }
.doc-item.dragging { opacity: 0.4; }
.doc-item.drag-target { border-color: var(--gold); box-shadow: 0 0 0 2px #E8B80033; }
.doc-drag-handle { color: #ccc; cursor: grab; flex-shrink: 0; }
.doc-item-thumb-img { width: 28px; height: 36px; object-fit: cover; border-radius: 3px; display: block; flex-shrink: 0; }
@keyframes pulse { 0%,100%{opacity:.4} 50%{opacity:1} }
.doc-item-thumb-spinner {
  width: 28px; height: 36px; background: #e8e8e4; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 8px; color: #bbb; font-weight: 600;
  animation: pulse 1.4s ease-in-out infinite;
}
.doc-item-info { flex: 1; min-width: 0; }
.doc-item-name { font-size: 11px; font-weight: 500; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-item-meta { font-size: 10px; color: var(--mid); margin-top: 1px; }
.doc-item-actions { display: flex; gap: 3px; flex-shrink: 0; }
.doc-btn { width: 22px; height: 22px; border: none; background: none; border-radius: 3px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #aaa; transition: all 0.15s; padding: 0; }
.doc-btn:hover { background: var(--border); color: var(--dark); }
.doc-btn.remove:hover { background: #fdecea; color: var(--red); }
.doc-empty { font-size: 11px; color: #bbb; text-align: center; padding: 8px 0; font-style: italic; }

/* ══════════════════════════════════════
   ATTACHMENT PREVIEWS (Canvas)
══════════════════════════════════════ */
.attach-preview-page {
  width: var(--page-w); background: var(--white);
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
  position: relative; overflow: hidden; flex-shrink: 0; margin-bottom: 12px;
}
.attach-preview-page img { width: 100%; display: block; }
.attach-page-label {
  position: absolute; top: 0; left: 0; right: 0;
  background: var(--dark); color: rgba(255,255,255,0.7);
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 4px 10px;
  display: flex; justify-content: space-between; z-index: 2;
}
.attach-section-divider {
  width: var(--page-w); display: flex; align-items: center;
  gap: 10px; padding: 4px 0 2px; flex-shrink: 0;
}
.attach-section-divider-line { flex: 1; height: 1px; background: var(--border); }
.attach-section-divider-label { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #bbb; white-space: nowrap; }

/* ══════════════════════════════════════
   MODALS
══════════════════════════════════════ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white);
  border-radius: 10px;
  padding: 28px 28px 24px;
  width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  transform: scale(0.96);
  transition: transform 0.2s;
}
.modal-backdrop.open .modal { transform: scale(1); }
.modal h2 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.modal p  { font-size: 13px; color: var(--mid); margin-bottom: 20px; line-height: 1.6; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
.modal-actions .btn { width: auto; }

/* ══════════════════════════════════════
   MISC
══════════════════════════════════════ */
.hidden { display: none !important; }

/* Tooltip */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--dark); color: white;
  font-size: 10px; font-weight: 500; padding: 4px 8px; border-radius: 4px;
  white-space: nowrap; pointer-events: none; z-index: 50;
}
