/* ============================================================
   TOUR SALES MANAGEMENT v2 — Master Stylesheet
   Tất cả CSS tập trung tại đây, không inline trong HTML
   ============================================================

   TABLE OF CONTENTS
   1.  Reset & CSS Variables
   2.  Base & Typography
   3.  Layout (App shell, Sidebar, Main)
   4.  Topbar
   5.  Buttons
   6.  Forms & Inputs
   7.  Cards & Surfaces
   8.  Tables
   9.  Badges, Tags, Pills
   10. Grid helpers
   11. Modal
   12. Toast & Loader
   13. Sidebar Navigation
   14. CRM — Pipeline, Leads
   15. Tour Builder
   16. Product Database
   17. Pricing Engine
   18. Quotation Generator
   19. Dashboard
   20. Workflow (4-step)
   ============================================================ */

/* ── 1. Reset & CSS Variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Surfaces */
  --bg:         #f5f5f3;
  --surface:    #ffffff;
  --surface2:   #f1efe8;
  /* Borders */
  --border:     rgba(0,0,0,0.12);
  --border2:    rgba(0,0,0,0.22);
  /* Text */
  --text:       #1a1a18;
  --text2:      #5f5e5a;
  --text3:      #888780;
  /* Blue */
  --blue-bg:    #e6f1fb;
  --blue:       #0c447c;
  --blue-border:#b5d4f4;
  /* Green */
  --green-bg:   #eaf3de;
  --green:      #27500a;
  --green-border:#c0dd97;
  /* Amber */
  --amber-bg:   #faeeda;
  --amber:      #633806;
  --amber-border:#fac775;
  /* Pink */
  --pink-bg:    #fbeaf0;
  --pink:       #72243e;
  --pink-border:#f4c0d1;
  /* Red */
  --red-bg:     #fcebeb;
  --red:        #791f1f;
  --red-border: #f7c1c1;
  /* Purple */
  --purple-bg:  #eeedfe;
  --purple:     #3c3489;
  --purple-border:#afa9ec;
  /* Radius */
  --radius:     8px;
  --radius-lg:  12px;
  /* Font */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── 2. Base & Typography ── */
body {
  font-family: var(--font-sans);
  background:  var(--bg);
  color:       var(--text);
  font-size:   14px;
  line-height: 1.5;
}

/* ── 3. Layout ── */
.app  { display: flex; min-height: 100vh; }
.main { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }

/* ── 4. Topbar ── */
.topbar       { background: var(--surface); border-bottom: 0.5px solid var(--border); padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.topbar-title { font-size: 16px; font-weight: 500; }

/* ── 5. Buttons ── */
button { font-family: inherit; cursor: pointer; }

.btn         { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius); font-size: 13px; border: 0.5px solid var(--border2); background: var(--surface); color: var(--text); transition: background 0.1s; text-decoration: none; }
.btn:hover   { background: var(--surface2); }
.btn-primary { background: var(--blue-bg);  color: var(--blue);  border-color: var(--blue-border);  font-weight: 500; }
.btn-primary:hover { background: #d0e6f8; }
.btn-success { background: var(--green-bg); color: var(--green); border-color: var(--green-border); font-weight: 500; }
.btn-success:hover { background: #ddf0c8; }
.btn-danger  { background: var(--red-bg);   color: var(--red);   border-color: var(--red-border); }
.btn-danger:hover { background: #f7d5d5; }
.btn-sm      { padding: 4px 10px; font-size: 12px; }
.btn-xs      { padding: 2px 7px;  font-size: 11px; }

/* ── 6. Forms & Inputs ── */
input, select, textarea {
  font-family: inherit;
  font-size:   13px;
  padding:     7px 10px;
  border:      0.5px solid var(--border2);
  border-radius: var(--radius);
  background:  var(--surface);
  color:       var(--text);
  width:       100%;
  outline:     none;
}
input:focus, select:focus, textarea:focus {
  border-color: #378add;
  box-shadow:   0 0 0 2px rgba(55,138,221,0.15);
}
.form-group   { margin-bottom: 14px; }
.form-label   { font-size: 12px; color: var(--text2); margin-bottom: 5px; display: block; }
.form-row     { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3   { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* ── 7. Cards & Surfaces ── */
.card        { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 16px 20px; }
.metric-card { background: var(--surface2); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; border: 0.5px solid var(--border); }
.metric-card:hover { background: #e8e6de; }
.metric-label { font-size: 12px; color: var(--text2); margin-bottom: 4px; }
.metric-value { font-size: 26px; font-weight: 500; }

/* ── 8. Tables ── */
.table-wrap  { overflow-x: auto; }
table        { width: 100%; border-collapse: collapse; }
th           { font-size: 11px; font-weight: 500; color: var(--text2); text-align: left; padding: 8px 12px; border-bottom: 0.5px solid var(--border); text-transform: uppercase; letter-spacing: 0.04em; background: var(--surface2); white-space: nowrap; }
td           { padding: 11px 12px; border-bottom: 0.5px solid var(--border); font-size: 13px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface2); cursor: pointer; }
.empty-row td { text-align: center; color: var(--text3); padding: 40px; cursor: default; }

/* ── 9. Badges, Tags, Pills ── */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; border: 0.5px solid; }
.tag   { display: inline-flex; align-items: center; padding: 2px 8px;  border-radius: 20px; font-size: 11px; }

/* Status colors */
.s-New         { background: var(--blue-bg);   color: var(--blue);   border-color: var(--blue-border); }
.s-Quoted      { background: var(--amber-bg);  color: var(--amber);  border-color: var(--amber-border); }
.s-Negotiating { background: var(--pink-bg);   color: var(--pink);   border-color: var(--pink-border); }
.s-Won         { background: var(--green-bg);  color: var(--green);  border-color: var(--green-border); }
.s-Lost        { background: var(--red-bg);    color: var(--red);    border-color: var(--red-border); }

/* Filter pills */
.pill        { padding: 5px 14px; border-radius: 20px; border: 0.5px solid var(--border); background: transparent; color: var(--text2); font-size: 12px; cursor: pointer; }
.pill.active { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-border); font-weight: 500; }

/* City pills */
.city-pill        { padding: 4px 12px; border-radius: 20px; border: 0.5px solid var(--border); font-size: 12px; cursor: pointer; background: transparent; color: var(--text2); }
.city-pill.active { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-border); font-weight: 500; }
.city-mini-pill        { padding: 3px 8px; border-radius: 20px; font-size: 11px; border: 0.5px solid var(--border); background: transparent; color: var(--text2); cursor: pointer; }
.city-mini-pill.active { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-border); }

/* Stars */
.stars { color: #f0a500; letter-spacing: -2px; }

/* Preset buttons (pricing) */
.preset-btn        { flex: 1; padding: 5px 4px; border-radius: var(--radius); font-size: 11px; border: 0.5px solid var(--border); background: transparent; color: var(--text2); cursor: pointer; text-align: center; }
.preset-btn.active { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-border); font-weight: 500; }

/* ── 10. Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }

/* ── 11. Modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal         { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.18); }
.modal-title   { font-size: 16px; font-weight: 500; margin-bottom: 18px; }

/* ── 12. Toast, Loader, Spinner ── */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--text); color: #fff; padding: 10px 18px; border-radius: var(--radius); font-size: 13px; z-index: 999; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.toast.show { opacity: 1; }
.loader { text-align: center; padding: 40px; color: var(--text3); }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text3); font-size: 13px; }
.empty-state-icon { font-size: 32px; margin-bottom: 10px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--blue-border); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 13. Sidebar Navigation ── */
.sidebar      { width: 220px; background: var(--surface); border-right: 0.5px solid var(--border); padding: 20px 0; flex-shrink: 0; display: flex; flex-direction: column; }
.sidebar-logo { padding: 0 20px 20px; font-size: 15px; font-weight: 600; border-bottom: 0.5px solid var(--border); margin-bottom: 12px; color: var(--text); }
.sidebar-logo span { color: var(--blue); }
.nav-item      { display: flex; align-items: center; gap: 10px; padding: 9px 20px; font-size: 13px; color: var(--text2); cursor: pointer; transition: background 0.1s; }
.nav-item:hover  { background: var(--surface2); }
.nav-item.active { background: var(--blue-bg); color: var(--blue); font-weight: 500; border-right: 2px solid var(--blue); }
.nav-icon        { font-size: 16px; width: 20px; text-align: center; }
.content         { padding: 24px 28px; flex: 1; overflow-y: auto; }

/* ── 14. CRM — Pipeline & Leads ── */
.client-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }

/* ── 15. Tour Builder ── */
.builder-layout       { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
.library-section      { font-size: 11px; font-weight: 500; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; margin: 12px 0 6px; }
.lib-item             { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); cursor: grab; margin-bottom: 5px; font-size: 12px; }
.lib-item:hover       { box-shadow: 0 2px 8px rgba(0,0,0,0.08); border-color: var(--border2); }
.lib-item:active      { cursor: grabbing; opacity: 0.7; }
.lib-item-icon        { font-size: 16px; width: 20px; text-align: center; }
.lib-item-name        { font-weight: 500; color: var(--text); }
.lib-item-sub         { font-size: 11px; color: var(--text3); }
.lib-item-meta        { font-size: 11px; color: var(--text3); margin-top: 2px; }
.lib-section          { font-size: 10px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin: 10px 0 5px; padding: 0 2px; }
/* Day cards */
.day-card             { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 12px 14px; min-height: 90px; margin-bottom: 10px; transition: border-color 0.15s, background 0.15s; }
.day-card:hover       { box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
.day-card.drag-over   { border: 2px dashed #378add; background: var(--blue-bg); }
.day-header           { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.day-title            { font-size: 13px; font-weight: 500; }
.day-items            { display: flex; flex-wrap: wrap; gap: 6px; }
.day-item             { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.day-item-destination { background: var(--blue-bg);   color: var(--blue);   border: 0.5px solid var(--blue-border); }
.day-item-poi         { background: var(--blue-bg);   color: var(--blue);   border: 0.5px solid var(--blue-border); }
.day-item-activity    { background: var(--green-bg);  color: var(--green);  border: 0.5px solid var(--green-border); }
.day-item-hotel       { background: var(--amber-bg);  color: var(--amber);  border: 0.5px solid var(--amber-border); }
.day-item-restaurant  { background: var(--pink-bg);   color: var(--pink);   border: 0.5px solid var(--pink-border); }
.day-item-transport   { background: var(--purple-bg); color: var(--purple); border: 0.5px solid var(--purple-border); }
.day-empty            { font-size: 12px; color: var(--text3); padding: 10px 0; text-align: center; }
.remove-btn           { background: none; border: none; cursor: pointer; font-size: 12px; opacity: 0.6; margin-left: 2px; color: inherit; }
.remove-btn:hover     { opacity: 1; }
/* AI box */
.ai-box       { background: var(--surface2); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 16px; }
.ai-box-title { font-size: 13px; font-weight: 500; margin-bottom: 10px; }
.ai-row       { display: flex; gap: 8px; }
.ai-row input { flex: 1; }
/* Builder v2 */
.builder-wrap         { display: grid; grid-template-columns: 230px 1fr; height: calc(100vh - 116px); overflow: hidden; }
.lib-panel            { border-right: 0.5px solid var(--border); background: var(--surface); display: flex; flex-direction: column; overflow: hidden; }
.lib-tabs             { display: flex; gap: 2px; padding: 0 10px 8px; border-bottom: 0.5px solid var(--border); }
.lib-tab              { flex: 1; padding: 7px 4px; font-size: 16px; border: 0.5px solid transparent; border-radius: var(--radius); background: transparent; cursor: pointer; transition: background 0.1s; }
.lib-tab:hover        { background: var(--surface2); }
.lib-tab.active       { background: var(--blue-bg); border-color: var(--blue-border); }
.lib-items-list       { flex: 1; overflow-y: auto; padding: 8px 10px; }
.timeline-wrap        { overflow-y: auto; background: var(--bg); padding: 16px 20px; }
.day-controls         { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
/* Builder day (v2 style) */
.day-card2            { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 10px; overflow: hidden; transition: box-shadow 0.15s; }
.day-card2:hover      { box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
.day-card2.drag-over  { border: 2px dashed #378add; background: var(--blue-bg); }
.day-head2            { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: var(--surface2); border-bottom: 0.5px solid var(--border); }
.day-num2             { font-size: 11px; font-weight: 600; color: var(--blue); background: var(--blue-bg); border: 0.5px solid var(--blue-border); border-radius: 20px; padding: 2px 10px; white-space: nowrap; }
.day-title2           { flex: 1; font-size: 13px; font-weight: 500; border: none; background: transparent; color: var(--text); outline: none; }
.day-title2:focus     { border-bottom: 1px solid var(--blue-border); }
.day-body2            { padding: 10px 14px; min-height: 64px; }
.day-items2           { display: flex; flex-wrap: wrap; gap: 6px; }
.day-item2            { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.day-empty2           { font-size: 12px; color: var(--text3); padding: 10px 0; text-align: center; }
.rmv-btn              { background: none; border: none; cursor: pointer; font-size: 12px; color: inherit; opacity: 0.6; }
.rmv-btn:hover        { opacity: 1; }
/* Day item colors */
.di-poi        { background: var(--blue-bg);   color: var(--blue);   border: 0.5px solid var(--blue-border); }
.di-hotel      { background: var(--amber-bg);  color: var(--amber);  border: 0.5px solid var(--amber-border); }
.di-activity   { background: var(--green-bg);  color: var(--green);  border: 0.5px solid var(--green-border); }
.di-restaurant { background: var(--pink-bg);   color: var(--pink);   border: 0.5px solid var(--pink-border); }
.di-transport  { background: var(--purple-bg); color: var(--purple); border: 0.5px solid var(--purple-border); }
/* Template cards */
.tpl-card       { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 14px; cursor: pointer; transition: box-shadow 0.15s; }
.tpl-card:hover { box-shadow: 0 3px 14px rgba(0,0,0,0.10); border-color: var(--blue-border); }
.tpl-card-title { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.tpl-card-meta  { font-size: 12px; color: var(--text2); }
/* Preview */
.preview-day       { margin-bottom: 24px; }
.preview-day-title { font-size: 15px; font-weight: 500; color: var(--blue); border-bottom: 1px solid var(--blue-border); padding-bottom: 6px; margin-bottom: 12px; }
.preview-item      { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 0.5px solid var(--border); font-size: 13px; }
.preview-item-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.preview-item-name { font-weight: 500; }
.preview-item-meta { font-size: 12px; color: var(--text2); }
/* Tour name input */
.tour-name-input      { font-size: 15px; font-weight: 500; border: none; border-bottom: 1px solid var(--border2); border-radius: 0; background: transparent; padding: 4px 0; width: 260px; }
.tour-name-input:focus { box-shadow: none; border-color: var(--blue); }
/* AI bar (builder) */
.ai-box-bar           { display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: var(--surface2); border-bottom: 0.5px solid var(--border); flex-shrink: 0; }

/* ── 16. Product Database ── */
.tab-bar    { display: flex; gap: 2px; border-bottom: 0.5px solid var(--border); padding: 0 24px; background: var(--surface); overflow-x: auto; flex-shrink: 0; }
.tab-btn    { padding: 12px 16px; font-size: 13px; border: none; background: transparent; color: var(--text2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 500; }
.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.product-table-wrap { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 12px; }
.product-card       { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; transition: box-shadow 0.15s; }
.product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.10); }
.product-card-img   { width: 100%; height: 140px; object-fit: cover; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 48px; }
.product-card-body  { padding: 12px 14px; }
.product-card-title { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.product-card-sub   { font-size: 12px; color: var(--text2); margin-bottom: 8px; }
.tag-inline         { display: inline-flex; padding: 2px 7px; border-radius: 20px; font-size: 11px; background: var(--surface2); color: var(--text2); margin: 1px; }
.price-badge        { font-weight: 500; color: var(--green); font-size: 12px; }
.dot                { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.dot-active         { background: var(--green); }
.dot-inactive       { background: var(--text3); }
.bulk-bar           { display: none; align-items: center; gap: 10px; padding: 10px 14px; background: var(--blue-bg); border-radius: var(--radius); margin-bottom: 10px; font-size: 13px; }
.bulk-bar.show      { display: flex; }

/* ── 17. Pricing Engine ── */
.pe-page         { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.pe-topbar       { display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: var(--surface); border-bottom: 0.5px solid var(--border); flex-shrink: 0; }
.pe-topbar-title { font-size: 15px; font-weight: 600; margin-right: 8px; }
.pe-mode-tabs    { display: flex; gap: 4px; margin-left: auto; }
.pe-mode-btn     { padding: 6px 14px; border-radius: var(--radius); font-size: 13px; border: 0.5px solid var(--border); background: transparent; color: var(--text2); cursor: pointer; }
.pe-mode-btn.active { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-border); font-weight: 500; }
.pe-columns      { display: grid; grid-template-columns: 1fr 1fr 1fr; flex: 1; overflow: hidden; }
.pe-col          { overflow-y: auto; border-right: 0.5px solid var(--border); }
.pe-col:last-child { border-right: none; background: var(--bg); }
.col-header      { position: sticky; top: 0; z-index: 10; padding: 12px 16px; background: var(--surface2); border-bottom: 0.5px solid var(--border); display: flex; align-items: center; gap: 8px; }
.col-step        { width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: white; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.col-title       { font-size: 13px; font-weight: 500; }
.pe-section      { padding: 14px 16px; border-bottom: 0.5px solid var(--border); }
.pe-section-label { font-size: 10px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.pe-view         { flex: 1; overflow-y: auto; }
.field-row       { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field-row3      { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.field           { margin-bottom: 8px; }
.field label     { font-size: 11px; color: var(--text2); display: block; margin-bottom: 4px; }
.field input, .field select { font-size: 13px; padding: 6px 8px; }
.margin-slider-wrap           { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.margin-slider-wrap input[type=range] { flex: 1; accent-color: var(--blue); }
.margin-badge    { font-size: 20px; font-weight: 700; color: var(--blue); min-width: 52px; text-align: center; }
.margin-presets  { display: flex; gap: 6px; }
.hotel-row       { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.hotel-row select { flex: 1; font-size: 12px; padding: 5px 6px; }
.hotel-row input  { width: 54px; font-size: 12px; padding: 5px 6px; }
.hotel-row .nights-label { font-size: 11px; color: var(--text2); white-space: nowrap; }
.svc-item        { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 0.5px solid var(--border); font-size: 12px; }
.svc-item:last-child { border-bottom: none; }
.svc-item input[type=checkbox] { width: auto; flex-shrink: 0; cursor: pointer; }
.svc-item-name   { flex: 1; }
.svc-item-price  { font-size: 11px; color: var(--text3); white-space: nowrap; }
.svc-qty         { width: 46px; font-size: 12px; padding: 3px 5px; display: none; }
.result-hero     { padding: 20px 16px 16px; text-align: center; border-bottom: 0.5px solid var(--border); background: var(--surface); }
.hero-pax        { font-size: 38px; font-weight: 700; color: var(--blue); line-height: 1; }
.hero-label      { font-size: 12px; color: var(--text2); margin-top: 4px; }
.hero-total      { font-size: 14px; font-weight: 500; margin-top: 10px; color: var(--text); }
.hero-profit     { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 500; margin-top: 8px; }
.bd-row          { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.bd-label        { font-size: 11px; color: var(--text2); width: 80px; flex-shrink: 0; }
.bd-track        { flex: 1; background: var(--surface2); border-radius: 20px; height: 7px; overflow: hidden; }
.bd-fill         { height: 100%; border-radius: 20px; transition: width 0.4s ease; }
.bd-val          { font-size: 11px; font-weight: 500; width: 48px; text-align: right; color: var(--text); }
.line-table      { width: 100%; border-collapse: collapse; font-size: 12px; }
.line-table th   { font-size: 10px; color: var(--text3); font-weight: 500; padding: 5px 8px; border-bottom: 0.5px solid var(--border); text-align: left; text-transform: uppercase; letter-spacing: 0.04em; }
.line-table td   { padding: 6px 8px; border-bottom: 0.5px solid var(--border); }
.line-table tr:last-child td { border-bottom: none; }
.line-table tfoot td { font-weight: 600; background: var(--surface2); }
.compare-table   { width: 100%; border-collapse: collapse; font-size: 12px; }
.compare-table th { font-size: 10px; color: var(--text3); padding: 5px 8px; border-bottom: 0.5px solid var(--border); text-align: left; text-transform: uppercase; letter-spacing: 0.04em; }
.compare-table td { padding: 7px 8px; border-bottom: 0.5px solid var(--border); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr.current-row td { background: var(--blue-bg); }
.calc-btn        { width: 100%; padding: 10px; font-size: 14px; font-weight: 600; border-radius: var(--radius); cursor: pointer; background: var(--blue); color: white; border: none; transition: opacity 0.15s; }
.calc-btn:hover  { opacity: 0.88; }
.rates-grid      { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px; }
.rate-card       { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.rate-card-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--surface2); border-bottom: 0.5px solid var(--border); }
.rate-card-title  { font-size: 12px; font-weight: 600; color: var(--text); }
.rate-table      { width: 100%; border-collapse: collapse; font-size: 12px; }
.rate-table th   { padding: 7px 12px; text-align: left; font-size: 10px; font-weight: 500; color: var(--text3); background: var(--surface2); border-bottom: 0.5px solid var(--border); text-transform: uppercase; letter-spacing: 0.04em; }
.rate-table td   { padding: 7px 12px; border-bottom: 0.5px solid var(--border); }
.rate-table tr:last-child td { border-bottom: none; }
.rate-table tr:hover td { background: var(--surface2); cursor: pointer; }
.history-wrap    { padding: 20px; }

/* Pricing step 3 (workflow) */
.bd-row2         { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.bd-label2       { font-size: 11px; color: var(--text2); width: 80px; flex-shrink: 0; }
.bd-track2       { flex: 1; background: var(--surface2); border-radius: 20px; height: 7px; overflow: hidden; }
.bd-fill2        { height: 100%; border-radius: 20px; }
.bd-val2         { font-size: 11px; font-weight: 500; width: 52px; text-align: right; }
.price-hero2     { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 20px; text-align: center; margin-bottom: 14px; }
.price-big       { font-size: 40px; font-weight: 700; color: var(--blue); }
.price-sub       { font-size: 13px; color: var(--text2); margin-top: 4px; }
.price-total     { font-size: 15px; font-weight: 500; margin-top: 10px; }
.price-profit    { display: inline-flex; padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; margin-top: 8px; }

/* ── 18. Quotation Generator ── */
.q-layout        { display: grid; grid-template-columns: 380px 1fr; height: calc(100vh - 57px); overflow: hidden; }
.q-form          { border-right: 0.5px solid var(--border); overflow-y: auto; background: var(--surface); padding: 20px; }
.q-preview       { overflow-y: auto; background: var(--bg); padding: 24px; }
.section-title   { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 0.5px solid var(--border); }
.section-title:first-child { margin-top: 0; }
.share-box       { background: var(--green-bg); border: 0.5px solid var(--green-border); border-radius: var(--radius); padding: 12px 14px; margin-top: 12px; display: none; }
.share-link      { font-size: 12px; color: var(--green); word-break: break-all; font-weight: 500; }
/* Quote document */
.quote-doc       { background: white; max-width: 720px; margin: 0 auto; border-radius: var(--radius-lg); box-shadow: 0 4px 24px rgba(0,0,0,0.10); overflow: hidden; font-family: 'Georgia', serif; }
.quote-header    { padding: 36px 40px 28px; color: white; }
.quote-company   { font-size: 13px; opacity: 0.8; margin-bottom: 6px; letter-spacing: 0.05em; text-transform: uppercase; }
.quote-tourname  { font-size: 26px; font-weight: 700; margin-bottom: 8px; line-height: 1.2; }
.quote-meta      { font-size: 13px; opacity: 0.85; display: flex; gap: 20px; flex-wrap: wrap; }
.quote-body      { padding: 32px 40px; }
.quote-section        { margin-bottom: 28px; }
.quote-section-title  { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; padding-bottom: 6px; border-bottom: 2px solid; font-family: sans-serif; }
.q-day           { margin-bottom: 18px; }
.q-day-title     { font-size: 14px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.q-day-badge     { font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 20px; font-family: sans-serif; }
.q-day-items     { margin-left: 8px; }
.q-day-item      { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; border-bottom: 0.5px solid #f0f0ec; font-size: 13px; }
.q-day-item:last-child { border-bottom: none; }
.q-day-note      { font-size: 12px; color: #666; font-style: italic; margin-top: 4px; padding: 5px 8px; background: #fafaf8; border-radius: 4px; }
.price-table     { width: 100%; border-collapse: collapse; font-size: 13px; font-family: sans-serif; }
.price-table th  { background: #f5f5f3; padding: 8px 12px; text-align: left; font-size: 11px; font-weight: 600; color: #5f5e5a; text-transform: uppercase; letter-spacing: 0.04em; }
.price-table td  { padding: 9px 12px; border-bottom: 0.5px solid #eee; }
.price-table tr:last-child td { border-bottom: none; }
.price-total-val { font-size: 18px; font-weight: 700; text-align: right; margin-top: 14px; font-family: sans-serif; }
.inc-list        { list-style: none; padding: 0; margin: 0; }
.inc-list li     { padding: 4px 0; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.inc-list li::before  { content: '✓'; color: #27500a; font-weight: 700; flex-shrink: 0; }
.exc-list li::before  { content: '✕'; color: #791f1f; }
.quote-footer    { padding: 20px 40px; background: #f5f5f3; font-size: 12px; color: #888; text-align: center; border-top: 0.5px solid #e8e6e0; font-family: sans-serif; }
/* Quotation workflow */
.q-doc           { background: white; max-width: 680px; margin: 0 auto; border-radius: var(--radius-lg); box-shadow: 0 4px 24px rgba(0,0,0,0.10); overflow: hidden; font-family: 'Georgia', serif; }
.q-doc-header    { padding: 32px 36px 24px; color: white; }
.q-doc-company   { font-size: 12px; opacity: 0.8; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; font-family: sans-serif; }
.q-doc-name      { font-size: 24px; font-weight: 700; margin-bottom: 10px; line-height: 1.2; }
.q-doc-meta      { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; opacity: 0.85; font-family: sans-serif; }
.q-doc-body      { padding: 28px 36px; }
.q-doc-section   { margin-bottom: 24px; }
.q-doc-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; padding-bottom: 5px; border-bottom: 2px solid; font-family: sans-serif; }
.q-day-block     { margin-bottom: 14px; }
.q-day-label     { font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 20px; display: inline-flex; margin-bottom: 6px; font-family: sans-serif; }
.q-day-items3    { margin-left: 4px; }
.q-day-item3     { display: flex; gap: 8px; padding: 4px 0; border-bottom: 0.5px solid #f0f0ec; font-size: 13px; }
.q-day-item3:last-child { border-bottom: none; }
.q-price-table   { width: 100%; border-collapse: collapse; font-size: 13px; font-family: sans-serif; }
.q-price-table th { background: #f5f5f3; padding: 7px 10px; text-align: left; font-size: 11px; font-weight: 600; color: #5f5e5a; text-transform: uppercase; letter-spacing: 0.04em; }
.q-price-table td { padding: 8px 10px; border-bottom: 0.5px solid #eee; }
.q-price-table tr:last-child td { border-bottom: none; }
.q-inc-list      { list-style: none; padding: 0; margin: 0; }
.q-inc-list li   { padding: 3px 0; font-size: 13px; display: flex; gap: 8px; }
.q-inc-list li::before { content: '✓'; color: #27500a; font-weight: 700; }
.q-doc-footer    { padding: 16px 36px; background: #f5f5f3; font-size: 11px; color: #888; text-align: center; font-family: sans-serif; border-top: 0.5px solid #e0e0dc; }
.q-price-per-pax { font-size: 16px; font-weight: 700; text-align: right; margin-top: 10px; font-family: sans-serif; }
.share-result    { background: var(--green-bg); border: 0.5px solid var(--green-border); border-radius: var(--radius); padding: 10px 14px; margin-top: 10px; display: none; }
.share-link2     { font-size: 12px; color: var(--green); word-break: break-all; font-weight: 500; }

/* ── 19. Dashboard ── */
.dash-body   { padding: 20px 24px; overflow-y: auto; flex: 1; }
.period-bar  { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.period-btn  { padding: 5px 14px; border-radius: 20px; font-size: 12px; cursor: pointer; border: 0.5px solid var(--border); background: transparent; color: var(--text2); }
.period-btn.active { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-border); font-weight: 500; }
.last-updated { margin-left: auto; font-size: 11px; color: var(--text3); }
.kpi-grid    { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.kpi-card    { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; }
.kpi-icon    { font-size: 22px; margin-bottom: 8px; }
.kpi-value   { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; }
.kpi-label   { font-size: 12px; color: var(--text2); margin-top: 4px; }
.kpi-delta   { font-size: 11px; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.delta-up    { color: var(--green); }
.delta-down  { color: var(--red); }
.delta-neu   { color: var(--text3); }
.charts-grid   { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 14px; }
.charts-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.chart-card    { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; }
.chart-title   { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.bar-chart     { display: flex; flex-direction: column; gap: 8px; }
.bar-row       { display: flex; align-items: center; gap: 8px; }
.bar-label     { font-size: 11px; color: var(--text2); width: 90px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track     { flex: 1; background: var(--surface2); border-radius: 20px; height: 8px; overflow: hidden; }
.bar-fill      { height: 100%; border-radius: 20px; transition: width 0.5s ease; }
.bar-val       { font-size: 11px; font-weight: 500; width: 56px; text-align: right; color: var(--text); }
.funnel        { display: flex; flex-direction: column; gap: 6px; }
.funnel-row    { display: flex; align-items: center; gap: 8px; }
.funnel-bar    { height: 28px; border-radius: 4px; display: flex; align-items: center; padding: 0 10px; font-size: 12px; font-weight: 500; color: white; transition: width 0.5s ease; min-width: 40px; white-space: nowrap; }
.funnel-cnt    { font-size: 12px; color: var(--text2); min-width: 32px; }
.rev-chart     { position: relative; height: 140px; }
.rev-svg       { width: 100%; height: 100%; }
.source-list   { display: flex; flex-direction: column; gap: 6px; }
.source-item   { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.source-dot    { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.source-name   { flex: 1; color: var(--text2); }
.source-cnt    { font-weight: 500; }
.source-won    { font-size: 11px; color: var(--green); }
.activity-feed { display: flex; flex-direction: column; gap: 0; max-height: 320px; overflow-y: auto; }
.activity-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 0.5px solid var(--border); font-size: 12px; }
.activity-item:last-child { border-bottom: none; }
.activity-icon { font-size: 15px; width: 22px; text-align: center; flex-shrink: 0; margin-top: 1px; }
.activity-text { flex: 1; line-height: 1.4; }
.activity-time { font-size: 11px; color: var(--text3); white-space: nowrap; }
.tour-list     { display: flex; flex-direction: column; gap: 0; }
.tour-item     { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 0.5px solid var(--border); font-size: 12px; }
.tour-item:last-child { border-bottom: none; }
.tour-days     { background: var(--blue-bg); color: var(--blue); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.mkt-table     { width: 100%; border-collapse: collapse; font-size: 12px; }
.mkt-table th  { font-size: 10px; color: var(--text3); font-weight: 500; padding: 5px 8px; border-bottom: 0.5px solid var(--border); text-align: left; text-transform: uppercase; letter-spacing: 0.04em; }
.mkt-table td  { padding: 7px 8px; border-bottom: 0.5px solid var(--border); }
.mkt-table tr:last-child td { border-bottom: none; }
.conv-ring     { display: flex; flex-direction: column; align-items: center; padding: 10px 0; }
.conv-pct      { font-size: 36px; font-weight: 700; color: var(--blue); }
.conv-label    { font-size: 12px; color: var(--text2); }
.conv-sub      { font-size: 11px; color: var(--text3); margin-top: 4px; }

/* ── 20. Workflow (4-step) ── */
.wf-steps      { display: flex; align-items: center; padding: 0 28px; background: var(--surface); border-bottom: 0.5px solid var(--border); flex-shrink: 0; overflow-x: auto; }
.wf-step       { display: flex; align-items: center; gap: 10px; padding: 14px 20px; cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.15s; }
.wf-step.active   { border-bottom-color: var(--blue); }
.wf-step.done     { border-bottom-color: var(--green); }
.wf-step.disabled { opacity: 0.4; cursor: not-allowed; }
.step-num      { width: 24px; height: 24px; border-radius: 50%; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; background: var(--surface2); color: var(--text2); flex-shrink: 0; }
.wf-step.active .step-num  { background: var(--blue);  color: white; }
.wf-step.done   .step-num  { background: var(--green); color: white; }
.step-info     { line-height: 1.3; }
.step-title    { font-size: 13px; font-weight: 500; color: var(--text); }
.step-sub      { font-size: 11px; color: var(--text2); }
.wf-step.active .step-title { color: var(--blue); }
.wf-step.done   .step-title { color: var(--green); }
.step-arrow    { color: var(--border2); font-size: 14px; padding: 0 4px; }
.wf-panel      { display:none; flex: 1; overflow: hidden; flex-direction: column; }
.wf-panel.active { display: flex; }
.wf-action-bar { padding: 12px 24px; background: var(--surface); border-top: 0.5px solid var(--border); display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.wf-action-bar .step-hint { font-size: 12px; color: var(--text2); margin-left: auto; }
/* Step 1: Client */
.client-search-wrap { padding: 20px 24px; border-bottom: 0.5px solid var(--border); flex-shrink: 0; }
.client-grid   { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 10px; padding: 16px 24px; overflow-y: auto; flex: 1; }
.client-card   { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; cursor: pointer; transition: all 0.15s; }
.client-card:hover    { box-shadow: 0 2px 12px rgba(0,0,0,0.08); border-color: var(--border2); }
.client-card.selected { border: 2px solid var(--blue); background: var(--blue-bg); }
.client-name   { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.client-meta   { font-size: 12px; color: var(--text2); }
/* Step 2: Builder */
.builder-wrap2 { display: grid; grid-template-columns: 220px 1fr; flex: 1; overflow: hidden; }
.lib-panel2    { border-right: 0.5px solid var(--border); background: var(--surface); overflow-y: auto; display: flex; flex-direction: column; }
.lib-search2   { padding: 10px; border-bottom: 0.5px solid var(--border); flex-shrink: 0; }
.lib-type-tabs { display: flex; border-bottom: 0.5px solid var(--border); flex-shrink: 0; }
.lib-type-tab  { flex: 1; padding: 8px 4px; font-size: 15px; text-align: center; border: none; background: transparent; cursor: pointer; border-bottom: 2px solid transparent; }
.lib-type-tab.active { border-bottom-color: var(--blue); background: var(--blue-bg); }
.lib-items2    { flex: 1; overflow-y: auto; padding: 8px; }
.lib-item2     { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0.5px solid var(--border); border-radius: var(--radius); margin-bottom: 5px; cursor: grab; font-size: 12px; background: var(--surface); }
.lib-item2:hover  { border-color: var(--border2); box-shadow: 0 1px 6px rgba(0,0,0,0.07); }
.lib-item2:active { cursor: grabbing; opacity: 0.7; }
.timeline2     { flex: 1; overflow-y: auto; padding: 16px; background: var(--bg); }
.ai-bar2       { padding: 10px 16px; background: var(--surface2); border-bottom: 0.5px solid var(--border); display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
/* Step 3: Pricing */
.pricing-wrap    { display: grid; grid-template-columns: 320px 1fr; flex: 1; overflow: hidden; }
.pricing-form    { border-right: 0.5px solid var(--border); overflow-y: auto; padding: 16px 18px; background: var(--surface); }
.pricing-result  { overflow-y: auto; padding: 16px 18px; background: var(--bg); }
.p-section       { margin-bottom: 18px; }
.p-section-label { font-size: 10px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.p-row2          { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.p-field label   { font-size: 11px; color: var(--text2); display: block; margin-bottom: 4px; }
.p-field input, .p-field select { font-size: 13px; padding: 6px 8px; }
.hotel-line      { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.hotel-line select { flex: 1; font-size: 12px; padding: 5px 7px; }
.hotel-line input  { width: 54px; font-size: 12px; padding: 5px 7px; }
.svc-check-item  { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 0.5px solid var(--border); font-size: 12px; }
.svc-check-item:last-child { border-bottom: none; }
.svc-check-item input[type=checkbox] { width: auto; }
.svc-name        { flex: 1; }
.svc-price       { font-size: 11px; color: var(--text3); }
.margin-row      { display: flex; align-items: center; gap: 10px; }
.margin-row input[type=range] { flex: 1; accent-color: var(--blue); }
.margin-val      { font-size: 20px; font-weight: 700; color: var(--blue); min-width: 52px; text-align: center; }
/* Step 4: Quotation controls */
.quote-wrap      { display: grid; grid-template-columns: 300px 1fr; flex: 1; overflow: hidden; }
.quote-controls  { border-right: 0.5px solid var(--border); overflow-y: auto; padding: 16px 18px; background: var(--surface); }
.quote-preview2  { overflow-y: auto; padding: 20px; background: var(--bg); }
.q-section-label { font-size: 10px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin: 14px 0 8px; }
.q-section-label:first-child { margin-top: 0; }
.wf-share-result { background: var(--green-bg); border: 0.5px solid var(--green-border); border-radius: var(--radius); padding: 10px 14px; margin-top: 10px; display: none; }