/* ═══════════════════════════════════════════════════
   LUMEX — Auth Pages CSS
   Flashlight ON/OFF toggle — fully responsive
   ═══════════════════════════════════════════════════ */

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

/* ── Page ── */
.auth-body {
  margin: 0; padding: 0;
  min-height: 100vh;
}

.auth-page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: #f7f2e8;
  transition: background 0.7s ease;
}

/* ── DARK MODE (flashlight OFF) ── */
.auth-page.lights-off {
  background: #0d0d0d;
}

/* ── Logo ── */
.auth-logo {
  position: fixed;
  top: 24px; left: 32px;
  font-family: var(--font-cond);
  font-size: 28px; font-weight: 800;
  color: var(--gray-800);
  letter-spacing: .03em;
  z-index: 200;
  text-decoration: none;
  transition: color 0.7s;
}
.auth-logo span { color: var(--accent); }
.lights-off .auth-logo { color: rgba(255,255,255,.8); }

/* ── Flashlight SVG wrapper ── */
.auth-flashlight {
  position: relative;
  z-index: 20;
  margin-top: clamp(40px, 6vh, 80px);
  display: flex;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}
.auth-flashlight svg {
  width: clamp(60px, 8vw, 110px);
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.25));
  transition: filter 0.5s;
}
.lights-off .auth-flashlight svg {
  filter: drop-shadow(0 4px 20px rgba(0,0,0,.6));
}

/* ── Slider button on flashlight ── */
.flashlight-btn-track {
  position: absolute;
  /* positioned on the red button area of the SVG */
  right: clamp(-2px, 0.5vw, 2px);
  top: 30%;
  width: 14px;
  height: 32px;
  background: #1a1a1a;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2px;
  cursor: pointer;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.5);
  z-index: 30;
}
.flashlight-btn-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e85d04;
  box-shadow: 0 0 6px rgba(232,93,4,.8), 0 0 12px rgba(232,93,4,.4);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), background 0.35s, box-shadow 0.35s;
  cursor: grab;
}
/* Слайд надолу = изключено */
.lights-off .flashlight-btn-thumb {
  transform: translateY(16px);
  background: #555;
  box-shadow: none;
}

/* Tooltip при hover */
.flashlight-btn-track::after {
  content: 'Click to toggle';
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.flashlight-btn-track:hover::after { opacity: 1; }

/* ── Light beam ── */
.auth-beam {
  position: absolute;
  top: clamp(100px, 13vh, 175px);
  left: 50%;
  transform: translateX(-50%);
  width: clamp(500px, 85vw, 1400px);
  height: clamp(600px, 90vh, 1200px);
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(255, 235, 160, 0.55) 0%,
    rgba(255, 245, 200, 0.35) 25%,
    rgba(255, 250, 220, 0.18) 50%,
    rgba(255, 255, 240, 0.06) 75%,
    transparent 100%
  );
  clip-path: polygon(46% 0%, 54% 0%, 100% 100%, 0% 100%);
  filter: blur(22px);
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.7s ease;
}
.lights-off .auth-beam { opacity: 0; }

/* Lens glow when ON */
.lens-glow {
  transition: opacity 0.5s;
}
.lights-off .lens-glow { opacity: 0 !important; }

/* ── Brand text ── */
.auth-brand {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: clamp(14px, 2vh, 28px) 24px clamp(18px, 2.5vh, 32px);
  width: 100%;
  max-width: 560px;
  transition: color 0.7s;
}

.auth-brand-content h2 {
  font-family: var(--font-cond);
  font-size: clamp(38px, 5.5vw, 62px);
  font-weight: 800;
  color: var(--gray-900);
  line-height: .93;
  letter-spacing: -.01em;
  margin-bottom: 12px;
  transition: color 0.7s;
}
.lights-off .auth-brand-content h2 { color: rgba(255,255,255,.9); }

.auth-brand-content p {
  font-size: clamp(13px, 1.5vw, 15px);
  color: var(--gray-600);
  line-height: 1.65;
  max-width: 380px;
  margin: 0 auto 16px;
  transition: color 0.7s;
}
.lights-off .auth-brand-content p { color: rgba(255,255,255,.5); }

.auth-stats { display: flex; justify-content: center; gap: clamp(20px, 4vw, 36px); margin-top: 4px; }
.auth-stat strong {
  display: block;
  font-family: var(--font-cond);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--accent);
  line-height: 1; margin-bottom: 2px;
}
.auth-stat span {
  font-size: 10px; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .1em;
  transition: color 0.7s;
}
.lights-off .auth-stat span { color: rgba(255,255,255,.3); }

.auth-perks {
  list-style: none;
  display: flex; flex-direction: column; gap: 8px;
  text-align: left; max-width: 280px; margin: 4px auto 0;
}
.auth-perks li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--gray-700);
  transition: color 0.7s;
}
.lights-off .auth-perks li { color: rgba(255,255,255,.6); }
.auth-perks li svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }

.auth-brand-footer { display: none; }

/* ── Form card ── */
.auth-form-panel {
  position: relative; z-index: 10;
  width: 100%; max-width: 480px;
  margin: 0 24px clamp(40px, 6vh, 80px);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-xl, 20px);
  box-shadow: 0 2px 0 rgba(255,255,255,.8) inset, 0 24px 64px rgba(0,0,0,.13), 0 4px 16px rgba(0,0,0,.07);
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px);
  transition: background 0.7s, box-shadow 0.7s;
}
.lights-off .auth-form-panel {
  background: rgba(22, 22, 28, 0.96);
  box-shadow: 0 24px 64px rgba(0,0,0,.6), 0 4px 16px rgba(0,0,0,.4);
}

.auth-form-wrap { width: 100%; }

.auth-form-header { margin-bottom: 24px; }
.auth-form-header h1 {
  font-family: var(--font-cond);
  font-size: 30px; font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 5px; letter-spacing: -.01em;
  transition: color 0.7s;
}
.lights-off .auth-form-header h1 { color: rgba(255,255,255,.9); }
.auth-form-header p { font-size: 13px; color: var(--gray-500); transition: color 0.7s; }
.lights-off .auth-form-header p { color: rgba(255,255,255,.45); }
.auth-form-header a { color: var(--accent); font-weight: 600; }
.auth-form-header a:hover { text-decoration: underline; }

/* Demo hint */
.demo-hint {
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--radius, 8px);
  padding: 10px 14px; font-size: 12px; color: #92400e;
  margin-bottom: 18px; line-height: 1.6;
  transition: background 0.7s, border-color 0.7s, color 0.7s;
}
.lights-off .demo-hint { background: rgba(255,200,0,.07); border-color: rgba(255,200,0,.2); color: rgba(255,200,100,.8); }
.demo-hint strong { display: block; margin-bottom: 3px; }
.demo-hint code {
  background: rgba(0,0,0,.07); padding: 1px 5px;
  border-radius: 3px; font-size: 11px; font-family: monospace;
}
.lights-off .demo-hint code { background: rgba(255,255,255,.1); }

/* Form fields */
.auth-form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
  font-size: 12px; font-weight: 600; color: var(--gray-700);
  display: flex; justify-content: space-between; align-items: center;
  transition: color 0.7s;
}
.lights-off .field label { color: rgba(255,255,255,.6); }
.field-link { font-size: 12px; color: var(--accent); font-weight: 500; }
.field-link:hover { text-decoration: underline; }

.field-icon { position: relative; display: flex; align-items: center; }
.field-icon > svg {
  position: absolute; left: 12px;
  width: 15px; height: 15px; color: var(--gray-400);
  pointer-events: none; transition: color 0.7s;
}
.lights-off .field-icon > svg { color: rgba(255,255,255,.3); }

.field-icon input {
  width: 100%;
  padding: 10px 13px 10px 38px;
  border: 1.5px solid var(--gray-200, #e5e7eb);
  border-radius: var(--radius, 8px);
  font-size: 14px; color: var(--gray-800);
  background: #fafafa;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s, color .7s;
}
.lights-off .field-icon input {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
}
.lights-off .field-icon input::placeholder { color: rgba(255,255,255,.25); }
.field-icon input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(230,126,0,.12);
}
.lights-off .field-icon input:focus {
  background: rgba(255,255,255,.1);
  box-shadow: 0 0 0 3px rgba(230,126,0,.2);
}
.field.has-error .field-icon input { border-color: var(--red, #ef4444); }
.field-err { font-size: 11px; color: var(--red, #ef4444); margin-top: 2px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field-check { display: flex; align-items: center; }
.field-check label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--gray-600); cursor: pointer;
  transition: color 0.7s;
}
.lights-off .field-check label { color: rgba(255,255,255,.5); }
.field-check input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; }

.auth-terms { font-size: 12px; color: var(--gray-400); line-height: 1.6; transition: color 0.7s; }
.lights-off .auth-terms { color: rgba(255,255,255,.3); }
.auth-terms a { color: var(--accent); }

/* Submit button */
.btn-auth {
  width: 100%; padding: 13px;
  background: var(--accent); color: #fff;
  font-family: var(--font-cond); font-size: 15px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  border: none; border-radius: var(--radius, 8px);
  cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-auth svg { width: 17px; height: 17px; }
.btn-auth:hover { background: var(--accent-dk, #c96a00); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(230,126,0,.35); }
.btn-auth:active { transform: none; }

.auth-switch {
  text-align: center; font-size: 13px; color: var(--gray-500); margin-top: 18px;
  transition: color 0.7s;
}
.lights-off .auth-switch { color: rgba(255,255,255,.35); }
.auth-switch a { color: var(--accent); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .auth-beam { width: 140vw; filter: blur(16px); }
}
@media (max-width: 600px) {
  .auth-logo { top: 16px; left: 20px; font-size: 22px; }
  .auth-form-panel { margin: 0 12px clamp(32px,5vh,60px); }
  .field-row { grid-template-columns: 1fr; }
  .auth-brand { padding-left: 16px; padding-right: 16px; }
  .flashlight-btn-track::after { display: none; }
}
@media (max-width: 380px) {
  .auth-flashlight svg { width: 52px; }
  .auth-brand-content h2 { font-size: 34px; }
}