/* Kizen-KNK PPIC — terracotta / warm paper, lightweight */
:root {
  --terra: #b45338;
  --terra-dark: #93402a;
  --terra-soft: #f4e3dc;
  --paper: #f7f4f0;
  --card: #ffffff;
  --ink: #2b2622;
  --mut: #8b8178;
  --line: #e8e0d8;
  --ok: #2e7d4f;
  --ok-soft: #e2f2e8;
  --bad: #c23a3a;
  --bad-soft: #fbe9e9;
  --amber-soft: #fff6d9;
  --dayw: 46px;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 14px/1.45 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--paper); color: var(--ink);
}
a { color: var(--terra); text-decoration: none; }
h1 { font-size: 20px; margin: 4px 0 2px; }
h2 { font-size: 15px; margin: 0 0 10px; color: var(--ink); }
h3 { font-size: 13px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.mut { color: var(--mut); font-weight: 400; }
.hidden { display: none; }
.prewrap { white-space: pre-wrap; }

/* header */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 22px;
  background: #fffdfb; border-bottom: 1px solid var(--line);
  padding: 10px 20px;
}
.brand {
  font-family: 'Belleza', serif; font-size: 21px; letter-spacing: .5px;
  color: var(--ink); white-space: nowrap;
}
.brand b { color: var(--terra); font-weight: 400; }
.brand span { display: block; font-family: 'Inter'; font-size: 10px; color: var(--mut); letter-spacing: 1.4px; text-transform: uppercase; }
nav { display: flex; gap: 4px; align-items: center; flex: 1; flex-wrap: wrap; }
nav a { padding: 7px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; font-size: 13.5px; }
nav a:hover { background: var(--terra-soft); }
nav a.on { background: var(--terra); color: #fff; }
nav a.addbtn { border: 1.5px solid var(--terra); color: var(--terra); font-weight: 600; }
nav a.addbtn:hover { background: var(--terra); color: #fff; }
.who { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.who .lang a { padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; margin-left: 4px; color: var(--mut); font-size: 11px; font-weight: 600; }
.who .lang a:last-child { }
.linkish { background: none; border: none; color: var(--terra); cursor: pointer; font: inherit; padding: 0; }
.linkish:hover { text-decoration: underline; }

main { padding: 18px 20px 60px; max-width: 1500px; margin: 0 auto; }

/* flash */
.flash {
  background: var(--ok-soft); color: var(--ok); border: 1px solid #bfe3cd;
  margin: 12px 20px 0; padding: 9px 14px; border-radius: 8px; font-weight: 500;
}
.flash.err { background: var(--bad-soft); color: var(--bad); border-color: #efc4c4; }

/* cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 16px;
}
.card.narrow { max-width: 430px; }
.cols2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .cols2 { grid-template-columns: 1fr; } }

/* stats */
.statrow { display: flex; gap: 12px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 18px; min-width: 150px; }
.stat b { font-size: 22px; display: block; }
.stat span { font-size: 11.5px; color: var(--mut); }
.stat.warn b, .stat.warn span { color: var(--bad); }

/* buttons & forms */
.btn {
  display: inline-block; background: #fff; border: 1px solid var(--line); color: var(--ink);
  border-radius: 8px; padding: 7px 13px; font: 600 13px 'Inter'; cursor: pointer; text-align: center;
}
.btn:hover { border-color: var(--terra); color: var(--terra); }
.btn.primary { background: var(--terra); border-color: var(--terra); color: #fff; }
.btn.primary:hover { background: var(--terra-dark); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--mut); }
.btn.ghost:hover { color: var(--terra); }
.btn.danger { color: var(--bad); border-color: #ecc9c9; background: #fff; }
.btn.danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.small { padding: 4px 9px; font-size: 12px; }
.btn.wide { width: 100%; }
.btngroup { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
form { display: inline-block; }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--mut); margin-bottom: 10px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px; font: 400 14px 'Inter';
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--terra-soft); border-color: var(--terra); }
label.chk { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink); margin: 0 14px 0 0; }
label.chk input { width: auto; margin: 0; display: inline-block; }
label.inline { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); margin: 0; }
label.inline select { width: auto; margin: 0; }
label small { display: block; font-weight: 400; margin-top: 3px; }
button.btn { display: inline-block; width: auto; margin: 0; }

/* login */
.loginpage { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(160deg, #b45338 0%, #93402a 60%, #7c3521 100%); }
.loginbox { background: #fff; border-radius: 14px; padding: 34px 34px 20px; width: 360px; box-shadow: 0 18px 50px rgba(60,20,10,.35); }
.loginbox label { margin-top: 12px; }
.loginbrand { font-family: 'Belleza', serif; font-size: 26px; margin-bottom: 14px; color: var(--ink); }
.loginbrand b { color: var(--terra); font-weight: 400; }
.loginbrand span { display: block; font-family: 'Inter'; font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--mut); }
.langline { text-align: center; margin-top: 14px; font-size: 12px; color: var(--mut); }
.loginbox .flash { margin: 0 0 10px; }

/* ------------------------------------------------ timeline */
.tlcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.tlhead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.monthnav { display: flex; align-items: center; gap: 10px; font-size: 16px; font-family: 'Belleza', serif; letter-spacing: .5px; }
.monthnav .btn { padding: 4px 11px; }
.legend { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--mut); }
.lg { display: inline-block; padding: 2px 9px; border-radius: 20px; border: 1px solid var(--line); }
.lg.st-planned { background: var(--amber-soft); }
.lg.st-running { background: var(--terra-soft); border-color: #e3b7a6; }
.lg.st-done { background: #efedeb; color: var(--mut); }
.tlscroll { overflow-x: auto; }
.tlgrid { min-width: max-content; }
.tlrow { display: flex; border-top: 1px solid var(--line); min-height: 100px; }
.tlrow.tldates { min-height: 44px; border-top: none; position: sticky; top: 0; background: #fffdfb; z-index: 40; box-shadow: 0 1px 0 var(--line); }
.tlname {
  width: 148px; flex: 0 0 148px; position: sticky; left: 0; z-index: 30;
  background: #fffdfb; border-right: 2px solid var(--line);
  padding: 10px 12px; font-size: 13px;
}
.tlname b { display: block; color: var(--ink); }
.tlname span { font-size: 11px; color: var(--mut); }
.tldays { position: relative; display: grid; grid-template-columns: repeat(var(--cols), var(--dayw)); flex: 1; }
.tlday { border-left: 1px solid #f1ebe4; height: 100%; }
.tldates .tlday { text-align: center; padding-top: 5px; border-left: 1px solid #f1ebe4; }
.tlday.d0 { background: #fbeeec; }           /* Sunday */
.tlday.d6 { background: #f6f3ef; }           /* Saturday */
.tlday.today { background: #fbe8e0; box-shadow: inset 2px 0 0 var(--terra), inset -2px 0 0 var(--terra); }
.tlday.today.d0 { background: #f6ded7; }
.tldates .dd { display: block; font-weight: 700; font-size: 12.5px; }
.tldates .dw { display: block; font-size: 9.5px; color: var(--mut); text-transform: uppercase; }
.tldates .tlday.today .dd, .tldates .tlday.today .dw { color: var(--terra); }

/* boxes */
.box {
  position: absolute; top: 5px; height: 90px; z-index: 10;
  border-radius: 8px; border: 1px solid #e3cf7c; background: var(--amber-soft);
  padding: 6px 8px; overflow: hidden; display: block; color: var(--ink);
  box-shadow: 0 1px 2px rgba(80,50,20,.08);
}
.box:hover { border-color: var(--terra); box-shadow: 0 3px 10px rgba(140,60,30,.18); z-index: 20; }
.box.st-running { background: var(--terra-soft); border-color: #dfa88f; }
.box.st-done { background: #efedeb; border-color: var(--line); }
.box.st-done .b-cust, .box.st-done .b-art { text-decoration: line-through; color: var(--mut); }
.box.islate { border: 2px solid var(--bad); }
.b-cust { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-cust i { font-style: normal; font-weight: 500; color: var(--mut); }
.b-art { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 1px 0; }
.b-meta { display: block; font-size: 10.5px; color: var(--mut); white-space: nowrap; overflow: hidden; }
.b-chips { display: flex; gap: 3px; margin-top: 4px; flex-wrap: nowrap; overflow: hidden; }
.chip {
  font-style: normal; font-size: 9.5px; font-weight: 700; padding: 1.5px 5px; border-radius: 5px;
  background: #fff; border: 1px solid var(--line); white-space: nowrap;
}
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: #bfe3cd; }
.chip.no { background: var(--bad-soft); color: var(--bad); border-color: #efc4c4; }
.chip.zero { color: var(--mut); }
.pill {
  font-style: normal; font-size: 8.5px; font-weight: 700; padding: 1.5px 4px; border-radius: 4px;
  background: #efe9df; color: #6b5c4c; letter-spacing: .4px; white-space: nowrap;
}
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.latepill { background: var(--bad); color: #fff; }
.notedot { font-style: normal; font-size: 8.5px; font-weight: 700; color: #fff; background: var(--terra); border-radius: 50%; width: 13px; height: 13px; display: inline-flex; align-items: center; justify-content: center; }
.hint { font-size: 11.5px; color: var(--mut); margin: 10px 4px 0; }

/* ------------------------------------------------ tables */
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--mut); padding: 7px 8px; border-bottom: 2px solid var(--line); }
table.list td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr.ro { cursor: pointer; }
table.list tr.ro:hover { background: #fdf8f4; }
table.list tr.cancelled td { opacity: .5; text-decoration: line-through; }
table.list tr.done td { opacity: .65; }
table.list.small { font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.chips { white-space: nowrap; }
.chips .chip, .chips .pill { margin-right: 3px; }
.empty { color: var(--mut); padding: 20px 0; text-align: center; }
.filters { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.filters select, .filters input { width: auto; min-width: 160px; margin: 0; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 20px; text-transform: uppercase; letter-spacing: .5px; background: var(--amber-soft); color: #7a6420; }
.tag.st-running { background: var(--terra-soft); color: var(--terra-dark); }
.tag.st-done { background: #efedeb; color: var(--mut); }
.tag.st-cancelled { background: var(--bad-soft); color: var(--bad); text-decoration: line-through; }
.tag.lot { background: #e8ecf7; color: #3b5290; margin-left: 6px; }

/* ------------------------------------------------ order detail */
.detailhead { display: flex; justify-content: space-between; align-items: start; gap: 14px; }
.crumb { font-size: 12px; }
.sub { margin: 2px 0 0; color: var(--mut); font-size: 13.5px; }
.headright { white-space: nowrap; padding-top: 22px; }
table.kv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.kv td { padding: 6px 4px; border-bottom: 1px dashed var(--line); vertical-align: top; }
table.kv td:first-child { color: var(--mut); width: 42%; }
.okmark { color: var(--ok); font-weight: 700; }
.queue { margin: 10px 0 0; padding: 0 0 0 20px; font-size: 13px; }
.queue li { margin-bottom: 5px; }
.queue li.here a { color: var(--terra); font-weight: 700; }
.queue .mut { display: block; font-size: 11.5px; }

/* accessories */
.acccols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 10px 0; }
@media (max-width: 860px) { .acccols { grid-template-columns: 1fr; } }
.acccol { background: #fbf9f6; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.accrow { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.accrow .accname { flex: 1; font-size: 13px; }
.accrow.isarrived .accname { color: var(--ok); }
.accrow.isarrived .accname::after { content: none; }
.estd { font-size: 11px; color: var(--bad); white-space: nowrap; }
.tick {
  width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid #c9beb2; background: #fff;
  cursor: pointer; font-size: 13px; line-height: 1; color: #fff; padding: 0; flex: 0 0 22px;
}
.tick:hover { border-color: var(--ok); }
.tick.on { background: var(--ok); border-color: var(--ok); }
.xbtn { background: none; border: none; color: var(--mut); font-size: 15px; cursor: pointer; padding: 0 3px; }
.xbtn:hover { color: var(--bad); }
.accadd { display: flex; gap: 6px; margin-top: 9px; }
.accadd input { margin: 0; font-size: 12.5px; padding: 6px 8px; }
.accadd input[name=name] { flex: 1; }
.accadd input[name=est_date] { width: 120px; }

/* ------------------------------------------------ form */
.orderform { max-width: 1080px; }
.fgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 800px) { .fgrid { grid-template-columns: 1fr; } }
.fgrid .wide { grid-column: span 3; }
@media (max-width: 800px) { .fgrid .wide { grid-column: span 1; } }
.flagsrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 6px 0 12px; }
.perdaypreview { font-weight: 700; color: var(--terra); font-size: 13.5px; margin-left: auto; }
.faccrow { display: flex; gap: 6px; margin-bottom: 6px; }
.faccrow input { margin: 0; font-size: 12.5px; padding: 6px 8px; }
.faccrow input:first-of-type { flex: 1; }
.faccrow input[type=date] { width: 118px; }
.addacc { margin-top: 4px; }
.inlineform { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.inlineform input, .inlineform select { width: auto; margin: 0; min-width: 120px; }

/* round 2: accessory checklist on the order form */
.faccitem { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); margin: 0; font-weight: 400; }
.faccitem input[type=checkbox] { width: auto; margin: 0; flex: 0 0 auto; }
.faccitem span { flex: 1; font-size: 13px; color: var(--ink); font-weight: 500; }
.faccitem input[type=date] { width: 128px; margin: 0; padding: 4px 6px; font-size: 12px; display: none; }
.faccitem.on input[type=date] { display: block; }
.faccitem.on span { color: var(--terra-dark); }
.faccitem.other { border-bottom: none; padding-top: 8px; }
.faccitem.other span { flex: 0 0 auto; font-size: 12px; }
.faccitem.other input[name*="other_name"] { flex: 1; margin: 0; padding: 5px 8px; font-size: 12.5px; min-width: 60px; }
.faccitem.other input[type=date] { display: block; width: 118px; }
.flagsdiv { width: 1px; height: 22px; background: var(--line); margin: 0 8px; }

/* round 2: set exact date range */
.rangefrom { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-top: 6px; }
.rangefrom label { margin: 0; }
.rangefrom input { width: 150px; margin: 0; }

/* round 2: drag on timeline boxes */
.box { cursor: grab; touch-action: none; user-select: none; }
.box.rz-l, .box.rz-r { cursor: ew-resize; }
.box.dragging { opacity: .85; z-index: 60; box-shadow: 0 8px 22px rgba(140,60,30,.35); cursor: grabbing; }
.tlrow .tlday { cursor: cell; }
.dragtip {
  position: fixed; z-index: 100; background: var(--ink); color: #fff;
  font: 600 11.5px 'Inter'; padding: 5px 9px; border-radius: 6px;
  pointer-events: none; white-space: nowrap; display: none;
}

/* round 3: account menu */
.acct { position: relative; }
.acct summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 13px; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink);
}
.acct summary::-webkit-details-marker { display: none; }
.acct summary:hover { border-color: var(--terra); }
.acct[open] summary { border-color: var(--terra); background: var(--terra-soft); }
.acct .caretdn { font-size: 10px; color: var(--mut); }
.acct .menu {
  position: absolute; right: 0; top: calc(100% + 6px); background: #fff;
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 26px rgba(60,30,15,.16); min-width: 210px;
  padding: 6px; z-index: 80; display: flex; flex-direction: column; gap: 2px;
}
.acct .menu a, .acct .menu button {
  text-align: left; padding: 8px 10px; border-radius: 7px; font-size: 13px;
  color: var(--ink); background: none; border: none; cursor: pointer; font: inherit;
  width: 100%; font-weight: 500;
}
.acct .menu a:hover, .acct .menu button:hover { background: var(--terra-soft); }
.acct .menu button.danger { color: var(--bad); }
.acct .menu hr { border: none; border-top: 1px solid var(--line); margin: 4px 0; }
.acct .langrow { display: flex; gap: 6px; padding: 4px 10px; }
.acct .langrow a {
  flex: 1; text-align: center; border: 1px solid var(--line); border-radius: 7px;
  padding: 5px 0; font-size: 12px; font-weight: 700; color: var(--mut);
}
.acct .langrow a:hover { border-color: var(--terra); color: var(--terra); }

/* round 3: hover snapshot card */
.tipdata { display: none; }
.hovertip {
  position: fixed; z-index: 90; display: none; pointer-events: none;
  background: #fffdfb; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 22px rgba(60,30,15,.18); padding: 10px 13px; max-width: 320px;
  font: 400 12px/1.5 'Inter'; color: var(--ink);
}
.hovertip b { display: block; font-size: 12.5px; letter-spacing: .2px; text-transform: uppercase; }
.hovertip i { display: block; font-style: normal; font-weight: 600; margin-bottom: 2px; }
.hovertip span { display: block; }
.hovertip span small { color: var(--mut); }
.hovertip em {
  display: block; font-style: normal; font-weight: 700; font-size: 10px;
  text-transform: uppercase; letter-spacing: .6px; color: var(--mut); margin-top: 6px;
}
.hovertip .tok { color: var(--ok); }
.hovertip .twait { color: var(--bad); }
.hovertip .tmut { color: var(--mut); }
.hovertip .tflags { color: #6b5c4c; font-weight: 600; }
.hovertip .tlate { color: var(--bad); }
.hovertip .tnotes { color: var(--mut); font-style: italic; margin-top: 4px; }

/* round 3: line management rows */
.linerow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.linerow .inlineform { margin-bottom: 0; }

/* ------------------------------------------------ round 4 */
.linerow { display: flex; gap: 8px; align-items: center; }
.assignrow { display: flex; gap: 6px; align-items: center; }
.assignrow select { width: auto; margin: 0; font-size: 12px; padding: 5px 7px; max-width: 190px; }
.assignform { display: flex; gap: 10px; align-items: end; max-width: 480px; }
.assignform label { flex: 1; margin: 0; }
.assignform button { margin-bottom: 1px; }

/* progress bars */
.progbar {
  position: relative; height: 20px; background: #efe9e2; border-radius: 10px;
  overflow: hidden; margin: 8px 0 4px; border: 1px solid var(--line);
}
.progbar i { display: block; height: 100%; background: linear-gradient(90deg, #3f9d6b, #2e7d4f); border-radius: 10px 0 0 10px; }
.progbar span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 700 11px 'Inter'; color: var(--ink); mix-blend-mode: multiply;
}
.progwrap {
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.08);
  display: block;
}
.progwrap i { display: block; height: 100%; background: var(--ok); }
.box.st-done .progwrap i { background: var(--mut); }
.duedate { color: var(--bad); font-weight: 700; }
.actualtbl input { padding: 4px 7px; font-size: 13px; }
.actualtbl tr.istoday td { background: #fdf3ec; }

/* today floor view */
.todayhead { display: flex; justify-content: space-between; align-items: center; }
.todayhead h1 { margin: 0; }
.todaygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.todayline { margin-bottom: 0; padding: 13px 15px; }
.todayline.freeline { opacity: .75; border-style: dashed; }
.tl-head b { font-size: 15px; }
.todaycust { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--mut); margin-top: 8px; }
.todayart { font-size: 14.5px; font-weight: 600; margin: 1px 0 3px; }
.todaytgt { font-size: 12.5px; color: var(--terra-dark); font-weight: 600; }
.todaypend { margin-top: 7px; font-size: 11.5px; color: var(--bad); font-weight: 600; }
.todaynext { margin-top: 7px; font-size: 11.5px; color: var(--mut); }
.todayfree { margin-top: 10px; font-size: 12.5px; color: var(--mut); }

/* outlook */
.lighthold { white-space: nowrap; }
.light { font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.light.red { color: var(--bad); }
.light.amber { color: #b07d10; }
.light.green { color: var(--ok); }
.outlookhead { display: flex; justify-content: space-between; align-items: center; }
.outlookhead h1 { margin: 0; }

/* cross-line drop highlight */
.tlrow.droprow { background: #fdf1ea; box-shadow: inset 0 0 0 2px var(--terra); }
.tlrow.droprow .tlname { background: #fdf1ea; }

/* print: floor copy of the today view */
@media print {
  .top, .flash, nav, .btn, form, .acct, .hint, .legend { display: none !important; }
  body { background: #fff; }
  main { max-width: none; padding: 0; }
  .card { border-color: #999; box-shadow: none; break-inside: avoid; }
  .todaygrid { grid-template-columns: repeat(3, 1fr); }
}
.offrow { opacity: .55; }
.offrow .inlineform input { text-decoration: line-through; }

/* ------------------------------------------------ round 5 */
/* boxes positioned by day offsets so the grid can scale on small screens */
.box { left: calc(var(--so) * var(--dayw)); width: calc(var(--sl) * var(--dayw) - 3px); }
.box.dragging { box-shadow: 0 10px 26px rgba(140,60,30,.4); opacity: .9; }
.ghostbox {
  border: 2px dashed var(--terra); background: rgba(180,83,56,.10);
  box-shadow: none; pointer-events: none; z-index: 8;
}
.ghostbox .b-cust, .ghostbox .b-art, .ghostbox .b-meta, .ghostbox .b-chips { visibility: hidden; }
.tlrow.droprow { background: #fbeee7; }
nav a.gap { margin-left: 16px; position: relative; }
nav a.gap::before {
  content: ''; position: absolute; left: -9px; top: 22%; height: 56%;
  width: 1px; background: var(--line);
}
.todayline.linked { cursor: pointer; }
.todayline.linked:hover { border-color: var(--terra); box-shadow: 0 4px 14px rgba(140,60,30,.14); }

/* ------------------------------------------------ mobile */
@media (max-width: 760px) {
  .top { padding: 8px 10px; gap: 10px 12px; flex-wrap: wrap; }
  .brand { font-size: 17px; }
  .brand span { display: none; }
  nav {
    order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch; padding-bottom: 2px; scrollbar-width: none;
  }
  nav::-webkit-scrollbar { display: none; }
  nav a { white-space: nowrap; padding: 9px 12px; font-size: 13.5px; }
  nav a.gap { margin-left: 14px; }
  nav a.addbtn { flex: 0 0 auto; }
  .who { margin-left: auto; }
  .acct summary { padding: 7px 10px; }
  main { padding: 12px 10px 48px; }
  .statrow { flex-wrap: wrap; gap: 8px; }
  .stat { flex: 1 1 30%; min-width: 96px; padding: 8px 12px; }
  .stat b { font-size: 18px; }
  .tlname { width: 88px; flex: 0 0 88px; padding: 8px 7px; font-size: 11.5px; }
  .tlrow { min-height: 86px; }
  .box { height: 78px; padding: 4px 6px; border-radius: 7px; }
  .b-art { font-size: 11px; }
  .b-cust { font-size: 9.5px; }
  .b-meta { font-size: 9px; }
  .chip { font-size: 8.5px; padding: 1px 4px; }
  .pill { font-size: 8px; }
  .tldates .dd { font-size: 11px; }
  table.list { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .cols2 { grid-template-columns: 1fr; }
  .fgrid { grid-template-columns: 1fr 1fr; gap: 0 10px; }
  .fgrid .wide { grid-column: span 2; }
  .btn { padding: 9px 13px; font-size: 13.5px; }
  .filters select, .filters input { min-width: 130px; }
  .todaygrid { grid-template-columns: 1fr; }
  .rangefrom input { width: 128px; }
  .flash { margin: 10px 10px 0; }
  .hovertip { display: none !important; } /* hover cards are a desktop affordance */
  .acccols { grid-template-columns: 1fr; }
}
@media (max-width: 440px) {
  .fgrid { grid-template-columns: 1fr; }
  .fgrid .wide { grid-column: span 1; }
}

/* ------------------------------------------------ round 6 */
.langsw { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.langsw a { padding: 6px 10px; font-size: 12px; font-weight: 700; color: var(--mut); background: #fff; }
.langsw a.on { background: var(--terra); color: #fff; }
.langsw a:not(.on):hover { color: var(--terra); }
.varrow { display: flex; gap: 6px; margin-bottom: 6px; max-width: 430px; }
.varrow input { margin: 0; font-size: 13px; padding: 6px 8px; }
.varrow input:first-child { flex: 1; }
.varrow input[name="var_qty[]"] { width: 96px; }
.varrow.proto { display: none; }
.var-del { font-size: 16px; padding: 4px 6px; }
.dashkpis { flex-wrap: wrap; }
.dashkpis .stat { flex: 1 1 140px; }
.effwrap {
  display: inline-block; vertical-align: middle; width: 110px; height: 12px;
  background: #efe9e2; border-radius: 6px; overflow: hidden; margin-right: 8px;
  border: 1px solid var(--line);
}
.effbar { display: block; height: 100%; border-radius: 6px 0 0 6px; }
.dashotd b { font-size: 26px; }
