/* auth.css — "midnight lab / blueprint" theme
   Linked ONLY from login/main_login.php and login/signup.php.
   Overrides the shared css/main.css rules (loaded earlier) for those two pages. */

/* ---------- base ---------- */
body.auth-body {
  padding: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 620px at 12% -10%, rgba(64, 94, 255, 0.35), transparent 60%),
    radial-gradient(820px 560px at 106% 12%, rgba(32, 190, 220, 0.20), transparent 55%),
    radial-gradient(720px 720px at 50% 122%, rgba(94, 53, 226, 0.30), transparent 62%),
    linear-gradient(160deg, #0d1431 0%, #111c44 48%, #1b2a5e 100%);
  background-attachment: fixed;
}

/* blueprint grid, fading towards the edges */
body.auth-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(130, 158, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 158, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 95% 85% at 50% 42%, #000 35%, transparent 82%);
  mask-image: radial-gradient(ellipse 95% 85% at 50% 42%, #000 35%, transparent 82%);
}

/* ---------- sprite background layer ---------- */
.auth-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bg-glyph {
  position: absolute;
  color: #9fb4ff;
  pointer-events: none;
}

@keyframes auth-float {
  from { transform: translateY(-10px); }
  to   { transform: translateY(12px); }
}
@keyframes auth-swing {
  from { transform: rotate(-7deg); }
  to   { transform: rotate(7deg); }
}
@keyframes auth-spin {
  to   { transform: rotate(360deg); }
}
.g-float { animation: auth-float 9s ease-in-out infinite alternate; }
.g-swing { animation: auth-swing 7s ease-in-out infinite alternate; transform-origin: 50% 4%; }
.g-spin  { animation: auth-spin 110s linear infinite; }

/* per-glyph placement (viewport %) */
.g1 { top: 5%;    left: 7%;   width: 110px; height: 110px; opacity: 0.12; }
.g2 { top: 13%;   right: 9%;  width: 92px;  height: 92px;  opacity: 0.10; animation-delay: -3s; }
.g3 { top: 54%;   left: 5%;   width: 72px;  height: 72px;  opacity: 0.09; animation-delay: -5s; }
.g4 { bottom: 8%;  left: 74%;  width: 122px; height: 122px; opacity: 0.12; }
.g5 { bottom: 12%; left: 16%;  width: 84px;  height: 84px;  opacity: 0.08; animation-delay: -2s; }
.g6 { top: 3%;    left: 47%;  width: 62px;  height: 62px;  opacity: 0.08; animation-delay: -6s; }
.g7 { top: 36%;   right: 4%;  width: 60px;  height: 60px;  opacity: 0.09; }
.g8 { bottom: 4%;  left: 50%;  width: 54px;  height: 54px;  opacity: 0.08; animation-delay: -4s; }

/* ---------- card layout ---------- */
.auth-body .container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 14px calc(28px + env(safe-area-inset-bottom));
}
.auth-body .form-signin,
.auth-body .form-signup {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  padding: 34px 30px 26px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(4, 10, 34, 0.5), 0 2px 8px rgba(4, 10, 34, 0.28);
}

/* logo tile */
.auth-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #3b5bdb, #4f7cff 55%, #31c4f0);
  box-shadow: 0 10px 22px rgba(59, 91, 219, 0.40);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.auth-logo svg { width: 36px; height: 36px; }

/* heading */
.auth-body .form-signin .form-signin-heading,
.auth-body .form-signup .form-signup-heading {
  margin: 0 0 20px;
  font-size: 21px;
  line-height: 1.3;
  font-weight: 600;
  text-align: center;
  color: #101a3f;
}

/* ---------- inputs ---------- */
.auth-body .form-signin .form-control,
.auth-body .form-signup .form-control {
  height: 48px;
  padding: 0 14px;
  font-size: 16px; /* 16px = no iOS auto-zoom on focus */
  color: #101a3f;
  background-color: #f6f8ff;
  border: 1.5px solid #d5dcef;
  border-radius: 12px;
  box-shadow: none;
  margin-bottom: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.auth-body .form-signin input,
.auth-body .form-signup input {
  margin-bottom: 12px;
  border-radius: 12px;
}
.auth-body .form-control::placeholder { color: #8b96b8; opacity: 1; }
.auth-body .form-control:focus {
  background-color: #fff;
  border-color: #4f7cff;
  box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.16);
  outline: 0;
}
/* neutralise main.css green :required / pink :invalid borders */
.auth-body input:required { border: 1.5px solid #d5dcef; }
.auth-body input:required:invalid { border: 1.5px solid #d5dcef; }
/* jQuery Validation error state */
.auth-body input.error {
  border-color: #e5484d;
  background-color: #fff7f7;
}
.auth-body label.error {
  font-size: 13px;
  font-weight: 400;
  color: #d13438;
  margin: -6px 0 10px 2px;
}

/* ---------- buttons ---------- */
.auth-body .form-signin .btn,
.auth-body .form-signup .btn {
  margin-bottom: 10px;
  height: 48px;
  border-radius: 12px;
  font-size: 16px;
}
.auth-body #submit {
  border: none;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.2px;
  background: linear-gradient(135deg, #3b5bdb, #4f7cff 55%, #31c4f0);
  box-shadow: 0 8px 20px rgba(59, 91, 219, 0.35);
}
.auth-body #submit:hover,
.auth-body #submit:focus {
  color: #fff;
  background: linear-gradient(135deg, #3452c8, #4a78f2 55%, #2ab4de);
  box-shadow: 0 10px 24px rgba(59, 91, 219, 0.45);
}
.auth-body #submit:active { transform: translateY(1px); }
.auth-body #submit:disabled {
  background: #c6cede;
  box-shadow: none;
  color: #fff;
  cursor: not-allowed;
}
/* "Izveidot jaunu profilu" link on the login page → ghost button */
.auth-body #signup {
  background: transparent;
  border: 1.5px solid #b9c6ec;
  color: #2f4bb5;
  font-weight: 500;
  box-shadow: none;
}
.auth-body #signup:hover,
.auth-body #signup:focus {
  background: #eef2ff;
  border-color: #8fa5e8;
  color: #24409c;
}

/* ---------- alerts ---------- */
.auth-body .alert {
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 12px;
}
.auth-body .alert-info { background: #eef2ff; color: #31427c; }
.auth-body .alert-info a { color: #3b5bdb; }
.auth-body .alert-warning { background: #fff7e0; color: #7a5b00; }
.auth-body .alert-warning a { color: #8a5b00; font-weight: 600; }
.auth-body .alert-danger { background: #ffecec; color: #b3261e; }
.auth-body .alert-danger a { color: #b3261e; }
.auth-body .alert-success { background: #e7f8ee; color: #1c7a3d; }
.auth-body .alert .close { color: inherit; opacity: 0.5; margin-left: 8px; }

/* ---------- custom checkbox (Piekrītu) ---------- */
.auth-body .customcheck { font-size: 15px; color: #33406b; }
.auth-body .checkmark {
  background-color: #eef1fb;
  border: 1.5px solid #c9d3ee;
  border-radius: 7px;
}
.auth-body .customcheck:hover input ~ .checkmark { background-color: #e2e8f9; }
.auth-body .customcheck input:checked ~ .checkmark {
  background-color: #3b5bdb;
  border-color: #3b5bdb;
}

/* ---------- ajax loader ---------- */
.auth-body #message { text-align: center; }
.auth-body #message img { width: 28px; }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .g6, .g7, .g8 { display: none; }
  .bg-glyph { opacity: 0.07 !important; }
  .auth-body .form-signin,
  .auth-body .form-signup {
    padding: 26px 20px 20px;
    border-radius: 16px;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .bg-glyph { animation: none !important; }
}
