/* Base (B6): reset, type, focus, the jalali date picker. Values from paya (14px / 22px body, 800 headings). */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-sans); font-size: var(--fs); line-height: 22px; font-weight: 400;
  color: var(--text-body); background: var(--bg-layout); -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--text-strong); margin: 0; font-weight: 800; }
h1 { font-size: var(--fs-xl); line-height: 36px; }
h2 { font-size: var(--fs-md); line-height: 28px; }
h3 { font-size: var(--fs); line-height: 20px; }
h4 { font-size: var(--fs-lg); line-height: 28px; font-weight: 700; }
p { margin: 0 0 var(--s2); }
button, input, select, textarea { font: inherit; color: inherit; }
input, textarea, select, code, kbd, bdi[dir=ltr] { font-family: var(--font-latin); }
input[dir=ltr] { text-align: left; }
::placeholder { color: var(--text-placeholder); opacity: 1; }
img, svg { vertical-align: middle; }
hr { border: 0; border-top: 1px solid var(--separator); margin: var(--s5) 0; }
.muted { color: var(--text-muted); font-size: var(--fs-sm); }
.subtle { color: var(--text-subtle); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.skip { position: absolute; top: -60px; inset-inline-start: 8px; background: var(--primary); color: var(--on-primary); padding: 8px 14px; border-radius: var(--radius-button); z-index: 100; }
.skip:focus { top: 8px; }
.errorlist { list-style: none; margin: var(--s1) 0 0; padding: 0; color: var(--err); font-size: var(--fs-xs); }
.error-text { color: var(--err); font-size: var(--fs-xs); }
.table-wrap { overflow-x: auto; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* jalali date picker (static/js/jdatepicker.js) */
.jdp-popup { position: absolute; z-index: 1000; width: 280px; background: var(--surface-raised); color: var(--text-body); border-radius: var(--radius-modal); box-shadow: var(--shadow-pop); padding: var(--s2) var(--s3) var(--s3); font-size: var(--fs); }
.jdp-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s1); padding-bottom: var(--s2); margin-bottom: var(--s2); border-bottom: 1px solid var(--separator); }
.jdp-head button { border: 0; background: none; color: var(--text-muted); border-radius: var(--radius-icon); width: 28px; height: 28px; cursor: pointer; font-size: 18px; line-height: 1; }
.jdp-head button:hover { color: var(--text-strong); background: var(--surface-hover); }
.jdp-title { display: flex; gap: var(--s1); }
.jdp-title select { padding: 2px 4px; border: 1px solid var(--border-input); border-radius: var(--radius-icon); background: var(--surface); font-family: var(--font-sans); }
.jdp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.jdp-wd { color: var(--text-subtle); font-size: var(--fs-xs); padding: 2px 0; }
.jdp-day { border: 1px solid transparent; background: none; border-radius: 6px; height: 30px; cursor: pointer; font-family: var(--font-sans); color: var(--text-body); }
.jdp-day:hover { background: var(--surface-hover); }
.jdp-day.today { border-color: var(--primary); }
.jdp-day.fri { color: var(--danger); }
.jdp-day.sel { background: var(--primary); color: var(--on-primary); }
.jdp-foot { display: flex; justify-content: space-between; margin-top: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--separator); }
.jdp-foot button { border: 0; background: none; color: var(--link); cursor: pointer; }
