:root {
  --primary: #2954e6;
  --primary-dark: #1c3fb8;
  --primary-light: #eef2ff;
  --accent: #10b981;
  --danger: #e11d48;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f5f7fb;
  --card-bg: #ffffff;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(31, 41, 55, 0.06);
  --shadow-lg: 0 10px 40px rgba(31, 41, 55, 0.12);
  /* Sampled from the Lorven Technologies logo mark - used to give the admin
     portal its own identity (topbar signature, table header, stat-card
     accents) instead of reusing --primary everywhere. */
  --navy: #14336b;
  --navy-light: #eaeff8;
  --orange: #ee6c2f;
  --orange-light: #fdece2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }

/* ============== Wizard Page Layout ============== */
.wizard-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wizard-topbar {
  background: #ffffff;
  padding: 18px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 3px solid var(--primary);
}

.topbar-logo {
  height: 42px;
  width: auto;
  display: block;
}

.wizard-topbar .subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding-left: 16px;
  border-left: 2px solid var(--border);
}

.app-type-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 999px;
  padding: 5px 14px;
}

.wizard-container {
  max-width: 920px;
  margin: 28px auto 60px;
  padding: 0 16px;
  width: 100%;
  flex: 1;
}

.wizard-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* ============== Landing page: 5 application-type options ============== */
.landing-hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 56px 16px 40px;
  text-align: center;
}
.landing-hero-inner {
  max-width: 640px;
  margin: 0 auto;
}
.landing-title {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.landing-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.landing-container {
  margin-top: 0;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  padding: 8px 0 40px;
}

.landing-option {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.landing-option:hover,
.landing-option:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.landing-option:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.landing-option-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  margin-bottom: 16px;
}
.landing-option-icon svg {
  width: 22px;
  height: 22px;
}
.landing-option-icon-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.landing-option-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 8px;
}
.landing-option-desc {
  display: block;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 16px;
}
.landing-option-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 999px;
  padding: 4px 12px;
}

.landing-option-external {
  border-style: dashed;
}
.landing-option-external .landing-option-tag {
  color: var(--text-muted);
  background: var(--bg);
}
.landing-external-icon {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .landing-hero { padding: 40px 16px 28px; }
  .landing-grid { grid-template-columns: 1fr; }
}

/* Step progress bar */
.step-progress {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 24px 24px 0;
  gap: 4px;
  overflow-x: auto;
}

.step-progress li {
  flex: 1;
  text-align: center;
  position: relative;
  padding-bottom: 18px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 90px;
}

.step-progress li .dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eef1f6;
  border: 2px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  font-weight: 600;
  font-size: 13px;
  transition: all .25s ease;
}

.step-progress li.active .dot {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px var(--primary-light);
}

.step-progress li.done .dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.step-progress li.active { color: var(--primary); font-weight: 600; }
.step-progress li.done { color: var(--accent); }

.step-progress li::after {
  content: '';
  position: absolute;
  top: 15px;
  right: -50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: -1;
}
.step-progress li:last-child::after { display: none; }
.step-progress li.done::after { background: var(--accent); }

/* Form sections */
.wizard-body { padding: 8px 24px 24px; }

.form-step { display: none; animation: fadeIn .3s ease; }
.form-step.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-heading {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 22px 0 4px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-heading:first-child { margin-top: 6px; }

.section-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 20px;
}

.form-grid .full { grid-column: 1 / -1; }

.attachment-note {
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: #1f2430;
  margin-bottom: 12px;
}
.attachment-note ol {
  margin: 6px 0 0;
  padding-left: 20px;
}
.attachment-note li {
  margin-bottom: 4px;
  line-height: 1.5;
}
.attachment-note li:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.field label .req { color: var(--danger); margin-left: 2px; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="password"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}

.field textarea { resize: vertical; min-height: 70px; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.field .error-msg {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
  min-height: 14px;
}

/* Bill Rate / Pay Rate composite field group (currency + amount + unit + type) */
.rate-field-group { margin-top: 18px; }
.rate-group-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.rate-group-label .req { color: var(--danger); margin-left: 2px; }
.rate-field-row {
  display: grid;
  grid-template-columns: 110px 1.4fr 130px 110px;
  gap: 10px;
}
.rate-field-row select,
.rate-field-row input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  font-family: inherit;
}
.rate-field-row select:focus,
.rate-field-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
@media (max-width: 640px) {
  .rate-field-row { grid-template-columns: 1fr 1fr; }
}

.field input.invalid,
.field select.invalid,
.field textarea.invalid {
  border-color: var(--danger);
}

/* Consultant SSN: static "XXX-XX-" mask in front of the editable last-4 box */
.ssn-mask-wrap {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.ssn-mask-prefix {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #f4f4f6;
  color: #8a8a94;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
}
.ssn-mask-wrap input {
  width: 100px !important;
  letter-spacing: 2px;
}
.ssn-mask-wrap input.invalid {
  border-color: var(--danger);
}

/* Contact No fields: phone input + Mobile/Home/Work type select side by side */
.contact-row {
  display: flex;
  gap: 8px;
}
.contact-row input {
  flex: 1;
  min-width: 0;
}
.contact-row .contact-type-select {
  flex: 0 0 110px;
  width: 110px;
}

/* Extension: static "EXT" prefix in front of the editable number, shown
   only when the paired Contact No Type is set to Work */
.ext-mask-wrap {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.ext-mask-prefix {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #f4f4f6;
  color: #8a8a94;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
}
.ext-mask-wrap input {
  flex: 1;
  min-width: 0;
  letter-spacing: 2px;
}
.ext-mask-wrap input.invalid {
  border-color: var(--danger);
}

/* MM/DD/YY date picker popup (assets/js/datepicker.js) */
.dp-popup {
  position: absolute;
  z-index: 1000;
  width: 280px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 10px;
  font-size: 13px;
}
.dp-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}
.dp-month-select,
.dp-year-select {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  color: #1f2430;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 4px;
  background: #fff;
  cursor: pointer;
}
.dp-month-select {
  flex: 1.4;
}
.dp-nav {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
}
.dp-nav:hover {
  background: var(--primary-light);
}
.dp-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
}
.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.dp-day {
  border: none;
  background: transparent;
  border-radius: 6px;
  padding: 6px 0;
  cursor: pointer;
  color: #1f2430;
}
.dp-day:hover:not(.dp-disabled):not(.dp-blank) {
  background: var(--primary-light);
}
.dp-blank {
  cursor: default;
  pointer-events: none;
}
.dp-disabled {
  color: #cbced6;
  cursor: not-allowed;
}
.dp-today {
  font-weight: 700;
  color: var(--primary);
}
.dp-selected {
  background: var(--primary);
  color: #fff;
}
.dp-selected:hover {
  background: var(--primary-dark);
}

/* Legal Status search + full-list combobox (assets/js/wizard.js) */
.combo-popup {
  position: absolute;
  z-index: 1000;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 6px;
}
.combo-option {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #1f2430;
}
.combo-option:hover,
.combo-option.combo-option-active {
  background: var(--primary-light);
}

/* Legal Status conditional fields: OPT-type radio group + USC "N/A" notice */
.radio-group {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.radio-group.invalid-group { border-color: var(--danger); }
.radio-option {
  display: flex !important;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0 !important;
  cursor: pointer;
}
.radio-option input[type="radio"] { width: auto; margin: 0; cursor: pointer; }

.field .static-value {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted, #6b7280);
  background: #f9fafb;
}

/* File upload dropzone */
.upload-box {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 22px;
  text-align: center;
  cursor: pointer;
  background: #fafbfe;
  transition: border-color .2s, background .2s;
}
.upload-box:hover, .upload-box.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-box input[type=file] { display: none; }
.upload-box .icon { font-size: 26px; margin-bottom: 6px; }
.upload-box .hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.file-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}
.file-chip .remove-file {
  color: var(--danger);
  cursor: pointer;
  font-weight: 700;
  padding: 0 4px;
}

/* Nav buttons */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: #fafbfe;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform .1s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-success { background: var(--accent); color: #fff; }
.btn-success:hover { filter: brightness(0.95); }
.btn-danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* Attachment badges shown inline in dashboard tables */
.attach-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.attach-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  background: #eef2ff;
  color: var(--primary-dark);
  border: 1px solid #c7d5ff;
  white-space: nowrap;
}
.attach-badge.visa { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.attach-badge-none { font-size: 11px; color: #9ca3af; }

/* Review step */
.review-block { background: #fafbfe; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 14px; }
.review-block h4 { margin: 0 0 10px; font-size: 14px; color: var(--primary); }
.review-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
.review-row:last-child { border-bottom: none; }
.review-row span:first-child { color: var(--text-muted); }
.review-row span:last-child { font-weight: 600; text-align: right; max-width: 60%; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* Toast */
#toast {
  position: fixed;
  top: 20px; right: 20px;
  background: var(--text);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 9999;
}
#toast.error { background: var(--danger); }
#toast.success { background: var(--accent); }

/* Thank you page */
.thankyou-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  text-align: center;
  padding: 24px;
}
.thankyou-card {
  background: #fff;
  padding: 48px 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 480px;
}
.thankyou-card .icon { font-size: 56px; margin-bottom: 12px; }

/* ============== Admin / Superadmin Portal ============== */
.admin-shell { display: flex; min-height: 100vh; background: var(--bg); }

.admin-sidebar {
  width: 240px;
  background: #ffffff;
  color: var(--text);
  padding: 22px 16px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
}
.sidebar-logo-wrap {
  display: inline-block;
  margin-bottom: 26px;
}
.sidebar-logo { height: 46px; width: auto; display: block; }
.admin-sidebar .subtitle-sidebar { color: var(--text-muted); font-size: 12px; font-weight: 600; margin-bottom: 4px; line-height: 1.4; }
.admin-sidebar .brand { color: var(--text); font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.admin-sidebar .role-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 24px; }
.admin-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 4px;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: var(--primary-light); color: var(--primary-dark); }
.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--navy);
  stroke-width: 2.25;
}
.icon-inline {
  vertical-align: -3px;
  flex-shrink: 0;
  color: currentColor;
  margin-right: 4px;
}
h3 .icon-inline, h4 .icon-inline { color: var(--navy); vertical-align: -2px; }
.admin-sidebar .logout-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: var(--danger);
}
.admin-sidebar .logout-link .nav-icon { color: var(--navy); }

.admin-main { flex: 1; padding: 24px 28px; min-width: 0; }

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
}
.admin-topbar::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy) 60%, var(--orange) 100%);
  border-radius: 3px;
}
.admin-topbar h1 { font-size: 22px; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
.admin-user-chip { font-size: 13px; color: var(--text-muted); }

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.stat-card .icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.stat-card .num { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-card .label { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.stat-card--new { border-top-color: var(--orange); }
.stat-card--new .icon { background: var(--orange-light); color: var(--orange); }
.stat-card--review { border-top-color: var(--navy); }
.stat-card--review .icon { background: var(--navy-light); color: var(--navy); }
.stat-card--closed { border-top-color: var(--accent); }
.stat-card--closed .icon { background: #e7f9f2; color: var(--accent); }

.table-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-bar form { display: flex; align-items: center; gap: 10px; flex: 1; flex-wrap: wrap; }
.search-bar .search-input-wrap { position: relative; flex: 1; min-width: 220px; }
.search-bar .search-input-wrap svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--text-muted); pointer-events: none;
}
.search-bar input[type="text"] {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}
.search-bar input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(28, 63, 184, 0.12);
}
.search-bar .search-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; width: 100%; }

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.table-footer .results-count { font-size: 12px; color: var(--text-muted); }

.pagination { display: flex; list-style: none; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.pagination .page-item { display: block; }
.pagination .page-link,
.pagination .page-item > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.pagination .page-link:hover { border-color: var(--primary); color: var(--primary); }
.pagination .page-item.active > span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 700px; }
table.data-table th {
  text-align: left;
  background: var(--navy);
  padding: 13px 14px;
  color: #dfe7f7;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
table.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data-table tbody tr:nth-child(even) td { background: #fafbfe; }
table.data-table tr:hover td { background: var(--navy-light); }

.badge { padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-new { background: var(--orange-light); color: #c2540f; }
.badge-review { background: var(--navy-light); color: var(--navy); }
.badge-closed { background: #dcfce7; color: #15803d; }

.empty-state { text-align: center; padding: 48px 24px; }
.empty-state .icon {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 14px;
  background: var(--navy-light);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
}
.empty-state h4 { margin: 0 0 6px; font-size: 15px; color: var(--text); }
.empty-state p { margin: 0 0 18px; font-size: 13px; color: var(--text-muted); }

.detail-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 18px; }
.detail-card h3 { font-size: 15px; color: var(--primary); margin: 0 0 14px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 22px; }
@media (max-width: 700px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-row { font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--border); display: flex; justify-content: space-between; gap: 10px; }
.detail-row .k { color: var(--text-muted); }
.detail-row .v { font-weight: 600; text-align: right; }

.attach-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.attach-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fafbfe;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1c3fb8, #4f6df5);
  padding: 20px;
}
.login-card {
  background: #fff;
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 34px 30px;
}
.login-logo { display: block; height: 46px; width: auto; margin: 0 auto 12px; }
.login-card .brand { text-align: center; font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.login-card .sub { text-align: center; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.login-card .sub.login-portal-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 22px; }
.login-card .field { margin-bottom: 16px; }
.login-card .field-icon { position: relative; }
.login-card .field-icon svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--text-muted); pointer-events: none;
  margin: 0;
}
.login-card .field-icon input { padding-left: 40px !important; }
.login-card .field-icon input:focus + svg,
.login-card .field-icon:focus-within svg { color: var(--primary); }
.login-card .btn { width: 100%; justify-content: center; }

.mobile-topbar { display: none; }

@media (max-width: 900px) {
  .admin-shell { display: block; }

  /* Fixed top bar with hamburger, shown only on mobile/tablet */
  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 1001;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
  }
  .mobile-topbar .sidebar-logo { height: 32px; width: auto; }
  .mobile-menu-btn {
    background: none;
    border: none;
    padding: 6px;
    margin: -6px;
    cursor: pointer;
    color: var(--text);
    display: flex;
  }
  .mobile-menu-btn svg { width: 26px; height: 26px; }

  /* Sidebar becomes an off-canvas drawer */
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1003;
    transform: translateX(-100%);
    transition: transform .25s ease;
    overflow-y: auto;
    box-shadow: 2px 0 18px rgba(0,0,0,0.18);
  }
  .admin-sidebar.is-open { transform: translateX(0); }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1002;
  }
  .sidebar-overlay.is-open { display: block; }

  .admin-main { padding: 18px; }
  .admin-topbar { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ============== Admin Dashboard: "Send Application to Subvendor" tiles + modal ============== */
/* The dashboard reuses .landing-option (see the public landing page rules
   above) but as <button> elements instead of <a> tags, since clicking one
   opens the modal below rather than navigating - this resets the
   button-specific defaults browsers apply on top of what .landing-option
   already sets. */
button.landing-option {
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
#inviteTileGrid.landing-grid { padding: 8px 0 4px; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-box {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: 28px 26px 24px;
}
.modal-box h3 { margin: 0 0 6px; font-size: 18px; }
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}
.modal-close:hover { color: var(--text); }
