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

:root {
  --teal:        #006269;
  --teal-dark:   #004a50;
  --teal-mid:    #007a81;
  --purple:      #72246c;
  --gold:        #ffb81c;
  --gold-dark:   #e6a200;
  --green:       #7a9a01;
  --red:         #ba0c2f;
  --soft-teal:   #b6cfd0;
  --soft-gray:   #d9d9d6;
  --bg:          #f0f2f5;
  --card:        #ffffff;
  --white:       #ffffff;
  --text:        #1c2b33;
  --text-muted:  #6b7c8a;
  --border:      #e0e6eb;
  --sidebar-w:        264px;
  --sidebar-w-collapsed: 56px;
  --topbar-h:    64px;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.07);
  --shadow:      0 2px 14px rgba(0,98,105,.10);
  --shadow-md:   0 6px 28px rgba(0,98,105,.14);
  --trans:       all .2s ease;
}

html { background: var(--bg); }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ── LAYOUT ───────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* ── SIDEBAR ──────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--teal);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(0,0,0,.18);
  transition: width .25s ease;
  overflow: hidden;
}

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.sidebar-logo { width: 100%; max-width: 180px; height: auto; display: block; filter: brightness(0) invert(1); }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  padding: 20px 20px 6px;
}

.sidebar-nav { padding: 12px 0; flex: 1; overflow-y: auto; overflow-x: hidden; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: rgba(255,255,255,.82);
  font-weight: 500;
  font-size: 13.5px;
  border-left: 3px solid transparent;
  transition: var(--trans);
  cursor: pointer;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.08); border-left-color: rgba(255,255,255,.3); }
.nav-item.active { color: #fff; background: rgba(255,255,255,.13); border-left-color: var(--gold); font-weight: 600; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 12px;
  color: rgba(255,255,255,.45);
}

/* ── SIDEBAR HEADER ───────────────────────────────── */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── SIDEBAR TOGGLE BUTTON ────────────────────────── */
.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,.1);
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.8);
  flex-shrink: 0;
  transition: var(--trans);
}
.sidebar-toggle:hover { background: rgba(255,255,255,.2); color: #fff; }
.sidebar-toggle svg { width: 16px; height: 16px; transition: transform .25s ease; }

/* ── COLLAPSED SIDEBAR ────────────────────────────── */
.sidebar.collapsed {
  width: var(--sidebar-w-collapsed);
}
.sidebar.collapsed .sidebar-header {
  padding: 20px 0;
  justify-content: center;
}
.sidebar.collapsed .sidebar-logo,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .sidebar-footer { display: none; }
.sidebar.collapsed .sidebar-nav { padding: 8px 0; }
.sidebar.collapsed .nav-item {
  padding: 11px 0;
  justify-content: center;
  gap: 0;
  border-left-width: 3px;
}
.sidebar.collapsed .nav-item span { display: none; }
.sidebar.collapsed .nav-item svg { width: 20px; height: 20px; }

/* suppress transitions on initial page load so sidebar state snaps in without animating */
html.sb-no-trans .sidebar,
html.sb-no-trans .main-wrapper { transition: none !important; }

/* ── MAIN WRAPPER ─────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left .25s ease;
}
.sidebar.collapsed ~ .main-wrapper { margin-left: var(--sidebar-w-collapsed); }

/* ── TOPBAR ───────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.search-form { flex: 1; max-width: 440px; position: relative; }
.search-form input {
  width: 100%;
  padding: 9px 16px 9px 40px;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  background: var(--bg);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  transition: var(--trans);
}
.search-form input:focus { outline: none; border-color: var(--teal); background: var(--white); box-shadow: 0 0 0 3px rgba(0,98,105,.1); }
.search-form::before {
  content: '';
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7c8a' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") center/contain no-repeat;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.topbar-user { font-weight: 600; font-size: 13px; color: var(--text); text-decoration: none; transition: color .15s; }
a.topbar-user:hover { color: var(--teal); }
.topbar-logout {
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: var(--trans);
}
.topbar-logout:hover { border-color: var(--red); color: var(--red); }

/* ── PAGE CONTENT ─────────────────────────────────── */
.content { padding: 28px; flex: 1; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.page-title { font-size: 22px; font-weight: 700; color: var(--text); }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ── ALERTS / FLASH ───────────────────────────────── */
.flash-messages { margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.alert {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown .25s ease;
}
.alert-success { background: #edf7ed; color: #1e6b1e; border: 1px solid #b3ddb3; }
.alert-error   { background: #fdecea; color: #8b1a1a; border: 1px solid #f5b8b8; }
.alert-info    { background: #e8f4fd; color: #1a4f7a; border: 1px solid #b3d4f0; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ── CARDS ────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title { font-size: 15px; font-weight: 600; color: var(--text); }
.card-body { padding: 22px; }

/* ── KPI CARDS ────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.kpi-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: var(--trans);
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}
.kpi-card.teal::before   { background: var(--teal); }
.kpi-card.gold::before   { background: var(--gold); }
.kpi-card.purple::before { background: var(--purple); }
.kpi-card.green::before  { background: var(--green); }

.kpi-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.kpi-icon.teal   { background: rgba(0,98,105,.1); color: var(--teal); }
.kpi-icon.gold   { background: rgba(255,184,28,.12); color: var(--gold-dark); }
.kpi-icon.purple { background: rgba(114,36,108,.1); color: var(--purple); }
.kpi-icon.green  { background: rgba(122,154,1,.1); color: var(--green); }
.kpi-icon svg    { width: 22px; height: 22px; }

.kpi-value { font-size: 32px; font-weight: 700; color: var(--text); line-height: 1; }
.kpi-label { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }

/* ── DASHBOARD GRID ───────────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: 1fr 380px; gap: 20px; }
.dashboard-col { display: flex; flex-direction: column; gap: 20px; }

/* ── BUTTONS ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--trans);
  white-space: nowrap;
  text-decoration: none;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary   { background: var(--gold); color: var(--text); }
.btn-primary:hover { background: var(--gold-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,184,28,.35); }
.btn-teal      { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,98,105,.3); }
.btn-outline   { background: transparent; border: 1.5px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-danger    { background: transparent; border: 1.5px solid var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm        { padding: 6px 12px; font-size: 12.5px; }
.btn-icon      { padding: 7px; border-radius: 7px; }

/* ── TABLES ───────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  background: var(--bg);
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:hover { background: rgba(0,98,105,.03); }
tbody tr:last-child td { border-bottom: none; }

/* ── BADGES ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge-active  { background: rgba(122,154,1,.12); color: var(--green); }
.badge-inactive { background: rgba(0,0,0,.06); color: var(--text-muted); }
.badge-new      { background: rgba(0,98,105,.10); color: var(--teal); }
.badge-contacted { background: rgba(255,184,28,.15); color: #a97000; }
.badge-qualified { background: rgba(114,36,108,.10); color: var(--purple); }
.badge-proposal  { background: rgba(122,154,1,.12); color: var(--green); }
.badge-won       { background: rgba(122,154,1,.2); color: #4a6000; }
.badge-lost      { background: rgba(186,12,47,.10); color: var(--red); }

/* ── FORMS ────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  transition: var(--trans);
}
.form-control:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,98,105,.1); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }

/* ── TABS ─────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: var(--trans);
  font-family: inherit;
}
.tab-btn:hover { color: var(--teal); }
.tab-btn.active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── ACTIVITY FEED ────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.activity-icon.call  { background: rgba(0,98,105,.1); color: var(--teal); }
.activity-icon.note  { background: rgba(255,184,28,.15); color: var(--gold-dark); }
.activity-icon svg   { width: 16px; height: 16px; }
.activity-body { flex: 1; }
.activity-title { font-size: 13.5px; font-weight: 500; color: var(--text); }
.activity-meta  { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.activity-notes { font-size: 13px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; white-space: pre-wrap; }
.activity-del-btn { opacity: 0; transition: opacity .15s; }
.activity-item:hover .activity-del-btn { opacity: 1; }
.btn-view-email {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 8px; padding: 3px 10px;
  font-size: 11.5px; font-weight: 500;
  color: var(--teal); background: none;
  border: 1px solid var(--teal); border-radius: 20px;
  cursor: pointer; transition: background .15s, color .15s;
  line-height: 1.6;
}
.btn-view-email:hover { background: var(--teal); color: #fff; }

/* ── KANBAN BOARD ─────────────────────────────────── */
.kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: flex-start;
}
.kanban-col {
  min-width: 230px;
  max-width: 260px;
  flex: 1;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}
.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1.5px solid var(--border);
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.kanban-col-title { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.kanban-col-count { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 12px; background: rgba(0,0,0,.06); color: var(--text-muted); }
.kanban-cards { padding: 10px; min-height: 80px; flex: 1; display: flex; flex-direction: column; gap: 9px; }
.kanban-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  cursor: grab;
  transition: var(--trans);
  box-shadow: var(--shadow-sm);
}
.kanban-card:hover { box-shadow: var(--shadow); border-color: var(--soft-teal); transform: translateY(-1px); }
.kanban-card.sortable-ghost { opacity: .35; }
.kanban-card.sortable-drag  { box-shadow: var(--shadow-md); transform: rotate(1.5deg); }
.kanban-company { font-size: 13px; font-weight: 600; color: var(--text); }
.kanban-contact { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.kanban-value { font-size: 12px; color: var(--green); font-weight: 600; margin-top: 6px; }
.kanban-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.kanban-date { font-size: 11px; color: var(--text-muted); }

/* Won/Lost column accents */
.kanban-col.won  .kanban-col-header { border-bottom-color: var(--green); }
.kanban-col.won  .kanban-col-title  { color: var(--green); }
.kanban-col.lost .kanban-col-header { border-bottom-color: var(--red); }
.kanban-col.lost .kanban-col-title  { color: var(--red); }

/* ── FILES ────────────────────────────────────────── */
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.file-icon { font-size: 22px; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 13.5px; font-weight: 500; color: var(--teal); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.file-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--soft-teal);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  background: rgba(182,207,208,.08);
  transition: var(--trans);
  cursor: pointer;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--teal); background: rgba(0,98,105,.05); }
.upload-zone input[type="file"] { display: none; }

/* ── DETAIL HEADER ────────────────────────────────── */
.detail-header {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.detail-avatar {
  width: 64px; height: 64px;
  border-radius: 14px;
  background: var(--teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.detail-avatar.lead { background: var(--purple); }
.detail-info { flex: 1; }
.detail-name { font-size: 22px; font-weight: 700; color: var(--text); }
.detail-meta { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 10px; }
.detail-meta-item { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.detail-meta-item svg { width: 14px; height: 14px; }
.detail-actions { display: flex; gap: 10px; flex-shrink: 0; align-self: flex-start; align-items: center; }

/* ── LOGIN ────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 50%, var(--teal-mid) 100%);
}
.login-brand-logo { display: block; max-width: 180px; margin-bottom: 28px; }
.login-card {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 44px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.login-logo { display: block; margin: 0 auto 32px; max-width: 200px; }
.login-title { font-size: 20px; font-weight: 700; color: var(--text); text-align: center; margin-bottom: 6px; }
.login-subtitle { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 32px; }
.login-btn {
  width: 100%;
  padding: 13px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--trans);
  margin-top: 8px;
}
.login-btn:hover { background: var(--teal-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,98,105,.35); }

/* ── SEARCH RESULTS ───────────────────────────────── */
.search-results-section { margin-bottom: 28px; }
.search-section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--text-muted); margin-bottom: 10px; }
.search-result-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  margin-bottom: 6px;
  transition: var(--trans);
}
.search-result-item:hover { border-color: var(--teal); box-shadow: var(--shadow-sm); }
.search-result-icon { width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; margin-right: 14px; flex-shrink: 0; }
.search-result-icon.client { background: rgba(0,98,105,.1); color: var(--teal); }
.search-result-icon.lead   { background: rgba(114,36,108,.1); color: var(--purple); }
.search-result-icon.contact { background: rgba(255,184,28,.12); color: var(--gold-dark); }
.search-result-icon svg { width: 18px; height: 18px; }
.search-result-name { font-weight: 600; font-size: 14px; color: var(--text); }
.search-result-sub  { font-size: 12px; color: var(--text-muted); }

/* ── UTILITIES ────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state svg { width: 48px; height: 48px; opacity: .4; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }
.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 8px; } .gap-3 { gap: 16px; }
.w-full { width: 100%; }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* Tom Select dropdown overflow fix */
.ts-wrapper { position: relative; }
.ts-dropdown { z-index: 9999 !important; }

/* ── Modals ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(10,15,25,.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 99999;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-dialog {
  background: #ffffff;
  color: #1c2b33;
  border: 1px solid #e0e6eb;
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 80px rgba(0,0,0,.35);
  padding: 32px;
  width: calc(100vw - 48px); max-width: 480px;
  transform: translateY(20px) scale(.97); transition: transform .22s ease;
}
.modal-overlay.open .modal-dialog { transform: translateY(0) scale(1); }
.modal-title { font-size: 18px; font-weight: 700; margin: 0 0 6px; color: var(--text); }
.modal-subtitle { font-size: 13.5px; color: var(--text-muted); margin: 0 0 22px; line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }
