/* ─── TOKENS ─────────────────────────────────────── */
:root {
  --bg:       #0c0c0f;
  --surface:  #13131a;
  --card:     #1a1a24;
  --border:   #2a2a38;
  --accent:   #7c6af7;
  --accent2:  #f76a8a;
  --green:    #4ade80;
  --yellow:   #fbbf24;
  --text:     #e8e8f0;
  --muted:    #6b6b80;
  --font-h:   'Syne', sans-serif;
  --font-b:   'DM Sans', sans-serif;
  --radius:   14px;
  --radius-sm:8px;
  --shadow:   0 4px 32px rgba(0,0,0,.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 10% 0%, rgba(124,106,247,.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 90% 100%, rgba(247,106,138,.08) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* ─── LAYOUT ─────────────────────────────────────── */
#root { position: relative; z-index: 1; }

.page-layout {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.main-col { flex: 1; min-width: 0; max-width: 680px; }
.preview-col {
  width: 400px;
  flex-shrink: 0;
  position: sticky;
  top: 28px;
}
@media (max-width: 900px) {
  .page-layout { flex-direction: column; padding: 0 16px 80px; }
  .preview-col { width: 100%; position: static; }
}

/* ─── HEADER ─────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 40px;
}
.logo {
  font-family: var(--font-h);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}
.logo span { font-size: 18px; opacity: .5; font-weight: 400; }

/* ─── USER MENU ───────────────────────────────────── */
#userMenu { position: relative; display: flex; align-items: center; gap: 10px; }
.menu-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px;
  transition: border-color .2s, background .2s;
}
.menu-btn:hover { border-color: var(--accent); background: var(--surface); }
#dropdown {
  position: absolute; right: 0; top: 48px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px; min-width: 160px;
  box-shadow: var(--shadow); z-index: 100;
}
#dropdown.hidden { display: none; }
#dropdown button {
  width: 100%; background: transparent; border: none;
  color: var(--text); padding: 8px 12px; text-align: left;
  border-radius: 6px; cursor: pointer; font-family: var(--font-b);
  font-size: 14px; transition: background .15s;
}
#dropdown button:hover { background: rgba(255,255,255,.06); color: var(--accent2); }

/* ─── CREDITS PILL + ADD BUTTON ─────────────────── */
.credits-area {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.credits-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 14px 6px 10px;
  font-size: 13px; font-weight: 500;
}
.credits-pill .dot {
  width: 8px; height: 8px;
  background: var(--green); border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.btn-add-credits {
  width: 28px; height: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
  font-size: 18px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s;
  flex-shrink: 0;
}
.btn-add-credits:hover { border-color: var(--accent); background: rgba(124,106,247,.1); }

/* Credits modal */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65); backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center; justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; animation: fadeIn .2s ease; }
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px; width: 100%; max-width: 400px;
  box-shadow: var(--shadow);
  animation: slideUp .25s ease;
}
.modal-title {
  font-family: var(--font-h);
  font-weight: 700; font-size: 18px;
  margin-bottom: 20px;
}
.modal-close {
  float: right; background: none; border: none;
  color: var(--muted); font-size: 20px; cursor: pointer;
  line-height: 1; margin-top: -4px;
}
.modal-close:hover { color: var(--text); }

/* Pack cards */
.pack-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.pack-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  cursor: pointer; transition: border-color .2s, background .2s;
}
.pack-card:hover { border-color: var(--accent); background: rgba(124,106,247,.06); }
.pack-card.selected { border-color: var(--accent); background: rgba(124,106,247,.1); }
.pack-icon { font-size: 28px; flex-shrink: 0; }
.pack-info { flex: 1; }
.pack-name { font-weight: 600; font-size: 14px; }
.pack-desc { font-size: 12px; color: var(--muted); margin-top: 1px; }
.pack-price {
  font-family: var(--font-h); font-weight: 700;
  font-size: 18px; color: var(--accent);
}

/* ─── CARD ────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin-bottom: 16px;
}
.card-title {
  font-family: var(--font-h); font-weight: 700; font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}

/* ─── AUTH CARD ───────────────────────────────────── */
#auth { margin-top: 60px; }
#auth .card { padding: 36px; }
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h2 {
  font-family: var(--font-h); font-weight: 800; font-size: 36px; letter-spacing: -1px;
  background: linear-gradient(135deg, var(--accent) 30%, var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 6px;
}
.auth-header p { color: var(--muted); font-size: 14px; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.auth-divider {
  text-align: center; margin: 16px 0 8px;
  color: var(--muted); font-size: 13px; position: relative;
}
.auth-divider::before,.auth-divider::after {
  content:''; position:absolute; top:50%; width:38%; height:1px; background:var(--border);
}
.auth-divider::before{left:0} .auth-divider::after{right:0}

/* ─── FORM ELEMENTS ──────────────────────────────── */
.field { margin-bottom: 14px; }
label.field-label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px;
}
input[type="text"], input[type="password"], input[type="email"], textarea, select {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font-b); font-size: 14px; padding: 11px 14px;
  outline: none; transition: border-color .2s, box-shadow .2s; appearance: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,106,247,.15);
}
textarea { resize: vertical; min-height: 100px; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6b80' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; cursor: pointer;
}
select option { background: var(--card); }
input[type="color"] { width: 48px; height: 36px; padding: 2px; border-radius: 8px; cursor: pointer; }
input[type="file"] {
  background: var(--surface); border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm); padding: 20px; cursor: pointer;
  color: var(--muted); font-size: 13px; transition: border-color .2s; width: 100%;
}
input[type="file"]:hover { border-color: var(--accent); color: var(--text); }

/* char counter */
.char-counter {
  text-align: right; font-size: 11px; color: var(--muted);
  margin-top: 4px; transition: color .2s;
}
.char-counter.warn { color: var(--yellow); }
.char-counter.over { color: var(--accent2); }

/* color row */
.color-row { display: flex; align-items: center; gap: 12px; }
.color-row input[type="color"] { flex-shrink: 0; }
.color-row span { font-size: 13px; color: var(--muted); }

/* checkbox */
.check-label {
  display: flex; align-items: center; gap: 10px; font-size: 14px;
  cursor: pointer; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color .2s; user-select: none;
}
.check-label:hover { border-color: var(--accent); }
.check-label input[type="checkbox"] { display: none; }
.check-box {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--border); background: var(--card);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .15s, border-color .15s;
}
.check-label input:checked ~ .check-box { background: var(--accent); border-color: var(--accent); }
.check-box::after { content: '✓'; font-size: 11px; color: #fff; opacity: 0; }
.check-label input:checked ~ .check-box::after { opacity: 1; }
.checks-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checks-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* meta grid */
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.meta-grid .field:last-child:nth-child(odd) { grid-column: 1/-1; }

/* ─── CONSIGNE TOGGLE ─────────────────────────────── */
.input-toggle {
  display: flex; gap: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 3px; width: fit-content;
}
.toggle-btn {
  background: none; border: none; color: var(--muted);
  font-family: var(--font-b); font-size: 13px; font-weight: 500;
  padding: 6px 14px; border-radius: 6px; cursor: pointer;
  transition: background .15s, color .15s;
}
.toggle-btn.active { background: var(--card); color: var(--text); }

/* ─── FONT SELECT ─────────────────────────────────── */
.font-select-wrapper { position: relative; }
.font-select-display {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 16px; padding: 11px 36px 11px 14px;
  cursor: pointer; transition: border-color .2s;
  display: flex; align-items: center; justify-content: space-between;
  user-select: none;
}
.font-select-display:hover { border-color: var(--accent); }
.font-select-display.open { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,106,247,.15); }
.font-select-display::after {
  content: '';
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 6px solid var(--muted); pointer-events: none;
}
.font-dropdown {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow); z-index: 200;
  overflow: hidden;
}
.font-dropdown.open { display: block; animation: slideUp .15s ease; }
.font-option {
  padding: 12px 16px; cursor: pointer; color: var(--text);
  transition: background .12s;
  display: flex; align-items: center; justify-content: space-between;
}
.font-option:hover { background: rgba(124,106,247,.1); }
.font-option.selected { background: rgba(124,106,247,.12); color: var(--accent); }
.font-option .font-name { font-size: 18px; }
.font-option .font-label { font-size: 11px; color: var(--muted); font-family: var(--font-b); }

/* ─── TABLE STYLE PICKER ─────────────────────────── */
.table-style-btn {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font-b); font-size: 14px; padding: 11px 14px;
  cursor: pointer; transition: border-color .2s; text-align: left;
  display: flex; align-items: center; gap: 10px;
}
.table-style-btn:hover { border-color: var(--accent); }
.table-style-btn .table-thumb {
  width: 40px; height: 28px; object-fit: cover;
  border-radius: 3px; border: 1px solid var(--border);
  background: #fff; flex-shrink: 0;
}
.table-style-btn .table-thumb-placeholder {
  width: 40px; height: 28px; border-radius: 3px;
  border: 1px solid var(--border); background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}

/* Table modal */
.table-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.table-choice {
  cursor: pointer; border-radius: var(--radius-sm);
  border: 2px solid var(--border); overflow: hidden;
  background: #fff; transition: border-color .2s, transform .15s;
  aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center;
}
.table-choice:hover { border-color: var(--accent); transform: scale(1.03); }
.table-choice.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,106,247,.2); }
.table-choice img { width: 100%; height: 100%; object-fit: cover; display: block; }
.table-choice .table-fallback {
  width: 100%; height: 100%; background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 8px;
}
.table-choice .table-fallback span { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.3; }
.table-choice .table-fallback .tbl-icon { font-size: 20px; }
.table-name {
  font-size: 11px; color: var(--muted); text-align: center;
  margin-top: 4px; line-height: 1.3;
}
.table-item { display: flex; flex-direction: column; }

/* ─── ACCENT SELECTOR ────────────────────────────── */
.accent-selector {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px;
}
.accent-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer; font-size: 11px; font-weight: 700;
  font-family: var(--font-b); color: #fff;
  transition: border-color .15s, transform .15s;
  background: var(--surface);
}
.accent-btn:hover { transform: scale(1.1); }
.accent-btn.selected { border-color: var(--text); transform: scale(1.12); }
.accent-btn[data-accent="0"] { background: var(--surface); color: var(--muted); border-color: var(--border); }
.accent-btn[data-accent="0"].selected { border-color: var(--text); }

/* ─── BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-b); font-size: 14px; font-weight: 500;
  padding: 12px 20px; border-radius: var(--radius-sm); border: none;
  cursor: pointer; transition: all .2s; text-decoration: none; width: 100%;
  letter-spacing: .01em; position: relative; overflow: hidden;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6257e0);
  color: #fff; box-shadow: 0 4px 20px rgba(124,106,247,.35);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(124,106,247,.5); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); background: rgba(124,106,247,.08); }
.btn-success { background: rgba(74,222,128,.12); color: var(--green); border: 1px solid rgba(74,222,128,.25); }
.btn-success:hover:not(:disabled) { background: rgba(74,222,128,.2); }
.btn-ghost { background: none; border: none; color: var(--muted); cursor: pointer; font-family: var(--font-b); font-size: 13px; padding: 6px; }
.btn-ghost:hover { color: var(--text); }

.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite; display: none; flex-shrink: 0;
}
.btn.loading .spinner { display: block; }
.btn.loading .btn-text { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── PRICE BADGE ────────────────────────────────── */
.price-badge {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(124,106,247,.08); border: 1px solid rgba(124,106,247,.2);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 14px;
}
.price-badge-left { display: flex; flex-direction: column; gap: 2px; }
.price-badge-left span:first-child { font-size: 13px; color: var(--muted); }
.price-surcharge { font-size: 11px; color: var(--yellow); }
.price-badge strong { font-size: 20px; font-family: var(--font-h); color: var(--accent); }

/* ─── LOGS ────────────────────────────────────────── */
#logs {
  background: #08080d; border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: #a0e890;
  font-family: 'Courier New', monospace; font-size: 12px;
  height: 160px; overflow: auto; padding: 14px 16px; line-height: 1.8;
}
#logs .log-line { animation: fadeInLog .2s ease; }
@keyframes fadeInLog { from{opacity:0;transform:translateX(-4px)} to{opacity:1} }
#logs .log-done  { color: var(--green); font-weight: bold; }
#logs .log-error { color: var(--accent2); }

/* ─── JOBS ────────────────────────────────────────── */
.job-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 10px; animation: slideUp .3s ease;
}
.job-card.no-anim { animation: none; }
@keyframes slideUp { from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)} }
.job-meta { flex: 1; min-width: 0; }
.job-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-sub   { font-size: 12px; color: var(--muted); margin-top: 2px; }
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 99px;
}
.status-done   { background: rgba(74,222,128,.12); color: var(--green); }
.status-pending{ background: rgba(251,191,36,.12);  color: var(--yellow); }
.status-error  { background: rgba(247,106,138,.12); color: var(--accent2); }

/* ─── TOAST ───────────────────────────────────────── */
#toast-container {
  position: fixed; top: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 18px;
  min-width: 280px; max-width: 360px; box-shadow: var(--shadow);
  animation: toastIn .35s cubic-bezier(.34,1.56,.64,1); pointer-events: all;
}
.toast.hide { animation: toastOut .25s ease forwards; }
@keyframes toastIn  { from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)} }
@keyframes toastOut { to{opacity:0;transform:translateX(20px)} }
.toast-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.toast-title { font-weight: 600; font-size: 14px; }
.toast-msg   { font-size: 13px; color: var(--muted); margin-top: 2px; }
.toast.success { border-color: rgba(74,222,128,.3); }
.toast.error   { border-color: rgba(247,106,138,.3); }
.toast.info    { border-color: rgba(124,106,247,.3); }

/* ─── DOCUMENT PREVIEW ───────────────────────────── */
.preview-label {
  font-family: var(--font-h); font-weight: 700; font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.doc-preview {
  background: #fff; border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.3);
  aspect-ratio: 1000/1414;
  overflow: hidden; padding: 40px 40px 40px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
}
.doc-preview::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px; background: var(--preview-color, #1F4E79);
}
.doc-preview-title {
  font-size: 16px; font-weight: bold; line-height: 1.3;
  color: var(--preview-color, #1F4E79);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 100%;
}
.doc-preview-subtitle {
  font-size: 13px; font-weight: bold; line-height: 1.3;
  color: var(--preview-color, #1F4E79);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 100%;
}
.doc-preview-sub {
  font-size: 12px; color: #555; line-height: 1.4;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.doc-preview-table {
  width: 100%; object-fit: cover; border-radius: 3px;
  max-height: auto; display: block;
}
.doc-preview-table-placeholder {
  height: 55px;
  background: #f0f0f5; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #aaa;
}

/* ─── SECTION TITLE ──────────────────────────────── */
.section-title {
  font-family: var(--font-h); font-weight: 700; font-size: 16px; margin-bottom: 12px;
}

/* ─── MISC ────────────────────────────────────────── */
.hidden { display: none !important; }
#app { animation: fadeIn .4s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }
@media (max-width: 500px) {
  .meta-grid, .checks-row, .auth-row { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .table-grid { grid-template-columns: repeat(2, 1fr); }
  .checks-row-3 { grid-template-columns: 1fr 1fr; }
}

/* ─── AUTH MODAL ──────────────────────────────────── */
#authModal .modal { max-width: 420px; }
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h2 {
  font-family: var(--font-h); font-weight: 800; font-size: 32px; letter-spacing: -1px;
  background: linear-gradient(135deg, var(--accent) 30%, var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 6px;
}
.auth-header p { color: var(--muted); font-size: 14px; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.auth-divider {
  text-align: center; margin: 16px 0 8px;
  color: var(--muted); font-size: 13px; position: relative;
}
.auth-divider::before,.auth-divider::after {
  content:''; position:absolute; top:50%; width:38%; height:1px; background:var(--border);
}
.auth-divider::before{left:0} .auth-divider::after{right:0}

/* ─── LANGUAGE SWITCH ────────────────────────────── */
.lang-switch {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px; gap: 0;
}
.lang-btn {
  background: none; border: none;
  color: var(--muted);
  font-family: var(--font-b); font-size: 13px; font-weight: 600;
  padding: 5px 12px; border-radius: 6px;
  cursor: pointer;
  transition: background .15s, color .15s;
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.lang-btn.active { background: var(--card); color: var(--text); }

/* ─── LANG CODE BADGE ────────────────────────────── */
.lang-code {
  font-family: var(--font-h); font-weight: 700; font-size: 11px;
  letter-spacing: .05em; color: var(--accent);
  background: rgba(124,106,247,.15);
  padding: 1px 5px; border-radius: 4px;
}
.lang-btn.active .lang-code { background: var(--accent); color: #fff; }

/* ─── CHARTS PICKER BUTTON ───────────────────────── */
.charts-btn {
  width: 100%;
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-family: var(--font-b); font-size: 14px;
  padding: 12px 16px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  text-align: left;
}
.charts-btn:hover { border-color: var(--accent); color: var(--text); }
.charts-btn.has-selection { border-color: var(--accent); border-style: solid; color: var(--text); }

.charts-selected-pills {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.chart-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(124,106,247,.12);
  border: 1px solid rgba(124,106,247,.25);
  color: var(--accent);
  border-radius: 99px;
  font-size: 11px; font-weight: 600;
  padding: 3px 8px;
}
.chart-pill button {
  background: none; border: none; color: var(--accent);
  cursor: pointer; font-size: 14px; line-height: 1;
  padding: 0; margin: 0; display: flex; align-items: center;
}
.chart-pill button:hover { color: var(--accent2); }

/* ─── CHARTS MODAL GRID ──────────────────────────── */
.charts-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-bottom: 4px;
}
@media(max-width:500px) { .charts-modal-grid { grid-template-columns: repeat(2, 1fr); } }

.chart-choice {
  cursor: pointer; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: var(--surface);
  overflow: hidden; transition: border-color .2s, transform .15s, background .2s;
  display: flex; flex-direction: column; user-select: none;
}
.chart-choice:hover { border-color: var(--accent); transform: scale(1.03); background: rgba(124,106,247,.06); }
.chart-choice.selected { border-color: var(--accent); background: rgba(124,106,247,.1); }
.chart-choice.selected .chart-choice-check { opacity: 1; }
.chart-choice-img {
  width: 100%; aspect-ratio: 3/2;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; background: var(--card);
  position: relative; overflow: hidden;
}
.chart-choice-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chart-choice-check {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff;
  opacity: 0; transition: opacity .15s;
}
.chart-choice-label {
  padding: 8px 10px; font-size: 12px; font-weight: 600;
  color: var(--muted); text-align: center; line-height: 1.3;
}
.chart-choice.selected .chart-choice-label { color: var(--accent); }
/* ─── FOOTER ──────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 48px 24px 0;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 60px;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-bottom: 40px;
}
.footer-brand {
  max-width: 280px;
}
.footer-logo {
  font-family: var(--font-h);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 10px;
}
.footer-logo span { opacity: .5; font-weight: 400; }
.footer-tagline {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 20px;
}
.footer-stripe {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 120px;
}
.footer-col-title {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.footer-col a {
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  opacity: .7;
  transition: opacity .15s, color .15s;
}
.footer-col a:hover { opacity: 1; color: var(--accent); }
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
@media (max-width: 600px) {
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-brand { max-width: 100%; }
}
/* ─── COVER MODAL GRID ───────────────────────────── */
.cover-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 4px;
}
@media(max-width:500px) { .cover-modal-grid { grid-template-columns: repeat(2, 1fr); } }

.cover-choice {
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .2s, transform .15s;
  display: flex; flex-direction: column;
  user-select: none;
}
.cover-choice:hover { border-color: var(--accent); transform: scale(1.03); }
.cover-choice.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,106,247,.2); }
.cover-choice.selected .cover-check { opacity: 1; }

.cover-choice-img {
  width: 100%; aspect-ratio: 3/4;
  position: relative; overflow: hidden;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
}
.cover-choice-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.cover-fallback {
  display: none; width: 100%; height: 100%;
  align-items: center; justify-content: center;
  background: var(--card); font-size: 32px;
}
.cover-check {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff;
  opacity: 0; transition: opacity .15s;
}
.cover-name {
  padding: 7px 8px; font-size: 12px; font-weight: 600;
  color: var(--muted); text-align: center; line-height: 1.3;
  background: var(--surface);
}
.cover-choice.selected .cover-name { color: var(--accent); }

/* ─── LEGAL PAGES ────────────────────────────────── */
.legal-wrap { max-width: 720px; margin: 0 auto; padding: 60px 24px 80px; }
.legal-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px; text-decoration: none;
  margin-bottom: 32px; transition: color .15s;
}
.legal-back:hover { color: var(--accent); }
.legal-title {
  font-family: var(--font-h); font-weight: 800; font-size: 32px;
  letter-spacing: -0.5px; margin-bottom: 8px;
}
.legal-date { font-size: 13px; color: var(--muted); margin-bottom: 40px; }
.legal-section { margin-bottom: 36px; }
.legal-section h2 {
  font-family: var(--font-h); font-weight: 700; font-size: 16px;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.legal-section p,
.legal-section li {
  font-size: 14px; color: #b0b0c0; line-height: 1.8; margin-bottom: 8px;
}
.legal-section ul { padding-left: 20px; }
.legal-section strong { color: var(--text); }
a.legal-link { color: var(--accent); text-decoration: none; }
a.legal-link:hover { text-decoration: underline; }

/* Tables inside legal pages */
.data-table,
.pricing-table,
.cookie-table {
  width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px;
}
.data-table th,
.pricing-table th,
.cookie-table th {
  background: var(--card); color: var(--text);
  padding: 10px 14px; text-align: left;
  border: 1px solid var(--border); font-weight: 600;
}
.data-table td,
.pricing-table td,
.cookie-table td {
  background: var(--surface); color: #b0b0c0;
  padding: 10px 14px; border: 1px solid var(--border); vertical-align: top;
}

/* Badges inside cookie table */
.badge {
  display: inline-block; padding: 2px 8px;
  border-radius: 99px; font-size: 11px; font-weight: 600;
}
.badge-required  { background: rgba(247,106,138,.12); color: #f76a8a; border: 1px solid rgba(247,106,138,.25); }
.badge-functional{ background: rgba(124,106,247,.12); color: #7c6af7; border: 1px solid rgba(124,106,247,.25); }
.badge-third     { background: rgba(251,191,36,.12);  color: #fbbf24; border: 1px solid rgba(251,191,36,.25); }
/* ─── DOC TYPE TOGGLE ────────────────────────────── */
.doc-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.doc-type-btn {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  font-family: var(--font-b);
  text-align: left;
  color: var(--text);
}
.doc-type-btn:hover { border-color: var(--accent); background: rgba(124,106,247,.06); }
.doc-type-btn.active {
  border-color: var(--accent);
  background: rgba(124,106,247,.1);
  box-shadow: 0 0 0 3px rgba(124,106,247,.15);
}
.doc-type-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.doc-type-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}
.doc-type-desc {
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 500px) {
  .doc-type-toggle { grid-template-columns: 1fr; }
}

/* ─── PPTX PREVIEW ──────────────────────────────── */
.pptx-preview {
  display: flex; flex-direction: column; gap: 14px;
}
.pptx-slide {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.25);
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  padding: 22px 28px 22px 36px;
  color: #202020;
}
.pptx-accent-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 8px;
  background: var(--preview-color, #1F4E79);
}
.pptx-slide-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--preview-color, #1F4E79);
  margin-top: 32px;
  line-height: 1.2;
}
.pptx-slide-subtitle {
  font-size: 13px;
  color: #444;
  margin-top: 8px;
}
.pptx-slide-meta {
  position: absolute;
  bottom: 18px; left: 36px; right: 28px;
  font-size: 10px;
  color: #666;
}
.pptx-slide-h {
  font-size: 18px;
  font-weight: 700;
  color: var(--preview-color, #1F4E79);
  margin-bottom: 10px;
  line-height: 1.2;
}
.pptx-slide-h::after {
  content: '';
  display: block;
  width: 30px; height: 2.5px;
  background: var(--preview-color, #1F4E79);
  margin-top: 4px;
}
.pptx-bullets {
  display: flex; flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #333;
  line-height: 1.5;
}
.pptx-bullets > div { padding-left: 4px; }
.pptx-slide-count {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.social-btn {
  width: 36px; height: 36px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  text-decoration: none;
  transition: border-color .2s, color .2s, background .2s;
  flex-shrink: 0;
}
.social-btn:hover { border-color: var(--accent); color: var(--text); background: var(--surface); }
/* ─── DOC TYPE 2 ROWS ────────────────────────────── */
.doc-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.doc-type-row2 { margin-top: 8px; }

/* ─── CLAUDE LOGO BADGE ──────────────────────────── */
.claude-badge-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
}
.claude-logo {
  width: 16px; height: 16px;
  border-radius: 50%;
  opacity: 0.65;
  transition: opacity .2s;
  object-fit: contain;
}
.doc-type-btn:hover .claude-logo { opacity: 1; }
.claude-badge-wrap::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  font-family: var(--font-b);
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 20;
}
.claude-badge-wrap:hover::after { opacity: 1; }

/* ─── CODE FILE LIST ─────────────────────────────── */
.code-file-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 6px;
  font-size: 13px; animation: fadeIn .2s ease;
}
.code-file-item .file-name { font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-file-item .file-size { color: var(--muted); font-size: 11px; flex-shrink: 0; margin-left: 12px; }
.code-file-item .file-remove { background: none; border: none; color: var(--accent2); cursor: pointer; font-size: 16px; padding: 0 0 0 8px; line-height: 1; }

/* ─── WEB PREVIEW ────────────────────────────────── */
.web-preview { display: flex; flex-direction: column; gap: 12px; }
.web-preview-screens { display: flex; gap: 12px; align-items: flex-start; }

.web-screen-desktop {
  flex: 1;
  background: #1a1a24;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.web-screen-bar {
  display: flex; align-items: center; gap: 8px;
  background: #13131a; padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}
.web-screen-dots { display: flex; gap: 4px; }
.web-screen-dots span { width: 8px; height: 8px; border-radius: 50%; background: #444; display: block; }
.web-screen-dots span:nth-child(1) { background: #ff5f57; }
.web-screen-dots span:nth-child(2) { background: #ffbd2e; }
.web-screen-dots span:nth-child(3) { background: #28c840; }
.web-screen-url { font-size: 10px; color: var(--muted); background: var(--surface); border-radius: 3px; padding: 2px 8px; flex: 1; text-align: center; }

.web-page { padding: 0; font-family: 'DM Sans', sans-serif; transition: background .3s; }
.web-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; border-bottom: 1px solid rgba(255,255,255,.05);
}
.web-nav-logo { font-weight: 700; font-size: 13px; }
.web-nav-links { display: flex; gap: 10px; font-size: 10px; opacity: .7; }
.web-hero { padding: 20px 14px; text-align: center; }
.web-hero-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; line-height: 1.3; }
.web-hero-sub { font-size: 10px; opacity: .65; margin-bottom: 12px; }
.web-hero-btn {
  display: inline-block;
  padding: 6px 16px; border-radius: 6px;
  font-size: 10px; font-weight: 600; cursor: default;
  transition: background .3s;
}
.web-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; padding: 8px 14px 14px;
}
.web-card {
  border-radius: 6px; padding: 10px 8px; text-align: center;
  border: 1px solid rgba(255,255,255,.06); transition: background .3s, border-color .3s;
}
.web-card-icon { font-size: 16px; margin-bottom: 4px; }
.web-card-text { font-size: 9px; opacity: .7; }

/* Mobile preview */
.web-screen-mobile {
  width: 90px; flex-shrink: 0;
  background: #1a1a24;
  border: 2px solid #333;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  position: relative;
}
.web-mobile-notch {
  width: 30px; height: 5px;
  background: #333; border-radius: 3px;
  margin: 6px auto 4px;
}
.web-page-mobile { border-radius: 0; }
.web-nav-mobile { padding: 4px 8px; }
.web-hero-mobile { padding: 10px 8px; }



.offers-hero {
  margin-bottom: 28px;
}
.offers-hero h1 {
  font-family: var(--font-h);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}
.offers-hero p {
  color: var(--muted);
  font-size: 14px;
}
 
/* Contract type pills */
.contract-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.contract-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 8px 16px;
  cursor: pointer;
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: border-color .2s, background .2s;
}
.contract-pill:hover { border-color: var(--accent); background: rgba(124,106,247,.06); }
.contract-pill.active { border-color: var(--accent); background: rgba(124,106,247,.12); color: var(--accent); }
.contract-pill .pill-icon { font-size: 15px; }
 
/* Location row */
.location-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}
@media (max-width: 500px) { .location-row { grid-template-columns: 1fr; } }
 
.radius-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.radius-select-wrap select { width: 110px; }
 
/* Search btn row */
.search-btn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.cost-hint {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.cost-hint .credit-badge {
  background: rgba(124,106,247,.12);
  color: var(--accent);
  border: 1px solid rgba(124,106,247,.25);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
}
 
/* ─── OFFER CARDS ───────────────────────────────────── */
#offersList { margin-top: 4px; }
 
.offer-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 10px;
  animation: fadeIn .25s ease;
  transition: border-color .2s;
}
.offer-card:hover { border-color: rgba(124,106,247,.4); }
 
.offer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.offer-title-block { flex: 1; min-width: 0; }
.offer-title {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.offer-company {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.offer-saved-icon {
  font-size: 18px;
  color: var(--muted);
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.offer-saved-icon.saved { color: var(--accent2); }
 
.offer-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.offer-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.offer-source-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
 
.offer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-offer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 13px;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
  text-decoration: none;
}
.btn-offer:hover { border-color: var(--accent); background: rgba(124,106,247,.06); color: var(--accent); }
.btn-offer.btn-offer-primary {
  background: rgba(124,106,247,.12);
  border-color: rgba(124,106,247,.4);
  color: var(--accent);
}
.btn-offer.btn-offer-primary:hover { background: rgba(124,106,247,.22); border-color: var(--accent); }
.btn-offer.btn-offer-saved {
  background: rgba(247,106,138,.08);
  border-color: rgba(247,106,138,.3);
  color: var(--accent2);
}
.btn-offer.btn-offer-save:hover { border-color: var(--accent2); color: var(--accent2); }
 
/* ─── SAVED OFFERS SECTION ──────────────────────────── */
#savedOffersSection { margin-top: 8px; }
 
.saved-offer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  animation: fadeIn .2s ease;
}
.saved-offer-info { flex: 1; min-width: 0; }
.saved-offer-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.saved-offer-company {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.saved-offer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.btn-icon {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  padding: 5px 9px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon.danger:hover { border-color: var(--accent2); color: var(--accent2); }
 
/* ─── EMPTY / LOADING STATES ────────────────────────── */
.offers-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.offers-empty .empty-icon { font-size: 40px; margin-bottom: 12px; }
.offers-empty p { font-size: 14px; line-height: 1.6; }
 
.offers-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
}
.offers-loading .spin {
  display: inline-block;
  width: 28px; height: 28px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
 
/* ─── CV FORM DRAWER ────────────────────────────────── */
.cv-drawer {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 12px;
  animation: slideDown .25s ease;
}
.cv-drawer.open { display: block; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
 
.cv-drawer-title {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cv-drawer-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.cv-drawer-close:hover { color: var(--text); }
 
.cv-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 500px) { .cv-grid-2 { grid-template-columns: 1fr; } }
 
.cv-options-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 4px 0 14px;
}
.cv-option-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  cursor: pointer;
}
.cv-option-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
 
/* Palette picker */
.palette-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.palette-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-right: 2px;
}
.palette-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
  flex-shrink: 0;
}
.palette-dot:hover { transform: scale(1.15); }
.palette-dot.selected { border-color: var(--text); transform: scale(1.12); }
 
.cv-generate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
 
/* ─── TABS (recherche / favoris) ────────────────────── */
.offers-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}
.offers-tab {
  flex: 1;
  background: none;
  border: none;
  border-radius: 7px;
  color: var(--muted);
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 14px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.offers-tab.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.offers-tab:hover:not(.active) { color: var(--text); }