:root {
  --ink: #10231d;
  --muted: #63726d;
  --line: #dce5e1;
  --paper: #fbfcf9;
  --panel: #ffffff;
  --forest: #123f32;
  --forest-2: #1a5e49;
  --mint: #d9f3e8;
  --lime: #d7f36b;
  --danger: #a83e32;
  --shadow: 0 18px 55px rgba(18, 63, 50, 0.10);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: #eef3ef;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #eef3ef; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr); background: var(--paper); }
.login-story { min-height: 100vh; padding: clamp(42px, 8vw, 110px); display: flex; flex-direction: column; justify-content: space-between; color: white; background: radial-gradient(circle at 82% 18%, rgba(215,243,107,.35), transparent 24%), linear-gradient(145deg, #0c211b, #174d3d 68%, #236850); }
.brand { display: flex; align-items: center; gap: 12px; font: 800 20px "Manrope"; letter-spacing: -.03em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: var(--lime); color: var(--forest); font-weight: 900; }
.login-copy { max-width: 690px; }
.eyebrow { color: #40836d; font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .15em; }
.login-copy .eyebrow { color: var(--lime); }
h1, h2, h3 { font-family: "Manrope", sans-serif; letter-spacing: -.04em; margin-top: 0; }
.login-copy h1 { margin: 18px 0 24px; font-size: clamp(48px, 6vw, 84px); line-height: .98; }
.login-copy p { max-width: 580px; color: #d9e9e2; font-size: 19px; line-height: 1.65; }
.login-proof { display: flex; gap: 28px; color: #cde0d8; font-size: 14px; flex-wrap: wrap; }
.login-proof span::before { content: "✓"; color: var(--lime); margin-right: 8px; font-weight: 800; }
.login-action { display: grid; place-items: center; padding: 40px; }
.login-card { width: min(440px, 100%); padding: 42px; border: 1px solid var(--line); border-radius: 28px; background: white; box-shadow: var(--shadow); }
.login-card h2 { font-size: 32px; margin-bottom: 10px; }
.login-card > p { color: var(--muted); line-height: 1.6; margin-bottom: 30px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 20px; color: white; background: #0d251e; display: flex; flex-direction: column; }
.sidebar .brand { padding: 0 12px 30px; }
.nav { display: grid; gap: 7px; }
.nav-link { display: flex; align-items: center; gap: 13px; min-height: 48px; padding: 0 14px; border: 0; border-radius: 13px; background: transparent; color: #b8cbc3; text-decoration: none; font-weight: 600; }
.nav-link:hover { color: white; background: rgba(255,255,255,.07); }
.nav-link.active { color: #13231e; background: var(--lime); }
.nav-icon { width: 24px; text-align: center; font-size: 18px; }
.sidebar-foot { margin-top: auto; padding: 18px 12px 5px; border-top: 1px solid rgba(255,255,255,.12); }
.user-line { display: flex; gap: 11px; align-items: center; min-width: 0; }
.avatar { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: #285b4a; color: var(--lime); font-weight: 700; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-line strong, .user-line small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-line small { color: #8fa9a0; margin-top: 2px; }
.stage-badge { display: inline-flex; margin-top: 15px; padding: 5px 9px; border-radius: 999px; color: #b9d4ca; background: rgba(255,255,255,.07); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.main { min-width: 0; padding: 34px clamp(22px, 4vw, 58px) 70px; }
.topbar { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 35px; }
.topbar-title { font: 700 14px "Manrope"; color: #60716a; }
.live-pill { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 999px; background: white; color: var(--muted); border: 1px solid var(--line); font-size: 12px; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: #40a174; }
.page { max-width: 1280px; margin: 0 auto; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.page-head h1 { margin: 6px 0 0; font-size: clamp(34px, 4vw, 50px); }
.page-head p { max-width: 620px; margin: 9px 0 0; color: var(--muted); line-height: 1.6; }
.button { min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; background: var(--forest); color: white; font-weight: 700; text-decoration: none; }
.button:hover { background: var(--forest-2); }
.button.primary { background: var(--lime); color: #17261f; }
.button.primary:hover { background: #cae75a; }
.button.secondary { border-color: var(--line); color: var(--ink); background: white; }
.button.secondary:hover { border-color: #aabcb4; background: #f7faf8; }
.button.ghost { padding: 0 10px; color: var(--muted); background: transparent; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button.wide { width: 100%; }
.hero { padding: clamp(28px, 5vw, 58px); border-radius: 28px; color: white; background: linear-gradient(135deg, #123f32, #1d614b); box-shadow: var(--shadow); overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; width: 330px; height: 330px; right: -90px; top: -150px; border-radius: 50%; background: rgba(215,243,107,.20); }
.hero h1 { max-width: 760px; font-size: clamp(42px, 5vw, 68px); line-height: 1.04; margin: 12px 0 18px; position: relative; z-index: 1; }
.hero p { max-width: 650px; color: #d4e5de; font-size: 18px; line-height: 1.6; position: relative; z-index: 1; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; position: relative; z-index: 1; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 22px 0; }
.stat { padding: 23px; border: 1px solid var(--line); border-radius: 19px; background: white; }
.stat strong { display: block; font: 800 32px "Manrope"; }
.stat span { color: var(--muted); font-size: 13px; }
.next-step { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
.panel { border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 8px 30px rgba(25,61,49,.04); }
.panel-pad { padding: 28px; }
.panel h2 { font-size: 22px; margin-bottom: 7px; }
.panel p { color: var(--muted); line-height: 1.6; }
.steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 16px; }
.steps li { display: flex; gap: 13px; align-items: center; font-weight: 600; }
.steps b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--mint); color: var(--forest); }
.search-box { padding: 24px; display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; margin-bottom: 24px; }
.field { display: grid; gap: 7px; }
.field label { color: #40524b; font-size: 13px; font-weight: 700; }
.input { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid #cbd8d2; border-radius: 11px; color: var(--ink); background: white; outline: none; }
textarea.input { min-height: 100px; padding-top: 12px; resize: vertical; }
.input:focus { border-color: #3b8069; box-shadow: 0 0 0 3px rgba(59,128,105,.13); }
.result-meta { display: flex; justify-content: space-between; align-items: center; margin: 25px 2px 13px; color: var(--muted); font-size: 13px; }
.search-save { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 14px 0; padding: 20px 22px; border-radius: 18px; background: var(--deep); color: white; }
.search-save p { margin: 5px 0 0; color: rgba(255,255,255,.72); }
.search-list { margin-bottom: 14px; }
.search-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.search-list > div:last-child { border-bottom: 0; }
.search-list span { color: var(--muted); font-size: 13px; }
.cards { display: grid; gap: 12px; }
.job-card { padding: 20px; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 17px; }
.job-card-link { color: inherit; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.job-card-link:hover { border-color: #9fb9ae; transform: translateY(-1px); }
.company-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: var(--mint); color: var(--forest); font: 800 18px "Manrope"; }
.company-mark.has-logo { position: relative; overflow: hidden; }
.company-mark.has-logo > * { grid-area: 1 / 1; }
.company-mark img { width: 100%; height: 100%; object-fit: contain; background: white; }
.job-card h3 { margin: 0 0 5px; font-size: 18px; letter-spacing: -.02em; }
.meta { display: flex; gap: 13px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.source { color: #2e765f; background: #e5f4ee; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.detail-state { justify-self: end; color: var(--muted); font-size: 12px; font-weight: 700; }
.detail-state.available { color: #2e765f; }
.detail-state.retrying { color: #8b6814; }
.table-wrap { overflow: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 750px; }
.table th { padding: 15px 18px; color: var(--muted); border-bottom: 1px solid var(--line); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.table td { padding: 18px; border-bottom: 1px solid #edf1ef; }
.table tr:last-child td { border-bottom: 0; }
.table a { color: var(--ink); font-weight: 700; text-decoration: none; }
.table a:hover { color: var(--forest-2); }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; background: #eef5f1; color: #315f50; font-size: 12px; font-weight: 700; text-transform: capitalize; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.client, .status.won { color: #365800; background: #edf8c9; }
.status.closed { color: #7f6256; background: #f3ece8; }
.status.replied, .status.meeting { color: #735b09; background: #fff3c7; }
.empty { padding: 52px 28px; text-align: center; }
.empty-mark { width: 62px; height: 62px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 19px; background: var(--mint); font-size: 25px; }
.empty h2 { margin-bottom: 8px; }
.empty p { max-width: 480px; margin: 0 auto 22px; color: var(--muted); line-height: 1.6; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 20px; }
.detail-list { padding: 0 24px; }
.detail-list .job-card { border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; border-left: 0; border-right: 0; border-top: 0; }
.company-section { margin-top: 32px; }
.company-groups { display: grid; gap: 18px; }
.company-group { overflow: hidden; }
.company-head { padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.company-title { display: flex; align-items: center; gap: 15px; }
.company-title h2 { margin: 0 0 4px; }
.company-title span { color: var(--muted); font-size: 13px; }
.company-jobs { padding: 0 24px; }
.company-jobs .job-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.company-jobs .job-card:last-child { border-bottom: 0; }
.company-leads { padding: 18px 24px 24px; background: #f7faf8; border-top: 1px solid var(--line); }
.company-leads > .eyebrow { margin-bottom: 12px; }
.company-leads > p { margin: 0; }
.company-leads .lead-card { margin-top: 10px; box-shadow: none; }
.back-button { margin: -12px 0 16px; }
.job-detail { padding: clamp(24px, 4vw, 48px); }
.job-description { max-width: 860px; white-space: pre-wrap; font-size: 16px; line-height: 1.75; }
.job-detail footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-transform: capitalize; }
.job-people { margin-top: 28px; }
.lead-card { padding: 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.lead-card h3 { margin: 0 0 5px; }
.lead-card p { margin: 0; color: var(--muted); }
.lead-actions { display: flex; gap: 10px; align-items: center; }
.lead-actions select { width: 130px; }
.lead-jobs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 13px; }
.lead-jobs a { color: var(--forest-2); font-weight: 700; }
dialog { width: min(560px, calc(100vw - 30px)); padding: 0; border: 0; border-radius: 24px; box-shadow: 0 30px 90px rgba(6,32,23,.28); }
dialog::backdrop { background: rgba(7,27,21,.54); backdrop-filter: blur(4px); }
.dialog-body { padding: 30px; }
.dialog-body h2 { margin-bottom: 8px; }
.dialog-body > p { margin: 0 0 22px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.loading { min-height: 300px; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 32px; height: 32px; border: 3px solid #d8e4df; border-top-color: var(--forest-2); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 20; display: grid; gap: 10px; }
.toast { min-width: 280px; max-width: 420px; padding: 15px 18px; border-radius: 13px; color: white; background: #123f32; box-shadow: var(--shadow); animation: rise .2s ease-out; }
.toast.error { background: #8d372d; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-story { min-height: 56vh; }
  .app-shell { grid-template-columns: 84px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .sidebar .brand span:last-child, .nav-link span:last-child, .user-meta, .stage-badge { display: none; }
  .sidebar .brand { padding-inline: 10px; }
  .nav-link { justify-content: center; padding: 0; }
  .sidebar-foot { padding-inline: 10px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .detail-grid, .next-step { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 10; top: auto; bottom: 0; width: 100%; height: 68px; padding: 8px; flex-direction: row; }
  .sidebar .brand, .sidebar-foot { display: none; }
  .nav { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .nav-link { min-height: 52px; }
  .main { padding: 22px 15px 100px; }
  .topbar { margin-bottom: 22px; }
  .page-head { align-items: start; flex-direction: column; }
  .stats { grid-template-columns: 1fr 1fr; }
  .search-box { grid-template-columns: 1fr; }
  .job-card, .lead-card { grid-template-columns: 45px minmax(0, 1fr); }
  .search-save, .search-list > div { align-items: flex-start; flex-direction: column; }
  .company-head { align-items: flex-start; flex-direction: column; }
  .job-card .button, .lead-actions { grid-column: 1 / -1; }
  .detail-state { grid-column: 1 / -1; justify-self: start; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .login-story { padding: 38px 25px; }
  .login-action { padding: 20px; }
  .login-card { padding: 28px; }
}
