:root {
  --ink: #171821;
  --muted: #737684;
  --line: #e8e9ef;
  --surface: #f6f7fa;
  --white: #fff;
  --cyan: #06bddb;
  --violet: #7358e8;
  --pink: #e63cbd;
  --green: #22ad77;
  --red: #d64d6d;
  --gradient: linear-gradient(120deg, #00badb, #7060ed 52%, #e43abd);
  --sidebar: 245px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, "SF Pro Display", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.drawer-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
[hidden] { display: none !important; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(0, 186, 219, .22);
  outline-offset: 2px;
}

.sr-only {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

/* Login */
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(440px, .88fr) minmax(500px, 1.12fr);
  background: var(--white);
}

.login-visual {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 40px 56px;
  color: var(--white);
  background: linear-gradient(145deg, #11131c 0%, #191a2a 58%, #201933 100%);
}

.visual-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, .5);
  font-size: 11px;
  font-weight: 650;
}

.visual-brand img {
  width: 100px;
  height: 52px;
  object-fit: contain;
}

.visual-brand::after {
  position: absolute;
  left: 113px;
  width: 1px;
  height: 25px;
  content: "";
  background: rgba(255,255,255,.14);
}

.visual-brand span { margin-left: 5px; }

.visual-copy {
  position: relative;
  z-index: 2;
  margin-top: auto;
  margin-bottom: 45px;
}

.visual-copy > p:first-child {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, .36);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
}

.visual-copy h1 {
  margin: 0;
  font-size: clamp(46px, 4.3vw, 67px);
  line-height: 1;
  letter-spacing: -.06em;
}

.visual-copy h1 span {
  color: transparent;
  background: linear-gradient(100deg, #4ee5f0, #8d7bff 52%, #f05dce);
  background-clip: text;
  -webkit-background-clip: text;
}

.visual-copy > p:last-child {
  max-width: 450px;
  margin: 25px 0 0;
  color: rgba(255, 255, 255, .53);
  font-size: 14px;
  line-height: 1.7;
}

.visual-card {
  width: min(420px, 90%);
  position: relative;
  z-index: 2;
  margin-bottom: auto;
  padding: 20px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0,0,0,.18);
  backdrop-filter: blur(12px);
}

.visual-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.visual-card-head > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, .43);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.visual-card-head i {
  width: 6px;
  height: 6px;
  background: #4ae7aa;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(74,231,170,.1);
}

.visual-card-head strong { font-size: 10px; }

.pipeline-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 11px;
  margin-top: 9px;
  padding: 11px 12px;
  background: rgba(255,255,255,.045);
  border-radius: 12px;
}

.pipeline-avatar {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  color: #202232;
  background: #dffaff;
  border-radius: 10px;
  font-size: 8px;
  font-weight: 800;
}

.pipeline-avatar.second { background: #f5e5ff; }
.pipeline-row strong, .pipeline-row small { display: block; }
.pipeline-row strong { margin-bottom: 4px; font-size: 9px; }
.pipeline-row small { color: rgba(255,255,255,.35); font-size: 7px; }

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--cyan);
  border-radius: 50%;
}

.status-dot.violet { background: #9d85ff; }

.pipeline-bars {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}

.pipeline-bars span { height: 3px; flex: 1; background: rgba(255,255,255,.08); border-radius: 4px; }
.pipeline-bars span:first-child { background: var(--gradient); }

.visual-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.glow-one {
  top: -180px;
  right: -180px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(111, 78, 234, .38), rgba(230, 60, 189, .08) 49%, transparent 70%);
}

.glow-two {
  bottom: -220px;
  left: -210px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(0, 190, 222, .2), transparent 68%);
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 45px;
}

.login-form-wrap { width: min(405px, 100%); }
.mobile-logo { display: none; }

.overline {
  margin: 0 0 16px;
  color: #7763e3;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.login-form-wrap h2 {
  margin: 0;
  font-size: 39px;
  letter-spacing: -.052em;
}

.login-lead {
  margin: 9px 0 33px;
  color: var(--muted);
  font-size: 13px;
}

.login-field {
  display: block;
  margin-bottom: 18px;
}

.login-field > span {
  display: block;
  margin-bottom: 8px;
  color: #454752;
  font-size: 10px;
  font-weight: 700;
}

.login-field > div { position: relative; }

.login-field > div > svg {
  width: 18px;
  height: 18px;
  position: absolute;
  top: 50%;
  left: 15px;
  fill: none;
  stroke: #a0a2ad;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-50%);
}

.login-field input {
  width: 100%;
  height: 52px;
  padding: 0 46px;
  color: var(--ink);
  background: #fafafd;
  border: 1px solid #e4e5eb;
  border-radius: 12px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.login-field input:focus {
  background: var(--white);
  border-color: rgba(112, 96, 237, .55);
  box-shadow: 0 0 0 4px rgba(112, 96, 237, .08);
}

.login-field input::placeholder { color: #b0b2bb; }

#togglePassword {
  width: 42px;
  height: 52px;
  position: absolute;
  top: 0;
  right: 5px;
  display: grid;
  place-items: center;
  color: #9a9ca7;
  background: transparent;
  border: 0;
  cursor: pointer;
}

#togglePassword svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.login-error {
  display: none;
  margin: -5px 0 14px;
  padding: 10px 12px;
  color: #ae2c50;
  background: #fff0f4;
  border: 1px solid #f3d3dc;
  border-radius: 9px;
  font-size: 10px;
}

.login-error.visible { display: block; }

.primary-button {
  min-height: 49px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  color: var(--white);
  background: var(--gradient);
  border: 0;
  border-radius: 11px;
  box-shadow: 0 12px 28px rgba(109, 83, 225, .2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.primary-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 15px 34px rgba(109,83,225,.28); }
.primary-button:disabled { cursor: wait; opacity: .65; }
.primary-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-button { width: 100%; min-height: 53px; margin-top: 3px; }

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 18px;
  color: #9a9ca6;
  font-size: 9px;
}

.secure-note svg { width: 15px; height: 15px; fill: none; stroke: #41bcae; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.back-link {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 50px auto 0;
  color: #898b96;
  font-size: 10px;
  font-weight: 650;
}

.back-link:hover { color: var(--ink); }
.back-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Dashboard */
.dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
}

.sidebar {
  height: 100vh;
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 18px 20px;
  color: rgba(255, 255, 255, .7);
  background: linear-gradient(175deg, #13151f 0%, #1a1b2b 76%, #201a32 100%);
}

.sidebar-logo {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.sidebar-logo img { width: 91px; height: 47px; object-fit: contain; }
.sidebar-logo span { padding: 5px 7px; color: #6de1eb; background: rgba(0,190,222,.1); border: 1px solid rgba(0,190,222,.13); border-radius: 6px; font-size: 7px; font-weight: 800; letter-spacing: .12em; }

.sidebar nav { margin-top: 32px; }
.sidebar nav > p { margin: 0 12px 10px; color: rgba(255,255,255,.27); font-size: 8px; font-weight: 800; letter-spacing: .14em; }

.sidebar nav a {
  height: 47px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  color: rgba(255,255,255,.51);
  border-radius: 11px;
  font-size: 11px;
  font-weight: 650;
}

.sidebar nav a.active { color: var(--white); background: linear-gradient(100deg, rgba(100, 80, 225, .25), rgba(233, 57, 190, .11)); border: 1px solid rgba(134, 106, 239, .15); }
.sidebar nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sidebar nav i { min-width: 21px; height: 19px; display: grid; place-items: center; margin-left: auto; color: #65e0e9; background: rgba(0,190,222,.11); border-radius: 6px; font-size: 8px; font-style: normal; }

.programme-card {
  margin-top: auto;
  padding: 17px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
}

.programme-icon { width: 35px; height: 35px; display: grid; place-items: center; margin-bottom: 13px; color: #62e3ec; background: rgba(0,190,222,.1); border-radius: 10px; }
.programme-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.programme-card strong { color: var(--white); font-size: 10px; }
.programme-card p { margin: 7px 0 14px; color: rgba(255,255,255,.34); font-size: 8px; line-height: 1.5; }
.programme-card a { display: flex; align-items: center; justify-content: space-between; color: rgba(255,255,255,.63); font-size: 8px; font-weight: 700; }
.programme-card a svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.logout-button {
  height: 43px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 15px;
  padding: 0 13px;
  color: rgba(255,255,255,.42);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 650;
}

.logout-button:hover { color: var(--white); background: rgba(255,255,255,.05); }
.logout-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.dashboard-main { min-width: 0; }

.dashboard-header {
  height: 82px;
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.dashboard-header > div:first-of-type p { margin: 0 0 3px; color: #9a9ca8; font-size: 8px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-header h1 { margin: 0; font-size: 19px; letter-spacing: -.035em; }

.header-actions { display: flex; align-items: center; gap: 12px; }

.search-box {
  width: 280px;
  height: 42px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box > svg { width: 17px; height: 17px; position: absolute; left: 13px; fill: none; stroke: #9a9ca7; stroke-width: 1.7; stroke-linecap: round; }
.search-box input { width: 100%; height: 100%; padding: 0 48px 0 39px; color: var(--ink); background: #f7f8fa; border: 1px solid #e5e6eb; border-radius: 10px; outline: none; font-size: 10px; }
.search-box input:focus { background: var(--white); border-color: rgba(112, 88, 232, .5); box-shadow: 0 0 0 3px rgba(112,88,232,.06); }
.search-box input::placeholder { color: #a3a5af; }
.search-box kbd { position: absolute; right: 10px; padding: 4px 5px; color: #a2a4ae; background: var(--white); border: 1px solid #e2e3e8; border-radius: 5px; box-shadow: 0 1px 1px rgba(0,0,0,.03); font-family: inherit; font-size: 7px; }

.export-button { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 13px; color: #555864; background: var(--white); border: 1px solid #e3e4e9; border-radius: 10px; font-size: 9px; font-weight: 700; }
.export-button:hover { color: var(--violet); border-color: #cbc5f3; }
.export-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.admin-profile { display: flex; align-items: center; gap: 9px; margin-left: 3px; padding-left: 14px; border-left: 1px solid var(--line); }
.admin-profile > span { width: 35px; height: 35px; display: grid; place-items: center; color: var(--white); background: var(--gradient); border-radius: 10px; font-size: 8px; font-weight: 800; box-shadow: 0 7px 18px rgba(110,80,225,.16); }
.admin-profile strong, .admin-profile small { max-width: 140px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-profile strong { margin-bottom: 2px; font-size: 9px; }
.admin-profile small { color: #9698a3; font-size: 7px; }

.mobile-menu { display: none; }
.dashboard-content { padding: 31px 32px 45px; }

.welcome-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.welcome-row h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.04em; }
.welcome-row > div:first-child p { margin: 0; color: var(--muted); font-size: 10px; }

.live-status { display: flex; align-items: center; gap: 11px; padding: 10px 13px; background: var(--white); border: 1px solid #e6e7eb; border-radius: 11px; box-shadow: 0 6px 20px rgba(35,38,58,.04); }
.live-status > i { width: 8px; height: 8px; background: #2ccc8e; border: 2px solid #d6f7e9; border-radius: 50%; box-shadow: 0 0 0 3px rgba(44,204,142,.09); }
.live-status strong, .live-status small { display: block; }
.live-status strong { margin-bottom: 2px; font-size: 8px; }
.live-status small { color: #9698a3; font-size: 7px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 20px; }

.stat-card { min-height: 148px; padding: 18px; background: var(--white); border: 1px solid #e8e9ed; border-radius: 15px; box-shadow: 0 7px 22px rgba(34,37,57,.035); transition: transform .2s ease, box-shadow .2s ease; }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 13px 28px rgba(34,37,57,.065); }
.stat-top { display: flex; align-items: center; justify-content: space-between; }

.stat-icon { width: 35px; height: 35px; display: grid; place-items: center; color: #6256ce; background: #f0edff; border-radius: 10px; }
.stat-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-new { color: #049ab4; background: #e6faff; }
.icon-approved { color: #149866; background: #e8f9f2; }
.icon-progress { color: #bd308f; background: #ffebf8; }

.trend-pill { padding: 5px 7px; color: #8d8f9a; background: #f4f5f7; border-radius: 6px; font-size: 7px; font-weight: 700; }
.trend-cyan { color: #17899b; background: #eafafd; }
.trend-green { color: #218763; background: #eaf8f2; }
.trend-violet { color: #a32a7f; background: #fff0fa; }
.stat-card > strong { display: block; margin-top: 18px; font-size: 28px; line-height: 1; letter-spacing: -.04em; }
.stat-card > p { margin: 7px 0 0; color: #8d8f9b; font-size: 8px; font-weight: 600; }

.applications-panel { overflow: hidden; background: var(--white); border: 1px solid #e7e8ed; border-radius: 16px; box-shadow: 0 8px 25px rgba(35,38,58,.035); }

.panel-head { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; border-bottom: 1px solid #ededf1; }
.panel-head h2 { margin: 0 0 5px; font-size: 14px; letter-spacing: -.025em; }
.panel-head > div:first-child p { margin: 0; color: #9698a3; font-size: 8px; }

.filter-tabs { display: flex; align-items: center; gap: 3px; padding: 3px; background: #f5f6f8; border-radius: 9px; }
.filter-tabs button { height: 29px; padding: 0 10px; color: #858793; background: transparent; border: 0; border-radius: 7px; cursor: pointer; font-size: 8px; font-weight: 700; }
.filter-tabs button:hover { color: #4a4c58; }
.filter-tabs button.active { color: #4f43b2; background: var(--white); box-shadow: 0 3px 10px rgba(42,45,62,.07); }

.table-scroll { min-height: 314px; position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 17px; text-align: left; white-space: nowrap; }
th { height: 42px; color: #9a9ca7; background: #fbfbfc; border-bottom: 1px solid #ececf0; font-size: 7px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
td { height: 64px; color: #575965; border-bottom: 1px solid #f0f0f3; font-size: 9px; }
tbody tr { cursor: pointer; transition: background .18s ease; }
tbody tr:hover { background: #fafafe; }
tbody tr:last-child td { border-bottom: 0; }

.applicant-cell { display: flex; align-items: center; gap: 10px; }
.table-avatar { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; color: #4b409a; background: linear-gradient(135deg, #e9faff, #eee9ff); border: 1px solid #e0def4; border-radius: 10px; font-size: 8px; font-weight: 800; }
.applicant-cell strong, .applicant-cell small, .contact-cell span { display: block; }
.applicant-cell strong { margin-bottom: 4px; color: #2e303b; font-size: 9px; }
.applicant-cell small { color: #9a9ca6; font-size: 7px; }
.contact-cell span:first-child { margin-bottom: 4px; color: #4f515d; }
.contact-cell span:last-child { color: #999ba5; font-size: 7px; }
.location-cell strong { display: block; margin-bottom: 3px; color: #50525e; font-size: 8px; }
.location-cell small { color: #9b9da7; font-size: 7px; }

.status-badge { width: max-content; display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 7px; font-size: 7px; font-weight: 750; text-transform: capitalize; }
.status-badge::before { width: 5px; height: 5px; content: ""; background: currentColor; border-radius: 50%; }
.status-new { color: #078aa1; background: #e7fafd; }
.status-reviewing { color: #6151c3; background: #eeebff; }
.status-contacted { color: #a96312; background: #fff4df; }
.status-approved { color: #16845a; background: #e8f8f1; }
.status-rejected { color: #b23e5b; background: #ffedf1; }

.row-action { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; color: #9395a0; background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.row-action:hover { color: #5e4fd0; background: #f0edff; }
.row-action svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.loading-state, .empty-state { position: absolute; inset: 43px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #9395a0; background: var(--white); text-align: center; }
.loading-state span { width: 24px; height: 24px; margin-bottom: 10px; border: 2px solid #e7e5fa; border-top-color: var(--violet); border-radius: 50%; animation: spin .7s linear infinite; }
.loading-state p { margin: 0; font-size: 9px; }
.empty-state > span { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 13px; color: #888a96; background: #f3f4f7; border-radius: 14px; }
.empty-state svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h3 { margin: 0 0 6px; font-size: 12px; }
.empty-state p { margin: 0; font-size: 8px; }

@keyframes spin { to { transform: rotate(360deg); } }

.panel-footer { min-height: 57px; display: flex; align-items: center; justify-content: space-between; padding: 0 19px; border-top: 1px solid #ededf1; }
.panel-footer p { margin: 0; color: #999ba5; font-size: 8px; }
.panel-footer > div { display: flex; gap: 7px; }
.panel-footer button { height: 30px; display: flex; align-items: center; gap: 5px; padding: 0 10px; color: #666874; background: var(--white); border: 1px solid #e1e2e7; border-radius: 7px; cursor: pointer; font-size: 7px; font-weight: 700; }
.panel-footer button:disabled { color: #c0c1c8; background: #fafafa; cursor: not-allowed; }
.panel-footer svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Drawer */
.drawer-overlay { position: fixed; z-index: 50; inset: 0; background: rgba(20,21,31,.37); backdrop-filter: blur(3px); }

.application-drawer {
  width: min(540px, 100vw);
  position: fixed;
  z-index: 60;
  top: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--white);
  box-shadow: -25px 0 70px rgba(25,27,43,.16);
  transform: translateX(105%);
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}

.application-drawer.open { transform: none; }
.drawer-head { min-height: 101px; display: flex; align-items: flex-start; justify-content: space-between; padding: 25px 27px 20px; border-bottom: 1px solid var(--line); }
.drawer-head p { margin: 0 0 7px; color: #8c79ee; font-size: 7px; font-weight: 800; letter-spacing: .13em; }
.drawer-head h2 { margin: 0 0 5px; font-size: 20px; letter-spacing: -.035em; }
.drawer-head > div > span { color: #999ba5; font-size: 8px; }
.drawer-head button { width: 36px; height: 36px; display: grid; place-items: center; color: #858793; background: #f4f5f7; border: 0; border-radius: 10px; cursor: pointer; }
.drawer-head button:hover { color: var(--ink); }
.drawer-head svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

.drawer-body { overflow-y: auto; padding: 23px 27px; }
.drawer-section { margin-bottom: 25px; }
.drawer-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.drawer-section-title h3 { margin: 0; color: #777a87; font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.drawer-section-title button { padding: 0; color: #6554ce; background: none; border: 0; cursor: pointer; font-size: 8px; font-weight: 700; }

.detail-grid { overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; background: #e9eaf0; border: 1px solid #e9eaf0; border-radius: 12px; gap: 1px; }
.detail-item { min-width: 0; padding: 13px 14px; background: #fafafd; }
.detail-item.full { grid-column: 1/-1; }
.detail-item span, .detail-item strong, .detail-item a { display: block; }
.detail-item span { margin-bottom: 5px; color: #9a9ca6; font-size: 7px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.detail-item strong, .detail-item a { overflow: hidden; color: #42444f; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.detail-item a:hover { color: var(--violet); }

.answer-card { margin-bottom: 9px; padding: 14px 15px; background: #fafafd; border: 1px solid #e8e9ee; border-radius: 11px; }
.answer-card span { display: block; margin-bottom: 6px; color: #9395a0; font-size: 7px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.answer-card p { margin: 0; color: #51535f; font-size: 9px; line-height: 1.6; white-space: pre-wrap; }

.signature-card { padding: 16px; background: #fafafd; border: 1px solid #e7e8ed; border-radius: 12px; }
.signature-card img { width: 100%; height: 115px; object-fit: contain; background: var(--white); border: 1px solid #ececf0; border-radius: 8px; }
.signature-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 10px; }
.signature-meta strong, .signature-meta span { display: block; }
.signature-meta strong { margin-bottom: 3px; font-size: 9px; }
.signature-meta span { color: #9395a0; font-size: 7px; }
.verified-pill { flex: 0 0 auto; display: flex !important; align-items: center; gap: 5px; padding: 6px 8px; color: #17865d !important; background: #e8f8f1; border-radius: 7px; font-size: 7px !important; font-weight: 700; }
.verified-pill svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.notes-field span { display: block; margin-bottom: 8px; color: #555762; font-size: 9px; font-weight: 700; }
.notes-field textarea { width: 100%; min-height: 95px; padding: 12px 13px; color: var(--ink); background: #fafafd; border: 1px solid #e5e6eb; border-radius: 10px; outline: none; resize: vertical; font-size: 9px; line-height: 1.5; }
.notes-field textarea:focus { background: var(--white); border-color: rgba(112,88,232,.5); box-shadow: 0 0 0 3px rgba(112,88,232,.06); }

.contract-summary { padding: 14px 15px; background: #f7f5ff; border: 1px solid #e5e0ff; border-radius: 11px; }
.contract-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.contract-summary strong, .contract-summary span { display: block; }
.contract-summary strong { margin-bottom: 4px; color: #4c429c; font-size: 9px; }
.contract-summary span { color: #8c88aa; font-size: 7px; }
.contract-summary button { padding: 8px 10px; color: #5a4bc5; background: var(--white); border: 1px solid #dcd5ff; border-radius: 8px; cursor: pointer; font-size: 7px; font-weight: 700; }
.contract-clauses { display: none; margin-top: 14px; padding-top: 13px; border-top: 1px solid #dfd9fa; }
.contract-clauses.open { display: block; }
.contract-clauses h4 { margin: 13px 0 5px; color: #4b4d5b; font-size: 8px; }
.contract-clauses p { margin: 0; color: #7c7e8a; font-size: 7px; line-height: 1.6; }

.event-list { position: relative; display: grid; gap: 13px; }
.event-list::before { position: absolute; top: 8px; bottom: 8px; left: 4px; width: 1px; content: ""; background: #e2e3e9; }
.event-row { position: relative; display: grid; grid-template-columns: 10px 1fr; gap: 9px; }
.event-row > i { width: 9px; height: 9px; position: relative; z-index: 1; margin-top: 2px; background: var(--violet); border: 2px solid #eeeaff; border-radius: 50%; }
.event-row strong, .event-row small { display: block; }
.event-row strong { margin-bottom: 3px; color: #5a5c68; font-size: 8px; text-transform: capitalize; }
.event-row small { color: #9a9ca6; font-size: 7px; }

.drawer-footer { min-height: 92px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 13px; padding: 16px 27px 20px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -8px 25px rgba(25,27,43,.035); }
.drawer-footer label > span { display: block; margin-bottom: 6px; color: #696b77; font-size: 8px; font-weight: 700; }
.drawer-footer select { width: 100%; height: 43px; padding: 0 34px 0 12px; color: #454752; background: #fafafd; border: 1px solid #e3e4e9; border-radius: 9px; outline: none; font-size: 9px; font-weight: 650; text-transform: capitalize; }
.drawer-footer .primary-button { height: 43px; min-height: 43px; }

.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 10px; padding: 12px 15px; color: #454752; background: var(--white); border: 1px solid #e5e6eb; border-radius: 11px; box-shadow: 0 18px 45px rgba(25,27,43,.15); opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity .2s ease, transform .2s ease; }
.toast.visible { opacity: 1; transform: none; }
.toast > span { width: 26px; height: 26px; display: grid; place-items: center; color: #18855e; background: #e7f8f0; border-radius: 8px; }
.toast svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.toast p { margin: 0; font-size: 9px; font-weight: 650; }
.toast.error > span { color: #b43c5b; background: #ffedf1; }

.sidebar-overlay { display: none; }

@media (max-width: 1150px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .filter-tabs button { padding-inline: 8px; }
  .admin-profile > div { display: none; }
}

@media (max-width: 950px) {
  .login-screen { grid-template-columns: 1fr 1fr; }
  .login-visual { padding: 35px; }
  .visual-card { width: 100%; }
  .dashboard { grid-template-columns: 1fr; }
  .sidebar { width: var(--sidebar); position: fixed; left: 0; transform: translateX(-105%); transition: transform .25s ease; }
  .sidebar.open { transform: none; }
  .sidebar-overlay { position: fixed; z-index: 19; inset: 0; background: rgba(20,21,31,.35); }
  .sidebar-overlay.visible { display: block; }
  .mobile-menu { width: 38px; height: 38px; display: grid; place-items: center; margin-right: 12px; color: #626470; background: #f4f5f7; border: 0; border-radius: 9px; }
  .mobile-menu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
  .dashboard-header { justify-content: flex-start; }
  .header-actions { margin-left: auto; }
}

@media (max-width: 760px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; padding: 30px 22px; }
  .mobile-logo { display: block; margin-bottom: 50px; }
  .mobile-logo img { width: 110px; }
  .dashboard-header { height: 72px; padding: 0 16px; }
  .dashboard-header > div:first-of-type { display: none; }
  .search-box { width: min(240px, 47vw); }
  .search-box kbd { display: none; }
  .export-button span, .admin-profile { display: none; }
  .export-button { width: 40px; justify-content: center; padding: 0; }
  .dashboard-content { padding: 22px 16px 35px; }
  .welcome-row { align-items: flex-start; }
  .live-status { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .filter-tabs { width: 100%; overflow-x: auto; }
  .filter-tabs button { flex: 0 0 auto; }
  .table-scroll { min-height: 400px; }
  .application-drawer { width: 100vw; }
}

@media (max-width: 500px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 130px; }
  .panel-footer > p { display: none; }
  .panel-footer { justify-content: flex-end; }
  .drawer-head, .drawer-body { padding-inline: 20px; }
  .drawer-footer { grid-template-columns: 1fr; padding-inline: 20px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-item.full { grid-column: auto; }
}

@media print {
  body * { visibility: hidden; }
  .application-drawer, .application-drawer * { visibility: visible; }
  .application-drawer { width: 100%; position: absolute; inset: 0; display: block; box-shadow: none; transform: none; }
  .drawer-head { padding: 20px; }
  .drawer-head button, .drawer-footer, .notes-field, .event-list, .drawer-section-title button { display: none !important; }
  .drawer-body { overflow: visible; padding: 20px; }
  .contract-clauses { display: block !important; }
}

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

/* VisionCo admin document and workflow upgrade */
.application-drawer { width: min(620px, 100vw); }
.export-menu { position: relative; }
.export-button { border: 1px solid #e3e4e9; cursor: pointer; }
.export-button .chevron { width: 13px; height: 13px; margin-left: 2px; transition: transform .2s ease; }
.export-button[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.export-popover { width: 280px; position: absolute; z-index: 40; top: calc(100% + 9px); right: 0; padding: 10px; background: #fff; border: 1px solid #e5e6eb; border-radius: 13px; box-shadow: 0 22px 55px rgba(25,27,43,.18); }
.export-popover > p { margin: 2px 7px 8px; color: #9a9ca6; font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.export-popover a { display: block; padding: 11px 12px; border-radius: 9px; }
.export-popover a:hover { background: #f7f5ff; }
.export-popover strong, .export-popover small { display: block; }
.export-popover strong { margin-bottom: 3px; color: #3d3f4a; font-size: 9px; }
.export-popover small { color: #9698a3; font-size: 7px; line-height: 1.4; }
.quick-contact-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 24px; }
.quick-contact-bar a, .quick-contact-bar button { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 9px; color: #51535f; background: #fff; border: 1px solid #e4e5eb; border-radius: 10px; cursor: pointer; font-size: 8px; font-weight: 700; }
.quick-contact-bar a:hover, .quick-contact-bar button:hover { color: #5a4bc5; background: #f8f6ff; border-color: #d9d2ff; }
.quick-contact-bar svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.workflow-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.workflow-actions button { min-height: 42px; padding: 0 12px; background: #fff; border: 1px solid #e2e3e8; border-radius: 9px; cursor: pointer; font-size: 8px; font-weight: 750; }
.workflow-actions button:disabled { cursor: default; opacity: .42; }
.workflow-reviewing { color: #6151c3; }
.workflow-contacted { color: #a96312; }
.workflow-approved { color: #16845a; background: #f0fbf6 !important; border-color: #cfeee0 !important; }
.workflow-rejected { color: #b23e5b; background: #fff5f7 !important; border-color: #f0d6dd !important; }
.workflow-actions p { grid-column: 1/-1; margin: 2px 0 0; color: #9a9ca6; font-size: 7px; line-height: 1.5; }
.drawer-download-link { color: #6554ce; font-size: 8px; font-weight: 700; }
.contract-summary-compact > div { align-items: flex-start; }
.contract-summary-compact em { flex: 0 0 auto; padding: 6px 8px; color: #5a4bc5; background: #fff; border: 1px solid #dcd5ff; border-radius: 7px; font-size: 7px; font-style: normal; font-weight: 700; }
.contract-summary-compact > p { margin: 12px 0 0; padding-top: 11px; color: #8c88aa; border-top: 1px solid #dfd9fa; font-size: 7px; line-height: 1.5; overflow-wrap: anywhere; }
body.contract-open { overflow: hidden; }
.contract-modal { width: min(940px, calc(100vw - 36px)); max-height: calc(100vh - 36px); padding: 0; color: var(--ink); background: transparent; border: 0; border-radius: 18px; }
.contract-modal::backdrop { background: rgba(18,19,29,.64); backdrop-filter: blur(5px); }
.contract-modal-shell { max-height: calc(100vh - 36px); display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; background: #fff; border-radius: 18px; box-shadow: 0 30px 90px rgba(15,16,25,.28); }
.contract-modal header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 28px 20px; border-bottom: 1px solid #e8e9ef; }
.contract-modal header p { margin: 0 0 7px; color: #7b68df; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.contract-modal header h2 { margin: 0 0 5px; font-size: 22px; letter-spacing: -.04em; }
.contract-modal header span { color: #999ba5; font-size: 8px; }
.contract-modal header button { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: #858793; background: #f4f5f7; border: 0; border-radius: 10px; cursor: pointer; }
.contract-modal header svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.contract-modal-body { overflow-y: auto; padding: 27px 32px 38px; }
.contract-modal-overview { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; margin-bottom: 22px; background: #e8e9ef; border: 1px solid #e8e9ef; border-radius: 12px; gap: 1px; }
.contract-modal-overview > div { min-width: 0; padding: 13px 14px; background: #fafafd; }
.contract-modal-overview span, .contract-modal-overview strong { display: block; }
.contract-modal-overview span { margin-bottom: 5px; color: #9a9ca6; font-size: 7px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.contract-modal-overview strong { color: #454752; font-size: 9px; overflow-wrap: anywhere; }
.contract-effective-rule { margin: 0 0 25px; padding: 13px 15px; color: #5a4bc5; background: #f7f5ff; border: 1px solid #e5e0ff; border-radius: 10px; font-size: 9px; font-weight: 650; }
.contract-modal-body section { max-width: 790px; margin: 0 auto 18px; }
.contract-modal-body section h3 { margin: 0 0 6px; color: #343640; font-size: 11px; }
.contract-modal-body section p { margin: 0; color: #676a76; font-size: 10px; line-height: 1.72; }
.contract-modal-body .modal-signature { max-width: 790px; margin: 28px auto 0; }
.contract-modal footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 28px; background: rgba(255,255,255,.97); border-top: 1px solid #e8e9ef; box-shadow: 0 -8px 25px rgba(25,27,43,.035); }
.contract-modal footer > span { color: #999ba5; font-size: 8px; }
.contract-modal footer .primary-button { min-height: 42px; font-size: 9px; }
.contract-modal footer svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
@media (max-width: 760px) {
  .export-popover { width: min(280px, calc(100vw - 32px)); position: fixed; top: 67px; right: 16px; }
  .quick-contact-bar { grid-template-columns: 1fr 1fr; }
  .contract-modal { width: 100vw; max-height: 100vh; }
  .contract-modal-shell { max-height: 100vh; border-radius: 0; }
  .contract-modal-overview { grid-template-columns: 1fr; }
  .contract-modal header, .contract-modal-body, .contract-modal footer { padding-left: 20px; padding-right: 20px; }
  .contract-modal footer { align-items: stretch; flex-direction: column; }
}
