/* =========================================================
   Site stylesheet
   1. Base            5. Hero and sections
   2. Layout          6. Forms and panels
   3. Buttons         7. Tables
   4. Header          8. Banner and footer
                      9. Responsive
   The brand colour is set from includes/config.php via --brand.
   ========================================================= */

/* 1. Base */
:root {
  --brand: #1a5fb4;
  --dark: #0f2a4a;
  --text: #222;
  --muted: #555;
  --bg: #f5f6f8;
  --radius: 8px;
  --shadow: 0 1px 6px rgba(0, 0, 0, .12);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}
img { max-width: 100%; }
a { color: var(--brand); }

/* 2. Layout */
.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* 3. Buttons */
.btn {
  display: inline-block;
  padding: 14px 26px;
  margin: 0 10px 10px 0;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
}
.btn-light   { background: #fff; color: var(--brand); }
.btn-outline { border-color: #fff; color: #fff; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-block   { width: 100%; margin: 20px 0 0; }

/* 4. Header */
.site-header { background: #fff; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 50; }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 10px; padding-bottom: 10px;
}
.brand { display: flex; align-items: center; color: var(--brand); font-size: 20px; font-weight: bold; text-decoration: none; }
.brand img { display: block; max-height: 48px; width: auto; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { padding: 8px 14px; border-radius: 6px; color: var(--text); font-size: 15px; text-decoration: none; }
.nav a:hover { background: #eef2f7; }
.nav a.active { color: var(--brand); font-weight: bold; }
.nav a.nav-cta { margin-left: 8px; background: var(--brand); color: #fff; font-weight: bold; }
.nav a.nav-cta:hover { background: var(--brand); opacity: .9; }
.nav-toggle {
  display: none; padding: 2px 10px; background: none;
  border: 1px solid #ccc; border-radius: 6px; font-size: 22px; cursor: pointer;
}

/* 5. Hero and sections */
.hero { padding: 70px 0; color: #fff; background: linear-gradient(135deg, var(--brand), var(--dark)); }
.hero h1 { max-width: 640px; margin: 0 0 14px; font-size: 38px; line-height: 1.2; }
.hero p  { max-width: 560px; margin: 0 0 26px; font-size: 18px; opacity: .93; }
.section { padding: 48px 0 0; }
.section-title { margin: 0 0 24px; text-align: center; font-size: 28px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { padding: 22px; background: #fff; border-radius: 10px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; color: var(--brand); }
.card p  { margin: 0; color: var(--muted); line-height: 1.6; }
.card-link { display: inline-block; margin-top: 10px; font-weight: bold; text-decoration: none; }

/* 6. Forms and panels */
.panel {
  width: calc(100% - 32px); max-width: 480px; margin: 24px auto; padding: 20px;
  background: #fff; border-radius: 10px; box-shadow: var(--shadow);
}
.panel-wide { max-width: 960px; }
.panel h2 { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.form-label { display: block; margin-top: 14px; font-size: 14px; font-weight: bold; }
.optional { font-weight: normal; color: #777; }
.form-control {
  width: 100%; margin-top: 4px; padding: 10px;
  border: 1px solid #bbb; border-radius: 6px; font-size: 16px;
}
.alert { margin-bottom: 8px; padding: 10px 14px; background: #fdecea; color: #b00020; border-radius: 6px; }
.alert ul { margin: 0; padding-left: 18px; }
.result { margin-top: 18px; padding: 14px; background: #e8f5e9; border-radius: 6px; }
.result-amount { font-size: 22px; font-weight: bold; color: #1b5e20; }

/* 7. Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; margin-top: 12px; border-collapse: collapse; }
.table th, .table td { padding: 10px; border-bottom: 1px solid #e3e3e3; text-align: left; white-space: nowrap; }
.table th { background: #eef2f7; }
.table .text-right { text-align: right; }
.pager { display: flex; justify-content: space-between; margin-top: 14px; }

/* 8. Banner and footer */
.cta-banner { margin-top: 40px; padding: 36px 0; color: #fff; background: var(--brand); }
.cta-banner .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta-banner h2 { margin: 0 0 6px; font-size: 26px; }
.cta-banner p  { margin: 0; opacity: .92; }
.cta-banner .btn { margin: 0; white-space: nowrap; }

.site-footer { margin-top: auto; padding-top: 40px; color: #cfd8e3; background: var(--dark); font-size: 14px; line-height: 1.7; }
.site-footer a { color: #cfd8e3; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h4 { margin: 0 0 10px; color: #fff; font-size: 16px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.footer-about img { display: block; max-height: 52px; margin-bottom: 10px; padding: 8px; background: #fff; border-radius: 8px; }
.footer-name { margin-bottom: 8px; color: #fff; font-size: 20px; font-weight: bold; }
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: #1d4068; color: #fff; transition: background .2s;
}
.footer-social a:hover { background: var(--brand); text-decoration: none; }
.footer-social svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.footer-bottom { margin-top: 28px; padding-top: 14px; padding-bottom: 14px; border-top: 1px solid #2b476b; text-align: center; font-size: 13px; }

/* 9. Responsive */
@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; padding: 10px 16px 16px;
    background: #fff; box-shadow: 0 6px 8px rgba(0, 0, 0, .1);
  }
  .nav.open { display: flex; }
  .nav a.nav-cta { margin: 6px 0 0; text-align: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero { padding: 44px 0; }
  .hero h1 { font-size: 28px; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* 10. Statement analysis */
[hidden] { display: none !important; }
.panel-xl { max-width: 1100px; }
.upload-box { margin: 18px 0; padding: 24px 16px; text-align: center; background: #fafbfd; border: 2px dashed #b9c4d3; border-radius: 10px; }
.employer-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.employer-row .form-control { flex: 1 1 260px; max-width: 420px; margin-top: 0; }
.employer-row .btn { margin: 0; padding: 10px 20px; }
.privacy-note { margin: 6px 0 14px; font-size: 13px; color: var(--muted); }
.stmt-note { margin: 12px 0; padding: 10px 14px; background: #eef2f7; border-radius: 6px; }
.stmt-summary { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 20px 0; }
.stat { padding: 14px; background: #eef2f7; border-radius: 8px; }
.stat span { display: block; font-size: 13px; color: var(--muted); }
.stat strong { font-size: 18px; }
.stat.good strong { color: #1b5e20; }
.stat.bad strong { color: #b00020; }
.chart-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.chart-card { margin-top: 20px; padding: 16px; background: #fff; border: 1px solid #e3e3e3; border-radius: 10px; }
.chart-grid .chart-card { margin-top: 0; }
.chart-card h3 { margin: 0 0 10px; }
.chart-box { position: relative; height: 280px; }
.cat-list { margin: 12px 0 0; padding: 0; list-style: none; font-size: 14px; }
.cat-list li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid #f0f0f0; }
.swatch { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; }
.table .stmt-desc { white-space: normal; min-width: 200px; max-width: 360px; }
.stmt-select { max-width: 170px; padding: 4px; border: 1px solid #bbb; border-radius: 6px; font-size: 13px; }
