:root {
    --purple: #35043e;
    --gold: #e5b638;
    --magenta: #a60069;
    --ivory: #fff6e5;
    color: #321738;
    background: var(--ivory);
    font: 16px/1.5 "Hind Siliguri", "Noto Sans Bengali", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
.banner {
    color: #fff;
    padding: clamp(1rem, 4vw, 2.5rem);
    background: radial-gradient(ellipse at 85% 180%, var(--gold) 0 43%, transparent 44%),
        radial-gradient(ellipse at 83% 190%, #ffdc84 0 51%, transparent 52%),
        linear-gradient(105deg, var(--purple) 20%, var(--magenta));
    border-bottom: 3px solid var(--gold);
}
.wordmark { font-size: clamp(1.25rem, 4vw, 2.35rem); font-weight: 800; text-shadow: 0 2px 4px #220c27; }
.banner p { margin: .2rem 0; }
nav { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; background: #35043e; padding: .55rem 1rem; }
nav a { color: white; padding: .65rem; min-height: 48px; text-decoration: none; border-radius: .5rem; }
nav a[aria-current] { background: #8c075e; }
main { max-width: 1360px; padding: clamp(.6rem, 2.5vw, 2rem); margin: auto; }
.panel { padding: clamp(.75rem, 2.5vw, 2rem); border: 1px solid #eddbb0; border-radius: 1rem; background: #fffdfa; box-shadow: 0 5px 20px #35043e10; }
h1 { margin: 0 0 .75rem; }
.fields, .metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); gap: .8rem; align-items: end; }
form { margin-bottom: 1rem; }
.inline { display: flex; gap: .6rem; align-items: end; margin-bottom: 0; }
.stack { display: grid; gap: .8rem; }
fieldset { border: 1px solid #e8d5e6; border-radius: .6rem; min-width: 0; }
label { display: grid; gap: .25rem; }
input, select, button { min-height: 48px; padding: .55rem .7rem; font: inherit; border: 1px solid #a287a2; border-radius: .55rem; min-width: 0; }
input, select { width: 100%; background: white; color: #321738; }
button { background: #800255; color: white; border: 0; cursor: pointer; font-weight: 700; }
a { color: #790750; }
:focus-visible { outline: 3px solid #a94608; outline-offset: 2px; }
.error { padding: .75rem; background: #ffe1e7; color: #6c1036; border-radius: .45rem; }
.metrics div { padding: 1rem; border-radius: .7rem; background: linear-gradient(135deg, #ffe7f6, #fff1ca); }
.metrics strong { display: block; font-size: 1.8rem; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid #eadbe7; padding: .65rem; text-align: start; }
th { background: #f3e0ee; }
.totals { display: grid; grid-template-columns: auto auto; width: fit-content; margin-inline-start: auto; gap: .35rem 1.3rem; }
.totals dd { text-align: end; margin: 0; font-weight: 750; }
@page { size: A4 landscape; margin: 12mm; }
@media print {
    body > header, nav, .no-print, .error { display: none !important; }
    body, main, .panel { margin: 0; padding: 0; background: #fff; border: 0; box-shadow: none; }
    .invoice { font-size: 9pt; print-color-adjust: exact; }
    .scroll { overflow: visible; }
    th, td { padding: 1.5mm; overflow-wrap: anywhere; }
    tr { break-inside: avoid; }
    .banner { padding: 6mm; }
}

/* DEV 16.12: screen-only, interaction-driven motion; no layout changes. */
@media screen and (prefers-reduced-motion: no-preference) {
  button, nav a, .quick-grid a, .dashboard-metrics > div, .metrics > div,
  input, select, textarea { transition: transform 180ms ease-out, box-shadow 180ms ease-out, background-color 180ms ease-out, border-color 180ms ease-out; }
  .quick-grid img, .dashboard-metrics img { transition: transform 200ms ease-out; }
  button:not(:disabled):active, .quick-grid a:active { transform: scale(.98); }
  input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px #e5b63855; }
  @media (hover: hover) and (pointer: fine) {
    .dashboard-metrics > div:hover, .metrics > div:hover, .quick-grid a:hover { transform: translateY(-3px); box-shadow: 0 5px 12px #35043e30, 0 0 0 1px #e5b638; }
    .quick-grid a:hover img, .dashboard-metrics > div:hover img { transform: scale(1.06); }
    button:not(:disabled):hover { box-shadow: 0 3px 10px #35043e35, 0 0 0 1px #e5b638; }
    nav a:hover { box-shadow: inset 3px 0 #e5b638; }
    main table tbody tr:hover td { background-color: #e5b63818; }
  }
}
@media screen and (prefers-reduced-motion: reduce) {
  button, nav a, .quick-grid a, .dashboard-metrics > div, .metrics > div,
  .quick-grid img, .dashboard-metrics img, input, select, textarea { transition: none !important; animation: none !important; }
}
