/* KONUM: CodeAndSystems.GateCore.Portal\wwwroot\css\portal-login.css
   GateCore CRM customer portal - sign in, forgot password.
   This is the stylesheet of the previous CRM's client sign-in page (login.php and
   forgot_password.php), taken over rule for rule: same colours, same grid and glows,
   same entrance, float, halo and drift animations. Only the rules for widgets that no
   longer exist (the old theme's select widget and reCAPTCHA) were left out. */
/* ============================================================
   CODE AND SYSTEMS - Client portal sign in
   Visual layer only. All fields, hooks and PHP calls kept.
   ============================================================ */

html, body { height: auto !important; margin: 0 !important; padding: 0 !important; }
body { overflow: hidden; background: #05060a !important; }

.cs-login, .cs-login * { box-sizing: border-box; }

.cs-login {
  position: fixed;
  inset: 0;
  z-index: 9990;
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
  background: #05060a;
  color: #eeedfe;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.cs-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 880px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 40px 32px;
  display: grid;
  grid-template-columns: 1fr 372px;
  gap: 26px;
  align-items: center;
}

/* ---------- Background ---------- */
.cs-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cs-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(83, 74, 183, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 74, 183, 0.13) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 0%, transparent 78%);
}
.cs-glow {
  position: absolute;
  width: 820px; height: 820px;
  left: 4%; bottom: -420px;
  background: radial-gradient(circle, rgba(83, 74, 183, 0.42), transparent 62%);
  filter: blur(16px);
  animation: csDrift 18s ease-in-out infinite;
}
.cs-glow2 {
  position: absolute;
  width: 620px; height: 620px;
  right: 10%; top: -300px;
  background: radial-gradient(circle, rgba(43, 111, 212, 0.28), transparent 62%);
  filter: blur(20px);
  animation: csDrift 22s ease-in-out infinite reverse;
}
@keyframes csDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(5%, -4%, 0) scale(1.09); }
}
@keyframes csPulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}
@keyframes csRise {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes csFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -9px, 0); }
}
@keyframes csFloatSoft {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -5px, 0); }
}

.cs-anim { opacity: 0; animation: csRise .75s cubic-bezier(.2,.8,.2,1) forwards; }
.cs-anim.d1 { animation-delay: .05s; }
.cs-anim.d2 { animation-delay: .16s; }
.cs-anim.d3 { animation-delay: .27s; }
.cs-anim.d4 { animation-delay: .38s; }
.cs-anim.d5 { animation-delay: .49s; }

.cs-bg, .cs-left, .cs-right {
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}

/* Reduced motion: everything must still be visible.
   The card starts at opacity 0 and is faded in by csRise, so switching its
   animation off without restoring opacity leaves it invisible for good -
   which is exactly what hid the sign in box. Same for the halo. */
@media (prefers-reduced-motion: reduce) {
  .cs-glow, .cs-glow2, .cs-card, .cs-lockup, .cs-status { animation: none !important; }
  .cs-anim { opacity: 1; animation: none !important; }
  .cs-card { opacity: 1 !important; transform: none !important; }
  .cs-card::before { animation: none !important; opacity: .85 !important; }
  .cs-bg, .cs-left, .cs-right { transition: none !important; transform: none !important; }
}

/* Belt and braces: if animations are unavailable for any other reason
   (an extension, a policy, an old engine), never leave the card hidden. */
@supports not (animation-name: csRise) {
  .cs-anim { opacity: 1 !important; }
  .cs-card { opacity: 1 !important; }
}

/* ---------- Left ---------- */
.cs-left { display: flex; flex-direction: column; justify-content: center; gap: 26px; }
.cs-lockup {
  display: flex; align-items: center; gap: 13px;
  animation: csFloatSoft 9s ease-in-out 1.4s infinite;
}
.cs-mark {
  width: 42px; height: 42px; flex: none;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(126, 74, 196, 0.35), rgba(43, 111, 212, 0.3));
  border: 1px solid rgba(126, 74, 196, 0.6);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700; font-size: 13px; color: #cecbf6; letter-spacing: .5px;
}
.cs-lockup-text .cs-org {
  font-size: 13px; font-weight: 600; letter-spacing: 1.4px;
  color: #eeedfe; text-transform: uppercase;
}
.cs-lockup-text .cs-portal {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; letter-spacing: 2.4px; color: #7f77dd; margin-top: 3px;
}
.cs-status {
  animation: csFloatSoft 8s ease-in-out 2s infinite;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(159, 225, 203, 0.32);
  background: rgba(159, 225, 203, 0.07);
  border-radius: 30px; padding: 5px 13px; width: fit-content;
}
.cs-status i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #9fe1cb; display: inline-block;
  animation: csPulse 2.2s ease-in-out infinite;
}
.cs-status span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 1.5px; color: #9fe1cb;
}
.cs-headline {
  font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.03; letter-spacing: -1.2px;
  color: #fff; margin: 0;
}
.cs-headline span { color: #8d8bd6; }
.cs-sub {
  font-size: 14.5px; line-height: 1.65;
  color: #8a8a94; margin: 0; max-width: 38ch;
}
.cs-list { display: flex; flex-direction: column; gap: 9px; padding-top: 2px; }
.cs-list-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: #8a8a94;
}
.cs-list-item svg { flex: none; }

/* ---------- Right: card ---------- */
.cs-right { display: flex; align-items: center; justify-content: center; }
.cs-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  opacity: 0;
  animation: csRise .8s cubic-bezier(.2,.8,.2,1) .2s forwards,
             csFloat 7.5s ease-in-out 1.1s infinite;
  background: rgba(13, 14, 22, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(126, 74, 196, 0.45);
  border-radius: 18px;
  padding: 32px 30px 26px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04),
    0 30px 70px rgba(0,0,0,.6),
    0 0 40px rgba(126,74,196,.22),
    0 0 90px rgba(83,74,183,.16);
}
/* Soft halo behind the card - kept gentle, no neon */
.cs-card::before {
  content: "";
  position: absolute;
  inset: -28px;
  border-radius: 32px;
  background: radial-gradient(60% 55% at 50% 45%, rgba(126,74,196,.20), transparent 72%);
  filter: blur(22px);
  z-index: -1;
  pointer-events: none;
  animation: csHalo 6s ease-in-out infinite;
}
@keyframes csHalo {
  0%, 100% { opacity: .75; }
  50%      { opacity: 1; }
}
.cs-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 2px; color: #7f77dd; margin-bottom: 7px;
}
.cs-title {
  font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
  font-weight: 700; font-size: 23px; color: #fff; margin: 0 0 22px;
}

.cs-login .form-group { margin-bottom: 15px; padding: 0; text-align: left; }
.cs-login .form-group label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 400;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: #5a5a66; margin-bottom: 7px;
}
.cs-login .form-control {
  width: 100% !important;
  height: auto !important;
  font-family: 'Inter', sans-serif;
  font-size: 14px !important;
  color: #eeedfe !important;
  background: rgba(255,255,255,.045) !important;
  border: 1px solid rgba(255,255,255,.13) !important;
  border-radius: 10px !important;
  padding: 13px 14px !important;
  outline: none !important;
  box-shadow: none !important;
  transform: none !important;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.cs-login .form-control::placeholder { color: #4d4d57 !important; }
.cs-login .form-control:hover { border-color: rgba(255,255,255,.26) !important; }
.cs-login .form-control:focus {
  background: rgba(255,255,255,.07) !important;
  border-color: #7e4ac4 !important;
  box-shadow: 0 0 0 4px rgba(126,74,196,.2) !important;
}

/* password reveal */
.cs-pass-wrap { position: relative; }
.cs-pass-wrap .form-control { padding-right: 46px !important; }
.cs-reveal {
  position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; padding: 8px;
  cursor: pointer; color: #63636e; line-height: 0;
}
.cs-reveal:hover { color: #cecbf6; }

/* Remember me: checkbox and label centred on the same line. */
.cs-login .checkbox {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  text-align: left;
  position: static !important;
  line-height: 1;
}
.cs-login .checkbox input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  position: static !important;
  float: none !important;
  opacity: 1 !important;
  display: block !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,.28) !important;
  border-radius: 4px !important;
  background: rgba(255,255,255,.05);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.cs-login .checkbox input[type="checkbox"]:hover { border-color: rgba(175,169,236,.6) !important; }
.cs-login .checkbox input[type="checkbox"]:checked {
  border-color: transparent !important;
  background-image:
    linear-gradient(135deg, #7e4ac4, #2b6fd4),
    url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: cover, 10px 10px;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
.cs-login .checkbox input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(126,74,196,.3);
}
/* the theme paints its own box on the label - switch it off */
.cs-login .checkbox label::before,
.cs-login .checkbox label::after { content: none !important; display: none !important; }
.cs-login .checkbox label {
  display: flex !important;
  align-items: center !important;
  height: 15px !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  font-family: 'Inter', sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: #8a8a94 !important;
  position: static !important;
  top: auto !important;
}

/* buttons */
.cs-login .btn-primary {
  display: block; width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 600; letter-spacing: .3px;
  color: #fff !important;
  background: linear-gradient(135deg, #7e4ac4 0%, #2b6fd4 100%) !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 14px !important;
  cursor: pointer; text-align: center; text-decoration: none !important;
  box-shadow: 0 10px 26px rgba(83,74,183,.3);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.cs-login .btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: 0 14px 32px rgba(43,111,212,.35);
}
.cs-login .btn-success {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 600;
  padding: 12px !important;
  border: 1px solid rgba(175,169,236,.32) !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.04) !important;
  color: #cec9f2 !important;
  text-decoration: none !important;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.cs-login .btn-success:hover {
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(175,169,236,.6) !important;
  transform: translateY(-1px);
  color: #fff !important;
}

.cs-login .forgot-password {
  display: block; text-align: center; margin-top: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; letter-spacing: 1.2px;
  color: #7f77dd; text-decoration: none;
}
.cs-login .forgot-password:hover { color: #cecbf6; text-decoration: underline; }

/* validation errors from Perfex */
.cs-login .text-danger, .cs-login .help-block {
  display: block; margin-top: 6px;
  font-size: 12px; color: #fca5a5 !important;
}

/* footer: language + staff link */
.cs-foot {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.07);
}
/* ---- Language picker (native select, fully styled) ---- */
.cs-foot-row {
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.cs-foot-label {
  display: flex; align-items: center; gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase;
  color: #5a5a66;
}
.cs-foot-label svg { flex: none; opacity: .8; }

.cs-select-wrap { position: relative; width: 132px; }
.cs-login select.cs-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: auto !important;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px !important;
  color: #cec9f2 !important;
  background: rgba(255,255,255,.045) !important;
  border: 1px solid rgba(255,255,255,.13) !important;
  border-radius: 9px !important;
  padding: 8px 30px 8px 11px !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237f77dd' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  transition: border-color .18s ease, background-color .18s ease;
}
.cs-login select.cs-select::-ms-expand { display: none; }
.cs-login select.cs-select:hover {
  border-color: rgba(175,169,236,.45) !important;
  background-color: rgba(255,255,255,.07) !important;
}
.cs-login select.cs-select:focus {
  border-color: #7e4ac4 !important;
  box-shadow: 0 0 0 3px rgba(126,74,196,.2) !important;
}
.cs-login select.cs-select option {
  background: #14121f;
  color: #cec9f2;
  font-size: 13px;
}

.cs-staff {
  display: block; text-align: center; margin-top: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px; letter-spacing: 1.2px;
  color: #4d4d57; text-decoration: none;
}
.cs-staff:hover { color: #7f77dd; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cs-shell {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 40px 26px 44px;
    align-items: start;
    max-width: 560px;
  }
  .cs-left { gap: 18px; }
  .cs-headline { font-size: clamp(30px, 8vw, 42px); }
  .cs-sub { max-width: none; font-size: 14px; }
  .cs-card { max-width: 100%; }
  .cs-grid {
    mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 70%);
  }
}
@media (max-width: 560px) {
  .cs-shell { padding: 28px 18px 38px; gap: 20px; }
  .cs-left { gap: 15px; }
  .cs-list { display: none; }
  .cs-sub { font-size: 13.5px; }
  .cs-card { padding: 26px 20px 22px; border-radius: 16px; }
  .cs-title { font-size: 21px; margin-bottom: 18px; }
  }
@media (max-height: 700px) and (min-width: 1081px) {
  .cs-shell { padding: 28px 32px; }
  .cs-left { gap: 18px; }
  .cs-headline { font-size: clamp(28px, 3.2vw, 38px); }
}

/* ---------- from forgot_password.php ---------- */
.cs-steps { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }
.cs-step {
  display: flex; align-items: center; gap: 11px;
  font-size: 13px; color: #8a8a94;
}
.cs-step b {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 1.2px; color: #7f77dd;
  border: 1px solid rgba(126, 74, 196, 0.45);
  background: rgba(126, 74, 196, 0.12);
  border-radius: 7px;
  width: 24px; height: 24px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.cs-card-sub {
  font-size: 13px; line-height: 1.6; color: #8a8a94; margin: 0 0 22px;
}
.cs-login .alert {
  border-radius: 10px !important;
  font-size: 13px !important;
  padding: 11px 14px !important;
  margin-bottom: 16px !important;
  text-align: left !important;
  background: rgba(239,68,68,.12) !important;
  border: 1px solid rgba(239,68,68,.4) !important;
  color: #fca5a5 !important;
}
.cs-login .alert.ok {
  background: rgba(159,225,203,.08) !important;
  border-color: rgba(159,225,203,.35) !important;
  color: #9fe1cb !important;
}
.cs-back { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.07); }
.cs-back-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px;
  border: 1px solid rgba(175,169,236,.32);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  color: #cec9f2 !important;
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 600;
  text-decoration: none !important;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.cs-back-btn:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(175,169,236,.6);
  transform: translateY(-1px);
  color: #fff !important;
}
.cs-help {
  display: block; text-align: center; margin-top: 13px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px; letter-spacing: 1.2px;
  color: #4d4d57; text-decoration: none;
}
.cs-help:hover { color: #7f77dd; }
.cs-contact { font-size: 13.5px; line-height: 1.9; color: #cec9f2; margin: 0 0 6px; }
.cs-contact a { color: #afa9ec; text-decoration: none; }
.cs-contact a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 560px) { .cs-steps { display: none; } }

/* ---------- forgot password form and /Reset ---------- */
.cs-contact-small { font-size: 12px; line-height: 1.7; color: #8a8a94; margin: 18px 0 0; }
.cs-contact-small a { margin-left: 4px; }
.cs-rules { font-size: 12px; line-height: 1.6; color: #8a8a94; margin: -6px 0 16px; text-align: left; }
.cs-for { font-size: 13px; color: #cec9f2; margin: 0 0 18px; overflow-wrap: anywhere; }
.cs-for b { color: #fff; font-weight: 600; }
