/* ======================================================================
   Lumo — страница входа (admin_login): чистое окно на Aurora-фоне, 2026-05
   ====================================================================== */
.crm-auth-page{
  --bg:#060912; --bg-2:#0a0f1f;
  --text:#eef3ff; --muted:#9fb0d2; --muted-2:#7587a8;
  --tile:rgba(255,255,255,.05); --tile-2:rgba(255,255,255,.08);
  --border:rgba(160,184,232,.16); --border-strong:rgba(160,184,232,.30);
  --hairline:rgba(255,255,255,.18);
  --accent:#5b9bff; --accent-2:#22d3ee; --accent-3:#a78bfa; --accent-ink:#cfe0ff;
  --shadow:0 40px 90px rgba(2,7,20,.6);
  --ease:cubic-bezier(.22,1,.36,1);
}
html[data-theme="light"] body.crm-auth-page,
html[data-theme="light"].crm-auth-page{
  --bg:#eef2fa; --bg-2:#f6f8fd;
  --text:#10203b; --muted:#566685; --muted-2:#7484a2;
  --tile:rgba(255,255,255,.82); --tile-2:rgba(255,255,255,.94);
  --border:rgba(120,146,190,.28); --border-strong:rgba(110,138,186,.42);
  --hairline:rgba(255,255,255,.9);
  --accent:#2f7cf6; --accent-2:#0891b2; --accent-3:#7c3aed; --accent-ink:#1f4fbf;
  --shadow:0 32px 70px rgba(33,54,98,.18);
}

body.crm-auth-page{
  margin:0; min-height:100vh; min-height:100dvh;
  display:flex; align-items:center; justify-content:center;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(1100px 640px at 12% -10%, color-mix(in srgb,var(--accent) 20%, transparent), transparent 60%),
    radial-gradient(900px 560px at 92% 4%, color-mix(in srgb,var(--accent-2) 16%, transparent), transparent 58%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment:fixed;
  padding:24px;
  -webkit-tap-highlight-color:transparent;
  overflow:hidden;
}

/* ===== Aurora фон ===== */
.crm-auth-page .lp-aurora{ position:fixed; inset:0; z-index:0; pointer-events:none; overflow:hidden; }
.crm-auth-page .lp-aurora__blob{
  position:absolute; border-radius:50%; filter:blur(80px);
  mix-blend-mode:screen; opacity:.7;
  animation:authDrift 24s var(--ease) infinite alternate;
}
html[data-theme="light"] .crm-auth-page .lp-aurora__blob{ mix-blend-mode:multiply; opacity:.5; }
.crm-auth-page .lp-aurora__blob--a{ width:560px;height:560px; top:-140px; left:-120px;
  background:radial-gradient(circle at 35% 35%, color-mix(in srgb,var(--accent) 85%,transparent), transparent 70%); }
.crm-auth-page .lp-aurora__blob--b{ width:480px;height:480px; top:6%; right:-130px; animation-delay:-7s;
  background:radial-gradient(circle at 50% 50%, color-mix(in srgb,var(--accent-2) 80%,transparent), transparent 70%); }
.crm-auth-page .lp-aurora__blob--c{ width:600px;height:600px; bottom:-220px; left:30%; animation-delay:-12s;
  background:radial-gradient(circle at 50% 50%, color-mix(in srgb,var(--accent-3) 78%,transparent), transparent 70%); }
@keyframes authDrift{ 0%{ transform:translate3d(0,0,0) scale(1);} 100%{ transform:translate3d(34px,-26px,0) scale(1.08);} }
.crm-auth-page .lp-aurora__grid{
  position:absolute; inset:-2px;
  background-image:
    linear-gradient(to right, rgba(160,184,232,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(160,184,232,.06) 1px, transparent 1px);
  background-size:56px 56px;
  mask-image:radial-gradient(circle at 50% 40%, #000 0%, transparent 72%);
  -webkit-mask-image:radial-gradient(circle at 50% 40%, #000 0%, transparent 72%);
}

/* ===== Карточка входа ===== */
.crm-auth-page .auth-wrap{ position:relative; z-index:1; width:100%; display:flex; justify-content:center; }
body.crm-auth-page .auth-card{
  align-self:center;
  position:relative;
  width:100%; max-width:420px;
  display:flex; flex-direction:column; align-items:center; gap:6px;
  padding:38px 34px 30px;
  border-radius:26px;
  border:1px solid var(--border);
  background:var(--tile);
  backdrop-filter:blur(22px) saturate(140%); -webkit-backdrop-filter:blur(22px) saturate(140%);
  box-shadow:var(--shadow);
  animation:authIn .5s var(--ease) both;
}
body.crm-auth-page .auth-card::before{
  content:""; position:absolute; inset:0 0 auto 0; height:1px;
  background:linear-gradient(90deg, transparent, var(--hairline), transparent);
}
@keyframes authIn{ from{ opacity:0; transform:translateY(16px) scale(.98);} to{ opacity:1; transform:none;} }

.auth-card__brand{ display:inline-flex; align-items:center; gap:11px; color:var(--text); }
.auth-card__logo{ width:46px;height:46px; border-radius:14px; overflow:hidden; border:1px solid var(--border-strong);
  box-shadow:0 10px 24px rgba(40,96,220,.40); }
.auth-card__logo img{ width:100%;height:100%; object-fit:cover; display:block; }
.auth-card__brandtext{ font-size:20px; font-weight:850; letter-spacing:-.02em; }

.auth-card__title{ margin:14px 0 0; font-size:24px; font-weight:850; letter-spacing:-.03em; text-align:center; }
.auth-card__sub{ margin:4px 0 18px; color:var(--muted); font-size:14.5px; text-align:center; }

.auth-form{ width:100%; display:flex; flex-direction:column; gap:14px; }
.auth-field{ display:flex; flex-direction:column; gap:7px; }
.auth-field label{ font-size:13px; font-weight:700; color:var(--muted); padding-left:2px; }
.auth-input-wrap{ position:relative; }
body.crm-auth-page .auth-input{
  width:100%; min-height:50px; padding:0 14px; border-radius:14px;
  border:1px solid var(--border); background:var(--tile-2); color:var(--text);
  font-size:15px; outline:none; transition:border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.auth-input-wrap .auth-input{ padding-right:96px; }
body.crm-auth-page .auth-input::placeholder{ color:var(--muted-2); }
body.crm-auth-page .auth-input:focus{
  border-color:color-mix(in srgb,var(--accent) 60%, var(--border));
  box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 22%, transparent);
}
.auth-pw-toggle{
  position:absolute; top:50%; right:8px; transform:translateY(-50%);
  min-height:36px; padding:0 12px; border-radius:10px;
  border:1px solid var(--border); background:var(--tile); color:var(--muted);
  font-size:12.5px; font-weight:650; cursor:pointer; transition:.18s ease;
}
.auth-pw-toggle:hover{ color:var(--text); border-color:var(--border-strong); }

.auth-error{
  padding:11px 14px; border-radius:12px; font-size:13.5px; line-height:1.45;
  color:#ffd9d9; border:1px solid rgba(239,68,68,.45); background:rgba(239,68,68,.14);
}
html[data-theme="light"] .auth-error{ color:#a01818; }

body.crm-auth-page .auth-submit{
  margin-top:4px; min-height:52px; border-radius:14px; border:0; cursor:pointer;
  color:#fff; font-size:16px; font-weight:800; letter-spacing:.01em;
  background:linear-gradient(135deg, var(--accent), color-mix(in srgb,var(--accent) 55%, var(--accent-3) 45%));
  box-shadow:0 18px 40px rgba(47,99,235,.42);
  transition:transform .18s var(--ease), box-shadow .2s ease, filter .18s ease;
}
body.crm-auth-page .auth-submit:hover{ transform:translateY(-2px); box-shadow:0 24px 52px rgba(47,99,235,.55); filter:brightness(1.06); }
body.crm-auth-page .auth-submit:disabled{ opacity:.7; cursor:default; transform:none; }

.auth-card__back{ margin-top:16px; color:var(--muted); font-size:13.5px; font-weight:650; transition:color .18s ease; }
.auth-card__back:hover{ color:var(--text); }

/* ===== Согласие ПД (admin_consent_required) ===== */
.auth-links{ display:flex; flex-wrap:wrap; gap:8px; }
.auth-link{
  flex:1 1 auto; text-align:center; min-height:42px;
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:0 12px; border-radius:12px; font-size:13.5px; font-weight:650;
  color:var(--accent-ink); border:1px solid var(--border); background:var(--tile-2);
  transition:border-color .18s ease, color .18s ease;
}
.auth-link:hover{ color:var(--text); border-color:var(--border-strong); }

.auth-consent{
  display:flex; align-items:flex-start; gap:11px; cursor:pointer;
  padding:13px 14px; border-radius:14px;
  border:1px solid var(--border); background:var(--tile-2);
  font-size:13.5px; line-height:1.5; color:var(--muted);
}
.auth-consent input[type="checkbox"]{
  flex:0 0 auto; width:20px; height:20px; margin-top:1px; cursor:pointer; accent-color:var(--accent);
}

body.crm-auth-page .auth-ghost{
  min-height:46px; border-radius:14px; cursor:pointer;
  background:transparent; border:1px solid var(--border); color:var(--muted);
  font-size:14.5px; font-weight:700; transition:color .18s ease, border-color .18s ease;
}
body.crm-auth-page .auth-ghost:hover{ color:var(--text); border-color:var(--border-strong); }

@media (max-width:480px){
  body.crm-auth-page{ padding:16px; }
  body.crm-auth-page .auth-card{ padding:30px 22px 26px; border-radius:22px; }
  .auth-card__title{ font-size:22px; }
}

@media (prefers-reduced-motion: reduce){
  .crm-auth-page *,.crm-auth-page *::before,.crm-auth-page *::after{ animation:none !important; transition:none !important; }
  body.crm-auth-page{ background-attachment:scroll; }
}
