:root {
  color-scheme: light;
  --bg: #0b1220;
  --surface: #111a2e;
  --surface-2: #0f1730;
  --text: #e8efff;
  --muted: rgba(232, 239, 255, 0.7);
  --border: rgba(232, 239, 255, 0.12);
  --primary: #6aa6ff;
  --good: #33d19d;
  --bad: #ff5d5d;
  --shadow: rgba(0, 0, 0, 0.35);
  --title-font: "Luckiest Guy", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial;
  --neon: #6aa6ff;
  --neon-2: #33d19d;
  --neon-stroke: rgba(0, 0, 0, 0.75);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Montserrat', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  background-image: linear-gradient(rgba(11, 18, 32, 0.72), rgba(11, 18, 32, 0.72)), url("./fondo.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #ffffff;
}

* {
  box-sizing: border-box;
}

/* Forzamos que todos los elementos de texto hereden el color blanco puro */
p, span, div, li, label, input, textarea, select, button, strong, b, i, em {
  color: #ffffff;
}

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  gap: 16px;
  min-height: 102px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

.brand__logo {
  width: auto;
  height: 90px;
  max-width: min(100%, 520px);
  object-fit: contain;
  flex: 0 0 auto;
  display: block;
}

.auth-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}
.auth-nav button {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-weight: 500;
  padding: 0;
}
.auth-nav button:hover {
  text-decoration: underline;
}

.brand__title {
  font-family: var(--title-font);
  font-weight: 700;
  letter-spacing: 0.2px;
  -webkit-text-stroke: 1px var(--neon-stroke);
  text-shadow:
    0 0 2px rgba(0, 0, 0, 0.65),
    0 0 10px rgba(106, 166, 255, 0.55),
    0 0 22px rgba(106, 166, 255, 0.35),
    0 0 34px rgba(51, 209, 157, 0.18);
}

.brand__subtitle {
  font-size: 13px;
}

.api {
  display: flex;
  align-items: center;
  gap: 10px;
}

.api__label {
  font-size: 13px;
}

.api__input {
  width: min(360px, 55vw);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(17, 26, 46, 0.7);
  color: #ffffff;
  outline: none;
}

.api__input::placeholder {
  color: #ffffff;
  opacity: 0.7;
}

.hero {
  padding: 38px 0 18px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}

h1 {
  margin: 0 0 10px;
  font-family: var(--title-font);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  -webkit-text-stroke: 1px var(--neon-stroke);
  text-shadow:
    0 0 2px rgba(0, 0, 0, 0.65),
    0 0 12px rgba(106, 166, 255, 0.6),
    0 0 26px rgba(106, 166, 255, 0.38),
    0 0 38px rgba(51, 209, 157, 0.22);
}

p {
  margin: 0;
  line-height: 1.6;
}

.hero__badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(17, 26, 46, 0.5);
  font-size: 13px;
}

.section {
  padding: 18px 0 52px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.grid--single {
  grid-template-columns: 1fr;
}

.card {
  background: linear-gradient(180deg, rgba(17, 26, 46, 0.1), rgba(15, 23, 48, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateZ(0);
}

.card--neon {
  border-color: rgba(106, 166, 255, 0.5);
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(106, 166, 255, 0.2),
    inset 0 0 0 1px rgba(106, 166, 255, 0.1);
}

.card__title {
  font-family: var(--title-font);
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 12px;
  -webkit-text-stroke: 0.9px var(--neon-stroke);
  text-shadow:
    0 0 2px rgba(0, 0, 0, 0.65),
    0 0 10px rgba(106, 166, 255, 0.55),
    0 0 22px rgba(106, 166, 255, 0.33),
    0 0 32px rgba(51, 209, 157, 0.18);
}

.services {
  display: grid;
  gap: 10px;
}

.service {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px;
  background: rgba(17, 26, 46, 0.15);
}

.service__title {
  font-weight: 650;
  margin-bottom: 4px;
}

.service__desc {
  font-size: 13px;
  line-height: 1.5;
}

.servicesGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.serviceCard {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px;
  background: rgba(17, 26, 46, 0.22);
}

.servicesGrid--select .serviceCard {
  cursor: pointer;
  transition: all 0.2s;
}

.servicesGrid--select .serviceCard:hover {
  transform: translateY(-1px);
  border-color: rgba(106, 166, 255, 0.45);
}

.servicesGrid--select {
  max-height: 340px;
  overflow: auto;
  padding-right: 4px;
}

.serviceCard.is-selected {
  border-color: rgba(51, 209, 157, 0.6);
  background: rgba(51, 209, 157, 0.08);
}

.serviceCard__title {
  font-weight: 700;
  margin-bottom: 6px;
}

.serviceCard__desc {
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.95;
}

.serviceCard__check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(17, 26, 46, 0.6);
  display: grid;
  place-items: center;
  font-size: 12px;
}

.serviceCard.is-selected .serviceCard__check {
  border-color: rgba(51, 209, 157, 0.7);
  background: rgba(51, 209, 157, 0.15);
}

.form {
  display: grid;
  gap: 12px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.field__label {
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 26, 46, 0.25);
  color: #ffffff;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: #ffffff;
  opacity: 0.7;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

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

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(17, 26, 46, 0.15);
}

.check input {
  width: auto;
  margin-top: 3px;
}

.check__copy {
  display: grid;
  gap: 2px;
}

.check__title {
  font-weight: 600;
}

.check__desc {
  font-size: 13px;
}

.form__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(106, 166, 255, 0.1);
  color: #ffffff;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 650;
  transition: all 0.2s;
}

.btn:hover:not(:disabled) {
  background: rgba(106, 166, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(106, 166, 255, 0.2);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.is-loading {
  position: relative;
  padding-left: 38px;
}

.btn.is-loading::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: rgba(255, 255, 255, 1);
  animation: spin 0.8s linear infinite;
}

.spinner-inline {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: rgba(255, 255, 255, 1);
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn--primary {
  border-color: rgba(106, 166, 255, 0.5);
  background: rgba(106, 166, 255, 0.15);
}

.btn--good {
  border-color: rgba(51, 209, 157, 0.5);
  background: rgba(51, 209, 157, 0.12);
}

.btn--bad {
  border-color: rgba(255, 93, 93, 0.5);
  background: rgba(255, 93, 93, 0.12);
}

.muted {
  font-size: 13px;
}

.error {
  border: 1px solid rgba(255, 93, 93, 0.5);
  background: rgba(255, 93, 93, 0.15);
  color: #ffffff;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.modal__panel {
  position: relative;
  width: min(520px, calc(100% - 28px));
  max-height: min(85vh, 760px);
  overflow: auto;
  background: linear-gradient(180deg, rgba(17, 26, 46, 0.3), rgba(15, 23, 48, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.8),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.modal__title {
  font-family: var(--title-font);
  font-weight: 800;
  letter-spacing: 0.2px;
  margin-bottom: 6px;
  -webkit-text-stroke: 0.9px var(--neon-stroke);
  text-shadow:
    0 0 2px rgba(0, 0, 0, 0.65),
    0 0 10px rgba(106, 166, 255, 0.55),
    0 0 22px rgba(106, 166, 255, 0.33),
    0 0 32px rgba(51, 209, 157, 0.18);
}

.auth-switch {
  display: flex;
  gap: 10px;
  margin: 12px 0 2px;
}

.auth-switch__btn {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(17, 26, 46, 0.55);
  color: #ffffff;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 650;
  transition: all 0.2s;
}

.auth-switch__btn.is-active {
  border-color: rgba(106, 166, 255, 0.55);
  background: rgba(106, 166, 255, 0.12);
}

.quotesList {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.adminMetrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 18px;
}

.adminMetric {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 14px;
  background: rgba(17, 26, 46, 0.38);
}

.adminMetric__label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 6px;
}

.adminMetric__value {
  font-size: 22px;
  font-weight: 800;
}

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

.adminForecastRow {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 26, 46, 0.32);
  font-size: 13px;
}

.adminForecastRow--head {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
}

.adminForecastRow__month {
  font-weight: 700;
}

.quoteRow {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 12px;
  background: rgba(17, 26, 46, 0.45);
  display: grid;
  gap: 8px;
  transition: all 0.2s;
}

.quoteRow:hover {
  border-color: rgba(106, 166, 255, 0.3);
  background: rgba(17, 26, 46, 0.6);
  transform: translateY(-2px);
}

.quoteRow__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.quoteRow__title {
  font-weight: 750;
}

.quoteRow__subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.68);
}

.quoteRow__meta {
  font-size: 13px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quoteRow__status {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quote__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(106, 166, 255, 0.1);
  font-size: 13px;
}

.pill--good {
  background: rgba(51, 209, 157, 0.12);
  border-color: rgba(51, 209, 157, 0.35);
}

.pill--warn {
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.35);
}

.pill--soft {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.35);
}

.adminDetailGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.adminDetailBox {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px;
  background: rgba(17, 26, 46, 0.3);
}

.adminDetailBox__title {
  font-weight: 700;
  margin-bottom: 8px;
}

.adminDetailBox__row {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 6px;
}

.adminDetailBox__row strong {
  color: #fff;
}

.quote__items {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.quoteItem {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 12px;
  background: rgba(17, 26, 46, 0.45);
}

.quoteItem__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.quoteItem__title {
  font-weight: 700;
}

.quoteItem__desc {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.5;
}

.quoteItem__meta {
  margin-top: 8px;
  font-size: 13px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quote__totals {
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  display: grid;
  gap: 8px;
}

.quote__line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.quote__line--total {
  font-weight: 800;
  font-size: 16px;
}

.quote__monthly {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.notes {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.quote__help {
  position: relative;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(106, 166, 255, 0.3);
  background: rgba(106, 166, 255, 0.14);
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  line-height: 1.55;
  max-width: 260px;
  margin-right: 6px;
  animation: quoteHelpFloat 2.2s ease-in-out infinite;
  box-shadow: 0 8px 24px rgba(106, 166, 255, 0.14);
}

.quote__help::after {
  content: "";
  position: absolute;
  left: 42px;
  bottom: -10px;
  width: 16px;
  height: 16px;
  background: rgba(106, 166, 255, 0.14);
  border-right: 1px solid rgba(106, 166, 255, 0.3);
  border-bottom: 1px solid rgba(106, 166, 255, 0.3);
  transform: rotate(45deg);
}

.quote__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  align-items: flex-end;
}

@keyframes quoteHelpFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 18, 32, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.footer__inner {
  padding: 18px 0;
}

@media (max-width: 920px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .servicesGrid {
    grid-template-columns: 1fr;
  }

  .adminMetrics {
    grid-template-columns: 1fr 1fr;
  }

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

  .adminDetailGrid {
    grid-template-columns: 1fr;
  }

  .brand__logo {
    height: 64px;
    max-width: 100%;
  }

  .topbar__inner {
    min-height: 76px;
  }
}
