
:root {
  --accent-color: #1e458a;       /* deep navy */
  --card-bg: #fcfcfc;            /* slightly off-white */
  --shadow-light: rgba(0, 0, 0, 0.08);
}



/* ---------------------- */
/*       Main Content     */
/* ---------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:  
  'Gotham SSm A', 'Gotham SSm B',  
  'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--text-color);
  background-color: #1E386A;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  position: relative;
  flex: 1; /* let this section grow to fill space between header & footer */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  height: 100vh;
  background-color: #1E3860;
}

.p-5em {
  padding: 5em;
}
.horizontal-tabs {
  background-color: white;
  color: #777;
  border-radius: 12px;
}
.tab-content {
  background-color: white;
  border-radius: 12px;
}
.card {
  background-color: var(--card-bg);
  box-shadow: 0 4px 12px var(--shadow-light);
  width: 100%;
  padding: 2rem;
  min-height: 800px;
  max-height: 1500px;
}

.step-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  height: 100%;
  padding-bottom: 2rem;
}

/* ---------------------- */
/*        Header          */
/* ---------------------- */
.app-header {
  font-family:  
  'Gotham SSm A', 'Gotham SSm B',  
  'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  height: 80px;
}

.app-header .logo img {
  height: 80px;
  margin-left: 5em;
}
.nav-links {
  margin-right: 10em;
}
/* Navigation links in header */
.nav-links a {
  margin-left: 1rem;
  color: #1E3860;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  padding: 10px;
}

.nav-links a:hover {
  color: #1E3860;
}
.nav-links a.active {
  color: #1E3860;
}
h1, h2 {
  font-family:  
  'Gotham SSm A', 'Gotham SSm B',  
  'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--header-color) !important;
}
h3, h5, h6 {
  font-family:  
  'Gotham SSm A', 'Gotham SSm B',  
  'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--subheader-color) !important;
  font-size: 1.25em;
}

/* ---------------------- */
/*     Multi-Step Form    */
/* ---------------------- */
/* Labels and descriptions */
.form-check-label {
  font-family:  
  'Gotham SSm A', 'Gotham SSm B',  
  'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
}

/* Inputs and checkboxes */
.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(30, 69, 138, 0.2);
  border-color: var(--accent-color);
}

/* Primary button */
.btn-primary {
  background-color: var(--accent-color);
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font-family:  
  'Gotham SSm A', 'Gotham SSm B',  
  'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.btn-primary:hover {
  background-color: #12345f;
}

/* Secondary (outline) button */
.btn-outline-secondary {
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font-family:  
  'Gotham SSm A', 'Gotham SSm B',  
  'Helvetica Neue', Helvetica, Arial, sans-serif;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-outline-secondary:hover {
  background-color: var(--accent-color);
  color: #fff;
}
/* Smooth transition classes for each step */
.form-step {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Pin button containers to bottom of each step */
.form-step .step-nav-buttons {
  margin-top: auto;
}
.form-step.visible-step {
  opacity: 1;
  transform: translateX(0%);
  pointer-events: all; /* allow clicks when visible */
}
.form-step.hidden-step {
  opacity: 0;
  transform: translateX(10%); /* slide slightly to the right when hidden */
  pointer-events: none;       /* block clicks while hidden */
}
.hidden {
  display: none !important;
}

/* ---------------------- */
/*        Footer          */
/* ---------------------- */
.app-footer {
  background-color: #fff;
  text-align: center;
  padding: 1rem;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
}

.app-footer p {
  font-size: 0.9rem;
  color: #999;
}
.box-shadow {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.pdf-mock {
  animation: fadeIn 0.35s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity:1; transform: translateY(0); }
}
/* Step 2 card: keep it a fixed viewport-ish region */
#step-2-card {
  display: flex;
  flex-direction: column;
}

/* Wrapper that holds the injected memo: constrain height and allow scrolling */
.memo-wrapper {
  flex: 1;
  max-height: calc(100vh - 240px); /* adjust so it fits below header + step indicator */
  overflow-y: auto;
  position: relative;
  padding-right: 8px; /* avoid content under scrollbar */
}

/* If the pdf-mock has overflow hidden, allow its inner pages to expand */
.pdf-mock {
  overflow: visible; /* so long content isn't clipped */
  max-width: 100%;
}


:root {
    --accent: #1E386A;
    --input-bg: #f7f8fb;
    --border: #c7cdd8;
    --radius: 6px;
    --radius-lg: 12px;
    --transition: .25s cubic-bezier(.4,.2,.2,1);
    --text: #1f2130;
    --shadow: rgba(0,0,0,0.12);
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg,#1e386a 0%,#1f456e 60%);
    min-height: 100vh;
    color: var(--text);
    display: flex;
    flex-direction: column;
  }

  /* center card vertically within viewport (assuming header sits above) */
  .container {
    width: 100%;
    max-width: 1100px;
    margin: 1.5rem auto 3rem;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 32px;
  }

  .card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px 40px;
    box-shadow: 0 24px 64px var(--shadow);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    /* ensure enough height to make vertical centering visible */
    min-height: 500px;
    max-width: 900px;
  }

  .form-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertical center inside card */
    gap: 16px;
  }

  .step-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
  }

  .step-indicator {
    background: #eef3fa;
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
  }

  .progress-bar {
    flex: 1;
    height: 8px;
    background: #e6e9f2;
    border-radius: 4px;
    overflow: hidden;
    max-width: 300px;
    position: relative;
  }

  .progress-fill {
    height: 100%;
    background: var(--accent);
    width: 50%; /* step 1 of 2 */
    transition: width .3s ease;
  }

  h2 {
    font-size: 34px;
    margin: 4px 0 12px;
    font-weight: 700;
    line-height: 1.1;
  }

  .field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 4px;
  }

  .form-group {
    display: flex;
    flex-direction: column;
    position: relative;
  }

  label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
  }

  input[type="text"] {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--input-bg);
    outline: none;
    transition: box-shadow var(--transition), border var(--transition);
  }

  input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(30,56,106,0.15);
  }

  .upload-wrapper {
    position: relative;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    background: #f9f9fb;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    transition: background var(--transition), border-color var(--transition);
  }

  .upload-wrapper:hover {
    background: #f3f5fa;
    border-color: var(--accent);
  }

  .upload-wrapper input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
  }

  .placeholder {
    color: #6f7a9c;
    font-size: 13px;
  }

  #logo-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
  }

  #logo-preview img {
    max-height: 40px;
    border-radius: 4px;
    object-fit: contain;
    border: 1px solid #d8dbe0;
  }

  .file-list {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 32px;
    align-items: center;
  }

  .file-pill {
    background: #eef3fa;
    border: 1px solid #d8dbe0;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .actions {
    margin-top: 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
    justify-content: flex-end; /* button right */
  }

  .btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: filter var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .btn-primary:hover {
    filter: brightness(1.05);
  }

  .loading {
    font-size: 14px;
    color: #555;
    margin-left: 8px;
  }

  .hidden {
    display: none !important;
  }

  .back-link {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 13px;
    cursor: pointer;
    color: var(--accent);
    text-decoration: none;
  }

  .memo-wrapper {
    margin-top: 16px;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    padding-right: 8px;
  }

  @media (max-width: 900px) {
    h2 { font-size: 28px; }
    .actions { flex-direction: column; align-items: stretch; }
  }

  .pdf-mock {
    max-width: 960px;
    margin: 0 auto;
    background: #fff;
    padding: 24px 30px;
    border: 1px solid #d8dbe0;
    border-radius: 3px;
    font-family: "Helvetica Neue", Arial, sans-serif;
    color: #1f2130;
    line-height: 1.2;
    box-sizing: border-box;
  }

  /* Header imitation with dotted separator */
  .memo-header {
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px dotted #999;
    padding-bottom: 10px;
    margin-bottom: 12px;
  }
  .memo-header .logo-box {
    padding: 8px;
    border: 1px solid #999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
  }
  .memo-header .title {
    flex: 1;
    font-weight: bold;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .company-line {
    margin: 4px 0 16px;
    font-size: 14px;
  }

  .section-title {
    font-size: 20px;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 8px;
  }

  h1 {
    margin: 0;
    font-size: 24px;
  }

  p {
    margin: 6px 0;
    font-size: 13px;
  }

  ul {
    margin: 6px 0 12px 18px;
    padding: 0;
    font-size: 13px;
    list-style-type: disc;
  }

  /* Tables */
.table-pdf {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
  margin-bottom: 12px;
  font-size: 10px;
  table-layout: auto;  /* Auto layout for better column width distribution */
  word-wrap: break-word;
}
  .table-pdf th {
  background: #1E386A;
  color: white;
  font-weight: 600;
  padding: 6px 4px;  /* Reduced right padding */
  border: 1px solid #0f234f;
  text-align: left;
  font-size: 10px;
  word-wrap: break-word;
  white-space: normal;  /* Allow text wrapping */
}
.table-pdf td {
  background: #f9f9fb;
  padding: 6px 4px;  /* Reduced right padding */
  border: 1px solid #c7cdd8;
  vertical-align: top;
  font-size: 10px;
  word-wrap: break-word;
  white-space: normal;  /* Allow text wrapping */
}
  .table-pdf td.numeric {
  text-align: right;
}

/* Specific table styling for tables with few columns - use fixed layout */
.table-pdf.simple-table {
  table-layout: fixed;
}

/* Force page breaks for very wide tables */
.table-pdf.wide-table {
  font-size: 8px;  /* Even smaller font for wide tables */
}

.table-pdf.wide-table th,
.table-pdf.wide-table td {
  padding: 3px 1px;  /* Minimal padding for wide tables - reduced right padding */
  font-size: 8px;
}

  /* Policy exceptions */
  .policy-exception {
    margin-top: 16px;
  }
  .policy-exception-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1f1560;
  }

  /* Guidelines box */
  .guidelines-box {
    border: 1px solid #2f4f7f;
    padding: 12px 14px;
    font-size: 12px;
    margin-top: 16px;
    background: #f7f8fb;
    box-sizing: border-box;
  }
  .guidelines-title {
    font-weight: bold;
    text-decoration: underline;
    margin-bottom: 6px;
    font-size: 14px;
  }
  .guidelines-grid {
    margin-top: 6px;
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 4px 12px;
    align-items: start;
  }
  .guidelines-grid div {
    padding: 2px 4px;
    font-size: 12px;
  }

  .toc-box {
    border: 1px solid #444;
    padding: 12px;
    margin: 16px 0 24px;
    font-size: 13px;
    background: #fff;
    box-sizing: border-box;
    overflow: hidden;  /* Ensure content stays within the box */
  }
  .toc-box a {
    display: block;
    color: #0047b3;
    text-decoration: none;
    margin: 2px 0;
    font-size: 13px;
  }
  
  /* Ensure the two-column layout flows properly */
  .toc-box .toc-column {
    float: left;
    width: 50%;
  }
  
  .toc-box .toc-clear {
    clear: both;
    height: 0;
    overflow: hidden;
  }

  .small-note {
    font-size: 11px;
    color: #555;
    margin-top: 6px;
    line-height: 1.1;
  }

  .meta {
    font-size: 11px;
    margin-top: 12px;
  }

  .page + .page {
    margin-top: 40px;
    padding-top: 10px;
    border-top: 1px solid #ccc;
  }

  #loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  font-family: "Helvetica Neue", Arial, sans-serif;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(4px);
}

.loader-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(30,56,106,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


