/* ═══════════════════════════════════════════════════════
   WP CRM — Frontend Styles (scoped to .wcrm-fe)
   ═══════════════════════════════════════════════════════ */

:root {
  --wcrm-fe-primary:    #4f46e5;
  --wcrm-fe-primary-dk: #3730a3;
  --wcrm-fe-success:    #16a34a;
  --wcrm-fe-danger:     #dc2626;
  --wcrm-fe-warning:    #d97706;
  --wcrm-fe-border:     #e5e7eb;
  --wcrm-fe-text:       #111827;
  --wcrm-fe-muted:      #6b7280;
  --wcrm-fe-bg:         #f9fafb;
  --wcrm-fe-surface:    #ffffff;
  --wcrm-fe-radius:     8px;
  --wcrm-fe-shadow:     0 1px 3px rgba(0,0,0,.08);
}

.wcrm-fe, .wcrm-fe * { box-sizing: border-box; }
.wcrm-fe { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--wcrm-fe-text); font-size: 14px; line-height: 1.5; }

/* ── Portal Layout ────────────────────────────────────── */
.wcrm-fe-portal { display: grid; grid-template-columns: 200px 1fr; min-height: 80vh; background: var(--wcrm-fe-bg); border-radius: var(--wcrm-fe-radius); overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,.08); }

.wcrm-fe-sidenav { background: #1e1b4b; padding: 0; display: flex; flex-direction: column; }
.wcrm-fe-brand   { padding: 20px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-icon { font-size: 22px; }
.brand-name { font-weight: 700; color: #fff; font-size: 16px; }

.wcrm-fe-nav-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: rgba(255,255,255,.7); text-decoration: none; transition: background .15s, color .15s; }
.wcrm-fe-nav-item:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.wcrm-fe-nav-item.active { background: var(--wcrm-fe-primary); color: #fff; }
.nav-icon  { font-size: 16px; width: 20px; text-align: center; }
.nav-label { font-size: 13px; font-weight: 500; }

.wcrm-fe-main { padding: 24px; overflow: auto; }

/* ── Section ──────────────────────────────────────────── */
.wcrm-fe-section { }
.wcrm-fe-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.wcrm-fe-section-header h2 { font-size: 20px; font-weight: 700; margin: 0; color: var(--wcrm-fe-text); }
.wcrm-fe-count { background: var(--wcrm-fe-primary); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 20px; margin-left: 8px; font-weight: 600; }
.wcrm-fe-date  { font-size: 13px; color: var(--wcrm-fe-muted); }
.wcrm-fe-back  { font-size: 13px; color: var(--wcrm-fe-primary); text-decoration: none; display: block; margin-bottom: 4px; }
.wcrm-fe-back:hover { text-decoration: underline; }

/* ── KPI Grid ─────────────────────────────────────────── */
.wcrm-fe-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 12px; margin-bottom: 20px; }
.wcrm-fe-kpi { background: var(--wcrm-fe-surface); border: 1px solid var(--wcrm-fe-border); border-radius: var(--wcrm-fe-radius); padding: 16px; box-shadow: var(--wcrm-fe-shadow); border-top: 3px solid var(--kpi-color, var(--wcrm-fe-primary)); }
.wcrm-fe-kpi .kpi-icon  { font-size: 20px; margin-bottom: 6px; }
.wcrm-fe-kpi .kpi-value { font-size: 22px; font-weight: 700; line-height: 1; }
.wcrm-fe-kpi .kpi-label { font-size: 11px; color: var(--wcrm-fe-muted); margin-top: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: .3px; }

/* ── Card ─────────────────────────────────────────────── */
.wcrm-fe-card { background: var(--wcrm-fe-surface); border: 1px solid var(--wcrm-fe-border); border-radius: var(--wcrm-fe-radius); padding: 16px; box-shadow: var(--wcrm-fe-shadow); margin-bottom: 12px; }
.wcrm-fe-card--grow { flex: 1; }
.wcrm-fe-card-title  { font-size: 13px; font-weight: 600; margin-bottom: 12px; color: var(--wcrm-fe-text); }
.wcrm-fe-card-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 13px; font-weight: 600; }

.wcrm-fe-row { display: grid; grid-template-columns: 1fr 280px 280px; gap: 16px; align-items: start; }
.wcrm-fe-notes { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--wcrm-fe-border); font-size: 13px; }

/* ── Pipeline rows ────────────────────────────────────── */
.wcrm-fe-pipeline-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--wcrm-fe-border); }
.wcrm-fe-pipeline-row:last-child { border-bottom: none; }
.pipe-dot   { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.pipe-label { flex: 1; font-size: 13px; font-weight: 500; }
.pipe-count { font-size: 12px; color: var(--wcrm-fe-muted); min-width: 50px; }
.pipe-value { font-weight: 600; font-size: 13px; min-width: 80px; text-align: right; }

/* ── Task rows ────────────────────────────────────────── */
.wcrm-fe-task-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--wcrm-fe-border); }
.wcrm-fe-task-row:last-child { border-bottom: none; }
.wcrm-fe-task-row.done .task-info strong { text-decoration: line-through; color: var(--wcrm-fe-muted); }
.wcrm-fe-task-row.overdue { background: #fff5f5; margin: 0 -16px; padding: 8px 16px; }
.task-pri { width: 6px; height: 30px; border-radius: 3px; flex-shrink: 0; }
.pri-high   { background: var(--wcrm-fe-danger); }
.pri-medium { background: var(--wcrm-fe-warning); }
.pri-low    { background: #9ca3af; }
.task-info  { flex: 1; min-width: 0; }
.task-info strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-info small  { color: var(--wcrm-fe-muted); font-size: 11px; }

/* ── Activity ─────────────────────────────────────────── */
.wcrm-fe-activity-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--wcrm-fe-border); }
.wcrm-fe-activity-row:last-child { border-bottom: none; }
.act-icon { font-size: 16px; flex-shrink: 0; margin-top: 2px; }
.act-info  { flex: 1; }
.act-info strong { display: block; font-size: 13px; }
.act-info small  { color: var(--wcrm-fe-muted); font-size: 11px; }

.wcrm-fe-timeline    { list-style: none; margin: 0; padding: 0; }
.wcrm-fe-tl-item     { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--wcrm-fe-border); }
.wcrm-fe-tl-item:last-child { border-bottom: none; }
.tl-dot  { width: 32px; height: 32px; border-radius: 50%; background: #f3f4f6; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.tl-body { flex: 1; }
.tl-body strong { font-size: 13px; font-weight: 600; }
.tl-body p       { margin: 4px 0 0; font-size: 12px; color: #374151; }
.tl-body small   { display: block; margin-top: 4px; color: var(--wcrm-fe-muted); font-size: 11px; }

/* ── Toolbar ──────────────────────────────────────────── */
.wcrm-fe-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.wcrm-fe-search  { border: 1px solid var(--wcrm-fe-border); border-radius: 6px; padding: 7px 12px; font-size: 13px; outline: none; min-width: 200px; }
.wcrm-fe-select  { border: 1px solid var(--wcrm-fe-border); border-radius: 6px; padding: 7px 10px; font-size: 13px; outline: none; background: var(--wcrm-fe-surface); }
.wcrm-fe-search:focus, .wcrm-fe-select:focus { border-color: var(--wcrm-fe-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.wcrm-fe-inline-select { border: 1px solid transparent; border-radius: 4px; font-size: 12px; padding: 2px 6px; background: #f9fafb; cursor: pointer; }
.wcrm-fe-inline-select:hover { border-color: var(--wcrm-fe-border); }

/* ── Buttons ──────────────────────────────────────────── */
.wcrm-fe-btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid var(--wcrm-fe-border); background: var(--wcrm-fe-surface); color: var(--wcrm-fe-text); text-decoration: none; transition: background .15s; white-space: nowrap; }
.wcrm-fe-btn:hover { background: #f3f4f6; text-decoration: none; }
.wcrm-fe-btn--primary { background: var(--wcrm-fe-primary); border-color: var(--wcrm-fe-primary); color: #fff; }
.wcrm-fe-btn--primary:hover { background: var(--wcrm-fe-primary-dk); border-color: var(--wcrm-fe-primary-dk); color: #fff; }
.wcrm-fe-btn--green { background: var(--wcrm-fe-success); border-color: var(--wcrm-fe-success); color: #fff; }
.wcrm-fe-btn--green:hover { background: #15803d; border-color: #15803d; color: #fff; }
.wcrm-fe-btn--red   { background: var(--wcrm-fe-danger); border-color: var(--wcrm-fe-danger); color: #fff; }
.wcrm-fe-btn--red:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.wcrm-fe-btn--sm  { padding: 4px 10px; font-size: 12px; }
.wcrm-fe-icon-btn { background: none; border: none; cursor: pointer; padding: 4px 6px; font-size: 15px; border-radius: 4px; }
.wcrm-fe-icon-btn:hover { background: #f3f4f6; }
.wcrm-fe-btn-sm   { padding: 4px 10px; font-size: 12px; border-radius: 5px; cursor: pointer; border: 1px solid var(--wcrm-fe-border); background: var(--wcrm-fe-surface); }

/* ── Table ────────────────────────────────────────────── */
.wcrm-fe-table-wrap { padding: 0; overflow-x: auto; }
.wcrm-fe-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wcrm-fe-table th { text-align: left; padding: 9px 14px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--wcrm-fe-muted); border-bottom: 2px solid var(--wcrm-fe-border); background: #fafafa; }
.wcrm-fe-table td { padding: 10px 14px; border-bottom: 1px solid var(--wcrm-fe-border); vertical-align: middle; }
.wcrm-fe-table tr:last-child td { border-bottom: none; }
.wcrm-fe-table tr:hover td { background: #f9fafb; }
.wcrm-fe-row--muted td { opacity: .5; }
.wcrm-fe-actions { white-space: nowrap; }
.wcrm-fe-empty  { text-align: center; color: var(--wcrm-fe-muted); padding: 24px; font-style: italic; }
.wcrm-fe-muted  { color: var(--wcrm-fe-muted); font-size: 12px; }
.wcrm-fe-highlight { font-size: 20px; font-weight: 700; color: var(--wcrm-fe-primary); }
.wcrm-fe-danger    { color: var(--wcrm-fe-danger); }

/* ── Badges ───────────────────────────────────────────── */
.wcrm-fe-badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
.wcrm-fe-badge--blue   { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.wcrm-fe-badge--green  { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.wcrm-fe-badge--red    { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.wcrm-fe-badge--orange { background: #ffedd5; color: #c2410c; border-color: #fed7aa; }
.wcrm-fe-badge--purple { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.wcrm-fe-badge--indigo { background: #e0e7ff; color: #4338ca; border-color: #c7d2fe; }
.wcrm-fe-badge--amber  { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.wcrm-fe-badge--gray   { background: #f3f4f6; color: #374151; border-color: #e5e7eb; }

/* ── Funnel bar ───────────────────────────────────────── */
.wcrm-fe-funnel { display: flex; border: 1px solid var(--wcrm-fe-border); border-radius: var(--wcrm-fe-radius); overflow: hidden; margin-bottom: 14px; background: var(--wcrm-fe-surface); }
.wcrm-fe-funnel-step { flex: 1; text-align: center; padding: 10px 6px; text-decoration: none; color: var(--wcrm-fe-text); border-right: 1px solid var(--wcrm-fe-border); transition: background .15s; font-size: 12px; }
.wcrm-fe-funnel-step:last-child { border-right: none; }
.wcrm-fe-funnel-step strong { display: block; font-size: 18px; }
.wcrm-fe-funnel-step:hover, .wcrm-fe-funnel-step.active { background: var(--wcrm-fe-primary); color: #fff; text-decoration: none; }

/* ── Kanban ───────────────────────────────────────────── */
.wcrm-fe-kanban { display: flex; gap: 14px; overflow-x: auto; align-items: flex-start; padding-bottom: 20px; min-height: 50vh; }
.wcrm-fe-kanban-col { background: #f3f4f6; border-radius: var(--wcrm-fe-radius); min-width: 240px; max-width: 280px; flex-shrink: 0; }
.wcrm-fe-kanban-head { border-top: 3px solid #ccc; border-radius: var(--wcrm-fe-radius) var(--wcrm-fe-radius) 0 0; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; background: var(--wcrm-fe-surface); font-size: 13px; }
.wcrm-fe-kanban-head span:first-child { font-weight: 600; }
.wcrm-fe-kanban-head span:last-child  { font-size: 11px; color: var(--wcrm-fe-muted); }
.wcrm-fe-kanban-cards { padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 80px; }
.wcrm-fe-kcard { background: var(--wcrm-fe-surface); border-radius: 6px; border: 1px solid var(--wcrm-fe-border); padding: 12px; cursor: grab; box-shadow: var(--wcrm-fe-shadow); transition: box-shadow .15s; }
.wcrm-fe-kcard:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.wcrm-fe-kcard.dragging { opacity: .6; }
.wcrm-fe-kanban-col.drag-over { outline: 2px dashed var(--wcrm-fe-primary); }
.kcard-title a { font-size: 13px; font-weight: 600; color: var(--wcrm-fe-text); text-decoration: none; }
.kcard-title a:hover { color: var(--wcrm-fe-primary); }
.kcard-meta   { font-size: 11px; color: var(--wcrm-fe-muted); margin-top: 4px; }
.kcard-foot   { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.kcard-value  { font-size: 13px; font-weight: 700; }
.kcard-date   { font-size: 11px; color: var(--wcrm-fe-muted); }
.kcard-date.overdue { color: var(--wcrm-fe-danger); font-weight: 600; }
.kcard-date.soon    { color: var(--wcrm-fe-warning); font-weight: 600; }

/* ── View Toggle ──────────────────────────────────────── */
.wcrm-fe-view-toggle { display: flex; border: 1px solid var(--wcrm-fe-border); border-radius: 6px; overflow: hidden; }
.wcrm-fe-view-toggle a { padding: 6px 14px; font-size: 12px; color: var(--wcrm-fe-muted); text-decoration: none; background: var(--wcrm-fe-surface); }
.wcrm-fe-view-toggle a.active { background: var(--wcrm-fe-primary); color: #fff; }

/* ── Stage Bar ────────────────────────────────────────── */
.wcrm-fe-stage-bar { display: flex; gap: 4px; margin-bottom: 16px; }
.wcrm-fe-stage-step { flex: 1; text-align: center; padding: 6px 8px; font-size: 12px; font-weight: 500; border-radius: 4px; cursor: pointer; border: 1px solid transparent; background: #f3f4f6; color: var(--wcrm-fe-muted); transition: all .15s; }
.wcrm-fe-stage-step.current { background: var(--sc); color: #fff; border-color: var(--sc); }
.wcrm-fe-stage-step.past    { background: var(--sc); color: #fff; opacity: .4; }

/* ── Detail Layout ────────────────────────────────────── */
.wcrm-fe-detail-layout { display: grid; grid-template-columns: 1fr 280px; gap: 16px; align-items: start; }
.wcrm-fe-detail-meta   { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 16px; }
.wcrm-fe-detail-meta label { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--wcrm-fe-muted); display: block; margin-bottom: 2px; }

/* ── Reports Bars ─────────────────────────────────────── */
.wcrm-fe-bar-row   { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar-label         { min-width: 100px; font-size: 12px; flex-shrink: 0; text-align: right; }
.wcrm-fe-bar-track { flex: 1; background: #f3f4f6; border-radius: 4px; height: 10px; overflow: hidden; }
.wcrm-fe-bar-fill  { height: 100%; border-radius: 4px; transition: width .4s ease; }
.bar-val           { min-width: 70px; font-size: 12px; font-weight: 600; }

.wcrm-fe-win-loss { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.wl-side span   { display: block; font-size: 22px; font-weight: 700; text-align: center; }
.wl-side small  { font-size: 11px; color: var(--wcrm-fe-muted); }
.wl-bar         { flex: 1; height: 16px; border-radius: 8px; overflow: hidden; display: flex; }

/* ── Pagination ───────────────────────────────────────── */
.wcrm-fe-pagination { display: flex; gap: 6px; margin-top: 16px; justify-content: center; flex-wrap: wrap; }
.wcrm-fe-page-btn   { min-width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--wcrm-fe-border); border-radius: 6px; font-size: 13px; color: var(--wcrm-fe-text); text-decoration: none; background: var(--wcrm-fe-surface); }
.wcrm-fe-page-btn.active  { background: var(--wcrm-fe-primary); border-color: var(--wcrm-fe-primary); color: #fff; }

/* ── Notices ──────────────────────────────────────────── */
.wcrm-fe-notice { padding: 14px 18px; border-radius: var(--wcrm-fe-radius); margin-bottom: 16px; font-size: 14px; }
.wcrm-fe-notice--warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.wcrm-fe-notice--info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.wcrm-fe-empty-state  { text-align: center; padding: 48px 24px; color: var(--wcrm-fe-muted); }
.wcrm-fe-empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }

/* ── Modal ────────────────────────────────────────────── */
.wcrm-fe-modal { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; }
.wcrm-fe-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.wcrm-fe-modal-box { position: relative; background: var(--wcrm-fe-surface); border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.2); width: 640px; max-width: calc(100vw - 32px); max-height: 90vh; display: flex; flex-direction: column; animation: wcrm-fe-pop .2s ease; overflow: hidden; }
.wcrm-fe-modal-box--sm { width: 440px; }
@keyframes wcrm-fe-pop { from { opacity:0; transform:scale(.96); } to { opacity:1; transform:scale(1); } }
.wcrm-fe-modal-head   { padding: 16px 20px; border-bottom: 1px solid var(--wcrm-fe-border); display: flex; align-items: center; justify-content: space-between; }
.wcrm-fe-modal-head h3 { font-size: 16px; font-weight: 600; margin: 0; }
.wcrm-fe-modal-close  { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--wcrm-fe-muted); padding: 2px 6px; border-radius: 4px; }
.wcrm-fe-modal-close:hover { background: #f3f4f6; }
.wcrm-fe-modal-body   { padding: 20px; overflow-y: auto; flex: 1; }
.wcrm-fe-modal-foot   { padding: 14px 20px; border-top: 1px solid var(--wcrm-fe-border); display: flex; justify-content: flex-end; gap: 8px; }

/* ── Form ─────────────────────────────────────────────── */
.wcrm-fe-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wcrm-fe-field     { display: flex; flex-direction: column; gap: 4px; }
.wcrm-fe-field--full { grid-column: 1 / -1; }
.wcrm-fe-field label { font-size: 12px; font-weight: 600; color: var(--wcrm-fe-text); }
.wcrm-fe-field input,
.wcrm-fe-field select,
.wcrm-fe-field textarea { border: 1px solid var(--wcrm-fe-border); border-radius: 6px; padding: 8px 10px; font-size: 13px; outline: none; background: var(--wcrm-fe-surface); color: var(--wcrm-fe-text); transition: border-color .15s; font-family: inherit; }
.wcrm-fe-field input:focus,
.wcrm-fe-field select:focus,
.wcrm-fe-field textarea:focus { border-color: var(--wcrm-fe-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }

/* ── Autocomplete ─────────────────────────────────────── */
.wcrm-fe-autocomplete { position: absolute; background: var(--wcrm-fe-surface); border: 1px solid var(--wcrm-fe-border); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 9999; width: 100%; max-height: 200px; overflow-y: auto; top: 100%; left: 0; margin-top: 2px; }
.wcrm-fe-ac-item { padding: 9px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--wcrm-fe-border); }
.wcrm-fe-ac-item:last-child { border-bottom: none; }
.wcrm-fe-ac-item:hover { background: #f3f4f6; }

/* ── Toast notification ───────────────────────────────── */
.wcrm-fe-toast { position: fixed; bottom: 24px; right: 24px; background: #1f2937; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px; z-index: 9999999; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; pointer-events: none; }
.wcrm-fe-toast.in { opacity: 1; transform: none; }
.wcrm-fe-toast--error { background: #dc2626; }

/* ══════════════════════════════════════════════════════
   QUOTE DOCUMENT STYLES
══════════════════════════════════════════════════════ */
.wcrm-fe-quotes { max-width: 900px; margin: 0 auto; }
.wcrm-fe-quote-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.wcrm-fe-quote-doc { background: #fff; border: 1px solid var(--wcrm-fe-border); border-radius: var(--wcrm-fe-radius); box-shadow: 0 4px 24px rgba(0,0,0,.06); padding: 40px; max-width: 860px; margin: 0 auto; }

.quote-doc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 2px solid var(--wcrm-fe-border); }
.from-company     { font-size: 18px; font-weight: 700; color: var(--wcrm-fe-primary); margin-bottom: 6px; display: block; }
.quote-title      { font-size: 32px; font-weight: 800; color: var(--wcrm-fe-text); letter-spacing: 1px; text-align: right; margin: 0 0 12px; }
.quote-meta-table td { padding: 3px 12px 3px 0; font-size: 13px; vertical-align: top; }
.quote-meta-table td:first-child { color: var(--wcrm-fe-muted); white-space: nowrap; }

.quote-bill-to      { background: #f9fafb; border-radius: 6px; padding: 16px; margin-bottom: 24px; font-size: 13px; line-height: 1.8; }
.bill-to-label      { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--wcrm-fe-muted); letter-spacing: .5px; margin-bottom: 6px; }

.quote-items-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 13px; }
.quote-items-table th { background: #f3f4f6; padding: 10px 12px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--wcrm-fe-muted); border-bottom: 2px solid var(--wcrm-fe-border); }
.quote-items-table th.num, .quote-items-table td.num { text-align: right; }
.quote-items-table td { padding: 10px 12px; border-bottom: 1px solid var(--wcrm-fe-border); vertical-align: top; }
.quote-items-table tfoot td { padding: 8px 12px; font-size: 13px; border-top: 1px solid var(--wcrm-fe-border); }
.quote-items-table .subtotal-row td { color: var(--wcrm-fe-muted); }
.quote-items-table .grand-total-row td { font-size: 16px; border-top: 2px solid var(--wcrm-fe-text); background: #f9fafb; }
.item-variant, .item-remark { font-size: 11px; color: var(--wcrm-fe-muted); margin-top: 2px; }

.quote-notes   { background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: 16px; margin-top: 20px; font-size: 13px; }
.quote-notes p { margin: 6px 0 0; }
.quote-cta     { text-align: center; padding: 24px; margin-top: 20px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; }
.quote-cta p   { margin-bottom: 14px; font-size: 14px; }
.quote-accepted-banner { text-align: center; background: #dcfce7; border: 1px solid #bbf7d0; border-radius: 8px; padding: 16px; margin-top: 20px; color: #15803d; font-weight: 600; font-size: 15px; }

/* Print styles */
@media print {
  .no-print, .wcrm-fe-sidenav { display: none !important; }
  .wcrm-fe-quote-doc { box-shadow: none; border: none; padding: 0; }
  body { background: white; }
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .wcrm-fe-portal { grid-template-columns: 1fr; }
  .wcrm-fe-sidenav { flex-direction: row; flex-wrap: wrap; padding: 8px; gap: 4px; }
  .wcrm-fe-brand   { padding: 8px 12px; border-bottom: none; border-right: 1px solid rgba(255,255,255,.1); }
  .wcrm-fe-nav-item { padding: 8px 12px; font-size: 12px; flex-direction: column; text-align: center; gap: 4px; border-radius: 6px; }
  .wcrm-fe-row { grid-template-columns: 1fr; }
  .wcrm-fe-detail-layout { grid-template-columns: 1fr; }
  .wcrm-fe-detail-meta   { grid-template-columns: 1fr 1fr; }
  .wcrm-fe-form-grid { grid-template-columns: 1fr; }
  .wcrm-fe-kpi-grid  { grid-template-columns: 1fr 1fr; }
  .wcrm-fe-kanban    { flex-direction: column; }
  .wcrm-fe-kanban-col { min-width: unset; max-width: unset; width: 100%; }
  .quote-doc-header  { flex-direction: column; gap: 20px; }
  .quote-title       { text-align: left; }
  .wcrm-fe-quote-doc { padding: 20px; }
}
