:root{
  --purple:#5c0f8c;
  --purple-2: rgba(92,15,140,.10);
  --ink:#0f172a;
  --muted:#64748b;
  --line: rgba(15,23,42,.10);
  --bg:#ffffff;
  --card:#ffffff;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.14), 0 4px 14px rgba(15, 23, 42, 0.06);
  --radius: 22px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

/* Optional Futura stack (uses local Futura if available) */
.futura{
  font-family: "Futura", "Futura PT", "Avenir Next", Avenir, "Trebuchet MS", "Gill Sans", "Inter", system-ui, sans-serif;
}

.container{
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Header */
.header{
  position: sticky;
  top:0;
  z-index:10;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15,23,42,.08);
}
.header-inner{
  height: 72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.brand{
  display:flex;
  align-items:center;
  gap:14px;
  text-decoration:none;
  color:inherit;
}
.brand-logo{
  width:42px;
  height:42px;
  border-radius: 50px;
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10), 0 1px 2px rgba(15, 23, 42, 0.06);
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.brand-logo img{
  width: 100%;
  height: auto;
  display:block;
}
.brand-lines{ line-height:1.1; }
.brand-top{
  display:flex;
  align-items:center;
  gap:10px;
}
.brand-name{
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--purple);
}
.pill{
  display:inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(92,15,140,.18);
  background: linear-gradient(90deg, rgba(92,15,140,.06), rgba(255,160,0,.08));
  color: rgba(92,15,140,.92);
}
.brand-sub{
  font-size: 12px;
  color: rgba(92,15,140,.62);
  margin-top: 3px;
}

.header-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px 14px;
    min-height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(92, 15, 140, .30);
    background: #fff;
    color: rgba(92, 15, 140, .92);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    line-height: 1;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10), 0 1px 2px rgba(15, 23, 42, 0.06);
    text-transform: uppercase;
}
.header-link svg{ display:block; }

.header-link:hover{
  background: rgba(92,15,140,.04);
  border-color: rgba(92,15,140,.42);
}

/* Layout */
.main{
  padding: 34px 0 70px;
}
.card{
  background: var(--card);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card-topline{
  height: 6px;
  background: linear-gradient(90deg, var(--purple) 0%, rgba(92,15,140,.70) 45%, rgba(255,160,0,.90) 100%);
}
.card-body{
  padding: 26px;
}
.h1{
  margin:0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing:-0.02em;
}
.lead{
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.field{
  margin-top: 18px;
}
.label{
  display:block;
  font-size: 12px;
  font-weight: 700;
  color: rgba(15,23,42,.70);
  margin-bottom: 8px;
}
.row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.input{
  flex: 1 1 420px;
  min-width: 240px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.12);
  outline:none;
  font-size: 14px;
}
.input:focus{
  border-color: rgba(92,15,140,.40);
  box-shadow: 0 0 0 .25rem rgba(92,15,140,.10);
}
.btn{
  padding: 12px 16px;
  border-radius: 999px;
  border: 0;
  background: var(--purple);
  color: #fff;
  font-weight: 800;
  cursor:pointer;
  box-shadow: 0 14px 34px rgba(92, 15, 140, 0.30), 0 6px 14px rgba(15, 23, 42, 0.10);
}
.btn:hover{ background: rgba(92,15,140,.92); }

.note{
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(92,15,140,.18);
  background: linear-gradient(135deg, rgba(92,15,140,.05), rgba(255,160,0,.08));
  color: rgba(92,15,140,.78);
  font-size: 13px;
}

/* Results */
.results-head{
  margin-top: 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.results-title{
  font-weight: 800;
  font-size: 13px;
  letter-spacing:-0.01em;
}
.results-count{
  font-size: 12px;
  color: var(--muted);
}
.results{
  margin-top: 10px;
  border-top: 1px solid rgba(15,23,42,.10);
}
.result{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 14px 8px;
  border-bottom: 1px solid rgba(15,23,42,.08);
}
.result a{
  text-decoration:none;
  color: inherit;
}
.result-name{
  font-weight: 800;
  font-size: 14px;
}
.result-meta{
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}
.open-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(92,15,140,.20);
  background: rgba(92,15,140,.04);
  color: rgba(92,15,140,.90);
  font-weight: 800;
  font-size: 12px;
}
/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(92,15,140,.18);
  background: linear-gradient(180deg, rgba(92,15,140,1), rgba(74,10,116,1));
  color:#fff;
  font-weight: 800;
  cursor:pointer;
  line-height:1;
  box-shadow: 0 14px 34px rgba(92, 15, 140, 0.26), 0 6px 14px rgba(15, 23, 42, 0.10);
}
.btn:hover{ filter: brightness(1.02); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 12px 25px 14px 20px;
    border-radius: 999px;
    border: 1px solid rgba(92, 15, 140, .18);
    background: #fff;
    color: rgba(92, 15, 140, .92);
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10), 0 1px 2px rgba(15, 23, 42, 0.06);
    text-decoration: none;
}
.btn-secondary:hover{ background: rgba(92,15,140,.03); }
.btn svg, .btn-secondary svg, .open-pill svg { display:block; }
/* Result Row & avatar icon*/

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

  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.08);
  background: #fff;
  margin-top: 10px;
}
.results{ border-top: 0; }

.result-left{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 0;
}
.avatar{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(92,15,140,.08);
  border: 1px solid rgba(92,15,140,.16);
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
}
.avatar svg {
    color: #bb83df;
}
.result-name{
  font-weight: 800;
  font-size: 14px;
  margin: 0;
}
.result-meta{
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
.open-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 14px 12px;
    border-radius: 999px;
    border: 1px solid rgba(92, 15, 140, .20);
    background: rgba(92, 15, 140, .04);
    color: rgba(92, 15, 140, .92) !important;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    text-transform: uppercase;
}
.open-pill:hover{ background: rgba(92,15,140,.07); }



/* Certificate */
.cert-card{
  margin-top: 22px;
}
.cert-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-top: 12px;
}
.cert-actions .btn{
  background: rgba(255,160,0,1);
  box-shadow: 0 14px 34px rgba(255, 160, 0, 0.28), 0 6px 14px rgba(15, 23, 42, 0.10);
}
.cert-actions .btn:hover{ background: rgba(255,160,0,.92); }
.smalllink{
  color: rgba(92,15,140,.92);
  text-decoration:none;
  font-weight:800;
  font-size: 13px;
}
.smalllink:hover{ text-decoration:underline; }

.cert{
  position: relative;
  background:#fff;
  border-radius: 18px;
  overflow:hidden;

  /* Remove the boxy border */
  border: 0;

  /* Add a soft shadow instead */
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.18), 0 6px 18px rgba(15, 23, 42, 0.10);
}

.cert img{
  width:100%;
  height:auto;
  display:block;
}

/* Positioning of text OVER the JPG.
   Tweak these 4 values to dial it in perfectly for your certificate-bg.jpg. */
.cert-name {
    position: absolute;
    left: 50%;
    top: 37%;
    transform: translate(-50%, -50%);
    width: 92%;
    text-align: center;
    font-family: "Times New Roman", Times, serif;
    font-style: italic;
    font-size: 64px;
    color: #1a1a1a;
}
.cert-date {
    position: absolute;
    left: 56%;
    top: 67.5%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-family: "Times New Roman", Times, serif;
    font-style: italic;
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
}

.cert-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.cert-print-btn{
  background: linear-gradient(180deg, #ffa000, #f08a00);
  box-shadow: 0 14px 34px rgba(255,160,0,.28), 0 6px 14px rgba(15,23,42,.10);
  white-space: nowrap;
}
.cert-print-btn:hover{
  filter: brightness(1.05);
}


/* Print */
@media print {
  @page { margin: 0; }

  body { background: #fff !important; }

  /* Hide everything */
  body * { visibility: hidden !important; }

  /* Hide any non-certificate parts explicitly */
  .header,
  .lookup-card,
  .note,
  .results-head,
  .results,
  .cert-header,
  .cert-actions,
  .cert-print-btn {
    display: none !important;
  }

  /* Show only the certificate visual */
  #certificate .cert,
  #certificate .cert * {
    visibility: visible !important;
  }

  /* Pin the certificate to the top-left of the printed page */
  #certificate .cert {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  #certificate .cert img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Ensure the page doesn't try to print extra whitespace */
  html, body { height: auto !important; }
}


