/* e-tax.uk Stage 7.1B - global light/dark theme */
:root {
  --et-bg:#f5f8ff; --et-surface:#ffffff; --et-surface-2:#eef4ff; --et-text:#0f172a;
  --et-muted:#526174; --et-border:#d9e2ef; --et-primary:#2563d8; --et-primary-hover:#1d4fb4;
  --et-input:#ffffff; --et-shadow:0 14px 38px rgba(15,23,42,.08);
}
html[data-theme="dark"] {
  color-scheme:dark;
  --et-bg:#0b1220; --et-surface:#111b2e; --et-surface-2:#16233b; --et-text:#edf4ff;
  --et-muted:#a9b8cc; --et-border:#2b3b55; --et-primary:#5b8def; --et-primary-hover:#79a3f5;
  --et-input:#0e192b; --et-shadow:0 14px 38px rgba(0,0,0,.28);
}
html, body { background:var(--et-bg) !important; color:var(--et-text) !important; }
body, main, section, .page, .page-shell, .auth-page, .dashboard-page { transition:background-color .2s ease,color .2s ease; }
.hero, .services-section, .account-section, .dashboard-section, .page-section, .auth-page { background:var(--et-bg) !important; color:var(--et-text) !important; }
.auth-card,.service-card,.account-box,.dashboard-card,.card,.panel,.content-card,.form-card,.summary-card,.table-card,.module-card {
  background:var(--et-surface) !important; color:var(--et-text) !important; border-color:var(--et-border) !important; box-shadow:var(--et-shadow);
}
h1,h2,h3,h4,h5,h6,strong,label,legend,th { color:var(--et-text) !important; }
p,small,.muted,.auth-intro,td { color:var(--et-muted); }
a:not(.primary-button):not(.header-primary-link) { color:var(--et-primary); }
input,select,textarea {
  background:var(--et-input) !important; color:var(--et-text) !important; border-color:var(--et-border) !important;
}
input::placeholder,textarea::placeholder { color:var(--et-muted) !important; opacity:.8; }
table,thead,tbody,tr,th,td { border-color:var(--et-border) !important; }
thead, th { background:var(--et-surface-2) !important; }
tbody tr, td { background:var(--et-surface) !important; }
.secondary-button,.button-secondary,.btn-secondary { background:var(--et-surface) !important; color:var(--et-text) !important; border-color:var(--et-border) !important; }
.primary-button,.button-primary,.btn-primary { background:var(--et-primary) !important; color:#fff !important; }
.primary-button:hover,.button-primary:hover,.btn-primary:hover { background:var(--et-primary-hover) !important; }
.site-footer { background:var(--et-surface) !important; color:var(--et-muted) !important; border-color:var(--et-border) !important; }
.alert { border-color:var(--et-border) !important; }
html[data-theme="dark"] .alert-success { background:#0d2b20 !important; color:#a7f3d0 !important; }
html[data-theme="dark"] .alert-error { background:#351519 !important; color:#fecaca !important; }
html[data-theme="dark"] img { filter:brightness(.92); }

/* Stage 7 polish: smooth whole-page light/dark transition */
html,
body,
main,
section,
header,
footer,
nav,
article,
aside,
.page,
.page-shell,
.auth-page,
.dashboard-page,
.hero,
.services-section,
.account-section,
.dashboard-section,
.page-section,
.auth-card,
.service-card,
.account-box,
.dashboard-card,
.card,
.panel,
.content-card,
.form-card,
.summary-card,
.table-card,
.module-card,
.site-footer,
.alert,
input,
select,
textarea,
button,
table,
thead,
tbody,
tr,
th,
td {
  transition: background-color .42s ease, color .42s ease, border-color .42s ease, box-shadow .42s ease !important;
}

@media (prefers-reduced-motion: reduce) {
  html,
  body,
  main,
  section,
  header,
  footer,
  nav,
  article,
  aside,
  .page,
  .page-shell,
  .auth-page,
  .dashboard-page,
  .hero,
  .services-section,
  .account-section,
  .dashboard-section,
  .page-section,
  .auth-card,
  .service-card,
  .account-box,
  .dashboard-card,
  .card,
  .panel,
  .content-card,
  .form-card,
  .summary-card,
  .table-card,
  .module-card,
  .site-footer,
  .alert,
  input,
  select,
  textarea,
  button,
  table,
  thead,
  tbody,
  tr,
  th,
  td,
  .global-header,
  .global-header * {
    transition: none !important;
  }
}
