/* JobTrack 2026 - interface refresh
   Loaded after the legacy stylesheet so backend-compatible markup keeps working. */

:root {
  --bg: #f5f7fb;
  --sidebar: #101827;
  --card: #ffffff;
  --border: #e2e7ef;
  --blue: #3457d5;
  --blue-lt: #eef2ff;
  --blue-dk: #2946b7;
  --green: #0f9f6e;
  --green-lt: #e8f8f2;
  --amber: #d88914;
  --amber-lt: #fff7e6;
  --red: #dc4b5d;
  --red-lt: #fff0f2;
  --purple: #7253c8;
  --purple-lt: #f3efff;
  --text: #151c2b;
  --text2: #596579;
  --text3: #8e99aa;
  --sw: 264px;
  --r: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 39, .04), 0 6px 18px rgba(16, 24, 39, .035);
  --shadow-md: 0 18px 48px rgba(16, 24, 39, .10);
}

[data-theme="dark"] {
  --bg: #0b101b;
  --sidebar: #080d16;
  --card: #121a28;
  --border: #253044;
  --text: #f2f5fa;
  --text2: #aab5c6;
  --text3: #718096;
  --blue-lt: #1b2853;
  --green-lt: #12392e;
  --amber-lt: #3b2c12;
  --red-lt: #431c24;
  --purple-lt: #2c214f;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.index-page { background: var(--bg); }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(52, 87, 213, .22);
  outline-offset: 2px;
}

/* Brand */
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #4d6be2, #2c4bc0);
  color: #fff;
  box-shadow: 0 8px 24px rgba(52, 87, 213, .28);
  font-size: 14px;
  flex: 0 0 auto;
}

/* Authentication */
.login-page {
  min-height: 100vh;
  padding: 20px;
  background:
    radial-gradient(circle at 8% 15%, rgba(79, 111, 225, .16), transparent 26%),
    radial-gradient(circle at 90% 82%, rgba(15, 159, 110, .12), transparent 24%),
    #edf1f7;
  display: grid;
  place-items: center;
  overflow: auto;
}
.login-page::before, .login-page::after, .login-bg, .login-orbs { display: none !important; }
.auth-shell {
  position: relative;
  z-index: 2;
  width: min(1120px, 100%);
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 28px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 28px 90px rgba(25, 36, 61, .16);
}
.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 44px 52px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(155deg, rgba(14, 24, 43, .98), rgba(24, 43, 73, .96)),
    url('../image.png') center/cover;
}
.auth-story::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  right: -180px;
  top: -160px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, .025), 0 0 0 140px rgba(255, 255, 255, .018);
}
.auth-story::after {
  content: '';
  position: absolute;
  inset: auto -40px -80px 35%;
  height: 260px;
  background: radial-gradient(ellipse, rgba(79, 111, 225, .30), transparent 68%);
  pointer-events: none;
}
.auth-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  width: fit-content;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -.5px;
}
.auth-story-copy { position: relative; z-index: 1; margin: auto 0 42px; max-width: 510px; }
.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #bfcaf3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.auth-story h1 {
  max-width: 520px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(42px, 4.4vw, 62px);
  line-height: .99;
  letter-spacing: -2.3px;
}
.auth-story h1 em { color: #8aa0f4; font-style: normal; }
.auth-story-copy > p {
  max-width: 500px;
  margin-top: 24px;
  color: rgba(235, 240, 250, .68);
  font-size: 16px;
  line-height: 1.7;
}
.auth-benefits { position: relative; z-index: 1; display: grid; gap: 10px; }
.auth-benefits > div {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 13px;
  background: rgba(255, 255, 255, .045);
  backdrop-filter: blur(6px);
}
.auth-benefits > div > i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(132, 156, 245, .13);
  color: #aebefa;
}
.auth-benefits span { display: flex; flex-direction: column; }
.auth-benefits strong { font-size: 13px; font-weight: 650; }
.auth-benefits small { color: rgba(235, 240, 250, .48); font-size: 11px; margin-top: 1px; }
.auth-trust {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 24px;
  color: rgba(235, 240, 250, .43);
  font-size: 11px;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 54px;
  background: #fff;
}
.login-card {
  position: static;
  z-index: auto;
  width: 100%;
  max-width: 410px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
  backdrop-filter: none;
  animation: none;
}
.auth-mobile-brand { display: none; }
.auth-heading { margin-bottom: 26px; }
.auth-kicker { color: var(--blue); font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.auth-heading h2 { margin-top: 7px; font-family: 'Bricolage Grotesque', sans-serif; font-size: 31px; line-height: 1.1; letter-spacing: -1px; color: #151c2b; }
.auth-heading p { margin-top: 8px; color: #7b8799; font-size: 13.5px; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 25px;
  border: 1px solid #e4e8ef;
  border-radius: 12px;
  background: #f3f5f8;
}
.auth-tab {
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7b8799;
  font-size: 13px;
  font-weight: 650;
  transition: .18s ease;
}
.auth-tab.active { background: #fff; color: #1d2637; box-shadow: 0 2px 8px rgba(20, 29, 48, .08); }
.auth-form { display: grid; gap: 15px; }
.lc-field { margin: 0; text-align: left; }
.lc-field label { display: flex; justify-content: space-between; margin: 0 0 6px; color: #47546a; font-size: 11px; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; }
.lc-field label span { color: #a2abba; font-size: 10px; font-weight: 600; }
.lc-field small { display: block; margin-top: 5px; color: #929cac; font-size: 10.5px; }
.input-shell { position: relative; display: flex; align-items: center; }
.input-shell > i { position: absolute; left: 13px; color: #9ca7b7; font-size: 12px; pointer-events: none; }
.lc-field .input-shell input {
  width: 100%;
  min-height: 46px;
  padding: 11px 43px 11px 37px;
  border: 1px solid #dce2eb;
  border-radius: 11px;
  background: #fff;
  color: #182132;
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.lc-field .input-shell input::placeholder { color: #aab2bf; }
.lc-field .input-shell input:focus { border-color: #7088e5; box-shadow: 0 0 0 4px rgba(52, 87, 213, .10); }
.password-toggle { position: absolute; right: 10px; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: #8d98a8; }
.password-toggle:hover { background: #f1f3f7; color: #4d5a70; }
.btn-login {
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 2px;
  padding: 12px 16px;
  border: 0;
  border-radius: 11px;
  background: #294bc7;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(41, 75, 199, .21);
}
.btn-login:hover { background: #203eac; transform: translateY(-1px); box-shadow: 0 12px 30px rgba(41, 75, 199, .28); }
.lc-err { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 15px; padding: 11px 13px; border: 1px solid #ffd1d8; border-radius: 10px; background: #fff4f5; color: #ba3448; font-size: 12px; }
.lc-hint { margin-top: 18px !important; color: #8993a3 !important; font-size: 12px !important; text-align: center; }
.lc-hint a { color: #3457d5 !important; font-weight: 650; text-decoration: none !important; }
.legal-hint { line-height: 1.5; }
.auth-footer { display: flex; justify-content: center; gap: 10px; margin-top: 26px; padding-top: 20px; border-top: 1px solid #edf0f4; color: #a0a8b5; font-size: 10.5px; }
.auth-footer a:hover { color: #4d5a70; }

/* Main shell */
.shell { min-height: 100vh; }
.sidebar {
  width: var(--sw);
  padding: 18px 14px 14px;
  border-right: 1px solid rgba(255, 255, 255, .045);
  background: linear-gradient(180deg, #111b2c, #0c1422 72%);
  box-shadow: none;
}
.sl { padding: 8px 10px 23px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.app-brand { display: flex; align-items: center; gap: 11px; color: #fff; font-family: 'Bricolage Grotesque', sans-serif; font-size: 21px; font-weight: 750; letter-spacing: -.5px; }
.sl > p { margin: 8px 0 0 46px; color: rgba(255, 255, 255, .37); font-size: 10.5px; }
.db-badge { display: none; }
.ns { padding: 20px 0 2px; }
.nl { padding: 0 12px 8px; color: rgba(255, 255, 255, .30); font-size: 9.5px; font-weight: 750; letter-spacing: .11em; }
.ni {
  min-height: 40px;
  margin: 2px 0;
  padding: 9px 11px;
  gap: 10px;
  border-radius: 10px;
  color: rgba(237, 242, 250, .58);
  font-size: 12.5px;
  font-weight: 520;
}
.ni i { width: 17px; color: rgba(237, 242, 250, .38); font-size: 13px; }
.ni:hover { background: rgba(255, 255, 255, .055); color: #fff; }
.ni.active { background: linear-gradient(135deg, rgba(78, 107, 222, .23), rgba(78, 107, 222, .12)); color: #fff; box-shadow: inset 0 0 0 1px rgba(132, 156, 245, .14); }
.ni.active i { color: #9fb0f4; }
.nbadge { margin-left: auto; border: 0; background: rgba(255, 255, 255, .10); color: rgba(255, 255, 255, .72); }
.sb { margin-top: auto; padding-top: 11px; border-top: 1px solid rgba(255, 255, 255, .07); }
.up { padding: 9px 8px; border-radius: 11px; }
.up:hover { background: rgba(255, 255, 255, .045); }
.ava { width: 35px; height: 35px; border-radius: 11px; background: linear-gradient(145deg, #4d6be2, #2948b8); box-shadow: 0 7px 18px rgba(35, 65, 172, .24); }
.up-info p { color: #f2f5fb; font-size: 12.5px; }
.up-info span { color: rgba(255, 255, 255, .35); font-size: 10px; }

.main { margin-left: var(--sw); min-width: 0; }
.topbar {
  min-height: 74px;
  height: auto;
  position: sticky;
  top: 0;
  z-index: 40;
  gap: 12px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(14px);
}
.topbar-heading { display: flex; flex-direction: column; min-width: 170px; }
.tb-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: 17px; font-weight: 720; letter-spacing: -.25px; }
.topbar-heading small { color: var(--text3); font-size: 10.5px; }
.sw { width: min(390px, 35vw); height: 41px; margin-left: auto; border: 1px solid var(--border); border-radius: 11px; background: var(--bg); }
.sw:focus-within { border-color: #8fa1e7; box-shadow: 0 0 0 3px rgba(52, 87, 213, .08); }
.sw input { width: 100%; font-size: 12.5px; }
.sw i { color: var(--text3); }
.mobile-nav-toggle, .sidebar-backdrop { display: none; }
.ps { padding: 27px 28px 44px; }

.dashboard-welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding: 4px 2px;
}
.dashboard-eyebrow { color: var(--blue); font-size: 9.5px; font-weight: 780; letter-spacing: .1em; text-transform: uppercase; }
.dashboard-welcome h2 { margin-top: 5px; font-family: 'Bricolage Grotesque', sans-serif; font-size: 25px; line-height: 1.15; letter-spacing: -.7px; }
.dashboard-welcome p { margin-top: 7px; color: var(--text2); font-size: 12.5px; }
.dashboard-welcome-actions { display: flex; gap: 8px; flex: 0 0 auto; }

/* Shared UI */
.btn { min-height: 36px; padding: 8px 12px; border-radius: 10px; font-size: 12px; font-weight: 650; transition: .15s ease; }
.btn-p { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 5px 14px rgba(52, 87, 213, .16); }
.btn-p:hover { background: var(--blue-dk); transform: translateY(-1px); }
.btn-g { border: 1px solid var(--border); background: var(--card); color: var(--text2); }
.btn-g:hover { border-color: #cbd3df; background: var(--bg); color: var(--text); }
.btn-d { border: 1px solid transparent; background: var(--red-lt); color: var(--red); }
.btn-icon { width: 38px; padding: 0; }
.btn-xs { min-height: 30px; padding: 5px 8px; border-radius: 8px; }
.btn-sm { min-height: 32px; padding: 6px 9px; }
.sh { margin-bottom: 18px; }
.sh h2 { font-size: 20px; letter-spacing: -.45px; }
.tc, .sc, .cb, .ecard { border: 1px solid var(--border); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow-sm); }
.tc { overflow: hidden; }
.tch { min-height: 54px; padding: 13px 17px; border-bottom: 1px solid var(--border); }
.tch h3 { font-size: 13px; font-weight: 680; }
.sg { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.sc { min-height: 154px; padding: 18px; position: relative; overflow: hidden; }
.sc::after { content: ''; position: absolute; width: 90px; height: 90px; right: -40px; top: -40px; border-radius: 50%; background: var(--blue-lt); opacity: .65; }
.sic { width: 36px; height: 36px; border-radius: 11px; }
.sv { margin-top: 15px; font-family: 'Bricolage Grotesque', sans-serif; font-size: 29px; letter-spacing: -1px; }
.sl2 { color: var(--text2); font-size: 11.5px; }
.pb { height: 6px; border-radius: 999px; background: var(--bg); }
.pf { border-radius: inherit; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 15px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 70%, var(--card)); color: var(--text3); font-size: 9.5px; font-weight: 750; letter-spacing: .06em; }
td { padding: 12px 15px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: color-mix(in srgb, var(--blue-lt) 36%, var(--card)); }
.clogo { width: 34px; height: 34px; border-radius: 10px; box-shadow: none; font-size: 12px; }
.cn { font-size: 12.5px; font-weight: 680; }
.cs { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text3); font-size: 10.5px; }
.badge { padding: 4px 8px; border-radius: 7px; font-size: 9.5px; font-weight: 700; }
.chip { min-height: 33px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text2); font-size: 11px; }
.chip:hover, .chip.active { border-color: #9aa9e5; background: var(--blue-lt); color: var(--blue); }
.empty { padding: 42px 20px; }
.empty i { font-size: 28px; }

/* Dossiers: stable detail view instead of a hover-only flip card */
.dg { display: grid; grid-template-columns: 1fr; gap: 12px; }
.dc { height: auto; min-height: 188px; perspective: none; cursor: default; }
.dc-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .65fr); transform: none !important; transition: none; }
.dc-front, .dc-back { position: relative; inset: auto; min-height: 188px; padding: 17px 18px; overflow: visible; backface-visibility: visible; -webkit-backface-visibility: visible; box-shadow: var(--shadow-sm); }
.dc-front { border-radius: var(--r) 0 0 var(--r); border-right: 0; }
.dc-back { transform: none; border-radius: 0 var(--r) var(--r) 0; background: color-mix(in srgb, var(--bg) 62%, var(--card)); }
.dc:hover .dc-front, .dc:hover .dc-back { border-color: var(--border); box-shadow: var(--shadow-sm); }
.dd { color: var(--blue); font-size: 9.5px; }
.dt { font-size: 15px; font-weight: 700; }
.dp { margin: 3px 0 13px; font-size: 11.5px; }
.dc-front > div:last-child { display: none !important; }
.fchip { padding: 4px 7px; border-radius: 7px; background: var(--bg); font-size: 9.5px; }
.fchip-back { padding: 6px 8px; border-radius: 8px; background: var(--card); font-size: 10.5px; }
.fchip-back:hover { transform: translateX(2px); }
.dc-back-actions { margin-top: 4px; }

/* Forms and overlays */
.mbg { background: rgba(8, 14, 24, .58); backdrop-filter: blur(5px); }
.modal { padding: 25px; border-radius: 18px; box-shadow: var(--shadow-md); transform: translateY(10px); }
.mbg.open .modal { transform: translateY(0); }
.modal h2 { font-size: 20px; }
.fg label { color: var(--text2); font-size: 9.5px; letter-spacing: .055em; }
.fg input, .fg select, .fg textarea { min-height: 41px; padding: 9px 11px; border-radius: 10px; background: var(--card); }
.fg input:focus, .fg select:focus, .fg textarea:focus { border-color: #91a1df; box-shadow: 0 0 0 3px rgba(52, 87, 213, .08); }
.dz { border-radius: 12px; background: color-mix(in srgb, var(--bg) 65%, var(--card)); }
.notif { border-radius: 12px; box-shadow: var(--shadow-md); }

@media (max-width: 1100px) {
  .sg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { padding-inline: 20px; }
  .ps { padding-inline: 20px; }
  .dc-inner { grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); }
  .dashboard-main-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 520px; min-height: auto; }
  .auth-story { display: none; }
  .auth-panel { padding: 38px 35px; }
  .auth-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; color: #151c2b; font-family: 'Bricolage Grotesque', sans-serif; font-size: 20px; font-weight: 750; }
  .sidebar { transform: translateX(-102%); z-index: 110; transition: transform .22s ease; }
  body.nav-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 100; border: 0; background: rgba(9, 14, 24, .5); backdrop-filter: blur(2px); }
  body.nav-open .sidebar-backdrop { display: block; }
  .main { margin-left: 0; }
  .mobile-nav-toggle { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text2); }
  .sw { width: min(300px, 32vw); }
}

@media (max-width: 720px) {
  .login-page { padding: 0; background: #fff; }
  .auth-shell { width: 100%; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .auth-panel { align-items: flex-start; padding: 30px 24px; }
  .login-card { max-width: none; }
  .auth-heading h2 { font-size: 27px; }
  .topbar { min-height: 66px; padding: 10px 14px; }
  .topbar-heading small { display: none; }
  .tb-title { font-size: 15px; }
  .sw { display: none; }
  .topbar-new { width: 38px; overflow: hidden; white-space: nowrap; gap: 20px; padding: 0 12px; }
  .topbar-new i { margin-right: 20px; }
  .ps { padding: 18px 14px 34px; }
  .sg { grid-template-columns: 1fr 1fr; gap: 10px; }
  .sc { min-height: 142px; padding: 15px; }
  .sv { font-size: 25px; }
  .sh { align-items: flex-start; flex-direction: column; }
  .dashboard-welcome { align-items: flex-start; flex-direction: column; }
  .dashboard-welcome-actions { width: 100%; }
  .dashboard-welcome-actions .btn { flex: 1; }
  .topbar-new { display: none; }
  .sh > div { width: 100%; overflow-x: auto; }
  .tc { overflow-x: auto; }
  table { min-width: 700px; }
  .recent-card { overflow: hidden; }
  .recent-card table { min-width: 0; table-layout: fixed; }
  .recent-card th:first-child, .recent-card td:first-child { width: 72%; }
  .recent-card th:nth-child(3), .recent-card td:nth-child(3),
  .recent-card th:nth-child(4), .recent-card td:nth-child(4) { display: none; }
  .recent-card th, .recent-card td { padding-inline: 12px; }
  .dc-inner { grid-template-columns: 1fr; }
  .dc-front { border-right: 1px solid var(--border); border-radius: var(--r) var(--r) 0 0; }
  .dc-back { border-top: 0; border-radius: 0 0 var(--r) var(--r); }
  .fr { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .auth-panel { padding-inline: 19px; }
  .sg { grid-template-columns: 1fr; }
  .sc { min-height: 132px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
