/* BluePOS sign-in page (root index.php). Standalone: no Bootstrap, no jQuery. */

@font-face {
  font-family: "Inter";
  src: url("../vendor/inter/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --primary-700: #1e40af;
  --primary-ring: rgba(37, 99, 235, .18);
  --navy-950: #070d1f;
  --navy-900: #0b1530;
  --navy-800: #10204a;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-line: #fecaca;
  --success: #059669;
  --radius: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-feature-settings: "cv11", "ss01";
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; }
button, input { font: inherit; color: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ shell */
.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
}

/* ------------------------------------------------------------ brand panel */
.brand {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3.2vh, 36px);
  padding: clamp(28px, 4.2vh, 48px) clamp(32px, 4.4vw, 72px);
  color: #e2e8f0;
  background:
    radial-gradient(900px 520px at 85% 8%, rgba(59, 130, 246, .28), transparent 62%),
    radial-gradient(700px 500px at 0% 100%, rgba(37, 99, 235, .22), transparent 60%),
    linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 48%, var(--navy-950) 100%);
}
/* faint geometric grid, faded towards the edges */
.brand::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 60% 45%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 75% 65% at 60% 45%, #000 20%, transparent 75%);
}
/* soft ring accent */
.brand::after {
  content: "";
  position: absolute; z-index: -1;
  width: 620px; height: 620px; right: -260px; bottom: -300px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, .10);
  box-shadow: 0 0 0 70px rgba(148, 163, 184, .025), 0 0 0 140px rgba(148, 163, 184, .02);
}

.wordmark {
  display: inline-flex; align-items: center; gap: 11px;
  font-weight: 650; font-size: 19px; letter-spacing: -.01em; color: #fff;
  text-decoration: none;
}
.wordmark .mark { width: 34px; height: 34px; flex: none; }
.wordmark .pos { color: #93c5fd; }

.brand-copy { max-width: 560px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px 5px 8px; margin-bottom: 16px;
  font-size: 12.5px; font-weight: 500; color: #bfdbfe;
  background: rgba(59, 130, 246, .12);
  border: 1px solid rgba(147, 197, 253, .18);
  border-radius: 999px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .2); }
.brand h1 {
  margin: 0;
  font-size: clamp(28px, 2.6vw, 42px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.028em;
  color: #fff;
  text-wrap: balance;
}
.brand h1 .soft {
  background: linear-gradient(90deg, #93c5fd, #c7d2fe);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-copy p {
  margin: 14px 0 0;
  font-size: clamp(14px, 1.02vw, 16px);
  line-height: 1.6;
  color: #94a3b8;
  max-width: 500px;
}

/* --------------------------------------------- real POS screenshot */
.preview {
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex; align-items: center;
}
.shot {
  width: 100%;
  max-width: min(900px, calc((100vh - 490px) * 2));   /* shrink on short screens so the brand column fits */
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, .04),
    0 30px 60px -16px rgba(2, 6, 23, .7),
    0 12px 24px -12px rgba(2, 6, 23, .45);
  animation: shot-in .7s .1s var(--ease) both;
}
.shot-bar {
  display: flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  background: linear-gradient(180deg, #1b2a4e, #16223f);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.shot-bar span {
  margin: 0 auto; padding-right: 39px;   /* optically centre against the dots */
  font-size: 11.5px; font-weight: 500; color: #8796ad; letter-spacing: .01em;
}
.shot img { width: 100%; height: auto; }
@keyframes shot-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------- benefits */
.benefits {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 1.6vw, 28px);
}
.benefits li { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.benefits .ic {
  flex: none; width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; color: #93c5fd;
  background: linear-gradient(180deg, rgba(59, 130, 246, .18), rgba(59, 130, 246, .08));
  border: 1px solid rgba(147, 197, 253, .18);
}
.benefits .ic svg { width: 18px; height: 18px; }
.benefits b { display: block; font-size: 14px; font-weight: 600; color: #f1f5f9; line-height: 1.35; }
.benefits span { display: block; font-size: 12.5px; color: #8796ad; margin-top: 3px; line-height: 1.45; }

.brand-foot { font-size: 12.5px; color: #64748b; display: flex; justify-content: space-between; gap: 16px; }

/* --------------------------------------------------------------- form side */
.panel-side {
  position: relative;
  display: flex; flex-direction: column;
  padding: clamp(24px, 4vh, 44px) clamp(24px, 4vw, 64px);
  background: var(--surface);
}
.panel-head { display: flex; justify-content: flex-end; min-height: 34px; align-items: center; }
.panel-head .wordmark { display: none; color: var(--ink); }
.panel-head .wordmark .pos { color: var(--primary); }

.form-wrap {
  flex: 1 0 auto;
  display: flex; flex-direction: column; justify-content: center;
  width: 100%; max-width: 392px; margin: 0 auto;
  padding: 28px 0;
}

.workspace {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  padding: 5px 12px 5px 5px; margin-bottom: 26px; max-width: 100%;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2);
  font-size: 13px; color: var(--ink-2); font-weight: 500;
}
.workspace img {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: #fff;
  border: 1px solid var(--line);
}
.workspace span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.form-wrap h2 {
  margin: 0; font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.025em;
}
.form-wrap .lead { margin: 8px 0 28px; color: var(--muted); font-size: 15px; }

.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 13px; margin-bottom: 20px;
  border: 1px solid var(--danger-line); background: var(--danger-bg); color: #991b1b;
  border-radius: var(--radius); font-size: 14px; line-height: 1.45;
  animation: alert-in .35s var(--ease) both;
}
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--danger); }
.alert b { font-weight: 600; }
@keyframes alert-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.field { margin-bottom: 18px; }
.field label, .label-row {
  display: block; margin-bottom: 7px; font-size: 13.5px; font-weight: 550; color: var(--ink-2);
}
.control { position: relative; }
.control > .lead-ic {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted-2); pointer-events: none;
  transition: color .15s var(--ease);
}
.control input {
  width: 100%; height: 44px;
  padding: 0 14px 0 41px;
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background-color .15s;
}
.control input::placeholder { color: #a0aec0; }
.control input:hover { border-color: #b4c0d0; }
.control input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-ring), 0 1px 2px rgba(15, 23, 42, .04);
}
.control:focus-within > .lead-ic { color: var(--primary); }
.control.has-toggle input { padding-right: 46px; }
.control input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset; }
.control input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 4px var(--primary-ring), 0 0 0 40px #fff inset; }

.field.invalid input { border-color: var(--danger); }
.field.invalid input:focus { box-shadow: 0 0 0 4px rgba(220, 38, 38, .14); }
.field.invalid .lead-ic { color: var(--danger); }
.field-error {
  display: none; align-items: center; gap: 6px;
  margin-top: 7px; font-size: 13px; color: var(--danger);
}
.field-error svg { width: 14px; height: 14px; flex: none; }
.field.invalid .field-error { display: flex; }

.toggle-pass {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 8px;
  display: grid; place-items: center;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: background-color .15s, color .15s;
}
.toggle-pass:hover { background: #f1f5f9; color: var(--ink-2); }
.toggle-pass svg { width: 18px; height: 18px; }
.toggle-pass .eye-off { display: none; }
.toggle-pass[aria-pressed="true"] .eye { display: none; }
.toggle-pass[aria-pressed="true"] .eye-off { display: block; }

.caps {
  display: none; align-items: center; gap: 6px; margin-top: 7px;
  font-size: 12.5px; color: #b45309;
}
.caps svg { width: 14px; height: 14px; }
.caps.show { display: flex; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 22px; }

.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; color: var(--ink-2); user-select: none; }
.check input {
  appearance: none; -webkit-appearance: none; margin: 0;
  width: 18px; height: 18px; flex: none; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 5px; background: #fff;
  display: grid; place-items: center;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.check input::after {
  content: ""; width: 10px; height: 10px;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  background: #fff; transform: scale(0); transition: transform .12s var(--ease);
}
.check input:checked { background: var(--primary); border-color: var(--primary); }
.check input:checked::after { transform: scale(1); }
.check input:hover { border-color: #94a3b8; }

.link-btn {
  border: 0; background: none; padding: 2px 0; cursor: pointer;
  font-size: 14px; font-weight: 550; color: var(--primary);
  border-radius: 4px;
}
.link-btn:hover { color: var(--primary-700); text-decoration: underline; text-underline-offset: 3px; }

.help {
  display: none; gap: 10px; align-items: flex-start;
  margin: -8px 0 20px; padding: 12px 14px;
  font-size: 13.5px; line-height: 1.5; color: #1e3a8a;
  background: #eff5ff; border: 1px solid #d6e4ff; border-radius: var(--radius);
}
.help svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--primary); }
.help.show { display: flex; animation: alert-in .25s var(--ease) both; }

.btn-primary {
  position: relative;
  width: 100%; height: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 0; border-radius: var(--radius); cursor: pointer;
  font-size: 15px; font-weight: 600; letter-spacing: -.005em; color: #fff;
  background: linear-gradient(180deg, #3b6ff5 0%, var(--primary) 55%, var(--primary-600) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 1px 2px rgba(15, 23, 42, .12),
    0 6px 16px -4px rgba(37, 99, 235, .45);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), filter .15s;
}
.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .2),
    0 2px 4px rgba(15, 23, 42, .12),
    0 10px 22px -6px rgba(37, 99, 235, .55);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); filter: brightness(.97); }
.btn-primary svg.arrow { width: 17px; height: 17px; transition: transform .2s var(--ease); }
.btn-primary:hover svg.arrow { transform: translateX(2px); }
.btn-primary .spinner {
  display: none; width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.btn-primary.loading { cursor: progress; transform: none; filter: none; }
.btn-primary.loading .spinner { display: inline-block; }
.btn-primary.loading .arrow { display: none; }
.btn-primary:disabled { opacity: .92; }
@keyframes spin { to { transform: rotate(360deg); } }

.secure {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 20px; font-size: 12.5px; color: var(--muted);
}
.secure svg { width: 15px; height: 15px; color: var(--success); flex: none; }

.panel-foot {
  text-align: center;
  font-size: 12.5px; color: var(--muted-2);
}
.panel-foot .m-only { display: none; }

/* keyboard focus */
:focus { outline: none; }
.toggle-pass:focus-visible, .link-btn:focus-visible, .check input:focus-visible, .btn-primary:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
.btn-primary:focus-visible { outline-offset: 3px; }

/* ------------------------------------------------------------ responsive */

@media (min-width: 1024px) and (max-height: 700px) {
  .brand-copy p { display: none; }
  .benefits span { display: none; }
}

/* small laptops */
@media (max-width: 1279px) {
  .auth { grid-template-columns: minmax(0, 52fr) minmax(0, 48fr); }
  .benefits span { display: none; }
  .benefits b { font-size: 13px; }
  .benefits .ic { width: 34px; height: 34px; }
}

/* tablet and phone: the form leads, brand becomes a compact header */
@media (max-width: 1023px) {
  .auth { display: block; }
  .brand { display: none; }
  .panel-side {
    min-height: 100vh; min-height: 100dvh;
    padding: 0;
    background:
      radial-gradient(600px 300px at 80% -40px, rgba(59, 130, 246, .35), transparent 70%),
      linear-gradient(180deg, var(--navy-900) 0, var(--navy-800) 260px, var(--surface-2) 260px);
  }
  .panel-head {
    justify-content: center; min-height: 0;
    padding: 34px 20px 30px;
  }
  .panel-head .wordmark { display: inline-flex; color: #fff; }
  .panel-head .wordmark .pos { color: #93c5fd; }
  .form-wrap {
    flex: 0 0 auto;
    max-width: 440px;
    margin: 0 auto;
    padding: 32px 32px 30px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 20px 40px -18px rgba(15, 23, 42, .25);
  }
  .panel-foot { padding: 24px 20px 28px; margin-top: auto; }
  .panel-foot .m-only { display: inline; }
}
@media (max-width: 1023px) and (min-height: 900px) {
  .panel-head { padding-top: 9vh; }
}

/* phones */
@media (max-width: 520px) {
  body { font-size: 15px; }
  .panel-side {
    background:
      radial-gradient(420px 220px at 90% -30px, rgba(59, 130, 246, .35), transparent 70%),
      linear-gradient(180deg, var(--navy-900) 0, var(--navy-800) 200px, var(--surface-2) 200px);
  }
  .panel-head { padding: 26px 16px 22px; }
  .form-wrap {
    margin: 0 14px;
    width: auto;
    padding: 26px 20px 24px;
    border-radius: 14px;
  }
  .workspace { margin-bottom: 20px; }
  .form-wrap h2 { font-size: 24px; }
  .form-wrap .lead { font-size: 14.5px; margin-bottom: 22px; }
  .control input { height: 48px; font-size: 16px; }  /* 16px stops iOS zoom-on-focus */
  .btn-primary { height: 50px; }
  .check, .link-btn { font-size: 14px; min-height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .btn-primary .spinner { animation-duration: 1.2s !important; animation-iteration-count: infinite !important; }
}
