:root {
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.1);
  --border: rgba(0, 0, 0, 0.06);
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --login-bg: #f26522;
  --login-accent-blue: #2d68ed;
  --login-form-bg: #ffffff;
  --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

html {
  height: 100%;
}

body.login-body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", var(--font-stack);
  color: var(--text);
}

.card-apple {
  background: var(--login-form-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.login-card-diseltec.card-apple:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  transform: none;
}

.login-page {
  min-height: 100vh;
  font-family: "Inter", var(--font-stack);
  background-color: var(--login-bg);
  color: var(--text);
  position: relative;
  overflow-x: hidden;
}

.login-corner-dots {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  width: min(56vw, 480px);
  height: min(56vw, 480px);
  background-image: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.62) 1.15px,
    transparent 2.1px
  );
  background-size: 24px 24px;
  background-repeat: repeat;
}

.login-corner-dots--tl {
  top: -40px;
  left: -40px;
  -webkit-mask-image: radial-gradient(ellipse 118% 118% at 0% 0%, #000 12%, transparent 78%);
  mask-image: radial-gradient(ellipse 118% 118% at 0% 0%, #000 12%, transparent 78%);
}

.login-corner-dots--tr {
  top: -40px;
  right: -40px;
  -webkit-mask-image: radial-gradient(ellipse 118% 118% at 100% 0%, #000 12%, transparent 78%);
  mask-image: radial-gradient(ellipse 118% 118% at 100% 0%, #000 12%, transparent 78%);
}

.login-corner-dots--bl {
  bottom: -40px;
  left: -40px;
  -webkit-mask-image: radial-gradient(ellipse 118% 118% at 0% 100%, #000 12%, transparent 78%);
  mask-image: radial-gradient(ellipse 118% 118% at 0% 100%, #000 12%, transparent 78%);
}

.login-corner-dots--br {
  bottom: -40px;
  right: -40px;
  -webkit-mask-image: radial-gradient(ellipse 118% 118% at 100% 100%, #000 12%, transparent 78%);
  mask-image: radial-gradient(ellipse 118% 118% at 100% 100%, #000 12%, transparent 78%);
}

.login-page .login-wrap {
  position: relative;
  z-index: 1;
}

/* Se convierten a toast al pie vía messages.js */
.login-messages {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-toast-host {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 2000;
  width: min(36rem, calc(100vw - 2rem));
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  pointer-events: none;
}

.app-toast {
  padding: 0.75rem 1rem;
  border: 1px solid #f0c36d;
  background: #fff8e8;
  color: #7a4e00;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.app-toast-success {
  border-color: #9fd4b5;
  background: #eefaf3;
  color: #0f6b46;
}

.app-toast-danger,
.app-toast-error {
  border-color: #f0b4b4;
  background: #fdecec;
  color: #912018;
}

.app-toast-info {
  border-color: #a9c7ef;
  background: #eef4fc;
  color: #1d4f91;
}

.app-toast-warning {
  border-color: #f0c36d;
  background: #fff8e8;
  color: #7a4e00;
}

.app-toast.is-dismissing {
  opacity: 0;
  transform: translateY(8px);
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  width: 100%;
  max-width: 880px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  border-radius: var(--radius-lg);
}

.login-card-diseltec {
  max-width: 520px;
  flex-direction: column;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.login-card-main {
  flex: 1 1 auto;
  background: var(--login-form-bg);
  padding: 1.75rem 1.5rem 1.25rem;
  min-width: 0;
}

.login-brand-diseltec {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
}

.login-brand-context-icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.login-brand-diseltec .login-brand-img-combined {
  margin: 0;
  display: block;
  width: auto;
  max-width: calc(100% - 68px);
  height: auto;
  max-height: 64px;
  object-fit: contain;
  object-position: left center;
}

.login-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.login-label-diseltec {
  color: #86868b;
  font-weight: 500;
}

.login-label-diseltec i {
  color: #aeaeb2;
}

.login-label i {
  margin-right: 0.25rem;
  font-size: 0.85rem;
}

.login-input-diseltec {
  border-radius: 10px;
  border: 1px solid #d8d8dc;
  padding: 0.65rem 0.85rem;
  font-size: 0.9375rem;
}

.login-input-diseltec:focus {
  border-color: var(--login-accent-blue);
  box-shadow: 0 0 0 3px rgba(45, 104, 237, 0.2);
}

.login-card-main .form-control,
.login-card-main .form-select {
  border-radius: 10px;
}

.login-rfc-input-group .btn {
  border-radius: 0 10px 10px 0;
  border-color: #d8d8dc;
}

.login-rfc-input-group .form-control {
  border-radius: 10px 0 0 10px;
}

.btn-login-studio {
  color: #fff;
  background: #2563eb;
  border: 1px solid #2563eb;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
}

.btn-login-studio:hover,
.btn-login-studio:focus {
  color: #fff;
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.login-footnote {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  margin-top: 1rem;
}

#tenantRegisterModal .login-brand-img-combined {
  margin-inline: auto;
  object-position: center;
}
