/* JobPilot — theme crema + verde thempra */
:root {
  --bg: #f5f2ee;
  --bg2: #ece7e1;
  --panel: #ffffff;
  --panel2: #f7f4f0;
  --border: #e7e1d9;
  --border2: #d8d0c5;
  --text: #22201d;
  --muted: #7d766c;
  --accent: #0c8a6d;
  --accent2: #0a7459;
  --accent3: #14a582;
  --good: #16a34a;
  --bad: #dc2626;
  --warn: #d97706;
  --radius: 16px;
  --shadow: 0 12px 34px rgba(23, 43, 99, 0.10);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: radial-gradient(1300px 700px at 78% -12%, #dfe9fb 0%, var(--bg) 55%);
  overflow-x: hidden;
}
h1, h2, h3, .brand-name, .brand-tag, .view-title, .stat-num, .score-num, .job-title {
  font-family: "Space Grotesk", "Inter", sans-serif;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: .85rem; }
.muted-s { color: var(--muted); font-size: .82rem; margin-left: 10px; }
.error { color: var(--bad); font-size: .9rem; margin-top: 10px; min-height: 1em; text-align: left; }
.linklike { background: none; border: none; color: var(--accent3); cursor: pointer; font-size: .78rem; padding: 0; }

/* ---- Fondo decorativo ---- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(60,50,35,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60,50,35,0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow { position: fixed; z-index: -1; border-radius: 50%; filter: blur(90px); opacity: .45; }
.bg-glow-a { width: 480px; height: 480px; background: #d9efe6; top: -160px; left: -100px; animation: drift 16s ease-in-out infinite alternate; }
.bg-glow-b { width: 420px; height: 420px; background: #efe3d3; bottom: -120px; right: -80px; animation: drift 20s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate(0,0); } to { transform: translate(40px, 30px); } }

/* ---- Botones ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; border: 1px solid var(--border2);
  background: var(--panel2); color: var(--text); cursor: pointer;
  font-weight: 600; font-size: .9rem; transition: all .18s ease;
}
.btn:hover { background: rgba(60,50,35,.05); transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none; color: #fff; box-shadow: 0 8px 24px rgba(12,138,109,.28);
}
.btn.primary:hover { box-shadow: 0 10px 30px rgba(12,138,109,.4); }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.nl-ic { font-size: 1.05rem; line-height: 1; }

/* ---- AUTH ---- */
.auth-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.auth-shell { display: flex; gap: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 26px; overflow: hidden; max-width: 860px; width: 100%; box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.auth-brand { flex: 1; padding: 46px 44px; background: linear-gradient(160deg, rgba(12,138,109,.08), rgba(20,165,130,.04)); border-right: 1px solid var(--border); }
.logo-lg { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 10px 30px rgba(12,138,109,.3); }
.logo-mark { font-style: normal; }
.brand-name { font-size: 2.1rem; margin: 18px 0 4px; font-weight: 700; }
.brand-tag { color: var(--muted); margin-top: 0; }
.brand-points { margin-top: 34px; display: grid; gap: 16px; }
.bpoint { display: flex; align-items: center; gap: 12px; color: var(--text); font-size: .92rem; }
.bp-ic { color: var(--accent3); font-size: 1.2rem; }
.auth-card { flex: 1; padding: 46px 44px; display: flex; flex-direction: column; justify-content: center; }
.tabs { display: flex; gap: 6px; margin-bottom: 24px; background: var(--panel); padding: 5px; border-radius: 12px; border: 1px solid var(--border); }
.tab { flex: 1; padding: 10px; border-radius: 8px; border: none; background: transparent; color: var(--muted); cursor: pointer; font-weight: 600; font-size: .88rem; transition: all .15s; }
.tab.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }

/* ---- Forms ---- */
.field { margin-bottom: 16px; text-align: left; }
.field label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
input[type=email], input[type=password], textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border2); background: #fff; color: var(--text);
  font-family: inherit; font-size: .95rem; outline: none; transition: border .15s;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(12,138,109,.14); }
textarea { resize: vertical; line-height: 1.5; }

/* ---- APP LAYOUT ---- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 22px 16px;
  background: rgba(255,255,255,.72); border-right: 1px solid var(--border); backdrop-filter: blur(12px);
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 26px; }
.side-brand .logo-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.side-name { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.15rem; }
.side-nav { display: grid; gap: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  border: none; background: transparent; color: var(--muted); cursor: pointer; font-weight: 600; font-size: .93rem; text-align: left; transition: all .15s;
}
.nav-link:hover { background: var(--panel); color: var(--text); }
.nav-link.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 6px 16px rgba(12,138,109,.25); }
.nl-ic { width: 22px; text-align: center; }
.side-foot { margin-top: auto; }
.side-user { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, var(--accent3), var(--accent2)); color: #fff; }
.side-user-mail { font-size: .8rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; max-width: 120px; white-space: nowrap; }
.side-user-txt { display: grid; gap: 4px; }
.side-toggle { margin-left: auto; background: transparent; border: 1px solid var(--border2); color: var(--muted); font-size: 1rem; line-height: 1; width: 32px; height: 32px; border-radius: 9px; cursor: pointer; transition: all .15s; }
.side-toggle:hover { color: var(--text); border-color: var(--accent); }

/* ---- Sidebar colapsable ---- */
.app { transition: all .2s ease; }
.sidebar { transition: width .2s ease; }
.app.collapsed .sidebar { width: 78px; }
.app.collapsed .s-hide { display: none !important; }
.app.collapsed .side-brand { padding: 4px 8px 20px; justify-content: center; }
.app.collapsed .side-brand .logo-mark { display: none; }
.app.collapsed .side-toggle { margin-left: 0; }
.app.collapsed .nav-link { justify-content: center; padding: 12px 0; }
.app.collapsed .nl-ic { width: auto; }
.app.collapsed .side-user { justify-content: center; padding: 12px 0; }

.main { flex: 1; padding: 34px 40px 80px; }
.view-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; gap: 16px; }
.view-title { font-size: 1.8rem; margin: 0; font-weight: 700; }
.view-sub { color: var(--muted); margin: 6px 0 0; }

/* ---- Cards ---- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(10px); }
.card.glass { background: linear-gradient(150deg, #ffffff, #f9fbff); }
.card-title { font-weight: 600; font-size: 1.05rem; margin: 0 0 14px; }
.card + .card { margin-top: 18px; }

/* ---- Stats ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; backdrop-filter: blur(10px); position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; }
.stat-card:nth-child(1)::after { background: var(--accent); }
.stat-card:nth-child(2)::after { background: var(--accent3); }
.stat-card:nth-child(3)::after { background: var(--warn); }
.stat-card:nth-child(4)::after { background: var(--good); }
.stat-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; margin-bottom: 14px; }
.s1 { background: rgba(12,138,109,.14); color: var(--accent); }
.s2 { background: rgba(20,165,130,.14); color: var(--accent3); }
.s3 { background: rgba(217,119,6,.12); color: var(--warn); }
.s4 { background: rgba(22,163,74,.12); color: var(--good); }
.stat-num { font-size: 1.9rem; font-weight: 700; line-height: 1; }
.stat-label { color: var(--muted); font-size: .82rem; margin-top: 6px; }

.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dash-match { display: flex; align-items: center; gap: 20px; }

/* ---- Chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--panel2); border: 1px solid var(--border2); padding: 6px 13px; border-radius: 20px; font-size: .83rem; font-weight: 500; }
.meta { margin: 12px 0 0; color: var(--muted); font-size: .9rem; }

/* ---- Filter bar ---- */
.filterbar { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 20px; }
.switchline { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--muted); cursor: pointer; font-weight: 500; }
.switchline input { display: none; }
.switch { width: 40px; height: 22px; border-radius: 20px; background: var(--panel2); border: 1px solid var(--border2); position: relative; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: all .15s; }
.switchline input:checked + .switch { background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; }
.switchline input:checked + .switch::after { left: 20px; background: #fff; }
input[type=range] { accent-color: var(--accent); width: 130px; }
.minline { gap: 8px; }
.minline b { color: var(--text); }
.src-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.src-pill { padding: 6px 12px; border-radius: 20px; border: 1px solid var(--border2); background: transparent; color: var(--muted); font-size: .8rem; cursor: pointer; font-weight: 600; transition: all .15s; }
.src-pill.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border-color: transparent; }
#f-minsalary { display: inline-block; width: 130px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--border2); background: var(--panel2); color: var(--text); font-size: .85rem; }
.fselect { padding: 6px 10px; border-radius: 10px; border: 1px solid var(--border2); background: var(--panel2); color: var(--text); font-size: .85rem; font-weight: 500; cursor: pointer; }
.fselect:focus, #f-minsalary:focus { outline: none; border-color: var(--accent); }
/* Foco visible accesible (teclado) para botones, enlaces y tabs */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---- Job cards ---- */
#jobs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; align-items: stretch; }
.job { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; backdrop-filter: blur(8px); display: flex; flex-direction: column; animation: cardIn .45s ease both; transition: transform .18s, border-color .18s, box-shadow .18s; }
.job::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--ringc, var(--good)); opacity: .9; }
.job:hover { transform: translateY(-4px); border-color: var(--ringc, var(--accent3)); box-shadow: 0 14px 34px rgba(60,50,35,.12); }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.job-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.job-title { font-size: 1.12rem; font-weight: 700; margin: 0 0 2px; }
.job-company { color: var(--accent); font-weight: 600; font-size: .92rem; }
.job-tags { display: flex; gap: 8px; align-items: center; margin: 6px 0 0; }
.ftag { font-size: .72rem; padding: 3px 9px; border-radius: 6px; font-weight: 600; background: var(--panel2); border: 1px solid var(--border); }
.ftag.src-linkedin { background: rgba(20,165,130,.12); color: var(--accent3); border-color: rgba(20,165,130,.3); }
.ftag.src-greenhouse { background: rgba(12,138,109,.12); color: var(--accent); border-color: rgba(12,138,109,.3); }
.ftag.src-rss { background: rgba(217,119,6,.12); color: var(--warn); border-color: rgba(217,119,6,.3); }
.job-sub { color: var(--muted); font-size: .85rem; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.job-sub .sal { color: var(--good); font-weight: 600; font-size: .9rem; }
.job-sub .sal.none { color: var(--muted); font-weight: 400; }
.job-skills { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.job-skills .chip { font-size: .76rem; padding: 4px 10px; }
.job-reasons { color: var(--muted); font-size: .82rem; line-height: 1.5; margin: 4px 0 10px; }
.job-reasons:empty { display: none; }
.job-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; }
a.job-link { color: var(--accent3); text-decoration: none; font-size: .86rem; font-weight: 600; }
a.job-link:hover { text-decoration: underline; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* ---- Score ring ---- */
.score { display: flex; align-items: center; gap: 12px; }
.score-ring { --p: 0; width: 58px; height: 58px; border-radius: 50%;
  background: conic-gradient(var(--ringc, var(--good)) calc(var(--p) * 1%), var(--panel2) 0);
  display: grid; place-items: center; position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #ffffff; }
.score-num { position: relative; font-weight: 700; font-size: .95rem; }
.score-cap { font-size: .75rem; color: var(--muted); }

/* ---- Toast ---- */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 50;
  background: var(--panel2); border: 1px solid var(--border2); backdrop-filter: blur(14px);
  padding: 13px 22px; border-radius: 14px; box-shadow: var(--shadow); font-weight: 500; }

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 12px 16px; }
  .side-nav { flex-direction: row; }
  .side-foot { margin: 0 0 0 auto; }
  .side-user-mail { display: none; }
  .main { padding: 24px 18px 70px; }
  .dash-cols { grid-template-columns: 1fr; }
  .auth-shell { flex-direction: column; }
  .auth-brand, .auth-card { padding: 30px 28px; }
  .auth-brand { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ---- Applications pipeline ---- */
.stage-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.app { padding: 18px; }
.app-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.app-job { font-weight: 600; font-size: 1.02rem; }
.app-company { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.app-score { font-weight: 700; font-size: 1.25rem; color: var(--accent); flex-shrink: 0; }
.app-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.app-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn.sm { padding: 6px 12px; font-size: .82rem; border-radius: 9px; }
.btn.danger:hover { background: rgba(220,38,38,.10); border-color: rgba(220,38,38,.35); color: var(--bad); }
.app-events { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.ev { font-size: .85rem; }
.ftag.ok { background: rgba(22,163,74,.12); color: var(--good); border-color: rgba(22,163,74,.3); }
.ftag.off { background: rgba(92,107,130,.12); color: var(--muted); border-color: var(--border); }
.ftag.st-applied { background: rgba(22,163,74,.12); color: var(--good); }
.ftag.st-interview { background: rgba(12,138,109,.12); color: var(--accent); }
.ftag.st-rejected { background: rgba(220,38,38,.12); color: var(--bad); }

/* ---- Preferences ---- */
.stack { display: flex; flex-direction: column; gap: 14px; }

/* ---- Generar CV ---- */
.job-bottom .btn-cv {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none; color: #fff; font-weight: 600; font-size: .82rem;
  padding: 6px 12px; border-radius: 9px; cursor: pointer;
}
.job-bottom .btn-cv:disabled { opacity: .6; cursor: progress; }

.modal {
  position: fixed; inset: 0; background: rgba(4,7,18,.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px;
}
.modal-card {
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 14px;
  width: 100%; max-width: 660px; max-height: 86vh; display: flex; flex-direction: column; overflow: hidden;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 1.05rem; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; }
.modal-body { padding: 16px 18px; overflow: auto; font-size: .9rem; line-height: 1.55; white-space: pre-wrap; }
.modal-body h4 { margin: 12px 0 4px; color: var(--accent3); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.modal-body ul { margin: 4px 0 8px 18px; padding: 0; }
.modal-body .syn { color: var(--warn, #fbbf24); }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); }

/* ---- Preview Markdown del CV ---- */
.cv-preview { margin-top: 14px; }
.cv-preview summary { cursor: pointer; color: var(--accent3); font-size: .85rem; font-weight: 600; }
.md-preview { margin-top: 8px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; font-size: .88rem; line-height: 1.55; }
.md-preview h2 { font-size: 1.05rem; margin: 10px 0 4px; }
.md-preview h3 { font-size: .98rem; margin: 8px 0 4px; color: var(--accent3); }
.md-preview h4 { font-size: .9rem; margin: 6px 0 2px; color: var(--accent3); }
.md-preview p { margin: 4px 0; }
.md-preview ul { margin: 4px 0 8px 18px; padding: 0; }
.md-preview code { background: rgba(12,138,109,.12); padding: 1px 5px; border-radius: 5px; font-size: .82rem; }
.md-preview a { color: var(--accent3); }
.cv-editor { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; color: inherit; }
 #pref-editor textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.muted-s { font-size: .82rem; color: var(--muted); margin-left: 8px; }

/* ============ REDISEÑO v2: menú horizontal superior ============ */
.app { flex-direction: column; min-height: 100vh; }
.topnav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 18px;
  padding: 10px 24px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.08rem; color: var(--text); white-space: nowrap; }
.brand .logo-mark { font-size: 1.25rem; }
.brand-txt { letter-spacing: -.2px; }
.top-nav { display: flex; align-items: center; gap: 4px; flex: 1; overflow-x: auto; }
.nav-sep { width: 1px; height: 20px; background: var(--border); margin: 0 6px; flex-shrink: 0; }
.top-nav .nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; cursor: pointer;
  background: transparent; border-radius: 10px; color: var(--muted); font-size: .92rem; font-weight: 600; white-space: nowrap; }
.top-nav .nav-link:hover { background: var(--panel); color: var(--text); }
.top-nav .nav-link.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(12,138,109,.28); }
.top-nav .nl-ic { width: auto; }
.top-user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.top-mail { color: var(--muted); font-size: .85rem; }
.top-user .avatar { width: 34px; height: 34px; }
.top-user .btn.ghost { border: 1px solid var(--border); background: #fff; color: var(--muted); }
.main { flex: 1; padding: 26px 28px 80px; }

/* ---- Hero / feed ---- */
.feed-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.view-title { font-size: 1.7rem; }
.feed-profile { display: flex; gap: 8px; }
.prog-chip { border: 1px solid #bfe3cc;  background:#e8f7ee; color: var(--good); border-radius: 999px; padding: 7px 14px; font-size: .85rem; font-weight: 600; cursor: pointer; }
.feed-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 18px; }
.src-pill { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--muted); font-size: .88rem; font-weight: 600; cursor: pointer; }
.src-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.src-pill:hover:not(.active) { border-color: var(--accent); color: var(--accent); }
#feed-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }

/* ---- card star + recencia ---- */
.badge.bnew { background: #e8f7ee; color: var(--good); border: 1px solid #bfe3cc; border-radius: 999px; padding: 2px 8px; font-size: .72rem; font-weight: 700; margin-left: 6px; }
.job { display: flex; flex-direction: column; }
.job-main { flex: 1; }
.job-title { font-size: 1.02rem; }
.job-title.clickable { cursor: pointer; }
.job-title.clickable:hover { color: var(--accent); text-decoration: underline; }
.stat-card.clickable { cursor: pointer; }
.stat-card.clickable:hover { transform: translateY(-1px); }
.btn-star { align-self: flex-start; background: transparent; border: 0; cursor: pointer; font-size: 1.35rem; color: #cbd5e1; padding: 10px 12px; min-width: 40px; min-height: 40px; line-height: 1; transition: transform .12s ease; border-radius: 8px; }
.btn-star:hover { transform: scale(1.15); color: #f59e0b; }
.btn-star.saved { color: #f59e0b; }

/* ---- alertas ---- */
.alert-card { margin-bottom: 12px; }
.ac-name { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; font-weight: 600; }
.ac-nuevas { font-weight: 600; }

/* ---- detalle oferta ---- */
.job-modal-card { max-width: 640px; }
.jd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.jd-title { font-size: 1.3rem; font-weight: 700; }
.jd-company { color: var(--muted); font-weight: 600; }
.jd-sal { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; font-size: 1.08rem; font-weight: 700; color: var(--text); }
.jd-sal .sal { font-size: 1.1rem; }
.jd-match { font-size: .85rem; color: var(--good); }
.jd-lang, .jd-meta { color: var(--muted); font-size: .9rem; margin: 2px 0; }
.jd-reasons { margin-top: 10px; padding: 10px 12px;  background:#f0fdf4; border: 1px solid #bfe3cc; border-radius: 10px; font-size: .88rem; color: #166534; line-height: 1.6; }
.jd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.jd-actions { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .topnav { padding: 8px 12px; gap: 10px; overflow-x: auto; }
  .top-mail { display: none; }
  .brand-txt { display: none; }
  .top-nav .nav-link { padding: 8px 10px; font-size: .85rem; }
  .top-nav .nav-link .nl-ic { display: none; }
  .nav-sep { display: none; }
  .main { padding: 20px 14px 80px; }
  #feed-list { grid-template-columns: 1fr; }
}

/* ---- Oposiciones ---- */
.opo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.opo-card { padding: 18px; display: flex; flex-direction: column; gap: 8px; transition: transform .12s, box-shadow .15s; }
.opo-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.10); }
.opo-head { display: flex; justify-content: space-between; align-items: center; }
.opo-source { font-size: .72rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.opo-badge { font-size: .68rem; font-weight: 700; letter-spacing: .4px; padding: 3px 9px; border-radius: 20px; }
.badge-abierta { background: rgba(16,185,129,.14); color: var(--accent); }
.badge-pendiente { background: rgba(245,158,11,.16); color: #d97706; }
.badge-cerrada { background: rgba(239,68,68,.14); color: #dc2626; }
.opo-title { font-size: 1.02rem; font-weight: 700; line-height: 1.3; color: var(--text); }
.opo-ent { font-size: .82rem; color: var(--muted); }
.opo-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: .82rem; color: var(--text); align-items: center; margin-top: 2px; }
.opo-proc { background: var(--panel2); border: 1px solid var(--border2); padding: 3px 9px; border-radius: 14px; color: var(--muted); font-weight: 500; }
.opo-fecha { color: var(--muted); font-size: .78rem; }
.opo-link { margin-top: auto; color: var(--accent); font-weight: 600; font-size: .85rem; text-decoration: none; }
.opo-link:hover { text-decoration: underline; }
#opo-more { margin: 22px auto 0; display: block; }

/* Panel de administracion */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 4px; }
.feed-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border2); }
.feed-key { font-family: monospace; font-size: .82rem; }
.admin-tbl { width: 100%; border-collapse: collapse; font-size: .85rem; }
.admin-tbl th, .admin-tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border2); }
.admin-tbl th { color: var(--muted); font-weight: 600; }
.err { color: var(--bad); font-size: .82rem; }
