/* ==========================================================================
   Login — MarcaOne CRM
   ========================================================================== */

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1100px 560px at 8% -12%, rgba(34, 197, 94, .15), transparent 60%),
    radial-gradient(900px 500px at 112% 112%, rgba(26, 107, 60, .13), transparent 55%),
    var(--bg);
}

.container {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  width: 100%;
  max-width: 1040px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(11, 21, 17, .17);
}

/* Panel izquierdo: marca */
.left-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px 46px;
  color: #EAF4EE;
  overflow: hidden;
  background: linear-gradient(160deg, #0B1511 0%, #0E1B15 52%, #0F3D22 145%);
}

.left-panel::before,
.left-panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.left-panel::before {
  top: -150px;
  right: -160px;
  width: 430px;
  height: 430px;
  background: radial-gradient(circle, rgba(34, 197, 94, .26), transparent 66%);
}

.left-panel::after {
  bottom: -190px;
  left: -140px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(34, 197, 94, .14), transparent 68%);
}

.left-panel > * { position: relative; z-index: 1; }

.logo {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 24px;
  border-radius: 17px;
  font-size: 27px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  box-shadow: 0 16px 36px rgba(34, 197, 94, .3);
}

.left-panel h1 {
  margin: 0 0 10px;
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #FFFFFF;
}

.left-panel p {
  margin: 0 0 28px;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.6;
  color: #A6B8AE;
}

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}

.features li {
  position: relative;
  padding-left: 30px;
  font-size: 13px;
  color: #C9D9D0;
}

.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(34, 197, 94, .16);
  border: 1px solid rgba(34, 197, 94, .35);
}

.features li::after {
  content: "";
  position: absolute;
  left: 6.5px;
  top: 6.5px;
  width: 6px;
  height: 3px;
  border-left: 2px solid var(--brand-400);
  border-bottom: 2px solid var(--brand-400);
  transform: rotate(-45deg);
}

/* Panel derecho: formulario */
.right-panel {
  display: flex;
  align-items: center;
  padding: 56px 52px;
  background: var(--surface);
}

.form-container { width: 100%; }

.form-title {
  margin: 0 0 6px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ink-900);
}

.form-subtitle {
  margin: 0 0 28px;
  font-size: 13px;
  color: var(--ink-500);
}

.form-group { margin-bottom: 16px; }

label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-700);
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink-900);
  font-family: inherit;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input::placeholder { color: var(--ink-400); }

input:focus,
select:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: var(--ring);
}

.btn {
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: 11px;
  background: var(--brand-600);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(20, 83, 45, .22);
  transition: background .16s ease;
}

.btn:hover { background: var(--brand-700); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.toggle-form {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-500);
}

.toggle-form a {
  color: var(--brand-600);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.toggle-form a:hover { text-decoration: underline; }

.alert {
  display: none;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 10px;
  border-left: 4px solid transparent;
  font-size: 13px;
}

.alert.show { display: block; }
.alert-danger  { background: rgba(220, 38, 38, .08);  color: #B91C1C; border-left-color: var(--danger); }
.alert-success { background: rgba(22, 163, 74, .09);  color: #15803D; border-left-color: var(--success); }
.alert-info    { background: rgba(14, 165, 233, .09); color: #0369A1; border-left-color: var(--info); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.loader {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hide { display: none; }

.lang-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(6px);
}

.lang-btn {
  padding: 5px 12px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-500);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.lang-btn:hover { color: var(--ink-900); }
.lang-btn.active { background: var(--brand-600); color: #FFFFFF; }

@media (max-width: 880px) {
  .container { grid-template-columns: 1fr; border-radius: 22px; }
  .left-panel { padding: 30px 28px; text-align: center; align-items: center; }
  .left-panel p,
  .features { display: none; }
  .logo { margin-bottom: 14px; }
  .left-panel h1 { margin-bottom: 0; font-size: 22px; }
  .right-panel { padding: 34px 26px 38px; }
  .form-row { grid-template-columns: 1fr; }
}
