/* =====================================================================
 * FILE : assets/css/app.css
 * WHY  : All design of the software. Works 100% OFFLINE.
 *        (Tailwind CDN needs internet, so we ship a local Tailwind style
 *        utility set + ready components in this one file.)
 * PARTS: 1) colours & base  2) utility classes (Tailwind style names)
 *        3) components (buttons, cards, forms, tables, menu, modal)
 *        4) loaders  5) login page animation  6) mobile rules  7) print
 * ===================================================================== */

/* ---------- 1. colours & base ---------- */
:root {
  --brand: #0f766e;
  /* teal - main colour */
  --brand2: #4338ca;
  /* indigo - second colour */
  --brand-light: #ccfbf1;
  --ink: #0f172a;
  /* main text */
  --muted: #64748b;
  /* light text */
  --line: #e2e8f0;
  /* borders */
  --bg: #f1f5f9;
  /* page background */
  --card: #ffffff;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --info: #2563eb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 14px rgba(15, 23, 42, .06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  /* system fonts = offline */
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.25;
}

img,
svg {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--brand-light);
}

/* ---------- 2. utility classes (Tailwind style) ---------- */
.hidden {
  display: none !important;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.grid {
  display: grid;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1 1 0%;
  min-width: 0;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}

.gap-1 {
  gap: .25rem;
}

.gap-2 {
  gap: .5rem;
}

.gap-3 {
  gap: .75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.col-span-2 {
  grid-column: span 2 / span 2;
}

.col-span-full {
  grid-column: 1 / -1;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.min-w-0 {
  min-width: 0;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-lg {
  max-width: 32rem;
}

.max-w-2xl {
  max-width: 42rem;
}

.max-w-4xl {
  max-width: 56rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.ml-auto {
  margin-left: auto;
}

.m-0 {
  margin: 0;
}

.mt-1 {
  margin-top: .25rem;
}

.mt-2 {
  margin-top: .5rem;
}

.mt-3 {
  margin-top: .75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mb-1 {
  margin-bottom: .25rem;
}

.mb-2 {
  margin-bottom: .5rem;
}

.mb-3 {
  margin-bottom: .75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.p-2 {
  padding: .5rem;
}

.p-3 {
  padding: .75rem;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.px-2 {
  padding-left: .5rem;
  padding-right: .5rem;
}

.px-3 {
  padding-left: .75rem;
  padding-right: .75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-1 {
  padding-top: .25rem;
  padding-bottom: .25rem;
}

.py-2 {
  padding-top: .5rem;
  padding-bottom: .5rem;
}

.py-3 {
  padding-top: .75rem;
  padding-bottom: .75rem;
}

.text-xs {
  font-size: .75rem;
}

.text-sm {
  font-size: .8125rem;
}

.text-base {
  font-size: .875rem;
}

.text-lg {
  font-size: 1.05rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-3xl {
  font-size: 1.9rem;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.uppercase {
  text-transform: uppercase;
  letter-spacing: .04em;
}

.text-muted {
  color: var(--muted);
}

.text-brand {
  color: var(--brand);
}

.text-white {
  color: #fff;
}

.text-green {
  color: var(--ok);
}

.text-red {
  color: var(--bad);
}

.text-amber {
  color: var(--warn);
}

.text-blue {
  color: var(--info);
}

.bg-white {
  background: #fff;
}

.bg-soft {
  background: #f8fafc;
}

.rounded {
  border-radius: 8px;
}

.rounded-lg {
  border-radius: var(--radius);
}

.rounded-full {
  border-radius: 999px;
}

.border {
  border: 1px solid var(--line);
}

.border-t {
  border-top: 1px solid var(--line);
}

.border-b {
  border-bottom: 1px solid var(--line);
}

.shadow {
  box-shadow: var(--shadow);
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whitespace-pre {
  white-space: pre-wrap;
}

.break-all {
  word-break: break-all;
}

.overflow-auto {
  overflow: auto;
}

.relative {
  position: relative;
}

.sticky {
  position: sticky;
  top: 0;
}

.cursor-pointer {
  cursor: pointer;
}

.select-all {
  user-select: all;
}

.space-y-2>*+* {
  margin-top: .5rem;
}

.space-y-3>*+* {
  margin-top: .75rem;
}

.space-y-4>*+* {
  margin-top: 1rem;
}

/* ---------- 3. components ---------- */
/* page wrapper */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1rem;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
}

.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.page-title .ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
}

.page-sub {
  color: var(--muted);
  font-size: .8125rem;
  margin-top: 2px;
}

/* cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-h {
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .5rem;
  font-weight: 600;
  flex-wrap: wrap;
}

.card-h>.text-xs {
  margin-left: auto;
  font-weight: 500;
}

.card-h svg {
  color: var(--brand);
}

.card-b {
  padding: 1rem;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem .95rem;
  border-radius: 9px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .8125rem;
  cursor: pointer;
  transition: transform .08s, box-shadow .15s, background .15s;
  white-space: nowrap;
  user-select: none;
  min-height: 38px;
}

.btn:active {
  transform: scale(.97);
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #0d9488);
  color: #fff;
  box-shadow: 0 2px 8px rgba(15, 118, 110, .3);
}

.btn-primary:hover {
  box-shadow: 0 4px 14px rgba(15, 118, 110, .4);
  text-decoration: none;
}

.btn-indigo {
  background: linear-gradient(135deg, var(--brand2), #6366f1);
  color: #fff;
}

.btn-light {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn-light:hover {
  background: #f8fafc;
  text-decoration: none;
}

.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

.btn-success {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}

.btn-warn {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.btn-sm {
  padding: .3rem .6rem;
  min-height: 30px;
  font-size: .75rem;
  border-radius: 7px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  min-height: 32px;
}

/* forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem 1rem;
}

.form-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: .3rem;
}

.field label .req {
  color: var(--bad);
}

.input,
select.input,
textarea.input {
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  outline: none;
  min-height: 40px;
  transition: border .15s, box-shadow .15s;
}

.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .18);
}

textarea.input {
  min-height: 90px;
  resize: vertical;
}

.hint {
  font-size: .72rem;
  color: var(--muted);
  margin-top: .25rem;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  user-select: none;
}

.switch input {
  display: none;
}

.switch .tr {
  width: 40px;
  height: 22px;
  border-radius: 99px;
  background: #cbd5e1;
  position: relative;
  transition: background .2s;
  flex: none;
}

.switch .tr::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: left .2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.switch input:checked+.tr {
  background: var(--brand);
}

.switch input:checked+.tr::after {
  left: 21px;
}

.stars {
  display: inline-flex;
  gap: 2px;
}

.stars button {
  border: 0;
  background: none;
  font-size: 22px;
  cursor: pointer;
  color: #cbd5e1;
  padding: 0 1px;
  line-height: 1;
}

.stars button.on {
  color: #f59e0b;
}

/* toolbar (search + filters) */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-bottom: .75rem;
}

.toolbar .input {
  width: auto;
  min-width: 150px;
}

.toolbar .search {
  flex: 1 1 220px;
}

.chips {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}

.chip {
  padding: .3rem .7rem;
  border-radius: 99px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: .75rem;
  cursor: pointer;
  font-weight: 600;
  color: #334155;
}

.chip.on {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.chip b {
  margin-left: .25rem;
  opacity: .75;
}

/* tables */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: .8125rem;
}

.tbl th {
  text-align: left;
  background: #f8fafc;
  color: #475569;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: .6rem .7rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.tbl td {
  padding: .6rem .7rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.tbl tbody tr {
  transition: background .12s;
}

.tbl tbody tr:hover {
  background: #f0fdfa;
}

.tbl .actions {
  white-space: nowrap;
  text-align: right;
}

.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}

.empty svg {
  width: 70px;
  height: 70px;
  opacity: .6;
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  flex-wrap: wrap;
  font-size: .8rem;
  color: var(--muted);
}

/* badges */
.badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 700;
  white-space: nowrap;
  background: #e2e8f0;
  color: #334155;
}

.b-new {
  background: #e0f2fe;
  color: #0369a1;
}

.b-screening {
  background: #fef9c3;
  color: #a16207;
}

.b-shortlisted {
  background: #ede9fe;
  color: #6d28d9;
}

.b-submitted,
.b-sent {
  background: #dbeafe;
  color: #1d4ed8;
}

.b-interview,
.b-interview_scheduled {
  background: #fae8ff;
  color: #a21caf;
}

.b-selected {
  background: #ccfbf1;
  color: #0f766e;
}

.b-placed {
  background: #dcfce7;
  color: #15803d;
}

.b-on_hold {
  background: #ffedd5;
  color: #c2410c;
}

.b-rejected,
.b-no_show,
.b-failed {
  background: #fee2e2;
  color: #b91c1c;
}

.b-not_interested,
.b-withdrawn,
.b-inactive,
.b-queued {
  background: #f1f5f9;
  color: #475569;
}

.b-active,
.b-paid,
.b-open {
  background: #dcfce7;
  color: #15803d;
}

.b-trial {
  background: #fef3c7;
  color: #b45309;
}

.b-closed {
  background: #f1f5f9;
  color: #64748b;
}

/* KPI tiles on dashboard */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
}

.kpi {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 1rem;
  color: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  animation: rise .5s both;
  transition: transform .2s;
}

.kpi:hover {
  transform: translateY(-3px);
}

.kpi .n {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
}

.kpi .l {
  font-size: .78rem;
  opacity: .92;
  font-weight: 600;
}

.kpi .s {
  font-size: .7rem;
  opacity: .8;
  margin-top: .2rem;
}

.kpi svg.bg {
  position: absolute;
  right: -8px;
  bottom: -10px;
  width: 86px;
  height: 86px;
  opacity: .2;
}

.k1 {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.k2 {
  background: linear-gradient(135deg, #4338ca, #6366f1);
}

.k3 {
  background: linear-gradient(135deg, #c2410c, #f59e0b);
}

.k4 {
  background: linear-gradient(135deg, #15803d, #22c55e);
}

.k5 {
  background: linear-gradient(135deg, #a21caf, #d946ef);
}

.k6 {
  background: linear-gradient(135deg, #0369a1, #38bdf8);
}

.k7 {
  background: linear-gradient(135deg, #be123c, #fb7185);
}

.k8 {
  background: linear-gradient(135deg, #334155, #64748b);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.funnel-row {
  display: grid;
  grid-template-columns: 140px 1fr 40px;
  align-items: center;
  gap: .6rem;
  margin-bottom: .45rem;
  font-size: .78rem;
}

.funnel-bar {
  height: 14px;
  border-radius: 99px;
  background: #f1f5f9;
  overflow: hidden;
}

.funnel-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  width: 0;
  transition: width 1s cubic-bezier(.2, .8, .2, 1);
}

.list-item {
  display: flex;
  gap: .6rem;
  padding: .55rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: .8rem;
}

.list-item:last-child {
  border-bottom: 0;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  margin-top: .35rem;
  flex: none;
}

/* ---------- top header + menu ---------- */
.topbar {
  background: linear-gradient(90deg, #0b3d3a, #13235c);
  color: #e2e8f0;
  font-size: .75rem;
}

.topbar .inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: .45rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: #fff;
  text-decoration: none !important;
}

.brand img {
  width: 36px;
  height: 36px;
}

.brand .nm {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .01em;
}

.brand .tg {
  font-size: .65rem;
  opacity: .75;
  display: block;
  margin-top: -2px;
}

.userinfo {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(255, 255, 255, .18);
}

.userinfo .av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6, #6366f1);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  flex: none;
}

.userinfo b {
  color: #fff;
}

.top-actions {
  margin-left: auto;
  display: flex;
  gap: .4rem;
}

.top-actions .btn {
  min-height: 30px;
  padding: .3rem .7rem;
  font-size: .72rem;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border-color: rgba(255, 255, 255, .2);
}

.top-actions .btn:hover {
  background: rgba(255, 255, 255, .2);
}

.top-actions .btn.logout {
  background: #dc2626;
  border-color: #dc2626;
}

.navbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .05);
  position: sticky;
  top: 0;
  z-index: 40;
}

.navbar .inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 .5rem;
  display: flex;
  align-items: stretch;
}

.nav>li.locked>a,
.sub li.locked a {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  color: #94a3b8 !important;
}

.nav>li.locked>a:hover,
.sub li.locked a:hover {
  background: transparent !important;
  color: #ef4444 !important;
}

.nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.nav>li {
  position: relative;
}

.nav>li>a {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .85rem .8rem;
  color: #334155;
  font-weight: 600;
  font-size: .8125rem;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.nav>li>a:hover,
.nav>li.open>a {
  color: var(--brand);
  background: #f0fdfa;
}

.nav>li.active>a {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.nav>li.support {
  margin-left: auto;
}

.nav svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.nav .caret {
  width: 10px;
  height: 10px;
  opacity: .6;
}

.sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .15);
  padding: .4rem;
  list-style: none;
  margin: 0;
  z-index: 50;
  animation: drop .16s ease-out;
}

.nav>li.support .sub {
  left: auto;
  right: 0;
}

.nav>li.open .sub {
  display: block;
}

.sub a {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .7rem;
  border-radius: 8px;
  color: #334155;
  font-size: .8125rem;
  text-decoration: none;
  font-weight: 500;
}

.sub a:hover,
.sub a.active {
  background: #f0fdfa;
  color: var(--brand);
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.hamburger {
  display: none;
  border: 0;
  background: none;
  padding: .6rem;
  cursor: pointer;
}

.hamburger svg {
  width: 26px;
  height: 26px;
}

/* trial / license banner */
.licbar {
  background: linear-gradient(90deg, #fffbeb, #fef3c7);
  border-bottom: 1px solid #fde68a;
  font-size: .75rem;
  color: #78350f;
}

.licbar.expired {
  background: linear-gradient(90deg, #fef2f2, #fee2e2);
  border-color: #fecaca;
  color: #7f1d1d;
}

.licbar.paid {
  background: linear-gradient(90deg, #f0fdf4, #dcfce7);
  border-color: #bbf7d0;
  color: #14532d;
}

.licbar .inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: .45rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.1rem;
}

.licbar .meter {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.licbar .meter .bar {
  width: 70px;
  height: 6px;
  background: rgba(0, 0, 0, .1);
  border-radius: 9px;
  overflow: hidden;
}

.licbar .meter .bar i {
  display: block;
  height: 100%;
  background: #f59e0b;
  border-radius: 9px;
}

.licbar .tag {
  font-weight: 800;
  padding: .1rem .5rem;
  border-radius: 6px;
  background: #f59e0b;
  color: #fff;
  letter-spacing: .05em;
}

.licbar.paid .tag {
  background: #16a34a;
}

.licbar.expired .tag {
  background: #dc2626;
}

/* footer */
.footer {
  text-align: center;
  padding: 1.2rem 1rem 1.6rem;
  font-size: .72rem;
  color: var(--muted);
}

.footer b {
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* modal */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .5);
  backdrop-filter: blur(2px);
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3vh .75rem;
  overflow-y: auto;
  animation: fade .15s;
}

.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .3);
  animation: pop .2s ease-out;
}

.modal.lg {
  max-width: 920px;
}

.modal.sm {
  max-width: 440px;
}

.modal-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-size: 1rem;
}

.modal-b {
  padding: 1.2rem;
  max-height: 72vh;
  overflow-y: auto;
}

.modal-f {
  padding: .85rem 1.2rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  flex-wrap: wrap;
  background: #f8fafc;
  border-radius: 0 0 16px 16px;
}

.x {
  border: 0;
  background: #f1f5f9;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

@keyframes fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* toast messages */
#toasts {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: min(380px, calc(100vw - 28px));
}

.toast {
  background: #fff;
  border-left: 4px solid var(--ok);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  border-radius: 10px;
  padding: .75rem .9rem;
  font-size: .8125rem;
  animation: slidein .25s ease-out;
  display: flex;
  gap: .5rem;
  align-items: flex-start;
}

.toast.err {
  border-color: var(--bad);
}

.toast.warn {
  border-color: var(--warn);
}

@keyframes slidein {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* tabs */
.tabs {
  display: flex;
  gap: .25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
  overflow-x: auto;
}

.tab {
  padding: .6rem .9rem;
  font-weight: 600;
  font-size: .8125rem;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.tab.on {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

/* code block (API page) */
pre.code {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 10px;
  overflow-x: auto;
  font-size: .75rem;
  line-height: 1.55;
  margin: 0;
  font-family: Consolas, "Courier New", monospace;
}

code.k {
  background: #f1f5f9;
  padding: .1rem .35rem;
  border-radius: 5px;
  font-family: Consolas, monospace;
  font-size: .78rem;
  color: #be185d;
}

/* timeline (candidate history) */
.timeline {
  position: relative;
  padding-left: 1.2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--line);
}

.tl {
  position: relative;
  padding: 0 0 .9rem .4rem;
  font-size: .8rem;
}

.tl::before {
  content: "";
  position: absolute;
  left: -1.2rem;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px #ccfbf1;
}

/* manual (support) */
.manual-step {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px dashed var(--line);
}

.manual-step:last-child {
  border-bottom: 0;
}

.manual-step .num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: .78rem;
  margin-right: .4rem;
}

.contact-card {
  display: flex;
  gap: .8rem;
  align-items: center;
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.contact-card .ci {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}

/* ---------- 4. loaders ---------- */
/* thin progress bar at the very top for every server call */
#topload {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 200;
  background: linear-gradient(90deg, #14b8a6, #6366f1, #f59e0b);
  box-shadow: 0 0 10px rgba(99, 102, 241, .6);
  transition: width .3s ease, opacity .4s;
  opacity: 0;
}

#topload.on {
  opacity: 1;
}

/* full page loader (when a page opens) */
#pageload {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(241, 245, 249, .7);
  backdrop-filter: blur(1px);
  display: none;
  place-items: center;
}

#pageload.on {
  display: grid;
}

.ring {
  width: 64px;
  height: 64px;
  position: relative;
}

.ring::before,
.ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid transparent;
}

.ring::before {
  border-top-color: var(--brand);
  border-right-color: var(--brand);
  animation: spin .9s linear infinite;
}

.ring::after {
  inset: 9px;
  border-bottom-color: var(--brand2);
  border-left-color: var(--brand2);
  animation: spin 1.3s linear infinite reverse;
}

.ring img {
  position: absolute;
  inset: 20px;
  width: 24px;
  height: 24px;
}

.load-txt {
  text-align: center;
  font-size: .75rem;
  color: var(--muted);
  margin-top: .6rem;
  font-weight: 600;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* skeleton rows inside tables while loading */
.sk {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #eef2f7 25%, #e2e8f0 37%, #eef2f7 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease infinite;
}

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0 50%;
  }
}

.btn .spin {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ---------- 5. modern login page (100vh zero-scroll luxury design) ---------- */
body.login-active {
  overflow: hidden !important;
  height: 100vh !important;
  max-height: 100vh !important;
}

.login-page-wrap {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.5rem, 2vh, 1.5rem);
  box-sizing: border-box;
  background: #080d1a;
  background-image: 
    radial-gradient(rgba(20, 184, 166, 0.07) 1.5px, transparent 1.5px),
    radial-gradient(rgba(99, 102, 241, 0.05) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
  z-index: 100;
  font-family: inherit;
}

/* Ambient floating animated glow orbs */
.login-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.6;
  z-index: 1;
}

.login-orb-1 {
  width: min(500px, 45vw);
  height: min(500px, 45vw);
  background: radial-gradient(circle, rgba(13, 148, 136, 0.55), rgba(15, 118, 110, 0.15) 70%, transparent);
  top: -12%;
  left: -8%;
  animation: orbFloat1 18s ease-in-out infinite alternate;
}

.login-orb-2 {
  width: min(520px, 48vw);
  height: min(520px, 48vw);
  background: radial-gradient(circle, rgba(67, 56, 202, 0.45), rgba(49, 46, 129, 0.12) 70%, transparent);
  bottom: -15%;
  right: -8%;
  animation: orbFloat2 22s ease-in-out infinite alternate;
}

.login-orb-3 {
  width: min(380px, 35vw);
  height: min(380px, 35vw);
  background: radial-gradient(circle, rgba(2, 132, 199, 0.35), rgba(14, 165, 233, 0.08) 70%, transparent);
  top: 40%;
  left: 32%;
  animation: orbFloat3 16s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.08); }
  100% { transform: translate(-30px, 70px) scale(0.95); }
}

@keyframes orbFloat2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -60px) scale(1.12); }
  100% { transform: translate(40px, -30px) scale(0.92); }
}

@keyframes orbFloat3 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -50px) scale(1.15); }
  100% { transform: translate(-50px, 30px) scale(0.9); }
}

/* Master Glass Deck (Split Card) */
.login-card-deck {
  position: relative;
  z-index: 10;
  width: min(1060px, 95vw);
  height: min(620px, 92vh);
  max-height: 92vh;
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 
    0 30px 80px -15px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  overflow: hidden;
  animation: deckAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-card-deck.is-wide {
  width: min(1120px, 96vw);
  height: min(660px, 94vh);
  max-height: 94vh;
  grid-template-columns: 1fr 1.22fr;
}

@keyframes deckAppear {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Left Showcase Panel */
.login-art-panel {
  position: relative;
  padding: clamp(1.2rem, 2.6vh, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(150deg, rgba(13, 40, 48, 0.95) 0%, rgba(15, 23, 42, 0.92) 55%, rgba(30, 27, 75, 0.9) 100%);
  color: #fff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.login-art-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2dd4bf, #818cf8, transparent);
}

/* Header inside Art Panel */
.art-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.art-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-glow-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-glow-wrap img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.4);
}

.logo-ring {
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  background: conic-gradient(from 0deg, #14b8a6, #6366f1, #38bdf8, #14b8a6);
  opacity: 0.8;
  z-index: 1;
  filter: blur(4px);
  animation: rotateRing 8s linear infinite;
}

@keyframes rotateRing {
  to { transform: rotate(360deg); }
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #ffffff 40%, #5eead4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.65rem;
  border-radius: 99px;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.3);
  color: #5eead4;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pulse-emerald-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: emeraldPing 2s infinite;
}

@keyframes emeraldPing {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Hero Typography */
.art-hero {
  margin: 0.6rem 0;
}

.art-headline {
  font-size: clamp(1.4rem, 2.5vh, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #f8fafc;
  margin: 0 0 0.35rem 0;
}

.text-gradient-teal {
  background: linear-gradient(135deg, #2dd4bf 0%, #38bdf8 60%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.art-tagline {
  font-size: clamp(0.78rem, 1.35vh, 0.86rem);
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.75);
  margin: 0;
  max-width: 440px;
}

/* Animated Interactive Placement Pipeline */
.pipeline-board {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(0.45rem, 1vh, 0.65rem);
  margin: 0.5rem 0;
  padding: 0.6rem 0.75rem 0.6rem 1.6rem;
  background: rgba(15, 23, 42, 0.45);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pipeline-track {
  position: absolute;
  top: 1.2rem;
  bottom: 1.2rem;
  left: 0.95rem;
  width: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
}

.pipeline-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 35px;
  background: linear-gradient(180deg, transparent, #2dd4bf, #818cf8, transparent);
  animation: laserStream 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes laserStream {
  0% { top: -40px; opacity: 0; }
  25% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.pipe-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: all 0.25s ease;
}

.pipe-node:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(45, 212, 191, 0.35);
  transform: translateX(3px);
}

.pipe-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.pipe-icon-box svg {
  width: 16px;
  height: 16px;
}

.pipe-icon-box.bg-teal { background: linear-gradient(135deg, #0d9488, #0f766e); }
.pipe-icon-box.bg-indigo { background: linear-gradient(135deg, #4f46e5, #4338ca); }
.pipe-icon-box.bg-amber { background: linear-gradient(135deg, #d97706, #b45309); }
.pipe-icon-box.bg-emerald { background: linear-gradient(135deg, #059669, #047857); }

.pipe-info {
  flex: 1;
  min-width: 0;
}

.pipe-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
}

.pipe-sub {
  font-size: 0.68rem;
  color: rgba(226, 232, 240, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.pipe-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-green { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-indigo { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-emerald { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }

.ping-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: pulseDot 1.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* Bottom feature pills */
.art-footer-pills {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.feat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  color: rgba(226, 232, 240, 0.85);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.28rem 0.6rem;
  border-radius: 99px;
}

.feat-pill svg {
  width: 12px;
  height: 12px;
  color: #2dd4bf;
}

/* Right Form Panel */
.login-form-panel {
  position: relative;
  background: #ffffff;
  padding: clamp(1.2rem, 2.8vh, 2rem) clamp(1.2rem, 2.6vw, 2.2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.form-container {
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.login-card-deck.is-wide .form-container {
  max-width: 520px;
}

.form-header {
  margin-bottom: clamp(0.7rem, 1.8vh, 1.25rem);
}

.form-icon-bubble {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  color: #0f766e;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
}

.form-icon-bubble svg {
  width: 19px;
  height: 19px;
}

.form-heading {
  font-size: clamp(1.25rem, 2.2vh, 1.45rem);
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.form-subheading {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

/* Form inputs & styling */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: clamp(0.55rem, 1.2vh, 0.75rem);
}

.form-grid-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.form-grid-compact .col-span-2 {
  grid-column: span 2;
}

.auth-iconput {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-iconput svg {
  position: absolute;
  left: 0.85rem;
  width: 17px;
  height: 17px;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s;
  z-index: 2;
}

.auth-iconput .input {
  width: 100%;
  min-height: 42px;
  height: 42px;
  padding: 0 0.85rem 0 2.45rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 11px;
  font-size: 0.88rem;
  color: #0f172a;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-grid-compact .auth-iconput .input {
  min-height: 38px;
  height: 38px;
  font-size: 0.82rem;
  padding-left: 2.2rem;
}

.auth-iconput .input:focus {
  background: #ffffff;
  border-color: #0d9488;
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.auth-iconput .input:focus + svg,
.auth-iconput:focus-within svg {
  color: #0d9488;
}

.auth-iconput .eye-btn {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  z-index: 3;
}

.auth-iconput .eye-btn:hover {
  color: #0d9488;
  background: #f1f5f9;
}

/* Primary Auth Button */
.btn-auth-primary {
  position: relative;
  width: 100%;
  min-height: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.35);
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 0.15rem;
}

.btn-auth-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 118, 110, 0.45);
  background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%);
}

.btn-auth-primary:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-auth-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-20deg) translateX(-150%);
  pointer-events: none;
}

.btn-auth-primary:hover .btn-shimmer {
  animation: btnShine 1s infinite;
}

@keyframes btnShine {
  from { transform: skewX(-20deg) translateX(-150%); }
  to { transform: skewX(-20deg) translateX(300%); }
}

.btn-content {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-content svg {
  width: 18px;
  height: 18px;
}

/* Secondary Links & Free Trial */
.auth-sublinks {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  margin-top: 0.5rem;
}

.auth-sublinks a {
  color: #475569;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.auth-sublinks a:hover {
  color: #0d9488;
  text-decoration: underline;
}

.register-callout {
  margin-top: clamp(0.6rem, 1.4vh, 0.9rem);
  padding: 0.5rem 0.75rem;
  border-radius: 11px;
  background: #f0fdfa;
  border: 1px dashed #5eead4;
  text-align: center;
  font-size: 0.78rem;
  color: #134e4a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.register-callout:hover {
  background: #e6fffa;
  border-color: #2dd4bf;
}

.register-callout a {
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
}

.register-callout a:hover {
  text-decoration: underline;
}

.locked-callout {
  margin-top: 0.6rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  background: #fef3c7;
  border: 1px dashed #f59e0b;
  text-align: center;
  font-size: 0.72rem;
  color: #92400e;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.locked-callout svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Footer info */
.auth-footer {
  text-align: center;
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: clamp(0.7rem, 1.8vh, 1.1rem);
  line-height: 1.45;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.5rem;
}

.auth-footer-brand b {
  color: #334155;
}

.biotech-glow {
  color: #0f766e;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  body.login-active {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
  }

  .login-page-wrap {
    position: relative;
    height: auto;
    min-height: 100vh;
    max-height: none;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 3vh, 1.75rem) 0.75rem;
    box-sizing: border-box;
  }

  .login-card-deck {
    height: auto;
    max-height: none;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 460px;
    margin: auto 0;
    border-radius: 22px;
    background: transparent;
    box-shadow: 
      0 25px 60px -10px rgba(0, 0, 0, 0.75),
      0 0 0 1px rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
  }

  .login-card-deck::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #14b8a6, #6366f1, #38bdf8);
    border-radius: 22px 22px 0 0;
    z-index: 5;
  }

  .login-card-deck.is-wide {
    max-width: 500px;
  }

  /* Display graphics animation panel on mobile */
  .login-art-panel {
    display: flex !important;
    flex-direction: column;
    padding: clamp(1rem, 3.5vw, 1.35rem) clamp(0.85rem, 3vw, 1.25rem);
    background: linear-gradient(145deg, #042f2e 0%, #064e3b 45%, #0f172a 100%);
    border-radius: 22px 22px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
  }

  .art-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
  }

  .logo-glow-wrap {
    width: 36px;
    height: 36px;
  }

  .logo-glow-wrap img {
    width: 32px;
    height: 32px;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .brand-sub {
    font-size: 0.67rem;
  }

  .live-status-pill {
    padding: 0.22rem 0.5rem;
    font-size: 0.65rem;
  }

  .art-hero {
    margin: 0.2rem 0 0.45rem 0;
  }

  .art-headline {
    font-size: 1.25rem;
    line-height: 1.22;
    margin-bottom: 0.2rem;
  }

  .art-tagline {
    font-size: 0.72rem;
    line-height: 1.35;
    color: rgba(226, 232, 240, 0.72);
  }

  /* Animated pipeline board with moving laser stream on mobile */
  .pipeline-board {
    margin: 0.4rem 0 0.55rem 0;
    padding: 0.45rem 0.55rem 0.45rem 1.4rem;
    gap: 0.38rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
  }

  .pipeline-track {
    top: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
  }

  .pipe-node {
    padding: 0.32rem 0.45rem;
    gap: 0.45rem;
    border-radius: 9px;
  }

  .pipe-icon-box {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }

  .pipe-icon-box svg {
    width: 13px;
    height: 13px;
  }

  .pipe-title {
    font-size: 0.74rem;
  }

  .pipe-sub {
    font-size: 0.62rem;
  }

  .pipe-badge {
    font-size: 0.62rem;
    padding: 0.15rem 0.38rem;
  }

  .art-footer-pills {
    gap: 0.35rem;
    margin-top: 0.25rem;
  }

  .feat-pill {
    font-size: 0.63rem;
    padding: 0.2rem 0.45rem;
  }

  .login-form-panel {
    padding: clamp(1.2rem, 3.5vw, 1.6rem) clamp(1rem, 3vw, 1.4rem);
    background: #ffffff;
    border-radius: 0 0 22px 22px;
  }

  .form-container {
    max-width: 100%;
  }

  .form-header {
    margin-bottom: 0.75rem;
  }

  .form-icon-bubble {
    display: none; /* Logo is already prominent in animated art panel */
  }

  /* Ambient orbs on mobile */
  .login-orb-1 {
    width: 280px;
    height: 280px;
    top: -5%;
    left: -15%;
    filter: blur(60px);
  }

  .login-orb-2 {
    width: 300px;
    height: 300px;
    bottom: -8%;
    right: -15%;
    filter: blur(65px);
  }

  .login-orb-3 {
    display: none;
  }

  /* Compact grid on mobile for register */
  .form-grid-compact {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .form-grid-compact .col-span-2 {
    grid-column: span 1;
  }
}

/* ---------- 6. mobile / tablet ---------- */
@media (max-width: 1100px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav>li>a {
    padding: .85rem .55rem;
  }
}

@media (max-width: 900px) {
  .hamburger {
    display: block;
  }

  .navbar .inner {
    flex-wrap: wrap;
  }

  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
    flex: 1 1 100%;
    padding-bottom: .5rem;
  }

  .nav.show {
    display: flex;
  }

  .nav>li.support {
    margin-left: 0;
  }

  .nav>li>a {
    border-bottom: 0;
    border-left: 3px solid transparent;
  }

  .nav>li.active>a {
    border-left-color: var(--brand);
  }

  .sub {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 1.6rem;
    animation: none;
  }

  .userinfo .hide-sm,
  .top-actions .txt {
    display: none;
  }

  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manual-step {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 13.5px;
  }

  .container {
    padding: .7rem;
  }

  .form-grid,
  .form-grid.cols-3,
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }

  .col-span-2 {
    grid-column: auto;
  }

  .kpi .n {
    font-size: 1.5rem;
  }

  .userinfo {
    margin-left: .3rem;
    padding-left: .5rem;
    gap: .4rem;
  }

  .brand .tg {
    display: none;
  }

  .funnel-row {
    grid-template-columns: 105px 1fr 30px;
  }

  .modal-bg {
    padding: 0;
  }

  .modal {
    border-radius: 0;
    min-height: 100vh;
  }

  .modal-b {
    max-height: none;
  }

  .modal-f {
    border-radius: 0;
    position: sticky;
    bottom: 0;
  }

  /* tables become cards on small phones */
  table.tbl.rwd thead {
    display: none;
  }

  table.tbl.rwd,
  .tbl.rwd tbody,
  .tbl.rwd tr,
  .tbl.rwd td {
    display: block;
    width: 100%;
  }

  .tbl.rwd tr {
    border: 1px solid var(--line);
    border-radius: 10px;
    margin: .5rem 0;
    padding: .35rem .2rem;
    background: #fff;
  }

  .tbl.rwd td {
    border: 0;
    padding: .3rem .6rem;
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    text-align: right;
  }

  .tbl.rwd td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: .7rem;
    text-transform: uppercase;
    text-align: left;
    flex: none;
  }

  .tbl.rwd td.actions {
    justify-content: flex-end;
  }

  .tbl.rwd td.actions::before {
    display: none;
  }

  .toolbar .input {
    min-width: 0;
    flex: 1 1 45%;
  }
}

/* ---------- 7. print ---------- */
@media print {

  .topbar,
  .navbar,
  .licbar,
  .footer,
  .toolbar,
  .btn,
  #toasts {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .card {
    box-shadow: none;
    border: 0;
  }
}