@font-face { font-family: "Atkinson"; font-weight: 400; src: url(/ui/fonts/traceall-text-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; font-display: swap; }
@font-face { font-family: "Atkinson"; font-weight: 700; src: url(/ui/fonts/traceall-text-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; font-display: swap; }
@font-face { font-family: "Atkinson"; font-weight: 400; src: url(/ui/fonts/atkinson-hyperlegible-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; font-display: swap; }
@font-face { font-family: "Atkinson"; font-weight: 700; src: url(/ui/fonts/atkinson-hyperlegible-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; font-display: swap; }
@font-face { font-family: "Fraunces"; font-weight: 100 900; src: url(/ui/fonts/fraunces-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; font-display: swap; }
@font-face { font-family: "Fraunces"; font-weight: 100 900; src: url(/ui/fonts/fraunces-latin-ext-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; font-display: swap; }

:root {
  --paper: #F3F5F2; --surface: #FFFFFF; --ink: #1B2326; --muted: #5C696C; --line: #D8DFDB; --line-soft: #E8EDEA;
  --pine: #17463F; --pine-deep: #0F332E; --pine-soft: #E2EEEA; --on-pine: #E9F1EE; --on-pine-muted: #9DBBB3;
  --saffron: #B87A00; --saffron-soft: #FBEFD0; --saffron-mark: #E3A82B;
  --madder: #A3302F; --madder-soft: #F6E0DE; --ok: #2F6F4C; --ok-soft: #DDEEE4;
  --ui: "Atkinson", "Segoe UI", system-ui, sans-serif; --serif: "Fraunces", Georgia, serif;
  --focus: 0 0 0 3px #fff, 0 0 0 5px #2B6CB0;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #11191A; --surface: #182224; --ink: #E6EDEA; --muted: #98A8A9; --line: #2C3A3C; --line-soft: #243032;
    --pine: #1E5A51; --pine-deep: #0B1617; --pine-soft: #1B3A35; --saffron: #E3A82B; --saffron-soft: #3A2E10; --madder: #E26A68; --madder-soft: #3C2220; --ok: #6FC293; --ok-soft: #1B3527; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h1 { font-family: var(--serif); font-size: 2rem; line-height: 1.15; letter-spacing: -0.01em; font-variation-settings: "SOFT" 50, "opsz" 72; }
h2 { font-size: 1.05rem; }
a { color: var(--pine); text-underline-offset: 3px; } @media (prefers-color-scheme: dark) { a { color: #8FD0C2; } }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
table.ai-usage td.num, table.ai-usage th.num { text-align: right; }
table.ai-usage td { padding: .45rem .9rem; border-bottom: 1px solid var(--line); }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* shell */
.shell { display: grid; grid-template-columns: 17rem minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--pine-deep); color: var(--on-pine); padding: 1.25rem 0 1.5rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: .6rem; padding: 0 1.25rem 1.25rem; font-family: var(--serif); font-size: 1.45rem; font-weight: 600; color: #fff; text-decoration: none; }
.brand svg { width: 1.7rem; height: 1.7rem; }
.nav h3 { font-size: .8rem; font-weight: 700; color: var(--on-pine-muted); padding: 1.1rem 1.25rem .35rem; letter-spacing: .01em; }
.nav a { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .45rem 1.25rem; color: var(--on-pine); text-decoration: none; border-left: 3px solid transparent; }
.nav a:hover { background: rgba(255,255,255,.06); }
.nav a[aria-current="page"] { background: rgba(255,255,255,.1); border-left-color: var(--saffron-mark); font-weight: 700; }
.nav .badge { background: var(--saffron-mark); color: #2A1C00; border-radius: 99px; font-size: .78rem; font-weight: 700; padding: 0 .5rem; min-width: 1.4rem; text-align: center; }
.main { min-width: 0; }
.top { display: flex; gap: 1rem; align-items: center; padding: .75rem 2rem; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.jump { flex: 1; max-width: 32rem; display: flex; align-items: center; gap: .6rem; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: .45rem .8rem; color: var(--muted); cursor: pointer; text-align: left; }
.jump kbd { margin-left: auto; font: inherit; font-size: .8rem; border: 1px solid var(--line); border-radius: 4px; padding: 0 .35rem; background: var(--surface); }
.topbar-right { margin-left: auto; display: flex; gap: .7rem; align-items: center; font-size: .95rem; }
.testbar { background: var(--saffron-soft); color: var(--saffron); text-align: center; padding: .25rem; font-weight: 700; font-size: .9rem; }
.menu-btn { display: none; }
.page { padding: 1.75rem 2rem 4rem; max-width: 120rem; }   /* 0.10: use wide screens; text blocks keep their own measure */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head p { margin: .35rem 0 0; color: var(--muted); max-width: 60ch; }
.crumb { font-size: .95rem; margin-bottom: .35rem; }

/* controls */
.btn { display: inline-flex; align-items: center; gap: .4rem; background: var(--pine); color: #fff; border: 1px solid var(--pine); border-radius: 7px; padding: .5rem .95rem; cursor: pointer; text-decoration: none; font-weight: 700; }
.btn:hover { background: var(--pine-deep); } .btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.quiet { background: transparent; color: var(--pine); } .btn.quiet:hover { background: var(--pine-soft); }
@media (prefers-color-scheme: dark) { .btn.quiet { color: #8FD0C2; } .btn { color: #fff; } }
.btn.danger { background: var(--madder); border-color: var(--madder); }
.field { display: grid; gap: .3rem; margin-bottom: .9rem; } .field label { font-weight: 700; font-size: .95rem; }
.field input, .field select, .field textarea { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: .55rem .7rem; width: 100%; }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters input, .filters select { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: .45rem .7rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: .4rem .9rem; cursor: pointer; } .seg button[aria-pressed="true"] { background: var(--pine); color: #fff; font-weight: 700; }

/* tables */
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-weight: 700; font-size: .92rem; color: var(--muted); padding: .65rem .9rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
td { padding: .6rem .9rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr[data-href] { cursor: pointer; } tbody tr[data-href]:hover { background: var(--pine-soft); }
td.r, th.r { text-align: right; }
.empty { padding: 2.2rem 1.2rem; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: .2rem; }

/* status */
.tag { display: inline-block; border-radius: 5px; padding: 0 .5rem; font-size: .88rem; font-weight: 700; background: var(--line-soft); color: var(--muted); }
.tag.ok { background: var(--ok-soft); color: var(--ok); } .tag.warn { background: var(--saffron-soft); color: var(--saffron); } .tag.bad { background: var(--madder-soft); color: var(--madder); }

/* Today: ruled worklists instead of cards */
.today { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 2.2rem 3rem; }
.work h2 { display: flex; align-items: baseline; gap: .6rem; padding-bottom: .5rem; border-bottom: 2px solid var(--ink); }
.work h2 .n { font-family: var(--serif); font-size: 1.7rem; line-height: 1; font-weight: 600; }
.work ul { list-style: none; margin: 0; padding: 0; }
.work li a { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.work li a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.work .none { padding: .8rem 0; color: var(--muted); }

/* detail */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.1rem 2rem; margin: 0 0 2rem; }
.facts dt { font-size: .9rem; color: var(--muted); } .facts dd { margin: 0; font-weight: 700; font-size: 1.05rem; }
.section { margin-top: 2.2rem; } .section > h2 { margin-bottom: .7rem; }
.totals { margin-left: auto; width: min(22rem, 100%); margin-top: 1rem; } .totals div { display: flex; justify-content: space-between; padding: .3rem 0; } .totals .grand { border-top: 2px solid var(--ink); font-weight: 700; font-family: var(--serif); font-size: 1.25rem; margin-top: .3rem; padding-top: .5rem; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* the lot chain: where this lot came from and where it went */
.chain { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: .4rem 0 1rem; }
.chain .link { display: flex; align-items: center; color: var(--muted); padding: 0 .35rem; }
.chain .link svg { width: 2.2rem; height: 1rem; }
.tagnode { position: relative; min-width: 11.5rem; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 4px 12px 12px 4px; padding: .65rem .9rem .65rem 1.7rem; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.tagnode::before { content: ""; position: absolute; left: .6rem; top: 50%; width: .55rem; height: .55rem; margin-top: -.275rem; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink); }
.tagnode.here { background: var(--pine); color: #fff; border-color: var(--pine); } .tagnode.here::before { background: var(--saffron-mark); border-color: var(--saffron-mark); }
.tagnode small { display: block; color: var(--muted); } .tagnode.here small { color: var(--on-pine-muted); }
.tagnode b { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; }
.chain-col { display: grid; gap: .5rem; align-content: center; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: var(--pine-deep); }
.login form { background: var(--surface); border-radius: 12px; padding: 2rem; width: min(26rem, 100%); }
.login h1 { margin-bottom: .3rem; } .login p { margin: 0 0 1.4rem; color: var(--muted); }
.err { background: var(--madder-soft); color: var(--madder); border-radius: 7px; padding: .6rem .8rem; margin-bottom: 1rem; font-weight: 700; }
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 8px; z-index: 30; }

/* quick jump */
dialog.palette { border: 1px solid var(--line); border-radius: 12px; padding: 0; width: min(34rem, 92vw); margin-top: 10vh; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.28); }
dialog.palette::backdrop { background: rgba(10,22,20,.45); }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 1rem 1.1rem; font-size: 1.1rem; background: transparent; }
.palette ul { list-style: none; margin: 0; padding: .4rem; max-height: 22rem; overflow-y: auto; }
.palette li a { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .7rem; border-radius: 6px; text-decoration: none; color: inherit; }
.palette li a[aria-selected="true"], .palette li a:hover { background: var(--pine-soft); }

@media (max-width: 52rem) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: 17rem; transform: translateX(-100%); z-index: 20; transition: transform .18s; } .side.open { transform: none; }
  .menu-btn { display: inline-flex; background: none; border: 1px solid var(--line); border-radius: 7px; padding: .4rem .7rem; cursor: pointer; }
  .top, .page { padding-left: 1rem; padding-right: 1rem; } .acct-name { display: none; } .jump kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* inbox */
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs button { border: 0; background: none; padding: .55rem .9rem; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; display: inline-flex; gap: .45rem; align-items: center; }
.tabs button[aria-selected="true"] { border-bottom-color: var(--saffron-mark); font-weight: 700; }
.tabs .n { background: var(--pine-soft); border-radius: 99px; padding: 0 .5rem; font-size: .82rem; font-weight: 700; }
.tabs button[aria-selected="true"] .n { background: var(--pine); color: #fff; }
.mlist { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mrow { display: grid; grid-template-columns: 13rem minmax(0, 1fr) auto; gap: .9rem; align-items: baseline; padding: .6rem .9rem; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.mrow:last-child { border-bottom: 0; } .mrow:hover { background: var(--pine-soft); }
.mrow.unread { font-weight: 700; background: color-mix(in srgb, var(--saffron-soft) 45%, var(--surface)); }
.mfrom, .msubj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mmain { display: flex; gap: .3rem; align-items: baseline; min-width: 0; overflow: hidden; white-space: nowrap; }
.msubj { flex: 0 1 auto; } .msnip { font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; flex: 1 1 0; min-width: 0; }
.mmeta { display: flex; gap: .4rem; align-items: baseline; justify-content: flex-end; font-weight: 400; }
.mdate { color: var(--muted); font-size: .9rem; min-width: 3.4rem; text-align: right; }
.chip { display: inline-flex; align-items: center; gap: .25rem; border-radius: 5px; padding: 0 .45rem; font-size: .8rem; font-weight: 700; line-height: 1.5; white-space: nowrap; flex: none; }
.chip-x { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 .1rem; font-size: 1rem; line-height: 1; opacity: .75; } .chip-x:hover { opacity: 1; }
.statusrow { display: flex; gap: .4rem; margin-bottom: .8rem; }
.panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1.2rem 2.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; margin: 1.1rem 0; }
.panel h2 { margin-bottom: .5rem; }
.labelrow { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.inline { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.inline input, .inline select, .plain { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: .4rem .6rem; }
input.plain { border-color: transparent; background: transparent; width: 100%; } input.plain:hover, input.plain:focus { border-color: var(--line); background: var(--surface); }
.check { display: block; margin-top: .7rem; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; margin-bottom: .8rem; }
.msg.out { background: var(--pine-soft); border-color: transparent; }
.msg header { display: flex; gap: .3rem; flex-wrap: wrap; align-items: baseline; margin-bottom: .5rem; } .msg header .mdate { margin-left: auto; }
.body { white-space: pre-wrap; overflow-wrap: anywhere; }
.draft { background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; padding: .8rem 1rem; margin-bottom: .8rem; display: grid; gap: .5rem; }
.draftform { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; max-width: 46rem; }
.row2 { display: grid; grid-template-columns: 1fr 10rem; gap: 1rem; }
tr.dim td { opacity: .6; }
@media (max-width: 52rem) { .mrow { grid-template-columns: 1fr auto; } .mmain { grid-column: 1 / -1; grid-row: 2; } .row2 { grid-template-columns: 1fr; } }

.filters input[type=search] { min-width: 18rem; }

/* mail settings */
.mailcard { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem 2rem; }
.mailcard .fullrow { grid-column: 1 / -1; }
.mailcard .field small { font-size: .85rem; }
.folders { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.folders p { flex-basis: 100%; margin: .2rem 0; }
.btn.small { padding: .15rem .6rem; font-weight: 400; }
.ok { color: var(--ok); font-weight: 700; } .bad { color: var(--madder); font-weight: 700; }
.guide { padding-left: 1.3rem; display: grid; gap: .9rem; max-width: 52rem; }
.guide pre, pre.cmd, .cmd { background: var(--ink); color: var(--paper); border-radius: 7px; padding: .5rem .8rem; overflow-x: auto; margin: .4rem 0; font-size: .92rem; }
.syncline { margin: -.6rem 0 1rem; font-size: .92rem; display: flex; gap: .8rem; flex-wrap: wrap; }
.statusrow { flex-wrap: wrap; }
@media (max-width: 52rem) { .mailcard { grid-template-columns: 1fr; } }
details.guide{margin:12px 0;padding:10px 16px;background:#fff;border:1px solid var(--line,#dcdfd9);border-radius:10px}
details.guide>summary{cursor:pointer;font-weight:700;padding:4px 0}
.topbar-right .syncbtn{background:var(--pine,#1a4a40);color:#fff;border:0;border-radius:8px;padding:.35rem .8rem;text-decoration:none;cursor:pointer;font:inherit;font-weight:600}
.topbar-right .syncbtn:disabled{opacity:.75;cursor:progress}

/* ---- CRM (stage 2): leads, board, tasks, import ---- */
dialog.modal { border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem 1.4rem; max-width: min(680px, 94vw); width: 100%; background: var(--surface); color: var(--ink); }
dialog.modal::backdrop { background: rgba(15, 51, 46, .5); }
dialog.modal h2 { margin-top: 0; }
dialog.modal .actions { margin-top: 1rem; display: flex; gap: .5rem; justify-content: flex-end; }
.btn.small { padding: .2rem .6rem; font-size: .85rem; }
.bulkbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: .55rem .8rem; margin: .5rem 0; background: var(--pine-soft); border-radius: 8px; position: sticky; top: 0; z-index: 5; }
.bulkbar[hidden] { display: none; }
.notice { background: var(--saffron-soft); border: 1px solid var(--saffron-mark); border-radius: 8px; padding: .55rem .8rem; margin: .5rem 0; }
.pick { position: relative; display: inline-block; }
.pick > summary { cursor: pointer; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); list-style: none; }
.pickbody { position: absolute; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .6rem; max-height: 20rem; overflow: auto; min-width: 15rem; box-shadow: 0 6px 18px rgba(0, 0, 0, .15); display: flex; flex-direction: column; gap: .3rem; }
.pager { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
table.leads tr.sel { background: var(--pine-soft); }
tr.dim { opacity: .5; }
th.sortable button { all: unset; cursor: pointer; font-weight: inherit; }
.chip.flt { background: var(--line-soft); color: var(--ink); }
.chip-x { all: unset; cursor: pointer; margin-left: .35rem; font-weight: 700; }
.labelrow.inl { display: inline-flex; }
.statusrow { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: .3rem 0 .8rem; }
ul.tasks { list-style: none; padding: 0; margin: .4rem 0; }
ul.tasks li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .3rem 0; border-bottom: 1px solid var(--line-soft); }
ul.tasks.wide li { display: grid; grid-template-columns: minmax(12rem, 3fr) 2fr 1fr 6rem 2rem; }
ul.tasks li.done span { text-decoration: line-through; color: var(--muted); }
ul.tl { list-style: none; padding: 0; }
ul.tl li { padding: .4rem 0; border-bottom: 1px solid var(--line-soft); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
td.clip { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi { display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.mwrap { display: flex; align-items: stretch; }
.mwrap .mrow { flex: 1; }
.msel { margin: 0 .3rem 0 .6rem; align-self: center; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: .8rem; overflow-x: auto; padding-bottom: .8rem; }
.col { background: var(--line-soft); border-radius: 10px; padding: .6rem; min-height: 12rem; }
.col.over { outline: 2px dashed var(--pine); }
.col > header { display: flex; justify-content: space-between; text-transform: capitalize; margin-bottom: .5rem; }
.cards { display: flex; flex-direction: column; gap: .5rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .65rem; display: flex; flex-direction: column; gap: .3rem; cursor: grab; }
.card.drag { opacity: .4; }
.card .ctitle { font-weight: 600; }
.card .cmeta { display: flex; justify-content: space-between; gap: .5rem; }
.card select { font-size: .8rem; }
.overdue { color: var(--madder); font-weight: 600; }
.cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
table.bars td { padding: .2rem .4rem; }
td.barcell { width: 50%; }
.bar { display: block; height: .7rem; background: var(--pine); border-radius: 3px; }
ul.notes { margin: .4rem 0; padding-left: 1.2rem; color: var(--saffron); }
.err { background: var(--madder-soft); border: 1px solid var(--madder); border-radius: 8px; padding: .6rem .8rem; }
@media (max-width: 700px) { ul.tasks.wide li { grid-template-columns: 1fr auto; } .board { grid-auto-columns: 85%; } }
.main-col { min-width: 0; }
table.leads td { vertical-align: top; }
table.leads td a { overflow-wrap: anywhere; }

/* login: second step, account page */
.login .note { background: var(--pine-soft); color: var(--pine-deep); border-radius: 7px; padding: .6rem .8rem; margin-bottom: 1rem; font-weight: 700; }
.login .check { display: flex; gap: .5rem; align-items: flex-start; margin: .2rem 0 1rem; font-size: .95rem; }
.login .check input { margin-top: .25rem; }
.login .alts { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; margin-top: 1rem; }
.linkbtn { background: none; border: 0; padding: .3rem 0; color: var(--pine); text-decoration: underline; cursor: pointer; font: inherit; }
@media (prefers-color-scheme: dark) { .login .note { background: transparent; border: 1px solid var(--line); color: inherit; } .linkbtn { color: #8FD0C2; } }
.qr { display: block; margin: .6rem 0; background: #fff; padding: .4rem; border-radius: 8px; image-rendering: pixelated; }

/* ---- brand ---- */
.brand { align-items: center; }
.brand-tile { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px; background: #F6F8F5; flex: none; }
.brand-tile img { width: 1.75rem; height: 1.6rem; }
.brand-text { display: grid; line-height: 1.1; } .brand-text b { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; } .brand-text small { font-family: var(--ui); font-size: .72rem; font-weight: 400; color: var(--on-pine-muted); letter-spacing: .04em; text-transform: uppercase; margin-top: .15rem; }
.login { align-content: center; gap: 1.1rem; }
.login-logo { background: #fff; border-radius: 12px; padding: 1.1rem 1.6rem; width: min(26rem, 100%); display: grid; place-items: center; } .login-logo img { max-width: 100%; height: auto; }
.brandcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.5rem; margin-bottom: 1.5rem; display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; } .brandcard p { margin: 0; max-width: 40ch; } .brandcard img { max-width: 100%; height: auto; }
@media (prefers-color-scheme: dark) { .brandcard { background: #fff; } .brandcard p { color: #5C696C; } }

/* ---- sales ---- */
.small { font-size: .85rem; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .7rem; } .sec-head h2 { margin: 0; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr)); gap: 0 2rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); gap: 1rem; margin-bottom: .5rem; }
.kpi { display: grid; gap: .15rem; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--pine); border-radius: 10px; padding: .9rem 1.1rem; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.kpi:hover { box-shadow: 0 6px 18px rgba(15, 51, 46, .12); transform: translateY(-1px); }
.kpi.bad { border-top-color: var(--madder); } .kpi.warn { border-top-color: var(--saffron-mark); }
.k-label { font-size: .85rem; color: var(--muted); font-weight: 700; } .k-value { font-family: var(--serif); font-size: 1.7rem; line-height: 1.15; font-weight: 600; } .k-sub { font-size: .85rem; color: var(--muted); }
.seg button .n { margin-left: .25rem; font-size: .8rem; opacity: .75; }
.filters .seg { flex-wrap: wrap; }
.flow { list-style: none; display: flex; gap: 0; padding: 0; margin: 0 0 1.5rem; flex-wrap: wrap; }
.flow li { position: relative; padding: .35rem .9rem .35rem 1.7rem; background: var(--line-soft); color: var(--muted); font-weight: 700; font-size: .9rem; clip-path: polygon(0 0, calc(100% - .7rem) 0, 100% 50%, calc(100% - .7rem) 100%, 0 100%, .7rem 50%); margin-right: -.45rem; }
.flow li:first-child { padding-left: 1rem; clip-path: polygon(0 0, calc(100% - .7rem) 0, 100% 50%, calc(100% - .7rem) 100%, 0 100%); }
.flow li.done { background: var(--pine); color: #fff; } .flow li.bad { background: var(--madder); color: #fff; }
.tabs[role=tablist] { margin-bottom: 1.2rem; }
.preview { background: #E8ECEA; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; } .preview iframe { display: block; width: 100%; height: min(80vh, 62rem); border: 0; } .pad { padding: 1.2rem; }
.totals .sub { font-size: .92rem; color: var(--muted); } .totals .grand { background: var(--pine); color: #fff; border: 0; border-radius: 8px; padding: .55rem .9rem; margin-top: .5rem; }
.lexrow { display: flex; gap: .7rem; align-items: center; margin-bottom: .4rem; } .panel.lex { display: block; } .panel.lex p { margin: .3rem 0 .8rem; max-width: 60ch; }
dialog.modal.wide { max-width: min(860px, 96vw); } dialog.modal pre.cmd { max-height: 50vh; white-space: pre-wrap; overflow-wrap: anywhere; }
dialog.modal textarea, dialog.modal input, dialog.modal select { width: 100%; }
.inline.end { justify-content: flex-end; flex-wrap: nowrap; } .unit { color: var(--muted); font-size: .88rem; white-space: nowrap; min-width: 2.2rem; }

/* editor */
.editor-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.4rem; margin-bottom: 1.2rem; } .editor-card > h2 { margin-bottom: .8rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 0 1.5rem; } .grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 1.2rem; }
.texts h3 { font-size: .95rem; margin: .8rem 0 .4rem; color: var(--pine); } @media (prefers-color-scheme: dark) { .texts h3 { color: #8FD0C2; } }
.tablewrap.flat { border: 0; border-radius: 0; background: none; }
table.lines td, table.lines th { padding: .5rem .5rem; vertical-align: top; } table.lines select, table.lines input { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: .4rem .55rem; width: 100%; }
table.lines .c-prod { min-width: 17rem; } table.lines .row-sub { margin-top: .35rem; } table.lines .c-qty input { width: 6.5rem; text-align: right; } table.lines .c-price input { width: 7.5rem; text-align: right; } table.lines .c-tax select { min-width: 7rem; } table.lines .c-lot select { min-width: 10rem; }
.lines-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; margin-top: .8rem; } .lines-foot .totals { margin: 0; flex: 0 1 22rem; }
.sticky-actions { position: sticky; bottom: 0; display: flex; gap: .6rem; justify-content: flex-end; padding: .8rem 0; background: linear-gradient(transparent, var(--paper) 35%); }

/* editor polish: search box and date inputs match the other fields */
.field input[type=search], .grid2 input[type=search], .field input[type=date] { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: .55rem .7rem; width: 100%; font: inherit; height: 2.6rem; box-sizing: border-box; }
.field input[type=search], .grid2 input[type=search] { margin-top: .35rem; max-width: 22rem; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 1.2rem; }

/* ---- buy and stock: dashboard ---- */
:root { --s-in: #00866B; --s-out: #C47F00; --grid: #E3E8E5; }
@media (prefers-color-scheme: dark) { :root { --s-in: #23987D; --s-out: #C47F00; --grid: #263336; } }
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.1rem; margin-top: 1.2rem; }
.dcard { grid-column: span 12; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.15rem 1.1rem; min-width: 0; }
.dcard.span-8 { grid-column: span 8; } .dcard.span-6 { grid-column: span 6; } .dcard.span-4 { grid-column: span 4; }
.dcard > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .8rem; } .dcard > header p { margin: .1rem 0 0; }
.dcard > header a { font-size: .9rem; white-space: nowrap; }
@media (max-width: 70rem) { .dcard.span-8, .dcard.span-4 { grid-column: span 12; } }
@media (max-width: 56rem) { .dcard.span-6 { grid-column: span 12; } }
.kpi .k-ico { margin-right: .3rem; }
.chartbox { position: relative; } .chart-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .3rem; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .88rem; color: var(--muted); } .legend > span { display: inline-flex; align-items: center; gap: .35rem; }
.sw { display: inline-block; width: .75rem; height: .75rem; border-radius: 3px; background: var(--muted); vertical-align: -1px; }
.sw.s-in, .mark.s-in { background: var(--s-in); fill: var(--s-in); } .sw.s-out, .mark.s-out { background: var(--s-out); fill: var(--s-out); } .sw.s-bad { background: var(--madder); }
.plot { position: relative; } svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart .grid { stroke: var(--grid); stroke-width: 1; } svg.chart .base { stroke: var(--line); stroke-width: 1; }
svg.chart .tick { fill: var(--muted); font-size: 11px; font-family: var(--ui); }
svg.chart .hit { fill: transparent; cursor: default; outline: none; } svg.chart .hit:focus-visible { stroke: #2B6CB0; stroke-width: 2; }
svg.chart .grp .mark { transition: opacity .12s; } svg.chart:hover .grp:not(.on) .mark { opacity: .45; }
.tip { position: absolute; top: .2rem; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .45rem .7rem; font-size: .86rem; box-shadow: 0 6px 18px rgba(0,0,0,.14); pointer-events: none; white-space: nowrap; z-index: 3; }
.tip b { display: block; margin-bottom: .2rem; } .tip .sw { margin-right: .3rem; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.hbars li > a, .hbars li > div { display: grid; grid-template-columns: minmax(6rem, 10rem) minmax(3rem, 1fr) auto; gap: .8rem; align-items: center; padding: .35rem .3rem; border-radius: 6px; color: inherit; text-decoration: none; }
.hbars li > a:hover { background: var(--pine-soft); }
.hb-label { display: grid; line-height: 1.2; font-weight: 700; font-size: .92rem; overflow: hidden; } .hb-label small { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: .7rem; background: var(--line-soft); border-radius: 0 4px 4px 0; overflow: hidden; } .hb-bar { display: block; height: 100%; background: var(--s-in); border-radius: 0 4px 4px 0; }
.hb-bar.ok { background: var(--s-in); } .hb-bar.warn { background: var(--s-out); } .hb-bar.bad { background: var(--madder); } .hb-bar.mute { background: var(--muted); }
.hb-val { font-size: .9rem; min-width: 4.5rem; text-align: right; }
.dlist { list-style: none; margin: 0; padding: 0; } .dlist li a { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.dlist li:last-child a { border-bottom: 0; } .dlist li a:hover strong { text-decoration: underline; text-underline-offset: 3px; } .dlist .r { text-align: right; }
.meter { display: inline-block; width: 4.5rem; height: .45rem; background: var(--line-soft); border-radius: 99px; overflow: hidden; vertical-align: middle; } .meter > span { display: block; height: 100%; background: var(--s-in); border-radius: 99px; }
.meter > span.warn { background: var(--s-out); } .meter > span.bad { background: var(--madder); }

/* stock list */
.stocktable tr.grp-row { cursor: pointer; } .stocktable tr.grp-row:hover { background: var(--pine-soft); } .stocktable .caret { display: inline-block; width: 1rem; color: var(--muted); }
.stocktable tr.sub-row > td { background: var(--paper); padding: .4rem .6rem .8rem 2rem; } .stocktable tr.sub-row .tablewrap { border-radius: 8px; }
details.menu { position: relative; } details.menu > summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 6px; padding: .15rem .55rem; font-size: .85rem; background: var(--surface); white-space: nowrap; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-body { position: absolute; right: 0; top: calc(100% + 4px); z-index: 15; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 26px rgba(0,0,0,.16); min-width: 14rem; padding: .3rem; display: grid; }
.menu-body button, .menu-body a { all: unset; cursor: pointer; padding: .45rem .7rem; border-radius: 6px; font-size: .92rem; color: var(--ink); } .menu-body button:hover, .menu-body a:hover, .menu-body button:focus-visible { background: var(--pine-soft); }
.check-row { display: inline-flex; gap: .5rem; align-items: flex-start; margin: .35rem 1.2rem .35rem 0; } .check-row input { margin-top: .25rem; }
.grow { flex: 1; }
.gr-line-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; } .gr-line-head .field { max-width: 32rem; }
.gr-line .grid4 .field input { width: 100%; }
.field .inline input { flex: 1; min-width: 0; }

/* repacking form */
.repack-grid { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1.2rem; align-items: start; }
.repack-side { position: sticky; top: 4.5rem; display: grid; gap: .8rem; } .repack-side .btn { justify-content: center; padding: .7rem; }
.balance { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; }
.balance.ok { border-top-color: var(--ok); } .balance.bad, .balance.over { border-top-color: var(--madder); }
.balance h3 { font-size: 1rem; margin-bottom: .5rem; } .balance dl { margin: 0; display: grid; gap: .25rem; } .balance dl div { display: flex; justify-content: space-between; } .balance dt { color: var(--muted); } .balance dd { margin: 0; font-weight: 700; }
.balance dl div:last-child { border-top: 1px solid var(--line); padding-top: .3rem; margin-top: .2rem; }
.gauge { position: relative; height: .55rem; background: var(--line-soft); border-radius: 99px; margin: .8rem 0 .3rem; } .gauge > span { display: block; height: 100%; border-radius: 99px; background: var(--ok); }
.balance.bad .gauge > span, .balance.over .gauge > span { background: var(--madder); } .gauge i { position: absolute; top: -.25rem; width: 2px; height: 1.05rem; background: var(--ink); }
.balance p { margin: .5rem 0 0; } .balance.bad p, .balance.over p { color: var(--madder); font-weight: 700; }
@media (max-width: 62rem) { .repack-grid { grid-template-columns: minmax(0, 1fr); } .repack-side { position: static; } }
.massbar { display: flex; gap: 2px; height: 1.4rem; border-radius: 6px; overflow: hidden; margin-bottom: .6rem; max-width: 46rem; }
.massbar .out { background: var(--s-in); } .massbar .waste { background: var(--s-out); } .massbar .lost { background: var(--madder); }

/* samples */
.dir { font-size: .8rem; font-weight: 700; white-space: nowrap; border-radius: 5px; padding: 0 .4rem; } .dir.out { background: var(--saffron-soft); color: var(--saffron); } .dir.in { background: var(--pine-soft); color: var(--pine); }
@media (prefers-color-scheme: dark) { .dir.in { color: #8FD0C2; } }
.sugg { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line-soft); } .sugg:last-child { border-bottom: 0; }
.sugg .snip { margin: .3rem 0 0; color: var(--muted); font-size: .9rem; max-width: 70ch; } .sugg .actions { flex: none; }
@media (max-width: 52rem) { .sugg { flex-direction: column; } }

.kpis.dense { grid-template-columns: repeat(auto-fit, minmax(8.4rem, 1fr)); } .kpis.dense .k-value { font-size: 1.5rem; }

[hidden] { display: none !important; }
.field .inline select { flex: 0 0 5.5rem; width: auto; }

/* ---- warehouse, scan app, labels (migration 028) ---- */
.print-frame { position: fixed; right: 0; bottom: 0; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }
.line-row { display: grid; grid-template-columns: minmax(12rem, 2fr) minmax(10rem, 2fr) minmax(7rem, 1fr) auto; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.line-row select, .line-row input { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: .45rem .55rem; width: 100%; }
.inline { display: flex; align-items: center; gap: .35rem; } .inline .unit { color: var(--muted); font-size: .9rem; }
@media (max-width: 52rem) { .line-row { grid-template-columns: 1fr 1fr; } }
.label-photo { max-width: 100%; max-height: 40vh; border-radius: 8px; border: 1px solid var(--line); display: block; margin: .5rem 0; }

/* the scan app: full screen on a phone, big targets, readable outdoors */
body.scan-mode .side, body.scan-mode .top { display: none; }
body.scan-mode .shell { grid-template-columns: minmax(0, 1fr); }
body.scan-mode .page { padding: 0; max-width: 40rem; margin: 0 auto; }
.scanapp { min-height: 100vh; background: var(--paper); padding-bottom: 3rem; }
.scan-head { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; background: var(--pine-deep); color: #fff; position: sticky; top: 0; z-index: 4; }
.scan-head h1 { font-family: var(--ui); font-size: 1.2rem; flex: 1; color: #fff; }
.scan-back, .scan-exit { color: #fff !important; text-decoration: none; font-weight: 700; } .scan-back { font-size: 1.8rem; line-height: 1; padding: 0 .4rem; }
.scan-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; padding: 1rem; }
.scan-tile { display: flex; flex-direction: column; gap: .25rem; min-height: 6.5rem; padding: 1rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink) !important; }
.scan-tile b { font-size: 1.15rem; } .scan-tile small { color: var(--muted); }
.scan-tile:first-child { background: var(--pine); color: #fff !important; border-color: var(--pine); } .scan-tile:first-child small { color: var(--on-pine-muted); }
.scan-field { display: flex; gap: .5rem; padding: 1rem 1rem .5rem; position: sticky; top: 3.3rem; background: var(--paper); z-index: 3; }
.scan-input { flex: 1; min-width: 0; font-size: 1.2rem; padding: .8rem .9rem; border: 2px solid var(--pine); border-radius: 10px; background: var(--surface); }
.cam-btn { padding: .8rem 1.1rem; font-size: 1.05rem; }
.scan-msg { margin: .3rem 1rem .8rem; padding: .7rem .9rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; min-height: 3rem; }
.scan-msg.ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); } .scan-msg.bad { background: var(--madder-soft); border-color: var(--madder); color: var(--madder); }
.scan-counters { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; padding: 0 1rem 1rem; }
.scan-counter { background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: .8rem; display: grid; gap: .15rem; text-align: center; }
.scan-counter.ok { border-color: var(--ok); } .scan-counter.off { border-color: var(--saffron); }
.scan-counter .c-label { font-weight: 700; color: var(--muted); } .scan-counter .c-num { font-size: 3rem; font-weight: 700; line-height: 1.05; } .scan-counter .c-exp { color: var(--muted); }
.scan-counter .c-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-top: .4rem; } .scan-counter .c-btns .btn { justify-content: center; font-size: 1.1rem; padding: .7rem 0; }
.btn.big { display: flex; justify-content: center; width: calc(100% - 2rem); margin: .5rem 1rem; padding: 1rem; font-size: 1.1rem; }
.scan-list { padding: .5rem 1rem; } .scan-list h2 { margin: .8rem 0 .5rem; }
.scan-row { display: flex; flex-direction: column; gap: .15rem; padding: .8rem .9rem; margin-bottom: .5rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink) !important; }
.scan-row small { color: var(--muted); }
.scan-log { list-style: none; margin: 0; padding: 0; } .scan-log li { padding: .45rem 0; border-bottom: 1px solid var(--line-soft); } .scan-log li.undo { color: var(--muted); text-decoration: line-through; }
.scan-log .linkbtn { margin-left: .5rem; font-size: .85rem; }
.scan-card { margin: 0 1rem 1rem; padding: .8rem .9rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: .25rem; }
.scan-form { padding: 0 1rem; } .scan-form .field input, .scan-form .field select, .scan-form .field textarea, .scan-line input { width: 100%; font-size: 1.05rem; padding: .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.scan-form .btn.big { width: 100%; margin: 1rem 0; }
.scan-line { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem .8rem; margin: 0 0 .8rem; background: var(--surface); }
.scan-line legend { font-weight: 700; padding: 0 .3rem; } .scan-line label { display: grid; gap: .2rem; font-size: .9rem; color: var(--muted); margin-top: .4rem; } .scan-line .grid2 { grid-template-columns: 1fr 1fr; gap: 0 .6rem; }
.scan-line .check-row { display: flex; gap: .5rem; align-items: center; } .scan-line .check-row input { width: auto; }
.pad { padding: 0 1rem; }
.cam { position: fixed; inset: 0; background: #000; z-index: 50; display: grid; }
.cam-video { width: 100%; height: 100%; object-fit: cover; grid-area: 1 / 1; }
.cam-frame { grid-area: 1 / 1; align-self: start; margin-top: max(5rem, 9vh); justify-self: center; width: min(80vw, 22rem); height: min(40vw, 11rem); border: 3px solid var(--saffron-mark); border-radius: 12px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
.cam-bar { grid-area: 1 / 1; align-self: end; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem; color: #fff; background: rgba(0,0,0,.55); }
.cam-bar .btn.quiet { color: #fff; border-color: #fff; }
@media (min-width: 52rem) { body.scan-mode .page { padding-top: 1rem; } }

/* ---- 0.10: master-data forms, folded Settings menu, first steps, status notes ------------------------------------------ */
.nav .navfold { margin-top: .6rem; border-top: 1px solid rgba(255,255,255,.08); }
.nav .navfold summary { list-style: none; cursor: pointer; font-size: .8rem; font-weight: 700; color: var(--on-pine-muted); padding: 1.1rem 1.25rem .35rem; letter-spacing: .01em; display: flex; justify-content: space-between; }
.nav .navfold summary::-webkit-details-marker { display: none; }
.nav .navfold summary::after { content: "+"; font-weight: 400; } .nav .navfold[open] summary::after { content: "–"; }
.formcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem 1.4rem; max-width: 62rem; }
.masterform { gap: 0 1.6rem; align-items: start; }
.masterform .form-sec { grid-column: 1 / -1; font-size: .95rem; color: var(--muted); border-bottom: 1px solid var(--line-soft); padding: .9rem 0 .35rem; margin-bottom: .7rem; }
.masterform .form-sec:first-child { padding-top: 0; }
.masterform .check-row { grid-column: span 1; }
.req { color: var(--madder); }
.formbar { justify-content: flex-end; border-top: 1px solid var(--line-soft); padding-top: 1rem; margin-top: .6rem; }
.field input:disabled { background: var(--paper); color: var(--muted); }
.note { border-radius: 8px; padding: .65rem .9rem; margin: 0 0 1.2rem; background: var(--pine-soft); }
.note.warn { background: var(--saffron-soft); color: var(--ink); border-left: 4px solid var(--saffron); }
.note.bad { background: var(--madder-soft); color: var(--ink); border-left: 4px solid var(--madder); }
.allergens { display: flex; flex-wrap: wrap; gap: .45rem; }
.allergens .al { display: inline-flex; flex-direction: column; border: 1px solid var(--line); border-radius: 7px; padding: .3rem .6rem; font-weight: 700; font-size: .92rem; background: var(--surface); }
.allergens .al small { font-weight: 400; color: var(--muted); }
.allergens .al.contains { border-color: var(--madder); background: var(--madder-soft); } .allergens .al.may_contain { border-color: var(--saffron); background: var(--saffron-soft); }
.allergens .al.free { border-color: var(--ok); background: var(--ok-soft); } .allergens .al.unstated { border-style: dashed; color: var(--muted); }
.setup { list-style: none; margin: 0; padding: 0; max-width: 60rem; counter-reset: s; }
.setup li { display: grid; grid-template-columns: 2.2rem 1fr auto; gap: .9rem; align-items: start; padding: .95rem 0; border-bottom: 1px solid var(--line); }
.setup li p { margin: .15rem 0 0; }
.setup .tick { width: 1.8rem; height: 1.8rem; border-radius: 99px; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 700; color: #fff; }
.setup li.done .tick { background: var(--ok); border-color: var(--ok); } .setup li.done strong { color: var(--muted); }
.setupcard h2 { border-bottom-color: var(--saffron) !important; }
.small { font-size: .9rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* status colours stand out: overdue, blocked, waiting */
.tag.bad { box-shadow: inset 0 0 0 1px var(--madder); } .tag.warn { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--saffron) 55%, transparent); }
@media (max-width: 52rem) { .setup li { grid-template-columns: 2.2rem 1fr; } .setup li .btn { grid-column: 2; justify-self: start; } .formcard { padding: 1rem; } }
.masterform .field.invalid input, .masterform .field.invalid select { border-color: var(--madder); box-shadow: 0 0 0 1px var(--madder); }
.formcard > .err { margin-bottom: 1rem; }
dialog.modal .check-row { grid-column: 1 / -1; display: flex; justify-content: flex-start; } dialog.modal .check-row input { width: auto; flex: 0 0 auto; }
/* ---- 0.11: recall and supplier approval ---- */
.lotchip { background: var(--pine-soft); color: var(--ink); }
details.history { margin: -.6rem 0 1.4rem; } details.history summary { cursor: pointer; color: var(--muted); margin-bottom: .5rem; }
@media print {
  .side, .top, .testbar, .actions, .btn, .crumb a, .toast { display: none !important; }
  .shell { display: block; } .page { padding: 0; max-width: none; }
  .tablewrap { border: 0; box-shadow: none; } body, html { background: #fff; }
}

/* ---- 0.12 menu polish: clearer groups, rounded items, calmer scrollbar (CSS only) ---------------------------------------- */
.side { padding-top: 1.1rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.brand { margin: 0 .75rem .5rem; padding: 0 .5rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.09); }
.nav { padding: 0 .75rem 1rem; }
.nav h3, .nav .navfold summary {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .11em; color: #A9C7BF;
  margin: 1.1rem 0 .3rem; padding: 1rem .6rem 0; border-top: 1px solid rgba(255,255,255,.09);
}
.nav h3:first-of-type { margin-top: 1rem; }
.nav .navfold { margin-top: 0; border-top: 0; }
.nav .navfold summary { margin-bottom: .3rem; border-radius: 8px; transition: color .15s; }
.nav .navfold summary:hover { color: #fff; }
.nav a {
  margin: 1px 0; padding: .46rem .7rem; border-left: 0; border-radius: 8px; font-size: .95rem;
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a[aria-current="page"] {
  background: rgba(255,255,255,.13); color: #fff; font-weight: 700;
  box-shadow: inset 3px 0 0 var(--saffron-mark);
}
.nav a:focus-visible, .nav .navfold summary:focus-visible { outline: 2px solid var(--saffron-mark); outline-offset: -2px; }
.nav .badge { box-shadow: 0 0 0 2px var(--pine-deep); }
/* marketing (CRM stage 3) */
textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
table.mini th, table.mini td { padding: .2rem 1rem .2rem 0; text-align: left; }
.chips .check { margin-right: .9rem; display: inline-flex; gap: .3rem; align-items: center; }

/* assistant panel (A1) */
.topbar-right .ai-open { background: var(--pine-soft); color: var(--pine); border: 1px solid var(--line); border-radius: 8px; padding: .35rem .8rem; font-weight: 700; cursor: pointer; }
.topbar-right .ai-open[aria-expanded="true"] { background: var(--pine); color: #fff; }
@media (prefers-color-scheme: dark) { .topbar-right .ai-open { color: #8FD0C2; } .topbar-right .ai-open[aria-expanded="true"] { color: #fff; } }
.ai-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(30rem, 100vw); z-index: 20; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -12px 0 40px rgba(0,0,0,.12); display: flex; flex-direction: column; }
.ai-drawer[hidden] { display: none; }
body.ai-on .main-col { margin-right: min(30rem, 100vw); }
.ai-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; padding: .9rem 1rem .7rem; border-bottom: 1px solid var(--line); }
.ai-head h2 { font-family: var(--serif); font-size: 1.3rem; }
.ai-meter { font-size: .85rem; display: block; }
.ai-headbtns { display: flex; flex-wrap: wrap; gap: .2rem; justify-content: flex-end; }
.ai-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.ai-intro p { margin: 0 0 .6rem; font-size: .95rem; }
.ai-msg { display: flex; flex-direction: column; max-width: 92%; }
.ai-msg.user { align-self: flex-end; align-items: flex-end; }
.ai-msg.assistant { align-self: flex-start; }
.ai-bubble { white-space: pre-wrap; overflow-wrap: anywhere; padding: .55rem .8rem; border-radius: 12px; line-height: 1.45; }
.ai-msg.user .ai-bubble { background: var(--pine); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.assistant .ai-bubble { background: var(--paper); border: 1px solid var(--line-soft); border-bottom-left-radius: 4px; }
.ai-msg.assistant .ai-bubble.err { background: var(--madder-soft); color: var(--madder); border-color: transparent; }
.ai-tools { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.ai-chip { font-size: .78rem; border-radius: 99px; padding: 0 .55rem; background: var(--ok-soft); color: var(--ok); }
.ai-chip.no { background: var(--madder-soft); color: var(--madder); }
.ai-form { border-top: 1px solid var(--line); padding: .75rem 1rem 1rem; }
.ai-form textarea { width: 100%; resize: vertical; min-height: 4.2rem; max-height: 40vh; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: .55rem .7rem; }
.ai-formrow { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; margin-top: .5rem; }
.ai-shot { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; }
.ai-shot img { border-radius: 4px; border: 1px solid var(--line, #ddd); }
.ai-history { list-style: none; margin: 0; padding: 0; } .ai-history li { padding: .45rem 0; border-bottom: 1px solid var(--line-soft); }
.ai-rules { margin-bottom: 1.6rem; } .ai-rules h2 { margin-bottom: .6rem; }
.ai-rules ul, details > ul { list-style: none; margin: 0; padding: 0; max-width: 62rem; }
.ai-rule { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem; margin-bottom: .5rem; }
.ai-rule-text { margin: 0 0 .2rem; font-weight: 700; }
.ai-skill .ai-rule-text { font-weight: 400; }
.ai-evidence { display: block; }
.ai-addrule { max-width: 46rem; margin-top: 1.5rem; }
.ai-addrule textarea { width: 100%; }
.ai-addrule input { width: 100%; }
.ai-skill-steps { white-space: pre-wrap; font: inherit; margin: .25rem 0 .4rem; padding: .5rem .75rem; background: var(--paper); border: 1px solid var(--line-soft); border-radius: 6px; }
.ai-skill details summary { cursor: pointer; font-size: .9em; }
.ai-add-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 0 2rem; align-items: start; }
@media (max-width: 52rem) { body.ai-on .main-col { margin-right: 0; } .ai-rule { flex-direction: column; } }

/* Settings > AI connection (043) */
.ai-conn { max-width: 52rem; } .ai-conn section { margin: 1.4rem 0; } .ai-conn h2 { margin-bottom: .6rem; }
.ai-choices { display: grid; gap: .5rem; margin-bottom: .9rem; }
.ai-choice { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: .6rem .8rem; cursor: pointer; }
.ai-choice.off { opacity: .6; cursor: not-allowed; }
.ai-users { display: grid; gap: .3rem; margin-bottom: .7rem; }
.field.narrow { max-width: 14rem; } .small { font-size: .88rem; }
.ai-conn > .actions { margin: .4rem 0 2rem; }
/* assistant panel: saffron gold (Jalal 31.10.2026), from the logo, so the AI is told apart from the green menu */
.ai-drawer { --ai-fill: #E9D9BC; --ai-fill-hover: #DECBA4; --ai-on: #46321A; --ai-fill-line: #D6C093; --ai-ink: #5E3E00; --ai-soft: #FBEFD0; --ai-body: #FFFDF7; --ai-line: #EAD9A8; --ai-bubble: #FFFFFF; --ai-bubble-line: #F1E3BF; }
@media (prefers-color-scheme: dark) { .ai-drawer { --ai-fill: #E3A82B; --ai-fill-hover: #F0BC4E; --ai-on: #2A1C00; --ai-ink: #F0C565; --ai-soft: #3A2E10; --ai-body: #1C1810; --ai-line: #4A3B16; --ai-bubble: #26200F; --ai-bubble-line: #4A3B16; } }
.ai-drawer { background: var(--ai-body); border-left-color: var(--ai-line); }
.ai-head { background: var(--ai-soft); border-bottom-color: var(--ai-line); }
.ai-head h2, .ai-head .ai-meter { color: var(--ai-ink); }
.ai-drawer .btn.quiet { color: var(--ai-ink); border-color: var(--ai-line); background: transparent; }
.ai-drawer .btn.quiet:hover { background: var(--ai-soft); }
.ai-drawer .btn:not(.quiet) { background: var(--ai-fill); border-color: var(--ai-fill-line, var(--ai-fill)); color: var(--ai-on); }
.ai-drawer .btn:not(.quiet):hover { background: var(--ai-fill-hover); }
.ai-msg.user .ai-bubble { background: var(--ai-fill); color: var(--ai-on); box-shadow: inset 0 0 0 1px var(--ai-fill-line, transparent); }
.ai-msg.assistant .ai-bubble { background: var(--ai-bubble); border-color: var(--ai-bubble-line); color: var(--ink); }
.ai-msg.assistant .ai-bubble a { color: var(--ai-ink); }
.ai-chip { background: var(--ai-soft); color: var(--ai-ink); }
.ai-form { border-top-color: var(--ai-line); }
.ai-form textarea { border-color: var(--ai-line); background: var(--surface); }
.ai-form textarea:focus-visible { box-shadow: 0 0 0 2px var(--ai-fill); }
.topbar-right .ai-open, .topbar-right .ai-open[aria-expanded="true"] { background: #E9D9BC; color: #46321A; border-color: #D6C093; text-decoration: none; }
.topbar-right .ai-open:hover { background: #DECBA4; }
.topbar-right .ai-open[aria-expanded="true"] { box-shadow: inset 0 0 0 2px #FFFDF7; }
@media (prefers-color-scheme: dark) { .topbar-right .ai-open, .topbar-right .ai-open[aria-expanded="true"] { background: #E3A82B; color: #2A1C00; border-color: #E3A82B; } .topbar-right .ai-open:hover { background: #F0BC4E; } .topbar-right .ai-open[aria-expanded="true"] { box-shadow: inset 0 0 0 2px #3A2E10; } }

/* 0.18: rail menu in deep emerald and mint (classic menu stays available per browser) */
:root { --rail: #052E2B; --rail-ico: #7FB8AA; --rail-hover: rgba(255,255,255,.07); --mint: #34D399; --mint-ink: #022C22; --mint-soft: #D1FAE5; --mint-text: #065F46;
  --fly: #F6FBF9; --fly-line: #DCEDE6; --fly-ink: #0B3B33; --fly-muted: #5E8279; --fly-hover: #EAF5F0; }
@media (prefers-color-scheme: dark) { :root { --rail: #031C1A; --fly: #0B2421; --fly-line: #17403A; --fly-ink: #DDF1EA; --fly-muted: #8FB5AA; --fly-hover: #12332F; --mint-soft: #11463B; --mint-text: #A7F3D0; } }
.shell.rail-menu { grid-template-columns: auto minmax(0, 1fr); }
.rail-side { display: flex; padding: 0; overflow: visible; background: var(--rail); z-index: 15; }
.rail { width: 4rem; flex: none; display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .85rem 0; background: var(--rail); height: 100vh; overflow-y: auto; scrollbar-width: none; }
.rail-brand { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px; background: #F6FBF9; margin-bottom: .9rem; flex: none; }
.rail-brand img { width: 1.7rem; height: 1.55rem; }
.rail-group { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.rail-bottom { margin-top: auto; padding-top: .8rem; }
.rail-btn { position: relative; display: grid; place-items: center; width: 2.6rem; height: 2.5rem; border: 0; border-radius: 10px; background: transparent; color: var(--rail-ico); cursor: pointer; padding: 0; transition: background .12s, color .12s; }
.rail-btn:hover { background: var(--rail-hover); color: #D5EEE6; }
.rail-btn.on { background: rgba(52,211,153,.16); color: var(--mint); }
.rail-btn.shown { box-shadow: inset 0 0 0 1.5px rgba(52,211,153,.45); color: #D5EEE6; }
.rail-btn:focus-visible { outline: 2px solid var(--mint); outline-offset: 1px; box-shadow: none; }
.rail-ai { color: var(--saffron-mark); } .rail-ai:hover { color: #F3C35A; }
.ico { display: inline-grid; width: 1.3rem; height: 1.3rem; } .ico svg { width: 100%; height: 100%; }
.rail-dot { position: absolute; top: .4rem; right: .45rem; width: .5rem; height: .5rem; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 2px var(--rail); }
.fly { width: 15rem; flex: none; display: flex; flex-direction: column; background: var(--fly); border-right: 1px solid var(--fly-line); height: 100vh; overflow-y: auto; padding: 1.1rem .6rem 1rem; color: var(--fly-ink); }
.fly-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; padding: 0 .55rem .9rem; }
.fly-title b { display: block; font-size: 1.12rem; font-weight: 700; color: var(--fly-ink); line-height: 1.25; }
.fly-sub { display: block; font-size: .82rem; color: var(--fly-muted); min-height: 1.1em; }
.fly-pin { display: grid; place-items: center; width: 2rem; height: 2rem; border: 0; border-radius: 8px; background: transparent; color: var(--fly-muted); cursor: pointer; padding: 0; flex: none; }
.fly-pin:hover { background: var(--fly-hover); color: var(--fly-ink); } .fly-pin .ico { width: 1.15rem; height: 1.15rem; }
.fly-list { display: grid; gap: .1rem; }
.fly-list a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .48rem .65rem; border-radius: 8px; color: var(--fly-ink); text-decoration: none; font-size: .97rem; }
.fly-list a:hover { background: var(--fly-hover); }
.fly-list a[aria-current="page"] { background: var(--mint-soft); color: var(--mint-text); font-weight: 700; }
.fly-list a:focus-visible { outline: 2px solid #10B981; outline-offset: -2px; box-shadow: none; }
.fly-list .badge { background: var(--mint); color: var(--mint-ink); border-radius: 99px; font-size: .76rem; font-weight: 700; padding: 0 .48rem; min-width: 1.35rem; text-align: center; }
.fly-foot { margin-top: auto; padding: 1.2rem .55rem 0; }
.fly-classic { font-size: .82rem; color: var(--fly-muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.nav-switch { display: block; margin: 1.2rem 1.25rem 0; font-size: .82rem; color: var(--on-pine-muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
/* folded: icons only; a rail click shows the list on top of the page */
.rail-side.folded .fly { display: none; }
.rail-side.folded.peek .fly { display: flex; position: absolute; left: 4rem; top: 0; box-shadow: 12px 0 32px rgba(3,28,26,.18); }
.rail-side { position: sticky; top: 0; height: 100vh; }
@media (max-width: 52rem) {
  .shell.rail-menu { grid-template-columns: minmax(0, 1fr); }
  .rail-side { position: fixed; inset: 0 auto 0 0; width: auto; transform: translateX(-100%); z-index: 20; transition: transform .18s; } .rail-side.open { transform: none; box-shadow: 12px 0 40px rgba(0,0,0,.25); }
  .rail-side.folded .fly { display: flex; } .rail-side.folded.peek .fly { position: static; box-shadow: none; }
  .fly-pin { display: none; }
}
@media print { .rail-side { display: none !important; } }
.rail-open { margin: -.35rem 0 .45rem; color: #D5EEE6; background: rgba(255,255,255,.07); } .rail-open:hover { background: rgba(52,211,153,.18); color: var(--mint); }
.rail-open[hidden] { display: none; }
@media (max-width: 52rem) { .rail-open { display: none; } }
.rail-btn[hidden], .fly-pin[hidden] { display: none; }

/* 0.19: menu and page colours swapped (Jalal 31.10.2026): the menu is the grey, the page the light mint-white; light mode only */
@media (prefers-color-scheme: light) { :root { --fly: #F3F5F2; --fly-line: #DDE3DF; --fly-hover: #E7ECE8; } .shell.rail-menu { background: #F6FBF9; } }
/* dark mode keeps the gold: --ai-fill stays #E3A82B there, so the fill line is gold too */
@media (prefers-color-scheme: dark) { .ai-drawer { --ai-fill-line: #E3A82B; } }

/* 0.20: mail text on white paper and a clear opened / not-opened mark (Jalal 31.10.2026: "email text background white or other bright color",
   "emails that are opened must sign as open"). Mail text stays on a bright sheet in dark mode too, with dark text, as in a paper letter. */
.msg, .msg.out { background: #FFFFFF; color: #1B2326; border: 1px solid #D8DFDB; }
.msg.out { border-left: 4px solid #17463F; }
.msg .muted { color: #5C696C; }
.msg a { color: #17463F; }
@media (prefers-color-scheme: dark) {
  .msg, .msg.out { background: #F7F5EF; border-color: #3A4A4C; }
  .msg.out { border-left-color: #34D399; }
}
.mrow { grid-template-columns: 1.1rem 13rem minmax(0, 1fr) auto; }
.mstate { display: inline-flex; align-items: center; justify-content: center; width: 1.1rem; align-self: center; }
.mstate .dot { width: .62rem; height: .62rem; border-radius: 50%; background: var(--saffron-mark); box-shadow: 0 0 0 2px color-mix(in srgb, var(--saffron-mark) 25%, transparent); }
.mstate.opened { color: var(--muted); opacity: .75; }
.mrow.unread { background: color-mix(in srgb, var(--saffron-soft) 30%, var(--surface)); box-shadow: inset 3px 0 0 var(--saffron-mark); }
.mrow.opened { font-weight: 400; }
.mrow.opened .mfrom, .mrow.opened .msubj { color: color-mix(in srgb, var(--ink) 82%, var(--muted)); }
.opened-tag { color: var(--muted); }
@media (max-width: 52rem) { .mrow { grid-template-columns: 1.1rem 1fr auto; } .mmain { grid-column: 2 / -1; grid-row: 2; } }
/* 0.20: the mail sheets can also be dark (Light / Dark switch above the conversation, per browser) */
.convhead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.convhead h2 { margin: 0; }
.paperseg button { padding: .25rem .75rem; font-size: .9rem; }
.conversation.paper-dark .msg, .conversation.paper-dark .msg.out { background: #182224; color: #E6EDEA; border-color: #2C3A3C; }
.conversation.paper-dark .msg.out { border-left-color: #34D399; }
.conversation.paper-dark .msg .muted { color: #98A8A9; }
.conversation.paper-dark .msg a { color: #8FD0C2; }
/* 0.20: Sent, Spam, Trash and chosen labels under Inbox in the rail menu; Trash and joined conversations */
.fly-sep { margin: .75rem .65rem .2rem; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fly-muted, var(--muted)); }
.fly-subname { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fly-ldot { width: .62rem; height: .62rem; border-radius: 3px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.fly-list a.fly-manage { font-size: .86rem; color: var(--fly-muted, var(--muted)); margin-top: .25rem; }
.joined { margin: -.2rem 0 .7rem; }
th.c, td.c { text-align: center; }
.tablewrap td input.plain { min-width: 9rem; }
/* 0.20: more mail details: attachments, who works on a thread, extra folders */
.clip { display: inline-flex; color: var(--muted); }
.who { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--pine-soft); color: var(--pine); font-size: .72rem; font-weight: 700; }
.folderpick { display: grid; gap: .6rem; } .folderpick table { width: 100%; } .folderpick td { vertical-align: middle; }
.mailcard h3 { font-size: 1rem; margin: .4rem 0 .3rem; }
.folderpick select { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: .35rem .55rem; }
.folderpick .actions { margin-bottom: .6rem; }

/* 0.21: internal notes and sticky notes in five colours (yellow general, green customer agreement, blue logistics and dates,
   red problem, grey done). Notes are never sent; an assistant suggestion has a dashed border until a person keeps it. */
:root { --n-yellow: #FFF7D6; --n-yellow-line: #E6C34F; --n-green: #E4F4E8; --n-green-line: #5FAE7D; --n-blue: #E4EEFB; --n-blue-line: #6E9DD4;
  --n-red: #FBE5E3; --n-red-line: #D7766E; --n-grey: #EFF1F0; --n-grey-line: #A6AEAB; }
@media (prefers-color-scheme: dark) { :root { --n-yellow: #3A3216; --n-yellow-line: #B8952E; --n-green: #183526; --n-green-line: #4E9A6B; --n-blue: #172C45; --n-blue-line: #5B88BD;
  --n-red: #40211F; --n-red-line: #C4645C; --n-grey: #262D2F; --n-grey-line: #6E7A7C; } }
.c-yellow { --n: var(--n-yellow); --nl: var(--n-yellow-line); } .c-green { --n: var(--n-green); --nl: var(--n-green-line); } .c-blue { --n: var(--n-blue); --nl: var(--n-blue-line); }
.c-red { --n: var(--n-red); --nl: var(--n-red-line); } .c-grey { --n: var(--n-grey); --nl: var(--n-grey-line); }
.swatches { display: inline-flex; gap: .35rem; align-items: center; }
.swatch { width: 1.35rem; height: 1.35rem; border-radius: 50%; border: 2px solid var(--nl); background: var(--n); cursor: pointer; padding: 0; }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--nl); }
.inote { background: var(--n); border: 1px solid var(--nl); border-left: 4px solid var(--nl); border-radius: 10px; padding: .6rem .85rem; margin-bottom: .8rem; color: var(--ink); }
.inote.suggested { border-style: dashed; border-left-style: dashed; }
.inote header { font-size: .9rem; margin-bottom: .25rem; } .inote .pin { color: var(--nl); font-weight: 700; }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.note-quote { margin: .2rem 0 .4rem; padding-left: .6rem; border-left: 2px solid var(--nl); color: var(--muted); font-style: italic; }
.note-actions { display: flex; gap: .8rem; margin-top: .35rem; flex-wrap: wrap; align-items: center; }
.note-history { margin-top: .5rem; font-size: .9rem; } .note-history p { margin: .2rem 0; }
.note-edit textarea, .note-composer textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: .5rem .65rem; margin-bottom: .4rem; }
.note-composer { display: grid; gap: .2rem; max-width: 46rem; }
.note-slot { margin: 1rem 0 0; } .note-slot h3 { font-size: 1rem; margin: 0 0 .4rem; }
.pinned-ctx { margin-bottom: .8rem; }
.notecount { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.taskbox ul.tasks { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; gap: .25rem; }
.taskbox .inline input[type=text] { min-width: 18rem; flex: 1; }
.linkbtn.small { font-size: .85rem; }
.stk-board { margin: 0 0 1.4rem; }
.stk-head { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; justify-content: space-between; margin-bottom: .7rem; }
.stk-head h2 { margin: 0; }
.stk-add { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.stk-add input[type=text] { min-width: 18rem; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: .45rem .7rem; }
.stk-add input[type=date] { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: .38rem .5rem; }
.stk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .8rem; }
.stk { background: var(--n); border: 1px solid var(--nl); border-radius: 10px; padding: .7rem .8rem .55rem; display: flex; flex-direction: column; gap: .4rem; min-height: 7.5rem; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.06); color: var(--ink); }
.stk.overdue { box-shadow: inset 4px 0 0 var(--madder); } .stk.dragging { opacity: .5; }
.stk-body { white-space: pre-wrap; overflow-wrap: anywhere; flex: 1; }
.stk-link { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stk-meta { display: flex; justify-content: space-between; gap: .5rem; font-size: .82rem; } .stk-meta .bad { color: var(--madder); font-weight: 700; }
.stk-actions { display: flex; gap: .8rem; justify-content: flex-end; }
.stk-empty { grid-column: 1 / -1; }
@media (max-width: 52rem) { .stk-grid { grid-template-columns: 1fr; } .stk-add input[type=text], .taskbox .inline input[type=text] { min-width: 0; width: 100%; } }
.panel .fullrow { grid-column: 1 / -1; }

/* 0.22: mail page polish (Jalal 31.10.2026: "buttons need polish", "control design and visual quality") */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .45rem; margin: .6rem 0 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.tbtn { display: inline-flex; align-items: center; gap: .4rem; height: 2.3rem; padding: 0 .85rem; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink); font-weight: 600; font-size: .95rem; cursor: pointer; white-space: nowrap; }
.tbtn:hover { background: var(--pine-soft); }
.tbtn.primary { background: var(--pine); color: #fff; } .tbtn.primary:hover { background: var(--pine-deep); }
.tbtn.on { background: var(--saffron-soft); color: var(--saffron); }
.tbtn .ti { font-size: 1rem; line-height: 1; opacity: .85; } .tbtn .caret { font-size: .75rem; }
.tsep { width: 1px; align-self: stretch; margin: .3rem .2rem; background: var(--line); }
details.tmore { margin-left: auto; } details.tmore > summary.tbtn { border: 1px solid var(--line); font-size: .95rem; padding: 0 .85rem; background: transparent; }
details.tmore[open] > summary.tbtn { background: var(--pine-soft); }
.menu-body hr { border: 0; border-top: 1px solid var(--line-soft); margin: .25rem 0; width: 100%; }
@media (max-width: 52rem) { details.tmore { margin-left: 0; } .tsep { display: none; } }
.btn.send { background: var(--pine); color: #fff; border-color: var(--pine); min-width: 6.5rem; display: inline-flex; justify-content: center; }
.btn.send.warn { background: var(--saffron); border-color: var(--saffron); }
.draftform .actions { align-items: center; margin-top: .4rem; }
.attrow { display: flex; flex-wrap: wrap; gap: .4rem; margin: .1rem 0 .5rem; }
.att { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border: 1px solid #D8DFDB; border-radius: 999px; font-size: .86rem; color: #1B2326; background: #F6F8F7; }
.conversation.paper-dark .att { background: #223033; color: #E6EDEA; border-color: #2C3A3C; }
/* the side panel: controls keep their size so a button never drops to its own line */
.panel .inline { flex-wrap: nowrap; } .panel .inline select { width: 9.5rem; flex: none; } .panel .inline input[type=date] { width: 10.5rem; flex: none; }
.panel .inline input[type=text] { min-width: 0; flex: 1; }
.taskbox .inline select { width: auto; max-width: 12rem; }
.panel h2 { font-size: .95rem; color: var(--muted); text-transform: none; margin-bottom: .45rem; }
@media (max-width: 64rem) { .panel .inline { flex-wrap: wrap; } }
.panel select[aria-label="Assigned to"] { min-width: 13rem; }

/* 0.22: folded older mails, quoted text, per-mail Reply / Reply all */
.msg .mhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .5rem; cursor: default; }
.msg .mhead .mdate { margin-left: auto; }
.msg .mhead .msnip { display: none; }
.msg .mhead .mclip { display: none; color: var(--muted, #6b7280); }
.msg .mreply { display: inline-flex; gap: .6rem; margin-left: .75rem; }
.msg.folded { padding-top: .55rem; padding-bottom: .55rem; }
.msg.folded .mhead { cursor: pointer; flex-wrap: nowrap; }
.msg.folded .mhead .mto, .msg.folded .mreply { display: none; }
.msg.folded .mhead .msnip { display: block; flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.msg.folded .mhead .mclip { display: inline; }
.msg.folded .mfull { display: none; }
.msg:not(.folded) .mhead { margin-bottom: .5rem; }
.msg .qtoggle { margin-top: .6rem; display: inline-block; }
.msg .body.quoted { margin-top: .5rem; padding-left: .75rem; border-left: 3px solid var(--line, #d9dee3); opacity: .8; font-size: .95em; }
.convhead { display: flex; align-items: center; gap: 1rem; }
.convhead h2 { margin-right: auto; }
.msg .mhead strong, .msg .mhead .mdate, .msg .mreply { white-space: nowrap; flex-shrink: 0; }
.msg.folded .mhead strong { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }

/* 0.23: inbox redesign (Jalal 31.10.2026, "apply" on the inbox review): compact head, four work tabs, calm unread rows,
   hover actions, paging; the thread page in two columns with the reply right under the newest mail */
.grow { flex: 1 1 auto; }
.ihead { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; margin-bottom: .7rem; }
.ihead h1 { font-size: 1.75rem; margin: 0; }
.worktabs { border-bottom: 0; margin: 0 !important; background: var(--line-soft); border-radius: 10px; padding: .2rem; gap: .15rem; }
.worktabs button { border: 0; border-radius: 8px; margin: 0; padding: .4rem .85rem; color: var(--ink); }
.worktabs button[aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.08); border: 0; }
.worktabs button[aria-selected="false"] .n { background: var(--surface); }
.syncpill { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; text-decoration: none; color: var(--ok); background: var(--ok-soft); border-radius: 99px; padding: .15rem .7rem; }
.syncpill::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.syncpill.bad { color: var(--madder); background: var(--madder-soft); }
.ifilters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .8rem; }
.ifilters .msearch { flex: 1 1 22rem; max-width: 40rem; min-width: 12rem; border: 1px solid var(--line); border-radius: 9px; padding: .5rem .8rem; background: var(--surface); }
.ifilters select { border: 1px solid var(--line); border-radius: 9px; padding: .45rem .6rem; background: var(--surface); }
/* unread = bold sender and subject plus the gold dot; no tinted row, no gold bar (calmer when everything is new) */
.mrow.unread { background: transparent; box-shadow: none; }
.mrow { padding-top: .5rem; padding-bottom: .5rem; }
.mwrap { position: relative; border-bottom: 1px solid var(--line-soft); }
.mwrap .mrow { border-bottom: 0; }
.mwrap:last-child { border-bottom: 0; }
.mwrap:hover, .mwrap:focus-within { background: var(--pine-soft); } .mwrap .mrow:hover { background: transparent; }
.mwrap a.mrow:focus-visible { box-shadow: inset 3px 0 0 var(--pine); border-radius: 0; }
.mact { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); display: flex; gap: .15rem; padding-left: 1.2rem; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--pine-soft) 1.1rem); }
.mwrap:hover .mact, .mwrap:focus-within .mact { opacity: 1; pointer-events: auto; }
.mact-b { width: 2.1rem; height: 2.1rem; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: var(--surface); color: var(--pine); cursor: pointer; }
.mact-b:hover { background: var(--pine); color: #fff; }
@media (hover: none) { .mact { display: none; } }
.mfoot { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .6rem .2rem; font-size: .9rem; color: var(--muted); }
.mfoot[hidden] { display: none; }
.kbdhint kbd, .kbdtable kbd { font: inherit; font-size: .82rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 .35rem; background: var(--surface); color: var(--ink); }
.kbdtable td { padding: .3rem .8rem .3rem 0; border: 0; }
@media (max-width: 52rem) { .kbdhint { display: none; } }

/* thread page */
.thead h1 { font-size: 1.7rem; margin: 0 0 .4rem; }
.thead .statusrow { align-items: center; margin-bottom: .2rem; }
.toolbar.tsticky { position: sticky; top: 4.1rem; z-index: 4; margin: .6rem 0 1rem; box-shadow: 0 2px 8px rgba(15, 51, 46, .06); }
.tback { text-decoration: none; padding: 0 .65rem; }
.tnav { display: inline-flex; align-items: center; gap: .1rem; margin-left: .4rem; } .tnav .tbtn { padding: 0 .6rem; font-size: 1.15rem; } .tnav .tbtn:disabled { opacity: .35; cursor: default; }
.tgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(19rem, 23rem); gap: 1.25rem; align-items: start; }
.tmain { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .2rem; }
.tmain > *, .tside > * { min-width: 0; }
.tside { display: grid; gap: .8rem; min-width: 0; }
@media (max-width: 70rem) { .tgrid { grid-template-columns: minmax(0, 1fr); } .toolbar.tsticky { position: static; } }
.conversation { margin: 0; }
.conversation .convhead { margin-bottom: .5rem; }
.foldbar { display: flex; align-items: center; gap: .6rem; width: 100%; margin: 0 0 .8rem; padding: .45rem .9rem; border: 1px dashed var(--line); border-radius: 10px; background: transparent; color: var(--pine); font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.foldbar:hover { background: var(--pine-soft); }
.foldn { display: inline-flex; align-items: center; justify-content: center; min-width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--pine-soft); }
@media (prefers-color-scheme: dark) { .foldbar { color: #8FD0C2; } }
.att { cursor: pointer; font: inherit; font-size: .86rem; } .att:hover { border-color: #17463F; background: #E2EEEA; }
.att .attsize { color: #5C696C; font-size: .8rem; }
.replybox { display: grid; gap: .6rem; margin-top: .2rem; }
.replybox h2 { font-size: .95rem; color: var(--muted); margin: .2rem 0 .4rem; }
.replyform { max-width: none; border: 2px solid var(--pine); border-radius: 12px; padding: .8rem 1rem; display: grid; gap: .45rem; }
.rf-top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.rf-line { display: flex; align-items: center; gap: .6rem; border-bottom: 1px solid var(--line-soft); padding: .15rem 0; }
.rf-line > span { width: 4.2rem; flex: none; font-size: .9rem; color: var(--muted); }
.rf-line input { flex: 1; min-width: 0; border: 0; background: transparent; padding: .35rem 0; }
.rf-line input:focus { outline: none; } .rf-line:focus-within { border-bottom-color: var(--pine); }
.rf-to { flex: 1 1 18rem; }
.rf-top select { border: 1px solid var(--line); border-radius: 7px; padding: .3rem .5rem; background: var(--surface); }
.replyform textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; resize: vertical; min-height: 9rem; background: var(--surface); line-height: 1.5; }
.rf-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
details.pastdrafts > summary { cursor: pointer; color: var(--muted); font-size: .9rem; padding: .3rem 0; }
.scard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .8rem .95rem; display: grid; gap: .5rem; }
.scard > h2 { font-size: .95rem; margin: 0; }
.scard .inote { margin-bottom: .2rem; font-size: .93rem; }
.party-head { display: flex; gap: .7rem; align-items: center; } .party-head > div { display: grid; min-width: 0; } .party-head small { overflow-wrap: anywhere; }
.avatar { width: 2.5rem; height: 2.5rem; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--pine-soft); color: var(--pine); font-weight: 700; }
@media (prefers-color-scheme: dark) { .avatar { color: #8FD0C2; } }
.party-links { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-weight: 700; font-size: .93rem; }
.srow { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); gap: .5rem; align-items: start; padding: .45rem 0; border-top: 1px solid var(--line-soft); }
.srow:first-of-type { border-top: 0; padding-top: 0; }
.slabel { font-size: .88rem; color: var(--muted); padding-top: .35rem; }
.sval { display: grid; gap: .35rem; min-width: 0; }
.sval .inline { flex-wrap: wrap; }
.sval select, .sval input[type=date], .sval input[type=text] { border: 1px solid var(--line); border-radius: 7px; padding: .3rem .45rem; background: var(--surface); max-width: 100%; }
.sval .check { margin-top: 0; font-size: .9rem; }
select.nobody { background: var(--saffron-soft) !important; color: var(--saffron); font-weight: 700; border-color: color-mix(in srgb, var(--saffron) 45%, transparent) !important; }
.scard.tasks .taskbox > input[type=text] { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: .35rem .5rem; margin-bottom: .35rem; }
.scard.tasks .taskbox .inline { flex-wrap: wrap; } .scard.tasks select { border: 1px solid var(--line); border-radius: 7px; padding: .3rem .4rem; background: var(--surface); }
.scard.suggest { background: color-mix(in srgb, var(--saffron-soft) 45%, var(--surface)); border-color: color-mix(in srgb, var(--saffron-mark) 55%, var(--line)); }
.scard.note-slot { margin: 0; }
.filelist { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.filelist li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .5rem; }
.filelist .fname { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .93rem; }
.iconbtn { width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 7px; background: transparent; color: var(--pine); cursor: pointer; }
.iconbtn:hover { background: var(--pine-soft); }
@media (prefers-color-scheme: dark) { .iconbtn { color: #8FD0C2; } }
/* dark mail sheet: links and quoted text readable (the review: "Reply" on the dark sheet was hard to see) */
.conversation.paper-dark .msg .linkbtn { color: #8FD0C2; }
.conversation.paper-dark .msg .att:hover { background: #2C3A3C; border-color: #8FD0C2; }
.conversation.paper-dark .att .attsize { color: #98A8A9; }
.conversation:not(.paper-dark) .msg .linkbtn { color: #17463F; }
/* 0.23 forward (047) */
.rf-mode { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .6rem; padding-bottom: .2rem; }
.rf-mode[hidden], .fwdfiles[hidden] { display: none; }
.fwdfiles { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.fwdfiles .att { cursor: default; } .att.off { opacity: .55; text-decoration: line-through; } .att .chip-x { margin-left: .1rem; }
.drafts .draft .body { max-height: 14rem; overflow: auto; }

/* 0.24: calendar page, This week on Today, meeting cards on a thread (migration 048) */
:root { --k-meeting: #17463F; --k-task: #B87A00; --k-followup: #2B6CB0; --k-snooze: #6B7C80; --k-dispatch: #2F6F4C; --k-po: #4E7D5B; --k-quote: #A3302F; --k-invoice: #8A2626; --k-certificate: #6B4FA0; --k-lot: #8C5A2B; }
@media (prefers-color-scheme: dark) { :root { --k-meeting: #34D399; --k-task: #E3A82B; --k-followup: #7FB2E5; --k-snooze: #98A8A9; --k-dispatch: #6FC293; --k-po: #8FC9A0; --k-quote: #E26A68; --k-invoice: #F08A86; --k-certificate: #B79CE8; --k-lot: #D9A06A; } }
.k-meeting { --k: var(--k-meeting); } .k-task { --k: var(--k-task); } .k-followup { --k: var(--k-followup); } .k-snooze { --k: var(--k-snooze); } .k-dispatch { --k: var(--k-dispatch); }
.k-po { --k: var(--k-po); } .k-quote { --k: var(--k-quote); } .k-invoice { --k: var(--k-invoice); } .k-certificate { --k: var(--k-certificate); } .k-lot { --k: var(--k-lot); }
.kdot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--k); flex: none; }
.calctl { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: .6rem; }
.calnav { display: inline-flex; gap: .2rem; } .caltitle { margin: 0; font-size: 1.15rem; font-family: var(--serif); }
.callegend { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .8rem; }
.legend { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); padding: .15rem .65rem; font: inherit; font-size: .85rem; color: var(--ink); cursor: pointer; }
.legend[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.calgrid { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.calrow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calrow.head .dow { padding: .4rem .6rem; font-size: .82rem; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); }
.calcell { min-height: 7.2rem; padding: .3rem .35rem .45rem; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.calgrid.week .calcell { min-height: 22rem; }
.calrow .calcell:last-child { border-right: 0; }
.calcell.other { background: color-mix(in srgb, var(--paper) 60%, var(--surface)); } .calcell.other .dnum { color: var(--muted); }
.calcell.today { background: color-mix(in srgb, var(--pine-soft) 55%, var(--surface)); } .calcell.today .dnum { background: var(--pine); color: #fff; border-radius: 99px; padding: 0 .45rem; }
.cday { display: flex; align-items: center; justify-content: space-between; } .dnum { font-size: .85rem; font-weight: 700; }
.cadd { border: 0; background: transparent; color: var(--muted); width: 1.6rem; height: 1.6rem; border-radius: 6px; cursor: pointer; opacity: 0; font-size: 1rem; }
.calcell:hover .cadd, .cadd:focus-visible { opacity: 1; } .cadd:hover { background: var(--pine-soft); color: var(--pine); }
@media (hover: none) { .cadd { opacity: .6; } }
.calitem { display: flex; align-items: baseline; gap: .3rem; padding: .1rem .35rem; border-radius: 5px; font-size: .82rem; line-height: 1.35; color: var(--ink); text-decoration: none;
  background: color-mix(in srgb, var(--k) 10%, var(--surface)); border-left: 3px solid var(--k); min-width: 0; }
.calitem .kdot { display: none; } .calitem:hover { background: color-mix(in srgb, var(--k) 20%, var(--surface)); }
.calitem .ctitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .calitem .ctime { font-weight: 700; flex: none; }
.calitem.ask { box-shadow: inset 0 0 0 1px var(--k-task); }
.cmore { text-align: left; font-size: .8rem; }
@media (max-width: 52rem) { .calgrid.month .calitem .ctitle { display: none; } .calgrid.month .calcell { min-height: 4.5rem; } .calgrid.week .calrow { grid-template-columns: minmax(0, 1fr); } .calgrid.week .calrow.head { display: none; } .calgrid.week .calcell { min-height: 0; border-right: 0; } }
.agenda { display: grid; gap: .8rem; max-width: 52rem; }
.aday h3 { font-size: .95rem; margin: 0 0 .3rem; color: var(--muted); } .aday.today h3 { color: var(--pine); }
.aday ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; } .aday .calitem { font-size: .93rem; padding: .35rem .6rem; }
.aday .calitem .ctitle { white-space: normal; } .aday .calitem .tag { margin-left: auto; }
.weekstrip { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; margin: 0 0 1.2rem; }
.wshead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; } .wshead h2 { margin: 0; }
.wsdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.wsday { display: flex; flex-direction: column; gap: .2rem; min-width: 0; } .wsd { font-size: .82rem; font-weight: 700; color: var(--muted); } .wsday.today .wsd { color: var(--pine); }
@media (max-width: 60rem) { .wsdays { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; } @media (max-width: 40rem) { .row3 { grid-template-columns: 1fr; } }
.mcards { display: grid; gap: .6rem; margin-bottom: .6rem; }
.mcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .8rem; align-items: start; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--k-meeting); border-radius: 12px; padding: .75rem .9rem; }
.mcard.d-in { border-left-color: var(--k-task); } .mcard.cancelled { opacity: .7; } .mcard.cancelled .mc-title { text-decoration: line-through; }
.mc-icon { width: 2.6rem; height: 2.6rem; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; background: var(--pine-soft); color: var(--pine); border-top: 5px solid var(--k-meeting); }
.mcard.d-in .mc-icon { border-top-color: var(--k-task); }
.mc-main { display: grid; gap: .15rem; min-width: 0; } .mc-kind { font-size: .82rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.mc-title { font-size: 1.05rem; } .mc-guests { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .2rem; } .mc-link { font-weight: 700; }
.mc-actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; justify-content: flex-end; max-width: 15rem; }
@media (max-width: 52rem) { .mcard { grid-template-columns: auto minmax(0, 1fr); } .mc-actions { grid-column: 1 / -1; justify-content: flex-start; max-width: none; } }
@media (prefers-color-scheme: dark) { .mc-icon { color: #8FD0C2; } }
/* 0.24: the mail toolbar has 11 actions; tighter so it stays on one line on a laptop screen */
.toolbar.tsticky { gap: .15rem; } .toolbar.tsticky .tbtn { padding: 0 .6rem; } .toolbar.tsticky .tsep { margin: .3rem .1rem; }
@media (max-width: 1400px) { .toolbar.tsticky .tbtn .ti + * { } .toolbar.tsticky .tbtn { font-size: .9rem; padding: 0 .5rem; } }
.calgrid.week .calrow.head { display: none; }

/* 0.25: formatted mail view, reply box editor, documents, undo, follow-up groups, search tips (migration 049) */
.fmtview { margin: .2rem 0; } .fmtview[hidden], .plainview[hidden] { display: none; }
.mailframe { width: 100%; border: 0; display: block; min-height: 40px; background: #fff; border-radius: 6px; }
.fmtbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; padding: .4rem .7rem; margin-bottom: .5rem; border-radius: 8px; background: #FBEFD0; color: #5E3E00; font-size: .88rem; }
.fmtbar[hidden] { display: none; } .fmtbar .btn { color: #5E3E00; border-color: #E3A82B; }
.viewtoggle { margin-top: .4rem; display: inline-block; }
.conversation.paper-dark .mailframe { outline: 1px solid #2C3A3C; }
.rf-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: .2rem 0; }
.rte-bar { display: inline-flex; flex-wrap: wrap; gap: .15rem; }
.rte-b { min-width: 2rem; height: 2rem; padding: 0 .45rem; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer; }
.rte-b:hover { background: var(--pine-soft); border-color: var(--line); }
.rte { min-height: 10rem; max-height: 32rem; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: .6rem .75rem; background: var(--surface); line-height: 1.5; outline: none; overflow-wrap: anywhere; }
.rte:focus { border-color: var(--pine); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pine) 20%, transparent); }
.rte .tw-sig { color: var(--muted); } .rte ul, .rte ol { margin: .3rem 0; padding-left: 1.4rem; } .rte a { color: var(--pine); }
.rte-link { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; } .rte-link[hidden] { display: none; }
.rte-link input { flex: 1 1 16rem; border: 1px solid var(--line); border-radius: 7px; padding: .35rem .5rem; }
details.tplmenu { position: relative; } details.tplmenu > summary { list-style: none; }
.tpl-list { min-width: 16rem; max-height: 20rem; overflow-y: auto; }
.tpl-list button { display: flex; justify-content: space-between; gap: .6rem; align-items: center; }
.docchips { margin-top: .2rem; }
dialog.docpick { width: min(44rem, 94vw); } .docpick .inline input[type=search] { flex: 1 1 16rem; border: 1px solid var(--line); border-radius: 7px; padding: .4rem .6rem; }
.doclist { display: grid; gap: .1rem; max-height: 22rem; overflow-y: auto; margin: .6rem 0; }
.docrow { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .4rem .5rem; border-radius: 7px; cursor: pointer; }
.docrow:hover { background: var(--pine-soft); } label.docrow { justify-content: flex-start; }
.undotoast { display: flex; align-items: center; gap: .8rem; } .undotoast .btn { background: #fff; color: var(--pine-deep); border-color: #fff; }
.mgroup { padding: .45rem .9rem; font-size: .85rem; font-weight: 700; color: var(--muted); background: var(--paper); border-bottom: 1px solid var(--line-soft); text-transform: uppercase; letter-spacing: .03em; }
.mact.wide { gap: .3rem; } .mact-t { height: 2rem; padding: 0 .65rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--pine); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.mact-t:hover { background: var(--pine); color: #fff; border-color: var(--pine); }
details.searchtips { position: relative; } details.searchtips > summary { list-style: none; }
.searchtips .menu-body { min-width: 18rem; } .searchtips code { font-size: .85rem; }
.rte > .tw-start:first-child { min-height: 6em; } .rte .tw-sig { padding-top: .4rem; }
.rte > .tw-start:first-child:has(> br:only-child)::before { content: 'Write your reply here.'; color: var(--muted); position: absolute; pointer-events: none; }
.rte { position: relative; }

/* 0.26 (migration 050): New mail, one search, contacts with history, files, bulk actions */
.compose-btn { display: inline-flex; align-items: center; gap: .15rem; padding: .45rem .95rem; border-radius: 9px; text-decoration: none; }
.fly-list a.fly-compose { display: flex; align-items: center; justify-content: flex-start; gap: .55rem; margin: .5rem .35rem .15rem; padding: .55rem .8rem; border-radius: 10px; font-weight: 700;
  background: var(--saffron-mark); color: #1B2326; text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.fly-list a.fly-compose:hover, .fly-list a.fly-compose[aria-current="page"] { background: #F0BC4A; color: #1B2326; }
.scopeline { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: baseline; margin: -.3rem 0 .6rem; font-size: .95rem; color: var(--muted); }
.scopeline strong { color: var(--ink); }
.scopeline[hidden] { display: none; }
.ifilters .selall { margin: 0 .2rem 0 .95rem; }
.bulkbar select.small { border: 1px solid var(--line); border-radius: 7px; padding: .3rem .45rem; background: var(--surface); font-size: .9rem; }
.bulkbar .bulklabel input { border: 1px solid var(--line); border-radius: 7px; padding: .3rem .5rem; background: var(--surface); }
.bulkbar .menu-body button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .45rem .7rem; cursor: pointer; font: inherit; color: inherit; border-radius: 6px; }
.bulkbar .menu-body button:hover { background: var(--pine-soft); }
/* address field with suggestions from Contacts */
.addr-wrap { position: relative; flex: 1; min-width: 0; }
.addr-wrap > input { width: 100%; }
.addr-sugg { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); list-style: none; margin: 0; padding: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 14px 36px rgba(10,22,20,.18); max-height: 18rem; overflow-y: auto; }
.addr-sugg[hidden] { display: none; }
.addr-sugg li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 .8rem; padding: .45rem .6rem; border-radius: 6px; cursor: pointer; }
.addr-sugg li[aria-selected="true"], .addr-sugg li:hover { background: var(--pine-soft); }
.addr-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr-mail { grid-column: 1; color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr-co { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); font-size: .85rem; }
.newmail { max-width: 52rem; }
.newmail .rf-line select { border: 1px solid var(--line); border-radius: 7px; padding: .35rem .5rem; background: var(--surface); }
/* the quick search: groups, details, a status line */
dialog.palette { width: min(44rem, 94vw); }
.palette ul { max-height: min(30rem, 62vh); }
.palette .pal-status { margin: 0; padding: .55rem 1.1rem 0; font-size: .9rem; }
.palette .pal-status:empty { display: none; }
.palette li.pal-group { padding: .6rem .7rem .2rem; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.palette li a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 1rem; align-items: baseline; }
.palette .pal-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette .pal-detail { grid-column: 1; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette .pal-kind { grid-column: 2; grid-row: 1; font-size: .84rem; }
/* contacts */
.bigsearch { flex: 1 1 26rem; max-width: 40rem; font-size: 1.05rem; padding: .65rem .9rem !important; border-radius: 10px !important; }
.clist { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.crow { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto auto; gap: .9rem; align-items: center; padding: .65rem .9rem; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.crow:last-child { border-bottom: 0; } .crow:hover, .crow:focus-visible { background: var(--pine-soft); }
.cav { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--pine-soft); color: var(--pine); font-weight: 700; }
.cmain { display: grid; min-width: 0; } .cname { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csub { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctags { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; } .cmeta { font-size: .88rem; white-space: nowrap; }
.timeline { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tl-row { display: grid; grid-template-columns: 6.2rem 11.5rem minmax(0, 1fr); gap: .9rem; align-items: baseline; padding: .6rem .9rem; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.tl-row:last-child { border-bottom: 0; } .tl-row:hover { background: var(--pine-soft); }
.tl-main { display: grid; min-width: 0; } .tl-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } .tl-detail { font-size: .9rem; }
.banner { padding: .7rem 1rem; border-radius: 9px; margin: 0 0 1rem; }
.banner.bad { background: var(--madder-soft); color: var(--madder); font-weight: 700; }
.filetable .fname { text-align: left; font-weight: 600; }
.filetable td { vertical-align: top; }
@media (max-width: 720px) {
  .crow { grid-template-columns: 2.4rem minmax(0, 1fr); } .ctags, .cmeta { grid-column: 2; justify-content: flex-start; }
  .tl-row { grid-template-columns: 5.6rem minmax(0, 1fr); } .tl-kind { grid-column: 2; } .tl-main { grid-column: 1 / -1; }
}

.newmail .rte > .tw-start:first-child:has(> br:only-child)::before { content: 'Write your mail here.'; }
.bulkbar { gap: .45rem; }
.bulkbar select.small { width: auto; max-width: 9rem; }
.bulkbar .bulklabel input { width: 7.5rem; }
.filetable td.r .btn + .btn { margin-left: .35rem; }
.bulkbar select.small { min-width: 0 !important; width: auto !important; }

/* 0.26.1: the account at the top right (Jalal 31.10.2026 "polish needed on account top right"): initials and name open a menu */
.acct { position: relative; }
.acct > summary { list-style: none; display: flex; align-items: center; gap: .55rem; padding: .25rem .6rem .25rem .25rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; }
.acct > summary::-webkit-details-marker { display: none; }
.acct > summary:hover, .acct[open] > summary { background: var(--pine-soft); }
.acct-av { width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--pine); color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: .02em; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--saffron-mark); }
.acct-name { display: grid; line-height: 1.15; text-align: left; }
.acct-name b { font-size: .92rem; } .acct-name small { font-size: .76rem; color: var(--muted); text-transform: capitalize; }
.acct-caret { color: var(--muted); font-size: .8rem; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 15.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 44px rgba(10,22,20,.18); padding: .4rem; }
.acct-head { display: flex; gap: .7rem; align-items: center; padding: .6rem .6rem .7rem; border-bottom: 1px solid var(--line-soft); margin-bottom: .3rem; }
.acct-head .acct-av { width: 2.4rem; height: 2.4rem; font-size: .95rem; box-shadow: none; }
.acct-head div { display: grid; min-width: 0; } .acct-head small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.acct-menu a, .acct-menu button { display: block; width: 100%; text-align: left; padding: .5rem .65rem; border-radius: 7px; color: inherit; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--pine-soft); }
.acct-menu hr { border: 0; border-top: 1px solid var(--line-soft); margin: .3rem 0; }
.acct-menu .acct-out { color: var(--madder); font-weight: 700; }
@media (max-width: 720px) { .acct-name, .acct-caret { display: none; } .acct > summary { padding: .2rem; } }

/* 0.26.1: today, this week and this month under Calendar in the menu */
.fly-sep .fly-count { margin-left: .4rem; font-weight: 700; opacity: .8; }
.fly-list a.fly-cal { display: grid; grid-template-columns: 6.4rem minmax(0, 1fr); gap: .5rem; align-items: baseline; justify-content: stretch; padding: .38rem .6rem .38rem .7rem; font-size: .9rem; border-left: 3px solid var(--k, var(--k-meeting)); border-radius: 0 7px 7px 0; margin: .1rem .25rem .1rem .45rem; }
.fly-cal-when { font-size: .78rem; color: var(--fly-muted, var(--muted)); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fly-cal-title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.fly-cal-empty { margin: .2rem .9rem .4rem; font-size: .86rem; color: var(--fly-muted, var(--muted)); }

/* 0.26.2: attachments in New mail and the reply box */
.rf-attach { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin: .55rem 0 .2rem; }
.att.busy { opacity: .7; } .att.busy .attsize { font-style: italic; }
.draftform.dropping { outline: 2px dashed var(--saffron-mark); outline-offset: 4px; background: color-mix(in srgb, var(--saffron-soft) 40%, var(--surface)); }

/* 0.27: the file manager (folders left, files right) and Google Drive */
.fgrid { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.ftree { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .5rem; position: sticky; top: 4.5rem; max-height: calc(100vh - 6rem); overflow: auto; }
.ft-item { display: flex; align-items: center; gap: .45rem; padding: .38rem .6rem; border-radius: 7px; color: inherit; text-decoration: none; font-size: .94rem; }
.ft-item:hover { background: var(--pine-soft); } .ft-item.on { background: var(--mint-soft, var(--pine-soft)); font-weight: 700; color: var(--pine); }
.ft-item.drop { outline: 2px dashed var(--saffron-mark); background: var(--saffron-soft); }
.ft-ico { width: 1.1rem; height: 1.1rem; flex: none; display: inline-flex; color: var(--muted, #6b7280); } .ft-ico svg, .ico-s svg { width: 100%; height: 100%; }
.ico-s { width: .95rem; height: .95rem; display: inline-flex; vertical-align: -2px; margin-right: .3rem; flex: none; } .fpath { display: flex; align-items: center; } .ft-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-n { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ft-area { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--saffron-soft); color: var(--saffron); border-radius: 4px; padding: 0 .3rem; }
.ft-area.big { font-size: .72rem; margin-left: .6rem; vertical-align: middle; }
.ft-sep { display: flex; justify-content: space-between; align-items: center; margin: .8rem .6rem .25rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ft-sep .linkbtn { text-transform: none; letter-spacing: 0; font-size: .8rem; padding: 0; }
.fmain { min-width: 0; } .fmain.dropping { outline: 2px dashed var(--saffron-mark); outline-offset: 6px; border-radius: 10px; }
.fhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: .7rem; }
.fhead h2 { margin: 0; } .fhead .crumb { margin: 0 0 .15rem; color: var(--muted); }
.filetable td.nowrap { white-space: nowrap; } .filetable tr[draggable="true"] { cursor: grab; }
.filescard .fhead { margin-bottom: .4rem; } .filescard .filelist li { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.linkchips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .35rem; }
.docrow.linkrow { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; border-radius: 7px; }
.docrow.linkrow:hover { background: var(--pine-soft); }
.savefile { margin-left: .2rem; }
ol.steps { padding-left: 1.2rem; display: grid; gap: .5rem; margin: .4rem 0 1rem; } ol.steps code { word-break: break-all; }
.setcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.3rem; max-width: 46rem; }
@media (max-width: 860px) { .fgrid { grid-template-columns: 1fr; } .ftree { position: static; max-height: none; } }

/* 0.27 Team page */
.setcard.wide { max-width: 62rem; } .teamtable td { vertical-align: top; } .chks { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin-bottom: .25rem; } .chk { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
@media (max-width: 720px) { .teamtable thead { display: none; } .teamtable tr { display: block; padding: .6rem 0; border-bottom: 1px solid var(--line); } .teamtable td { display: block; border: 0; padding: .2rem 0; } }

/* 0.28 — AI card in an open mail: the Assistant drawer's saffron gold (Jalal 01.11.2026: "for AI keep the assistant colour
   theme"); at the top of the right column and sticky beside the mail while reading (Jalal: "easily available") */
.aimail { --ai-fill: #E9D9BC; --ai-fill-hover: #DECBA4; --ai-on: #46321A; --ai-fill-line: #D6C093; --ai-ink: #5E3E00; --ai-soft: #FBEFD0; --ai-body: #FFFDF7; --ai-line: #EAD9A8; --ai-bubble: #FFFFFF; --ai-bubble-line: #F1E3BF; }
@media (prefers-color-scheme: dark) { .aimail { --ai-fill: #E3A82B; --ai-fill-hover: #F0BC4E; --ai-on: #2A1C00; --ai-ink: #F0C565; --ai-soft: #3A2E10; --ai-body: #1C1810; --ai-line: #4A3B16; --ai-bubble: #26200F; --ai-bubble-line: #4A3B16; } }
.aimail[hidden] { display: none; }
.aimail { background: var(--ai-body); border-color: var(--ai-line); padding: 0; gap: 0; overflow: hidden auto; }
.tside.ai-open { align-self: stretch; align-content: start; }
.tside.ai-open.ai-follow .aimail { position: sticky; top: 7.9rem; z-index: 3; max-height: calc(100vh - 8.9rem); box-shadow: 0 6px 18px rgba(70, 50, 26, .10); }
.aimail > * { padding-left: .95rem; padding-right: .95rem; }
.aim-top { display: flex; align-items: center; gap: .5rem; background: var(--ai-soft); border-bottom: 1px solid var(--ai-line); padding-top: .6rem; padding-bottom: .55rem; position: sticky; top: 0; z-index: 1; }
.aim-top h2 { font-size: .95rem; margin: 0; color: var(--ai-ink); flex: 1; }
.aim-spark { color: var(--saffron-mark); }
.aim-meter { font-size: .75rem; color: var(--ai-ink); opacity: .8; }
.aim-pin { font-size: .75rem; color: var(--ai-ink); border: 1px solid var(--ai-line); border-radius: 99px; padding: .1rem .55rem; white-space: nowrap; background: var(--ai-body); width: auto; height: auto; }
.aim-pin[aria-pressed="true"] { background: var(--ai-fill); color: var(--ai-on); border-color: var(--ai-fill-line); }
.aim-foot { display: flex; justify-content: space-between; gap: .5rem; align-items: center; border-top: 1px solid var(--ai-line); padding-top: .4rem; padding-bottom: .45rem; background: var(--ai-soft); }
.aim-foot a { color: var(--ai-ink); }
.aim-close { color: var(--ai-ink); font-size: 1.2rem; line-height: 1; }
.aim-jobs { display: flex; flex-wrap: wrap; gap: .35rem; padding-top: .7rem; }
.aimail .btn { background: var(--ai-fill); border-color: var(--ai-fill-line); color: var(--ai-on); }
.aimail .btn:hover { background: var(--ai-fill-hover); }
.aimail .btn.quiet { background: transparent; color: var(--ai-ink); border-color: var(--ai-line); }
.aimail .btn.quiet:hover { background: var(--ai-soft); }
.aimail .aim-job.on { box-shadow: inset 0 0 0 2px var(--saffron-mark); }
.aimail .linkbtn, .aimail .aim-text a { color: var(--ai-ink); }
.aim-opts { padding-top: .45rem; font-size: .88rem; }
.aim-opts summary { color: var(--ai-ink); cursor: pointer; }
.aim-row { display: flex; gap: .35rem; margin: .4rem 0; }
.aim-row select { flex: 1; min-width: 0; }
.aim-opts textarea, .aim-ask textarea { width: 100%; resize: vertical; border: 1px solid var(--ai-line); background: var(--surface); border-radius: 8px; padding: .45rem .6rem; font-size: .9rem; }
.aim-opts textarea:focus-visible, .aim-ask textarea:focus-visible { box-shadow: 0 0 0 2px var(--ai-fill); outline: none; }
.aim-out { padding-top: .6rem; }
.aim-out:empty { display: none; }
.aim-out > * + * { margin-top: .4rem; }
.aim-head { font-size: .9rem; color: var(--ai-ink); }
.aim-text { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--ai-bubble); border: 1px solid var(--ai-bubble-line); border-radius: 10px; padding: .55rem .7rem; font-size: .92rem; line-height: 1.45; max-height: 22rem; overflow-y: auto; }
.aim-acts { display: flex; flex-wrap: wrap; gap: .3rem; }
.aim-working { font-style: italic; }
.aim-err { color: var(--madder); background: var(--madder-soft); border-radius: 8px; padding: .45rem .6rem; font-size: .9rem; margin: 0; }
.aim-chat { border-top: 1px solid var(--ai-line); margin-top: .75rem; padding-top: .6rem; padding-bottom: .8rem; }
.aim-chathead { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; font-weight: 700; color: var(--ai-ink); margin-bottom: .35rem; }
.aimail .aim-log { padding: 0; gap: .5rem; max-height: 18rem; overflow-y: auto; margin-bottom: .45rem; }
.aimail .aim-log:empty { display: none; }
.aimail .ai-msg { max-width: 96%; }
.aimail .ai-bubble { font-size: .9rem; padding: .45rem .65rem; }
.aimail .ai-msg.user .ai-bubble { background: var(--ai-fill); color: var(--ai-on); box-shadow: inset 0 0 0 1px var(--ai-fill-line); }
.aimail .ai-msg.assistant .ai-bubble { background: var(--ai-bubble); border-color: var(--ai-bubble-line); color: var(--ink); }
.aimail .ai-chip { background: var(--ai-soft); color: var(--ai-ink); }
.aimail .ai-formrow { margin-top: .35rem; }
/* the toolbar's AI button wears the same gold */
.toolbar .tbtn.aibtn { color: #5E3E00; }
.toolbar .tbtn.aibtn .ti { color: var(--saffron-mark); opacity: 1; }
.toolbar .tbtn.aibtn:hover { background: #FBEFD0; }
.toolbar .tbtn.aibtn.on { background: #E9D9BC; color: #46321A; border-color: #D6C093; }
@media (prefers-color-scheme: dark) { .toolbar .tbtn.aibtn { color: #F0C565; } .toolbar .tbtn.aibtn:hover { background: #3A2E10; } .toolbar .tbtn.aibtn.on { background: #E3A82B; color: #2A1C00; } }
@media (max-width: 70rem) { .aim-pin { display: none; } .tside.ai-open.ai-follow .aimail { position: static; max-height: none; box-shadow: none; } }

/* 0.29.2: with the assistant drawer open on a mail, the in-mail AI card would be a second assistant squeezed beside the mail (audit 01.11.2026). The drawer can ask about the mail too; the card comes back when the drawer closes. */
body.ai-on .aimail { display: none; }
body.ai-on [aria-label="AI assistant for this mail"] { display: none; }

.rte .tw-sig img { display: block; width: 180px; max-width: 60%; height: auto; margin: .3rem 0 .4rem; } .rte .tw-sig small { font-size: .78rem; line-height: 1.35; }

/* 056 finance: warning notices, the month bars of the finance report */
.notice.warn { background: var(--madder-soft); border-color: var(--madder); }
.bars { display: grid; gap: .3rem; }
.bar-row { display: grid; grid-template-columns: 5.5rem 1fr 8rem; align-items: center; gap: .6rem; }
.bar-row .bar { display: block; height: .7rem; min-width: 2px; border-radius: 4px; background: var(--pine); }
.bar-row .num { text-align: right; }
@media (max-width: 640px) { .bar-row { grid-template-columns: 4.5rem 1fr 6.5rem; } }

/* 0.32 Projects: monday-style boards. Step colours come from the board (text colour picked for contrast); the step name is
   always written, a stuck item also shows an icon and the word, and every drag has a step menu next to it (WCAG 1.4.1, 2.5.7). */
.pj-tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.pj-tabs a { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; border-radius: 8px 8px 0 0; text-decoration: none; color: var(--ink); border-bottom: 3px solid transparent; }
.pj-tabs a[aria-current="page"] { border-bottom-color: var(--saffron-mark); font-weight: 700; background: var(--surface); }
.pj-n { font-size: .8rem; background: var(--line-soft); color: var(--muted); border-radius: 999px; padding: 0 .45rem; }
.pj-n.bad { background: var(--madder-soft); color: var(--madder); }
.pj-pill { display: inline-block; border-radius: 5px; padding: .1rem .55rem; font-size: .85rem; font-weight: 700; white-space: nowrap; }
.pj-pill.big { font-size: 1rem; padding: .25rem .8rem; }
.pj-stepsel { border: 0; border-radius: 5px; padding: .25rem .4rem; font-weight: 700; font-size: .85rem; cursor: pointer; max-width: 13rem; }
.pj-stepsel option { background: var(--surface); color: var(--ink); }
.pj-groups { display: flex; flex-direction: column; gap: 1.2rem; }
.pj-ghead { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.pj-bar { width: .35rem; height: 1.4rem; border-radius: 3px; }
.pj-none { margin: 0 0 0 1rem; }
.pj-table { width: 100%; border-collapse: collapse; }
.pj-table th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 700; padding: .45rem .6rem; border-bottom: 1px solid var(--line); }
.pj-table td { padding: .45rem .6rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.pj-table tr.stuck td:first-child, .card.stuck { box-shadow: inset 4px 0 0 var(--madder); }
.pj-titlecell { display: flex; flex-direction: column; } .pj-title { font-weight: 700; }
.pj-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--saffron-mark); margin-left: .35rem; vertical-align: middle; }
.pj-status { display: inline-flex; gap: .2rem; align-items: baseline; font-size: .85rem; font-weight: 700; border-radius: 5px; padding: 0 .45rem; }
.pj-status.stuck { background: var(--madder-soft); color: var(--madder); } .pj-status.waiting { background: var(--saffron-soft); color: var(--saffron); }
.pj-late { color: var(--saffron); font-weight: 700; }
.col > header.pj-khead { border-radius: 7px; padding: .35rem .6rem; margin-bottom: .5rem; display: flex; justify-content: space-between; text-transform: none; }
.pj-col .card { cursor: default; } .pj-col .card[draggable="true"] { cursor: grab; }
.pj-stepbar { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; padding: 0; margin: .4rem 0 1rem; }
.pj-seg { display: inline-block; border: 0; border-radius: 6px; padding: .35rem .7rem; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.pj-seg.here { outline: 3px solid var(--ink); outline-offset: 2px; cursor: default; } button.pj-seg:hover { filter: brightness(.95); text-decoration: underline; }
.pj-head { margin-bottom: 1rem; } .pj-now { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.pj-readybox { margin: .7rem 0 0; padding: .55rem .8rem; border-radius: 8px; background: var(--line-soft); } .pj-readybox.ok { background: var(--ok-soft); color: var(--ok); }
.pj-signals { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.pj-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2rem; }
.pj-links, .pj-needs, .pj-history, .pj-check { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .35rem; }
.pj-needs li { display: grid; grid-template-columns: 11rem 1fr; gap: .1rem .6rem; align-items: baseline; } .pj-needs li .pj-pill { justify-self: start; } .pj-needs small { grid-column: 2; }
.pj-links .linkbtn { margin-left: .6rem; }
.pj-table { table-layout: fixed; } .pj-table th:nth-child(1) { width: 26%; } .pj-table th:nth-child(2) { width: 15%; } .pj-table th:nth-child(3) { width: 6%; } .pj-table th:nth-child(4) { width: 9%; } .pj-table th:nth-child(5) { width: 6%; } .pj-table th:nth-child(6) { width: 15%; } .pj-table th:nth-child(7) { width: 14%; }
.pj-table .pj-stepsel { width: 100%; }
.pj-addlink { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .6rem; } .pj-addlink input { min-width: 16rem; }
.pj-swatches { display: flex; gap: .2rem; flex-wrap: wrap; max-width: 17rem; }
.pj-sw { width: 1.1rem; height: 1.1rem; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; padding: 0; }
.pj-steps { display: flex; flex-direction: column; gap: .7rem; margin: 1rem 0; }
.pj-steprow { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; display: flex; flex-direction: column; gap: .6rem; }
.pj-steprow.dim { opacity: .6; }
.pj-sr1, .pj-sr2 { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; } .pj-sr1 > .pj-pill { align-self: center; min-width: 9rem; text-align: center; }
.pj-sr3 { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.pj-f { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; } .pj-f > span { color: var(--muted); font-weight: 700; }
.pj-f input[type=text], .pj-f select, .pj-f textarea, .pj-f input[type=number] { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: .35rem .55rem; }
.pj-f select { max-width: 30rem; } .pj-f textarea { min-width: 16rem; }
.pj-colour { display: flex; gap: .5rem; align-items: center; } .pj-colour input[type=color] { width: 2.4rem; height: 2rem; border: 1px solid var(--line); border-radius: 6px; padding: 0; }
.pj-hint { background: var(--saffron-soft); color: var(--saffron); border-radius: 8px; padding: .5rem .8rem; font-weight: 700; }
.pj-threadchips { display: flex; flex-direction: column; gap: .3rem; margin-top: .5rem; } .pj-chiplink { text-decoration: none; font-size: .9rem; }
.pj-legend { margin-top: 1rem; }
.avatar.sm { width: 1.7rem; height: 1.7rem; font-size: .72rem; }
@media (max-width: 900px) { .pj-cols { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .pj-table { table-layout: auto; min-width: 46rem; } .pj-needs li { grid-template-columns: 1fr; } .pj-needs small { grid-column: 1; } }

/* 0.33: a workspace colour per module family (Jalal 01.11.2026). body[data-fam] is set by the router from FAMILY in railmenu.js.
   Only the page background, a line on the top bar, the rail icon, the open page in the menu and the page title take the colour;
   cards, tables, mail and the status colours (gold = AI / attention, red = error or block, green = ok) stay as they are, so no
   module colour is gold, red or green. Today and the shared tools (Inbox, Calendar, Projects, Files) keep the base colour.
   Finance is lilac and Quality slate (Jalal 01.11.2026 20:47: "change color of finance and quality with each other"). */
body[data-fam="crm"]   { --ws: #F1F6FC; --wsa: #2B6CB0; --wsr: #7FB2E5; --wss: #DCE9F8; --wst: #1E4F86; }
body[data-fam="sell"]  { --ws: #F4F4FD; --wsa: #4F46E5; --wsr: #A5A0F5; --wss: #E3E1FB; --wst: #3730A3; }
body[data-fam="fin"]   { --ws: #F8F4FC; --wsa: #6B4FA0; --wsr: #B79CE8; --wss: #EBE3F6; --wst: #4F3A78; }
body[data-fam="stock"] { --ws: #FAF5EE; --wsa: #8C5A2B; --wsr: #D9A06A; --wss: #F1E3D1; --wst: #6B4220; }
body[data-fam="qa"]    { --ws: #F2F4F7; --wsa: #475569; --wsr: #A9B6C8; --wss: #E2E8F0; --wst: #334155; }
body[data-fam="base"]  { --ws: #F2F3F2; --wsa: #5C696C; --wsr: #B5C2C3; --wss: #E4E7E6; --wst: #3E4A4D; }
@media (prefers-color-scheme: dark) {
  body[data-fam="crm"]   { --ws: #121A24; --wsa: #7FB2E5; --wst: #BFD8F3; }
  body[data-fam="sell"]  { --ws: #16172A; --wsa: #A5A0F5; --wst: #D6D3FB; }
  body[data-fam="fin"]   { --ws: #1B1624; --wsa: #B79CE8; --wst: #DCCDF4; }
  body[data-fam="stock"] { --ws: #1D1812; --wsa: #D9A06A; --wst: #F0D3B2; }
  body[data-fam="qa"]    { --ws: #151A20; --wsa: #A9B6C8; --wst: #D5DDE7; }
  body[data-fam="base"]  { --ws: #171B1C; --wsa: #98A8A9; --wst: #D0D9DA; }
  body[data-fam] { --wss: color-mix(in srgb, var(--wsa) 22%, var(--fly)); }
}
body[data-fam] .shell, body[data-fam] .shell.rail-menu { background: var(--ws); }
body[data-fam] .top { box-shadow: inset 0 3px 0 var(--wsa); }
body[data-fam] .rail-btn.on { background: color-mix(in srgb, var(--wsr) 20%, transparent); color: var(--wsr); }
body[data-fam] .fly-list a[aria-current="page"] { background: var(--wss); color: var(--wst); }
body[data-fam] .fly-title b, body[data-fam] .page-head h1 { color: var(--wst); }
@media print { body[data-fam] .shell, body[data-fam] .shell.rail-menu { background: none; } body[data-fam] .page-head h1 { color: inherit; } }

/* 04.11.2026: Move to / Labels menus in the mail toolbar */
details.tmove > summary.tbtn, details.tlabels > summary.tbtn { border: 1px solid var(--line); font-size: .95rem; padding: 0 .85rem; background: transparent; }
details.tmove[open] > summary.tbtn, details.tlabels[open] > summary.tbtn { background: var(--pine-soft); }
.menu-body.lmenu { right: auto; left: 0; min-width: 17rem; max-width: 22rem; gap: .25rem; }
.lmenu input { width: 100%; box-sizing: border-box; margin: .15rem 0 .3rem; }
.lmenu-list { display: grid; max-height: 18rem; overflow: auto; }
.lmenu-list button { display: flex; align-items: center; gap: .5rem; }
.lmenu .ldot { width: .7rem; height: .7rem; border-radius: 50%; flex: none; border: 1px solid rgba(0,0,0,.2); }

/* 061: price picker in the reply box */
.pricepick .pricerow { display: grid; gap: .25rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.pricepick .tag { display: inline-block; margin-left: .4rem; padding: 0 .4rem; border-radius: 4px; font-size: .78rem; background: var(--pine-soft); }
.pricepick .tag.warn { background: #fdebc8; } .pricepick .tag.bad { background: #f6d5d5; }
.pricepick .priceedit { display: grid; gap: .4rem; margin-top: .3rem; padding: .5rem; border: 1px dashed var(--line); border-radius: 6px; }
.pricepick .priceedit input[type=number] { width: 6.5rem; }

/* price list (0.36) */
.pc-table { width: 100%; border-collapse: collapse; }
.pc-table th, .pc-table td { padding: .45rem .5rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.pc-table input, .pc-table select { max-width: 100%; }
.pc-table .pc-num { width: 5.5rem; text-align: right; }
.pc-table .pc-del { width: 12rem; }
.pc-table tr.dirty { background: #fff8e6; }
.pc-table tr.pc-missing .muted { opacity: .85; }
.pc-bar { position: sticky; bottom: 0; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; padding: .6rem .9rem; background: var(--surface, #fff); border-top: 1px solid var(--line); box-shadow: 0 -4px 12px rgba(0,0,0,.06); }
.pc-bar[hidden] { display: none; }
ul.err { color: #9b2c2c; padding-left: 1.1rem; }
.pc-add { width: min(40rem, 94vw); }
.pc-add .pc-new, .pc-add .pc-pricebox, .pc-add .pc-existing { display: grid; gap: .6rem; margin-top: .8rem; }
.pc-add .pc-new[hidden], .pc-add .pc-pricebox[hidden], .pc-add .pc-existing[hidden] { display: none; }
.pc-add .pc-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; }
.pc-add label { display: grid; gap: .2rem; font-size: .9rem; }
.pc-add label.check { display: flex; gap: .4rem; align-items: center; }
.pc-add .pc-found { max-height: 14rem; overflow: auto; display: grid; gap: .2rem; border: 1px solid var(--line); border-radius: 6px; padding: .3rem; }
.pc-add .pc-pick { text-align: left; background: none; border: 0; padding: .4rem .5rem; border-radius: 4px; cursor: pointer; font: inherit; }
.pc-add .pc-pick:hover, .pc-add .pc-pick.on { background: var(--pine-soft, #e6efe9); }
.pc-add .pc-picked { font-weight: 600; margin: 0; }
.tgrid.noai { grid-template-columns: minmax(0, 1fr); }
.tgrid.noai > .tside { display: none; }
.composepage .tgrid > .tmain > .newmail { max-width: none; }
/* 0.38.1: checkboxes and radios in dialogs keep their own size (dialog.modal input { width: 100% } stretched them and pushed the text away) */
dialog.modal input[type=checkbox], dialog.modal input[type=radio] { width: 1.1rem; height: 1.1rem; flex: none; margin: 0; padding: 0; accent-color: var(--pine); }
.docrow > span { min-width: 0; overflow-wrap: anywhere; }
.docrow { align-items: flex-start; } .docrow > input[type=checkbox] { margin-top: .2rem; }
.aibtn-small { background: #E9D9BC; color: #46321A; border: 1px solid #D6C093; font-weight: 700; border-radius: 8px; }
.aibtn-small:hover { background: #DECBA4; } .aibtn-small span { color: #B0780B; }
.aibtn-small.on { box-shadow: inset 0 0 0 2px #FFFDF7; background: #DECBA4; }
.aibtn-small[hidden] { display: none; }
@media (prefers-color-scheme: dark) { .aibtn-small { background: #E3A82B; color: #2A1C00; border-color: #E3A82B; } .aibtn-small span { color: #2A1C00; } }

/* 0.40.1: Today cards by kind (Jalal 11.11.2026, the design with a coloured top bar and a coloured number); tasks blue, mail amber, projects purple, first steps green, quality coral, money red */
.work { --k: var(--pine); }
.work[class*="k-"] { border-top: 5px solid var(--k); border-radius: 14px; }
.work[class*="k-"] h2 { border-bottom: 1px solid var(--line); }
.work h2 .n { color: var(--k); }
.work h2 .chip { display: none; }
.work.k-tasks { --k: #2B6CB0; } .work.k-mail { --k: #B87A00; } .work.k-projects { --k: #6B5FC4; } .work.k-steps { --k: #1D8A6A; } .work.k-quality { --k: #C2502A; } .work.k-money { --k: #B8363A; }
@media (prefers-color-scheme: dark) { .work.k-tasks { --k: #5B9FE3; } .work.k-mail { --k: #E3A82B; } .work.k-projects { --k: #9A91EE; } .work.k-steps { --k: #3FBF98; } .work.k-quality { --k: #EE8458; } .work.k-money { --k: #EE7B7E; } }
.setupcard h2 { border-bottom-color: var(--line) !important; }

/* 0.40: My team and the activity report */
.onl { color: var(--ok); font-weight: 700; } .onl::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 99px; background: var(--ok); margin-right: .35rem; }
.actperson { border-top: 1px solid var(--line); padding: .6rem 0; } .actperson > summary { cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; } .actsum { color: var(--muted); font-weight: 400; }
.actgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem 2rem; margin: .8rem 0; } .actgrid h3 { font-size: .9rem; color: var(--muted); margin-bottom: .3rem; }
.actlist, .actdays { list-style: none; margin: 0; padding: 0; } .actlist li, .actdays li { display: flex; justify-content: space-between; gap: .8rem; padding: .2rem 0; border-bottom: 1px solid var(--line-soft); font-size: .92rem; }
.actdays li { align-items: center; } .actbar { flex: 1; height: .5rem; background: var(--line-soft); border-radius: 99px; overflow: hidden; } .actbar i { display: block; height: 100%; background: var(--pine); }
tr.tot td { font-weight: 700; border-top: 2px solid var(--ink); }

/* ---- 0.41 Today: bands (Jalal 11.11.2026, "deploy" of the Today design) ------------------------------------------------
   The page is stacked sheets of slightly different paper: paper = the masthead and what is clear, amber = what needs you
   today, stone = mail, sage = open but not for today. Tints are mixed from the tokens above, so dark mode follows by itself.
   Colour means urgency (late = madder, today = saffron); the kind is carried by the icon chip, not by a card colour. */
.todaypage { margin: -1.75rem -2rem -4rem; }
.band { padding: 2.2rem 0 2.4rem; }
.band + .band { border-top: 1px solid var(--line-soft); }
.bandin { padding: 0 2rem; }
.band-paper { background: transparent; }
.band-amber { background: color-mix(in srgb, var(--saffron-soft) 11%, var(--surface)); }
.band-stone { background: color-mix(in srgb, var(--line-soft) 15%, var(--surface)); }
.band-sage { background: color-mix(in srgb, var(--pine-soft) 10%, var(--surface)); }
.todaypage .page-head { margin-bottom: 0; }
.todaypage .page-head p { font-family: var(--serif); font-style: italic; font-size: 1.05rem; }

.bandhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "rule rule" "title aside"; gap: .8rem 1rem; align-items: end; margin-bottom: 1.1rem; }
.bandhead .rule { grid-area: rule; width: 28px; height: 3px; background: var(--ink); }
.bandhead .rule.r-amber { background: var(--saffron); }
.bandhead .rule.r-stone { background: var(--muted); }
.bandhead .rule.r-sage { background: var(--pine); }
.bandhead .bt { grid-area: title; min-width: 0; }
.bandhead > :nth-child(3) { grid-area: aside; }
.bandhead h2 { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; letter-spacing: -.01em; font-variation-settings: "SOFT" 50, "opsz" 48; }
.say { margin: .2rem 0 0; font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--muted); }

.triad { display: flex; flex-wrap: wrap; margin-top: 1.3rem; border-bottom: 1px solid var(--line); }
.triad > div { flex: 1 1 15rem; min-width: 0; padding: 1.4rem 1.8rem 1.6rem; }
.triad > div:first-child { padding-left: 0; }
.triad > div + div { border-left: 1px solid var(--line-soft); }
.big { font-family: var(--serif); font-size: 4rem; line-height: .85; font-weight: 600; font-variation-settings: "SOFT" 50, "opsz" 72; }
.triad .lab { font-family: var(--serif); font-size: 1.2rem; margin-left: .55rem; }
.figsay { margin: .9rem 0 0; color: var(--muted); font-size: .92rem; }
.triad > div:first-child .big { color: var(--saffron); }

.queue { list-style: none; margin: 0; padding: 0; }
.queue li a { display: flex; align-items: center; gap: .85rem; padding: .65rem 0; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: inherit; }
.queue li:first-child a { border-top: 1px solid var(--ink); }
.queue li a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.queue .mark { flex: 0 0 3px; align-self: stretch; min-height: 2.1rem; background: var(--muted); }
.queue li.u-late .mark { background: var(--madder); }
.queue li.u-today .mark { background: var(--saffron-mark); }
.queue .chip { flex: 0 0 auto; display: block; width: 1.05rem; height: 1.05rem; color: var(--muted); }
.queue .chip svg { width: 100%; height: 100%; display: block; }
.queue .what { flex: 1 1 auto; min-width: 0; }
.queue .when { margin-left: auto; flex: 0 0 auto; white-space: nowrap; font-size: .85rem; color: var(--muted); }
.queue li.u-late .when { color: var(--madder); font-weight: 700; }
.queue li.u-today .when { color: var(--saffron); }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.6rem 2.6rem; }
.col h3 { display: flex; align-items: baseline; gap: .5rem; font-size: .95rem; font-weight: 700; padding-bottom: .4rem; border-bottom: 1px solid var(--ink); }
.col h3 .n { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; line-height: 1; }
.col ul { list-style: none; margin: 0; padding: 0; }
.col li a { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: inherit; }
.col li a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.col .none { padding: .7rem 0; color: var(--muted); font-family: var(--serif); font-style: italic; }
.col p { margin: .6rem 0 0; font-size: .92rem; }
/* cards built by other modules (first steps, projects) line up with the columns */
.band .work { border-top: 0; border-radius: 0; }
.band .work h2 { display: flex; align-items: baseline; gap: .5rem; font-size: .95rem; font-weight: 700; padding-bottom: .4rem; border-bottom: 1px solid var(--ink); }
.band .work h2 .n { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; line-height: 1; color: inherit; }
.band .work h2 .chip { display: none; }
.band .work li a { border-bottom: 1px solid var(--line-soft); }

/* 0.64: Mail cards on Today — white card, soft tinted title band (a different calm colour each), small light shadow, no coloured edge lines */
.band-stone .cols > .col { --mc-bg: #E3EFEA; --mc-fg: #17463F; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0; min-height: 0; overflow: hidden; box-shadow: 0 1px 3px rgba(20,40,35,.07), 0 6px 16px rgba(20,40,35,.04); }
.band-stone .cols > .col:nth-child(2) { --mc-bg: #F6EBD3; --mc-fg: #8A5B00; }
.band-stone .cols > .col:nth-child(3) { --mc-bg: #E3ECF7; --mc-fg: #2B5A8C; }
@media (prefers-color-scheme: dark) {
  .band-stone .cols > .col { --mc-bg: #1B3A35; --mc-fg: #8FD0C0; }
  .band-stone .cols > .col:nth-child(2) { --mc-bg: #3A2E10; --mc-fg: #E3A82B; }
  .band-stone .cols > .col:nth-child(3) { --mc-bg: #1D3350; --mc-fg: #8DB8EE; }
}
.band-stone .cols > .col h3 { margin: 0; padding: .95rem 1.25rem; border-bottom: 0; background: var(--mc-bg); color: var(--mc-fg); align-items: baseline; gap: .6rem; }
.band-stone .cols > .col h3 .n { font-size: 1.75rem; color: inherit; }
.band-stone .cols > .col li a { padding: .8rem 1.25rem; border-bottom: 1px solid var(--line-soft); line-height: 1.35; }
.band-stone .cols > .col li:last-child a { border-bottom: 0; }
.band-stone .cols > .col li a:hover { background: color-mix(in srgb, var(--mc-bg) 35%, transparent); }
.band-stone .cols > .col li a:hover strong { text-decoration: none; }
.band-stone .cols > .col li a .num { font-size: .85rem; white-space: nowrap; padding-top: .1rem; }
.band-stone .cols > .col .none { padding: 1rem 1.25rem; }
.band-stone .cols > .col > p { margin: 0; padding: .75rem 1.25rem 1rem; border-top: 1px solid var(--line-soft); font-weight: 700; }
.band-stone .cols > .col > p a { color: var(--mc-fg); }
.band-stone .cols > .col > p a::after { content: " \2192"; }

.allclear { margin: 1.2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line-soft); font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink); max-width: 70ch; }

@media (max-width: 60rem) {
  .todaypage { margin: -1.75rem -1rem -4rem; }
  .bandin { padding: 0 1rem; }
  .triad > div { padding: 1.1rem 0 1.2rem; border-left: 0 !important; border-top: 1px solid var(--line-soft); }
  .triad > div:first-child { border-top: 0; }
  .big { font-size: 3.2rem; }
}

/* 0.42.2 (Jalal 13.11.2026): the date of a quick-jump hit; a formatted mail on the dark background gets white room around its text */
.palette .pal-date { font-variant-numeric: tabular-nums; }
.conversation.paper-dark .mailframe { box-sizing: content-box; width: calc(100% - 2.2rem); padding: .8rem 1.1rem; border-radius: 8px; }

/* 0.44: order lines in the customer-order form: product, quantity, price and Remove on one row */
.order-lines .line-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.order-lines .line-row select, .order-lines .line-row input { width: 100%; min-width: 0; }
@media (max-width: 720px) { .order-lines .line-row { grid-template-columns: 1fr 1fr; } .order-lines .line-row select { grid-column: 1 / -1; } }

/* 0.46 task card + task rows on Today (full text, tick, mail link) */
dialog.taskcard { max-width: min(560px, 94vw); }
.taskcard-text { font-size: 1.05rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; margin: .6rem 0 1rem; }
.taskcard-text.done { text-decoration: line-through; color: var(--muted); }
.taskcard-tick { font-weight: 600; } .taskcard-links a { overflow-wrap: anywhere; }
.queue li.taskrow { display: flex; align-items: center; gap: .6rem; border-bottom: 1px solid var(--line-soft); }
.queue li.taskrow:first-child { border-top: 1px solid var(--ink); }
.queue li.taskrow > a.taskopen { flex: 1 1 auto; min-width: 0; border: 0; }
.queue li.taskrow .tick { flex: none; width: 1.15rem; height: 1.15rem; cursor: pointer; }
.queue li.taskrow .full { white-space: normal; overflow-wrap: anywhere; }
.queue li.taskrow .tasklinks { flex: 0 1 12rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calitem.k-task { cursor: pointer; }

/* ---- 0.49: supplier and customer profile — cooperation light, certificate ticks, product groups, products, tags ---- */
:root { --light-green: #2E9E5B; --light-yellow: #E0A800; --light-red: #D2382A; }
.light { display: inline-block; width: .85rem; height: .85rem; border-radius: 50%; vertical-align: -.1rem; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.light.sm { width: .65rem; height: .65rem; vertical-align: 0; }
.light-green { background: var(--light-green); } .light-yellow { background: var(--light-yellow); } .light-red { background: var(--light-red); }
.light-none { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
h1 > .light { width: 1.1rem; height: 1.1rem; vertical-align: .05rem; }
.lightbadge { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .9rem; }
.lb-green { color: var(--light-green); } .lb-yellow { color: #A57A00; } .lb-red { color: var(--light-red); } .lb-none { color: var(--muted); font-weight: 400; }
.segpick { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); margin-top: .35rem; }
.lseg { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .8rem; cursor: pointer; border-right: 1px solid var(--line-soft); font-size: .92rem; }
.lseg:last-child { border-right: 0; }
.lseg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lseg:has(input:focus-visible) { outline: 2px solid var(--pine); outline-offset: -2px; }
.lseg:has(input:checked) { font-weight: 700; background: var(--line-soft); }
.lseg-green:has(input:checked) { background: color-mix(in srgb, var(--light-green) 16%, var(--surface)); }
.lseg-yellow:has(input:checked) { background: color-mix(in srgb, var(--light-yellow) 20%, var(--surface)); }
.lseg-red:has(input:checked) { background: color-mix(in srgb, var(--light-red) 15%, var(--surface)); }
.tickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .4rem; margin-top: .35rem; }
.tick { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--line); border-radius: 7px; padding: .4rem .6rem; cursor: pointer; background: var(--surface); font-size: .92rem; }
.tick input { margin: 0; flex: none; }
.tick.on { border-color: var(--pine); background: color-mix(in srgb, var(--pine) 8%, var(--surface)); font-weight: 600; }
.tick.static { cursor: default; padding: .15rem .5rem; }
.tick .sw { width: .75rem; height: .75rem; border-radius: 3px; flex: none; }
.chip.grp { font-weight: 600; }
.masterform .field.wide { grid-column: 1 / -1; }
.masterform .flabel, .field > .flabel { font-weight: 600; display: block; }
.ppedit { display: grid; gap: .45rem; margin-top: .35rem; }
.pprows { display: grid; gap: .4rem; }
.pprow { display: grid; grid-template-columns: minmax(12rem, 2fr) minmax(9rem, 1fr) minmax(9rem, 1.4fr) auto; gap: .4rem; align-items: center; }
.pprow input, .pprow select { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: .45rem .6rem; font: inherit; min-width: 0; }
.ppedit > .btn { justify-self: start; }
.tagpick { display: grid; gap: .4rem; margin-top: .35rem; } .tagpick input { border: 1px solid var(--line); border-radius: 7px; padding: .45rem .6rem; font: inherit; }
.coop { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.4rem; align-items: start; }
.coop-light { display: flex; gap: .7rem; align-items: center; } .coop-light .light { width: 1.6rem; height: 1.6rem; } .coop-light strong { display: block; font-size: 1.05rem; }
.coop-parts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: .92rem; }
.coop-why { grid-column: 1 / -1; } .coop-why p { margin: .2rem 0; }
.parts-inl { display: inline-flex; gap: .7rem; flex-wrap: wrap; font-size: .88rem; }
.certlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .45rem; }
.certlist li { display: flex; flex-direction: column; gap: .15rem; align-items: flex-start; }
.pname { display: grid; gap: .2rem; } .pname .labelrow { gap: .25rem; }
.pgroups { margin-bottom: .7rem; }
.count { margin: 0 0 .4rem; }
.sup2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
dialog.modal:has(.supdlg), dialog.modal:has(.ratedlg) { max-width: min(880px, 96vw); }
.supdlg .field, .ratedlg .field { margin-bottom: .7rem; }
.ratedlg details.parts { margin: .4rem 0 .8rem; } .ratedlg details.parts summary { cursor: pointer; color: var(--muted); margin-bottom: .5rem; }
@media (max-width: 40rem) { .sup2 { grid-template-columns: 1fr; } .pprow { grid-template-columns: 1fr 1fr; } .pprow > input:first-child { grid-column: 1 / -1; } .coop { grid-template-columns: 1fr; } }
/* the tick grids and the light picker live inside .field, whose inputs and labels are styled for text boxes */
.field .tickgrid label.tick { display: inline-flex; margin: 0; font-weight: 400; }
.field .tickgrid label.tick.on { font-weight: 600; }
.field .tickgrid input[type=checkbox], .tickgrid input[type=checkbox] { width: 1rem; height: 1rem; min-width: 1rem; padding: 0; margin: 0; border: 0; box-shadow: none; flex: none; }
.field .segpick label.lseg { display: inline-flex; margin: 0; font-weight: 400; } .field .segpick label.lseg:has(input:checked) { font-weight: 700; }
.field .tagpick .inline { display: flex; gap: .4rem; align-items: center; } .field .tagpick input { flex: 1; min-width: 0; margin: 0; }
.filters select { max-width: 16rem; }

/* 0.50.0: release panel, team-release switch, suggestion lists */
.relpanel { display: grid; gap: .6rem; }
.callout { border: 1px solid var(--line, #d9dde3); border-radius: 8px; padding: .7rem .9rem; margin: 0 0 1rem; background: #f8f9fa; }
.callout.warn { border-color: #e0a800; background: #fff8e1; }
.suggest { position: relative; }
.suggest-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--line, #d9dde3); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 18rem; overflow: auto; }
.suggest-list li { padding: .45rem .7rem; cursor: pointer; display: grid; }
.suggest-list li small { color: var(--muted, #667085); }
.suggest-list li[aria-selected="true"], .suggest-list li:hover { background: #eef3ff; }
.custcard { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .8rem; margin-top: .6rem; padding: .7rem .9rem; border: 1px solid var(--line, #d9dde3); border-radius: 8px; background: #fafbfc; }
.custcard h4 { margin: 0 0 .2rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #667085); }

/* ---- brand v2 (TraceAll, 19.11.2026): full dark wordmark + company tag; replaces the tile + serif text ---- */
.brand { display: grid; gap: .6rem; align-content: start; margin: 0 .75rem .6rem; padding: .2rem .5rem 1.05rem; border-bottom: 1px solid rgba(255,255,255,.09); text-decoration: none; }
.brand:focus-visible { outline: 2px solid var(--saffron-mark); outline-offset: 3px; }
.brand-logo { display: block; width: 10.5rem; max-width: 100%; height: auto; }
.brand-co { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--ui); font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--on-pine-muted); }
.brand-co::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: var(--saffron-mark); flex: none; }
.rail-brand { background: #F6FBF9; box-shadow: inset 0 0 0 1px rgba(15,51,46,.08); }
.rail-brand img { width: 1.8rem; height: 1.45rem; }

/* ===== 0.56 polish (Jalal 20.11.2026 "fix, polish, redesign, make it functional, more stylish and polished") ===========
   Appended last so it wins over older rules without touching them. Plain zeros come from the font file (traceall-text-*). */

/* Forms: one height for inputs and selects, hints under their field, checkboxes their own size beside their text */
.field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select { min-height: 2.6rem; font: inherit; }
.grid2 { align-items: start; }
.field input[type=checkbox], .field input[type=radio], label.check input, .check-row input, table input[type=checkbox] { width: 1.05rem; height: 1.05rem; min-width: 1.05rem; padding: 0; margin: 0; flex: none; accent-color: var(--pine); }
label.check, .field label.check { display: flex; align-items: center; gap: .55rem; width: fit-content; max-width: 100%; margin: .45rem 0; font-weight: 400; cursor: pointer; }
.field > label.check { font-weight: 400; }
.field small.muted, .field > small { line-height: 1.4; }
input[type=file] { font: inherit; color: var(--muted); }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; margin-right: .8rem; padding: .5rem .95rem; border-radius: 7px; border: 1px solid var(--pine); background: var(--surface); color: var(--pine); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--pine-soft); }
table.mini.ticks th.c, table.mini.ticks td.c { text-align: center; width: 6rem; }
table.mini.ticks td.c input { margin: 0 auto; display: block; }
table.mini.ticks td { padding: .35rem .5rem; border-bottom: 1px solid var(--line-soft); }

/* Searchable multi-picker (picker.js) */
.pick { position: relative; }
.pick-box { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; min-height: 2.6rem; padding: .3rem .45rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: text; }
.pick-box:focus-within { border-color: var(--pine); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine) 18%, transparent); }
.pick-chips { display: contents; }
.pick-chip { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; padding: .18rem .25rem .18rem .6rem; border-radius: 999px; background: var(--pine-soft); color: var(--ink); font-size: .9rem; line-height: 1.3; }
.pick-chip > span:not(.pick-dot) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-x { border: 0; background: transparent; color: var(--muted); font-size: 1.05rem; line-height: 1; width: 1.4rem; height: 1.4rem; border-radius: 50%; cursor: pointer; padding: 0; }
.pick-x:hover { background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink); }
.field .pick-box input.pick-input, .pick-input { flex: 1 1 9rem; min-width: 8rem; min-height: 1.9rem !important; border: 0 !important; padding: .2rem .3rem !important; background: transparent !important; box-shadow: none !important; outline: none; font: inherit; }
.pick-dot { width: .6rem; height: .6rem; border-radius: 50%; flex: none; }
.pick-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); max-height: 17rem; overflow: auto; margin: 0; padding: .3rem; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px rgba(15, 30, 28, .16); }
.pick-list li { display: flex; align-items: baseline; gap: .5rem; padding: .45rem .6rem; border-radius: 7px; cursor: pointer; }
.pick-list li.on, .pick-list li:hover { background: var(--pine-soft); }
.pick-list li.pick-none { color: var(--muted); cursor: default; background: none; }
.pick-sub { color: var(--muted); margin-left: auto; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.pick-count { display: block; min-height: 1rem; margin-top: .2rem; color: var(--muted); font-size: .82rem; }

/* Campaign editor: text beside a live preview, audience pickers beside the live count, Save always in reach */
.compose2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.mailprev { position: sticky; top: 4.5rem; margin-top: 1.75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.mailprev-head { display: grid; gap: .15rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line-soft); background: color-mix(in srgb, var(--pine-soft) 45%, var(--surface)); }
.mailprev-body { margin: 0; padding: 1rem; white-space: pre-wrap; font: inherit; font-size: .95rem; max-height: 26rem; overflow: auto; }
.mailprev .err { margin: 0 1rem 1rem; }
h2.subhead { margin: 1.6rem 0 .8rem; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.aud { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.aud-side { position: sticky; top: 4.5rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.aud-side h3 { margin: 0 0 .7rem; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.aud-figs { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .6rem; }
.aud-fig { display: grid; gap: .1rem; padding: .7rem .8rem; border-radius: 10px; background: var(--paper); }
.aud-fig b { font-family: var(--serif); font-size: 1.9rem; line-height: 1; font-weight: 600; }
.aud-fig.ok b { color: var(--ok); } .aud-fig.warn b { color: var(--saffron); }
.aud-fig span { color: var(--muted); font-size: .85rem; }
.aud-why { margin: .2rem 0 .6rem; padding: 0; list-style: none; font-size: .9rem; }
.aud-why li { display: flex; gap: .45rem; padding: .2rem 0; border-bottom: 1px dashed var(--line-soft); }
.aud-why .num { min-width: 2.2rem; text-align: right; font-weight: 700; }
.actions.stick { position: sticky; bottom: 0; z-index: 5; margin: 1.2rem -1rem 0; padding: .8rem 1rem; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--line-soft); }
@media (max-width: 900px) { .compose2, .aud { grid-template-columns: 1fr; } .mailprev, .aud-side { position: static; margin-top: 0; } }

/* Tables: calmer rows, headings that read as headings, action buttons that fit */
.tablewrap { box-shadow: 0 1px 2px rgba(15, 30, 28, .04); }
.tablewrap table { width: 100%; border-collapse: separate; border-spacing: 0; }
.tablewrap thead th { position: sticky; top: 0; z-index: 1; background: color-mix(in srgb, var(--paper) 60%, var(--surface)); font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 700; text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tablewrap thead th.r { text-align: right; }
.tablewrap tbody td { padding: .6rem .75rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tablewrap tbody tr:last-child td { border-bottom: 0; }
.tablewrap tbody tr[data-href] { cursor: pointer; }
.tablewrap tbody tr:hover td { background: color-mix(in srgb, var(--pine-soft) 40%, transparent); }
.tablewrap td .btn.small, .tablewrap td .btn.quiet.small { padding: .28rem .6rem; font-size: .85rem; border-radius: 6px; }
.tablewrap td.clip { display: table-cell; max-width: 18rem; min-width: 10rem; white-space: normal; overflow-wrap: anywhere; color: var(--ink); }
.tablewrap td .tag { white-space: nowrap; }
.tablewrap td.nowrap:last-child, .filetable td.r.nowrap { white-space: normal; width: 1%; }
.tablewrap td.nowrap:last-child .btn, .filetable td.r.nowrap .btn { display: flex; width: max-content; margin: 0 0 .3rem auto; }
.filetable td:nth-child(2) { max-width: 24rem; overflow-wrap: anywhere; }
table.leads td input[type=text] { width: 100%; min-width: 7rem; max-width: 10rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font: inherit; }

/* Empty states: a quiet card with a mark, not bare text */
.tablewrap > .empty, .pj-empty > .empty { display: grid; gap: .25rem; padding: 1.6rem 1.4rem 1.6rem 4.1rem; position: relative; color: var(--muted); }
.tablewrap > .empty::before, .pj-empty > .empty::before { content: ""; position: absolute; left: 1.4rem; top: 1.55rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--pine) 45%, transparent); }
.tablewrap > .empty strong, .pj-empty > .empty strong { color: var(--ink); font-size: 1.02rem; }
.empty a { font-weight: 700; }

/* Menu: the New mail button fits the list; the Inbox page drops its copy while the list is open beside it */
.fly-list a.fly-compose { margin: .5rem 0 .2rem; }
.rail-menu .rail-side:not(.folded) + .main-col .ihead .compose-btn { display: none; }
.fly-list .badge, .nav .badge { min-width: 1.5rem; text-align: center; font-variant-numeric: tabular-nums; }

/* Today: the all-clear line reads as a result */
.allclear { display: flex; gap: .6rem; align-items: baseline; font-style: normal; }
.allclear-tick { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-style: normal; font-weight: 700; flex: none; }

/* Projects: an empty board shows its steps as one strip */
.pj-empty { display: grid; gap: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding-bottom: 1.1rem; }
.pj-empty .pj-steps { display: flex; flex-direction: row; flex-wrap: wrap; gap: .45rem .3rem; margin: 0; padding: 0 1.4rem; list-style: none; counter-reset: st; }
.pj-empty .pj-steps li { display: inline-flex; width: auto; align-items: center; gap: .35rem; }
.pj-steps li + li::before { content: "→"; color: var(--muted); margin-right: .1rem; }
.pj-steps small { display: none; }
.chart-empty { padding: 2.2rem 1rem; text-align: center; }

/* Assistant answers as paragraphs and lists */
.ai-bubble p { margin: 0 0 .45rem; } .ai-bubble p:last-child { margin-bottom: 0; }
.ai-bubble .ai-list, .aim-text .ai-list { margin: .2rem 0 .5rem; padding-left: 1.2rem; } .ai-bubble .ai-list li { margin: .15rem 0; }
.ai-bubble code, .aim-text code { font-size: .88em; padding: .05rem .3rem; border-radius: 4px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.ai-bubble, .aim-text { white-space: normal; }
.tl-body { overflow-wrap: anywhere; }
/* The page area gets focus after each page change (for screen readers); it never draws a focus ring (the blue line at the top and bottom of pages) */
main.main:focus, main.main:focus-visible { outline: none; box-shadow: none; }
/* 0.56: loose selects and text boxes on pages (status, owner, filters) get the same calm look as form fields.
   :where() keeps these at zero weight, so every page that styles its own controls still wins. */
:where(main) :where(select) { font: inherit; border: 1px solid var(--line); border-radius: 7px; background-color: var(--surface); color: var(--ink); padding: .4rem 1.9rem .4rem .65rem; min-height: 2.35rem; }
:where(main) :where(input[type=text], input[type=search], input[type=email], input[type=number], input[type=date], input[type=tel], input[type=url]) { font: inherit; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); padding: .4rem .65rem; min-height: 2.35rem; }
:where(main) :where(select, input, textarea):focus-visible { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine) 18%, transparent); }

.scan-install { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; justify-content: space-between; background: var(--surface); }
.cam-hint { grid-area: 1 / 1; align-self: start; justify-self: center; margin-top: max(1.2rem, 3vh); color: #fff; font-weight: 700; text-shadow: 0 1px 3px #000; text-align: center; padding: 0 1rem; }

/* 0.64: supplier prices — board, compare cards, record form, offer dialog, the Supplier prices tab of Prices… */
.sp-board td .small { font-size: .8rem; }
.sp-board tr.rowlink { cursor: pointer; }
.sp-board tr.rowlink:hover, .sp-board tr.rowlink:focus-visible { background: var(--hover, rgba(0,0,0,.035)); outline: none; }
.sp-soon { border: 1px solid var(--warn-line, #e2c178); background: var(--warn-bg, #fff8e6); border-radius: 10px; padding: .6rem .9rem; margin: 0 0 1rem; }
.sp-soon ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 1rem; }
.sp-card { background: var(--card, #fff); border: 1px solid var(--line, #e3e5e8); border-radius: 12px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .45rem; }
.sp-card.best { border: 2px solid var(--ok, #2e7d4f); }
.sp-card.old { opacity: .62; }
.sp-card header { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; }
.sp-price .big { font-size: 1.5rem; font-weight: 600; }
.sp-facts { display: grid; grid-template-columns: auto 1fr; gap: .15rem .7rem; margin: .3rem 0 0; font-size: .86rem; border-top: 1px solid var(--line, #e3e5e8); padding-top: .45rem; }
.sp-facts dt { color: var(--muted, #6b7280); }
.sp-facts dd { margin: 0; }
.sp-card .actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; padding-top: .4rem; }
.sp-record .pc-row, .sp-pick .pc-row, .modal .pc-row { display: flex; flex-wrap: wrap; gap: .5rem .8rem; align-items: center; margin: .35rem 0; }
.sp-record .seg button[aria-pressed="true"], .pricepick .seg button[aria-pressed="true"] { font-weight: 600; }
.sp-chosen { font-weight: 600; }
.sp-internal { background: var(--warn-bg, #fff8e6); border-left: 3px solid var(--warn-line, #e2c178); padding: .4rem .7rem; margin: .4rem 0 .6rem; font-size: .88rem; }
.sp-leads { width: 100%; margin: .6rem 0; font-size: .88rem; }
.sp-leads td, .sp-leads th { padding: .3rem .4rem; vertical-align: top; text-align: left; }
.sp-row { width: 100%; text-align: left; display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.sp-sell { border-top: 1px solid var(--line, #e3e5e8); margin-top: .6rem; padding-top: .6rem; }
.modal p.err:empty, .sp-pick p.err:empty { display: none; }
.sp-record select, .sp-record input[type="text"], .sp-record input[type="date"], .sp-record input:not([type]),
.modal .pc-row select, .modal .pc-row input[type="text"], .modal .pc-row input[type="date"] { width: auto; min-width: 6.5em; max-width: 100%; display: inline-block; }
.sp-record .pc-row label, .modal .pc-row label { display: inline-flex; align-items: center; gap: .35rem; }
.sp-record textarea { width: 100%; }
.sp-record input[aria-label="Product name"] { width: 100%; }
.sp-row.on { outline: 2px solid var(--ok, #2e7d4f); }
.sp-sell h3 { margin: .2rem 0 .3rem; font-size: 1rem; }

/* 0.64: zebra rows in the Inbox list — white, light silver, white … (hover and focus keep the pine tint) */
.mwrap { background: var(--surface); }
.mwrap:nth-child(even):not(:hover):not(:focus-within) { background: #F9F9F9; }
@media (prefers-color-scheme: dark) { .mwrap:nth-child(even):not(:hover):not(:focus-within) { background: rgba(255,255,255,.045); } }
/* 0.64: Inbox rows 5% taller (.5rem → .525rem top and bottom) */
.mrow { padding-top: .525rem; padding-bottom: .525rem; }

/* 0.64: attachment chips under the subject in the Inbox list (Gmail style) */
.mrow .mfiles { grid-column: 3 / 4; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .35rem; font-weight: 400; }
.mrow .att.attsm { display: inline-flex; align-items: center; gap: .5rem; height: 2rem; padding: 0 .85rem 0 .55rem; font-size: .8125rem; font-weight: 500; color: #3c4043; max-width: 12.5rem; background: var(--surface); border: 1px solid #dadce0; border-radius: 999px; }
.mrow .att.attsm:hover { background: #f1f3f4; border-color: #dadce0; box-shadow: 0 1px 2px rgba(60,64,67,.15); }
.mrow .att.attsm .attname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mrow .ftype { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 1.4rem; height: 1rem; padding: 0 .2rem; border-radius: 3px; font-size: .5rem; font-weight: 800; letter-spacing: .02em; color: #fff; background: #7b8083; }
.mrow .ft-pdf { background: #ea4335; } .mrow .ft-doc { background: #4285f4; } .mrow .ft-xls { background: #0f9d58; } .mrow .ft-ppt { background: #f4511e; } .mrow .ft-img { background: #a142f4; } .mrow .ft-zip { background: #f9ab00; }
.mrow .attmore { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2rem; padding: 0 .35rem; border: 1px solid #dadce0; border-radius: 999px; font-size: .8125rem; font-weight: 500; color: #3c4043; background: var(--surface); }
@media (prefers-color-scheme: dark) { .mrow .att.attsm, .mrow .attmore { color: #e8eaed; border-color: #5f6368; } .mrow .att.attsm:hover { background: rgba(255,255,255,.08); } }
@media (max-width: 52rem) { .mrow .mfiles { grid-column: 2 / -1; } }
