/* ═══════════════════════════════════════════════════════════════════
   ACME Tooling — CNC Blueprint Login Theme
   Self-contained CSS for the Acme branded login page.
   ═══════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:        #1B8FFF;
  --blue-rgb:    27,143,255;
  --blue-bright: #4DAFFF;
  --blue-dim:    rgba(27,143,255,0.08);
  --blue-line:   rgba(27,143,255,0.18);
  --blue-glow:   rgba(27,143,255,0.35);
  --white:       #E8F4FF;
  --muted:       rgba(232,244,255,0.38);
  --muted-light: rgba(232,244,255,0.16);
  --bg:          #020912;
  --surface:     #040d1e;
  --font-display:'Barlow Condensed', sans-serif;
  --font-mono:   'Share Tech Mono', monospace;
  --font-ui:     'Rajdhani', sans-serif;
}

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  font-family: var(--font-ui);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: crosshair;
}

/* ── Canvas ── */
#canvas {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

/* ── Page layout ── */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 440px;
}

/* ════════════════════════════
   BRAND MARK
════════════════════════════ */
.brand {
  position: fixed;
  top: 2rem;
  left: 2.5rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  opacity: 0;
  animation: fadeDown 0.6s 0.1s ease forwards;
}

.brand-icon {
  width: 32px; height: 32px;
  position: relative;
  flex-shrink: 0;
}
.brand-icon svg {
  width: 100%; height: 100%;
  color: var(--blue);
  filter: drop-shadow(0 0 6px rgba(27,143,255,0.7));
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--white);
  text-transform: uppercase;
}
.brand-text strong {
  font-weight: 700;
  color: var(--blue-bright);
}

.brand-sep { width: 1px; height: 20px; background: var(--blue-line); }

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ── Crosshair cursor indicator ── */
.crosshair {
  position: fixed;
  top: 1.9rem;
  right: 2.5rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeDown 0.6s 0.2s ease forwards;
}
.crosshair-coords {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: rgba(27,143,255,0.5);
  letter-spacing: 0.08em;
}

/* ════════════════════════════
   LEFT PANEL
════════════════════════════ */
.left-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3.5rem 3.5rem 3.5rem 2.5rem;
  pointer-events: none;
}

.acme-logo {
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.2s ease forwards;
}

.acme-wordmark {
  font-family: var(--font-display);
  font-size: 3.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  color: var(--white);
  text-transform: uppercase;
  position: relative;
  display: inline-block;
}
.acme-wordmark::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-bright) 60%, transparent 100%);
}

.acme-tagline {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  color: var(--blue);
  text-transform: uppercase;
  margin-top: 0.9rem;
}

.system-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.26em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.3s ease forwards;
}

.system-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.42s ease forwards;
}
.system-title strong {
  font-weight: 700;
  color: var(--blue-bright);
  text-shadow: 0 0 30px rgba(27,143,255,0.5);
  animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
  0%,100% { text-shadow: 0 0 20px rgba(27,143,255,0.4); }
  50%      { text-shadow: 0 0 40px rgba(27,143,255,0.9), 0 0 70px rgba(27,143,255,0.3); }
}

/* ── Tolerance readout ── */
.tolerance-block {
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.55s ease forwards;
}
.tolerance-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}
.tol-label {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  width: 90px;
  flex-shrink: 0;
}
.tol-bar-track {
  flex: 1;
  height: 2px;
  background: rgba(27,143,255,0.1);
  border-radius: 1px;
  overflow: hidden;
}
.tol-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--blue-bright));
  border-radius: 1px;
  transform-origin: left;
  animation: barGrow 1.8s ease forwards;
  animation-delay: var(--bar-delay, 0.6s);
  transform: scaleX(0);
}
@keyframes barGrow {
  to { transform: scaleX(1); }
}
.tol-val {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--blue-bright);
  letter-spacing: 0.05em;
  width: 44px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Metrics ── */
.metrics-row {
  display: flex;
  gap: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--blue-line);
  opacity: 0;
  animation: fadeUp 0.7s 0.7s ease forwards;
}
.metric { display: flex; flex-direction: column; gap: 0.25rem; }
.metric-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1;
}
.metric-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ════════════════════════════
   RIGHT PANEL — LOGIN
════════════════════════════ */
.right-panel {
  background: rgba(2,9,18,0.9);
  border-left: 1px solid var(--blue-line);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 3rem;
  position: relative;
  overflow: hidden;
}

/* Top shimmer line */
.right-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--blue) 30%,
    var(--blue-bright) 50%,
    var(--blue) 70%,
    transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
  0%,100% { background-position: -100% 0; opacity: 0.7; }
  50%      { background-position: 100% 0; opacity: 1; }
}

/* Corner brackets */
.right-panel::after {
  content: '';
  position: absolute;
  bottom: 1.8rem; right: 1.8rem;
  width: 22px; height: 22px;
  border-bottom: 1.5px solid rgba(27,143,255,0.35);
  border-right: 1.5px solid rgba(27,143,255,0.35);
  animation: bracketPulse 4s ease-in-out infinite;
}
@keyframes bracketPulse {
  0%,100% { opacity: 0.35; }
  50%      { opacity: 0.8; }
}

.panel-inner {
  opacity: 0;
  animation: fadeUp 0.6s 0.55s ease forwards;
  position: relative;
}

/* Top-left corner bracket inside panel */
.panel-inner::before {
  content: '';
  position: absolute;
  top: -0.5rem; left: -0.5rem;
  width: 20px; height: 20px;
  border-top: 1.5px solid rgba(27,143,255,0.4);
  border-left: 1.5px solid rgba(27,143,255,0.4);
  animation: bracketPulse 4s 2s ease-in-out infinite;
}

/* ── Status pill ── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  color: var(--blue);
  background: rgba(27,143,255,0.07);
  border: 1px solid rgba(27,143,255,0.18);
  padding: 0.3rem 0.7rem;
  margin-bottom: 2rem;
  border-radius: 1px;
  width: fit-content;
  text-transform: uppercase;
}
.status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue), 0 0 16px rgba(27,143,255,0.5);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,100% { opacity: 1; box-shadow: 0 0 8px var(--blue), 0 0 16px rgba(27,143,255,0.5); }
  50%      { opacity: 0.5; box-shadow: 0 0 3px var(--blue); }
}

/* ── Login header ── */
.login-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.26em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.login-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
}

/* ── Login error ── */
.login-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 1px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: #f87171;
}

/* ── Security notice ── */
.security-notice {
  background: rgba(27,143,255,0.06);
  border: 1px solid rgba(27,143,255,0.15);
  border-radius: 1px;
  padding: 0.5rem 0.7rem;
  margin-bottom: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Form fields ── */
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.input-wrap { position: relative; }

/* dimension tick mark on input */
.input-wrap::before {
  content: '';
  position: absolute;
  top: 50%; left: 0;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: rgba(27,143,255,0.3);
  transition: background 0.2s;
}
.field input:focus ~ .tick,
.input-wrap:focus-within::before {
  background: var(--blue);
}

.field input {
  width: 100%;
  background: rgba(27,143,255,0.04);
  border: 1px solid rgba(27,143,255,0.18);
  border-left: none;
  border-radius: 0 1px 1px 0;
  padding: 0.72rem 0.9rem 0.72rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--white);
  outline: none;
  letter-spacing: 0.06em;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.field input::placeholder {
  color: rgba(232,244,255,0.1);
  font-weight: 300;
}
.field input:focus {
  border-color: rgba(27,143,255,0.6);
  background: rgba(27,143,255,0.07);
  box-shadow: 0 0 0 3px rgba(27,143,255,0.08), 0 0 20px rgba(27,143,255,0.1);
}

/* ── CNC-style submit button ── */
.btn-login {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.9rem 1rem;
  background: var(--blue);
  border: none;
  border-radius: 1px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #020912;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.1s;
  box-shadow: 0 0 20px rgba(27,143,255,0.25), 0 2px 8px rgba(0,0,0,0.4);
}
/* Sheen sweep */
.btn-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    transparent 30%,
    rgba(255,255,255,0.2) 50%,
    transparent 70%);
  transform: translateX(-100%);
  animation: sheen 3s ease-in-out infinite;
}
@keyframes sheen {
  0%    { transform: translateX(-100%); }
  40%,100% { transform: translateX(100%); }
}
.btn-login::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
  pointer-events: none;
}
.btn-login:hover {
  box-shadow: 0 0 45px rgba(27,143,255,0.55), 0 0 80px rgba(27,143,255,0.15), 0 4px 16px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}
.btn-login:active { transform: translateY(1px); }

.btn-login.loading { color: transparent; pointer-events: none; }
.btn-spinner {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-login.loading .btn-spinner { display: flex; }
.btn-spinner .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #020912;
  animation: dotBounce 1.1s ease-in-out infinite;
}
.btn-spinner .dot:nth-child(2) { animation-delay: 0.18s; }
.btn-spinner .dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes dotBounce {
  0%,80%,100% { transform: translateY(0); opacity: 0.5; }
  40%         { transform: translateY(-5px); opacity: 1; }
}
.btn-spinner .auth-text {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: #020912;
  text-transform: uppercase;
}

/* ── Error animation on button ── */
.btn-login.error {
  background: #ef4444;
  box-shadow: 0 0 20px rgba(239,68,68,0.35), 0 2px 8px rgba(0,0,0,0.4);
}
.btn-login.error .btn-spinner .dot { background: #fff; }
.btn-login.error .btn-spinner .auth-text { color: #fff; }

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.3rem 0;
}
.divider-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(27,143,255,0.2), transparent);
}
.divider-text {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  color: var(--muted-light);
  text-transform: uppercase;
}

/* ── SSO ── */
.sso-btn {
  width: 100%;
  padding: 0.7rem;
  background: transparent;
  border: 1px solid rgba(27,143,255,0.18);
  border-radius: 1px;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}
.sso-btn:hover {
  border-color: rgba(27,143,255,0.45);
  color: var(--white);
  background: rgba(27,143,255,0.05);
  box-shadow: 0 0 16px rgba(27,143,255,0.1);
}
.sso-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.sso-icon { width: 14px; height: 14px; opacity: 0.6; }

/* ── Footer ── */
.login-footer {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(27,143,255,0.08);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  color: rgba(232,244,255,0.16);
  text-transform: uppercase;
}
.footer-link {
  color: rgba(27,143,255,0.45);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-link:hover { color: var(--blue); }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; }
  .left-panel { display: none; }
  .right-panel { border-left: none; }
}
