/* ─────────────────────────────────────────────────────────────────────────
   Meta Neurons ATS — design system v2 (Dark AI-tech + gradient)
   Không tải tài nguyên ngoài: font hệ thống, hiệu ứng CSS thuần.
   ───────────────────────────────────────────────────────────────────────── */
:root {
  /* Bảng màu đồng bộ metaneurons.com: nền #06060d, primary #00DC82 (green),
     secondary #0066FF/#0099FF (blue), teal #00BBCC, purple #7C6AF7. */
  --bg: #06060d;
  --surface: #0b1310;
  --surface-2: #101c16;
  --surface-3: #17281f;
  --line: rgba(140, 220, 185, 0.13);
  --line-strong: rgba(140, 220, 185, 0.26);
  --text: #eef7f2;
  --muted: #97aaa2;
  --brand-a: #00DC82;   /* neon green  */
  --brand-b: #0066FF;   /* blue        */
  --grad: linear-gradient(135deg, #00DC82, #0066FF);
  --accent: #2fe39b;
  --teal: #00BBCC; --blue: #0099FF; --purple: #7C6AF7;
  --ok: #00DC82; --warn: #fbbf24; --err: #f87171;
  --pub: #00DC82; --cand: #a78bfa; --int: #00B4FF;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  --glow: 0 0 0 1px rgba(0, 220, 130, 0.35), 0 8px 40px rgba(0, 180, 160, 0.16);
  /* aliases giữ tương thích v1 */
  --panel: var(--surface); --panel2: var(--surface-2);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14.5px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
::selection { background: rgba(0, 220, 130, 0.35); }

/* gradient text */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ── header / nav ─────────────────────────────────────────── */
header.app {
  position: sticky; top: 0; z-index: 40;
  padding: 14px 28px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: rgba(5, 20, 16, 0.7);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
header.app h1 { font-size: 16.5px; font-weight: 700; }
header.app .sub { color: var(--muted); font-size: 12.5px; }
.logo-mark {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: var(--grad);
  box-shadow: 0 0 18px rgba(0, 220, 130, 0.5);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff; font-weight: 800;
}
nav.top-links { display: flex; gap: 20px; margin-left: 22px; }
nav.top-links a { color: var(--muted); font-size: 13.5px; }
nav.top-links a:hover { color: var(--text); text-decoration: none; }

main.page { padding: 28px 24px 60px; max-width: 1200px; margin: 0 auto; }

/* ── cards ────────────────────────────────────────────────── */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)) , var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .2s, transform .2s, box-shadow .25s;
}
.card.hover:hover, .card.job:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 220, 130, 0.5);
  box-shadow: var(--glow);
}
.grid { display: grid; gap: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.muted { color: var(--muted); font-size: 12.5px; }
.right { margin-left: auto; }

/* ── buttons ──────────────────────────────────────────────── */
button, .btn {
  position: relative; overflow: hidden;
  background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
              linear-gradient(120deg, rgba(140,220,185,.35), rgba(140,220,185,.12)) border-box;
  color: var(--text); border: 1px solid transparent;
  border-radius: 11px; padding: 9px 18px; cursor: pointer; font-size: 13.5px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, color .15s;
}
button:hover, .btn:hover {
  background: linear-gradient(var(--surface-3), var(--surface-3)) padding-box,
              var(--grad) border-box;
  text-decoration: none; transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
button:active { transform: translateY(0); }
button.primary, .btn.primary {
  background: var(--grad); border: none; color: #fff; font-weight: 650;
  box-shadow: 0 4px 22px rgba(0, 200, 130, 0.35), inset 0 1px 0 rgba(255,255,255,.25);
}
/* vệt sáng quét qua khi hover */
button.primary::after, .btn.primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%);
  transform: translateX(-110%); transition: transform .5s ease;
}
button.primary:hover::after, .btn.primary:hover::after { transform: translateX(110%); }
button.primary:hover, .btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(0, 190, 170, 0.45), inset 0 1px 0 rgba(255,255,255,.25);
}
button.danger { background: rgba(248,113,113,.06) padding-box, linear-gradient(120deg, rgba(248,113,113,.5), rgba(248,113,113,.2)) border-box; color: var(--err); }
button.danger:hover { background: rgba(248, 113, 113, 0.12) padding-box, var(--err) border-box; box-shadow: 0 6px 18px rgba(248,113,113,.15); }
button.ghost { background: transparent; border-color: transparent; box-shadow: none; }
button.ghost:hover { background: var(--surface-2); border-color: transparent; box-shadow: none; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ── forms ────────────────────────────────────────────────── */
input, select, textarea {
  background: rgba(8, 16, 13, 0.75); color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 11px; padding: 10px 13px; font-size: 13.5px; font-family: inherit;
  width: 100%; transition: border-color .15s, box-shadow .15s, background .15s;
}
input:hover, select:hover, textarea:hover { border-color: rgba(140, 220, 185, 0.45); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand-a); background-color: rgba(10, 22, 17, 0.9);
  box-shadow: 0 0 0 3px rgba(0, 220, 130, 0.15), 0 0 24px rgba(0, 220, 130, 0.09);
}
select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2394a1bf' stroke-width='1.8' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 13px center;
}
select:focus {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2300DC82' stroke-width='1.8' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 13px center;
}
::placeholder { color: rgba(151, 170, 162, 0.55); }
input[type="file"] { padding: 8px; }
input[type="file"]::file-selector-button {
  background: var(--surface-3); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 5px 12px; margin-right: 10px; cursor: pointer; font-size: 12.5px;
}
label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.field { margin-bottom: 13px; }
form .row > .field { flex: 1; margin-bottom: 0; }

/* ── table ────────────────────────────────────────────────── */
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
tr:hover td { background: rgba(0, 220, 130, 0.045); }

/* ── badges ───────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2.5px 11px; border-radius: 999px; font-size: 11.5px;
  border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap;
  background: rgba(255, 255, 255, 0.02);
}
.badge.ok, .badge.published, .badge.hired, .badge.confirmed, .badge.accepted, .badge.synced, .badge.delivered { color: var(--ok); border-color: rgba(0,220,130,.5); background: rgba(0,220,130,.08); }
.badge.warn, .badge.draft, .badge.pending, .badge.offer, .badge.offer_accepted, .badge.sent, .badge.unassigned { color: var(--warn); border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.06); }
.badge.err, .badge.closed, .badge.rejected, .badge.failed, .badge.declined, .badge.expired, .badge.cancelled, .badge.dead { color: var(--err); border-color: rgba(248,113,113,.45); background: rgba(248,113,113,.06); }
.badge.info, .badge.applied, .badge.screening, .badge.interview, .badge.scheduled { color: var(--int); border-color: rgba(0,180,255,.45); background: rgba(0,180,255,.08); }
.badge.skill { color: #5ff0b6; border-color: rgba(0,220,130,.35); background: rgba(0,220,130,.07); }

/* ── toast ────────────────────────────────────────────────── */
.toast-wrap { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast {
  background: var(--surface-2); border: 1px solid var(--line-strong); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 11px 15px; max-width: 380px; font-size: 13px;
  box-shadow: var(--shadow); animation: toast-in .25s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--err); }
.toast.warn { border-left-color: var(--warn); }

/* ── modal ────────────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0; background: rgba(3, 5, 10, 0.78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px; z-index: 50; overflow: auto; animation: fade-in .18s ease;
}
@keyframes fade-in { from { opacity: 0; } }
.modal {
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0)), var(--surface);
  border: 1px solid var(--line-strong); border-radius: 18px;
  padding: 24px; width: 100%; max-width: 560px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow); animation: modal-in .22s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.modal.wide { max-width: 880px; }
.modal h2 { font-size: 17px; }

/* ── internal shell ───────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 218px; flex: none; padding: 18px 12px;
  display: flex; flex-direction: column; gap: 3px;
  position: sticky; top: 0; height: 100vh;
  background: rgba(9, 13, 24, 0.85);
  border-right: 1px solid var(--line);
}
.sidebar .brand { font-size: 15px; font-weight: 700; padding: 4px 10px 16px; display: flex; align-items: center; gap: 9px; }
.sidebar a.nav {
  display: flex; align-items: center; gap: 9px; padding: 8.5px 11px; border-radius: 10px;
  color: var(--muted); font-size: 13.5px; border: 1px solid transparent;
}
.sidebar a.nav:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.sidebar a.nav.active {
  background: linear-gradient(100deg, rgba(0,220,130,.14), rgba(0,102,255,.12));
  border-color: rgba(0, 220, 130, 0.35);
  color: var(--text); font-weight: 600;
}
.content { flex: 1; padding: 24px 28px; min-width: 0; }
.content > h2 { font-size: 18px; margin-bottom: 16px; }

/* ── pipeline board ───────────────────────────────────────── */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.col {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  width: 248px; flex: none; padding: 11px; display: flex; flex-direction: column; gap: 8px;
  min-height: 130px;
}
.col h3 { font-size: 12.5px; display: flex; justify-content: space-between; padding: 2px 4px 6px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.col h3 .count { color: var(--text); background: var(--surface-3); border-radius: 999px; padding: 0 8px; font-size: 11px; }
.col.dragover { border-color: var(--brand-a); box-shadow: var(--glow); }
.card-app {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px;
  padding: 11px; cursor: grab; font-size: 13px; display: flex; flex-direction: column; gap: 4px;
  transition: border-color .15s, transform .15s;
}
.card-app:hover { border-color: rgba(0, 220, 130, 0.5); transform: translateY(-1px); }
.card-app:active { cursor: grabbing; }
.card-app .name { font-weight: 600; }

/* ── tabs / stats / misc ──────────────────────────────────── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: none; background: none; border-bottom: 2px solid transparent; border-radius: 0; padding: 9px 14px; color: var(--muted); }
.tabs button.active { color: var(--text); border-bottom-color: var(--brand-a); }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .v { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.stat .k { color: var(--muted); font-size: 12px; }
.empty { color: var(--muted); text-align: center; padding: 30px 10px; font-size: 13px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.pub { background: var(--pub); } .dot.cand { background: var(--cand); } .dot.int { background: var(--int); }
pre.json {
  background: #070b14; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font: 12px/1.5 ui-monospace, Menlo, monospace;
  overflow: auto; max-height: 300px; white-space: pre-wrap; margin: 0;
}
code { background: var(--surface-3); border-radius: 6px; padding: 1px 6px; font-size: 12px; }

/* ── hero decorations (careers / login) ───────────────────── */
.fx-wrap { position: relative; overflow: hidden; }
.fx-grid::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(110, 220, 175, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 220, 175, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 45%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 45%, transparent 100%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; }
.orb.a { width: 420px; height: 420px; background: rgba(0, 220, 130, 0.26); top: -140px; left: 6%; animation: drift 16s ease-in-out infinite alternate; }
.orb.b { width: 360px; height: 360px; background: rgba(0, 130, 255, 0.24); top: -60px; right: 4%; animation: drift 20s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(50px, 36px); } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } }

.notif-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--err); }

/* ── motion utilities ─────────────────────────────────────── */
/* chữ gradient lấp lánh chậm */
.shimmer {
  background: linear-gradient(100deg, #00DC82, #00BBCC, #00B4FF, #00DC82);
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 7s linear infinite;
}
@keyframes shimmer { to { background-position: -260% 0; } }

/* hiện dần khi cuộn tới (kèm IntersectionObserver) */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }

/* card viền gradient khi hover (đẹp hơn đổi màu viền đơn) */
.card.job, .card.hover {
  border: 1px solid transparent;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0)) padding-box,
              linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(120deg, rgba(140,220,185,.22), rgba(140,220,185,.08)) border-box;
}
.card.job:hover, .card.hover:hover {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)) padding-box,
              linear-gradient(var(--surface), var(--surface)) padding-box,
              var(--grad) border-box;
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(0,0,0,.5), 0 0 30px rgba(0, 200, 140, 0.13);
}
@media (prefers-reduced-motion: reduce) {
  .shimmer { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
