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

:root {
  --blue:     #3b82f6;
  --blue-dk:  #2563eb;
  --blue-lt:  #1e3a5f;
  --blue-xlt: #0f2040;
  --bg:       #080c18;
  --surface:  #0f172a;
  --surface2: #1e293b;
  --border:   #243656;
  --gray-400: #64748b;
  --gray-500: #94a3b8;
  --gray-700: #cbd5e1;
  --gray-900: #f1f5f9;
  --green:    #22c55e;
  --green-bg: rgba(34,197,94,.1);
  --green-bd: rgba(34,197,94,.3);
  --red:      #ef4444;
  --red-bg:   rgba(220,38,38,.1);
  --red-bd:   rgba(220,38,38,.3);
  --r:        10px;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--gray-700);
  font-size: 14px;
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }
.hidden { display: none !important; }

/* ── Top bar ─────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: 60px;
  background: rgba(8,12,24,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 32px; gap: 32px;
}

.topbar-logo img { display: block; filter: brightness(0) invert(1); }

.topbar-nav {
  display: flex; gap: 4px; flex: 1;
}

.tnav {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  transition: background .15s, color .15s;
}
.tnav:hover { background: var(--surface2); color: var(--gray-900); }
.tnav.active { background: var(--blue-xlt); color: var(--blue); font-weight: 600; border: 1px solid var(--blue-lt); }

.topbar-right {
  display: flex; align-items: center; gap: 14px;
}

.agent-pill {
  display: flex; align-items: center; gap: 7px;
  background: var(--green-bg);
  border: 1px solid var(--green-bd);
  color: var(--green);
  font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 20px;
}
.agent-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue); color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: 2px solid var(--border);
}

/* ── Main ────────────────────────────────────────────────────────────── */
.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ── Page header ─────────────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; gap: 16px;
}
.page-header h1 {
  font-size: 26px; font-weight: 800; color: var(--gray-900);
  margin-bottom: 4px; letter-spacing: -.3px;
}
.page-sub { font-size: 14px; color: var(--gray-500); }

/* ── Verify banner ───────────────────────────────────────────────────── */
.verify-banner {
  background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3);
  color: #fde68a; font-size: 13px;
  padding: 12px 16px; border-radius: var(--r);
  margin-bottom: 24px;
}
.verify-banner a { font-weight: 600; color: #fde68a; text-decoration: underline; }

/* ── Metrics ─────────────────────────────────────────────────────────── */
.metrics {
  display: flex; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 36px;
}
.metric {
  flex: 1; text-align: center; padding: 24px 20px;
}
.metric-value {
  font-size: 32px; font-weight: 800; color: var(--blue); margin-bottom: 4px; line-height: 1;
}
.metric-value--status { font-size: 16px; color: var(--green); }
.metric-label { font-size: 12px; color: var(--gray-500); font-weight: 500; }
.metric-div { width: 1px; background: var(--border); height: 50px; align-self: center; }

/* ── Section row ─────────────────────────────────────────────────────── */
.section-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-row h2 { font-size: 16px; font-weight: 700; color: var(--gray-900); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--blue); color: #fff;
  padding: 9px 18px; border-radius: var(--r);
  font-size: 13px; font-weight: 700;
  transition: background .15s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--blue-dk); }

.btn-ghost {
  color: var(--blue); font-size: 13px; font-weight: 600;
  padding: 9px 14px; border-radius: var(--r);
  border: 1px solid var(--border);
  transition: background .15s, color .15s;
}
.btn-ghost:hover { background: var(--surface2); color: var(--gray-900); }

.btn-danger {
  background: var(--red); color: #fff;
  padding: 9px 18px; border-radius: var(--r);
  font-size: 13px; font-weight: 700;
  margin-top: 12px;
  transition: opacity .15s;
}
.btn-danger:hover { opacity: .85; }

.btn-logout {
  color: var(--gray-500); font-size: 13px; font-weight: 500;
  padding: 9px 14px; border-radius: var(--r);
  border: 1px solid var(--border);
  transition: background .15s, color .15s;
}
.btn-logout:hover { background: var(--surface2); color: var(--gray-900); }

/* ── Empty state ─────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 24px;
  background: var(--surface); border: 1.5px dashed var(--border);
  border-radius: 14px; color: var(--gray-400);
}
.empty-icon { font-size: 32px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; margin-bottom: 20px; color: var(--gray-500); }

/* ── Profile card ────────────────────────────────────────────────────── */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 20px;
  transition: box-shadow .15s, border-color .15s;
}
.profile-card:hover { box-shadow: 0 4px 20px rgba(59,130,246,.1); border-color: var(--blue-lt); }

.profile-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--blue-xlt); color: var(--blue);
  font-size: 20px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border: 1px solid var(--blue-lt);
}
.profile-info { flex: 1; min-width: 0; }
.profile-location { font-size: 15px; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.profile-meta { font-size: 12px; color: var(--gray-400); }
.profile-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  background: var(--green-bg); color: var(--green);
  border: 1px solid var(--green-bd);
}

/* Profile card (new layout from JS) */
.profile-main { flex: 1; min-width: 0; }
.profile-title { font-size: 15px; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.profile-meta  { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.pmeta { font-size: 12px; color: var(--gray-500); }
.pmeta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gray-400); }
.profile-tags  { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.ptag {
  font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 20px;
  background: var(--blue-xlt); color: var(--blue); border: 1px solid var(--blue-lt);
}
.ptag--freq { background: var(--surface2); color: var(--gray-500); border-color: var(--border); }
.profile-stats { font-size: 12px; color: var(--gray-400); }
.profile-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.btn-delete {
  padding: 6px 14px; border-radius: 7px;
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--border);
  color: var(--gray-500);
  transition: background .15s, color .15s, border-color .15s;
}
.btn-delete:hover { background: var(--red-bg); color: var(--red); border-color: var(--red-bd); }

.btn-start {
  padding: 6px 14px; border-radius: 7px;
  font-size: 12px; font-weight: 700;
  background: var(--green-bg); color: var(--green);
  border: 1px solid var(--green-bd);
  transition: background .15s, opacity .15s;
}
.btn-start:hover { background: rgba(34,197,94,.2); }
.btn-start:disabled { opacity: .5; }

.btn-stop {
  padding: 6px 14px; border-radius: 7px;
  font-size: 12px; font-weight: 700;
  background: var(--red-bg); color: var(--red);
  border: 1px solid var(--red-bd);
  transition: background .15s, opacity .15s;
}
.btn-stop:hover { background: rgba(220,38,38,.2); }
.btn-stop:disabled { opacity: .5; }

.profile-status-row { margin-bottom: 2px; }
.profile-status-badge {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 4px;
}
.profile-status-badge--active {
  background: var(--green-bg); color: var(--green); border: 1px solid var(--green-bd);
}
.profile-status-badge--paused {
  background: var(--surface2); color: var(--gray-400); border: 1px solid var(--border);
}

/* Skeleton loaders */
.skeleton { background: var(--surface2); border-radius: 14px; animation: shimmer 1.4s ease infinite; }
.sk-card { height: 100px; margin-bottom: 12px; }
@keyframes shimmer {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

/* ── Settings ────────────────────────────────────────────────────────── */
.settings-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
  margin-bottom: 16px;
}
.settings-block h3 { font-size: 14px; font-weight: 700; color: var(--gray-900); margin-bottom: 16px; }
.settings-block--danger { border-color: var(--red-bd); background: var(--red-bg); }
.settings-block--danger h3 { color: var(--red); }

.settings-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.settings-row:last-of-type { border-bottom: none; }
.settings-label { font-size: 13px; color: var(--gray-500); }
.settings-value { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.settings-hint { font-size: 12px; color: #fca5a5; margin-top: 8px; }

/* ── Modal ───────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.search-modal {
  background: #0d1525;
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px 0;
  position: sticky; top: 0;
  background: #0d1525;
  border-radius: 18px 18px 0 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 17px; font-weight: 800; color: var(--gray-900); }
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface2); color: var(--gray-500);
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.modal-close:hover { background: var(--border); color: var(--gray-900); }

/* Form inside modal */
.form-section { padding: 20px 28px 0; }
.form-section:last-of-type { padding-bottom: 0; }
.form-section-label {
  font-size: 11px; font-weight: 800; letter-spacing: .8px;
  color: var(--gray-400); text-transform: uppercase; margin-bottom: 14px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 600; color: var(--gray-500); }
.field input[type="text"],
.field input[type="date"] {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 13px; color: var(--gray-900);
  background: var(--bg);
  outline: none; transition: border-color .15s;
}
.field input:focus { border-color: var(--blue); }

.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-row--wrap { flex-wrap: wrap; }
.pill {
  padding: 6px 12px; border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: 12px; font-weight: 500; color: var(--gray-700);
  cursor: pointer; transition: all .15s; user-select: none;
  display: flex; align-items: center; gap: 6px;
}
.pill input { display: none; }
.pill:has(input:checked) {
  background: var(--blue-xlt); border-color: var(--blue); color: var(--blue); font-weight: 700;
}

.alert-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.alert-card {
  flex: 1; min-width: 140px;
  border: 1.5px solid var(--border);
  border-radius: 10px; padding: 14px;
  cursor: pointer; display: flex; align-items: center; gap: 10px;
  transition: border-color .15s, background .15s;
  background: var(--surface);
}
.alert-card input { display: none; }
.alert-card:has(input:checked) { border-color: var(--blue); background: var(--blue-xlt); }
.alert-card-body { flex: 1; }
.alert-card-title { font-size: 13px; font-weight: 700; color: var(--gray-900); margin-bottom: 2px; }
.alert-card-desc { font-size: 11px; color: var(--gray-400); }
.alert-card--pro { opacity: .5; pointer-events: none; }
.alert-card-check { font-size: 12px; color: var(--blue); opacity: 0; transition: opacity .15s; }
.alert-card:has(input:checked) .alert-card-check { opacity: 1; }

.pro-badge {
  font-size: 10px; font-weight: 800; padding: 2px 6px;
  background: linear-gradient(90deg,#3b82f6,#7c3aed); color: #fff;
  border-radius: 4px; margin-left: 4px;
}

/* ── Métier picker ───────────────────────────────────────────────────── */
.metier-search-wrapper { margin-bottom: 8px; }
.metier-search {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 13px; color: var(--gray-900); background: var(--bg);
  outline: none; transition: border-color .15s;
}
.metier-search:focus { border-color: var(--blue); }

.metier-count-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  background: var(--blue); color: #fff;
  padding: 2px 7px; border-radius: 20px;
  margin-left: 8px; vertical-align: middle;
}

.metier-picker {
  max-height: 240px; overflow-y: auto;
  border: 1.5px solid var(--border); border-radius: 10px;
  background: var(--bg);
}
.metier-picker::-webkit-scrollbar { width: 4px; }
.metier-picker::-webkit-scrollbar-track { background: transparent; }
.metier-picker::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.metier-group { padding: 6px 12px 8px; border-bottom: 1px solid var(--border); }
.metier-group:last-child { border-bottom: none; }
.metier-group--hidden { display: none; }

.metier-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0 8px; cursor: pointer;
}
.metier-group-label {
  font-size: 11px; font-weight: 800; letter-spacing: .5px;
  text-transform: uppercase; color: var(--gray-400);
}
.metier-select-all {
  font-size: 10px; color: var(--blue); font-weight: 600;
  cursor: pointer; background: none; border: none;
  padding: 2px 6px; border-radius: 4px;
  transition: background .12s;
}
.metier-select-all:hover { background: var(--blue-xlt); }

.metier-jobs { display: flex; flex-wrap: wrap; gap: 5px; }

.metier-pill {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: 11px; font-weight: 500; color: var(--gray-500);
  cursor: pointer; user-select: none; transition: all .12s;
}
.metier-pill input { display: none; }
.metier-pill:hover { border-color: var(--blue-lt); color: var(--gray-700); }
.metier-pill:has(input:checked) {
  background: var(--blue-xlt); border-color: var(--blue); color: var(--blue); font-weight: 700;
}
.metier-pill--hidden { display: none; }

/* ── Profile card — last run & auto schedule ─────────────────────────── */
.profile-lastrun {
  font-size: 11px; color: var(--gray-400); margin-top: 4px;
  display: flex; align-items: center; gap: 6px;
}
.profile-schedule-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .3px;
  background: var(--blue-xlt); color: var(--blue);
  border: 1px solid var(--blue-lt);
  padding: 2px 8px; border-radius: 20px;
  white-space: nowrap;
}
.ptag--more {
  background: var(--surface2); color: var(--gray-400);
  border-color: var(--border);
}

.form-error {
  margin: 16px 28px 0;
  background: var(--red-bg); border: 1px solid var(--red-bd);
  color: #fca5a5; font-size: 13px; padding: 10px 14px; border-radius: 8px;
}

.modal-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 20px 28px 24px;
  border-top: 1px solid var(--border); margin-top: 20px;
}

/* ── Teaser ──────────────────────────────────────────────────────────── */
.teaser-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1.5px dashed var(--border);
  border-radius: 14px; padding: 16px 20px;
  margin-bottom: 20px; color: var(--gray-500);
}
.teaser-soon {
  font-size: 10px; font-weight: 800; letter-spacing: .6px;
  text-transform: uppercase; color: var(--blue);
  background: var(--blue-xlt); padding: 3px 9px;
  border-radius: 20px; white-space: nowrap;
  border: 1px solid var(--blue-lt);
}
.teaser-text { font-size: 13px; }

/* ── Responsive mobile ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .topbar { padding: 0 16px; gap: 12px; height: 54px; }
  .topbar-logo img { height: 26px !important; }
  .topbar-nav { gap: 2px; }
  .tnav { padding: 5px 9px; font-size: 12px; }
  .agent-pill { display: none; }

  .main { padding: 24px 16px 60px; }

  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-header h1 { font-size: 20px; }

  .metrics { flex-direction: column; }
  .metric { padding: 16px; }
  .metric-div { width: 80%; height: 1px; align-self: center; }
  .metric-value { font-size: 26px; }

  .profile-card { flex-wrap: wrap; }
  .profile-actions { width: 100%; flex-direction: row; justify-content: flex-end; }

  .search-modal { border-radius: 14px 14px 0 0; max-height: 95vh; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .alert-cards { flex-direction: column; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn-primary,
  .modal-actions .btn-ghost { width: 100%; text-align: center; justify-content: center; }

  .teaser-card { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ── User dropdown ───────────────────────────────────────────────────── */
.topbar-user { position: relative; }

.user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 240px;
  background: #0d1525;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,.6);
  z-index: 200;
  overflow: hidden;
  animation: dropIn .15s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.udrop-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
}
.udrop-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--blue); color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--blue-lt);
}
.udrop-info { min-width: 0; }
.udrop-name  { font-size: 13px; font-weight: 700; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.udrop-email { font-size: 11px; color: var(--gray-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.udrop-plan  {
  font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 20px;
  background: var(--blue-xlt); color: var(--blue); border: 1px solid var(--blue-lt);
}
.udrop-plan--pro    { background: linear-gradient(90deg,rgba(59,130,246,.15),rgba(124,58,237,.15)); color: #a78bfa; border-color: rgba(124,58,237,.3); }
.udrop-plan--max { background: rgba(245,158,11,.1); color: #fbbf24; border-color: rgba(245,158,11,.3); }

.udrop-divider { height: 1px; background: var(--border); margin: 2px 0; }

.udrop-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 16px;
  font-size: 13px; font-weight: 500; color: var(--gray-500);
  text-align: left;
  transition: background .12s, color .12s;
}
.udrop-item svg { flex-shrink: 0; opacity: .6; }
.udrop-item:hover { background: var(--surface2); color: var(--gray-900); }
.udrop-item:hover svg { opacity: 1; }
.udrop-item--danger { color: var(--red); }
.udrop-item--danger svg { color: var(--red); opacity: .7; }
.udrop-item--danger:hover { background: var(--red-bg); color: var(--red); }

/* ── Abonnement ──────────────────────────────────────────────────────── */
.sub-current {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
  margin-bottom: 28px;
}
.sub-plan-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--gray-400); margin-bottom: 6px; }
.sub-plan-name  { font-size: 22px; font-weight: 800; color: var(--gray-900); margin-bottom: 4px; }
.sub-plan-desc  { font-size: 13px; color: var(--gray-500); }
.sub-plan-badge {
  font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 20px;
  background: var(--green-bg); color: var(--green); border: 1px solid var(--green-bd);
}

.sub-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.sub-plan-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.sub-plan-card--pro {
  border-color: var(--blue-lt);
  box-shadow: 0 0 0 1px var(--blue-lt);
}
.sub-plan-card--max { border-color: rgba(245,158,11,.3); }

.sub-popular {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  background: var(--blue); color: #fff;
  padding: 3px 12px; border-radius: 20px;
  white-space: nowrap;
}

.sub-plan-card-header { }
.sub-plan-card-name { font-size: 15px; font-weight: 800; color: var(--gray-900); margin-bottom: 6px; }
.sub-plan-card-price { font-size: 26px; font-weight: 800; color: var(--gray-900); }
.sub-plan-card-price span { font-size: 13px; font-weight: 500; color: var(--gray-400); }

.sub-features { list-style: none; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sub-feature {
  font-size: 13px; color: var(--gray-500);
  display: flex; align-items: center; gap: 8px;
}
.sub-feature::before { content: ''; display: block; width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.sub-feature--ok { color: var(--gray-700); }
.sub-feature--ok::before { background: var(--green); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M2 6l3 3 5-5'/%3E%3C/svg%3E"); }
.sub-feature--no { color: var(--gray-400); text-decoration: line-through; }
.sub-feature--no::before { background: var(--surface2); border: 1px solid var(--border); }

.sub-btn-upgrade {
  width: 100%; padding: 10px; border-radius: 9px;
  background: var(--blue); color: #fff;
  font-size: 13px; font-weight: 700;
  transition: background .15s;
}
.sub-btn-upgrade:hover { background: var(--blue-dk); }
.sub-btn-upgrade--max { background: rgba(245,158,11,.15); color: #fbbf24; border: 1px solid rgba(245,158,11,.3); }
.sub-btn-upgrade--max:hover { background: rgba(245,158,11,.25); }

.sub-plan-current-tag {
  text-align: center; font-size: 12px; font-weight: 600; color: var(--gray-400);
  padding: 8px; border-radius: 8px; background: var(--surface2);
}

@media (max-width: 640px) {
  .sub-plans { grid-template-columns: 1fr; }
  .sub-current { flex-direction: column; align-items: flex-start; gap: 12px; }
  .user-dropdown { width: 210px; }
}

/* ── Map ─────────────────────────────────────────────────────────────── */
#offers-map {
  width: 100%; height: 480px;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
}

.map-legend {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--gray-400); font-weight: 600;
}
.map-legend-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.3);
}

/* Custom SVG map popup */
#offer-popup {
  background: #0d1525;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.75);
  pointer-events: auto;
}
#offer-popup::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: var(--border);
}

/* Map popup content */
.map-popup { padding: 16px 18px; min-width: 230px; max-width: 280px; }
.mp-score {
  display: inline-block; font-size: 10px; font-weight: 800;
  padding: 2px 8px; border-radius: 20px; margin-bottom: 8px;
}
.mp-score--green { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-bd); }
.mp-score--yellow { background: rgba(245,158,11,.1); color: #fbbf24; border: 1px solid rgba(245,158,11,.3); }
.mp-score--red { background: var(--red-bg); color: #fca5a5; border: 1px solid var(--red-bd); }
.mp-title { font-size: 14px; font-weight: 800; color: var(--gray-900); margin-bottom: 4px; line-height: 1.3; }
.mp-employer { font-size: 12px; font-weight: 600; color: var(--gray-700); margin-bottom: 2px; }
.mp-lieu  { font-size: 11px; color: var(--gray-500); margin-bottom: 2px; }
.mp-dates { font-size: 11px; color: var(--gray-400); margin-bottom: 10px; }
.mp-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.mp-badge {
  font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 20px;
  border: 1px solid var(--border); color: var(--gray-400); white-space: nowrap;
}
.mp-badge--green { background: var(--green-bg); color: var(--green); border-color: var(--green-bd); }
.mp-badge--blue  { background: var(--blue-xlt); color: var(--blue); border-color: var(--blue-lt); }
.mp-actions { display: flex; flex-direction: column; gap: 6px; }
.mp-btn-view {
  display: block; text-align: center;
  padding: 7px 12px; border-radius: 7px;
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); color: var(--gray-500);
  transition: background .15s, color .15s;
}
.mp-btn-view:hover { background: var(--surface2); color: var(--gray-900); }
.mp-btn-generate {
  width: 100%; padding: 8px 12px; border-radius: 7px;
  font-size: 12px; font-weight: 700;
  background: rgba(245,158,11,.1); color: #fbbf24;
  border: 1px solid rgba(245,158,11,.3);
  transition: background .15s; cursor: pointer;
}
.mp-btn-generate:hover { background: rgba(245,158,11,.2); }

.map-empty {
  display: flex; align-items: center; justify-content: center;
  height: 480px; border-radius: 14px;
  border: 1.5px dashed var(--border);
  color: var(--gray-400); font-size: 13px; text-align: center; padding: 24px;
}

.map-locked {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; height: 480px; border-radius: 14px;
  border: 1.5px dashed var(--border);
  background: linear-gradient(135deg, #0b1120 0%, #0d1a2e 100%);
  text-align: center; padding: 32px;
}
.map-locked-icon { font-size: 48px; opacity: .6; }
.map-locked-title { font-size: 18px; font-weight: 700; color: var(--text); }
.map-locked-desc { font-size: 14px; color: var(--gray-400); line-height: 1.6; max-width: 380px; }
.map-locked-desc strong { color: #a78bfa; }
.map-locked-btn {
  margin-top: 8px; padding: 10px 24px; border-radius: 8px; border: none;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: opacity .15s;
}
.map-locked-btn:hover { opacity: .85; }

@media (max-width: 640px) {
  #offers-map { height: 340px; }
}

/* ── Offer card ──────────────────────────────────────────────────────── */
.offer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 20px;
  transition: box-shadow .15s, border-color .15s;
}
.offer-card:hover { box-shadow: 0 4px 20px rgba(59,130,246,.08); border-color: var(--blue-lt); }
.offer-main { flex: 1; min-width: 0; }
.offer-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.offer-title { font-size: 15px; font-weight: 700; color: var(--gray-900); }

.offer-score {
  font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 20px;
  background: var(--green-bg); color: var(--green); border: 1px solid var(--green-bd);
  white-space: nowrap;
}
.offer-score--mid { background: rgba(245,158,11,.1); color: #fbbf24; border-color: rgba(245,158,11,.3); }

.offer-meta {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 12px; color: var(--gray-500); margin-bottom: 8px;
}
.offer-badges { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.offer-badge {
  font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px;
  border: 1px solid var(--border); color: var(--gray-400);
}
.offer-badge--green { background: var(--green-bg); color: var(--green); border-color: var(--green-bd); }
.offer-badge--blue  { background: var(--blue-xlt); color: var(--blue); border-color: var(--blue-lt); }
.offer-source { font-size: 11px; color: var(--gray-400); margin-left: 2px; }

.offer-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex-shrink: 0; }

.btn-view-offer {
  padding: 6px 14px; border-radius: 7px;
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); color: var(--gray-500);
  transition: background .15s, color .15s; white-space: nowrap;
  display: inline-block; text-align: center;
}
.btn-view-offer:hover { background: var(--surface2); color: var(--gray-900); }

.btn-generate {
  padding: 7px 14px; border-radius: 7px;
  font-size: 12px; font-weight: 700;
  background: rgba(245,158,11,.1); color: #fbbf24;
  border: 1px solid rgba(245,158,11,.3);
  transition: background .15s; white-space: nowrap;
}
.btn-generate:hover { background: rgba(245,158,11,.2); }
.btn-generate:disabled { opacity: .5; cursor: not-allowed; }
.btn-generate--locked {
  background: var(--surface2); color: var(--gray-400);
  border-color: var(--border); font-size: 11px;
}
.btn-generate--locked:hover { background: var(--surface2); color: var(--gray-500); }

.offers-empty {
  text-align: center; padding: 32px 24px;
  background: var(--surface); border: 1.5px dashed var(--border);
  border-radius: 14px; color: var(--gray-400); font-size: 13px;
}

/* ── Message modal ───────────────────────────────────────────────────── */
.msg-modal {
  background: #0d1525;
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%; max-width: 580px;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.msg-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
}
.msg-modal-head h3 { font-size: 16px; font-weight: 800; color: var(--gray-900); margin-bottom: 4px; }
.msg-offer-info { font-size: 12px; color: var(--gray-500); }

.msg-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 52px 28px; gap: 16px; color: var(--gray-500); font-size: 13px;
}
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--blue);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.msg-body { padding: 22px 28px 0; }
.msg-textarea {
  width: 100%; min-height: 220px;
  background: var(--bg); color: var(--gray-700);
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 14px 16px; font-size: 13px; line-height: 1.7;
  font-family: inherit; resize: vertical; outline: none;
  transition: border-color .15s;
}
.msg-textarea:focus { border-color: var(--blue); }
.msg-tip {
  margin-top: 10px; font-size: 12px; color: var(--blue);
  background: var(--blue-xlt); border: 1px solid var(--blue-lt);
  padding: 9px 14px; border-radius: 8px;
}
.msg-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 20px 28px 24px;
  border-top: 1px solid var(--border); margin-top: 20px;
}
.btn-copy {
  padding: 9px 20px; border-radius: var(--r);
  font-size: 13px; font-weight: 700;
  background: var(--blue); color: #fff;
  transition: background .15s;
}
.btn-copy:hover { background: var(--blue-dk); }
.btn-copy--copied { background: var(--green) !important; }

@media (max-width: 640px) {
  .offer-card { flex-wrap: wrap; }
  .offer-actions { width: 100%; flex-direction: row; justify-content: flex-end; }
  .msg-modal { border-radius: 14px 14px 0 0; max-height: 95vh; overflow-y: auto; }
}

/* ── Toast ───────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--surface2); color: var(--gray-900);
  border: 1px solid var(--border);
  padding: 12px 22px; border-radius: 30px;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  z-index: 9999; white-space: nowrap;
  animation: slideUp .2s ease;
}
.toast--success { background: var(--green-bg); border-color: var(--green-bd); color: var(--green); }
.toast--error   { background: var(--red-bg);   border-color: var(--red-bd);   color: #fca5a5;    }
@keyframes slideUp {
  from { transform: translateX(-50%) translateY(10px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}
