/* CLD's customer portal - one plain stylesheet, light and dark (the visitor's own setting). Same colors and look as the
   public website (CLD.Internet/Website/Web/assets/site.css): a navy band behind the header, cards that float over it,
   CLD's logo (served by the website at /logo.svg) and a footer back to the website. */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #1d2330; --muted: #5b6475; --border: #d9dde5;
  --accent: #2f5fd0; --accent-text: #ffffff; --good: #1d7a46; --warn: #a35a00; --bad: #b42318;
  --navy: #13203f; --navy-2: #1d3473; --teal: #12a89d;
  --shadow: 0 1px 2px rgba(19, 32, 63, .06), 0 8px 24px rgba(19, 32, 63, .1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171d; --surface: #1d2129; --text: #e7eaf0; --muted: #a2aab8; --border: #333a46;
    --accent: #6d95f2; --accent-text: #0e1320; --good: #4fc184; --warn: #f0a63a; --bad: #f2786c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--text); min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #145e72 100%) top / 100% 240px no-repeat, var(--bg);
}
header { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 24px; color: #ffffff; }
header a { color: #ffffff; text-decoration: none; font-weight: 600; }
header .brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 700; }
header .brand span { font-weight: 400; color: #c3cde4; font-size: .9rem; }
header a.faq { margin-left: auto; color: #ffffff; font-weight: normal; border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 6px; padding: 4px 12px; }
header a.faq:hover { background: rgba(255, 255, 255, .1); }
header .muted { color: #c3cde4; }
header button.secondary { color: #ffffff; border-color: rgba(255, 255, 255, .6); }
main { width: 100%; max-width: 640px; margin: 28px auto 32px; padding: 0 16px; flex: 1; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 24px; margin-bottom: 16px;
  box-shadow: var(--shadow); }
main > .card:first-child, main > form.card:first-child, .sections-body > .card:first-child { border-top: 4px solid var(--teal); }
h1 { font-size: 1.6rem; margin: 0 0 12px; }
h2 { font-size: 1.15rem; margin: 0 0 10px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
label { display: block; margin: 12px 0 4px; font-weight: 600; }
input[type=text], input[type=email], input[type=number], select, textarea {
  width: 100%; padding: 10px; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 6px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[type=number] { width: 110px; }
.choice { display: flex; gap: 8px; align-items: flex-start; font-weight: normal; margin: 8px 0; }
.choice label, label.choice { display: inline; margin: 0; font-weight: normal; }
.choice input { margin-top: 4px; }
button {
  font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 6px; border: 1px solid var(--accent); cursor: pointer;
  background: var(--accent); color: var(--accent-text); margin-top: 14px;
}
button:hover:not(:disabled) { filter: brightness(1.06); }
button.secondary { background: transparent; color: var(--accent); }
button.small { padding: 4px 10px; margin: 0; font-size: 0.9rem; }
button:disabled { opacity: 0.6; cursor: default; }
a { color: var(--accent); }
.message { padding: 10px 12px; border-radius: 6px; margin-top: 12px; border: 1px solid var(--border); background: var(--surface); }
.message.good { border-color: var(--good); color: var(--good); }
.message.bad { border-color: var(--bad); color: var(--bad); }
.message.warn { border-color: var(--warn); color: var(--warn); }
.code { font: 1.6rem/1.2 ui-monospace, Consolas, monospace; letter-spacing: 0.08em; padding: 12px; text-align: center;
  border: 1px dashed var(--border); border-radius: 6px; margin: 12px 0; user-select: all; }
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.total { font-weight: 700; font-size: 1.1rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
footer { border-top: 1px solid var(--border); background: var(--surface); padding: 18px 24px; text-align: center; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }
[hidden] { display: none !important; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
header #who { margin-left: auto; }
header #who ~ a.faq { margin-left: 0; }
a.button-link { display: inline-block; padding: 9px 16px; border: 1px solid var(--accent); border-radius: 6px; text-decoration: none;
  font-weight: 600; margin-top: 10px; }
a.button-link:hover { background: var(--accent); color: var(--accent-text); }
.slip .code { font-size: 2rem; }
.address { white-space: pre-line; font-size: 1.15rem; font-weight: 600; }
/* A printed payment slip: just the slip, black on white. */
@media print {
  body { background: #ffffff; color: #000000; }
  header, footer, .no-print, #message { display: none !important; }
  main { margin: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #999999; }
}
.hosted-field { height: 42px; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); }
#paypal-button { margin-top: 10px; max-width: 360px; }
input.cents { width: 70px; margin-right: 6px; }
/* Asking CLD (Portal.Ask, Portal.Ticket - C36): the question box, and a question's thread - theirs and CLD's answers. */
textarea { min-height: 160px; resize: vertical; line-height: 1.45; }
.thread { list-style: none; margin: 0; padding: 0; }
.thread li { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin: 0 0 12px; background: var(--bg); }
.thread li.cld { border-left: 4px solid var(--teal); background: var(--surface); }
.thread .who { font-weight: 600; margin-bottom: 4px; }
.thread .who span { font-weight: 400; color: var(--muted); }
.thread .text { white-space: pre-wrap; overflow-wrap: anywhere; }
/* The Account page: its sections grouped, and listed on the left to jump straight to one (on a phone, above them). */
main.account { max-width: 900px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.sections-body { grid-column: 2; min-width: 0; }
.sections { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 14px 8px; box-shadow: var(--shadow); font-size: .95rem; }
.sections h2 { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text);
  margin: 12px 8px 4px; padding-top: 12px; border-top: 1px solid var(--border); }
.sections h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.sections ul { list-style: none; margin: 0; padding: 0; }
.sections a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--text); text-decoration: none; }
.sections a:hover { background: var(--bg); }
.sections a[aria-current] { background: var(--bg); color: var(--accent); font-weight: 600; }
.group { margin-bottom: 40px; }
.group-title { font-size: 1.05rem; font-weight: 700; color: #ffffff; background: var(--navy); border-left: 5px solid var(--teal);
  border-radius: 6px; padding: 8px 14px; margin: 0 0 14px; }
.group .card { scroll-margin-top: 16px; }
@media (max-width: 860px) {
  main.account { display: block; }
  .sections { position: static; max-height: none; margin-bottom: 16px; }
  .sections ul { display: flex; flex-wrap: wrap; gap: 0 4px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print { .sections { display: none; } main.account { display: block; } }
