/* GI-Connect door. Brand: text #4e4e4d, accent #e9540d (sampled from GI-Logo.png). White/paper only. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: #f7f7f5; color: #4e4e4d;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Open Sans", Arial, sans-serif;
}
a { color: #c8470b; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 24px; background: #fff; border-bottom: 1px solid #e6e6e3;
}
.brand img { display: block; width: 190px; height: auto; }
.top nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.top nav a { text-decoration: none; color: #4e4e4d; }
.top nav a:hover { color: #c8470b; }
main { flex: 1; width: 100%; margin: 0 auto; padding: 40px 20px; }
main.narrow { max-width: 440px; }
main.wide { max-width: 1040px; }
footer { padding: 20px; text-align: center; font-size: 13px; color: #8a8a87; }

.card { background: #fff; border: 1px solid #e6e6e3; border-radius: 10px; padding: 28px; margin-bottom: 24px; }
h1 { margin: 0 0 6px; font-size: 24px; font-weight: 600; }
h2 { margin: 0 0 14px; font-size: 18px; font-weight: 600; }
main.wide > h1 { margin-bottom: 20px; }
.sub { margin: 0 0 20px; color: #6b6b69; }
.aside { margin: 18px 0 0; font-size: 14px; color: #6b6b69; }
.muted { color: #8a8a87; font-size: 13px; }

label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 600; }
input, select {
  width: 100%; padding: 11px 12px; font: inherit; color: inherit;
  border: 1px solid #cfcfcb; border-radius: 6px; background: #fff;
}
input:focus, select:focus { outline: 2px solid #e9540d; outline-offset: -1px; border-color: #e9540d; }
button { font: inherit; cursor: pointer; }
button.primary {
  width: 100%; margin-top: 22px; padding: 12px; border: 0; border-radius: 6px;
  background: #e9540d; color: #fff; font-weight: 600;
}
button.primary:hover { background: #c8470b; }
button.link { padding: 0; border: 0; background: none; color: #4e4e4d; font-size: inherit; }
button.link:hover { color: #c8470b; text-decoration: underline; }
form.inline { display: inline; margin: 0; }

.error, .notice { padding: 11px 14px; border-radius: 6px; font-size: 15px; margin: 0 0 16px; }
.error { background: #fdecea; color: #9b1c1c; border: 1px solid #f5c2bd; }
.notice { background: #fff4ec; color: #7a3a0b; border: 1px solid #f7d2b8; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 18px 0 0; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.plain { list-style: none; padding: 0; margin: 18px 0 0; font-size: 15px; }
.plain li { padding: 6px 0; border-top: 1px solid #eeeeec; }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: #fff4ec; color: #7a3a0b; }

table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
table.list th { text-align: left; font-size: 13px; color: #6b6b69; font-weight: 600; padding: 0 10px 8px 0; }
table.list td { padding: 10px 10px 10px 0; border-top: 1px solid #eeeeec; vertical-align: top; }
table.list tr.off td { color: #a3a3a0; }
td.actions { white-space: nowrap; text-align: right; }
td.actions form + form { margin-left: 14px; }

/* Invoices */
.preview { margin: 0 0 18px; padding: 9px 14px; border-radius: 6px; background: #fff4ec; color: #7a3a0b; font-size: 14px; }
.back { margin: 0 0 14px; font-size: 14px; }
.back a { color: #6b6b69; text-decoration: none; }
.back a:hover { color: #c8470b; }
.summary p { margin: 0; }
.year h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.year h2 .muted { font-weight: 400; }
.num { text-align: right; white-space: nowrap; }
table.list th.num { text-align: right; padding-right: 0; }
table.list td.num { padding-right: 0; }
table.invoices td:nth-child(4) { padding-right: 24px; }
table.invoices th:nth-child(4) { padding-right: 24px; }
.state { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 13px; white-space: nowrap; }
.state.paid { background: #edf7ee; color: #25632b; }
.state.due { background: #fff4ec; color: #7a3a0b; }
.state.overdue { background: #fdecea; color: #9b1c1c; }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.inv-head .sub { margin-bottom: 0; }
table.lines { margin-top: 26px; }
table.lines td.desc { white-space: normal; }
.totals { display: grid; grid-template-columns: 1fr max-content; gap: 6px 24px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid #e6e6e3; text-align: right; }
.totals dt { color: #6b6b69; }
.totals dd { margin: 0; min-width: 110px; }
.totals .paid { color: #25632b; }
.totals .due { font-weight: 600; color: #4e4e4d; font-size: 17px; }
.buttons { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
a.button { display: inline-block; padding: 12px 22px; border-radius: 6px; font-weight: 600; text-decoration: none; }
a.button.primary { background: #e9540d; color: #fff; }
a.button.primary:hover { background: #c8470b; }
a.button.secondary { border: 1px solid #cfcfcb; color: #4e4e4d; background: #fff; }
a.button.secondary:hover { border-color: #e9540d; color: #c8470b; }
form.right { float: right; }

/* Phone: stacked label:value cards, never a sideways-scrolling table. */
@media (max-width: 720px) {
  .top { padding: 12px 16px; }
  .brand img { width: 150px; }
  main { padding: 24px 14px; }
  .card { padding: 22px 18px; }
  .cols { grid-template-columns: 1fr; }
  table.list thead { display: none; }
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list tr { border-top: 1px solid #eeeeec; padding: 10px 0; }
  table.list td { border: 0; padding: 2px 0; }
  table.list td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; }
  td.actions { text-align: left; padding-top: 8px; }
  table.list td.num, table.invoices td:nth-child(4) { text-align: left; padding-right: 0; }
  .inv-head { flex-direction: column; }
  .buttons a.button { width: 100%; text-align: center; }
}
