/* =====================================================
   Convoy Altec
   Módulo Registro
   Archivo: registro.css
   ===================================================== */

:root {
  --bg-main: #050b18;
  --bg-deep: #020611;
  --bg-card: rgba(8, 18, 38, 0.86);
  --bg-card-soft: rgba(15, 32, 62, 0.68);

  --cyan: #35dfff;
  --cyan-soft: #7eeeff;
  --cyan-deep: #0aa7d8;

  --text-main: #f4fbff;
  --text-muted: #9db7ca;
  --text-soft: #c8e7f2;

  --border-soft: rgba(126, 238, 255, 0.24);
  --border-strong: rgba(126, 238, 255, 0.52);

  --danger: #ff6b8a;
  --success: #6dffca;
  --warning: #ffd36d;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --shadow-cyan: 0 0 28px rgba(53, 223, 255, 0.25);
  --shadow-card: 0 24px 80px rgba(0, 0, 0, 0.48);

  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* =====================================================
   Reset base
   ===================================================== */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-main);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-main);
  color: var(--text-main);
  background:
    radial-gradient(circle at 50% 12%, rgba(53, 223, 255, 0.22), transparent 32%),
    radial-gradient(circle at 20% 80%, rgba(30, 92, 180, 0.24), transparent 35%),
    linear-gradient(180deg, #0c1a34 0%, #050b18 50%, #020611 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

/* =====================================================
   Layout principal
   ===================================================== */

.app-shell {
  width: 100%;
  min-height: 100vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent);
}

.app-header {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding-top: 6px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.language-selector {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  margin-bottom: 28px;
}

.language-button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 4px 2px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.language-button.is-active,
.language-button:hover {
  color: var(--text-main);
  text-shadow: 0 0 12px rgba(126, 238, 255, 0.75);
}

/* =====================================================
   Marca Convoy
   ===================================================== */

.brand-block {
  padding: 6px 0 18px;
}

.brand-mark {
  width: 132px;
  height: 132px;
  margin: 0 auto 18px;
  border: 4px solid rgba(244, 251, 255, 0.86);
  border-radius: 34px;
  position: relative;
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 0 18px rgba(53, 223, 255, 0.32),
    0 0 32px rgba(53, 223, 255, 0.42);
  transform: rotate(45deg);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  height: 4px;
  width: 96px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 14px rgba(53, 223, 255, 0.92);
}

.brand-mark::before {
  left: -76px;
}

.brand-mark::after {
  right: -76px;
}

.brand-mark-core {
  width: 54px;
  height: 54px;
  border: 4px solid var(--cyan-soft);
  border-radius: 50%;
  box-shadow:
    inset 0 0 16px rgba(53, 223, 255, 0.35),
    0 0 22px rgba(53, 223, 255, 0.75);
  transform: rotate(-45deg);
}

.brand-block h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0.055em;
  font-weight: 900;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.4),
    0 0 24px rgba(126, 238, 255, 0.28);
}

.brand-subtitle {
  margin: 18px 0 0;
  color: var(--text-main);
  font-size: 1.2rem;
  font-weight: 700;
}

.brand-tagline {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* =====================================================
   Área auth
   ===================================================== */

.auth-main {
  width: 100%;
  max-width: 520px;
  margin: 18px auto 0;
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 100%;
  padding: 24px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(14, 31, 62, 0.9), rgba(5, 11, 24, 0.82)),
    var(--bg-card);
  box-shadow: var(--shadow-card), var(--shadow-cyan);
  backdrop-filter: blur(18px);
}

.auth-card-header {
  text-align: center;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 0;
  font-size: 1.65rem;
}

.auth-card-header p:last-child {
  margin: 10px 0 0;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =====================================================
   Tabs
   ===================================================== */

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 6px;
  border: 1px solid rgba(126, 238, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  margin-bottom: 18px;
}

.auth-tab {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--text-muted);
  background: transparent;
  font-weight: 800;
}

.auth-tab.is-active {
  color: #03101c;
  background: linear-gradient(180deg, #b7fbff 0%, #35dfff 54%, #16aee2 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 0 20px rgba(53, 223, 255, 0.48);
}

/* =====================================================
   Formularios
   ===================================================== */

.auth-panel {
  animation: fadeIn 220ms ease-out;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-weight: 700;
  font-size: 0.9rem;
}

.form-field input {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
  border: 1px solid rgba(126, 238, 255, 0.22);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  background: rgba(2, 6, 17, 0.64);
  padding: 0 15px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.form-field input::placeholder {
  color: rgba(200, 231, 242, 0.42);
}

.form-field input:focus {
  border-color: var(--border-strong);
  background: rgba(5, 14, 31, 0.92);
  box-shadow:
    0 0 0 3px rgba(53, 223, 255, 0.12),
    0 0 22px rgba(53, 223, 255, 0.16);
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  padding: 0;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.password-toggle:hover {
  color: var(--cyan-soft);
  background: rgba(126, 238, 255, 0.1);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--border-strong);
  outline-offset: 2px;
}

.password-toggle svg {
  display: block;
  width: 18px;
  height: 18px;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 2px 0 4px;
}

.check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

/* =====================================================
   Botones
   ===================================================== */

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 54px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.02em;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.text-button {
  justify-self: center;
  border: 0;
  color: var(--cyan-soft);
  background: transparent;
  padding: 6px 10px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-button:hover {
  color: var(--text-main);
}

.panel-introduction {
  text-align: center;
  margin-bottom: 4px;
}

.panel-introduction h3 {
  margin: 0;
  font-size: 1.25rem;
}

.panel-introduction p {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.primary-button {
  border: 0;
  color: #03101c;
  background: linear-gradient(180deg, #c8ffff 0%, #35dfff 52%, #14a8de 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 12px 28px rgba(53, 223, 255, 0.28),
    0 0 24px rgba(53, 223, 255, 0.28);
}

.secondary-button {
  border: 1px solid rgba(126, 238, 255, 0.38);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 34px rgba(53, 223, 255, 0.34),
    0 0 30px rgba(53, 223, 255, 0.36);
}

.secondary-button:hover {
  border-color: var(--border-strong);
  box-shadow: 0 0 18px rgba(53, 223, 255, 0.18);
}

/* =====================================================
   Mensajes
   ===================================================== */

.message-container {
  min-height: 0;
}

.message {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.45;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.message.is-success {
  color: var(--success);
  background: rgba(109, 255, 202, 0.08);
  border-color: rgba(109, 255, 202, 0.28);
}

.message.is-error {
  color: var(--danger);
  background: rgba(255, 107, 138, 0.08);
  border-color: rgba(255, 107, 138, 0.28);
}

.message.is-warning {
  color: var(--warning);
  background: rgba(255, 211, 109, 0.08);
  border-color: rgba(255, 211, 109, 0.28);
}

/* =====================================================
   Panel sesión
   ===================================================== */

.session-panel {
  text-align: center;
  animation: fadeIn 220ms ease-out;
}

.session-avatar {
  width: 82px;
  height: 82px;
  margin: 4px auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #03101c;
  background: linear-gradient(180deg, #c8ffff, #35dfff);
  box-shadow: 0 0 26px rgba(53, 223, 255, 0.44);
  font-weight: 950;
  letter-spacing: 0.06em;
}

.session-info h2 {
  margin: 0;
  font-size: 1.55rem;
}

.session-info p {
  margin: 8px 0 0;
  color: var(--text-muted);
}

.role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 14px;
  border: 1px solid rgba(126, 238, 255, 0.38);
  border-radius: 999px;
  color: var(--cyan-soft) !important;
  background: rgba(53, 223, 255, 0.08);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
}

.session-actions {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

/* =====================================================
   Footer
   ===================================================== */

.app-footer {
  position: relative;
  z-index: 1;
  max-width: 520px;
  width: 100%;
  margin: 24px auto 0;
  padding: 10px 0 2px;
  border-top: 1px solid rgba(126, 238, 255, 0.14);
  text-align: center;
  color: rgba(200, 231, 242, 0.58);
  font-size: 0.78rem;
}

/* =====================================================
   Animaciones
   ===================================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 480px) {
  .app-shell {
    padding: 18px;
  }

  .language-selector {
    margin-bottom: 18px;
  }

  .brand-mark {
    width: 104px;
    height: 104px;
    border-radius: 28px;
  }

  .brand-mark::before,
  .brand-mark::after {
    width: 72px;
  }

  .brand-mark::before {
    left: -58px;
  }

  .brand-mark::after {
    right: -58px;
  }

  .brand-mark-core {
    width: 42px;
    height: 42px;
  }

  .auth-card {
    padding: 20px;
    border-radius: 24px;
  }

  .auth-card h2 {
    font-size: 1.45rem;
  }
}

@media (min-width: 900px) {
  .app-shell {
    justify-content: center;
  }

  .app-header {
    padding-top: 0;
  }

  .auth-main {
    margin-top: 22px;
  }
}

/* =====================================================
   FIN ARCHIVO
   ===================================================== */
