:root {
  --bg: #e9e9eb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #d1d5db;
  --primary: #2d5fbd;
  --danger: #d11a1a;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Calibri, Arial, sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

.page {
  min-height: 100vh;
  padding: 12px;
}

.page--center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.content {
  display: grid;
  gap: 14px;
}

.title-banner,
.panel,
.card,
.login-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.title-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
}

.title-banner__text {
  font-size: 1.6rem;
  line-height: 1.15;
  font-weight: 700;
  min-width: 0;
}

.title-banner__logo {
  width: 120px;
  max-width: 32vw;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.panel {
  padding: 16px;
}

.panel__title {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
}

.image-card {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
}

.image-card--croquis {
  background: #ffffff;
}

.panel__image {
  width: 100%;
  border-radius: 10px;
}

.panel__image--croquis {
  object-fit: contain;
  max-height: 58vh;
  margin: 0 auto;
}

.panel__image--referencia {
  object-fit: contain;
  max-height: 72vh;
  margin: 0 auto;
}

.essentials {
  margin: 0;
  padding-left: 30px;
}

.essentials__item {
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0 0 8px 0;
  padding-left: 2px;
}

.essentials__item:last-child {
  margin-bottom: 0;
}

.card--small {
  width: min(92vw, 420px);
  padding: 22px;
}

.loading,
.error-title,
.error-text {
  text-align: center;
}

.loading {
  font-size: 1.1rem;
  font-weight: 700;
}

.error-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.error-text {
  color: var(--muted);
  font-size: 1rem;
}

/* LOGIN */
.login-page {
  padding: 20px;
}

.login-card {
  width: min(92vw, 460px);
  overflow: hidden;
}

.login-card__logo-wrap {
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #e5e7eb;
}

.login-card__logo {
  width: 150px;
  max-width: 48vw;
  height: auto;
  object-fit: contain;
}

.login-card__body {
  padding: 18px 20px 20px;
}

.login-card__title {
  margin: 0 0 18px;
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.login-card__form {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  flex-wrap: nowrap;
}

.pin-input {
  width: 96px;
  height: 52px;
  padding: 0 12px;
  border: 1px solid #9db4e6;
  border-radius: 14px;
  background: #ffffff;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 6px;
  outline: none;
}

.pin-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 95, 189, 0.12);
}

.login-button {
  height: 52px;
  min-width: 132px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  background: var(--primary);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

.login-button:disabled {
  opacity: 0.7;
  cursor: default;
}

.login-error {
  min-height: 22px;
  margin-top: 12px;
  text-align: center;
  color: var(--danger);
  font-size: 0.95rem;
  font-weight: 700;
}

@media (min-width: 900px) {
  .page {
    max-width: 980px;
    margin: 0 auto;
    padding: 18px;
  }

  .title-banner__text {
    font-size: 1.9rem;
  }

  .title-banner__logo {
    width: 150px;
  }

  .panel__title {
    font-size: 1.35rem;
  }
}