/* ===========================================================
   Iconic Property Services — Forms Portal
   Shared stylesheet for the hub + all forms
   Brand palette taken from the Iconic logo
   =========================================================== */
:root {
  --blue: #2942A8;
  --blue-dark: #1E3380;
  --blue-light: #E8ECF7;
  --teal: #4A90C2;
  --teal-dark: #2E6A98;
  --teal-light: #E5F0F8;
  --charcoal: #3A3A3A;
  --white: #FFFFFF;
  --cream: #F8F9FC;
  --border: #DDE2EC;
  --text: #1A1F2E;
  --text-soft: #4A5060;
  --grey: #6B7280;
  --grey-light: #9CA3AF;
  --green: #1E9E6A;
  --red: #C0392B;
  --shadow: 0 2px 8px rgba(26, 31, 46, 0.06);
  --shadow-lg: 0 8px 30px rgba(26, 31, 46, 0.10);
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 12px 32px;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.nav-brand img { height: 56px; width: auto; display: block; }
.nav-brand-text { font-weight: 700; font-size: 15px; line-height: 1.2; }
.nav-brand-text span { display: block; font-weight: 400; font-size: 12px; color: var(--grey); }
.nav-back {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  transition: all .15s ease;
}
.nav-back:hover { background: var(--blue-light); border-color: var(--blue); }

/* ---------- HERO (portal) ---------- */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: var(--white);
  padding: 56px 32px 64px;
  text-align: center;
}
.hero h1 { font-size: 34px; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.5px; }
.hero p { font-size: 16px; opacity: 0.92; max-width: 620px; margin: 0 auto; }

/* ---------- LAYOUT ---------- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; }
.form-wrap { max-width: 820px; margin: 0 auto; padding: 32px 24px 80px; }

/* ---------- ADMIN / MAINTAINER NOTE (portal) ---------- */
.admin-note {
  max-width: 1100px;
  margin: -28px auto 8px;
  background: var(--white);
  border: 1px dashed var(--teal);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-soft);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: var(--shadow);
}
.admin-note .tag {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--teal-dark);
  background: var(--teal-light);
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 1px;
}
.admin-note code { background: var(--blue-light); padding: 1px 6px; border-radius: 5px; font-size: 12px; }
.admin-note a { color: var(--blue); font-weight: 600; }

/* ---------- CARD GRID (portal) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: -36px;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--teal); }
.card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--blue-light);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.card h3 { font-size: 17px; font-weight: 700; }
.card p { font-size: 14px; color: var(--text-soft); flex: 1; }
.card .doc { font-size: 12px; color: var(--grey-light); font-weight: 500; }
.card .go { font-size: 14px; font-weight: 600; color: var(--blue); }

.section-label {
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--grey);
  margin: 14px 0 -6px;
}

/* ---------- FORM PAGES ---------- */
.form-head { text-align: center; margin-bottom: 28px; }
.form-head h1 { font-size: 28px; font-weight: 800; color: var(--blue); letter-spacing: -0.4px; }
.form-head .doc { font-size: 13px; color: var(--grey); margin-top: 4px; }
.form-head .intro { font-size: 15px; color: var(--text-soft); margin-top: 12px; max-width: 600px; margin-left: auto; margin-right: auto; }

form { display: block; }

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
legend {
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
  background: var(--blue);
  padding: 6px 16px;
  border-radius: 8px;
  letter-spacing: 0.3px;
}
fieldset .hint {
  font-size: 13px;
  color: var(--grey);
  font-style: italic;
  margin: -4px 0 16px;
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field.full { grid-column: 1 / -1; }

label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
label .req { color: var(--red); margin-left: 2px; }
.sub { font-weight: 400; font-size: 12px; color: var(--grey); }

input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-light);
}
textarea { resize: vertical; min-height: 90px; }

/* checkbox & radio groups */
.opts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 4px; }
.opts.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.opt {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 400; cursor: pointer;
}
.opt input { width: 17px; height: 17px; accent-color: var(--blue); cursor: pointer; }
.opt label { margin: 0; font-weight: 400; cursor: pointer; }

/* tables (schedules / checklists) */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.grid-tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
table.grid-tbl th, table.grid-tbl td { border: 1px solid var(--border); padding: 7px 8px; text-align: left; vertical-align: middle; }
table.grid-tbl th { background: var(--blue-light); font-weight: 700; color: var(--blue-dark); text-align: center; }
table.grid-tbl td.rowhead { background: var(--cream); font-weight: 600; white-space: nowrap; }
table.grid-tbl input { padding: 6px 7px; font-size: 13px; }
table.grid-tbl input[type=time] { min-width: 96px; }
.checklist-tbl td.topic { width: 100%; }
.checklist-tbl th.yn, .checklist-tbl td.yn { text-align: center; width: 52px; }
.checklist-tbl tr.group td { background: var(--teal-light); font-weight: 700; color: var(--teal-dark); }

/* signature note */
.sig-note {
  background: var(--blue-light);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 16px;
}
.note {
  background: #FFF8E6;
  border-left: 4px solid #E0A800;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #6b5500;
  margin: 4px 0 16px;
}

/* submit */
.actions { text-align: center; margin-top: 8px; }
button[type=submit] {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: var(--white);
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 44px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
button[type=submit]:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* honeypot */
.hp { position: absolute; left: -5000px; }

/* footer */
.foot { text-align: center; padding: 28px 16px; font-size: 12px; color: var(--grey-light); }
.foot a { color: var(--grey); }

/* thank you */
.ty-wrap { max-width: 560px; margin: 0 auto; padding: 80px 24px; text-align: center; }
.ty-check {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; margin: 0 auto 22px;
}
.ty-wrap h1 { font-size: 28px; color: var(--blue); margin-bottom: 12px; }
.ty-wrap p { color: var(--text-soft); margin-bottom: 26px; }
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff; text-decoration: none; font-weight: 600;
  padding: 12px 30px; border-radius: 10px;
}

@media (max-width: 640px) {
  .row, .row-3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
  .nav { padding: 10px 16px; }
  fieldset { padding: 18px; }
}


/* ---------- SIGNATURE PAD ---------- */
[data-signature]{display:block;margin-top:4px}
.sigpad{border:1px solid var(--border);border-radius:9px;background:#fff;width:100%;max-width:440px;height:160px;display:block;touch-action:none;cursor:crosshair}
.sigpad-tools{margin-top:6px}
.sigpad-clear{font-family:inherit;font-size:13px;font-weight:600;padding:6px 14px;border:1px solid var(--border);border-radius:8px;background:var(--white);color:var(--text-soft);cursor:pointer}
.sigpad-clear:hover{background:var(--cream);border-color:var(--blue)}
