/* styles.css — LinkedAI website
   Shares the extension's identity: near-black surfaces, indigo accent, Syne for
   headings. Lifted off the heavy purple a reviewer said looked like a gambling
   site, without losing the brand. */

:root {
  --bg: #0E0E13;
  --surface: #17171F;
  --surface2: #1F1F29;
  --border: #2C2C3A;
  --accent: #6D5BFF;
  --accent-dim: #8B7CFF;
  --accent-soft: rgba(109, 91, 255, 0.12);
  --text: #F2F1F7;
  --muted: #9694A8;
  --good: #35C48C;
  --warn: #FFB020;
  --radius: 14px;
  --max: 1080px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Long lines are hard to read. Cap the measure on running text. */
p { max-width: 62ch; }
.center p, .section-head p, .hero p { margin-left: auto; margin-right: auto; }

h1, h2, h3, h4 { font-family: 'Syne', sans-serif; font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* ---------- Header ---------- */
#site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 14, 19, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 13px 22px;
  display: flex; align-items: center; gap: 26px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 13px;
}
.brand-name { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 17px; }
.nav { display: flex; gap: 20px; margin-left: 12px; }
.nav a { font-size: 14px; color: var(--muted); transition: color .15s; }
.nav a:hover, .nav a.is-active { color: var(--text); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.credits-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums; transition: border-color .15s;
}
.credits-pill:hover { border-color: var(--accent); }
.credits-pill.is-low { border-color: var(--warn); color: var(--warn); background: rgba(255,176,32,.08); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border: none; border-radius: 11px;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 14px;
  cursor: pointer; transition: background .15s, border-color .15s, transform .12s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dim); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 64px; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--accent-dim); background: var(--accent-soft);
  padding: 6px 13px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); margin-bottom: 18px; }
.hero h1 .hl { color: var(--accent-dim); }
.hero p.lede { font-size: clamp(0.98rem, 1.8vw, 1.1rem); line-height: 1.55; color: var(--muted); max-width: 540px; margin: 0 auto 30px; }
.hero-actions { display: flex; gap: 11px; justify-content: center; flex-wrap: wrap; }
.hero-note { font-size: 12px; color: var(--muted); margin-top: 15px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-bottom: 10px; }
.section-head p { color: var(--muted); max-width: 520px; margin: 0 auto; font-size: 14.5px; line-height: 1.55; }

.grid { display: grid; gap: 14px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.card-num { font-family: 'Syne', sans-serif; font-size: 12px; color: var(--accent-dim); letter-spacing: .1em; margin-bottom: 12px; }
.card h3 { font-size: 17px; margin-bottom: 7px; }
.card p { font-size: 14px; line-height: 1.55; color: var(--muted); }

/* ---------- Pricing ---------- */
.plan {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column;
}
.plan.is-popular { border-color: var(--accent); }
.plan-tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent-dim); margin-bottom: 9px;
}
.plan h3 { font-size: 19px; margin-bottom: 3px; }
.plan .tagline { font-size: 13px; color: var(--muted); margin-bottom: 16px; min-height: 38px; }
.plan .price { font-family: 'Syne', sans-serif; font-size: 34px; font-weight: 800; }
.plan .per { font-size: 13px; color: var(--muted); }
.plan .credits-line {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--accent-dim); margin: 10px 0 16px;
  font-variant-numeric: tabular-nums;
}
.plan ul { list-style: none; margin-bottom: 20px; flex: 1; }
.plan li { font-size: 13.5px; color: var(--muted); padding: 5px 0 5px 22px; position: relative; }
.plan li::before {
  content: '✓'; position: absolute; left: 0; color: var(--accent-dim); font-weight: 700;
}

.topups { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.topup { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; }
.topup .amount { font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800; }
.topup .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
.topup .bonus { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  background: var(--accent-soft); color: var(--accent-dim); padding: 3px 9px; border-radius: 999px; margin-bottom: 11px; }

.cost-table { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; max-width: 480px; margin: 0 auto; }
.cost-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.cost-row:last-child { border-bottom: none; }
.cost-row .val { color: var(--accent-dim); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- Forms ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.input, textarea.input, select.input {
  width: 100%; padding: 11px 13px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 10px; color: var(--text);
  font-family: inherit; font-size: 14px; transition: border-color .15s;
}
.input:focus { outline: none; border-color: var(--accent); }
textarea.input { resize: vertical; min-height: 84px; line-height: 1.55; }

.auth-card { max-width: 400px; margin: 70px auto; }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.alert { padding: 11px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 14px; }
.alert-error { background: rgba(255,107,107,.1); border: 1px solid rgba(255,107,107,.3); color: #FF8B8B; }
.alert-good { background: rgba(53,196,140,.1); border: 1px solid rgba(53,196,140,.3); color: var(--good); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 34px 0; margin-top: 60px; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 0 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer p, footer a { font-size: 13px; color: var(--muted); }
footer a:hover { color: var(--text); }

.muted { color: var(--muted); }
.center { text-align: center; }
.mt-2 { margin-top: 10px; } .mt-4 { margin-top: 22px; } .mt-6 { margin-top: 34px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 700px) {
  .nav { display: none; }
  .hero { padding: 54px 0 44px; }
  .section { padding: 46px 0; }
}


/* ---------- Profile ---------- */
.page-head { padding: 40px 0 26px; }
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: 6px; }
.page-head p { color: var(--muted); font-size: 14.5px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 14px; }
.panel h2 { font-size: 17px; margin-bottom: 4px; }
.panel .hint { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .row-2 { grid-template-columns: 1fr; } }

.job-block { background: var(--surface2); border: 1px solid var(--border); border-radius: 11px; padding: 16px; margin-bottom: 11px; position: relative; }
.job-block .remove { position: absolute; top: 12px; right: 12px; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 17px; line-height: 1; padding: 3px 7px; border-radius: 6px; }
.job-block .remove:hover { color: #FF8B8B; background: rgba(255,107,107,.1); }

.save-bar { position: sticky; bottom: 0; background: rgba(14,14,19,.92); backdrop-filter: blur(10px); border-top: 1px solid var(--border); padding: 14px 0; margin-top: 22px; }
.save-bar-inner { max-width: var(--max); margin: 0 auto; padding: 0 22px; display: flex; align-items: center; gap: 12px; }
.save-status { font-size: 13px; color: var(--muted); }

.completeness { height: 6px; background: var(--surface2); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.completeness-bar { height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease; }

/* ---------- History ---------- */
.hist-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 11px; }
.hist-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.hist-type { font-size: 10px; text-transform: uppercase; letter-spacing: .11em; color: var(--accent-dim); }
.hist-time { font-size: 11px; color: var(--muted); }
.hist-context { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.hist-preview { font-size: 13.5px; color: var(--muted); line-height: 1.55; max-width: none; white-space: pre-wrap; }
.hist-actions { display: flex; gap: 7px; margin-top: 13px; flex-wrap: wrap; }

.empty-state { text-align: center; padding: 56px 22px; }
.empty-state h3 { font-size: 18px; margin-bottom: 7px; }
.empty-state p { color: var(--muted); font-size: 14px; margin: 0 auto; }

.filters { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { padding: 7px 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--muted); font-size: 13px; cursor: pointer; transition: all .15s; }
.chip:hover { color: var(--text); }
.chip.is-on { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
