/* Copyright (c) 2026 Joe Wright. All rights reserved. Proprietary software; see LICENSE.txt. */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700;800&family=Dancing+Script:wght@700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Raleway', sans-serif;
  background: #f7f5f3;
  color: #222;
  min-height: 100vh;
}

/* ── Header ── */
.portal-header {
  background: #8C1B2C;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.header-inner {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-brand { display: flex; align-items: center; gap: 12px; }
.header-logo { height: 38px; width: auto; }
.header-title { color: #fff; font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.header-sub { color: rgba(255,255,255,0.75); font-size: 0.75rem; font-weight: 500; }
.btn-signout {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  padding: 7px 16px;
  border-radius: 4px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-signout:hover { background: rgba(255,255,255,0.25); }

/* ── Header actions: Resources dropdown / My Profile / Sign Out (shared across all portal pages) ── */
.header-actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.header-dropdown { position: relative; }
.header-dropdown-btn {
  background: none; border: 1px solid rgba(255,255,255,0.45); color: #fff;
  font-family: 'Raleway', sans-serif; font-size: 0.8rem; font-weight: 600;
  padding: 7px 14px; border-radius: 4px; cursor: pointer; white-space: nowrap;
}
.header-dropdown-btn:hover { background: rgba(255,255,255,0.12); }
.header-dropdown-btn .caret { font-size: 0.7em; margin-left: 4px; }
.header-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0;
  background: #fff; border-radius: 6px; box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  min-width: 210px; padding: 6px 0; z-index: 1001;
}
.header-dropdown-menu.open { display: block; }
.header-dropdown-menu a {
  display: block; padding: 9px 16px; color: #333; font-size: 0.85rem;
  font-weight: 500; text-decoration: none; white-space: nowrap;
}
.header-dropdown-menu a:hover { background: #f7f5f3; color: #8C1B2C; }
.header-profile-link {
  color: rgba(255,255,255,0.9); font-size: 0.8rem; font-weight: 600;
  text-decoration: none; white-space: nowrap;
}
.header-profile-link:hover { color: #fff; text-decoration: underline; }

@media (max-width: 640px) {
  .portal-header { height: auto; padding: 12px 16px; }
  .header-inner { flex-wrap: wrap; row-gap: 10px; }
  .header-actions { flex-basis: 100%; justify-content: flex-start; }
}

/* ── Main content ── */
.portal-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 36px 24px 60px;
}

/* ── Cards ── */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.09);
  padding: 28px 32px;
  margin-bottom: 24px;
}

/* ── Page title ── */
.page-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #8C1B2C;
  margin-bottom: 6px;
}
.page-subtitle {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── Section heading ── */
.section-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #8C1B2C;
  margin-bottom: 14px;
}

/* ── Tip icon + hover/tap tooltip — reusable on any required-field page ── */
.tip-icon[hidden] { display: none !important; }
.tip-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; vertical-align: middle;
  background: #C8A96E; color: #fff; font-size: 0.65rem; font-weight: 800;
  font-style: normal; text-transform: none; letter-spacing: normal;
  margin-left: 6px; cursor: help; position: relative;
}
.tip-icon:focus { outline: 2px solid #8C1B2C; outline-offset: 2px; }
.tip-bubble {
  display: none; position: absolute; left: 50%; bottom: calc(100% + 8px);
  transform: translateX(-50%); width: 240px; max-width: 70vw;
  background: #2a2320; color: #fff; font-size: 0.75rem; font-weight: 500;
  line-height: 1.5; padding: 10px 12px; border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25); z-index: 50; text-align: left;
  white-space: normal;
}
.tip-bubble::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #2a2320;
}
.tip-icon:hover .tip-bubble, .tip-icon:focus .tip-bubble { display: block; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #555;
  margin-bottom: 6px;
}
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.15s;
}
.form-group input:focus { outline: none; border-color: #8C1B2C; }
.pw-wrap { position: relative; }
.pw-wrap input[type="password"], .pw-wrap input[type="text"] { padding-right: 40px !important; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 6px; line-height: 1;
  font-size: 1rem; color: #888;
}
.pw-toggle:hover { color: #8C1B2C; }

/* ── Buttons ── */
.btn-primary {
  background: #8C1B2C;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 11px 28px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
}
.btn-primary:hover { background: #6e1522; }
.btn-primary:disabled { background: #bbb; cursor: not-allowed; }
.btn-secondary {
  background: #fff;
  color: #8C1B2C;
  border: 2px solid #8C1B2C;
  border-radius: 4px;
  padding: 9px 24px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: inline-block;
}
.btn-secondary:hover { background: #8C1B2C; color: #fff; }

/* ── Alert / message ── */
.alert {
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 0.88rem;
  margin-bottom: 18px;
  display: none;
}
.alert.error   { background: #fde8eb; color: #8C1B2C; border: 1px solid #f5b8c0; display: block; }
.alert.success { background: #d4edda; color: #1a5c2e; border: 1px solid #8fd0a5; display: block; }
.alert.info    { background: #d4e8f5; color: #1a4971; border: 1px solid #90c4e8; display: block; }

/* ── Link style ── */
a.text-link { color: #8C1B2C; font-weight: 600; text-decoration: none; font-size: 0.88rem; }
a.text-link:hover { text-decoration: underline; }

/* ── Submission nav list ── */
.submission-steps { list-style: none; counter-reset: step; }
.submission-steps li {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #f0eeec;
}
.submission-steps li:last-child { border-bottom: none; }
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #8C1B2C;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-info { flex: 1; }
.step-title { font-weight: 700; font-size: 0.95rem; color: #222; }
.step-desc { font-size: 0.82rem; color: #666; margin-top: 2px; }
.step-link {
  display: inline-block;
  padding: 7px 18px;
  background: #8C1B2C;
  color: #fff;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}
.step-link:hover { background: #6e1522; }
.step-link.disabled {
  background: #ccc;
  color: #888;
  pointer-events: none;
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 0.82rem;
  color: #888;
  margin-bottom: 20px;
}
.breadcrumb a { color: #8C1B2C; text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; }

/* ── Coming soon ── */
.coming-soon {
  text-align: center;
  padding: 48px 24px;
  color: #aaa;
}
.coming-soon .cs-icon { font-size: 2.5rem; margin-bottom: 12px; }
.coming-soon h3 { font-size: 1rem; font-weight: 700; color: #666; margin-bottom: 8px; }
.coming-soon p { font-size: 0.88rem; line-height: 1.5; }

/* ── Footer ── */
.portal-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.78rem;
  color: #aaa;
  border-top: 1px solid #eee;
}

@media (max-width: 600px) {
  .portal-main { padding: 20px 14px 40px; }
  .card { padding: 20px 16px; }
  .step-link { padding: 7px 12px; font-size: 0.78rem; }
}

/* E-signature consent (Appendix A/B/C signature modal) */
.sig-consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: 0.8rem; line-height: 1.45; color: #444; cursor: pointer; text-align: left; }
.sig-consent input { margin-top: 2px; flex-shrink: 0; width: auto; }
.sig-record-note { font-size: 0.72rem; color: #888; margin-top: 3px; }
