/* SOLTECH Proposal Portal. Brand tokens carried over from the Aug 2026 Word template theme. */

:root {
  --text:      #282929;
  --text-dark: #363738;
  --navy:      #2C447E;
  --blue:      #3C5BA8;
  --lime:      #8DC63F;
  --lime-tint: #F1F8E6;
  --coral:     #EE5E53;
  --sky:       #3FA9F5;
  --sky-tint:  #EAF5FE;
  --orange:    #FC9024;
  --bar:       #FDAB58;
  --grey:      #6D6E71;
  --grey-line: #DDDEDF;
  --page-bg:   #E9E9E9;
  --font:      "Arial Nova", Arial, "Helvetica Neue", Helvetica, sans-serif;
  --content-max: 8.5in;
  --nav-width: 230px;
  --action-bar-h: 64px;
}

* { box-sizing: border-box; }
html { background: var(--page-bg); scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 11pt;
  line-height: 1.45;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--blue); }
code { font-family: Consolas, "Courier New", monospace; font-size: 0.92em; background: #f3f3f3; padding: 0 3px; border-radius: 2px; }
pre { background: #f6f6f6; border: 1px solid var(--grey-line); padding: 10px 12px; overflow: auto; font-size: 10pt; }
pre code { background: none; padding: 0; }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--lime); margin: 24px 0; }
blockquote { margin: 10px 0 14px; padding: 4px 16px; border-left: 4px solid var(--sky); color: var(--text-dark); }

/* ---------- Page layout: document plus sticky side panel ---------- */
.page-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.35in;
  max-width: calc(var(--content-max) + var(--nav-width) * 2 + 3in);
  margin: 0.25in auto 0.5in;
  padding: 0 0.3in;
}
.shell {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(var(--content-max) + 1.8in);
  padding: 0.35in 0.9in 0.6in;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.shell-narrow { max-width: var(--content-max); min-height: 60vh; margin: 0.3in auto; }

.side-left, .side-panel {
  flex: 0 0 var(--nav-width);
  position: sticky;
  top: calc(var(--header-h) + 0.25in);
  max-height: calc(100vh - var(--header-h) - 0.5in);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.panel-card {
  background: #fff;
  border-left: 4px solid var(--lime);
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  padding: 12px 14px;
  font-size: 9.5pt;
  line-height: 1.5;
  user-select: text; -webkit-user-select: text;
}
.panel-label { display: block; color: var(--grey); text-transform: uppercase; font-size: 8pt; letter-spacing: .06em; margin-bottom: 2px; }
.panel-am-name { font-weight: 700; color: var(--text-dark); font-size: 10.5pt; }
.panel-card a { color: var(--blue); text-decoration: none; }
.panel-actions { display: flex; flex-direction: column; gap: 8px; }
.panel-actions .btn { width: 100%; text-align: center; }
.panel-callout {
  background: var(--sky-tint);
  border-left: 5px solid var(--sky);
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  padding: 16px 16px 18px;
}
.panel-callout-title { margin: 0 0 6px; color: var(--navy); font-size: 14pt; font-weight: 700; line-height: 1.2; }
.panel-callout-text { margin: 0 0 14px; color: var(--text-dark); font-size: 10pt; line-height: 1.45; }

/* ---------- Sticky page header (above the document and panel) ---------- */
:root { --header-h: 150px; }
.page-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  border-bottom: 3px solid var(--lime);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.page-header-inner {
  max-width: calc(var(--content-max) + var(--nav-width) * 2 + 3in);
  margin: 0 auto;
  padding: 10px 0.3in 10px;
}
.ph-row { display: flex; align-items: center; gap: 0.35in; }
.ph-text { min-width: 0; }
.d-client {
  font-size: 15pt;
  color: var(--text-dark);
  font-weight: 700;
  margin: 0;
}
.d-logo { height: 0.45in; width: auto; flex: none; }
.d-title {
  font-size: 20pt;
  font-weight: 400;
  color: var(--blue);
  line-height: 1.1;
  margin: 6px 0 2px;
  border: 0; padding: 0; text-transform: none;
}
.d-subtitle {
  font-size: 12pt;
  color: var(--lime);
  text-transform: uppercase;
  margin: 0 0 4px 0;
  letter-spacing: .02em;
}
.d-meta {
  display: flex; flex-wrap: wrap; gap: 2px 28px;
  font-size: 9pt; color: var(--grey);
  margin: 0;
  user-select: text; -webkit-user-select: text;
}
.d-meta b { color: var(--text); font-weight: 700; }

/* Sticky header hierarchy: document type, client, project, then dates */
.page-header .d-logo { height: 0.65in; width: auto; }
.page-header .ph-row { margin-left: calc(var(--nav-width) + 0.35in); }
.page-header .d-logo { position: absolute; left: 0.3in; top: 50%; transform: translateY(-50%); }
.page-header .d-title { font-size: 18pt; color: var(--blue); text-transform: uppercase; letter-spacing: .02em; margin: 0; }
.page-header .d-client { font-size: 13pt; color: var(--lime); text-transform: uppercase; letter-spacing: .02em; margin: 14px 0 0; }
.page-header .d-subtitle { font-size: 11pt; color: var(--grey); font-weight: 700; text-transform: none; letter-spacing: 0; margin: 2px 0 6px; }
.page-header .d-meta b { color: var(--grey); }

/* Header used by the home and unavailable pages (inside the document) */
.doc-header { margin-bottom: 18px; border-bottom: 3px solid var(--lime); padding-bottom: 12px; }
.doc-header .d-title { font-size: 26pt; margin: 0 0 6px; }
.doc-header .d-logo { height: 0.6in; }
.doc-header-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.doc-header-inner .d-title { margin-bottom: 6px; }

/* ---------- Body ---------- */
.doc-main { max-width: var(--content-max); }
.doc-main-plain { max-width: none; }

.side-nav {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  padding: 12px 0 8px;
  font-size: 9.5pt;
}
.side-nav-title {
  color: var(--blue);
  font-size: 13pt;
  font-weight: 400;
  text-transform: uppercase;
  padding: 0 14px 6px;
  margin: 0 0 4px;
}
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav li a {
  display: block;
  padding: 5px 14px;
  color: var(--text-dark);
  text-decoration: none;
  border-left: 3px solid transparent;
  line-height: 1.3;
  font-size: 10pt;
}
.side-nav li a:hover { color: var(--blue); }
.side-nav li a.active { color: var(--blue); border-left-color: var(--lime); font-weight: 700; background: var(--lime-tint); }

/* ---------- Headings ---------- */
h1, h2, h3, h4, h5, h6 { font-weight: 400; line-height: 1.2; }
.doc-main h1 {
  font-size: 18pt;
  color: var(--blue);
  text-transform: uppercase;
  border-left: 6px solid var(--bar);
  border-bottom: 1px solid var(--lime);
  padding: 2px 0 3px 10px;
  margin: 30px 0 10px 0;
}
.doc-main > h1:first-child { margin-top: 4px; }

/* ---------- Collapsible H1 sections ---------- */
details.section { margin: 0; }
details.section > summary {
  list-style: none;
  cursor: pointer;
  position: relative;
}
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary h1 { margin-top: 30px; padding-right: 32px; }
details.section:first-child > summary h1 { margin-top: 4px; }
details.section > summary h1::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 10px; height: 10px;
  margin-top: -8px;
  border-right: 2px solid var(--lime);
  border-bottom: 2px solid var(--lime);
  transform: rotate(45deg);
  transition: transform .15s ease;
}
details.section:not([open]) > summary h1::after { transform: rotate(-45deg); margin-top: -4px; }
details.section > summary:hover h1 { background: var(--lime-tint); }
details.section > .section-body > :last-child { margin-bottom: 8px; }
.doc-main h2 { font-size: 16pt; color: var(--coral);  margin: 24px 0 6px 0; }
.doc-main h3 { font-size: 14pt; color: var(--sky);    margin: 18px 0 6px 0; }
.doc-main h4 { font-size: 12pt; color: var(--orange); margin: 16px 0 6px 0; }
.doc-main h5 { font-size: 11pt; color: var(--text-dark); font-weight: 700; margin: 14px 0 6px 0; }
.doc-main h6 { font-size: 11pt; color: var(--text-dark); font-weight: 700; text-decoration: underline; margin: 14px 0 6px 0; }

p { margin: 0 0 9px 0; }
ul, ol { margin: 0 0 10px 0; padding-left: 28px; }
li { margin-bottom: 3px; }
ul ul { list-style-type: circle; margin-top: 3px; }
.task-list-item { list-style: none; margin-left: -20px; }
.task-list-item input { margin-right: 6px; }
.caption { font-size: 9pt; font-style: italic; color: var(--navy); margin: 4px 0 14px 0; }

/* ---------- Tables (SOLTECH lime style by default) ---------- */
.table-wrap { overflow-x: auto; margin: 8px 0 12px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5pt;
}
th, td { padding: 6px 9px; text-align: left; vertical-align: top; border: 1px solid var(--lime); }
th { font-weight: 700; background: var(--lime); color: #fff; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.total td { font-weight: 700; background: var(--lime-tint); }
.pricing table th { background: var(--sky); border-color: var(--sky); }
.pricing table td { border-color: var(--sky); }
.pricing tr.total td { background: var(--sky-tint); }

/* ---------- Custom containers ---------- */
.callout {
  background: var(--lime-tint);
  border-left: 5px solid var(--lime);
  padding: 12px 16px 6px;
  margin: 14px 0 18px;
}
.callout > :first-child { margin-top: 0; }
.pricing { margin: 10px 0 18px; }

.signature {
  margin: 24px 0 10px;
  border-left: 5px solid var(--sky);
  background: var(--sky-tint);
  padding: 12px 16px 6px;
}
.signature > :first-child { margin-top: 0; }

/* ---------- Footer ---------- */
.doc-footer {
  margin-top: 28px;
  padding-top: 10px;
  border-top: 1px solid var(--grey-line);
  font-size: 9pt;
  color: var(--grey);
}
.doc-footer .legal { margin: 0; }

/* ---------- Action bar ---------- */
.action-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  background: var(--sky);
  border-top: 3px solid var(--lime);
  box-shadow: 0 -2px 12px rgba(0,0,0,.18);
}
.action-bar .btn { border-color: #fff; color: #fff; background: transparent; }
.action-bar .btn:hover { background: rgba(255,255,255,.15); }
.action-bar .btn-primary { background: #fff; color: var(--blue); }
.action-bar .btn-primary:hover { background: var(--lime-tint); border-color: #fff; color: var(--navy); }
.action-bar-inner {
  max-width: calc(var(--content-max) + var(--nav-width) + 2.5in);
  margin: 0 auto;
  padding: 12px 0.9in;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--action-bar-h);
}
.action-bar-am { color: #fff; font-size: 10pt; display: flex; flex-direction: column; gap: 2px; }
.action-bar-am .panel-label { color: rgba(255,255,255,.85); }
.action-bar-am a { color: #fff; text-decoration: none; }
.action-bar-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.action-fab { display: none; }

.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 10.5pt;
  font-weight: 700;
  padding: 9px 18px;
  border: 2px solid var(--blue);
  border-radius: 3px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}
.btn:hover { background: var(--sky-tint); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--navy); border-color: var(--navy); }
.btn[disabled] { opacity: .6; cursor: default; }

/* ---------- Modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(40, 41, 41, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal-card {
  position: relative;
  background: #fff;
  width: 100%; max-width: 520px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 24px 28px;
  border-top: 5px solid var(--lime);
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
  user-select: text; -webkit-user-select: text;
}
.modal-card h2 { color: var(--blue); font-size: 18pt; margin: 0 0 8px; }
.modal-close {
  position: absolute; top: 8px; right: 10px;
  border: 0; background: none; font-size: 24px; line-height: 1;
  color: var(--grey); cursor: pointer;
}
.action-form label { display: block; font-size: 10pt; font-weight: 700; color: var(--text-dark); margin: 12px 0 0; }
.action-form .optional { font-weight: 400; color: var(--grey); }
.action-form input, .action-form textarea {
  display: block; width: 100%; margin-top: 4px;
  font-family: var(--font); font-size: 11pt; font-weight: 400;
  padding: 8px 10px; border: 1px solid #BFC0C2; border-radius: 3px;
  user-select: text; -webkit-user-select: text;
}
.action-form input:focus, .action-form textarea:focus { outline: 2px solid var(--sky); border-color: var(--sky); }
.action-form .hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.form-actions { margin: 18px 0 0; }
.form-error { color: var(--coral); font-size: 10pt; margin: 10px 0 0; }

/* ---------- Copy and print deterrents ---------- */
.proposal-page .doc-main,
.proposal-page .doc-header,
.proposal-page .side-nav {
  user-select: none; -webkit-user-select: none;
}
.proposal-page .doc-main img { -webkit-user-drag: none; pointer-events: none; }

@media print {
  body > * { display: none !important; }
  body::after {
    display: block;
    content: "This proposal is confidential and is not available for printing. Please view it online or contact your SOLTECH account manager.";
    font-family: Arial, sans-serif;
    font-size: 14pt;
    color: #282929;
    padding: 1in;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .page-header .ph-row { margin-left: 0; }
  .page-header .d-logo { position: static; transform: none; }
  .side-left, .side-panel { display: none; }
  .action-bar { display: block; }
  .page-wrap { padding: 0 0.2in; }
}
@media (max-width: 760px) {
  body { font-size: 10.5pt; }
  .page-wrap { margin: 0 0 calc(var(--action-bar-h) + 24px); padding: 0; }
  .shell { padding: 20px 16px 32px; box-shadow: none; max-width: none; }
  .doc-header-inner { flex-direction: column-reverse; align-items: flex-start; gap: 10px; }
  .page-header { position: static; box-shadow: none; }
  .page-header-inner { padding: 8px 16px; }
  .ph-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .page-header .d-logo { height: 0.45in; width: auto; }
  .page-header .d-title { font-size: 13pt; }
  .page-header .d-client { font-size: 11pt; }
  .page-header .d-subtitle { font-size: 9.5pt; }
  .d-meta { font-size: 8.5pt; gap: 2px 16px; }
  .doc-main h1 { font-size: 15pt; }
  .doc-main h2 { font-size: 13.5pt; }
  .doc-main h3 { font-size: 12pt; }
  .sig-row { flex-direction: column; align-items: stretch; gap: 4px; }
  .sig-label { flex: none; }
  .action-bar-inner { display: none; padding: 12px 16px; }
  .action-bar.open .action-bar-inner { display: flex; flex-direction: column; align-items: stretch; }
  .action-bar.open .action-bar-buttons { flex-direction: column; }
  .action-bar.open .action-bar-buttons .btn { width: 100%; text-align: center; }
  .action-fab {
    display: block;
    position: fixed; right: 16px; bottom: 16px;
    padding: 12px 20px;
    border: 0; border-radius: 30px;
    background: var(--blue); color: #fff;
    font-family: var(--font); font-weight: 700; font-size: 11pt;
    box-shadow: 0 4px 14px rgba(0,0,0,.3);
    cursor: pointer;
  }
  .action-bar.open .action-fab { bottom: auto; top: -52px; background: var(--grey); }
  .action-bar { border-top: 0; box-shadow: none; background: transparent; }
  .action-bar.open { background: var(--sky); border-top: 3px solid var(--lime); box-shadow: 0 -2px 12px rgba(0,0,0,.18); }
  .action-fab { background: var(--sky); }
  .modal-card { padding: 20px 18px; }
}

[hidden] { display: none !important; }
.build-label { position: fixed; right: 8px; bottom: 4px; font-size: 10px; color: #8a94a3; opacity: .8; pointer-events: none; z-index: 5; }

/* Admin area */
.admin-page { background: #f4f6f9; }
.admin-shell { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }
.admin-header { display: flex; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid #d5dbe3; }
.admin-header .d-logo { height: 0.55in; width: auto; }
.admin-header h1 { margin: 0; font-size: 20pt; color: var(--blue); }
.admin-body { display: flex; gap: 28px; align-items: flex-start; margin-top: 20px; }
.admin-nav { flex: 0 0 220px; background: #fff; border: 1px solid #d5dbe3; border-radius: 6px; padding: 14px 0; }
.admin-nav-title { margin: 0 16px 8px; font-size: 10pt; text-transform: uppercase; letter-spacing: .06em; color: #6b7686; }
.admin-nav ul { list-style: none; margin: 0; padding: 0; }
.admin-nav a { display: block; padding: 9px 16px; color: var(--blue); text-decoration: none; border-left: 4px solid transparent; }
.admin-nav a.active, .admin-nav a:hover { background: #eaf3fb; border-left-color: var(--sky, #4aa3df); }
.admin-main { flex: 1; min-width: 0; background: #fff; border: 1px solid #d5dbe3; border-radius: 6px; padding: 8px 24px 24px; }
.admin-main h2 { color: var(--blue); }
.admin-main h3 { margin: 24px 0 8px; }
.admin-form label { display: block; margin: 10px 0; font-weight: 600; }
.admin-form input[type=text] { display: block; width: 100%; max-width: 420px; padding: 8px; margin-top: 4px; font: inherit; border: 1px solid #b9c2cf; border-radius: 4px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e3e8ef; vertical-align: middle; }
.admin-table th { font-size: 10pt; color: #6b7686; }
.admin-table form { margin: 0; }
.admin-msg { background: #e8f6ec; border-left: 4px solid #2e9e57; padding: 8px 12px; }
.admin-err { background: #fdecea; border-left: 4px solid #c0392b; padding: 8px 12px; }
@media (max-width: 760px) { .admin-body { flex-direction: column; } .admin-nav { flex: none; width: 100%; box-sizing: border-box; } }
.admin-filter { width: 100%; max-width: 420px; padding: 8px; font: inherit; border: 1px solid #b9c2cf; border-radius: 4px; }
.admin-table th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
.admin-table th[data-sort]:hover { color: var(--blue); }
.admin-table th.asc::after { content: " \25B2"; font-size: 8pt; }
.admin-table th.desc::after { content: " \25BC"; font-size: 8pt; }
.admin-table td.msg { white-space: pre-wrap; max-width: 320px; }
.admin-table tr.ignored td { opacity: .5; font-style: italic; }
.admin-stats { display: flex; flex-wrap: wrap; gap: 8px 24px; background: #f4f6f9; padding: 10px 14px; border-radius: 6px; }
