/* ============================================================
   LOGIN PAGE
   Source design : Login-Screen.html
   Target view   : Views/CirrusShield/Index.aspx  (Site1.Master)

   Selector map:
     .shell / .bg-decor         → .rowsec.login_form_container / .bg-decor
     .brand-panel               → .left-login-section
     .brand-copy / .brand-title → .brand-copy / .brand-title
     .brand-eyebrow             → .brand-eyebrow (.brand-dot inside)
     .brand-sub                 → .brand-sub
     .brand-feature-list        → .brand-feature-list / .brand-feature / .brand-feature-icon
     .form-panel + .form-inner  → form (passthrough) + #form-box.right-login-section
     .logo-row                  → #cirrus-shield-logo .logo-row
     .form-heading              → .form-heading (.form-title + .form-subtitle)
     .error-banner              → .editor-label-Err-Msg (.err-icon inside)
     .field / .field-label      → .editor-field.form-group / label.input-label
     .input-wrap / .input-icon  → .input-wrap / svg.input-icon
     .fi                        → input.editor-input-field (+ #Password override)
     .toggle-pw                 → button.toggle-password#toggleBtn
     .field-row                 → .login-field-row
     .remember / .cb-wrap       → .remember-label / .cb-wrap
     .forgot                    → a.forgot-pass-link
     .btn-login / .login-arrow  → button#login-button / svg.login-arrow
     .divider                   → .or-divider
     .btn-sso                   → button.sign-in-button
     .signup-row                → .signup-row
     .footer-copy               → .login-footer-copy

   !important annotations:
     (*1) input#Password { border:none }                        (custom.css:6449, id specificity)
     (*2) #login-button:hover { background:#3e82f7 !imp }      (custom.css:6488)
     (*3) h3 inline style="color:black"                        (Index.aspx)
     (*4) .editor-label-Err-Msg { background !imp }            (custom.css:4802)
     (*5) .sign-in-button { border/color/font-size !imp }      (custom.css:6610-6617)
     (*6) .input-wrap ::placeholder { font-size:18px }         (custom.css:1198)
   ============================================================ */

/* ── Font override (custom.css may override tokens.css globally) ── */
body.login-body,
body.login-body * {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

/* ── Body ── */
body.login-body {
  background: var(--bg-app);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 0 0;
  position: relative;
  overflow-x: hidden;
  color: var(--text-primary);
}

/* hide the master page generic footer on login — login has its own .login-footer-copy */
body.login-body #footer {
  display: none !important;
}

/* ── Background decoration ── */
body.login-body .bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
body.login-body .bg-decor::before {
  content: '';
  position: absolute;
  top: -15%; left: -8%;
  width: 50%; height: 60%;
  background: radial-gradient(circle, rgba(37,99,235,.06) 0%, transparent 70%);
}
body.login-body .bg-decor::after {
  content: '';
  position: absolute;
  bottom: -20%; right: -8%;
  width: 45%; height: 55%;
  background: radial-gradient(circle, rgba(66,133,244,.05) 0%, transparent 70%);
}

/* ── Shell card ── */
body.login-body .rowsec.login_form_container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1060px;
  display: flex;
  flex-direction: row;
  background: var(--bg-card);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  margin: 0 auto;
  height: auto;
  min-height: 660px;
  animation: loginShellIn 700ms var(--ease-out) both;
}

@keyframes loginShellIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Left brand panel ── */
body.login-body .left-login-section {
  flex: 0 0 44% !important;
  position: relative;
  background:
    radial-gradient(130% 110% at 100% 0%, rgba(255,255,255,.16) 0%, transparent 45%),
    radial-gradient(110% 90% at 0% 100%, rgba(15,40,140,.18) 0%, transparent 55%),
    linear-gradient(150deg, #4d8dfd 0%, var(--blue-600) 45%, #1e4fcf 100%);
  padding: 46px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  overflow: hidden;
  border-radius: 0;
  height: auto;
}

/* Dot grid texture */
body.login-body .left-login-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 15% 15%, black 0%, transparent 55%);
  -webkit-mask-image: radial-gradient(circle at 15% 15%, black 0%, transparent 55%);
  pointer-events: none;
}

/* ── Brand copy block ── */
body.login-body .brand-copy {
  position: relative;
  z-index: 2;
}

body.login-body .brand-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-bottom: 20px;
}

body.login-body .brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34A853;
  box-shadow: 0 0 8px #34A853;
  flex-shrink: 0;
  display: inline-block;
  margin-bottom: 0 !important;
}

body.login-body .brand-title {
  display: block;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.025em;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #fff 30%, rgba(255,255,255,.75) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.login-body .brand-sub {
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(255,255,255,.62);
  max-width: 400px;
  font-weight: 400;
  margin: 0;
}

/* ── Brand feature list ── */
body.login-body .brand-feature-list {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding-top: 26px;
  margin-top: 26px;
  border-top: 1px solid rgba(255,255,255,.10);
}

body.login-body .brand-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: rgba(255,255,255,.72);
  font-weight: 500;
}

body.login-body .brand-feature-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.08);
}

body.login-body .brand-feature-icon svg {
  width: 11px;
  height: 11px;
  color: rgba(255,255,255,.85);
}

/* ── Form: Html.BeginForm() flex passthrough ── */
body.login-body .rowsec.login_form_container > form {
  flex: 1;
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
}

body.login-body .validation-summary-valid,
body.login-body .validation-summary-errors {
  display: none !important;
}

/* ── Right form panel ── */
body.login-body #form-box.right-login-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 56px;
  background: var(--bg-card);
  border-radius: 0;
}

/* ── Logo ── */
body.login-body #cirrus-shield-logo.form_logo {
  background: none;
  height: auto;
  width: auto;
  margin-bottom: 12px;
  text-align: center;
}

body.login-body #cirrus-shield-logo.form_logo img {
  height: 38px;
  width: auto;
}

/* ── Inner form section ── */
body.login-body .rowsec.form_field_section {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
}

/* ── Form heading ── */
body.login-body .form-heading {
  text-align: center;
  margin-bottom: 18px;
}

body.login-body .form-title {
  font-size: 18.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
  letter-spacing: -.01em;
}

/* keep for any h3 fallback */
body.login-body .form_field_section h3 {
  font-size: 18.5px;
  font-weight: 700;
  color: var(--text-primary) !important; /* (*3) inline style="color:black" */
  letter-spacing: -.01em;
  margin-bottom: 5px;
  margin-top: 0;
}

body.login-body .form-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ── Error messages ── */
body.login-body .editor-label-Err-Msg {
  position: static !important;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 13px;
  border-radius: var(--r-md);
  background: var(--red-bg) !important; /* (*4) */
  border: 1px solid var(--red-border);
  font-size: 12.5px;
  color: #991b1b;
  line-height: 1.5;
  margin: 0 0 10px !important;
}

body.login-body .err-icon {
  flex-shrink: 0;
  color: var(--red);
  margin-top: 1px;
}

@keyframes loginShake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-4px); }
  40%      { transform: translateX(4px); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX(3px); }
}

/* ── Field groups ── */
body.login-body .editor-field.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  font-size: inherit;
  color: inherit;
  position: static;
}

.login_form_container form #form-box .editor-field {
  margin-bottom: 0 !important;
}

.login_form_container form #form-box .editor-field.editor-field-pass.form-group {
  margin-bottom: 10px !important;
}

/* ── Field labels ── */
body.login-body label.input-label.login-input-fields {
  display: block !important;
  position: relative !important;
  top: 0 !important;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

/* ── Input wrap (icon + input) ── */
body.login-body .input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

body.login-body svg.input-icon {
  position: absolute;
  left: 13px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
  transition: color var(--t-fast);
  z-index: 1;
}

body.login-body .input-wrap:focus-within svg.input-icon {
  color: var(--blue-600);
}

/* ── Inputs ── */
body.login-body input.editor-input-field,
body.login-body .form-group input[type="text"],
body.login-body .form-group input[type="password"],
body.login-body .password-wrapper input[type="password"] {
  width: 100%;
  padding: 12px 14px 12px 40px; /* 40px left for icon */
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13.5px;
  color: var(--text-primary);
  background: var(--bg-muted);
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  /* user-reported: hovering Username/Password showed a pointer cursor. custom.css has two
     competing generic `input[type="text"]`/`input[type="password"]` rules (one cursor:text, one
     cursor:pointer meant for .cusel-style dropdown triggers bundled into the same selector list)
     — the pointer one comes later in the file and wins app-wide (same root cause already fixed
     for the list-view search box, list-view.css). Per redesign-workflow.md rule 4 ("never modify
     custom.css"), overriding here instead. */
  cursor: text !important;
}

/* (*1) input#Password has ID specificity — override with body+ID */
body.login-body #Password {
  border: 1.5px solid var(--border) !important;
  background: var(--bg-muted);
  padding-right: 42px; /* room for eye toggle */
}

/* (*6) .input-wrap ::placeholder { font-size: 18px } (custom.css:1198) — must override */
body.login-body input.editor-input-field::placeholder,
body.login-body .form-group input::placeholder,
body.login-body .password-wrapper input::placeholder,
body.login-body .input-wrap input::placeholder {
  color: var(--text-muted) !important;
  font-size: 13.5px !important;
}

body.login-body input.editor-input-field:hover,
body.login-body .form-group input[type="text"]:hover,
body.login-body .form-group input[type="password"]:hover {
  border-color: var(--border-strong);
}

body.login-body input.editor-input-field:focus,
body.login-body .form-group input[type="text"]:focus,
body.login-body .form-group input[type="password"]:focus,
body.login-body #Password:focus {
  border-color: var(--border-focus) !important;
  background: var(--bg-card) !important;
  box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}

/* ── Password wrapper ── */
body.login-body .password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  border: none;
  border-radius: 0;
}

/* Lock icon inside password-wrapper */
body.login-body .password-wrapper svg.input-icon {
  position: absolute;
  left: 13px;
  pointer-events: none;
}

/* ── Eye / toggle-password button ── */
body.login-body button.toggle-password {
  position: absolute;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: background var(--t-fast), color var(--t-fast);
}

body.login-body button.toggle-password:hover {
  background: var(--blue-50);
  color: var(--blue-600);
}

body.login-body .field-validation-valid {
  display: none;
}

/* ── Remember me + Forgot password row ── */
body.login-body .login-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  margin-top: 4px;
  gap: 8px;
}

body.login-body .remember-label {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-secondary);
  user-select: none;
}

body.login-body .cb-wrap {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-card);
  transition: background var(--t-fast), border-color var(--t-fast);
}

body.login-body .cb-wrap svg {
  width: 10px;
  height: 10px;
  color: #fff;
  opacity: 0;
  transition: opacity var(--t-fast);
}

body.login-body .cb-wrap.cb-checked {
  background: var(--blue-600);
  border-color: var(--blue-600);
}

body.login-body .cb-wrap.cb-checked svg {
  opacity: 1;
}

body.login-body .forget-button-margin {
  display: flex;
  align-items: center;
  margin: 0;
}

body.login-body a.forgot-pass-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue-600);
  text-decoration: none;
  display: inline;
  margin: 0;
  transition: color var(--t-fast);
}

body.login-body a.forgot-pass-link:hover {
  color: var(--blue-700);
  text-decoration: underline;
}

/* ── Submit area ── */
body.login-body .submit_form_lg {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 10px;
}

/* ── Login button ── */
body.login-body #login-button {
  width: 100%;
  padding: 13px;
  border-radius: var(--r-md);
  background: var(--blue-600);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37,99,235,.32);
  transition: background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

body.login-body #login-button:hover {
  background: var(--blue-700) !important; /* (*2) */
  box-shadow: 0 6px 20px rgba(37,99,235,.4);
  transform: translateY(-1px);
  color: #fff;
}

body.login-body #login-button:active {
  transform: translateY(0) scale(.99);
}

body.login-body #login-button font {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  vertical-align: baseline;
}

body.login-body svg.login-arrow {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform var(--t-fast);
}

body.login-body #login-button:hover svg.login-arrow {
  transform: translateX(2px);
}

/* ── Or divider ── */
body.login-body .or-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  width: 100%;
}

body.login-body .or-divider hr {
  flex: 1;
  height: 1px;
  background: var(--border);
  border: none;
  margin: 0;
}

body.login-body .or-divider span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
}

/* ── SSO / Microsoft button ── */
body.login-body button.sign-in-button {
  width: 100%;
  padding: 11px;
  border-radius: var(--r-md);
  background: var(--bg-card);
  border: 1.5px solid var(--border) !important; /* (*5) */
  font-size: 13px !important;
  text-transform: none !important;
  font-family: inherit;
  cursor: pointer !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-secondary) !important; /* (*5) */
  font-weight: 600;
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}

body.login-body button.sign-in-button:hover {
  background: var(--bg-muted);
  border-color: var(--border-strong) !important;
  box-shadow: var(--shadow-sm);
}

body.login-body button.sign-in-button a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: inherit;
  font-weight: inherit;
}

body.login-body button.sign-in-button svg {
  flex-shrink: 0;
}

/* ── Signup row ── */
body.login-body .signup-row {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 0;
}

body.login-body .signup-row a {
  color: var(--blue-600);
  font-weight: 600;
  text-decoration: none;
}

body.login-body .signup-row a:hover {
  text-decoration: underline;
}

/* ── Footer ── */
body.login-body .login-footer-copy {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
}

#footer {
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 16px;
  background: transparent;
  border: none;
}

/* ── Responsive — tablet / large phone: hide left panel ── */
@media (max-width: 768px) {
  body.login-body {
    padding: 0;
  }
  body.login-body .left-login-section {
    display: none;
  }
  body.login-body .rowsec.login_form_container {
    max-width: 480px;
    min-height: 0;
  }
  body.login-body #form-box.right-login-section {
    padding: 40px 44px 44px;
    border-radius: var(--r-2xl);
  }
  body.login-body .login-footer-copy {
    display: block;
  }
}

/* ── Responsive — phone: centered card ── */
@media (max-width: 520px) {
  body.login-body .rowsec.login_form_container {
    min-height: 0;
  }
  body.login-body #form-box.right-login-section {
    padding: 36px 20px 32px;
    border-radius: var(--r-2xl);
  }
  body.login-body .rowsec.form_field_section {
    max-width: 100%;
  }
  body.login-body input.editor-input-field,
  body.login-body .form-group input[type="text"],
  body.login-body .form-group input[type="password"] {
    font-size: 16px; /* prevents iOS zoom on focus */
  }
  body.login-body .login-footer-copy {
    display: block;
    padding: 0;
    margin-top: 28px;
  }
}

/* ── Short viewports (landscape phones) ── */
@media (max-height: 700px) and (min-width: 521px) {
  body.login-body .rowsec.login_form_container { min-height: 0; }
  body.login-body { padding: 16px; }
}
