/* DMT Finance Control - Auth V4
   Login / registration visual layer aligned with Platform V4 workspace.
*/

body.auth-shell.ui-v3 {
  min-height: 100vh;
  margin: 0;
  color: var(--v4-text);
  background: var(--v4-bg-main) !important;
}

body.auth-shell.ui-v3::before {
  content: none !important;
  display: none !important;
}

body.auth-shell.ui-v3 .auth-overlay {
  display: none !important;
}

body.auth-shell.ui-v3 .auth-modal-wrap {
  min-height: 100vh;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 28px;
  position: relative;
  z-index: 1;
}

body.auth-shell.ui-v3 .auth-modal {
  width: min(94vw, 500px);
  padding: 30px !important;
  border-radius: 18px !important;
  border: 1px solid var(--v4-border) !important;
  background: var(--v4-surface-1) !important;
  color: var(--v4-text) !important;
  box-shadow: var(--v4-shadow-strong) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.auth-shell.ui-v3 .auth-register-modal {
  width: min(94vw, 620px);
}

body.auth-shell.ui-v3 .auth-topbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px !important;
}

body.auth-shell.ui-v3 .auth-brand {
  min-width: 0;
  color: var(--v4-text-strong) !important;
  text-decoration: none !important;
}

body.auth-shell.ui-v3 .brand-logo__icon {
  width: 34px;
  height: 34px;
}

body.auth-shell.ui-v3 .brand-logo__name {
  color: var(--v4-text-strong) !important;
  letter-spacing: .01em;
}

body.auth-shell.ui-v3 .brand-logo__subtitle {
  color: var(--v4-primary-hover) !important;
}

body.auth-shell.ui-v3 .auth-site-link,
body.auth-shell.ui-v3 .auth-theme-toggle,
body.auth-shell.ui-v3 #language-dropdown {
  min-height: 36px;
  border-radius: 10px !important;
  border: 1px solid var(--v4-border) !important;
  background: var(--v4-surface-2) !important;
  color: var(--v4-muted) !important;
  box-shadow: none !important;
}

body.auth-shell.ui-v3 .auth-site-link:hover,
body.auth-shell.ui-v3 .auth-theme-toggle:hover,
body.auth-shell.ui-v3 #language-dropdown:hover {
  border-color: var(--v4-border-strong) !important;
  background: var(--v4-surface-3) !important;
  color: var(--v4-text-strong) !important;
}

body.auth-shell.ui-v3 h1,
body.auth-shell.ui-v3 .h4 {
  color: var(--v4-text-strong) !important;
  font-weight: 750;
  letter-spacing: -.015em;
}

body.auth-shell.ui-v3 .text-muted,
body.auth-shell.ui-v3 .form-text,
body.auth-shell.ui-v3 .form-label,
body.auth-shell.ui-v3 .form-check-label {
  color: var(--v4-muted) !important;
}

body.auth-shell.ui-v3 .form-label {
  font-weight: 600;
  font-size: .86rem;
  margin-bottom: 7px;
}

body.auth-shell.ui-v3 .form-control,
body.auth-shell.ui-v3 .form-select {
  min-height: 46px;
  border-radius: 11px !important;
  border: 1px solid var(--v4-border) !important;
  background: var(--v4-surface-2) !important;
  color: var(--v4-text) !important;
  box-shadow: none !important;
}

body.auth-shell.ui-v3 .form-control::placeholder {
  color: color-mix(in srgb, var(--v4-muted) 70%, transparent) !important;
}

body.auth-shell.ui-v3 .form-control:focus,
body.auth-shell.ui-v3 .form-select:focus {
  border-color: var(--v4-primary-border) !important;
  background: var(--v4-surface-2) !important;
  color: var(--v4-text) !important;
  box-shadow: 0 0 0 3px var(--v4-primary-soft) !important;
}

body.auth-shell.ui-v3 input:-webkit-autofill,
body.auth-shell.ui-v3 input:-webkit-autofill:hover,
body.auth-shell.ui-v3 input:-webkit-autofill:focus,
body.auth-shell.ui-v3 input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--v4-text) !important;
  caret-color: var(--v4-text) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--v4-surface-2) inset !important;
  box-shadow: 0 0 0 1000px var(--v4-surface-2) inset !important;
  transition: background-color 9999s ease-out 0s;
}

body.auth-shell.ui-v3 .btn-primary {
  min-height: 46px;
  border-radius: 11px !important;
  border: 1px solid var(--v4-primary-border) !important;
  background: var(--v4-primary) !important;
  color: #f7fbff !important;
  box-shadow: none !important;
  font-weight: 700;
}

body.auth-shell.ui-v3 .btn-primary:hover,
body.auth-shell.ui-v3 .btn-primary:focus {
  background: var(--v4-primary-hover) !important;
  border-color: var(--v4-primary-hover) !important;
  box-shadow: none !important;
}

body.auth-shell.ui-v3 .btn-primary:disabled {
  opacity: .58;
}

body.auth-shell.ui-v3 .alert-info {
  border: 1px solid var(--v4-primary-border) !important;
  border-radius: 12px !important;
  background: var(--v4-primary-soft) !important;
  color: var(--v4-text) !important;
}

body.auth-shell.ui-v3 a:not(.btn):not(.brand-logo) {
  color: var(--v4-primary-hover) !important;
  text-decoration: none;
}

body.auth-shell.ui-v3 a:not(.btn):not(.brand-logo):hover {
  color: var(--v4-text-strong) !important;
  text-decoration: underline;
}

body.auth-shell.ui-v3 .dropdown-menu {
  border: 1px solid var(--v4-border) !important;
  border-radius: 12px !important;
  background: var(--v4-surface-2) !important;
  box-shadow: var(--v4-shadow) !important;
}

body.auth-shell.ui-v3 .dropdown-item {
  color: var(--v4-text) !important;
}

body.auth-shell.ui-v3 .dropdown-item:hover,
body.auth-shell.ui-v3 .dropdown-item:focus {
  background: var(--v4-surface-3) !important;
}

body.auth-shell.ui-v3 .form-check-input {
  border-color: var(--v4-border-strong) !important;
  background-color: var(--v4-surface-2);
  box-shadow: none !important;
}

body.auth-shell.ui-v3 .form-check-input:checked {
  background-color: var(--v4-primary) !important;
  border-color: var(--v4-primary) !important;
}

@media (max-width: 700px) {
  body.auth-shell.ui-v3 .auth-modal-wrap {
    padding: 14px;
  }

  body.auth-shell.ui-v3 .auth-modal,
  body.auth-shell.ui-v3 .auth-register-modal {
    width: 100%;
    padding: 22px !important;
    border-radius: 16px !important;
  }

  body.auth-shell.ui-v3 .auth-topbar {
    grid-template-columns: 1fr auto;
  }

  body.auth-shell.ui-v3 .auth-site-link {
    display: none !important;
  }
}
