:root {
  --navy: #25334b;
  --navy-2: #1a2538;
  --blue: #1f5499;
  --gold: #aa9256;
  --gold-soft: #f6f0e1;
  --red: #c12026;
  --bg: #f4f5f8;
  --card: #ffffff;
  --line: #e3e6ec;
  --text: #1c2433;
  --muted: #6b7486;
  --ok: #1d7a46;
  --ok-bg: #e3f4ea;
  --warn: #9a5b00;
  --warn-bg: #fdf0dc;
  --err: #b42318;
  --err-bg: #fdecea;
  --star: #f5a524;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--blue); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
[hidden] { display: none !important; }

/* ================================ header ================================ */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 24px;
  background: var(--card);
  border-bottom: 3px solid var(--gold);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { height: 42px; }
.brand strong { font-family: Aleo, Georgia, serif; font-size: 18px; color: var(--navy); display: block; }
.brand span { color: var(--muted); font-size: 12px; }
.nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.nav .who { color: var(--muted); font-size: 13px; margin-right: 4px; }

main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px; }
main.wide { max-width: 1440px; }
.footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px; border-top: 1px solid var(--line); background: var(--card); }

/* ================================ buttons =============================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; font-size: 13.5px; line-height: 1.2;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--navy);
  background: var(--navy); color: #fff; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--navy-2); }
.btn.ghost { background: #fff; color: var(--navy); }
.btn.ghost:hover { background: #f1f3f7; }
.btn.gold { background: var(--gold); border-color: var(--gold); }
.btn.gold:hover { background: #957f47; }
.btn.danger { background: #fff; color: var(--err); border-color: #f0c2bd; }
.btn.danger:hover { background: var(--err-bg); }
.btn.small { padding: 6px 11px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.link { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ================================= cards ================================ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head h2 { font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.empty { text-align: center; color: var(--muted); padding: 36px 12px; }
.empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* ================================ landing =============================== */
.hero {
  background: linear-gradient(120deg, var(--navy) 0%, #2f4466 60%, #3b5277 100%);
  color: #fff; border-radius: 16px; padding: 40px 36px; position: relative; overflow: hidden; margin-bottom: 28px;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px;
  background: var(--gold); opacity: .18; transform: rotate(45deg);
}
.hero h1 { font-family: Aleo, Georgia, serif; font-size: 34px; font-weight: 700; max-width: 640px; }
.hero p { margin: 10px 0 0; color: #d7deea; max-width: 600px; font-size: 15.5px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.section-title h2 { font-size: 20px; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.i-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); text-decoration: none; color: inherit; position: relative;
  border-top: 4px solid var(--gold); transition: transform .15s, box-shadow .15s;
}
a.i-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(16, 24, 40, .12); }
.i-card h3 { font-size: 17px; color: var(--navy); }
.i-card .tag-new ~ h3 { padding-right: 48px; }
.i-card p { margin: 0; color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--text); }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta svg { width: 15px; height: 15px; stroke: var(--gold); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
.i-card .cta { font-weight: 600; color: var(--blue); font-size: 13.5px; }
.tag-new { position: absolute; top: 14px; right: 14px; }
.i-card.done { border-top-color: var(--navy); }
.i-card.done .tag-new ~ h3 { padding-right: 84px; }
.i-card .rating { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; white-space: nowrap; }
.i-card .rating .stars-static svg { width: 11px; height: 11px; }
.i-card.done .foot { flex-wrap: wrap; gap: 6px 10px; }

/* ========================= partner logo strip ========================= */
.partners { margin-top: 40px; padding: 26px 0 30px; background: var(--card); border-top: 1px solid var(--line); }
.partners h2 { text-align: center; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 18px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee var(--dur, 30s) linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.partner-logo { flex: none; width: 150px; height: 64px; margin: 0 22px; display: flex; align-items: center; justify-content: center; }
.partner-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .marquee-track [aria-hidden="true"] { display: none; }
}
@media (max-width: 600px) { .partner-logo { width: 110px; height: 48px; margin: 0 14px; } }

/* ================================ badges ================================ */
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; background: #eef1f6; color: var(--muted); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.err { background: var(--err-bg); color: var(--err); }
.badge.blue { background: #e7effa; color: var(--blue); }
.badge.gold { background: var(--gold-soft); color: #7a6533; }

/* ================================= forms ================================ */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12.5px; font-weight: 600; color: #3a4456; }
.field > span .req { color: var(--red); }
.field > span small { font-weight: 400; color: var(--muted); }
.field .help { font-size: 12px; color: var(--muted); }
.field .err-msg { font-size: 12px; color: var(--err); display: none; }
.field.invalid .err-msg { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--err); background: #fffafa; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  font: inherit; font-size: 14px; color: var(--text);
  padding: 9px 11px; border: 1px solid #d0d6e0; border-radius: 8px; background: #fff; width: 100%;
}
input:read-only:not([type=checkbox]) { background: #f4f6f9; color: var(--muted); }
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #bcd0f0; border-color: var(--blue); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--navy); }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; }
.check input { margin-top: 2px; flex: none; }
.form-section { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin: 6px 0 -4px; }
.alert { padding: 10px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 14px; }
.alert.err { background: var(--err-bg); color: var(--err); }
.alert.info { background: #e7effa; color: #1d4380; }
.alert.warn { background: var(--warn-bg); color: var(--warn); }

/* ================================ auth ================================== */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; max-width: 960px; margin: 10px auto; background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.auth-side { background: linear-gradient(150deg, var(--navy), #34507a); color: #fff; padding: 36px; display: flex; flex-direction: column; gap: 14px; }
.auth-side h2 { font-family: Aleo, Georgia, serif; font-size: 26px; }
.auth-side p { color: #d7deea; margin: 0; }
.auth-side .picked { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px; padding: 14px; }
.auth-side .picked strong { display: block; font-size: 15px; }
.auth-side .picked span { font-size: 13px; color: #d7deea; }
.auth-side ul { margin: 0; padding-left: 18px; color: #d7deea; font-size: 13.5px; }
.auth-main { padding: 36px; }
.tabs { display: flex; gap: 4px; background: #eef1f6; border-radius: 10px; padding: 4px; margin-bottom: 22px; }
.tabs button { flex: 1; border: 0; background: none; font: inherit; font-weight: 600; padding: 9px; border-radius: 7px; cursor: pointer; color: var(--muted); }
.tabs button.active { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* =========================== dashboard layout =========================== */
.dash { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.side-nav { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; position: sticky; top: 84px; box-shadow: var(--shadow); }
.side-nav button, .side-nav a {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; font: inherit; font-weight: 500;
  padding: 10px 12px; border-radius: 8px; cursor: pointer; color: var(--text); text-align: left; text-decoration: none;
}
.side-nav button:hover, .side-nav a:hover { background: #f4f6f9; }
.side-nav button.active { background: var(--navy); color: #fff; }
.side-nav svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side-nav .count { margin-left: auto; font-size: 11.5px; background: #eef1f6; color: var(--muted); padding: 1px 8px; border-radius: 99px; }
.side-nav button.active .count { background: rgba(255, 255, 255, .2); color: #fff; }
.side-nav hr { border: 0; border-top: 1px solid var(--line); margin: 8px 4px; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title h1 { font-size: 22px; }

/* ================================= stats ================================ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat .label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 26px; font-weight: 700; color: var(--navy); margin-top: 4px; }
.stat .value small { font-size: 14px; color: var(--muted); font-weight: 500; }
.dist { display: flex; flex-direction: column; gap: 5px; }
.dist-row { display: grid; grid-template-columns: 34px 1fr 28px; align-items: center; gap: 8px; font-size: 12.5px; }
.dist-row .bar { height: 9px; background: #eef1f6; border-radius: 99px; overflow: hidden; }
.dist-row .bar div { height: 100%; background: var(--star); border-radius: 99px; }

/* ================================= table ================================ */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f7f8fb; font-weight: 600; color: var(--muted); font-size: 12px; white-space: nowrap; position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfd; }
tr.clickable { cursor: pointer; }
td.nowrap { white-space: nowrap; }
td .sub { display: block; font-size: 12px; color: var(--muted); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar input[type=search] { width: 240px; }

/* ================================= stars ================================ */
.stars { display: inline-flex; gap: 2px; flex-wrap: wrap; }
.stars button { border: 0; background: none; padding: 1px; cursor: pointer; line-height: 0; }
.stars svg { width: 26px; height: 26px; fill: #dfe3ea; transition: fill .1s, transform .1s; }
.stars button:hover svg { transform: scale(1.12); }
.stars .on svg { fill: var(--star); }
.stars-static { display: inline-flex; gap: 1px; vertical-align: middle; }
.stars-static svg { width: 14px; height: 14px; fill: #dfe3ea; }
.stars-static .on { fill: var(--star); }
.rating-label { font-weight: 700; color: var(--navy); margin-left: 8px; }

/* ============================== course cards ============================ */
.course { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.course h3 { font-size: 16px; color: var(--navy); }
.course .regno { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; color: var(--text); }
.course-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.feedback-box { margin-top: 14px; padding: 14px; background: #fafbfd; border: 1px solid var(--line); border-radius: 10px; }
.quote { margin: 6px 0 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--text); white-space: pre-wrap; }

.cert-thumb { background: #e9ecf1; border-radius: 10px; padding: 12px; }
.cert-thumb canvas { display: block; width: 100%; height: auto; box-shadow: 0 4px 18px rgba(20, 30, 50, .16); background: #fff; }

/* ================================= modal ================================ */
.modal-back { position: fixed; inset: 0; background: rgba(16, 24, 40, .55); display: grid; place-items: center; padding: 16px; z-index: 100; animation: fade .15s; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); animation: pop .18s; }
.modal.lg { max-width: 980px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; }
.modal-close { border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }

.summary { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; font-size: 13.5px; margin: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; word-break: break-word; }

.success { text-align: center; padding: 20px 10px; }
.success .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); display: grid; place-items: center; margin: 0 auto 14px; }
.success .tick svg { width: 32px; height: 32px; stroke: var(--ok); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.success .regno-big { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-size: 22px; font-weight: 700; color: var(--navy); background: var(--gold-soft); padding: 8px 18px; border-radius: 10px; margin: 10px 0; }

/* ============================== toast/progress ========================== */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 8px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 200; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--err); }
.progress { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); margin: 10px 0; }
.progress .bar { flex: 1; height: 6px; background: #e6e9ef; border-radius: 99px; overflow: hidden; }
.progress .bar div { height: 100%; width: 0; background: var(--blue); transition: width .15s; }
.loading { color: var(--muted); padding: 30px; text-align: center; }

/* =============================== responsive ============================= */
@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }
  .side-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; }
  .side-nav button, .side-nav a { width: auto; white-space: nowrap; }
  .side-nav hr { display: none; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { padding: 24px; }
}
@media (max-width: 600px) {
  main { padding: 16px; }
  .topbar { padding: 8px 16px; }
  .brand img { height: 34px; }
  .brand span { display: none; }
  .hero { padding: 28px 22px; }
  .hero h1 { font-size: 26px; }
  .form-grid { grid-template-columns: 1fr; }
  .auth-main { padding: 22px; }
  .course { grid-template-columns: 1fr; }
  .course-actions { justify-content: flex-start; }
  .summary { grid-template-columns: 1fr; gap: 2px; }
  .summary dd { margin-bottom: 8px; }
  .toolbar input[type=search] { width: 100%; }
  .nav .who { display: none; }
}

/* ============================ v3 additions ============================ */
.logo-pick { display: flex; align-items: center; gap: 14px; }
.logo-preview { width: 96px; height: 96px; border: 1px dashed #c9cfda; border-radius: 10px; display: grid; place-items: center; background: #fafbfd; overflow: hidden; flex: none; color: var(--muted); font-size: 12px; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.field.invalid .logo-preview { border-color: var(--err); }

.partner { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.partner img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.inst-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #fff; flex: none; }
.inst-logo.lg { width: 72px; height: 72px; }
.row { display: flex; align-items: center; gap: 12px; }

.approval { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.approval + .approval { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.approval h3 { font-size: 15.5px; color: var(--navy); }
.approval .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.side-nav .count.alert-count { background: var(--red); color: #fff; }

.portal-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.verify-result { border-radius: 12px; padding: 20px; border: 2px solid; }
.verify-result.ok { border-color: #9fd4b4; background: #f2fbf5; }
.verify-result.bad { border-color: #f0b8b2; background: #fff6f5; }
.verify-result.warn { border-color: #f2d08f; background: #fffaf0; }
.verify-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.verify-head .icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.verify-head .icon svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ok .verify-head .icon { background: var(--ok); }
.bad .verify-head .icon { background: var(--err); }
.warn .verify-head .icon { background: var(--warn); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.pdf-frame { width: 100%; aspect-ratio: 792 / 612; border: 0; border-radius: 8px; background: #e9ecf1; display: block; }
.notice-bar { background: var(--warn-bg); color: var(--warn); padding: 8px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
@media (max-width: 600px) {
  .approval { grid-template-columns: auto minmax(0, 1fr); }
  .approval .actions { grid-column: 1 / -1; justify-content: flex-start; }
  .portal-choice { grid-template-columns: 1fr; }
}

/* ======================= banners & internship details ======================= */
.i-card.has-banner { padding-top: 0; border-top: 0; overflow: hidden; }
.i-banner { margin: 0 -20px 4px; aspect-ratio: 16 / 9; background: #eef1f6; overflow: hidden; }
.i-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* posters and other tall images are shown whole instead of cropped */
.i-banner img.fit { object-fit: contain; }
.i-card.has-banner .tag-new { top: 12px; right: 12px; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.i-card.has-banner .tag-new ~ h3 { padding-right: 0; }
.i-card.done { cursor: pointer; }
.i-card.done:hover { box-shadow: 0 8px 28px rgba(16, 24, 40, .12); }
.d-banner { width: 100%; max-height: 60vh; object-fit: contain; background: #f4f5f8; border-radius: 10px; display: block; margin-bottom: 14px; }
.d-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.d-facts > div { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.d-ic svg { width: 18px; height: 18px; stroke: var(--gold); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.d-h { font-size: 15px; color: var(--navy); margin: 18px 0 6px; }
.d-p { margin: 0; white-space: pre-wrap; line-height: 1.6; }
.d-list { margin: 0; padding-left: 20px; line-height: 1.7; }
.detail-banner { display: block; width: 100%; max-height: 320px; object-fit: contain; background: #e9ecf2; border-radius: var(--radius); margin-top: 10px; }
.banner-pick { display: grid; gap: 8px; }
.banner-preview { aspect-ratio: 16 / 9; max-width: 360px; border: 1px dashed var(--line); border-radius: 10px; display: grid; place-items: center; overflow: hidden; background: #f7f8fb; color: var(--muted); font-size: 13px; }
.banner-preview img { width: 100%; height: 100%; object-fit: contain; }

/* ================================ signatures ================================ */
.sig-pad { position: relative; border: 1px dashed var(--line); border-radius: 10px; background: #fff; max-width: 600px; }
.sig-pad canvas { display: block; width: 100%; aspect-ratio: 3 / 1; touch-action: none; cursor: crosshair; }
.sig-pad::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: 22%; border-bottom: 1px solid #c8cdd8; pointer-events: none; }
.sig-hint { position: absolute; left: 9%; bottom: 24%; color: #b3b9c6; font-size: 13px; pointer-events: none; }
.sig-current { display: inline-block; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin: 6px 0 12px; }
.sig-current img { display: block; max-height: 70px; max-width: 280px; }
.inline-icon { width: 15px; height: 15px; stroke: var(--gold); fill: none; stroke-width: 2; vertical-align: -3px; }

/* ============================ event types & sharing ============================ */
.badge.type-badge { background: #e8edf6; color: var(--navy); align-self: flex-start; text-transform: uppercase; letter-spacing: .04em; font-size: 10.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 99px; padding: 5px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.share-btn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--card); color: var(--navy); border-radius: 99px; padding: 4px 10px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.share-btn:hover { border-color: var(--navy); }
.share-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.share-link { display: flex; gap: 8px; margin: 10px 0 14px; }
.share-link input { flex: 1; min-width: 0; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.share-net { border: 0; border-radius: 10px; padding: 11px 10px; font: inherit; font-weight: 600; font-size: 14px; color: #fff; cursor: pointer; }
.share-net:hover { filter: brightness(1.08); }
.net-whatsapp { background: #1f9e55; } .net-facebook { background: #1b5fd1; } .net-linkedin { background: #0a66c2; }
.net-x { background: #111; } .net-telegram { background: #2a9bd8; } .net-email { background: #5b6475; } .net-more { background: var(--gold); }

/* ============================ certificate design picker ============================ */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tpl-card { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: left; border: 2px solid var(--line); border-radius: 10px; background: var(--card); padding: 6px 6px 8px; font: inherit; cursor: pointer; color: var(--text); }
.tpl-card img, .tpl-auto { width: 100%; aspect-ratio: 841 / 595; object-fit: cover; border-radius: 6px; border: 1px solid #edf0f5; display: block; }
.tpl-auto { position: relative; overflow: hidden; }
.tpl-auto img { border: 0; opacity: .55; }
.tpl-auto::after { content: "AUTO"; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; letter-spacing: .1em; color: var(--navy); font-size: 13px; }
.tpl-card b { font-size: 13px; margin-top: 3px; }
.tpl-card small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.tpl-card:hover { border-color: #b9c3d6; }
.tpl-card.active { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(37, 51, 75, .12); }

.tpl-card { position: relative; }
.tpl-badge { display: inline-block; vertical-align: 1px; margin-left: 2px; background: linear-gradient(90deg, #7c5e1a, #e9d18a, #a8822a); color: #1d1606; font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 2px 7px; border-radius: 99px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
