* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', 'Nunito', sans-serif;
  background: linear-gradient(160deg, #1a1f35 0%, #232946 100%);
  min-height: 100vh;
  color: #e8e8f0;
  display: flex;
  flex-direction: column;
}

header { text-align: center; padding: 34px 16px 10px; }
header h1 { font-size: 1.9rem; color: #ffd166; }
.subtitlu { color: #b8bdd8; max-width: 640px; margin: 10px auto 0; font-size: .95rem; line-height: 1.5; }

main { flex: 1; width: min(860px, 94vw); margin: 0 auto; padding: 18px 0 40px; }

.cutie-cautare {
  background: #2b3252;
  border: 1px solid #3d4470;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
#cerinta {
  width: 100%;
  background: #232946;
  border: 1px solid #3d4470;
  border-radius: 12px;
  color: #e8e8f0;
  padding: 12px 14px;
  font-family: inherit;
  font-size: .98rem;
  resize: vertical;
  outline: none;
}
#cerinta:focus { border-color: #4a6fd6; }
.bara-actiuni { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.bara-actiuni label { color: #b8bdd8; font-size: .85rem; }
.bara-actiuni select {
  background: #232946; color: #e8e8f0; border: 1px solid #3d4470;
  border-radius: 8px; padding: 7px 10px; font-family: inherit; font-size: .85rem; cursor: pointer;
}
#btn-cauta {
  background: #4a6fd6; color: #fff; border: none; border-radius: 999px;
  padding: 12px 26px; font-family: inherit; font-weight: 700; font-size: 1rem; cursor: pointer;
  transition: transform .1s, background .2s;
}
#btn-cauta:hover { background: #5b7fe0; transform: scale(1.03); }
#btn-cauta:disabled { opacity: .55; cursor: wait; transform: none; }

/* progresul agentului */
.progres {
  margin-top: 16px;
  background: #232946;
  border: 1px solid #3d4470;
  border-radius: 14px;
  padding: 12px 16px;
}
.progres.ascuns { display: none; }
.progres-titlu { font-weight: 700; color: #ffd166; font-size: .92rem; display: flex; align-items: center; gap: 8px; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #3d4470; border-top-color: #ffd166;
  animation: rot 1s linear infinite; display: inline-block;
}
@keyframes rot { to { transform: rotate(360deg); } }
.pasi { margin-top: 8px; max-height: 220px; overflow-y: auto; font-size: .82rem; color: #9aa4cc; }
.pasi div { padding: 2px 0; border-bottom: 1px dashed rgba(61,68,112,.4); }

/* rezultatele */
.rezultate { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.rezumat-cerinta {
  background: rgba(255,209,102,.08);
  border: 1px dashed rgba(255,209,102,.45);
  border-radius: 12px; padding: 10px 14px; font-size: .88rem; color: #e8dcb8;
}
.card {
  background: #2b3252; border: 1px solid #3d4470; border-radius: 16px;
  padding: 16px 18px; box-shadow: 0 6px 22px rgba(0,0,0,.3);
}
.card-antet { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-antet h2 { font-size: 1.12rem; color: #fff; }
.card-antet .sursa { color: #8ecae6; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.scor {
  min-width: 56px; text-align: center; background: #1d7a40; color: #fff;
  border-radius: 10px; padding: 6px 10px; font-weight: 800; font-size: 1.05rem;
}
.scor.mediu { background: #a07f1f; }
.scor small { display: block; font-size: .6rem; font-weight: 600; opacity: .85; }
.card .meta { color: #b8bdd8; font-size: .85rem; margin: 8px 0 4px; display: flex; gap: 16px; flex-wrap: wrap; }
.card .de-ce { margin: 8px 0; font-size: .92rem; line-height: 1.5; }
.card h3 { font-size: .8rem; color: #ffd166; margin: 10px 0 4px; text-transform: uppercase; letter-spacing: .05em; }
.card ul { margin-left: 18px; font-size: .87rem; line-height: 1.5; }
.card ul.rele li { color: #f0a8a8; }
.card ul.bune li { color: #b5e3bd; }
.card .btn-link {
  display: inline-block; margin-top: 12px; background: #4a6fd6; color: #fff;
  text-decoration: none; border-radius: 999px; padding: 8px 18px; font-size: .85rem; font-weight: 700;
}
.card .btn-link:hover { background: #5b7fe0; }
.sfaturi {
  background: rgba(125,222,139,.07); border: 1px dashed rgba(125,222,139,.4);
  border-radius: 12px; padding: 10px 14px; font-size: .88rem; color: #cfe8d2;
}
.eroare-mare {
  background: rgba(255,138,138,.1); border: 1px solid rgba(255,138,138,.4);
  border-radius: 12px; padding: 12px 16px; color: #ff8a8a; font-size: .9rem;
}

/* căutările recente */
.istoric { margin-top: 26px; }
.istoric.ascuns { display: none; }
.istoric h2 { font-size: 1rem; color: #ffd166; margin-bottom: 4px; }
.istoric-nota { color: #8a93b8; font-size: .78rem; margin-bottom: 10px; }
.lista-istoric { display: flex; flex-direction: column; gap: 6px; }
.istoric-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #232946; border: 1px solid #3d4470; border-radius: 10px;
  padding: 9px 13px; color: #e8e8f0; font-family: inherit; font-size: .84rem;
  cursor: pointer; text-align: left; transition: border-color .15s;
}
.istoric-item:hover { border-color: #4a6fd6; }
.istoric-cerinta { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.istoric-meta { color: #8a93b8; font-size: .74rem; flex-shrink: 0; }

footer { text-align: center; color: #6b7499; font-size: .75rem; padding: 14px; }

/* parola */
.ecran-parola {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20,24,45,.92); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.ecran-parola.ascuns { display: none; }
.cutie-parola {
  background: #2b3252; border: 1px solid #3d4470; border-radius: 20px;
  padding: 36px 44px; text-align: center; box-shadow: 0 12px 50px rgba(0,0,0,.5);
}
.titlu-parola { font-size: 1.4rem; font-weight: 800; color: #ffd166; margin-bottom: 10px; }
.cutie-parola p { margin-bottom: 14px; color: #b8bdd8; }
.cutie-parola input {
  display: block; width: 240px; margin: 0 auto 14px; padding: 12px 16px;
  border-radius: 10px; border: 1px solid #3d4470; background: #232946;
  color: #e8e8f0; font-size: 1rem; text-align: center; outline: none;
}
.cutie-parola button {
  padding: 11px 26px; border: none; border-radius: 999px; background: #4a6fd6;
  color: #fff; font-family: inherit; font-weight: 700; cursor: pointer;
}
.eroare-parola { color: #ff8a8a; margin-top: 10px; min-height: 1.2em; font-size: .9rem; }

@media (max-width: 620px) {
  .card-antet { flex-direction: column; }
}
