/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #0a0a0a;
  --blue:    #222222;
  --gold:    #e8a020;
  --white:   #ffffff;
  --gray-50: #f8f9fb;
  --gray-100:#eef0f4;
  --gray-300:#d1d5db;
  --gray-400:#9aa3b2;
  --gray-700:#3d4559;
  --green:   #1a7f4b;
  --green-lt:#e8f7ef;
  --amber:   #b45309;
  --amber-lt:#fef3c7;
  --red:     #b91c1c;
  --red-lt:  #fee2e2;
  --sky:     #0369a1;
  --sky-lt:  #e0f2fe;
  --radius:  12px;
  --shadow:  0 4px 24px rgba(13,43,94,.10);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-700);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  padding: 20px 24px;
}
.header-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.logo { display: flex; align-items: center; }
.logo-img {
  height: 56px;
  width: auto;
  mix-blend-mode: screen;
}
.header-tagline {
  margin-left: auto;
  font-size: .85rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  padding: 6px 14px;
  border-radius: 20px;
}

/* ── Main ── */
main {
  flex: 1;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ── Hero ── */
.hero { text-align: center; margin-bottom: 28px; }
.hero h1 { font-size: 1.75rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.hero p  { color: var(--gray-400); font-size: 1rem; line-height: 1.6; }

/* ── Search Card ── */
.search-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 28px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--gray-100);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--gray-700);
  background: var(--gray-50);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(0,0,0,.08);
}
.form-group input::placeholder { color: var(--gray-300); }

button[type="submit"] {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: .4px;
  transition: opacity .2s, transform .1s;
}
button[type="submit"]:hover   { opacity: .92; }
button[type="submit"]:active  { transform: scale(.99); }
button[type="submit"]:disabled{ opacity: .6; cursor: not-allowed; }

/* ── Application Result Card ── */
.result-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
}
.result-header {
  padding: 22px 28px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: var(--white);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.result-header-info h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.result-header-info p  { font-size: .85rem; opacity: .8; }
.result-body { padding: 24px 28px; }

/* ── Info Grid ── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.info-item label {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--gray-400);
  margin-bottom: 4px;
}
.info-item span { font-size: .9rem; font-weight: 500; color: var(--gray-700); }

/* ── Status Badge ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 30px;
  font-weight: 600;
  font-size: .9rem;
}
.status-badge .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.status-Pending          { background: var(--amber-lt); color: var(--amber); }
.status-Pending .dot     { background: var(--amber); }
.status-Processing       { background: var(--sky-lt);   color: var(--sky); }
.status-Processing .dot  { background: var(--sky); animation: pulse 1.5s infinite; }
.status-Approved         { background: var(--green-lt); color: var(--green); }
.status-Approved .dot    { background: var(--green); }
.status-Rejected         { background: var(--red-lt);   color: var(--red); }
.status-Rejected .dot    { background: var(--red); }
.status-Ready            { background: var(--green-lt); color: var(--green); }
.status-Ready .dot       { background: var(--green); }
.status-Additional       { background: #f5f3ff; color: #6d28d9; }
.status-Additional .dot  { background: #6d28d9; }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ── Comments Timeline ── */
.timeline-section { border-top: 1px solid var(--gray-100); padding-top: 20px; }
.timeline-section h3 {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--gray-400);
  margin-bottom: 16px;
}
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
  position: relative;
}
.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--gray-100);
}
.timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
  z-index: 1;
}
.timeline-content { flex: 1; }
.timeline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.timeline-author { font-size: .8rem; font-weight: 600; color: var(--navy); }
.timeline-date   { font-size: .75rem; color: var(--gray-400); }
.timeline-text {
  font-size: .9rem;
  line-height: 1.6;
  color: var(--gray-700);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  padding: 10px 14px;
}
.timeline-empty {
  font-size: .9rem;
  color: var(--gray-400);
  font-style: italic;
  padding: 8px 0;
}

/* ── Multiple results label ── */
.results-label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--gray-400);
  margin-bottom: 16px;
}

/* ── Error Card ── */
.error-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px 40px;
  text-align: center;
}
.error-icon { font-size: 2.5rem; margin-bottom: 16px; }
.error-card h2 { color: var(--navy); margin-bottom: 10px; }
.error-card p  { color: var(--gray-400); line-height: 1.6; }

/* ── Footer ── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  padding: 40px 24px 24px;
  font-size: .85rem;
  line-height: 1.7;
}
.footer-inner {
  max-width: 780px;
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.footer-logo {
  height: 80px;
  width: auto;
  mix-blend-mode: screen;
}
.footer-details h3 {
  color: var(--white);
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.footer-details p { margin-bottom: 4px; }
.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 6px 0;
}
.footer-accreds { display: flex; flex-direction: column; gap: 16px; }
.footer-accred-item strong {
  color: var(--gold);
  display: block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .3px;
  margin-bottom: 4px;
}
.footer-accred-item p { font-size: .78rem; line-height: 1.6; }
footer a { color: var(--gold); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-copy {
  text-align: center;
  font-size: .75rem;
  color: rgba(255,255,255,.4);
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 16px;
  max-width: 780px;
  margin: 0 auto;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .form-row    { grid-template-columns: 1fr; }
  .info-grid   { grid-template-columns: 1fr 1fr; }
  .search-card { padding: 20px; }
  .result-body { padding: 18px 20px; }
  .result-header { padding: 18px 20px; }
  .hero h1     { font-size: 1.35rem; }
  .header-tagline { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .footer-logo  { height: 60px; }
}
@media (max-width: 380px) {
  .info-grid { grid-template-columns: 1fr; }
}
