:root {
  --red: #d92b23;
  --ink: #1a1a1a;
  --gray: #6b6b6b;
  --line: #e6e2dd;
  --bg: #faf9f7;
}
* { box-sizing: border-box; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.55;
}
.page, .wrap { max-width: 760px; margin: 0 auto; padding: 0 18px; }
.serif, h1 { font-family: "Playfair Display", Georgia, "Times New Roman", serif; }

/* masthead */
.masthead { text-align: center; padding: 44px 0 8px; }
.shield-rule { display: flex; align-items: center; gap: 18px; justify-content: center; margin-bottom: 14px; }
.shield-rule .rule { height: 1px; background: var(--line); flex: 1; max-width: 220px; }
.shield { width: 46px; height: 46px; }
h1 {
  font-size: clamp(34px, 6vw, 52px); font-weight: 600; letter-spacing: .5px; color: var(--ink);
}
.red-bar { width: 64px; height: 4px; background: var(--red); margin: 14px auto 12px; }
.sub { color: var(--gray); font-size: 15.5px; }

/* cards */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 26px; margin: 22px 0; box-shadow: 0 3px 16px rgba(0, 0, 0, .05);
}
h2 { font-size: 18px; color: var(--ink); margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.stepnum {
  background: var(--ink); color: #fff; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex: none;
}
.hint { font-size: 13.5px; color: var(--gray); margin-bottom: 14px; }
label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin: 14px 0 0; }
label em { color: var(--red); font-style: normal; }
.lightnote { font-weight: 400; color: var(--gray); }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=file], input[type=password] {
  width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid #d9d4ce;
  border-radius: 8px; font-size: 15px; background: #fff; font-family: inherit; color: var(--ink);
}
input:focus { outline: 2px solid rgba(217, 43, 35, .35); border-color: var(--red); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* entry layout with device preview */
.entry-grid { display: grid; grid-template-columns: 1fr 200px; gap: 20px; align-items: start; }
@media (max-width: 640px) { .entry-grid { grid-template-columns: 1fr; } }
.device-preview {
  border: 1px solid var(--line); border-radius: 10px; padding: 14px; text-align: center;
  background: #fff; margin-top: 14px; position: sticky; top: 12px;
}
.device-preview img { max-width: 100%; max-height: 190px; object-fit: contain; }
.device-name { font-size: 12.5px; color: var(--gray); margin-top: 8px; }

/* combobox */
.combo { position: relative; }
.combo-panel {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12); max-height: 320px; overflow-y: auto;
}
.combo-opt {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer;
  font-size: 14px; border-bottom: 1px solid #f2efeb;
}
.combo-opt:last-child { border-bottom: none; }
.combo-opt:hover { background: #eef4fd; }
.combo-opt img, .combo-opt .noimg { width: 40px; height: 40px; object-fit: contain; flex: none; }
.combo-opt.addfree { color: var(--red); font-weight: 600; }
.combo-empty { padding: 12px 14px; color: var(--gray); font-size: 13.5px; }

/* summary table */
.tablewrap { overflow-x: auto; }
table.summary { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.summary th, table.summary td {
  border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: middle;
}
table.summary th { background: #f6f4f1; font-size: 12.5px; }
.pcell { display: flex; align-items: center; gap: 10px; border: none !important; }
table.summary td.pcell { border: 1px solid var(--line) !important; }
.pcell img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.mono { font-family: ui-monospace, Menlo, monospace; }
.rm {
  border: none; background: #f0edea; color: var(--gray); width: 26px; height: 26px;
  border-radius: 50%; cursor: pointer; font-size: 15px;
}
.rm:hover { background: #e3dedb; }

/* checks + buttons */
.check { display: flex; gap: 10px; font-weight: 400; align-items: flex-start; margin: 12px 0 0; font-size: 14px; }
.check input { margin-top: 3px; accent-color: var(--red); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: none; cursor: pointer; text-decoration: none; text-align: center;
  padding: 13px 22px; border-radius: 8px; font-size: 15.5px; font-weight: 700; margin-top: 18px;
}
.btn.primary { background: var(--red); color: #fff; width: 100%; }
.btn.primary:hover { background: #c02019; }
.btn.outline, .btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid #cfc9c2; }
.btn.outline:hover { border-color: var(--red); color: var(--red); }
.btn.wa { background: #25d366; color: #fff; }
.btn.wa:hover { background: #1fb757; }
.btn:disabled { opacity: .6; cursor: default; }
.link { display: inline-block; margin-top: 16px; color: var(--gray); font-size: 14px; }
.hp { position: absolute; left: -9999px; height: 0; opacity: 0; }
.alert {
  background: #fdecec; color: #8f1f1f; border: 1px solid #f3c2c2;
  padding: 12px 16px; border-radius: 10px; margin-top: 18px; font-size: 14.5px;
}

/* success */
.success { text-align: center; padding: 44px 26px; }
.success h2 { justify-content: center; font-size: 24px; }
.tick {
  width: 62px; height: 62px; border-radius: 50%; background: var(--red); color: #fff;
  font-size: 32px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.ref { font-size: 26px; font-weight: 800; color: var(--red); letter-spacing: 1px; margin: 6px 0 14px; }
.muted { color: var(--gray); font-size: 14px; max-width: 460px; margin: 0 auto 6px; }
.muted.small { font-size: 12.5px; margin-top: 10px; }

/* trust badges */
.badges {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin: 26px 0 8px;
}
@media (max-width: 680px) { .badges { grid-template-columns: repeat(2, 1fr); } }
.badge { text-align: center; font-size: 12px; color: var(--gray); }
.badge svg { width: 34px; height: 34px; margin-bottom: 6px; }
.badge b { display: block; color: var(--ink); font-size: 12.5px; margin-bottom: 2px; }
.tagline { text-align: center; font-size: 22px; margin: 26px 0 6px; color: var(--ink); }
.tagline span { color: var(--red); }
.foot { text-align: center; color: #9b948d; font-size: 12.5px; padding: 22px 18px 44px; }

/* admin table (kept for /admin/) */
table.admin { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.admin th, table.admin td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.admin th { background: #f6f4f1; color: var(--ink); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.tag.pending { background: #fff4dd; color: #8a6100; }
.tag.verified { background: #e2f8e9; color: #17753c; }
