:root {
  --bg0: #050815;
  --bg1: #061133;
  --bg2: #0a1b4b;
  --card: rgba(12, 18, 44, 0.74);
  --card2: rgba(10, 14, 35, 0.68);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --yellow: #ffe66d;
  --green: #27f5b7;
  --violet: #a78bfa;
  --violet2: #7c3aed;
  --blue: #60a5fa;
  --danger: #fb7185;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  line-height: 1.25;
  font-size: 18px;
  background: linear-gradient(120deg, var(--bg0), var(--bg1), #1a0b3d, var(--bg2), #0a1342);
  background-size: 320% 320%;
  animation: bgShift 18s ease-in-out infinite;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 14% 22%, rgba(255, 255, 255, 0.18) 40%, transparent 41%),
    radial-gradient(1px 1px at 70% 18%, rgba(167, 139, 250, 0.22) 40%, transparent 41%),
    radial-gradient(1px 1px at 33% 74%, rgba(39, 245, 183, 0.18) 40%, transparent 41%),
    radial-gradient(1px 1px at 88% 62%, rgba(255, 255, 255, 0.14) 40%, transparent 41%),
    radial-gradient(1px 1px at 52% 46%, rgba(255, 255, 255, 0.10) 40%, transparent 41%);
  opacity: 0.85;
  filter: blur(0.1px);
  animation: starDrift 22s linear infinite;
}

@keyframes starDrift {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(18px);
  }
}

@keyframes bgShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: linear-gradient(
    180deg,
    rgba(4, 7, 18, 0.92),
    rgba(10, 14, 35, 0.68)
  );
  border-bottom: 1px solid rgba(167, 139, 250, 0.22);
  backdrop-filter: blur(10px);
}

.brand__title {
  font-size: 34px;
  font-weight: 950;
  letter-spacing: 0.2px;
  color: var(--yellow);
  text-shadow: 0 0 18px rgba(167, 139, 250, 0.25);
}

.brand__subtitle {
  color: var(--muted);
  font-size: 16px;
}

.status {
  text-align: right;
}

.status__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.32);
  font-weight: 700;
}

.status__small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  min-height: 18px;
}

.grid {
  padding: 18px 20px 28px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .status {
    display: none;
  }
}

.card {
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 18px;
}

h2 {
  margin: 0 0 14px;
  font-size: 20px;
  letter-spacing: 0.2px;
  color: var(--yellow);
}

.card--info h2 {
  color: var(--green);
  letter-spacing: 0.6px;
}

.disclaimer {
  max-height: 420px;
  overflow: auto;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(39, 245, 183, 0.20);
  background: rgba(0, 0, 0, 0.18);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.45;
  color: rgba(39, 245, 183, 0.95);
  scrollbar-color: rgba(167, 139, 250, 0.75) rgba(5, 8, 21, 0.25);
  scrollbar-width: thin;
}

.disclaimer p {
  margin: 0 0 12px;
}

.disclaimer p:last-child {
  margin-bottom: 0;
}

.disclaimer::-webkit-scrollbar {
  width: 12px;
}

.disclaimer::-webkit-scrollbar-track {
  background: rgba(5, 8, 21, 0.25);
  border-radius: 999px;
}

.disclaimer::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.85), rgba(96, 165, 250, 0.65));
  border: 2px solid rgba(5, 8, 21, 0.25);
  border-radius: 999px;
}

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

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

label {
  display: grid;
  gap: 6px;
}

.cabrilloFields {
  display: contents;
}

.isHidden {
  display: none !important;
}

label span {
  font-size: 13px;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

input,
select {
  appearance: none;
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.26);
  background: rgba(5, 8, 21, 0.55);
  color: var(--text);
  font-size: 18px;
  outline: none;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

input:focus::placeholder {
  color: rgba(255, 255, 255, 0.18);
}

input:focus,
select:focus {
  border-color: rgba(39, 245, 183, 0.65);
  box-shadow: 0 0 0 3px rgba(39, 245, 183, 0.14);
}

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

#fileInput {
  flex: 1;
}

.btn {
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.18), rgba(96, 165, 250, 0.10));
  color: var(--text);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
  transition: transform 0.12s ease, border-color 0.12s ease, filter 0.12s ease;
}

.btn:hover {
  border-color: rgba(39, 245, 183, 0.55);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(1px);
}

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

.btn--primary {
  background: linear-gradient(
    90deg,
    rgba(39, 245, 183, 0.26),
    rgba(167, 139, 250, 0.22),
    rgba(96, 165, 250, 0.18)
  );
  border-color: rgba(39, 245, 183, 0.36);
  box-shadow: 0 14px 34px rgba(39, 245, 183, 0.12), 0 18px 40px rgba(0, 0, 0, 0.3);
}

.btn--ghost {
  background: rgba(251, 113, 133, 0.12);
  border-color: rgba(251, 113, 133, 0.28);
}

.btn--secondary {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.26);
}

.btn--small {
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 900;
  border-radius: 999px;
}

.btn--link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

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

.actions {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.hint {
  color: var(--muted);
  font-size: 14px;
}

.exportBottom {
  margin-top: 14px;
  font-weight: 950;
  letter-spacing: 0.4px;
  color: var(--yellow);
}

.summary {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(5, 8, 21, 0.5);
  border: 1px solid rgba(167, 139, 250, 0.16);
}

.summary__big {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.2px;
  color: var(--green);
}

.summary__row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: start;
}

.summary__label {
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.summary__value {
  font-weight: 800;
}

.mono {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.18);
  background: rgba(0, 0, 0, 0.22);
  font-family: var(--mono);
  font-size: 15px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.miniTools {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.alert {
  margin-top: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background: rgba(167, 139, 250, 0.10);
  color: var(--text);
  font-weight: 700;
}

.alert--danger {
  border-color: rgba(251, 113, 133, 0.34);
  background: rgba(251, 113, 133, 0.10);
}

.footer {
  padding: 16px 20px 24px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  text-align: left;
}

.footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

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

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

.footer__links a {
  color: rgba(255, 230, 109, 0.9);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.footer__links a:hover {
  text-decoration: underline;
}

/* Bottom links (VisualDX-style) */
.bottomLinksContainer {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background: rgba(5, 15, 35, 0.60);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.bottom-useful-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(210, 225, 255, 0.92);
  text-decoration: none;
  font-weight: 900;
  font-size: 12.5px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  user-select: none;
  transition: color 140ms ease, filter 140ms ease;
}

.bottom-useful-link:hover {
  color: rgba(255, 255, 255, 0.98);
  filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.28));
}

.star-icon {
  font-size: 14px;
  line-height: 1;
  text-shadow: 0 0 8px currentColor, 0 0 14px rgba(255, 255, 255, 0.08);
}

.yellow-star {
  color: #ffd54a;
}

.red-star {
  color: #ff4b6e;
}

.white-star {
  color: rgba(255, 255, 255, 0.9);
}

.share-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0;
  border: 1px solid rgba(167, 139, 250, 0.28);
  box-shadow: 0 0 14px rgba(167, 139, 250, 0.14);
}

.whatsapp-green {
  color: #1b1f1a;
  background: rgba(37, 211, 102, 0.92);
  border-color: rgba(37, 211, 102, 0.55);
}

.email-yellow {
  color: #151513;
  background: rgba(255, 213, 74, 0.92);
  border-color: rgba(255, 213, 74, 0.55);
}

@media (max-width: 680px) {
  .bottomLinksContainer {
    justify-content: flex-start;
    padding: 10px 12px;
  }

  .bottom-useful-link {
    font-size: 12px;
  }
}
