:root{
  --bg1:#f6f8fb;
  --bg2:#eef3fb;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e5e7eb;

  /* Azul UNPilar */
  --brand:#00579e;
  --brand2:#003d70;
  --ok:#16a34a;
  --warn:#f59e0b;
  --bad:#ef4444;

  --radius:18px;
  --shadow:0 20px 60px rgba(2,6,23,.10);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 600px at 15% 10%, rgba(11,94,168,.10), transparent 60%),
    radial-gradient(900px 600px at 85% 15%, rgba(11,94,168,.08), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

.page{
  min-height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:32px 16px 24px;
  gap:18px;
}

.card{
  width:min(920px, 100%);
  background:white;
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow);
  padding:32px;
}

.header{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:14px;
  margin-bottom:12px;
}

.logo{
  height:72px;
  width:auto;
  object-fit:contain;
}

.title{
  margin:0;
  font-size:32px;
  font-weight:700;
  letter-spacing:-0.02em;
  background:linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}
.subtitle{
  margin:0;
  color:var(--muted);
  font-size:16px;
  font-weight:500;
}
.hint{
  margin:0;
  color:var(--muted);
  font-size:14px;
}

.divider{
  margin:18px 0;
  height:1px;
  background:var(--line);
}

.sectionTitle{
  margin:0 0 8px;
  font-size:18px;
  font-weight:700;
  color:var(--text);
}

.sectionHint{
  margin:0 0 18px;
  font-size:14px;
  color:var(--muted);
}

.form{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.searchContent{
  padding:8px 0;
}

.label{
  font-size:13px;
  color:var(--muted);
}

.inputRow{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.input{
  flex:1 1 220px;
  height:56px;
  border-radius:14px;
  border:2px solid var(--line);
  padding:0 18px;
  font-size:16px;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.input:focus{
  border-color:var(--brand);
  box-shadow:0 0 0 6px rgba(11,94,168,.15);
}

.input--large{
  flex:1 1 280px;
  height:60px;
  font-size:18px;
  font-weight:600;
}

.btn{
  height:56px;
  padding:0 20px;
  border-radius:14px;
  border:1px solid transparent;
  background:linear-gradient(135deg, var(--brand), var(--brand2));
  color:white;
  font-weight:700;
  font-size:16px;
  cursor:pointer;
  transition:transform .05s ease, background .15s ease, box-shadow .15s ease;
  box-shadow:0 10px 28px rgba(11,94,168,.22);
}
.btn:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 36px rgba(11,94,168,.28);
}
.btn:active{transform:translateY(0px)}
.btn:disabled{opacity:.65; cursor:not-allowed; box-shadow:none}

.btn--large{
  height:60px;
  padding:0 24px;
  font-size:17px;
}

.btn--ghost{
  background:transparent;
  color:var(--brand);
  border-color:rgba(11,94,168,.28);
  box-shadow:none;
}
.btn--ghost:hover{
  background:rgba(11,94,168,.06);
}

.statusRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-top:4px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid var(--line);
  color:var(--muted);
  background:#fafafa;
}
.badge--loading{ color:#7c6f2b; background:rgba(245,158,11,.10); border-color:rgba(245,158,11,.25); }
.badge--ok{ color:var(--ok); background:rgba(22,163,74,.10); border-color:rgba(22,163,74,.22); }
.badge--bad{ color:var(--bad); background:rgba(239,68,68,.10); border-color:rgba(239,68,68,.22); }

.statusText{
  font-size:12px;
  color:var(--muted);
}

.hidden{display:none}

.resultHeader{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.resultTitle{
  margin:0;
  font-size:24px;
  font-weight:700;
  letter-spacing:-0.01em;
  background:linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}
.resultSub{
  margin:8px 0 0;
  color:var(--muted);
  font-size:14px;
  font-weight:500;
}

.resultSecTitle{
  margin:20px 0 16px;
  font-size:16px;
  font-weight:700;
  color:var(--text);
}

.resultDivider{
  margin:18px 0;
  height:1px;
  background:var(--line);
}

.results{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
  margin-bottom:8px;
}
@media (max-width:740px){
  .results{grid-template-columns:1fr}
}

.item{
  border:1.5px solid var(--line);
  border-radius:16px;
  padding:18px;
  background:linear-gradient(135deg, #ffffff 0%, #fcfdfe 100%);
  transition:all .2s ease;
  cursor:default;
}
.item:hover{
  border-color:rgba(11,94,168,.3);
  box-shadow:0 8px 24px rgba(11,94,168,.12);
  transform:translateY(-2px);
}
.itemTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.materia{
  margin:0;
  font-weight:700;
  font-size:16px;
  color:var(--text);
  flex:1;
}
.chip{
  font-size:13px;
  font-weight:600;
  color:var(--brand);
  border:1.5px solid rgba(11,94,168,.3);
  background:rgba(11,94,168,.08);
  padding:6px 10px;
  border-radius:999px;
  white-space:nowrap;
}
.meta{
  margin-top:2px;
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px 16px;
}
.metaRow{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.metaKey{
  font-size:12px;
  font-weight:600;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:0.5px;
}
.metaVal{
  font-size:14px;
  color:var(--text);
  font-weight:700;
}

.footNote{
  margin-top:20px;
  padding:14px;
  font-size:13px;
  color:var(--muted);
  background:rgba(0,87,158,.05);
  border-radius:12px;
  border-left:3px solid var(--brand);
}

.mailLink{
  color:var(--brand);
  font-weight:600;
  text-decoration:none;
  border-bottom:2px solid var(--brand);
  transition:all .2s ease;
}
.mailLink:hover{
  color:var(--brand2);
  background:rgba(0,87,158,.08);
  padding:2px 4px;
  border-radius:4px;
}

.footer{
  font-size:12px;
  color:var(--muted);
}
