/* The sign-in page, after Sarrdeh's: the logo and «Sarrdeh Call Center» on one side, a glass panel
   with a light falling on its top edge on the other. Uses cc.css's colours, fonts and fields. */

body.login { min-block-size: 100dvh; overflow-x: hidden; }

.login-glow {
  position: absolute;
  inset-inline-end: -80px;
  inset-block-end: -80px;
  inline-size: 420px;
  block-size: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(87 182 178 / 0.35) 0%, transparent 65%);
  filter: blur(40px);
}
:root[data-theme="light"] .login-glow { opacity: 0.4; }
.login-mark { inset-inline-end: auto; inset-inline-start: 2vw; }

.login-theme { position: fixed; inset-block-start: 18px; inset-inline-end: 18px; z-index: 5; }

.login-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(48px, 9vw, 120px);
  min-block-size: 100dvh;
  max-inline-size: 1200px;
  margin-inline: auto;
  padding: 40px 24px;
}

.login-brand {
  order: 2;
  display: grid;
  justify-items: center;
  gap: 36px;
  inline-size: min(440px, 40vw);
}
.login-logo { inline-size: clamp(150px, 15vw, 204px); block-size: auto; filter: var(--logo-filter); }
.login-tagline {
  font-family: "Callite", var(--font);
  font-size: clamp(2.5rem, 4.4vw, 4rem);
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
}

.login-panel {
  position: relative;
  display: grid;
  gap: 32px;
  inline-size: min(480px, 100%);
  padding: 56px 40px 32px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.32);
  border-radius: 16px;
  background: rgb(4 7 7 / 0.55);
  backdrop-filter: blur(40px);
  box-shadow: 0 16px 48px rgb(0 0 0 / 0.55);
}
:root[data-theme="light"] .login-panel { border-color: var(--line); background: #ffffff; box-shadow: var(--shadow); }

/* the light on the panel's top edge */
.login-light {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  margin-inline: auto;
  inline-size: 46%;
  block-size: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--brand-teal);
  box-shadow: 0 0 24px 6px rgb(87 182 178 / 0.55), 0 0 90px 40px rgb(87 182 178 / 0.18);
}
:root[data-theme="light"] .login-light { background: var(--brand-green); box-shadow: 0 0 22px 4px rgb(7 102 98 / 0.25); }

.login-panel-logo { display: none; justify-self: center; inline-size: 64px; block-size: auto; filter: var(--logo-filter); }

.login-panel h1 { font-size: 1.375rem; font-weight: 500; line-height: 1.5; text-align: center; }

.login-form { display: grid; gap: 20px; }
.login-form label { color: var(--text-2); font-weight: 400; font-size: 0.9375rem; }
/* typed left to right (dir="ltr"), shown from the right edge like the rest of the page */
.login-form input:not([type="checkbox"]) { min-block-size: 48px; text-align: end; letter-spacing: 0.02em; }

/* the eye stays on the left (the end of the right-to-left box); the text, shown from the right, keeps
   clear of it: in the left-to-right field that side is its start */
.password-box { position: relative; }
#login-password { padding-inline-start: 48px; padding-inline-end: 12px; }  /* by id: the general field rule must not win */
.eye {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 6px;
  margin-block: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 36px;
  block-size: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}
.eye:hover { color: var(--text); }
.eye[aria-pressed="false"] .eye-closed,
.eye[aria-pressed="true"] .eye-open { display: none; }

.remember { font-size: 0.9375rem; color: var(--text-2); min-block-size: 32px; }
.remember input { inline-size: 16px; block-size: 16px; }

.login-error { min-block-size: 1.4em; color: var(--danger-ink); font-size: 0.875rem; text-align: center; }
.login-error:empty { min-block-size: 0; display: none; }

.login-submit {
  inline-size: 100%;
  min-block-size: 50px;
  border-color: #ffffff;
  background: #ffffff;
  color: var(--brand-green);
  font-size: 1.0625rem;
  font-weight: 600;
}
.login-submit:hover { background: rgb(255 255 255 / 0.9); }
:root[data-theme="light"] .login-submit { border-color: var(--brand-green); background: var(--brand-green); color: #fff; }
:root[data-theme="light"] .login-submit:hover { background: var(--brand-green-hover); }

.login-foot { color: var(--text-3); font-size: 0.75rem; text-align: center; }

@media (max-width: 899.98px) {
  .login-brand { display: none; }
  .login-panel-logo { display: block; }
  .login-panel { padding: 44px 22px 24px; gap: 24px; }
  .login-panel h1 { font-size: 1.125rem; }
  .login-mark { opacity: calc(var(--mark-opacity) * 0.5); }
}
