*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: #0e0f13;
  background-image:
    radial-gradient(ellipse at top left, rgba(88, 101, 242, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(34, 197, 94, 0.08) 0%, transparent 50%);
  min-height: 100vh;
  color: #e2e4ea;
  /* Evita zoom al tocar inputs en iOS */
  -webkit-text-size-adjust: 100%;
}

.container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 16px;
}

/* CARD */
.card {
  background: #16181f;
  border: 1px solid #252732;
  border-radius: 16px;
  padding: 24px 20px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.login-card {
  margin-top: 60px;
  max-width: 360px;
}

/* HEADER */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 10px;
}

.card-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 22px;
}

/* FIELDS */
.field {
  margin-bottom: 14px;
}

.field label,
.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #9095a8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 7px;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="url"],
select {
  width: 100%;
  padding: 13px 14px;
  background: #1e2029;
  border: 1px solid #2e3141;
  border-radius: 10px;
  color: #e2e4ea;
  font-family: 'Inter', sans-serif;
  font-size: 16px; /* 16px evita zoom automático en iOS Safari */
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
select:focus {
  border-color: #5865F2;
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.2);
}

input::placeholder {
  color: #4a5065;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239095a8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: #1e2029;
  padding-right: 38px;
  cursor: pointer;
}

/* FILE INPUT */
input[type="file"] {
  width: 100%;
  padding: 14px;
  background: #1e2029;
  border: 1.5px dashed #2e3141;
  border-radius: 10px;
  color: #9095a8;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

input[type="file"]:hover,
input[type="file"]:focus {
  border-color: #5865F2;
}

/* EXTRA BOX */
.extra-box {
  margin-bottom: 14px;
}

/* CHECKS GRID */
.checks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.check-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1e2029;
  border: 1px solid #2e3141;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 0.88rem;
  color: #c0c4d6;
  /* Área táctil mínima recomendada */
  min-height: 48px;
}

.check-card:active {
  border-color: #5865F2;
  background: #23263a;
}

@media (hover: hover) {
  .check-card:hover {
    border-color: #5865F2;
    background: #23263a;
  }
}

.check-card input[type="checkbox"],
.check-card input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #5865F2;
  cursor: pointer;
  flex-shrink: 0;
}

/* BUTTONS */
.btn-primary {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  background: #5865F2;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.35);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-primary:active {
  transform: scale(0.98);
  background: #4752c4;
}

@media (hover: hover) {
  .btn-primary:hover {
    background: #4752c4;
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.5);
  }
}

.btn-primary:disabled {
  background: #2e3141;
  box-shadow: none;
  cursor: not-allowed;
  color: #6b7080;
}

.btn-logout {
  font-size: 0.82rem;
  font-weight: 500;
  color: #9095a8;
  text-decoration: none;
  padding: 8px 12px;
  border: 1px solid #2e3141;
  border-radius: 8px;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.btn-logout:active {
  border-color: #e74c3c;
  color: #e74c3c;
}

@media (hover: hover) {
  .btn-logout:hover {
    border-color: #e74c3c;
    color: #e74c3c;
  }
}

/* ── MÓVIL ───────────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .container {
    padding: 0;
    align-items: flex-start;
  }

  .card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    min-height: 100vh;
    padding: 20px 16px 32px;
    box-shadow: none;
  }

  .login-card {
    margin-top: 0;
    border-radius: 0;
    min-height: 100vh;
  }

  .checks-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .check-card {
    padding: 10px 10px;
    font-size: 0.82rem;
  }
}
