/* Isolated authentication shell. Keep login visuals here as the single source. */
html.auth-lock,
html.auth-lock body,
body.is-logged-out {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: var(--app-vh, 100dvh);
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  scrollbar-gutter: auto;
  background: #eef3f8;
}

body.is-logged-out #main-portal-content,
body.is-logged-out #left-sidebar,
body.is-logged-out #mobile-sidebar-backdrop,
body.is-logged-out #mobile-chat-toggle,
body.is-logged-out #global-notes-widget,
body.is-logged-out .sidebar-right,
body.is-logged-out .sidebar-right-expandable,
body.is-logged-out .mobile-nav-toggle,
body.is-logged-out .mobile-chat-toggle,
body.is-logged-out .global-notes-widget,
body.is-logged-out .global-notes-panel,
body.is-logged-out .client-home-actions-stack,
body.is-logged-out .client-home-avatar-block,
body.is-logged-out .assigned-work-avatar-wrap {
  display: none;
  visibility: hidden;
  pointer-events: none;
}

@media (min-width: 901px) {
  #login-view.auth-shell .auth-card {
    zoom: 0.85;
  }

  @supports not (zoom: 1) {
    #login-view.auth-shell .auth-card {
      transform: scale(0.85);
      transform-origin: center;
    }
  }
}

body.is-logged-out .modal-overlay:not(.login-alert-modal):not(.kvkk-policy-modal),
body.is-logged-out .detay-modal-wrapper,
body.is-logged-out .simple-prompt-modal,
body.is-logged-out #delete-confirm-modal,
body.is-logged-out #close-confirm-modal,
body.is-logged-out #custom-prompt-modal,
body.is-logged-out #calendar-note-modal,
body.is-logged-out #custom-confirm-modal:not(.login-alert-modal) {
  display: none;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

#login-view.auth-shell {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  width: 100vw;
  height: var(--app-vh, 100dvh);
  overflow: hidden;
  padding: clamp(16px, 3dvh, 32px);
  box-sizing: border-box;
  font-family: 'DM Sans', Arial, sans-serif;
  scrollbar-width: none;
  background:
    radial-gradient(circle at 74% 14%, rgba(205, 181, 146, 0.48) 0%, rgba(205, 181, 146, 0.16) 22%, transparent 48%),
    radial-gradient(circle at 22% 18%, rgba(7, 31, 79, 0.18) 0%, rgba(7, 31, 79, 0.08) 25%, transparent 50%),
    linear-gradient(132deg, #edf3f9 0%, #f7f9fb 42%, #f2eadc 100%);
}

#login-view.auth-shell.hidden,
body:not(.is-logged-out) #login-view.auth-shell {
  display: none;
}

body.is-logged-out #login-view.auth-shell {
  display: grid;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

#login-view.auth-shell::before,
#login-view.auth-shell::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

#login-view.auth-shell::before {
  inset: 0;
  background:
    linear-gradient(115deg, rgba(7, 31, 79, 0.18), transparent 28%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.16) 0 1px, transparent 1px 6px);
  mix-blend-mode: multiply;
  opacity: 0.42;
}

#login-view.auth-shell::after {
  width: min(620px, 46vw);
  aspect-ratio: 1.72 / 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #d7bc74 0%, #a88432 100%);
  opacity: 0.105;
  -webkit-mask: url("logo.png?v=brand-20260630a") center / contain no-repeat;
  mask: url("logo.png?v=brand-20260630a") center / contain no-repeat;
}

#login-view.auth-shell::-webkit-scrollbar,
#login-view.auth-shell *::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

#login-view.auth-shell,
#login-view.auth-shell * {
  box-sizing: border-box;
  letter-spacing: 0;
}

#login-view.auth-shell .auth-card {
  position: relative;
  z-index: 1;
  width: min(430px, calc(100vw - 32px));
  max-height: calc(var(--app-vh, 100dvh) - 32px);
  overflow: auto;
  padding: clamp(20px, 3.4vw, 30px);
  border: 3px solid #10224d;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: #071f4f;
  box-shadow:
    0 28px 80px rgba(15, 23, 42, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

#login-view.auth-shell .auth-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0 0 clamp(16px, 3dvh, 24px);
  padding: clamp(16px, 3vw, 22px);
  border: 2px solid rgba(16, 34, 77, 0.88);
  border-radius: 15px;
  background:
    radial-gradient(circle at 50% 0%, rgba(205, 181, 146, 0.34), transparent 64%),
    linear-gradient(180deg, #fffdf7 0%, #f6edde 100%);
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(197, 170, 100, 0.55);
}

#login-view.auth-shell .auth-head::before {
  content: "";
  display: block;
  width: min(238px, 68vw);
  aspect-ratio: 1.72 / 1;
  margin: 0;
  background: linear-gradient(180deg, #d7bc74 0%, #a88432 100%);
  -webkit-mask: url("logo.png?v=brand-20260630a") center / contain no-repeat;
  mask: url("logo.png?v=brand-20260630a") center / contain no-repeat;
  filter: drop-shadow(0 10px 20px rgba(7, 31, 79, 0.20)) drop-shadow(0 2px 0 rgba(255, 255, 255, 0.42));
}

#login-view.auth-shell .auth-logo {
  display: none;
}

#login-view.auth-shell .auth-title {
  margin: 4px 0 0;
  color: #071f4f;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 950;
  text-transform: uppercase;
}

#login-view.auth-shell .auth-subtitle,
#login-view.auth-shell .auth-footer-note,
#login-view.auth-shell .auth-footer-version {
  margin: 0;
  color: #64748b;
  font-size: 10px;
  line-height: 1.35;
  font-weight: 800;
}

#login-view.auth-shell .auth-subtitle {
  color: #50617c;
}

#login-view.auth-shell .auth-form {
  display: grid;
  gap: clamp(12px, 2dvh, 17px);
  margin: 0;
}

#login-view.auth-shell .auth-field label,
#login-view.auth-shell #login-security-question-label {
  display: block;
  margin: 0 0 6px;
  color: #071f4f;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 950;
  text-transform: uppercase;
}

#login-view.auth-shell .auth-input {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1.5px solid rgba(7, 31, 79, 0.18);
  border-radius: 11px;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
  color: #071f4f;
  -webkit-text-fill-color: #071f4f;
  font-size: 14px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

#login-view.auth-shell .auth-input:focus {
  border-color: #cdb592;
  box-shadow: 0 0 0 4px rgba(205, 181, 146, 0.22), inset 0 1px 0 rgba(255,255,255,0.9);
}

#login-view.auth-shell .auth-checks {
  display: grid;
  gap: 10px;
  margin: 0;
}

#login-view.auth-shell .auth-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 0;
  cursor: pointer;
}

#login-view.auth-shell .auth-check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: #cdb592;
}

#login-view.auth-shell .auth-check span,
#login-view.auth-shell .auth-check a,
#login-view.auth-shell #kvkk-remember-note {
  color: #334155;
  font-size: 10px;
  line-height: 1.35;
  font-weight: 850;
  text-transform: uppercase;
}

#login-view.auth-shell .auth-check a,
#login-view.auth-shell #kvkk-remember-note {
  color: #071f4f;
  text-decoration: underline;
}

#login-view.auth-shell .auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1.5px solid rgba(205, 181, 146, 0.92);
  border-radius: 11px;
  background: linear-gradient(180deg, #fff9ea 0%, #dfc99d 100%);
  color: #071f4f;
  -webkit-text-fill-color: #071f4f;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(7, 31, 79, 0.12), inset 0 1px 0 rgba(255,255,255,0.72);
}

#login-view.auth-shell .auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(7, 31, 79, 0.16), inset 0 1px 0 rgba(255,255,255,0.78);
}

#login-view.auth-shell .auth-footer {
  display: grid;
  gap: 5px;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(7, 31, 79, 0.12);
  text-align: center;
}

#login-view.auth-shell #login-dev-signature {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 12px auto 0;
  padding: 9px 12px;
  border: 2px solid rgba(16, 34, 77, 0.88);
  border-radius: 10px;
  background: rgba(255, 253, 247, 0.66);
  color: #071f4f;
  font-size: 10px;
  line-height: 1.25;
  font-weight: 900;
  pointer-events: none;
}

@media (max-height: 700px) {
  #login-view.auth-shell { padding: 10px; }
  #login-view.auth-shell .auth-card { padding: 14px; }
  #login-view.auth-shell .auth-head { margin-bottom: 12px; padding: 10px; }
  #login-view.auth-shell .auth-head::before { width: min(188px, 56vw); }
  #login-view.auth-shell .auth-form { gap: 10px; }
  #login-view.auth-shell .auth-input { min-height: 40px; padding: 9px 12px; }
  #login-view.auth-shell .auth-submit { min-height: 42px; }
}

.login-alert-toast {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: min(360px, calc(100% - 32px));
  min-height: 64px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 2px solid #10224d;
  border-left: 5px solid #dc2626;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  color: #071f4f;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.26), inset 0 0 0 1px rgba(197, 170, 100, 0.45);
  transform: translate(-50%, calc(-50% - 10px)) scale(0.98);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.login-alert-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.login-alert-toast.is-warning {
  border-left-color: #C5AA64;
}

.login-alert-toast.is-success {
  border-left-color: #16a34a;
}

.login-alert-toast.is-info {
  border-left-color: #2563eb;
}

.login-alert-toast-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fff7f7;
  color: #dc2626;
}

.login-alert-toast.is-warning .login-alert-toast-icon {
  background: #fff8e1;
  color: #8a7746;
}

.login-alert-toast.is-success .login-alert-toast-icon {
  background: #ecfdf3;
  color: #16a34a;
}

.login-alert-toast.is-info .login-alert-toast-icon {
  background: #eff6ff;
  color: #1e3a8a;
}

.login-alert-toast-icon svg,
.login-alert-toast-icon i {
  width: 18px;
  height: 18px;
}

.login-alert-toast-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.login-alert-toast-copy strong {
  color: #071f4f;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.15;
  text-transform: uppercase;
}

.login-alert-toast-copy span {
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.28;
}

