﻿:root {
  --topbar-blue: #173f80;
  --panel-border: rgba(255, 255, 255, 0.09);
  --input-bg: rgba(255, 255, 255, 0.06);
  --input-border: rgba(255, 255, 255, 0.12);
  --button-blue: #2f68e8;
  --message-yellow: #ffcc00;
  --text-main: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.82);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f4f4;
  color: #111;
}

body {
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.security-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #ffffff;
  padding: 32px;
}

.security-shell {
  width: min(880px, 100%);
  color: #373737;
}

.security-logo {
  display: block;
  width: 58px;
  height: auto;
  margin: 0 0 26px;
}

.security-shell h1 {
  margin: 0 0 8px;
  font-size: clamp(2.5rem, 5vw, 3.85rem);
  font-weight: 600;
}

.security-shell h2 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 600;
}

.security-shell p {
  margin: 0;
  max-width: 980px;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.5;
}

.security-spinner {
  width: 28px;
  height: 28px;
  margin-top: 32px;
  border: 4px solid #202020;
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

.security-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 230px;
  padding-top: 20px;
  border-top: 1px solid #d8d8d8;
  font-size: 0.95rem;
  color: #414141;
  flex-wrap: wrap;
}

.security-footer a {
  color: #0a54ff;
}

.app {
  min-height: 100vh;
  background: #08101f;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 62px;
  padding: 0 28px;
  background: var(--topbar-blue);
  color: var(--text-main);
}

.topbar-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.topbar-title {
  font-size: clamp(1.75rem, 1.95vw, 2.15rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 28px;
  min-height: calc(100vh - 62px);
  padding: 24px 34px 28px;
  background-image: url("/recursos/Ministerio.jpeg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.24));
}

.search-panel,
.result-panel {
  position: relative;
  z-index: 1;
  margin-top: 2px;
}

.search-panel {
  width: 380px;
  min-height: 336px;
  padding: 32px 18px 18px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(18, 27, 52, 0.92), rgba(14, 23, 46, 0.84)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 9px,
      transparent 9px,
      transparent 21px
    );
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(2px);
}

.search-panel h1 {
  margin: 0 0 14px;
  color: var(--text-main);
  font-size: 2rem;
  line-height: 1.08;
  font-weight: 800;
}

.search-panel p {
  margin: 0 0 11px;
  color: var(--text-soft);
  font-size: 0.98rem;
}

.reference-input,
.search-button {
  width: 340px;
}

.reference-input {
  display: block;
  height: 35px;
  padding: 0 12px;
  border: 1px solid var(--input-border);
  border-radius: 14px;
  outline: none;
  background: var(--input-bg);
  color: var(--text-main);
  font-size: 0.95rem;
}

.reference-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.captcha {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  width: 272px;
  min-height: 98px;
  margin-top: 12px;
  margin-left: 1px;
  padding: 22px 14px 12px 10px;
  border: 1px solid #dedede;
  border-radius: 3px;
  background: #fafafa;
  color: #222;
  cursor: pointer;
  text-align: left;
  transform-origin: top left;
}

.captcha-note {
  position: absolute;
  top: 4px;
  left: 4px;
  right: 8px;
  color: #dd2222;
  font-size: 0.47rem;
  line-height: 1.2;
}

.captcha-check {
  width: 26px;
  height: 26px;
  border: 2px solid #8b8b8b;
  background: #fff;
}

.captcha.is-checked .captcha-check {
  position: relative;
  border-color: transparent;
  background: transparent;
}

.captcha.is-checked .captcha-check::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 6px;
  width: 8px;
  height: 16px;
  border-right: 4px solid #16b14a;
  border-bottom: 4px solid #16b14a;
  transform: rotate(38deg);
}

.captcha-label {
  font-size: 0.98rem;
}

.captcha-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: end;
  gap: 2px;
  font-size: 0.7rem;
  color: #5e5e5e;
}

.captcha-brand small {
  font-size: 0.55rem;
}

.captcha-brand-icon {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #ffffff 18%, transparent 19%),
    conic-gradient(from 220deg, #c7c7c7 0 60deg, #6f8fff 60deg 220deg, #c7c7c7 220deg 360deg);
  border: 1px solid #c9c9c9;
}

.message {
  min-height: 25px;
  margin: 8px 0 10px;
  color: var(--message-yellow);
  font-size: 0.95rem;
  font-weight: 800;
}

.search-button {
  display: block;
  height: 41px;
  margin-top: 2px;
  border: 0;
  border-radius: 11px;
  background: var(--button-blue);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.search-button:hover {
  filter: brightness(1.05);
}

.result-panel {
  width: min(760px, calc(100vw - 476px - 34px));
  max-width: 760px;
}

.result-frame {
  width: 100%;
  padding: 28px 18px 18px;
  border-radius: 18px;
  background: rgba(76, 81, 86, 0.84);
  box-shadow: var(--shadow-lg);
}

.visa-image {
  display: block;
  width: 100%;
  border-radius: 12px;
  background: #fff;
}

.app.has-result .search-panel {
  min-height: 210px;
  padding-bottom: 16px;
}

.app.has-result .captcha,
.app.has-result .message {
  display: none;
}

.app.has-result .search-button {
  margin-top: 12px;
}

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

@media (max-width: 980px) {
  .hero {
    flex-direction: column;
    gap: 22px;
    padding-right: 22px;
    padding-left: 22px;
  }

  .search-panel,
  .result-panel {
    width: 100%;
    max-width: none;
  }

  .reference-input,
  .search-button,
  .captcha {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .security-screen {
    align-items: start;
    padding: 58px 10px 28px;
  }

  .security-shell {
    width: 100%;
  }

  .security-logo {
    width: 20px;
    margin: 0 0 8px;
  }

  .security-shell h1 {
    max-width: 245px;
    margin: 0 0 8px;
    font-size: 0;
    line-height: 1.06;
  }

  .security-shell h1::before {
    content: "evisa-\Averifica.mint.gob.ni";
    white-space: pre;
    display: inline-block;
    font-size: 0.98rem;
    font-weight: 600;
  }

  .security-shell h2 {
    max-width: 230px;
    font-size: 0;
    margin: 0 0 8px;
    line-height: 1.08;
  }

  .security-shell h2::before {
    content: "Verificación de seguridad en\Acurso";
    white-space: pre;
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
  }

  .security-shell p {
    max-width: 220px;
    font-size: 0.34rem;
    line-height: 1.55;
  }

  .security-spinner {
    width: 14px;
    height: 14px;
    margin-top: 18px;
    border-width: 3px;
  }

  .security-footer {
    gap: 5px;
    margin-top: 132px;
    padding-top: 12px;
    font-size: 0.34rem;
  }

  .app {
    background: #0a1222;
  }

  .topbar {
    height: 53px;
    gap: 10px;
    padding: 2px 10px 0;
    align-items: center;
  }

  .topbar-logo {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
  }

  .topbar-title {
    max-width: 185px;
    font-size: 0;
  }

  .topbar-title::before {
    content: "MINISTERIO DEL\AINTERIOR";
    white-space: pre;
    display: inline-block;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.05;
  }

  .hero {
    min-height: calc(100vh - 53px);
    flex-direction: column;
    gap: 15px;
    padding: 14px 0 24px;
    background-position: 58% center;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.28));
  }

  .search-panel {
    width: calc(100% - 32px);
    min-height: 0;
    margin: 0 16px;
    padding: 17px 14px 15px;
    border-radius: 14px;
  }

  .search-panel h1 {
    max-width: 195px;
    margin: 0 0 12px;
    font-size: 0;
  }

  .search-panel h1::before {
    content: "Portal de\AVerificaciones";
    white-space: pre;
    display: inline-block;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.08;
  }

  .search-panel p {
    margin: 0 0 10px;
    font-size: 0.56rem;
  }

  .reference-input,
  .search-button {
    width: 100%;
  }

  .reference-input {
    height: 28px;
    padding: 0 12px;
    border-radius: 13px;
    font-size: 0.72rem;
  }

  .captcha {
    width: 272px;
    max-width: none;
    margin-top: 10px;
    transform: scale(0.79);
  }

  .message {
    min-height: 31px;
    margin: 2px 0 10px;
    font-size: 0.58rem;
    line-height: 1.08;
  }

  .search-button {
    height: 37px;
    margin-top: 0;
    border-radius: 9px;
    font-size: 0.74rem;
  }

  .result-panel {
    width: calc(100% - 32px);
    margin: 0 16px;
  }

  .result-frame {
    padding: 10px 7px 7px;
    border-radius: 12px;
  }

  .visa-image {
    border-radius: 8px;
  }

  .app.has-result .search-panel {
    min-height: 0;
    padding-bottom: 14px;
  }

  .app.has-result .search-button {
    margin-top: 6px;
  }
}

