/*
 * AOFEI NEW ENERGY / JOYO NEW ENERGY CO., LTD.
 * Opportunity Registration System V1.0
 * Company Confidential - Internal Use Only
 */
:root {
  --blue-950: #07245a;
  --blue-900: #0a347e;
  --blue-800: #0b4dbb;
  --blue-700: #1464d2;
  --blue-600: #2778e7;
  --blue-100: #dceaff;
  --blue-50: #eef5ff;
  --green-700: #16884c;
  --green-600: #21a45d;
  --green-100: #dcf7e8;
  --orange-700: #c75a0c;
  --orange-500: #f4831f;
  --orange-100: #ffeddc;
  --red-700: #b42318;
  --red-100: #fee4e2;
  --purple-700: #6941c6;
  --purple-100: #eee8ff;
  --teal-700: #087b75;
  --teal-100: #d8f5f2;
  --ink-950: #101828;
  --ink-800: #27364d;
  --ink-700: #344054;
  --ink-600: #475467;
  --ink-500: #667085;
  --ink-400: #98a2b3;
  --line: #d8e2ef;
  --line-soft: #e9eff6;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #edf3f9;
  --shadow-sm: 0 2px 8px rgba(15, 45, 80, .07);
  --shadow-md: 0 12px 36px rgba(15, 45, 80, .11);
  --shadow-lg: 0 24px 70px rgba(4, 32, 80, .16);
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 22px;
  --content: 1480px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #eef3f9; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink-950);
  background:
    radial-gradient(circle at 12% -8%, rgba(39,120,231,.15), transparent 30%),
    radial-gradient(circle at 100% 5%, rgba(33,164,93,.09), transparent 25%),
    linear-gradient(180deg, #f6f9fd 0%, #eef3f9 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue-700); text-decoration: none; }
a:hover { color: var(--blue-900); }
img { max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--ink-500); }
.small { font-size: .84rem; }
.tiny { font-size: .74rem; }
.nowrap { white-space: nowrap; }
.break-all { word-break: break-all; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.full-width { width: 100%; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0 !important; }
.gap-8 { gap: 8px; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(260px, auto) 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 76px;
  padding: 10px clamp(16px, 3vw, 42px);
  color: #fff;
  background: linear-gradient(100deg, var(--blue-950), var(--blue-800) 72%, #116c9e);
  box-shadow: 0 4px 18px rgba(3, 31, 78, .24);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: #fff;
}
.brand:hover { color: #fff; }
.brand img {
  width: 150px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
  padding: 3px 7px;
  background: rgba(255,255,255,.96);
  border-radius: 10px;
}
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-copy strong { font-size: 1.02rem; letter-spacing: .02em; }
.brand-copy small { color: rgba(255,255,255,.76); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-nav { display: flex; justify-content: center; align-items: stretch; gap: 4px; min-width: 0; }
.nav-link {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: 7px 13px;
  border-radius: 10px;
  color: rgba(255,255,255,.82);
  font-size: .89rem;
  text-align: center;
  white-space: nowrap;
  transition: .18s ease;
}
.nav-link small { font-size: .68rem; opacity: .75; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.13); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 20%; right: 20%; bottom: 2px;
  height: 3px;
  border-radius: 3px;
  background: #7fe39f;
}
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-summary { min-width: 0; text-align: right; }
.user-summary strong { display: block; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9rem; }
.user-summary small { display: block; max-width: 190px; color: rgba(255,255,255,.68); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-menu-btn { display: none; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; border-radius: 9px; padding: 7px 10px; cursor: pointer; }

.confidential-strip {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 7px 18px;
  color: #773f00;
  background: linear-gradient(90deg, #fff1c7, #fff7df, #fff1c7);
  border-bottom: 1px solid #f1d897;
  font-size: .78rem;
}
.confidential-strip strong { letter-spacing: .06em; }

.page { width: min(var(--content), calc(100% - 36px)); margin: 0 auto; padding: 26px 0 46px; flex: 1; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.page-head h1 { margin: 2px 0 0; font-size: clamp(1.5rem, 2.4vw, 2.25rem); letter-spacing: -.025em; }
.page-head h1 small { display: inline-block; margin-left: 8px; color: var(--ink-500); font-size: .48em; font-weight: 600; letter-spacing: 0; }
.page-head p { max-width: 780px; margin: 5px 0 0; color: var(--ink-500); }
.eyebrow { color: var(--blue-700); font-size: .73rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: clamp(16px, 2vw, 24px); }
.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.card-title h2, .card-title h3 { margin: 0; font-size: 1.06rem; }
.card-title p { margin: 3px 0 0; color: var(--ink-500); font-size: .82rem; }
.card-subtle { background: linear-gradient(180deg, #fff, #fbfdff); }
.card-alert { border-color: #f4c995; background: #fffaf4; }
.card-danger { border-color: #f0b5b0; background: #fff8f7; }
.card-success { border-color: #a9dfbd; background: #f7fff9; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.layout-main { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(310px, .8fr); gap: 18px; align-items: start; }
.layout-review { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(360px, .8fr); gap: 18px; align-items: start; }
.sticky-side { position: sticky; top: 105px; }

.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(135px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.kpi-card::after { content: ""; position: absolute; right: -23px; bottom: -32px; width: 90px; height: 90px; border-radius: 50%; background: currentColor; opacity: .06; }
.kpi-card .kpi-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 10px; border-radius: 10px; background: currentColor; color: #fff; font-size: 1rem; }
.kpi-card .kpi-icon span { filter: brightness(0) invert(1); }
.kpi-card strong { display: block; font-size: 1.75rem; line-height: 1; color: var(--ink-950); }
.kpi-card label { display: block; margin-top: 7px; color: var(--ink-600); font-weight: 700; font-size: .86rem; }
.kpi-card small { display: block; color: var(--ink-400); font-size: .7rem; }
.kpi-blue { color: var(--blue-700); }
.kpi-green { color: var(--green-600); }
.kpi-orange { color: var(--orange-500); }
.kpi-red { color: var(--red-700); }
.kpi-purple { color: var(--purple-700); }
.kpi-teal { color: var(--teal-700); }

.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.quick-action {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 88px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink-800);
  transition: .18s ease;
}
.quick-action:hover { transform: translateY(-2px); border-color: #a7c5ef; box-shadow: var(--shadow-md); color: var(--blue-800); }
.quick-action .qa-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 12px; background: var(--blue-50); color: var(--blue-700); font-size: 1.35rem; }
.quick-action strong { display: block; }
.quick-action small { display: block; margin-top: 3px; color: var(--ink-500); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 750;
  font-size: .86rem;
  cursor: pointer;
  transition: .16s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--blue-700), var(--blue-900)); box-shadow: 0 5px 14px rgba(20,100,210,.23); }
.btn-primary:hover { color: #fff; box-shadow: 0 8px 18px rgba(20,100,210,.3); }
.btn-success { color: #fff; background: linear-gradient(135deg, var(--green-600), var(--green-700)); }
.btn-warning { color: #fff; background: linear-gradient(135deg, var(--orange-500), var(--orange-700)); }
.btn-danger { color: #fff; background: linear-gradient(135deg, #d92d20, var(--red-700)); }
.btn-secondary { color: var(--blue-800); background: var(--blue-50); border-color: #bdd4f4; }
.btn-muted { color: var(--ink-700); background: #fff; border-color: var(--line); }
.btn-dark { color: #fff; background: var(--ink-800); }
.btn-ghost { color: inherit; background: transparent; border-color: rgba(255,255,255,.24); }
.btn-ghost:hover { background: rgba(255,255,255,.11); color: #fff; }
.btn-sm { min-height: 33px; padding: 6px 10px; font-size: .77rem; border-radius: 8px; }
.btn-lg { min-height: 50px; padding: 12px 22px; font-size: .98rem; border-radius: 12px; }
.btn-icon { width: 40px; padding: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 780;
  line-height: 1.2;
  vertical-align: middle;
}
.badge-blue { color: #164c96; background: var(--blue-100); }
.badge-green { color: #137842; background: var(--green-100); }
.badge-orange { color: #9a4609; background: var(--orange-100); }
.badge-red { color: #a22118; background: var(--red-100); }
.badge-purple { color: #5d35ad; background: var(--purple-100); }
.badge-gray { color: #505d70; background: #e9edf3; }
.badge-teal { color: #086c67; background: var(--teal-100); }
.badge-outline { color: var(--ink-600); background: #fff; border: 1px solid var(--line); }

.form-section { margin-bottom: 18px; padding: clamp(17px, 2.2vw, 25px); }
.form-section:last-child { margin-bottom: 0; }
.section-number {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 9px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  font-weight: 800;
}
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.field { grid-column: span 6; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.span-12 { grid-column: span 12; }
.field.span-8 { grid-column: span 8; }
.field.span-4 { grid-column: span 4; }
.field.span-3 { grid-column: span 3; }
.field.span-2 { grid-column: span 2; }
.field label, .field > span:first-child { color: var(--ink-700); font-size: .82rem; font-weight: 760; }
.field label em, .required { color: #d92d20; font-style: normal; }
.field small { color: var(--ink-500); font-size: .72rem; }
input, select, textarea {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  color: var(--ink-950);
  background: #fff;
  border: 1px solid #cbd8e6;
  border-radius: 9px;
  outline: none;
  transition: .14s ease;
}
input::placeholder, textarea::placeholder { color: #a0acbb; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(39,120,231,.14); }
input[readonly], input:disabled, select:disabled, textarea:disabled { color: var(--ink-600); background: #f0f4f8; cursor: not-allowed; }
textarea { min-height: 105px; resize: vertical; }
.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; min-width: 0; }
.help-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 13px;
  color: #23466f;
  background: var(--blue-50);
  border: 1px solid #c7dcf8;
  border-radius: 10px;
  font-size: .79rem;
}
.help-box.warning { color: #7c410a; background: #fff6e9; border-color: #f1d09e; }
.help-box.success { color: #12693d; background: #effcf4; border-color: #b9e4c8; }
.help-box.danger { color: #89251f; background: #fff1f0; border-color: #f0bbb6; }
.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 17px clamp(17px, 2.2vw, 25px);
  border-top: 1px solid var(--line-soft);
  background: #fbfdff;
  border-radius: 0 0 var(--radius) var(--radius);
}

.identity-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px;
  background: linear-gradient(135deg, #f2f7ff, #f9fcff);
  border: 1px solid #cfe0f5;
  border-radius: 12px;
}
.identity-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #fff; background: var(--blue-700); font-size: 1.25rem; }
.identity-panel strong { display: block; }
.identity-panel span { color: var(--ink-500); font-size: .77rem; }

.gps-panel { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.gps-status { display: flex; align-items: center; gap: 8px; margin-top: 7px; color: var(--ink-500); font-size: .76rem; }
.gps-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-400); }
.gps-dot.ok { background: var(--green-600); box-shadow: 0 0 0 4px rgba(33,164,93,.12); }
.gps-dot.bad { background: var(--red-700); }
.gps-coords { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.photo-drop {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 20px;
  text-align: center;
  border: 2px dashed #a7bfdd;
  border-radius: 13px;
  background: linear-gradient(180deg, #fbfdff, #f1f7fe);
  cursor: pointer;
  transition: .16s ease;
}
.photo-drop:hover, .photo-drop.dragover { border-color: var(--blue-600); background: #edf5ff; }
.photo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-drop .photo-icon { font-size: 2rem; }
.photo-drop strong { display: block; margin-top: 5px; }
.photo-drop small { color: var(--ink-500); }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.photo-item { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 10px; background: #eaf0f7; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item button { position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgba(151,26,20,.88); cursor: pointer; }
.photo-item span { position: absolute; left: 7px; bottom: 7px; max-width: calc(100% - 14px); padding: 3px 7px; border-radius: 6px; color: #fff; background: rgba(10,28,52,.76); font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.table-wrap { overflow: auto; border: 1px solid var(--line-soft); border-radius: 11px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .81rem; }
th { position: sticky; top: 0; z-index: 2; padding: 11px 10px; color: #fff; background: var(--blue-900); text-align: left; font-size: .75rem; white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { background: #fff; transition: .12s ease; }
tbody tr:hover { background: #f5f9ff; }
.table-link { font-weight: 800; color: var(--blue-800); }
.table-main { min-width: 1180px; }
.table-compact { min-width: 760px; }
.mobile-cards { display: none; }

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 220px auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}
.search-box { position: relative; }
.search-box input { padding-left: 37px; }
.search-box::before { content: "⌕"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-400); font-size: 1.25rem; z-index: 1; }

.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 2.5vw, 28px);
  color: #fff;
  background: linear-gradient(120deg, var(--blue-950), var(--blue-800) 72%, #0b8e85);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 18px;
}
.detail-hero::after { content: ""; position: absolute; width: 320px; height: 320px; right: -110px; top: -180px; border-radius: 50%; background: rgba(255,255,255,.09); }
.detail-hero-top { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.detail-hero h1 { margin: 8px 0 4px; font-size: clamp(1.45rem, 2.8vw, 2.25rem); }
.detail-hero p { margin: 0; color: rgba(255,255,255,.76); }
.detail-hero .badge { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.detail-code { color: #aee9ff; font-weight: 800; letter-spacing: .05em; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.detail-item { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.detail-item:nth-child(odd) { padding-right: 18px; }
.detail-item:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--line-soft); }
.detail-item label { display: block; margin-bottom: 4px; color: var(--ink-500); font-size: .72rem; }
.detail-item strong, .detail-item span { display: block; word-break: break-word; }
.detail-item.span-2 { grid-column: span 2; padding-left: 0; padding-right: 0; border-left: 0; }
.photo-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.photo-gallery a { overflow: hidden; aspect-ratio: 4/3; border-radius: 10px; border: 1px solid var(--line); background: #edf3f9; }
.photo-gallery img { width: 100%; height: 100%; object-fit: cover; transition: .2s ease; }
.photo-gallery a:hover img { transform: scale(1.025); }

.timeline { position: relative; margin: 0; padding: 0 0 0 24px; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 7px; bottom: 9px; width: 2px; background: #d8e4f1; }
.timeline li { position: relative; padding: 0 0 17px 10px; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue-700); box-shadow: 0 0 0 4px #e5effd; }
.timeline li:last-child { padding-bottom: 0; }
.timeline strong { display: block; font-size: .84rem; }
.timeline p { margin: 4px 0; color: var(--ink-700); white-space: pre-wrap; }
.timeline small { color: var(--ink-400); }

.candidate-list { display: grid; gap: 10px; }
.candidate {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  padding: 11px;
  border: 1px solid #f0c78e;
  border-radius: 11px;
  background: #fffaf2;
}
.candidate-thumb { overflow: hidden; width: 84px; height: 72px; border-radius: 8px; background: #e9edf3; }
.candidate-thumb img { width: 100%; height: 100%; object-fit: cover; }
.candidate-meta strong { display: block; }
.candidate-meta p { margin: 3px 0; color: var(--ink-600); font-size: .75rem; }
.score { color: var(--red-700); font-weight: 850; }

.metric-bars { display: grid; gap: 12px; }
.metric-row { display: grid; grid-template-columns: minmax(150px, 260px) 1fr 48px; gap: 10px; align-items: center; }
.metric-row label { color: var(--ink-700); font-size: .8rem; }
.metric-track { height: 11px; overflow: hidden; border-radius: 999px; background: #e8eef5; }
.metric-fill { height: 100%; min-width: 4px; border-radius: inherit; background: linear-gradient(90deg, var(--blue-700), #31a76a); }
.metric-row strong { text-align: right; }

.empty-state { padding: 50px 20px; text-align: center; color: var(--ink-500); }
.empty-state .empty-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px; background: var(--blue-50); color: var(--blue-700); font-size: 1.9rem; }
.empty-state h3 { margin: 0 0 6px; color: var(--ink-800); }
.empty-state p { margin: 0 auto 14px; max-width: 540px; }

.loading-screen { min-height: 70vh; display: grid; place-items: center; }
.loader { width: 46px; height: 46px; border: 4px solid #d9e7f8; border-top-color: var(--blue-700); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(430px, .75fr);
  background:
    linear-gradient(125deg, rgba(7,36,90,.94), rgba(11,77,187,.88)),
    radial-gradient(circle at 20% 20%, #2ba65d 0, transparent 34%);
}
.login-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 7vw, 100px);
  color: #fff;
}
.login-visual::before { content: ""; position: absolute; width: 560px; height: 560px; left: -230px; bottom: -250px; border-radius: 50%; background: rgba(255,255,255,.06); }
.login-visual::after { content: ""; position: absolute; width: 380px; height: 380px; right: -170px; top: -150px; border-radius: 50%; background: rgba(106,230,158,.11); }
.login-logo { position: relative; z-index: 1; width: min(330px, 65%); padding: 10px 15px; background: #fff; border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.17); }
.login-visual h1 { position: relative; z-index: 1; max-width: 750px; margin: 36px 0 10px; font-size: clamp(2.2rem, 4.4vw, 4.7rem); line-height: 1.05; letter-spacing: -.045em; }
.login-visual h1 small { display: block; margin-top: 12px; font-size: .35em; font-weight: 600; color: #b8d6ff; letter-spacing: 0; }
.login-visual > p { position: relative; z-index: 1; max-width: 690px; color: rgba(255,255,255,.76); font-size: 1rem; }
.login-points { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 30px; max-width: 820px; }
.login-point { padding: 13px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(255,255,255,.08); backdrop-filter: blur(7px); }
.login-point strong { display: block; }
.login-point small { color: rgba(255,255,255,.68); }
.login-panel { display: grid; place-items: center; padding: 28px; background: rgba(246,249,253,.98); }
.login-card { width: min(480px, 100%); padding: clamp(24px, 4vw, 42px); border-radius: 24px; background: #fff; box-shadow: var(--shadow-lg); }
.login-card h2 { margin: 0; font-size: 1.8rem; }
.login-card > p { margin: 4px 0 24px; color: var(--ink-500); }
.login-form { display: grid; gap: 16px; }
.login-form .field { grid-column: auto; }
.login-security { display: flex; gap: 9px; margin: 20px 0 0; padding: 11px; color: #5c3e0d; background: #fff8e8; border: 1px solid #efdcad; border-radius: 10px; font-size: .75rem; }
.demo-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.demo-box summary { cursor: pointer; color: var(--blue-700); font-weight: 750; font-size: .82rem; }
.demo-grid { display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; margin-top: 10px; font-size: .74rem; }
.demo-grid code { padding: 2px 5px; border-radius: 5px; background: #eef2f7; }

.modal-backdrop { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 18px; background: rgba(4,17,36,.58); backdrop-filter: blur(3px); }
.modal { width: min(680px, 100%); max-height: calc(100vh - 36px); overflow: auto; padding: 22px; border-radius: 17px; background: #fff; box-shadow: 0 28px 90px rgba(0,0,0,.26); }
.modal-head { display: flex; justify-content: space-between; gap: 14px; align-items: start; margin-bottom: 16px; }
.modal-head h3 { margin: 0; }
.modal-close { border: 0; background: #eef2f7; border-radius: 8px; width: 34px; height: 34px; cursor: pointer; }

.toast-root { position: fixed; z-index: 220; top: 18px; right: 18px; display: grid; gap: 10px; width: min(390px, calc(100% - 36px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; color: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); animation: toastIn .2s ease; }
.toast-success { background: #147a45; }
.toast-error { background: #a82920; }
.toast-warning { background: #a8580f; }
.toast-info { background: #1557a5; }
.toast span { flex: 1; }
.toast button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 1.1rem; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }

.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px clamp(18px, 3vw, 42px); color: #8fa3bd; background: #091f43; font-size: .76rem; }
.site-footer strong { color: #dce8f7; }

.progress-overlay { position: fixed; inset: 0; z-index: 230; display: grid; place-items: center; padding: 20px; background: rgba(5,23,49,.65); backdrop-filter: blur(3px); }
.progress-box { width: min(430px, 100%); padding: 24px; text-align: center; border-radius: 16px; background: #fff; box-shadow: var(--shadow-lg); }
.progress-box .loader { margin: 0 auto 14px; }
.progress-box h3 { margin: 0 0 5px; }
.progress-box p { margin: 0; color: var(--ink-500); }

@media (max-width: 1280px) {
  .topbar { grid-template-columns: minmax(245px, auto) 1fr auto; gap: 10px; padding-inline: 18px; }
  .brand img { width: 126px; }
  .brand-copy small { max-width: 180px; }
  .nav-link { padding-inline: 9px; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1040px) {
  .topbar { grid-template-columns: 1fr auto; }
  .main-nav {
    position: absolute;
    left: 14px; right: 14px; top: 72px;
    display: none;
    padding: 10px;
    background: #082f72;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 13px;
    box-shadow: var(--shadow-lg);
    flex-wrap: wrap;
  }
  .main-nav.open { display: flex; }
  .nav-link { flex: 1 0 130px; }
  .mobile-menu-btn { display: inline-flex; }
  .user-summary { display: none; }
  .layout-main, .layout-review { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
  .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .filter-bar { grid-template-columns: 1fr 160px 190px; }
  .filter-bar .filter-action { grid-column: span 3; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { min-height: 410px; padding: 44px 34px; }
  .login-visual h1 { max-width: 800px; margin-top: 24px; }
  .login-panel { padding: 28px 18px 42px; }
}

@media (max-width: 760px) {
  .topbar { min-height: 66px; padding: 8px 12px; }
  .brand { gap: 8px; }
  .brand img { width: 102px; height: 42px; }
  .brand-copy strong { font-size: .84rem; }
  .brand-copy small { font-size: .63rem; max-width: 170px; }
  .user-menu .btn { padding: 6px 8px; min-height: 32px; }
  .confidential-strip { justify-content: flex-start; overflow: auto; white-space: nowrap; font-size: .68rem; }
  .page { width: min(100% - 22px, var(--content)); padding-top: 18px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-actions { justify-content: flex-start; width: 100%; }
  .page-actions .btn { flex: 1; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .kpi-card { min-height: 105px; padding: 13px; }
  .kpi-card strong { font-size: 1.48rem; }
  .quick-actions { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field, .field.span-2, .field.span-3, .field.span-4, .field.span-6, .field.span-8, .field.span-12 { grid-column: auto; }
  .gps-panel { grid-template-columns: 1fr; }
  .gps-coords { grid-template-columns: 1fr; }
  .photo-grid, .photo-gallery { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-footer .button-row { width: 100%; }
  .form-footer .btn { flex: 1; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-bar .filter-action { grid-column: auto; }
  .table-wrap.desktop-table { display: none; }
  .mobile-cards { display: grid; gap: 10px; }
  .mobile-record { padding: 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); }
  .mobile-record-head { display: flex; justify-content: space-between; gap: 10px; }
  .mobile-record h3 { margin: 7px 0 2px; font-size: 1rem; }
  .mobile-record p { margin: 3px 0; color: var(--ink-600); font-size: .78rem; }
  .detail-hero-top { flex-direction: column; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-item, .detail-item:nth-child(odd), .detail-item:nth-child(even), .detail-item.span-2 { grid-column: auto; padding: 11px 0; border-left: 0; }
  .candidate { grid-template-columns: 68px 1fr; }
  .candidate-thumb { width: 68px; height: 62px; }
  .metric-row { grid-template-columns: 120px 1fr 38px; }
  .login-visual { min-height: 360px; padding: 32px 20px; }
  .login-logo { width: 210px; }
  .login-visual h1 { font-size: 2.3rem; }
  .login-points { grid-template-columns: 1fr; }
  .login-point:nth-child(n+3) { display: none; }
  .login-card { padding: 24px 19px; border-radius: 18px; }
  .site-footer { flex-direction: column; }
}

@media (max-width: 430px) {
  .brand-copy small { display: none; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-card label { font-size: .77rem; }
  .photo-grid, .photo-gallery { grid-template-columns: 1fr 1fr; }
  .modal { padding: 17px; }
}

@media print {
  .topbar, .confidential-strip, .site-footer, .page-actions, .button-row, .btn, .filter-bar { display: none !important; }
  body { background: #fff; }
  .page { width: 100%; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}
