* {
  box-sizing: border-box;
}

:root {
  --bg-dark: #10141a;
  --bg-dark-2: #181d24;
  --red: #ed1018;
  --red-dark: #c70a11;
  --white: #ffffff;
  --text: #111419;
  --muted: #747b84;
  --line: #dfe3e8;
  --input: #eaf2ff;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    linear-gradient(135deg, var(--bg-dark) 0 45%, #f3f5f7 45% 100%);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 36px 20px;
}

.login-card {
  position: relative;
  width: min(430px, 100%);
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.20);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.card-accent {
  height: 5px;
  background: var(--red);
}

.brand {
  text-align: center;
  padding: 28px 34px 8px;
}

.brand-mark {
  width: 128px;
  height: 128px;
  margin: 0 auto 4px;
  display: grid;
  place-items: center;
  overflow: visible;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: none;
  mix-blend-mode: multiply;
}

.brand-name {
  margin-top: 0;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 43px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -2.4px;
  line-height: 0.95;
}

.brand-name__samy {
  color: #17191d;
}

.brand-name__partner {
  color: var(--red);
}

.brand-subtitle {
  margin: 9px 0 0;
  color: #5b6169;
  font-size: 14px;
  font-weight: 600;
}

.form-area {
  padding: 28px 34px 24px;
}

.form-area h1 {
  margin: 0;
  text-align: center;
  font-size: 33px;
  letter-spacing: -0.9px;
}

.form-intro {
  margin: 8px 0 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d7dde4;
  border-radius: 10px;
  padding: 0 14px;
  background: var(--input);
  color: var(--text);
  outline: none;
  font-size: 14px;
}

.field input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(237, 16, 24, 0.08);
}

.field input::placeholder {
  color: #8d96a1;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #737c87;
  cursor: pointer;
}

.password-toggle .eye-icon {
  width: 18px;
  height: 18px;
  display: block;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle.is-visible {
  color: #4f5964;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #555d66;
}

.remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--red);
}

.form-options a {
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
}

.form-options a:hover {
  text-decoration: underline;
}

.login-button {
  min-height: 50px;
  border: 0;
  border-radius: 10px;
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(237, 16, 24, 0.18);
  transition: background 160ms ease, transform 160ms ease;
}

.login-button:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.login-button:active {
  transform: translateY(0);
}

.message {
  min-height: 18px;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  opacity: 0;
}

.message.visible {
  opacity: 1;
}

.card-footer {
  margin: 0 34px;
  padding: 16px 0 20px;
  border-top: 1px solid var(--line);
  color: #808791;
  font-size: 11px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.dot {
  color: var(--red);
}

@media (max-width: 520px) {
  body {
    background:
      linear-gradient(155deg, var(--bg-dark) 0 32%, #f3f5f7 32% 100%);
  }

  .login-shell {
    padding: 20px 14px;
  }

  .login-card {
    width: min(420px, 100%);
    border-radius: 16px;
  }

  .brand {
    padding: 22px 22px 4px;
  }

  /* En móvil el panda debe ocupar su propia zona y nunca invadir
     el nombre SamyPartner. */
  .brand-mark {
    width: 88px;
    height: 88px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
  }

  .brand-mark img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
  }

  .brand-name {
    font-size: 34px;
    line-height: 1;
    margin: 0;
  }

  .form-area {
    padding: 24px 22px 20px;
  }

  .form-area h1 {
    font-size: 30px;
  }

  .form-options {
    align-items: flex-start;
  }

  .card-footer {
    margin: 0 22px;
  }
}

@media (max-width: 360px) {
  .form-options {
    flex-direction: column;
    gap: 10px;
  }
}

.login-button:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}
