/* COINUP auth — layout compartido login/registro */
.imperia-auth {
  --auth-bg: #e8edf2;
  --auth-accent: #475569;
  --auth-accent-soft: #64748b;
  --auth-text: #0f172a;
  --auth-muted: #94a3b8;
  --auth-border: #dde3ea;
  --auth-input-bg: #f8fafc;
  --auth-card: #ffffff;
  --auth-btn-from: #4b5563;
  --auth-btn-to: #334155;
  min-height: 100svh;
  background: var(--auth-bg);
}

.imperia-auth__wrap {
  width: 100%;
  min-height: 100svh;
  margin: 0 auto;
}

.imperia-auth__body {
  position: relative;
  margin-top: 0;
  padding: 0 1rem 2rem;
  z-index: 3;
}

.imperia-auth__intro {
  text-align: center;
  margin-bottom: 1rem;
}

.imperia-auth__card {
  background: var(--auth-card);
  border-radius: 1.25rem;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 40px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  animation: imperiaAuthSlide 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes imperiaAuthSlide {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.imperia-auth__tabs {
  display: flex;
  border-bottom: 1px solid var(--auth-border);
}

.imperia-auth__tab {
  flex: 1;
  padding: 0.9rem 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--auth-accent-soft);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.imperia-auth__tab:hover {
  color: var(--auth-text);
  background: #f8fafc;
}

.imperia-auth__tab.is-active {
  color: var(--auth-text);
  box-shadow: inset 0 -2px 0 #334155;
  cursor: default;
}

.imperia-auth__form {
  padding: 1.25rem 1.15rem 1.5rem;
}

.imperia-field {
  margin-bottom: 1rem;
}

.imperia-field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.imperia-field__label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--auth-accent);
}

.imperia-field__link {
  font-size: 0.75rem;
  color: var(--auth-accent-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.imperia-field__link:hover {
  color: var(--auth-text);
}

.imperia-input-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--auth-border);
  border-radius: 0.5rem;
  background: var(--auth-input-bg);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.imperia-input-row:focus-within {
  border-color: #94a3b8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.12);
}

.imperia-input-prefix {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--auth-accent);
  background: #f1f5f9;
  border-right: 1px solid var(--auth-border);
  white-space: nowrap;
}

.imperia-input {
  flex: 1;
  min-width: 0;
  padding: 0.72rem 0.75rem;
  font-size: 0.875rem;
  color: var(--auth-text);
  background: transparent;
  border: 0;
  outline: none;
}

.imperia-input::placeholder {
  color: var(--auth-muted);
}

.imperia-input-wrap {
  position: relative;
}

.imperia-input-wrap .imperia-input-row {
  padding-right: 2.5rem;
}

.imperia-input-wrap .imperia-input {
  width: 100%;
}

.imperia-input-toggle {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  border-radius: 0.35rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.imperia-input-toggle:hover {
  color: var(--auth-accent);
  background: rgba(148, 163, 184, 0.12);
}

.imperia-input-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
}

.imperia-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.25rem 0 1rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--auth-accent-soft);
  cursor: pointer;
}

.imperia-check input {
  margin-top: 0.15rem;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  accent-color: #334155;
  cursor: pointer;
}

.imperia-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  border: 0;
  border-radius: 0.55rem;
  background: linear-gradient(90deg, var(--auth-btn-from), var(--auth-btn-to));
  box-shadow: 0 6px 18px rgba(51, 65, 85, 0.22);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.imperia-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(51, 65, 85, 0.28);
  filter: brightness(1.04);
}

.imperia-btn:active {
  transform: translateY(0);
}

.imperia-auth__footer {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--auth-accent-soft);
}

.imperia-auth__footer a {
  font-weight: 600;
  color: var(--auth-accent);
  text-decoration: none;
}

.imperia-auth__footer a:hover {
  text-decoration: underline;
}

.imperia-field-error {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #dc2626;
}

body.imperia-auth-page {
  background: transparent !important;
  background-image: none !important;
}

body.imperia-auth-page .app-frame {
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 100svh !important;
  border-radius: 0 !important;
}

body.imperia-auth-page .plane-layer {
  display: none;
}
