/* ==========================================================================
   Login page (V2) — self-contained, RTL, no external dependencies.
   Paired with app/Views/users/newLogin.php and public/js/loginV2.js
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */
:root {
  --font: "Segoe UI", "Noto Kufi Arabic", "Cairo", "Tajawal", system-ui,
    -apple-system, "Helvetica Neue", Tahoma, Arial, sans-serif;

  --brand: #2563eb;
  --brand-2: #1d4ed8;
  --brand-soft: #eff5ff;
  --cyan: #22d3ee;
  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;

  --ink: #0b1220;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e4e9f2;
  --surface: #ffffff;
  --bg: #f5f7fb;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow-card: 0 26px 60px -32px rgba(15, 23, 42, .38),
    0 2px 6px -2px rgba(15, 23, 42, .08);
  --ring: 0 0 0 4px rgba(37, 99, 235, .16);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
svg { display: block; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .55);
  outline-offset: 2px;
  border-radius: 10px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------------------------------------------------------------- layout */
.lg-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(430px, .92fr) minmax(0, 1.08fr);
}

/* ============================================================= FORM SIDE */
.lg-form-side {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px clamp(22px, 4.5vw, 76px);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(37, 99, 235, .07), transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(34, 211, 238, .06), transparent 60%),
    var(--bg);
}

.lg-form-wrap {
  width: 100%;
  max-width: 430px;
}

/* brand lockup */
.lg-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.lg-logo {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--brand), #0ea5e9);
  box-shadow: 0 10px 22px -12px rgba(37, 99, 235, .9);
  flex: none;
}

.lg-logo svg { width: 24px; height: 24px; }

.lg-brand-txt { display: flex; flex-direction: column; line-height: 1.25; }
.lg-brand-txt b { font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: .2px; }
.lg-brand-txt small { font-size: 12.5px; color: var(--muted); }

/* card */
.lg-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3.2vw, 34px);
  box-shadow: var(--shadow-card);
}

.lg-title { font-size: 25px; font-weight: 700; color: var(--ink); letter-spacing: -.2px; }
.lg-sub { margin-top: 6px; font-size: 14px; color: var(--muted); }

/* alert */
.lg-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13.5px;
  line-height: 1.6;
  animation: lgRise .35s var(--ease) both;
}

.lg-alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* --------------------------------------------------------------- fields */
.lg-form { margin-top: 22px; display: grid; gap: 16px; }

.lg-field { position: relative; }

.lg-input {
  width: 100%;
  height: 60px;
  padding-block: 24px 8px;
  padding-inline: 46px 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fbfcfe;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .18s, background .18s, box-shadow .18s;
}

.lg-field--pass .lg-input { padding-inline-end: 48px; }

.lg-input:hover { background: #fff; }

.lg-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: var(--ring);
}

.lg-label {
  position: absolute;
  inset-inline-start: 46px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--muted-2);
  pointer-events: none;
  transition: top .16s var(--ease), font-size .16s var(--ease), color .16s;
}

.lg-input:focus + .lg-label,
.lg-input:not(:placeholder-shown) + .lg-label {
  top: 15px;
  transform: none;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: .3px;
}

.lg-field-icon {
  position: absolute;
  inset-inline-start: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  color: var(--muted-2);
  transition: color .18s;
}

.lg-field-icon svg { width: 20px; height: 20px; }
.lg-input:focus ~ .lg-field-icon { color: var(--brand); }

.lg-eye {
  position: absolute;
  inset-inline-end: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  transition: background .16s, color .16s;
}

.lg-eye:hover { background: var(--brand-soft); color: var(--brand); }
.lg-eye svg { width: 19px; height: 19px; }
.lg-eye .lg-eye-off { display: none; }
.lg-eye[aria-pressed="true"] .lg-eye-on { display: none; }
.lg-eye[aria-pressed="true"] .lg-eye-off { display: block; }

.lg-caps {
  margin-top: -6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #b45309;
}

/* --------------------------------------------------------------- submit */
.lg-submit {
  position: relative;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  box-shadow: 0 14px 26px -14px rgba(37, 99, 235, .95);
  transition: transform .16s var(--ease), box-shadow .16s, filter .16s;
}

.lg-submit:hover { transform: translateY(-1px); box-shadow: 0 18px 32px -14px rgba(37, 99, 235, .95); }
.lg-submit:active { transform: translateY(0); }
.lg-submit:disabled { cursor: progress; filter: saturate(.85) brightness(.97); }

.lg-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lgSpin .7s linear infinite;
}

.lg-submit.is-loading .lg-spinner { display: block; }

.lg-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}

.lg-hint svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--muted-2); }

/* footer */
.lg-foot {
  margin-top: 22px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted-2);
}

.lg-foot-sep { opacity: .6; }

/* ========================================================= SHOWCASE SIDE */
.lg-show {
  position: relative;
  overflow: hidden;
  color: #e8eefb;
  background:
    radial-gradient(80% 60% at 15% 10%, rgba(37, 99, 235, .38), transparent 60%),
    radial-gradient(70% 55% at 90% 95%, rgba(34, 211, 238, .22), transparent 62%),
    linear-gradient(160deg, #070d1b 0%, #0c1730 48%, #0a1f3c 100%);
  display: flex;
}

/* faint blueprint grid + slow glow */
.lg-show-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 35%, transparent 78%);
  pointer-events: none;
}

.lg-show-inner {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  padding: clamp(30px, 4.5vw, 62px) clamp(24px, 5vw, 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(20px, 3.4vw, 40px);
}

/* -------------------------------------------------------------- carousel */
.lg-slider { display: grid; gap: 20px; }

.lg-slides { position: relative; }

.lg-slide { display: none; }
.lg-slide.is-active { display: block; animation: lgSlide .5s var(--ease) both; }

.lg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .4px;
  color: #bfe0ff;
  background: rgba(56, 189, 248, .12);
  border: 1px solid rgba(56, 189, 248, .28);
}

.lg-slide-title {
  margin-top: 14px;
  font-size: clamp(23px, 2.7vw, 34px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -.4px;
  color: #fff;
}

.lg-slide-desc {
  margin-top: 10px;
  font-size: clamp(13.5px, 1.25vw, 15px);
  line-height: 1.85;
  color: rgba(226, 236, 252, .74);
  max-width: 52ch;
}

.lg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.lg-chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 999px;
  color: rgba(232, 240, 254, .9);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
}

.lg-chips svg { width: 13px; height: 13px; color: #34d399; }

.lg-shot { margin-top: 20px; }

/* controls */
.lg-slide-ctrl {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lg-nav {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .05);
  color: rgba(232, 240, 254, .85);
  cursor: pointer;
  transition: background .16s, border-color .16s, transform .16s;
}

.lg-nav:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }
.lg-nav:active { transform: scale(.95); }
.lg-nav svg { width: 18px; height: 18px; }

.lg-dots { display: flex; align-items: center; gap: 8px; }

.lg-dot {
  width: 9px; height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .26);
  cursor: pointer;
  transition: width .28s var(--ease), background .2s;
}

.lg-dot:hover { background: rgba(255, 255, 255, .5); }
.lg-dot.is-active { width: 26px; background: linear-gradient(90deg, var(--cyan), #60a5fa); }

.lg-progress {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}

.lg-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
}

.lg-progress i.is-running { animation: lgProgress linear forwards; }

/* ----------------------------------------------------------- trust strip */
.lg-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding-top: clamp(16px, 2.4vw, 26px);
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.lg-trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(226, 236, 252, .72);
}

.lg-trust svg { width: 16px; height: 16px; color: #60a5fa; flex: none; }

/* ============================================================== MOCKUPS */
.mk {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .95);
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.mk-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .04);
}

.mk-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.mk-title { margin-inline-start: auto; font-size: 11px; color: rgba(255, 255, 255, .5); }

.mk-body { padding: 14px; display: grid; gap: 12px; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.kpi {
  padding: 9px 11px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .09);
}

.kpi b { display: block; font-size: 15px; color: #eaf1fd; }
.kpi span { font-size: 10.5px; color: rgba(255, 255, 255, .5); }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 70px; }
.bars i {
  flex: 1;
  height: var(--h, 40%);
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #7dd3fc, #2563eb);
  opacity: .92;
}

.spark { width: 100%; height: 54px; }

.tbl { display: grid; gap: 6px; }

.tr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 66px;
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .035);
}

.tr.head { background: transparent; font-size: 10.5px; color: rgba(255, 255, 255, .45); }
.tr b { color: #eaf1fd; font-weight: 600; }
.tr .num { text-align: end; font-variant-numeric: tabular-nums; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  color: #6ee7b7;
  background: rgba(16, 185, 129, .14);
  border: 1px solid rgba(16, 185, 129, .3);
}

.pill.warn { color: #fcd34d; background: rgba(245, 158, 11, .14); border-color: rgba(245, 158, 11, .3); }
.pill.info { color: #7dd3fc; background: rgba(56, 189, 248, .14); border-color: rgba(56, 189, 248, .3); }

.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row .lbl { font-size: 11.5px; color: rgba(255, 255, 255, .72); }
.row .val { font-size: 11.5px; color: #eaf1fd; font-variant-numeric: tabular-nums; }

.prog { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.prog i { display: block; height: 100%; width: var(--w, 50%); border-radius: 999px; background: linear-gradient(90deg, #22d3ee, #2563eb); }

.timeline { display: grid; gap: 9px; }

.tl { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: rgba(255, 255, 255, .68); }
.tl i { width: 8px; height: 8px; border-radius: 50%; background: #38bdf8; flex: none; }
.tl.done i { background: #10b981; }
.tl b { color: #eaf1fd; font-weight: 600; }

.total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(56, 189, 248, .1);
  border: 1px solid rgba(56, 189, 248, .26);
  font-size: 12.5px;
  color: #dbeafe;
}
.total b { font-size: 15px; color: #fff; font-variant-numeric: tabular-nums; }

/* controls need JS; without it the first slide is simply shown */
body:not(.is-ready) .lg-slide-ctrl,
body:not(.is-ready) .lg-progress { display: none; }

/* ============================================================ animations */
@keyframes lgSpin { to { transform: rotate(360deg); } }
@keyframes lgProgress { from { width: 0; } to { width: 100%; } }

@keyframes lgSlide {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes lgRise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes lgShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

body.is-ready .lg-brand { animation: lgRise .5s var(--ease) both; }
body.is-ready .lg-card { animation: lgRise .55s var(--ease) .07s both; }
body.is-ready .lg-foot { animation: lgRise .55s var(--ease) .14s both; }

.lg-card.is-shake { animation: lgShake .5s both; }

/* ============================================================ responsive */
@media (max-width: 1023px) {
  .lg-shell { grid-template-columns: 1fr; }

  .lg-form-side {
    padding: 34px clamp(18px, 5vw, 40px) 26px;
    min-height: auto;
  }

  .lg-show { min-height: 430px; }
  .lg-show-inner { padding-block: 38px 34px; gap: 22px; }
}

@media (max-width: 640px) {
  .lg-form-side { padding: 24px 16px 20px; }
  .lg-card { padding: 22px 18px; border-radius: 18px; }
  .lg-title { font-size: 22px; }
  .lg-brand { margin-bottom: 18px; }
  .lg-logo { width: 42px; height: 42px; border-radius: 12px; }

  .lg-show { min-height: 0; }
  .lg-show-inner { padding: 30px 18px 34px; gap: 18px; }
  .lg-slide-desc { font-size: 13px; line-height: 1.75; }
  .lg-chips li { font-size: 11.5px; padding: 5px 10px; }

  .tr { grid-template-columns: minmax(0, 1fr) 62px 56px; font-size: 11px; }
  .bars { height: 58px; }
  .lg-slide-ctrl { gap: 10px; }
}

@media (max-width: 380px) {
  .lg-chips li:nth-child(n + 3) { display: none; }
}

/* ------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .lg-progress i { width: 100%; opacity: .35; }
}

/* --------------------------------------------------------- dark variant */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef2f9;
    --ink-2: #d7dfec;
    --muted: #98a6bd;
    --muted-2: #7d8ba3;
    --line: #26324a;
    --surface: #111a2b;
    --bg: #0b1220;
    --brand-soft: rgba(37, 99, 235, .16);
    --shadow-card: 0 26px 60px -32px rgba(0, 0, 0, .8), 0 2px 6px -2px rgba(0, 0, 0, .5);
  }

  .lg-input { background: #0e1729; }
  .lg-input:hover, .lg-input:focus { background: #121c31; }
  .lg-alert { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .35); color: #fcd34d; }
}

/* ====================================================== company selection */
/* Used by app/Views/users/selectCompany.php (multi-company login step 2).   */

.sc-wrap {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(20px, 5vw, 48px) 16px;
  background:
    radial-gradient(110% 80% at 100% 0%, rgba(37, 99, 235, .08), transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(34, 211, 238, .07), transparent 60%),
    var(--bg);
}

.sc-shell { width: 100%; max-width: 520px; }
.sc-shell .lg-brand { margin-bottom: 22px; }
.sc-shell .lg-foot { justify-content: center; text-align: center; }

.sc-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3.4vw, 34px);
  box-shadow: var(--shadow-card);
  animation: lgRise .5s var(--ease) both;
}

.sc-title { font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: -.2px; }
.sc-sub { margin-top: 6px; font-size: 14px; color: var(--muted); }

.sc-form { margin-top: 20px; }

.sc-list {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 10px;
}

.sc-item { position: relative; display: block; cursor: pointer; }

/* keep the radio focusable for the keyboard, but out of the visual flow */
.sc-item input {
  position: absolute;
  inset-inline-start: 18px;
  top: 50%;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sc-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: border-color .16s, background .16s, box-shadow .16s;
}

.sc-item:hover .sc-body { border-color: var(--muted-2); background: var(--surface); }
.sc-item input:focus-visible + .sc-body { outline: 3px solid rgba(37, 99, 235, .55); outline-offset: 2px; }

.sc-item input:checked + .sc-body {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.sc-radio {
  width: 20px;
  height: 20px;
  flex: none;
  border: 2px solid var(--muted-2);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: border-color .16s;
}

.sc-item input:checked + .sc-body .sc-radio { border-color: var(--brand); }

.sc-item input:checked + .sc-body .sc-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
}

.sc-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* company id / prefix / primary badge */
.sc-tags {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  margin-inline-start: auto;
  flex: none;
}

.sc-prefix,
.sc-id {
  padding: 3px 8px;
  font-size: 11.5px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sc-id { direction: ltr; unicode-bidi: isolate; }

.sc-badge {
  flex: none;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  color: var(--brand);
  background: rgba(37, 99, 235, .1);
  border: 1px solid rgba(37, 99, 235, .25);
}

.sc-submit { width: 100%; margin-top: 18px; }

.sc-cancel-form { margin-top: 14px; text-align: center; }

.sc-cancel {
  border: 0;
  background: none;
  padding: 6px 8px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  border-radius: 8px;
}

.sc-cancel:hover { color: var(--brand); }

/* -------------------------------------------------- company search filter */
.sc-filter { position: relative; margin-top: 18px; }

.sc-filter-input {
  width: 100%;
  height: 46px;
  padding-inline: 42px 40px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .16s, background .16s, box-shadow .16s;
}

.sc-filter-input::placeholder { color: var(--muted-2); }
.sc-filter-input:hover { background: var(--surface); }

.sc-filter-input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: var(--ring);
}

.sc-filter-icon {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted-2);
  pointer-events: none;
}

.sc-filter-clear {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted-2);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background .16s, color .16s;
}

.sc-filter-clear:hover { background: var(--brand-soft); color: var(--brand); }

/* record count reads shown/total (repo convention) */
.sc-count {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* the list scrolls inside a capped height so a long list never grows the page */
.sc-list-wrap {
  margin-top: 8px;
  max-height: min(46vh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-inline-end: 6px;
}

.sc-list-wrap::-webkit-scrollbar { width: 8px; }
.sc-list-wrap::-webkit-scrollbar-track { background: transparent; }
.sc-list-wrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.sc-list-wrap::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

.sc-item[hidden] { display: none; }

.sc-empty {
  padding: 22px 12px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .sc-panel { padding: 22px 18px; }
  .sc-title { font-size: 21px; }
  .sc-badge { font-size: 10px; padding: 2px 7px; }

  .sc-body { flex-wrap: wrap; }
  .sc-tags {
    margin-inline-start: 0;
    width: 100%;
    justify-content: flex-start;
    padding-inline-start: 30px;
  }
  .sc-list-wrap { max-height: 52vh; }
}
