@font-face { font-family: 'Inter'; src: url('/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

/* The look distributors already know: light page, the orange rail. Sizes are in rem so it scales on any screen. */
:root {
  --brand: #C2410C; --brand-2: #9A3412; --bg: #F7F7F8; --card: #FFFFFF; --line: #E7E7EA; --line-2: #D9D9DE;
  --text: #18181B; --text-2: #52525B; --text-3: #8A8A93;
  --r: .875rem; --r-s: .625rem; --gut: clamp(1rem, .4rem + 2vw, 1.875rem);
}
* { box-sizing: border-box; }
html { font-size: clamp(14px, 13.840px + .15vw, 18px); -webkit-text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 .875rem/1.45 Inter, system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-underline-offset: .15em; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
svg.i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

/* One focus ring, one border, everywhere. */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-s); }
input:focus-visible, textarea:focus-visible { outline: none; }

/* ---- rail and page ---- */
.dz-app { display: flex; min-height: 100dvh; }
.dz-rail { width: 3.5rem; flex: 0 0 3.5rem; background: var(--brand); display: flex; flex-direction: column; align-items: center; padding: .875rem 0; gap: .375rem; position: sticky; top: 0; height: 100dvh; z-index: 30; }
.dz-logo { width: 1.875rem; height: 1.875rem; border-radius: .5rem; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; margin-bottom: .625rem; }
.dz-nav { width: 2.375rem; height: 2.375rem; border-radius: var(--r-s); color: rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center; }
.dz-nav:hover { background: rgba(255,255,255,.14); color: #fff; }
.dz-nav.on { background: rgba(255,255,255,.22); color: #fff; }
.dz-nav svg.i { width: 1.25rem; height: 1.25rem; }
.dz-spacer { flex: 1; }
.dz-avatar { width: 2.25rem; height: 2.25rem; border-radius: 50%; background: transparent; color: rgba(255,255,255,.8); font: 700 .875rem Inter, sans-serif; border: 0; cursor: pointer; }
.dz-avatar:hover { background: rgba(255,255,255,.14); color: #fff; }
.dz-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dz-head { padding: 1.625rem var(--gut) 0; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.dz-head h1 { margin-bottom: 1.125rem; font-size: clamp(1.3rem, 1.1rem + 1vw, 1.625rem); font-weight: 800; letter-spacing: -.02em; }
.dz-upd { font-size: .8rem; color: var(--text-3); }
.dz-body { padding: 0 var(--gut) 3.75rem; flex: 1; display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.dz-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: .25rem; }
.dz-tab { appearance: none; border: 0; background: transparent; padding: .625rem .875rem; font: 600 .875rem Inter, sans-serif; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: .4375rem; margin-bottom: -1px; }
.dz-tab:hover { color: var(--text); }
.dz-tab svg.i { width: .9375rem; height: .9375rem; }
.dz-tab.on { color: var(--brand); border-bottom-color: var(--brand); }
.dz-toolbar { display: flex; gap: .625rem; align-items: center; flex-wrap: wrap; }
.dz-search { flex: 1; min-width: min(100%, 13.750rem); position: relative; color: var(--text-3); }
.dz-search svg.i { position: absolute; left: .6875rem; top: .6875rem; width: 1.125rem; height: 1.125rem; }
.dz-search input { width: 100%; height: 2.5rem; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--card); padding: 0 .75rem 0 2.25rem; font: 400 .875rem Inter, sans-serif; color: var(--text); }
.dz-search input:focus { border-color: var(--brand); }
.dz-filter { position: relative; }
.dz-menu { position: absolute; z-index: 40; top: 2.75rem; left: 0; background: var(--card); border: 1px solid var(--line-2); border-radius: .75rem; box-shadow: 0 .875rem 2.5rem rgba(0,0,0,.14); padding: .5rem; min-width: 13rem; max-height: 60vh; overflow-y: auto; }
.dz-mi { display: flex; align-items: center; gap: .5625rem; padding: .5rem .5625rem; border-radius: .5rem; cursor: pointer; font-size: .8125rem; white-space: nowrap; }
.dz-mi:hover { background: var(--bg); }
.dz-mi input { accent-color: var(--brand); }

/* ---- the table ---- */
.dz-tablewrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; }
table.dz-table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.dz-table th { text-align: left; font-weight: 600; color: var(--text-2); padding: .75rem .875rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--card); position: sticky; top: 0; z-index: 2; }
.dz-table td { color: var(--text); padding: .6875rem .875rem; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.dz-table tr:last-child td { border-bottom: 0; }
.dz-table tbody tr:hover td { background: #FAFAFB; }
.dz-table .sticky-l { position: sticky; left: 0; background: var(--card); z-index: 1; font-weight: 600; }
.dz-table th.sticky-l, .dz-table th.sticky-r { z-index: 3; }
.dz-table .sticky-r { position: sticky; right: 0; background: var(--card); z-index: 1; text-align: center; }
.dz-name { display: flex; align-items: center; gap: .25rem; }
.dz-expand { opacity: 0; color: var(--text-3); margin-left: -.4rem; display: inline-flex; flex: none; }
.dz-expand svg.i { width: .875rem; height: .875rem; }
.dz-expand:focus-visible, .dz-table tr:hover .dz-expand { opacity: 1; }
@media (hover: none) { .dz-expand { opacity: 1; } }
.dz-pill { display: inline-block; padding: .1875rem .625rem; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.dz-pill.red { background: #FDE7DE; color: #B23410; } .dz-pill.orange { background: #FCEBDB; color: #A85A17; } .dz-pill.amber { background: #FBEEDB; color: #8A5A08; }
.dz-pill.blue { background: #E3EDFD; color: #1E4FBF; } .dz-pill.teal { background: #D6F0EC; color: #0B5B55; } .dz-pill.purple { background: #EDE4FD; color: #6A28CF; }
.dz-pill.green { background: #DEF3E4; color: #13843B; } .dz-pill.gray { background: #EDEDF0; color: #4B4B52; }
.dz-chip { display: inline-flex; align-items: center; gap: .375rem; max-width: 10.625rem; padding: .25rem .5625rem; border-radius: .5rem; border: 1px solid var(--line-2); background: var(--card); font-size: .75rem; text-decoration: none; color: var(--text); vertical-align: middle; }
.dz-chip:hover { border-color: var(--brand); }
.dz-chip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-chip svg.i { width: .875rem; height: .875rem; color: #DC4A1E; }
.dz-dots { width: 1.875rem; height: 1.875rem; border-radius: .5rem; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--text-2); font-size: 1.125rem; line-height: 1; }
.dz-dots:hover { background: var(--bg); border-color: var(--line-2); }
.dz-muted { color: var(--text-3); }
.dz-plain { font-size: .8125rem; }
.dz-rowmenu { position: fixed; z-index: 210; background: var(--card); border: 1px solid var(--line-2); border-radius: .75rem; box-shadow: 0 1rem 2.75rem rgba(0,0,0,.18); padding: .4375rem; min-width: 13.125rem; }
.dz-rowmenu button { display: flex; width: 100%; align-items: center; gap: .5625rem; padding: .5625rem .625rem; border: 0; background: transparent; border-radius: .5rem; font: 500 .8125rem Inter, sans-serif; color: var(--text); cursor: pointer; text-align: left; }
.dz-rowmenu button:hover { background: var(--bg); }
.dz-rowmenu button:disabled { opacity: .4; cursor: default; }
.dz-rowmenu svg.i { width: .95rem; height: .95rem; color: var(--text-2); }
.dz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.875rem), 1fr)); gap: 1rem; }
.dz-ucard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; }
.dz-ucard h3 { margin-bottom: .1875rem; font-size: .9375rem; font-weight: 700; }
.dz-ucard h3 a { color: inherit; text-decoration: none; }
.addr { color: var(--text-3); font-size: .78rem; margin-bottom: .625rem; }
.dz-cardpill { margin-bottom: .625rem; }
.dz-cardpill .dz-muted { font-size: .8125rem; }
.dz-ucard .kv { display: flex; justify-content: space-between; gap: .625rem; font-size: .78rem; padding: .25rem 0; border-top: 1px solid var(--line); }
.dz-ucard .kv span:first-child { color: var(--text-3); }
.dz-cardbtn { margin-top: .75rem; }
.dz-empty { text-align: center; color: var(--text-3); padding: 3.5rem 1.25rem; }
.dz-empty svg.i { width: 2.125rem; height: 2.125rem; opacity: .5; margin-bottom: .625rem; }
.dz-load { padding: 3.125rem; text-align: center; color: var(--text-3); }
.notice { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .9rem; border-radius: var(--r-s); font-size: .875rem; background: #FBEEDB; color: #6B4706; }

/* ---- calendar ---- */
.dz-calsearch { flex: none; }
.dz-cal { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.dz-calbar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .875rem 1rem; }
.dz-calbar b { font-size: 1rem; }
.dz-calctl { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.dz-calhead, .dz-calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dz-calhead span { padding: .375rem; text-align: center; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); border-bottom: 1px solid var(--line); }
.dz-day { min-height: clamp(4rem, 3rem + 7vh, 7.5rem); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .375rem; display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.dz-day:nth-child(7n) { border-right: 0; }
.dz-day.out { background: var(--bg); }
.dz-day.out .dz-daynum { color: var(--text-3); font-weight: 400; }
.dz-daynum { font-size: .78rem; font-weight: 600; width: 1.5rem; height: 1.5rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; flex: none; }
.dz-daynum.today { background: var(--brand); color: #fff; }
.dz-event { display: block; font-size: .72rem; font-weight: 600; padding: .125rem .375rem; border-radius: .375rem; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-event.red { background: #FDE7DE; color: #B23410; } .dz-event.orange { background: #FCEBDB; color: #A85A17; } .dz-event.amber { background: #FBEEDB; color: #8A5A08; }
.dz-event.blue { background: #E3EDFD; color: #1E4FBF; } .dz-event.teal { background: #D6F0EC; color: #0B5B55; } .dz-event.purple { background: #EDE4FD; color: #6A28CF; }
.dz-event.green { background: #DEF3E4; color: #13843B; } .dz-event.gray { background: #EDEDF0; color: #4B4B52; }

/* ---- cards, tables, forms on the inner pages ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(.9rem, .7rem + .6vw, 1.25rem); }
.card > h2 { font-size: 1rem; font-weight: 700; margin-bottom: .85rem; }
.two { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.stack.tight { gap: .8rem; }
.bar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.bar .grow { flex: 1; min-width: min(100%, 12rem); }
.mut { color: var(--text-2); } .dim { color: var(--text-3); font-size: .875rem; }
table.t { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.t th { text-align: left; font-weight: 600; font-size: .78rem; color: var(--text-2); padding: 0 .75rem .55rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: .7rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t th:first-child, table.t td:first-child { padding-left: 0; }
table.t th:last-child, table.t td:last-child { padding-right: 0; }
table.t .r { text-align: right; }
.fac b { font-weight: 600; display: block; } .fac span { font-size: .8rem; color: var(--text-3); }
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feed li { padding: .55rem 0; border-top: 1px solid var(--line); font-size: .875rem; }
.feed li:first-child { border-top: 0; padding-top: 0; }
.feed time { display: block; font-size: .75rem; color: var(--text-3); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.back { display: inline-flex; align-items: center; gap: .35rem; color: var(--text-2); text-decoration: none; font-size: .875rem; align-self: flex-start; }
.back:hover { color: var(--text); }
.det-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.det-head > div { min-width: 0; flex: 1 1 16rem; }
.det-head h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: .3rem; }
.det-head p { margin: 0 0 .55rem; overflow-wrap: anywhere; }
.edit-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: center; }
.dz-fileline { min-height: 2.5rem; }
.edit-foot { font-size: .8rem; margin-top: .25rem; }
.edit-foot:empty { display: none; }
.kv { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .875rem; }
.card > h2 + .kv { border-top: 0; }
.kv > span:first-child { color: var(--text-3); font-size: .8125rem; }
.kv > span:last-child { overflow-wrap: anywhere; }
[data-comment] { margin-top: .9rem; }
[data-comment] .acts { margin-top: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4375rem; font: 600 .8125rem Inter, sans-serif; padding: 0 .875rem; min-height: 2.5rem; border-radius: var(--r-s); border: 1px solid var(--line-2); background: var(--card); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--brand); }
.btn.pri { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.pri:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.wide { width: 100%; }
.btn.icon { padding: 0; width: 2.5rem; }
.btn[disabled] { opacity: .55; cursor: default; }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field > label, .field > .flabel { font-size: .8125rem; font-weight: 600; color: var(--text-2); }
.in { font: 400 .875rem Inter, sans-serif; color: var(--text); background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 0 .75rem; width: 100%; min-height: 2.5rem; }
.in:focus { border-color: var(--brand); }
textarea.in { min-height: 5rem; resize: vertical; padding: .55rem .75rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .85rem; }
.form-grid .full { grid-column: 1 / -1; }
.acts { display: flex; gap: .625rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1rem; }
.err { color: #B23410; font-size: .84rem; }
.err:empty { display: none; }
.dz-drop { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 1.5rem 1rem; border: 1.5px dashed var(--line-2); border-radius: .75rem; cursor: pointer; font-weight: 600; font-size: .875rem; }
.dz-drop:hover, .dz-drop:focus-within { border-color: var(--brand); }
.dz-drop svg.i { color: var(--brand); width: 1.5rem; height: 1.5rem; }
.dz-drop .dz-muted { font-weight: 400; font-size: .78rem; }
.dz-addr { font-size: .78rem; color: var(--text-3); margin-top: .25rem; overflow-wrap: anywhere; }
.dz-addr:empty { display: none; }
.dz-picked { font-size: .8125rem; margin-top: .5rem; overflow-wrap: anywhere; }

/* custom dropdown */
.dd { position: relative; min-width: 9rem; }
.dd-btn { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; font: 600 .8125rem Inter, sans-serif; color: var(--text); background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 0 .75rem; min-height: 2.5rem; cursor: pointer; text-align: left; }
.dd.open .dd-btn, .dd-btn:hover { border-color: var(--brand); }
.dd-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + .3rem); background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: .25rem; display: none; max-height: 16rem; overflow-y: auto; box-shadow: 0 .75rem 2rem rgba(0,0,0,.14); }
.dd.open .dd-list { display: block; }
.dlg .dd-list { position: static; margin-top: .3rem; box-shadow: none; }
.dd-opt { padding: .45rem .6rem; border-radius: .35rem; font-size: .8125rem; cursor: pointer; }
.dd-opt:hover, .dd-opt.act { background: var(--bg); }
.dd-opt[aria-selected="true"] { color: var(--brand); font-weight: 600; }

/* dialogs */
.dlg-w { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1.125rem; background: rgba(10,10,14,.42); overflow-y: auto; }
.dlg { background: var(--card); border-radius: 1rem; width: min(27.500rem, 100%); padding: clamp(1rem, .8rem + .8vw, 1.375rem); box-shadow: 0 1.5rem 4.375rem rgba(0,0,0,.3); max-height: calc(100dvh - 2rem); overflow-y: auto; }
.dlg h2 { font-size: 1.0625rem; font-weight: 700; margin-bottom: .25rem; }
.dlg p { margin: 0 0 .9rem; color: var(--text-2); font-size: .8125rem; }
.toast { position: fixed; bottom: 1.25rem; left: 50%; translate: -50% 0; z-index: 300; background: var(--text); color: #fff; padding: .55rem 1rem; border-radius: var(--r-s); font-size: .875rem; max-width: calc(100vw - 2rem); }

/* ---- sign in ---- */
.auth { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.25rem; gap: 1rem; background: var(--bg); }
.auth-card { width: min(26rem, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1.25rem, 1rem + 1.2vw, 2rem); display: flex; flex-direction: column; gap: .9rem; box-shadow: 0 .75rem 2.5rem rgba(0,0,0,.06); }
.auth-card img.logo { height: 2.25rem; width: auto; align-self: flex-start; }
.auth-card h1 { font-size: 1.375rem; font-weight: 800; letter-spacing: -.02em; }
.auth-card p { margin: 0; color: var(--text-2); font-size: .875rem; }
.auth-card .stack { gap: .9rem; }
.link { background: none; border: 0; color: var(--text-2); font: 400 .84rem Inter, sans-serif; cursor: pointer; padding: .2rem; text-decoration: underline; text-underline-offset: .2em; }
.link:hover { color: var(--brand); }
.check { display: flex; gap: .5rem; align-items: center; font-size: .875rem; color: var(--text-2); }
.check input { accent-color: var(--brand); width: 1.05rem; height: 1.05rem; }
.footline { font-size: .78rem; color: var(--text-3); }

@media (max-width: 62rem) { .two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 44rem) {
  .dz-rail { width: 3rem; flex-basis: 3rem; }
  .dz-table .sticky-l { max-width: 45vw; white-space: normal; }
  table.t, table.t tbody, table.t tr, table.t td { display: block; width: 100%; }
  table.t thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table.t tr { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  table.t tr:last-child { border-bottom: 0; }
  table.t td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .2rem 0; border: 0; text-align: right; }
  table.t td::before { content: attr(data-label); color: var(--text-3); font-size: .8rem; text-align: left; flex: none; }
  table.t td:first-child { display: block; text-align: left; padding-bottom: .35rem; }
  table.t td:first-child::before { content: none; }
  table.t td:empty { display: none; }
  .dz-day { min-height: 3.5rem; padding: .125rem; }
  .dz-event { font-size: .625rem; padding: .0625rem .1875rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
