:root {
  --navy: #0e1b40;
  --navy-2: #1d3f7a;
  --sea: #e8611a;
  --sea-soft: #fdeee4;
  --orange: #f26a1b;
  --blue: #1593c9;
  --bg: #f4f6f9;
  --panel: #ffffff;
  --line: #dde3ea;
  --line-2: #eef1f5;
  --ink: #1b2533;
  --muted: #637083;
  --price: #0d6b3b;
  --warn: #b4531a;
  --danger: #b42318;
  --chip: #eef3fb;
  --chip-ink: #1d4580;
  --tag: #fff3e0;
  --tag-ink: #8a4b0f;
  --sel: #e8f0fc;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 32, 60, .06), 0 4px 16px rgba(16, 32, 60, .06);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Segoe UI", "Segoe UI Arabic", Tahoma, Arial, sans-serif;
  font-size: 14px; color: var(--ink); background: var(--bg);
  display: flex; flex-direction: column; overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
.topbar {
  background: var(--navy); border-bottom: 3px solid; border-image: linear-gradient(90deg, var(--blue) 0 50%, var(--orange) 50% 100%) 1; color: #fff; display: flex; align-items: center; gap: 16px;
  padding: 10px 18px; flex: 0 0 auto;
}
.brand { display: flex; flex-direction: column; line-height: 1.1; min-width: 170px; }
.brand b { font-size: 17px; letter-spacing: .06em; }
.brand span { font-size: 11px; opacity: .75; }
.search-wrap { flex: 1; position: relative; max-width: 820px; }
.search-wrap input {
  width: 100%; height: 44px; border-radius: 22px; border: 0; padding: 0 44px 0 46px;
  font-size: 16px; outline: none; color: var(--ink);
}
.search-wrap input:focus { box-shadow: 0 0 0 3px rgba(122, 190, 255, .55); }
.search-wrap .icon { position: absolute; left: 16px; top: 12px; width: 20px; height: 20px; color: var(--muted); }
.search-wrap .clear { position: absolute; right: 10px; top: 8px; border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; display: none; }
.search-wrap.has-text .clear { display: block; }
.btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 6px;
  padding: 7px 14px; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: #b9c4d2; }
.btn.primary { background: var(--sea); border-color: var(--sea); color: #fff; }
.btn.primary:hover { background: #cf5513; }
.btn.light { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: #fff; }
.btn.light:hover { background: rgba(255, 255, 255, .2); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 3px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.filters {
  display: flex; gap: 12px; align-items: center; padding: 8px 18px; background: #fff;
  border-bottom: 1px solid var(--line); flex: 0 0 auto; flex-wrap: wrap;
}
.filters label { color: var(--muted); font-size: 13px; display: flex; gap: 6px; align-items: center; }
.filters select { border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; background: #fff; max-width: 260px; }
.filters .count { margin-left: auto; color: var(--muted); font-size: 13px; }
.layout { flex: 1; display: flex; min-height: 0; }
.results { flex: 1; overflow: auto; min-width: 0; }
table.grid { width: 100%; border-collapse: collapse; background: #fff; }
table.grid th {
  position: sticky; top: 0; background: #f7f9fc; text-align: left; font-weight: 600; font-size: 12px;
  color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); z-index: 1;
}
table.grid td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.grid tbody tr { cursor: pointer; }
table.grid tbody tr:hover { background: #f8fafd; }
table.grid tbody tr.sel { background: var(--sel); }
.code { font-family: Consolas, "Courier New", monospace; font-weight: 600; color: var(--navy-2); white-space: nowrap; }
.code.none { color: #a7b0bd; font-weight: 400; }
.price { color: var(--price); font-weight: 600; white-space: nowrap; text-align: right; }
.price.none { color: #a7b0bd; font-weight: 400; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { text-align: right; white-space: nowrap; }
.chip { display: inline-block; background: var(--chip); color: var(--chip-ink); border-radius: 12px; padding: 2px 9px; font-size: 12px; margin: 2px 4px 2px 0; }
.tag { display: inline-block; background: var(--tag); color: var(--tag-ink); border-radius: 12px; padding: 2px 9px; font-size: 12px; margin: 2px 4px 2px 0; cursor: pointer; }
.src { font-size: 11px; color: var(--muted); }
.src.mine { color: var(--sea); font-weight: 600; }
.detail {
  width: 470px; flex: 0 0 470px; background: var(--panel); border-left: 1px solid var(--line);
  overflow: auto; padding: 18px 20px 30px; display: none;
}
.detail.open { display: block; }
.detail h2 { margin: 4px 0 6px; font-size: 18px; line-height: 1.3; }
.detail .close { float: right; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--muted); }
.section { margin-top: 18px; }
.section h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px; }
.pricebox { background: #f1f8f4; border: 1px solid #cfe8da; border-radius: var(--radius); padding: 12px 14px; margin-top: 12px; }
.pricebox .big { font-size: 26px; font-weight: 700; color: var(--price); }
.pricebox.none { background: #f7f8fa; border-color: var(--line); }
.pricebox.none .big { color: #9aa4b2; font-size: 18px; font-weight: 600; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 4px 10px; font-size: 13px; }
.kv div:nth-child(odd) { color: var(--muted); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.form .full { grid-column: 1 / -1; }
.form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.form input, .form select, .form textarea, .inline-input {
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: #fff; color: var(--ink); font-size: 14px;
}
.form textarea { resize: vertical; min-height: 54px; }
.form input:focus, .form select:focus, .form textarea:focus, .inline-input:focus { outline: 2px solid #9cc3f5; border-color: #9cc3f5; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
table.mini { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.mini th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--line); }
table.mini td { padding: 5px 6px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; font-size: 16px; color: var(--ink); margin-bottom: 6px; }
.modal-back { position: fixed; inset: 0; background: rgba(15, 25, 40, .4); display: none; align-items: center; justify-content: center; z-index: 50; }
.modal-back.open { display: flex; }
.modal { background: #fff; border-radius: 10px; width: 560px; max-width: 94vw; max-height: 90vh; overflow: auto; padding: 20px 22px; box-shadow: var(--shadow); }
.modal h2 { margin: 0 0 14px; font-size: 18px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 9px 18px; border-radius: 20px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; }
.toast.show { opacity: 1; }
.suggest { background: #f6fafb; border: 1px dashed #b8d9df; border-radius: 6px; padding: 8px 10px; margin-top: 8px; font-size: 12.5px; }
.suggest .tag, .suggest .chip { cursor: pointer; }
.linkish { color: var(--navy-2); cursor: pointer; text-decoration: underline; }
.check-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 190px; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: 6px; }
.check-grid label { flex-direction: row; align-items: center; gap: 5px; background: #f7f9fc; border: 1px solid var(--line-2); border-radius: 14px; padding: 3px 10px; color: var(--ink); font-size: 12.5px; cursor: pointer; }
.check-grid label.on { background: var(--chip); border-color: #b7cdf0; color: var(--chip-ink); }
.check-grid input { margin: 0; }
mark { background: #fff1a8; color: inherit; padding: 0 1px; border-radius: 2px; }
.userbox { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; font-size: 13px; min-width: 120px; }
.userbox .links { font-size: 11.5px; opacity: .85; }
.userbox a { cursor: pointer; text-decoration: underline; }
.login-back { position: fixed; inset: 0; background: linear-gradient(160deg, #12305a 0%, #1f5f7a 100%); display: none; align-items: center; justify-content: center; z-index: 80; }
.login-back.open { display: flex; }
.login { background: #fff; width: 380px; max-width: 92vw; border-radius: 12px; padding: 28px 30px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.login h2 { margin: 0 0 6px; font-size: 18px; }
.login-brand { font-weight: 700; letter-spacing: .08em; color: var(--navy); font-size: 18px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 1px 6px; letter-spacing: .03em; }
.badge.RFQ { background: #efe7fb; color: #5b2ca0; }
.badge.Quotation { background: #e3f1f3; color: #145e6c; }
.badge.Purchase { background: #fff3e0; color: #8a4b0f; }
.badge.Delivery { background: #e8f0fc; color: #1d4580; }
.badge.Invoice { background: #e6f4ea; color: #0d6b3b; }
.status { font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 0 7px; white-space: nowrap; }

.brand { flex-direction: row; align-items: center; gap: 10px; }
.brand img { height: 34px; }
.brand .t { display: flex; flex-direction: column; line-height: 1.1; }
.src.mine { color: var(--blue); }
.badge.Service { background: #fde9dc; color: #a2420c; }
.div-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: #fff; border-radius: 3px; padding: 0 5px; }
.div-tag.Marine { background: var(--blue); }
.div-tag.Industrial { background: var(--orange); }

/* ---------- main navigation & dashboard ---------- */
.mainnav { display: flex; gap: 2px; background: #fff; border-bottom: 1px solid var(--line); padding: 0 14px; flex: 0 0 auto; }
.mainnav button { border: 0; background: none; padding: 10px 16px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.mainnav button:hover { color: var(--ink); }
.mainnav button.on { color: var(--navy); border-bottom-color: var(--orange); }
.dash { flex: 1; overflow: auto; padding: 18px 22px 40px; display: none; }
.dash.open { display: block; }
.dash h2 { font-size: 15px; margin: 0 0 10px; color: var(--ink); }
.dash .sub { color: var(--muted); font-size: 12.5px; font-weight: 400; margin-left: 6px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.tile:hover { border-color: #b9c4d2; box-shadow: var(--shadow); }
.tile .k { font-size: 12px; color: var(--muted); }
.tile .v { font-size: 28px; font-weight: 700; color: var(--ink); line-height: 1.15; margin-top: 2px; }
.tile .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.dgrid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 16px; }
@media (max-width: 1100px) { .dgrid { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.panel-head h2 { margin: 0; }
.panel-head .grow { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 4px 10px; font-size: 12.5px; cursor: pointer; border-left: 1px solid var(--line); }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--navy); color: #fff; }
.pipe { display: grid; grid-template-columns: 150px 1fr 34px; gap: 6px 10px; align-items: center; font-size: 13px; }
.pipe .lbl { color: var(--ink); cursor: pointer; }
.pipe .bar { height: 14px; border-radius: 0 4px 4px 0; background: var(--navy-2); cursor: pointer; }
.pipe .bar.done { background: #9aa6b8; }
.pipe .n { text-align: right; font-weight: 600; }
.pipe .row:hover .bar { opacity: .85; }
table.jobs { width: 100%; border-collapse: collapse; font-size: 13px; }
table.jobs th { text-align: left; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 6px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
table.jobs td { padding: 7px 6px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.jobs tbody tr { cursor: pointer; }
table.jobs tbody tr:hover { background: #f8fafd; }
.steps { display: flex; gap: 3px; flex-wrap: wrap; }
.stp { font-size: 11px; border-radius: 4px; padding: 1px 6px; border: 1px solid var(--line); background: #f7f9fc; color: var(--muted); white-space: nowrap; cursor: pointer; }
.stp.ok { background: #e6f4ea; border-color: #b9dfc6; color: #0d6b3b; }
.stp.wait { background: #fff4e0; border-color: #f2d39b; color: #8a4b0f; }
.stp.bad { background: #fde8e6; border-color: #f3c0ba; color: #b42318; }
.stage { font-size: 12px; font-weight: 600; white-space: nowrap; }
.stage::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: currentColor; vertical-align: 1px; }
.stage.s-quote { color: #6b3fb3; } .stage.s-wait { color: #b26a00; } .stage.s-deliver { color: #1d4f9a; }
.stage.s-invoice { color: #c2410c; } .stage.s-pay { color: #a2420c; } .stage.s-done { color: #0d6b3b; } .stage.s-lost { color: #8a94a3; }
.mini-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.mini-list li { padding: 7px 0; border-bottom: 1px solid var(--line-2); display: flex; gap: 8px; align-items: baseline; cursor: pointer; }
.mini-list li:hover { color: var(--navy-2); }
.mini-list .r { margin-left: auto; white-space: nowrap; }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick button { text-align: left; }
.matrix { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.matrix th, .matrix td { padding: 5px 6px; border-bottom: 1px solid var(--line-2); text-align: right; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix td.c { cursor: pointer; font-weight: 600; color: var(--navy-2); }
.matrix td.c:hover { text-decoration: underline; }
.matrix td.z { color: #c3cad5; }

.lookup { border-color: #c9d6e8; box-shadow: var(--shadow); }
.lookup-box { position: relative; }
.lookup-box .icon { position: absolute; left: 14px; top: 13px; width: 20px; height: 20px; color: var(--muted); }
.lookup-box input { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 23px; padding: 0 18px 0 44px; font-size: 16px; background: #fbfcfe; }
.lookup-box input:focus { outline: none; border-color: #9cc3f5; box-shadow: 0 0 0 3px rgba(122,190,255,.35); background: #fff; }
.lookup-res { margin-top: 10px; }
.lookup-res tr.act { background: #f3f7fd; }
.lookup-res tr.sel { background: var(--sel); }
.itemcard { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, 1fr); gap: 10px 22px; margin-top: 12px; padding-top: 14px; border-top: 2px solid var(--line); }
.itemcard .ic-main > h3 { margin: 4px 0 10px; font-size: 18px; }
.itemcard .section h3 { font-size: 12px; margin: 0 0 6px; }
.itemcard .ic-hist { grid-column: 1 / -1; }
@media (max-width: 1000px) { .itemcard { grid-template-columns: 1fr; } }

/* ---------- single-window sections ---------- */
.frames { flex: 1; min-height: 0; display: none; }
.frames.open { display: flex; }
.frames iframe { flex: 1; border: 0; width: 100%; height: 100%; display: none; background: var(--bg); }
.frames iframe.on { display: block; }
.viewer { position: fixed; inset: 0; z-index: 70; background: rgba(15, 25, 40, .55); display: none; flex-direction: column; padding: 18px 28px; }
.viewer.open { display: flex; }
.viewer-bar { background: #fff; border-radius: 10px 10px 0 0; padding: 8px 12px; display: flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); }
.viewer iframe { flex: 1; border: 0; background: #e9edf2; border-radius: 0 0 10px 10px; width: 100%; }
/* pages shown inside the main window: light toolbar instead of the big header */
.embedded .topbar { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); border-image: none; padding: 8px 18px; }
.embedded .topbar .brand img { display: none; }
.embedded .topbar .brand b { font-size: 14px; color: var(--navy); letter-spacing: .04em; }
.embedded .topbar .brand span { color: var(--muted); opacity: 1; }
.embedded .btn.light { background: #fff; color: var(--ink); border-color: var(--line); }

.backbtn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.1); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 0; }
.backbtn svg { width: 20px; height: 20px; }
.backbtn:hover:not(:disabled) { background: rgba(255,255,255,.22); }
.backbtn:disabled { opacity: .35; cursor: default; }
.brand.home { cursor: pointer; border-radius: 8px; padding: 2px 6px; margin-left: -6px; }
.brand.home:hover { background: rgba(255,255,255,.08); }

[hidden] { display: none !important; }
#lSwitch a { color: var(--navy-2); cursor: pointer; text-decoration: underline; font-weight: 600; }

/* ---------- email ---------- */
.mailview { flex: 1; min-height: 0; display: none; flex-direction: column; }
.mailview.open { display: flex; }
.mail-bar { display: flex; gap: 8px; align-items: center; padding: 8px 14px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mail-cols { flex: 1; min-height: 0; display: flex; }
.mail-folders { width: 170px; flex: 0 0 170px; background: #fff; border-right: 1px solid var(--line); overflow: auto; padding: 8px 0; }
.mail-folders a { display: block; padding: 7px 14px; cursor: pointer; font-size: 13.5px; color: var(--ink); }
.mail-folders a:hover { background: #f5f7fb; }
.mail-folders a.on { background: var(--sel); font-weight: 600; border-left: 3px solid var(--orange); padding-left: 11px; }
.mail-list { width: 380px; flex: 0 0 380px; border-right: 1px solid var(--line); overflow: auto; background: #fff; }
.mrow { padding: 9px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.mrow:hover { background: #f8fafd; }
.mrow.sel { background: var(--sel); }
.mrow .l1 { display: flex; gap: 8px; align-items: baseline; }
.mrow .l1 b { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .l2 { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mrow.unread .l1 b { font-weight: 700; }
.mrow.unread .l2 { color: var(--ink); font-weight: 600; }
.mrow.unread { box-shadow: inset 3px 0 0 var(--blue); }
.mail-read { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fff; }
.mread-head { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.mread-head h2 { margin: 0 0 6px; font-size: 18px; }
.mbody { flex: 1; border: 0; width: 100%; background: #fff; }
.mfiles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mfile { border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; font-size: 12.5px; cursor: pointer; background: #f7f9fc; }
.mfile:hover { border-color: #9cb4d4; }

/* item full-spec sheet */
#specView { z-index: 75; }
.spec-box { flex: 1; min-height: 0; display: flex; flex-direction: column; max-width: 1300px; width: 100%; margin: 0 auto; }
.spec-body { flex: 1; min-height: 0; display: flex; background: #fff; border-radius: 0 0 10px 10px; overflow: hidden; }
.spec-pic { width: 500px; flex: 0 0 500px; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 10px; background: #f6f8fb; }
.spec-scroll { flex: 1; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.spec-img { position: relative; }
.spec-img img { display: block; width: 100%; }
.spec-mark { position: absolute; left: 0; right: 0; height: 26px; margin-top: -13px; background: rgba(242, 106, 27, .22); border-left: 4px solid #f26a1b; pointer-events: none; }
.spec-info { flex: 1; overflow: auto; padding: 16px 22px 30px; }

/* notification bell */
.bell { position: relative; background: none; border: 0; font-size: 20px; cursor: pointer; padding: 4px 8px; color: inherit; }
.bell span { position: absolute; top: -2px; right: -2px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; border-radius: 9px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 4px; }
.bellpanel { position: fixed; top: 62px; right: 18px; width: 380px; max-height: 70vh; overflow: auto; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.18); z-index: 80; display: none; }
.bellpanel.open { display: block; }
.bp-head { display: flex; padding: 10px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.bp-head a { cursor: pointer; font-size: 12px; text-decoration: underline; }
.bp-row { padding: 9px 14px; border-bottom: 1px solid #eef1f5; cursor: pointer; font-size: 13px; }
.bp-row:hover { background: #f6f8fb; }
#mainnav [data-badge]:not([data-badge=""])::after { content: attr(data-badge); background: #e5484d; color: #fff; font-size: 10.5px; border-radius: 8px; padding: 1px 6px; margin-left: 6px; }
/* team chat */
.chat { flex: 1; min-height: 0; display: flex; }
.chat-side { width: 280px; flex: 0 0 280px; background: #fff; border-right: 1px solid var(--line); overflow: auto; padding: 6px 0 20px; }
.chat-side h4 { margin: 14px 12px 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.chat-side a { display: flex; align-items: baseline; gap: 4px; padding: 6px 12px; cursor: pointer; font-size: 13.5px; }
.chat-side a:hover { background: #f6f8fb; } .chat-side a.on { background: var(--sel); font-weight: 600; }
.chat-side a span.muted { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbadge { margin-left: auto; background: #e5484d; color: #fff; font-size: 11px; border-radius: 9px; padding: 0 6px; }
.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #f6f8fb; }
.chat-head { display: flex; align-items: center; gap: 6px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.chat-msgs { flex: 1; overflow: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 640px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; align-self: flex-start; }
.msg.mine { align-self: flex-end; background: #e8f0fe; border-color: #c9dafc; }
.msg.mgr { border-left: 4px solid #f26a1b; }
.msg .mh { margin-bottom: 3px; }
.mimg { display: block; max-width: 320px; max-height: 260px; border-radius: 6px; margin-top: 6px; cursor: zoom-in; }
.mfile { display: inline-block; margin-top: 6px; cursor: pointer; text-decoration: underline; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; padding: 10px 14px; background: #fff; border-top: 1px solid var(--line); }
.chat-input textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; }

.lights { display: flex; align-items: center; gap: 5px; font-size: 11px; opacity: .9; margin-right: 6px; }
.lights small { margin-right: 8px; }
.st { width: 10px; height: 10px; border-radius: 50%; background: #9aa5b5; display: inline-block; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.st.ok { background: #2fbf71; } .st.bad { background: #e5484d; } .st.off { background: #9aa5b5; }

/* IMPA code quick search in the header */
.impa-box { position: relative; display: flex; align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 18px; padding: 0 4px 0 12px; height: 34px; margin-left: 10px; }
.impa-box b { font-size: 11.5px; letter-spacing: .06em; color: #f8a26a; margin-right: 6px; }
.impa-box input { background: none; border: 0; outline: none; color: #fff; width: 150px; font: 600 14px/1 ui-monospace, Consolas, monospace; }
.impa-box input::placeholder { color: rgba(255,255,255,.55); font-weight: 400; }
.impa-dd { position: absolute; top: 38px; left: 0; width: 460px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 90; display: none; max-height: 380px; overflow: auto; }
.impa-dd.open { display: block; }
.impa-dd div { padding: 7px 12px; cursor: pointer; font-size: 13px; display: flex; gap: 10px; border-bottom: 1px solid #f0f2f6; }
.impa-dd div.act, .impa-dd div:hover { background: var(--sel); }
.impa-dd .c { font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: var(--navy); white-space: nowrap; }
.impa-dd .note { color: var(--muted); cursor: default; }

.impa-box.nav { background: #fff; border-color: var(--line); margin: auto 0 auto 14px; height: 32px; align-self: center; }
.impa-box.nav b { color: #f26a1b; }
.impa-box.nav input { color: var(--navy); }
.impa-box.nav input::placeholder { color: var(--muted); }
.impa-box.nav .impa-dd { top: 36px; }
.bell .plus { position: absolute; top: -2px; right: -2px; background: #f26a1b; color: #fff; font-size: 12px; font-weight: 800; border-radius: 9px; width: 16px; height: 16px; line-height: 16px; text-align: center; padding: 0; min-width: 0; }

/* items: category tiles */
.catgrid-wrap { padding: 16px 20px 40px; }
.cat-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 12px; font-size: 14px; }
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cattile { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font: inherit; color: var(--ink); }
.cattile:hover { border-color: #f26a1b; box-shadow: 0 4px 14px rgba(15,25,40,.08); }
.cattile b { font-size: 14px; } .cattile span { font-size: 12px; color: var(--muted); } .cattile i { color: #18794e; font-style: normal; font-weight: 600; }

.spec-nav { display: flex; align-items: center; gap: 6px; padding: 0 0 8px; }
.spec-nav span { flex: 1; text-align: center; }
.spec-nav .btn { min-width: 38px; }
.spec-img img { max-width: 100%; }

.spec-scroll { overflow: auto; }
.spec-img.strip { white-space: nowrap; width: max-content; }
.spec-img.strip .col { position: relative; display: inline-block; vertical-align: top; }
.spec-img.strip img { display: block; width: auto; max-width: none; height: auto; }
.spec-img.strip.fit { width: 100%; }
.spec-img.strip.fit .col { width: 50%; } .spec-img.strip.fit img { width: 100%; }

.find-box input { width: 230px; font-family: inherit; font-weight: 500; }
.find-box .impa-dd { width: 560px; right: 0; left: auto; }
.find-box .impa-dd .c { min-width: 52px; }

/* ---------- form dialog ---------- */
.ask-bg { position: fixed; inset: 0; background: rgba(14, 27, 64, .35); display: flex; align-items: center; justify-content: center; z-index: 200; }
.ask { background: #fff; border-radius: 12px; padding: 18px 20px; width: min(460px, 92vw); box-shadow: 0 12px 40px rgba(0, 0, 0, .25); display: flex; flex-direction: column; gap: 10px; }
.ask h3 { margin: 0; font-size: 17px; } .ask-t { color: #4a5568; font-size: 13px; }
.ask label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: #4a5568; }
.ask input, .ask select, .ask textarea { font: inherit; font-size: 14px; font-weight: 400; padding: 7px 9px; border: 1px solid #cfd7e2; border-radius: 7px; color: #111; }
.ask .bad { border-color: #c0392b; background: #fff5f5; }
.ask-b { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ---------- home desk (role based) ---------- */
.desk { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.desk-hi { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.desk-hi .t { font-size: 21px; font-weight: 700; } .desk-hi .s { color: #5b6678; }
.desk-hi .grow { flex: 1; }
.concl { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.cc { background: #fff; border: 1px solid #dfe5ee; border-radius: 12px; padding: 12px 14px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.cc:hover { border-color: #b9c4d2; box-shadow: 0 2px 8px rgba(14, 27, 64, .06); }
.cc .l { font-size: 12px; color: #5b6678; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.cc .v { font-size: 24px; font-weight: 800; margin: 2px 0; color: var(--navy); }
.cc .s { font-size: 12.5px; color: #5b6678; }
.cc.hot { border-color: #f5b48a; background: #fff8f3; } .cc.hot .v { color: #d2560f; }
.cc.good .v { color: #1f8f4e; } .cc.bad .v { color: #c0392b; }
.dsec { background: #fff; border: 1px solid #dfe5ee; border-radius: 12px; padding: 12px 14px; }
.dsec > h2 { font-size: 15px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.dsec > h2 .n { background: #eef2f7; border-radius: 10px; padding: 0 8px; font-size: 12px; color: #4a5568; }
.dsec > h2 .grow { flex: 1; } .dsec > h2 .lnk { font-size: 12.5px; font-weight: 500; color: var(--navy-2); cursor: pointer; }
.dgrid2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .dgrid2 { grid-template-columns: 1fr; } }
.dec { border: 1px solid #e3e8f0; border-left: 4px solid #f2a33a; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.dec.budget { border-left-color: #2b7bd6; } .dec.release { border-left-color: #2fbf71; }
.dec .top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; }
.dec .who { font-weight: 700; font-size: 14.5px; } .dec .meta { color: #5b6678; font-size: 12.5px; }
.dec .grow { flex: 1; }
.dec .big { font-size: 16px; font-weight: 800; white-space: nowrap; }
.dec .line { margin-top: 4px; font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; }
.dec .pos { color: #1f8f4e; font-weight: 700; } .dec .neg { color: #c0392b; font-weight: 700; } .dec .warn { color: #a8530c; }
.dec .acts { display: flex; gap: 6px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.dec .acts input { flex: 1; min-width: 160px; font: inherit; padding: 6px 9px; border: 1px solid #cfd7e2; border-radius: 7px; }
.dec .ok { background: #1f8f4e; border-color: #1f8f4e; color: #fff; } .dec .ok:hover { background: #187a42; }
.dec .cmt { font-size: 12.5px; color: #4a5568; background: #f6f8fb; border-radius: 6px; padding: 4px 8px; margin-top: 6px; }
.nx { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid #eef1f5; cursor: pointer; }
.nx:last-child { border-bottom: 0; } .nx:hover { background: #f8fafc; }
.nx .c { flex: 1; min-width: 0; } .nx .c b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx .c span { font-size: 12.5px; color: #5b6678; }
.nx .go { white-space: nowrap; }
.nx .flag { font-size: 12px; padding: 1px 7px; border-radius: 9px; background: #fdecec; color: #b03a2e; white-space: nowrap; }
.nx .flag.w { background: #fff3e0; color: #a8530c; } .nx .flag.g { background: #e8f7ee; color: #1f8f4e; } .nx .flag.b { background: #eaf2fc; color: #22609f; }
.risk { display: flex; gap: 8px; padding: 6px 2px; border-bottom: 1px solid #eef1f5; cursor: pointer; font-size: 13px; align-items: baseline; }
.risk:last-child { border-bottom: 0; } .risk:hover { background: #f8fafc; } .risk i { font-style: normal; color: #a8530c; }
.team td, .team th { padding: 5px 6px; font-size: 13px; border-bottom: 1px solid #eef1f5; text-align: left; } .team th { color: #5b6678; font-weight: 600; font-size: 12px; }
.team td.n, .team th.n { text-align: right; } .team { width: 100%; border-collapse: collapse; }
.qstart { display: flex; gap: 8px; flex-wrap: wrap; }
.empty-ok { color: #5b6678; font-size: 13px; padding: 6px 2px; }
details.fullov > summary { cursor: pointer; font-weight: 700; color: var(--navy-2); padding: 8px 2px; list-style: none; }
details.fullov > summary::before { content: '▸ '; } details.fullov[open] > summary::before { content: '▾ '; }

/* ---------- job page: conclusion first ---------- */
.jsum { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.jsum .box { flex: 1; min-width: 150px; background: #f6f8fb; border-radius: 10px; padding: 8px 12px; }
.jsum .box .l { font-size: 11.5px; color: #5b6678; text-transform: uppercase; font-weight: 600; letter-spacing: .03em; }
.jsum .box .v { font-size: 18px; font-weight: 800; color: var(--navy); }
.jsum .box .v.pos { color: #1f8f4e; } .jsum .box .v.neg { color: #c0392b; }
.jsum .box .s { font-size: 12px; color: #5b6678; }
.jnext { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fff8f3; border: 1px solid #f8c9a8; }
.jnext .who { font-size: 12px; font-weight: 700; color: #a8530c; text-transform: uppercase; letter-spacing: .03em; }
.jnext .what { font-weight: 700; font-size: 15px; }
.jdec { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fffaf0; border: 1px solid #f2d39b; }
.jdec .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.jdec input { flex: 1; min-width: 200px; font: inherit; padding: 7px 9px; border: 1px solid #cfd7e2; border-radius: 7px; }
.jdec .ok { background: #1f8f4e; border-color: #1f8f4e; color: #fff; }
details.jd { background: #fff; border: 1px solid #dfe5ee; border-radius: 12px; padding: 0 14px; }
details.jd > summary { cursor: pointer; padding: 11px 0; font-weight: 700; font-size: 15px; list-style: none; display: flex; gap: 8px; align-items: center; }
details.jd > summary::before { content: '▸'; color: #8a94a6; } details.jd[open] > summary::before { content: '▾'; }
details.jd > summary .s { font-weight: 400; font-size: 12.5px; color: #5b6678; }
details.jd[open] { padding-bottom: 12px; }

/* ---------- job case: documents open on top of the job, not in the Documents section ---------- */
.frames { position: relative; }
.casedoc { position: absolute; inset: 0; z-index: 6; display: none; flex-direction: column; background: var(--bg); }
.casedoc.open { display: flex; }
.casebar { display: none !important; }
.casebar-old { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: #fff8f3; border-bottom: 2px solid #f8c9a8; }
.casebar b { font-size: 15px; }
.frames .casedoc iframe { display: block; flex: 1; border: 0; width: 100%; height: 100%; }
html.casemode .topbar, html.casemode .dlist { display: none !important; }
.costing tr.na-row td { background: #fbf6f6; color: #8a8f99; }

/* ---------- email, Outlook style ---------- */
.mail-folders a { display: flex; align-items: center; gap: 6px; }
.mail-folders a span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-folders a .fcount { font-size: 12px; color: var(--blue, #2b7bd6); font-weight: 700; }
.mail-folders a.drop { background: #fff3e0; outline: 2px dashed #f26a1b; }
.mgroup { position: sticky; top: 0; z-index: 1; background: #f3f6fa; color: #5b6678; font-size: 12px; font-weight: 700; padding: 4px 14px; border-bottom: 1px solid var(--line-2); }
.mrow { position: relative; }
.mrow .ico { font-size: 12px; color: #6b7686; }
.mrow.flagged { background: #fff8f0; } .mrow.flagged .l2::before { content: '⚑ '; color: #d2560f; }
.mrow .qa { position: absolute; right: 8px; bottom: 6px; display: none; gap: 2px; background: inherit; }
.mrow:hover .qa { display: flex; }
.mrow .qa i { font-style: normal; cursor: pointer; padding: 1px 5px; border-radius: 4px; font-size: 13px; background: #fff; border: 1px solid var(--line); }
.mrow .qa i:hover { border-color: #9cb4d4; background: #eef4fb; }
.mread-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--line); background: #fafbfd; }
.mread-tools .sep { width: 1px; height: 22px; background: var(--line); margin: 0 2px; }
.mread-tools select { height: 28px; font-size: 13px; }
.mread-tools .btn.on { background: #fff3e0; border-color: #f5b48a; color: #a8530c; }
.avatar { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: #1d3f7a; color: #fff; align-items: center; justify-content: center; font-weight: 700; margin-right: 6px; vertical-align: middle; }
.nbadge { display: inline-block; margin-left: 5px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #e53935; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* currencies in the costing */
.fxbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: #eef6ff; border: 1px solid #cfe0f7; border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; font-size: 13px; }
.fxbar select { height: 28px; }
.fxrate { display: inline-flex; gap: 4px; align-items: center; background: #fff; border: 1px solid #cfe0f7; border-radius: 6px; padding: 2px 8px; font-weight: 600; }
.fxrate a { font-weight: 400; font-size: 12px; }
select.ccy { width: 58px; margin-left: 3px; font-size: 12px; height: 26px; padding: 0 2px; }

/* costing: full width, no spinner arrows, tools under the prices */
.costwrap { margin: 0 0 14px; } .costwrap details.jd { overflow-x: auto; }
table.costing input[type=number]::-webkit-inner-spin-button, table.costing input[type=number]::-webkit-outer-spin-button,
.fxbar input[type=number]::-webkit-inner-spin-button, .fxbar input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
table.costing input[type=number], .fxbar input[type=number] { -moz-appearance: textfield; appearance: textfield; }
table.costing input:focus, table.costing select:focus { outline: 2px solid #f26a1b; outline-offset: 0; background: #fff8f3; }
.actbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: -6px 0 14px; padding: 10px 12px; background: #fff; border: 1px solid #dfe5ee; border-radius: 12px; }

/* ---- case review (manager / finance) and finished case file ---- */
.rv-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 18px; margin-top: 10px; align-items: start; }
@media (max-width: 1000px) { .rv-grid { grid-template-columns: 1fr; } }
.glance { display: flex; flex-direction: column; border: 1px solid #e6ebf2; border-radius: 10px; overflow: hidden; }
.glance .g { display: grid; grid-template-columns: 28px 110px minmax(0, 1fr); gap: 6px; padding: 8px 10px; border-bottom: 1px solid #eef1f5; font-size: 13.5px; align-items: baseline; }
.glance .g:last-child { border-bottom: 0; } .glance .g:nth-child(odd) { background: #fafbfd; }
.glance .i { font-size: 15px; } .glance .l { color: #5b6678; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.glance .pos, .rv-dec .pos { color: #1f8f4e; } .glance .neg, .rv-dec .neg { color: #c0392b; } .glance .warn, .rv-dec .warn { color: #a8530c; }
.rv-dec { border: 2px solid #f5b48a; background: #fffaf6; border-radius: 12px; padding: 12px 14px; }
.rv-dec .t { font-weight: 800; font-size: 16px; color: var(--navy); }
.rv-dec textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 7px 9px; border: 1px solid #cfd7e2; border-radius: 8px; margin-top: 4px; }
.rv-dec .acts { display: flex; gap: 6px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.rv-dec .ok, .btn.ok { background: #1f8f4e; border-color: #1f8f4e; color: #fff; }
.verdict { display: inline-block; padding: 3px 9px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.verdict.ok { background: #e8f7ee; color: #1f8f4e; } .verdict.warn { background: #fff3e0; color: #a8530c; } .verdict.bad { background: #fdecec; color: #b03a2e; }
.rv-c { padding: 6px 0; border-bottom: 1px solid #eef1f5; font-size: 13px; } .rv-c:last-child { border-bottom: 0; }
.tag.b { background: #eaf2fc; color: #22609f; }
.advice { margin-top: 6px; line-height: 1.9; } .advice b { color: #1d2b4f; }
.altbox { margin-top: 4px; font-size: 12px; background: #f3f0ff; border-left: 3px solid #7b61c9; padding: 3px 7px; border-radius: 4px; }
a.altadd { font-size: 11.5px; color: #7b61c9; opacity: .7; text-decoration: none; } a.altadd:hover { opacity: 1; text-decoration: underline; }
.offerbar { align-items: center; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #dfe5ee; }
.vatpill { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border: 1px solid #c9d0da; border-radius: 16px; font-weight: 600; cursor: pointer; background: #fff; }
.vatpill.on { background: #e8f7ee; border-color: #2fbf71; color: #1f8f4e; }

/* ===== Email – Outlook-style ribbon, list, menus, compose ===== */
.mail-ribbon { display: flex; align-items: stretch; gap: 0; padding: 4px 8px; background: #f6f7f9; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mail-ribbon .rgrp { display: flex; align-items: stretch; gap: 2px; padding: 0 6px; border-right: 1px solid #e2e6ec; }
.mail-ribbon .rgrp-end { border-right: 0; align-items: center; gap: 8px; }
.mail-ribbon .rb, .mail-ribbon .rbig { border: 1px solid transparent; background: none; border-radius: 4px; padding: 3px 7px; font-size: 12px; color: #253246; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 52px; line-height: 1.15; }
.mail-ribbon .rb i, .mail-ribbon .rbig i { font-style: normal; font-size: 17px; line-height: 1.2; }
.mail-ribbon .rb:hover, .mail-ribbon .rbig:hover { background: #e7edf6; border-color: #cbd8ea; }
.mail-ribbon .rbig.primary { background: var(--blue); color: #fff; padding: 4px 12px; }
.mail-ribbon .rbig.primary:hover { background: #127db0; }
.mail-ribbon #mAcct { max-width: 290px; height: 30px; font-size: 13px; }
.mail-listwrap { width: 400px; flex: 0 0 400px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #fff; min-height: 0; }
.mail-listwrap .mail-list { width: auto; flex: 1; border-right: 0; }
.mail-search { padding: 8px 10px 4px; } .mail-search input { width: 100%; }
.mail-filter { display: flex; align-items: center; gap: 2px; padding: 2px 10px 6px; border-bottom: 1px solid var(--line); font-size: 13px; }
.mail-filter a { padding: 3px 8px; border-radius: 4px; cursor: pointer; color: #4a5568; white-space: nowrap; }
.mail-filter a.on { color: var(--blue); font-weight: 700; box-shadow: inset 0 -2px 0 var(--blue); border-radius: 0; }
.mail-filter select { border: 0; background: none; font-size: 12.5px; color: #4a5568; }
.mail-filter #mDir { font-weight: 700; }
.mail-selbar { display: flex; gap: 10px; align-items: center; padding: 6px 12px; background: #eaf3fd; border-bottom: 1px solid #cfe0f5; font-size: 13px; }
.mail-selbar a { cursor: pointer; color: var(--blue); }
.mail-status { display: flex; gap: 10px; padding: 3px 12px; font-size: 12px; color: #5b6678; background: #f6f7f9; border-top: 1px solid var(--line); }
.mrow { padding-left: 30px; }
.mrow .mchk { position: absolute; left: 8px; top: 9px; font-size: 14px; color: #9aa7b8; cursor: pointer; opacity: 0; }
.mrow:hover .mchk, .mrow.sel .mchk { opacity: 1; }
.mrow.sel { background: #cfe3fa; } .mrow.cur.sel { box-shadow: inset 3px 0 0 var(--blue); }
.mrow .l3 { font-size: 12.5px; color: #7a8698; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.mrow .draftw { color: #c0392b; }
.prio { color: #d0021b; font-weight: 700; }
.mcats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.mcats span { font-size: 11px; padding: 0 7px; border-radius: 9px; background: color-mix(in srgb, var(--c) 18%, #fff); color: color-mix(in srgb, var(--c) 75%, #000); border: 1px solid color-mix(in srgb, var(--c) 45%, #fff); }
.mail-folders .fhead { font-weight: 700; font-size: 13px; padding: 4px 14px 6px; color: #253246; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-folders .fsep { font-size: 11.5px; color: #7a8698; text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px 3px; }
.mail-folders .fnew { color: var(--blue); font-size: 12.5px; margin-top: 6px; }
.mail-folders { width: 190px; flex-basis: 190px; }
/* reading pane: right / bottom / off */
.mail-cols.pane-bottom { display: grid; grid-template-columns: 190px 1fr; grid-template-rows: minmax(0, 42%) minmax(0, 1fr); }
.mail-cols.pane-bottom .mail-folders { grid-row: 1 / 3; }
.mail-cols.pane-bottom .mail-listwrap { width: auto; border-right: 0; border-bottom: 2px solid var(--line); }
.mail-cols.pane-off .mail-listwrap { flex: 1; width: auto; }
.mail-cols.pane-off .mail-read { display: none; }
.mail-cols.pane-off.reading .mail-listwrap { display: none; } .mail-cols.pane-off.reading .mail-read { display: flex; }
.mread-tools .mback { display: none; } .mail-cols.pane-off .mread-tools .mback { display: inline-flex; }
/* right-click menus */
.ctxm { position: fixed; z-index: 2000; min-width: 210px; background: #fff; border: 1px solid #c9d2de; border-radius: 6px; box-shadow: 0 8px 28px rgba(15, 25, 40, .22); padding: 4px 0; font-size: 13px; }
.ctxm .ctxm { position: absolute; display: none; top: 0; }
.ctxm .ci { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.ctxm .ci:hover { background: #e8f0fc; } .ctxm .ci:hover > .ctxm { display: block; }
.ctxm .ci.dis { color: #aab3c0; cursor: default; } .ctxm .ci.dis:hover { background: none; }
.ctxm .ci .ic { width: 20px; text-align: center; } .ctxm .ci .k { margin-left: auto; padding-left: 18px; color: #8a96a8; font-size: 11.5px; }
.ctxm hr { border: 0; border-top: 1px solid #e6eaf0; margin: 4px 0; }
/* compose window */
#composeModal .modal { width: min(980px, 96vw); max-height: 94vh; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
#composeModal .modal.dropping { outline: 3px dashed var(--orange); outline-offset: -6px; }
.cmp-title { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: #f6f7f9; border-bottom: 1px solid var(--line); }
.cmp-title #cX { font-size: 16px; }
.cmp-head { display: flex; gap: 12px; padding: 10px 16px 4px; }
.cmp-send { width: 72px; font-size: 14px; line-height: 1.3; }
.cmp-fields { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cmp-fields label { display: flex; align-items: center; gap: 8px; flex-direction: row; font-size: 13px; color: #4a5568; }
.cmp-fields label > span:first-child { width: 58px; flex: 0 0 58px; }
.cmp-fields input, .cmp-fields select { flex: 1; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 5px 2px; font-size: 14px; background: none; }
.cmp-fields input:focus { border-bottom-color: var(--blue); outline: 0; }
.cmp-tools { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; padding: 6px 16px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: #fbfcfd; }
.cmp-tools button, .cmp-tools .clr { border: 1px solid transparent; background: none; border-radius: 4px; padding: 3px 7px; font-size: 13px; cursor: pointer; color: #253246; min-width: 28px; }
.cmp-tools button:hover, .cmp-tools .clr:hover { background: #e7edf6; border-color: #cbd8ea; }
.cmp-tools button.on { background: #fff3e0; border-color: #f5b48a; }
.cmp-tools select { height: 28px; font-size: 13px; border: 1px solid var(--line); border-radius: 4px; }
.cmp-tools .clr { position: relative; font-weight: 700; color: #c00000; } .cmp-tools .clr.hl { color: inherit; }
.cmp-tools .clr input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cmp-tools .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.cmp-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; } .cmp-files:not(:empty) { padding: 8px 16px 0; }
.cmp-ed { flex: 1; min-height: 300px; overflow: auto; padding: 14px 18px; font-family: Calibri, Arial, sans-serif; font-size: 11pt; line-height: 1.35; outline: none; }
.cmp-ed .oq { color: #333; } .cmp-ed img { max-width: 100%; }
#composeModal .actions { padding: 8px 16px 12px; border-top: 1px solid var(--line-2); margin: 0; }
#composeModal #cErr { padding: 0 16px; }
.mail-selbar a, .mail-selbar b { white-space: nowrap; }
.mail-filter #mFilt { color: #4a5568; } .mail-filter #mFilt.on { color: var(--blue); font-weight: 700; }
/* folder pane with all mailboxes (like Outlook) */
.mail-folders { width: 240px; flex-basis: 240px; padding-top: 4px; }
.mail-cols.pane-bottom { grid-template-columns: 240px 1fr; }
.mail-folders .fgrp { margin-bottom: 6px; }
.mail-folders .fhead2 { font-size: 13.5px; font-weight: 600; color: #253246; padding: 6px 10px; cursor: pointer; user-select: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-folders .fhead2:hover { background: #f1f4f8; }
.mail-folders .fhead2.acct { margin-top: 6px; border-top: 1px solid var(--line-2); padding-top: 9px; }
.mail-folders .fhead2.acct.cur { color: var(--blue); }
.mail-folders a { padding-top: 5px; padding-bottom: 5px; font-size: 13px; }
.mail-folders a.hasun span { font-weight: 700; }
.mail-folders a small { font-weight: 400; }
/* suppliers invoices / receipts */
.rc-drop { border-radius: 8px; } .rc-drop.over { outline: 2px dashed var(--orange); outline-offset: 4px; background: #fff8f0; }
.rc-table td { vertical-align: top; } .rc-table input, .rc-table select { font-size: 12.5px; }
.rc-job { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; background: #fff; }
.rc-jh { margin-bottom: 6px; }
/* editable item description in the job's items table */
textarea.dedit { width: 100%; min-width: 220px; border: 1px solid transparent; background: transparent; resize: none; overflow: hidden; font: inherit; color: inherit; padding: 2px 4px; margin: -2px -4px; border-radius: 4px; line-height: 1.35; display: block; }
textarea.dedit:hover { border-color: #d5deea; background: #fbfcfe; }
textarea.dedit:focus { border-color: #2f6fde; background: #fff; outline: none; box-shadow: 0 0 0 2px #2f6fde22; }
.impa-d { font-size: 11.5px; color: #5b6b82; margin-top: 2px; line-height: 1.3; }

/* ================= Odoo-style form: control panel · header (buttons + status bar) · sheet · tabs ================= */
.editor { background: #eef1f5; padding: 0 0 40px !important; }
.o-cp { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 8px; padding: 9px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.o-bc { display: flex; align-items: center; gap: 6px; font-size: 16px; min-width: 0; }
.o-bc a { color: #1d6fb8; cursor: pointer; text-decoration: none; white-space: nowrap; } .o-bc a:hover { text-decoration: underline; }
.o-bc span { color: #9aa6b7; } .o-bc b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-state { font-size: 12px; margin-left: 6px; white-space: nowrap; } .o-state.ok { color: #1f8f4e; } .o-state.dirty { color: #b4531a; font-weight: 600; }
.o-hdr { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.o-btns { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.o-status { display: flex; margin-left: auto; }
.o-status button { position: relative; border: 1px solid var(--line); background: #fff; color: #5b6678; font-size: 12.5px; padding: 6px 14px 6px 20px; margin-left: -1px; cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%, 9px 50%); white-space: nowrap; }
.o-status button:first-child { clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%); padding-left: 14px; border-radius: 4px 0 0 4px; }
.o-status button:hover { background: #f3f6fa; }
.o-status button.on { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 600; }
.o-sheet { position: relative; max-width: 1180px; margin: 16px auto 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 1px 3px rgba(16,32,60,.06); padding: 18px 26px 22px; }
.o-smart { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0; margin: -18px -26px 10px; border-bottom: 1px solid var(--line-2); min-height: 0; }
.o-smart:empty { display: none; }
.o-smart button { display: flex; align-items: center; gap: 8px; border: 0; border-left: 1px solid var(--line-2); background: #fff; padding: 7px 14px; cursor: pointer; text-align: left; min-width: 120px; }
.o-smart button:hover { background: #f6f8fb; }
.o-smart button span:last-child { display: flex; flex-direction: column; line-height: 1.15; } .o-smart b { font-size: 13px; } .o-smart i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.o-smart .ico { font-size: 18px; }
.o-title { margin: 6px 0 14px; } .o-title h1 { margin: 4px 0 0; font-size: 26px; color: var(--ink); }
.o-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.o-group label { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 8px; padding: 3px 0; font-size: 13.5px; }
.o-group label > span:first-child { font-weight: 600; color: #3c4858; }
.o-group input, .o-group select, .o-subject input { width: 100%; min-width: 0; border: 0; border-bottom: 1px solid #d5dce6; border-radius: 0; padding: 5px 2px; font-size: 14px; background: transparent; color: var(--ink); }
.o-group input:hover, .o-group select:hover, .o-subject input:hover { border-bottom-color: #8fa3bd; }
.o-group input:focus, .o-group select:focus, .o-subject input:focus { outline: none; border-bottom: 2px solid #1d6fb8; }
.o-inl { display: flex; gap: 6px; align-items: center; } .o-inl select { flex: 1; }
.o-subject { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 8px; margin-top: 4px; font-size: 13.5px; } .o-subject > span { font-weight: 600; color: #3c4858; }
.o-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 18px 0 12px; }
.o-tab { border: 1px solid transparent; border-bottom: 0; background: none; padding: 8px 16px; font-size: 14px; color: #4a5668; cursor: pointer; border-radius: 6px 6px 0 0; margin-bottom: -1px; }
.o-tab:hover { color: var(--ink); background: #f6f8fb; }
.o-tab.on { background: #fff; border-color: var(--line); color: var(--ink); font-weight: 600; }
.o-tab i { font-style: normal; font-size: 11.5px; background: #e8edf4; border-radius: 9px; padding: 1px 7px; margin-left: 4px; color: #44536b; }
.o-itembar { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.o-dd { position: relative; display: inline-block; }
.o-ddm { display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 40; min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 4px 0; }
.o-ddm.right { left: auto; right: 0; }
.o-ddm.open { display: block; }
.o-ddm button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 14px; font-size: 13.5px; cursor: pointer; color: var(--ink); }
.o-ddm button:hover { background: #f1f5fa; } .o-ddm button.danger { color: var(--danger); }
@media (max-width: 900px) { .o-groups { grid-template-columns: 1fr; } .o-group label, .o-subject { grid-template-columns: 110px 1fr; } .o-sheet { margin: 8px; padding: 14px; } .o-smart { margin: -14px -14px 10px; } }
/* ================= job page: breadcrumb · smart buttons · tabs ================= */
.filters.j-head { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 14px; }
.filters.j-head #jClose { border: 0; background: none; color: #1d6fb8; font-size: 16px; padding: 0 2px; box-shadow: none; }
.filters.j-head #jClose:hover { text-decoration: underline; }
.filters.j-head #jClose::after { content: ' /'; color: #9aa6b7; }
.j-smart { display: flex; justify-content: flex-end; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.j-smart button { display: flex; align-items: center; gap: 8px; border: 0; border-left: 1px solid var(--line-2); background: #fff; padding: 7px 14px; cursor: pointer; text-align: left; min-width: 120px; }
.j-smart button:hover { background: #f6f8fb; }
.j-smart button span:last-child { display: flex; flex-direction: column; line-height: 1.15; } .j-smart b { font-size: 13px; } .j-smart i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.j-smart .ico { font-size: 18px; }
.j-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 2px solid var(--line); margin: 14px 0 12px; position: sticky; top: 0; z-index: 5; background: var(--bg); padding-top: 4px; }
.j-tabs button { border: 0; background: none; padding: 10px 18px; font-size: 14.5px; color: #4a5668; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.j-tabs button:hover { color: var(--ink); background: #fff; }
.j-tabs button.on { color: var(--navy); font-weight: 700; border-bottom-color: var(--orange); background: #fff; }
.j-tabs i { font-style: normal; font-size: 11.5px; background: #e8edf4; border-radius: 9px; padding: 1px 7px; margin-left: 4px; color: #44536b; }
.j-pane { display: flex; flex-direction: column; gap: 12px; }
.j-pane > * { margin-top: 0 !important; }
details.jd.in-tab > summary { pointer-events: none; list-style: none; } details.jd.in-tab > summary::-webkit-details-marker { display: none; }
details.jd.in-tab > summary a, details.jd.in-tab > summary button, details.jd.in-tab > summary input, details.jd.in-tab > summary label { pointer-events: auto; }
.j-smart.in-card { margin: -14px -16px 12px; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 10px 10px 0 0; }

.seg button i { font-style: normal; opacity: .7; margin-left: 3px; font-size: 11px; }
.jdone { margin-top: 6px; width: 100%; }
.dvbox { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; }
.dvbox > summary { cursor: pointer; font-weight: 600; }
.dvgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
@media (max-width: 800px) { .dvgrid { grid-template-columns: 1fr; } }
.dvc { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.dvc h4 { margin: 0 0 6px; }
.dvstages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; text-align: center; }
.dvstages div { background: #f4f6f9; border-radius: 6px; padding: 4px 2px; }
.dvstages b { display: block; font-size: 16px; }
.dvstages i { font-style: normal; font-size: 10.5px; color: var(--muted, #667); }
.dvops { width: 100%; font-size: 12.5px; border-collapse: collapse; }
.dvops td { padding: 2px 4px; border-top: 1px solid var(--line); }

/* ===== Look & feel pass: calmer background, soft depth, colour that says "where am I / what is mine" ===== */
body { background: linear-gradient(180deg, #eef2f8 0, var(--bg) 220px); }
.btn { border-radius: 8px; transition: background .15s, border-color .15s, box-shadow .15s, transform .1s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #f27a2c, #e8611a); box-shadow: 0 1px 2px rgba(232, 97, 26, .35); }
.btn.primary:hover { background: linear-gradient(180deg, #ee6f1d, #cf5513); box-shadow: 0 3px 8px rgba(232, 97, 26, .3); }
/* greeting banner */
.desk-hi { background: linear-gradient(110deg, var(--navy) 0, #1d3f7a 70%, #1593c9 130%); color: #fff; border-radius: 14px; padding: 16px 20px; align-items: center; box-shadow: 0 4px 14px rgba(14, 27, 64, .18); }
.desk-hi .t { font-size: 23px; } .desk-hi .s { color: rgba(255, 255, 255, .78); }
.desk-hi .btn { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: #fff; }
/* KPI tiles with an accent edge */
.cc { border-top: 3px solid #cfd8e6; box-shadow: 0 1px 3px rgba(14, 27, 64, .05); transition: transform .12s, box-shadow .12s; }
.cc:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(14, 27, 64, .1); }
.cc.hot { border-top-color: #f26a1b; } .cc.good { border-top-color: #1f8f4e; } .cc.bad { border-top-color: #c0392b; }
.cc:nth-child(2):not(.hot):not(.good):not(.bad) { border-top-color: #1593c9; }
.cc:nth-child(3):not(.hot):not(.good):not(.bad) { border-top-color: #7a5af8; }
.dsec, .panel, .card { box-shadow: 0 1px 3px rgba(14, 27, 64, .05); }
.nx { border-radius: 8px; padding: 9px 8px; }
/* job pipeline: every column has its colour, every card says whose turn it is */
.board .lane { border-top: 4px solid #cbd5e4; background: #eef2f8; }
.board.g5 .lane:nth-child(1) { border-top-color: #1593c9; }
.board.g5 .lane:nth-child(2) { border-top-color: #f2a33a; }
.board.g5 .lane:nth-child(3) { border-top-color: #7a5af8; }
.board.g5 .lane:nth-child(4) { border-top-color: #e8611a; }
.board.g5 .lane:nth-child(5) { border-top-color: #1f8f4e; }
.board .lane h4 span { background: #fff; border-radius: 10px; padding: 0 8px; color: #44516a; font-weight: 700; }
.board .jc { border-left: 4px solid #cfd6e2; box-shadow: 0 1px 2px rgba(14, 27, 64, .06); transition: transform .12s, box-shadow .12s, border-color .12s; }
.board .jc:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(14, 27, 64, .12); }
.board .jc:has(.nxs.o) { border-left-color: #f26a1b; }
.board .jc:has(.tag.r) { border-left-color: #c0392b; }
.jc .nxs.o { background: #fff3ea; border-radius: 6px; padding: 3px 6px; }
.jdone { background: linear-gradient(180deg, #2fa866, #1f8f4e) !important; border-color: #1f8f4e !important; color: #fff !important; font-weight: 600; box-shadow: 0 1px 3px rgba(31, 143, 78, .4); }
.jdone:hover { background: linear-gradient(180deg, #28995c, #187a42) !important; }
.seg { box-shadow: 0 1px 2px rgba(14, 27, 64, .06); border-radius: 8px; }
.seg button.on { background: linear-gradient(180deg, #1d3f7a, var(--navy)); }
.dvbox { box-shadow: 0 1px 3px rgba(14, 27, 64, .06); }
.dvc:nth-child(1) { border-top: 3px solid #1593c9; } .dvc:nth-child(2) { border-top: 3px solid #e8611a; }
.dvstages div { border: 1px solid #e3e8f0; background: #fff; }
.tag { border-radius: 8px; }
/* inside a job: "✓ Step done" and clickable stages */
.btn.jstep { background: linear-gradient(180deg, #2fa866, #1f8f4e); border-color: #1f8f4e; color: #fff; font-weight: 600; box-shadow: 0 1px 3px rgba(31, 143, 78, .4); margin-left: 8px; }
.btn.jstep:hover { background: linear-gradient(180deg, #28995c, #187a42); }
.steps.can span[data-goto] { cursor: pointer; transition: background .12s, color .12s, box-shadow .12s; }
.steps.can span[data-goto]:hover { background: #1f8f4e; color: #fff; box-shadow: 0 2px 6px rgba(31, 143, 78, .35); }
.steps.can span.done[data-goto]:hover { background: #8a94a6; }

/* =====================================================================
   APP SHELL 2026 – left sidebar (like Odoo / HubSpot / Zoho), slim white top bar
   ===================================================================== */
:root { --navw: 236px; --tbh: 58px; --ring: 0 0 0 3px rgba(21, 147, 201, .18); --focus: #1593c9; }
html.shell body { padding-left: var(--navw); transition: padding-left .18s; }
html.shell body.navmin { --navw: 68px; }
@media (max-width: 1280px) { html.shell body:not(.navfull) { --navw: 68px; } }

/* sidebar */
html.shell .mainnav { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: var(--navw); flex-direction: column; gap: 2px; padding: 12px 10px 10px;
  background: linear-gradient(180deg, #0e1b40 0%, #12285a 100%); border: 0; overflow-y: auto; overflow-x: hidden; transition: width .18s; }
.mainnav .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; margin: 0 0 6px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 0; min-width: 0; }
.mainnav .brand img { height: 34px; flex: 0 0 auto; }
.mainnav .brand b { font-size: 15px; letter-spacing: .12em; }
.mainnav .brand span { font-size: 10.5px; opacity: .65; letter-spacing: .04em; white-space: nowrap; }
.mainnav .brand.home:hover { background: none; }
.mainnav .nav-sec { color: rgba(255,255,255,.38); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 14px 12px 4px; white-space: nowrap; }
html.shell .mainnav button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-radius: 9px; padding: 9px 12px;
  color: rgba(255,255,255,.72); font-weight: 500; font-size: 14px; background: none; position: relative; white-space: nowrap; border-bottom: 0; }
html.shell .mainnav button .ic { width: 19px; height: 19px; flex: 0 0 auto; opacity: .9; }
html.shell .mainnav button:hover { background: rgba(255,255,255,.07); color: #fff; }
html.shell .mainnav button.on { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #f26a1b; }
html.shell .mainnav button.on .ic { color: #ffb27d; opacity: 1; }
#mainnav [data-badge]:not([data-badge=""])::after { margin-left: auto; background: #f26a1b; font-weight: 700; }
#mainnav .nbadge { margin-left: auto; background: #f26a1b; color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 8px; padding: 1px 6px; }
.mainnav .nav-grow { flex: 1; min-height: 12px; }
html.shell .mainnav .nav-min { color: rgba(255,255,255,.45); font-size: 12.5px; }
body.navmin .mainnav .nav-min .ic { transform: rotate(180deg); }
/* collapsed: icons only */
html.shell body.navmin .mainnav .lb, html.shell body.navmin .mainnav .brand .t, html.shell body.navmin .mainnav .nav-sec { display: none; }
html.shell body.navmin .mainnav button { justify-content: center; padding: 10px 0; }
html.shell body.navmin .mainnav .brand { justify-content: center; padding: 4px 0 14px; }
body.navmin #mainnav [data-badge]:not([data-badge=""])::after, body.navmin #mainnav .nbadge { position: absolute; top: 3px; right: 6px; margin: 0; padding: 0 5px; font-size: 9.5px; }
@media (max-width: 1280px) { html.shell body:not(.navfull) .mainnav .lb, html.shell body:not(.navfull) .mainnav .brand .t, html.shell body:not(.navfull) .mainnav .nav-sec { display: none; }
  html.shell body:not(.navfull) .mainnav button { justify-content: center; padding: 10px 0; }
  html.shell body:not(.navfull) .mainnav .brand { justify-content: center; padding: 4px 0 14px; } }

/* top bar */
html.shell body > .topbar { background: #fff; color: var(--ink); border: 0; border-bottom: 1px solid #e3e8ef; border-image: none; height: var(--tbh); padding: 0 18px 0 14px; gap: 10px;
  box-shadow: 0 1px 0 rgba(14,27,64,.02); position: relative; z-index: 30; }
html.shell body > .topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, #1593c9 0 40%, #f26a1b 40% 100%); opacity: .85; }
html.shell .backbtn { width: 34px; height: 34px; border: 1px solid #dfe5ee; background: #fff; color: #44516a; }
html.shell .backbtn:hover:not(:disabled) { background: #f2f5f9; }
.ptitle { font-size: 18px; font-weight: 700; color: var(--navy); white-space: nowrap; min-width: 0; margin-right: 6px; }
.tb-grow { flex: 1; }
.savest { font-size: 12px; color: #7a8699; white-space: nowrap; }
html.shell .topbar .lights { color: #6b778c; opacity: 1; margin: 0; }
html.shell .topbar .st { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #e3e8ef; }
html.shell .topbar .impa-box.nav { margin: 0; height: 36px; border-radius: 10px; background: #f3f6fa; border: 1px solid #e1e7ef; }
html.shell .topbar .impa-box.nav:focus-within { background: #fff; border-color: var(--focus); box-shadow: var(--ring); }
html.shell .topbar .find-box { flex: 0 1 420px; min-width: 200px; padding-left: 10px; }
html.shell .topbar .find-box .ic { width: 17px; height: 17px; color: #7a8699; margin-right: 8px; flex: 0 0 auto; }
html.shell .topbar .find-box input { width: 100%; font-size: 13.5px; }
html.shell .topbar .impa-box.nav:not(.find-box) input { width: 92px; }
html.shell .topbar .impa-box.find-box input { flex: 1; width: auto; min-width: 0; }
body[data-view="items"] .topbar .find-box { display: none; }
html.shell .topbar .search-wrap { flex: 0 1 560px; max-width: none; }
html.shell .topbar .search-wrap input { height: 38px; border-radius: 10px; background: #f3f6fa; border: 1px solid #e1e7ef; font-size: 14.5px; padding-left: 40px; }
html.shell .topbar .search-wrap input:focus { background: #fff; border-color: var(--focus); box-shadow: var(--ring); }
html.shell .topbar .search-wrap .icon { top: 10px; left: 13px; width: 18px; height: 18px; }
html.shell .topbar .search-wrap .clear { top: 5px; }
html.shell .topbar .btn.light { background: #f3f6fa; color: var(--ink); border-color: #e1e7ef; }
html.shell .topbar .bell { color: #44516a; width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
html.shell .topbar .bell:hover { background: #f2f5f9; }
html.shell .topbar .bell .ic { width: 21px; height: 21px; }
html.shell .topbar .bell span { top: 2px; right: 1px; }
.bellpanel { top: calc(var(--tbh) + 4px); }
/* + New menu */
.newmenu { position: relative; }
.newmenu .car { font-size: 10px; opacity: .7; margin-left: 2px; }
.newmenu .dd { display: none; position: absolute; right: 0; top: 42px; min-width: 270px; background: #fff; border: 1px solid #e1e7ef; border-radius: 12px; box-shadow: 0 16px 40px rgba(14,27,64,.18); padding: 6px; z-index: 95; }
.newmenu.open .dd { display: block; }
.newmenu .dd button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); }
.newmenu .dd button i { display: block; font-style: normal; font-weight: 400; font-size: 12px; color: #7a8699; margin-top: 1px; padding-left: 26px; }
.newmenu .dd button:hover { background: #f2f6fb; }
/* user menu */
html.shell .userbox { position: relative; flex-direction: row; align-items: center; gap: 9px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 22px; min-width: 0; outline: none; }
html.shell .userbox:hover, .userbox.open { background: #f2f5f9; }
.userbox .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #f27a2c, #d2560f); color: #fff; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; letter-spacing: .02em; }
.userbox .un { display: flex; flex-direction: column; line-height: 1.15; max-width: 170px; }
.userbox .un #userName { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbox .un small { font-size: 11px; color: #7a8699; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbox .udd { display: none; position: absolute; right: 0; top: 46px; min-width: 220px; background: #fff; border: 1px solid #e1e7ef; border-radius: 12px; box-shadow: 0 16px 40px rgba(14,27,64,.18); padding: 6px; z-index: 95; }
.userbox.open .udd { display: block; }
html.shell .userbox .udd a { display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 13.5px; }
.userbox .udd a:hover { background: #f2f6fb; }
@media (max-width: 1500px) { .userbox .un, .lights small, .savest { display: none !important; } }

/* login: two panels */
.login-back { background: radial-gradient(1200px 600px at 10% 0%, #1d3f7a 0%, #0e1b40 55%, #0a1430 100%); }
.login { width: 860px; max-width: 94vw; display: grid; grid-template-columns: 1fr 1fr; padding: 0; overflow: hidden; border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.login-art { background: linear-gradient(150deg, #12305a 0%, #0e1b40 60%), #0e1b40; color: #fff; padding: 40px 36px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.login-art::after { content: ''; position: absolute; right: -80px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(242,106,27,.45), rgba(242,106,27,0) 70%); }
.login-art img { height: 54px; width: 54px; object-fit: contain; margin-bottom: 14px; }
.login-art b { font-size: 22px; letter-spacing: .14em; }
.login-art span { color: rgba(255,255,255,.7); font-size: 13.5px; }
.login-art ul { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; color: rgba(255,255,255,.85); }
.login-art li::before { content: '✓'; display: inline-flex; width: 20px; height: 20px; border-radius: 50%; background: rgba(47,191,113,.2); color: #5fe09a; align-items: center; justify-content: center; font-size: 11px; margin-right: 10px; }
.login-form { padding: 40px 38px 32px; }
.login-form .login-brand { display: none; }
.login-form h2 { font-size: 24px; margin: 0 0 4px; color: var(--navy); }
.login-form #lGo { height: 44px !important; font-size: 15px; font-weight: 600; border-radius: 10px; margin-top: 4px; }
@media (max-width: 760px) { .login { grid-template-columns: 1fr; } .login-art { display: none; } }
.mainnav .brand b { font-size: 13.5px; letter-spacing: .1em; line-height: 1.15; }
html.shell .topbar .find-box { flex: 1 1 auto; max-width: 480px; }

/* =====================================================================
   DESIGN SYSTEM – the same controls, cards, tabs and tables in every section
   (zero-specificity :where() so any special control keeps its own look)
   ===================================================================== */
body { -webkit-font-smoothing: antialiased; }
:where(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not([type=image]), select, textarea) {
  border: 1px solid #cfd7e3; border-radius: 8px; background-color: #fff; padding: 6px 10px; min-height: 34px; color: var(--ink);
  transition: border-color .12s, box-shadow .12s; }
:where(textarea) { min-height: 0; line-height: 1.45; }
textarea.dedit { min-height: 0; }
:where(select) { padding-right: 28px; cursor: pointer; }
:where(input, select, textarea):hover:not(:focus):not(:disabled) { border-color: #b6c2d3; }
:where(input:not([type=checkbox]):not([type=radio]), select, textarea):focus { outline: none; border-color: var(--focus); box-shadow: var(--ring); }
:where(input:disabled, select:disabled, textarea:disabled) { background-color: #f4f6f9; color: #8a94a6; }
:where(input[type=checkbox], input[type=radio]) { accent-color: #e8611a; width: 16px; height: 16px; vertical-align: middle; }
:where(table td input:not([type=checkbox]):not([type=radio]), table td select) { min-height: 30px; padding: 4px 8px; }
::placeholder { color: #9aa5b5; }
.btn { font-weight: 500; padding: 7px 14px; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-color: #d3dbe6; }
.btn:hover:not(:disabled) { background-color: #f6f8fb; border-color: #b6c2d3; }
.btn.primary:hover:not(:disabled) { background-color: #cf5513; }
.btn.small { min-height: 28px; padding: 3px 10px; font-size: 12.5px; border-radius: 7px; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
a { color: #1d5fa8; }
/* cards / panels */
body .card, .dsec, .panel { border-color: #e3e8ef; border-radius: 12px; box-shadow: 0 1px 2px rgba(14,27,64,.04), 0 2px 8px rgba(14,27,64,.03); }
/* section pages (inside the main window): the section title is in the top bar, so the page starts with its tabs */
html.embedded body > .topbar .brand { display: none; }
html.embedded body > .topbar:not(:has(> :not(.brand))) { display: none; }
html.embedded body > .topbar { padding: 10px 24px; min-height: 56px; border-bottom: 1px solid #e3e8ef; gap: 10px; }
html.embedded body .tabs { display: flex; gap: 4px; padding: 0 20px; background: #fff; border-bottom: 1px solid #e3e8ef; min-height: 50px; align-items: stretch; overflow-x: auto; position: sticky; top: 0; z-index: 20; }
html.embedded body .tabs button { border: 0; background: none; padding: 0 14px; cursor: pointer; font-size: 14px; font-weight: 600; color: #6b778c; border-bottom: 3px solid transparent; border-top: 3px solid transparent; white-space: nowrap; border-radius: 0; transition: color .12s, border-color .12s; }
html.embedded body .tabs button:hover { color: var(--navy); }
html.embedded body .tabs button.on { color: var(--navy); border-bottom-color: #f26a1b; }
/* tables */
table.grid th { color: #6b778c; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
table.ft th, table.mini th { color: #5b6678; font-weight: 600; }
body .card:has(> table.ft), body .card:has(> div > table.ft) { overflow-x: auto; }
table.ft tbody tr:hover td, table.mini tbody tr:hover td { background: #f8fafd; }
/* badges & tags look the same everywhere */
.status { border-radius: 999px; padding: 1px 9px; font-weight: 600; font-size: 11.5px; background: #f3f6fa; border-color: #e1e7ef; color: #56627a; }
.badge { border-radius: 6px; }
/* empty states */
.empty { color: #7a8699; }
.empty b { font-size: 17px; }
/* modals */
.modal, .ask { border-radius: 14px; }
.modal-back { backdrop-filter: blur(2px); }
/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: #c3ccd9 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #c9d2de; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; } ::-webkit-scrollbar-thumb:hover { background: #aab5c5; background-clip: padding-box; border: 2px solid transparent; }
/* job page: title bar with the smart buttons; compact summary */
.filters.j-head { border-radius: 12px; padding: 8px 10px 8px 16px; gap: 10px; border-color: #e3e8ef; box-shadow: 0 1px 2px rgba(14,27,64,.04); }
.filters.j-head > b { font-size: 18px !important; color: var(--navy); }
.j-smart.in-head { margin: 0; border: 0; background: none; gap: 6px; flex-wrap: nowrap; overflow: visible; }
.j-smart.in-head button { border: 1px solid #e1e7ef; border-radius: 10px; padding: 5px 12px; min-width: 0; background: #fff; }
.j-smart.in-head button:hover { border-color: #b6c2d3; background: #f6f8fb; }
.j-smart.in-head b { font-size: 12.5px; }
.jsum .box { border-radius: 10px; }
.steps span[data-goto]::before { content: none; }
/* dashboard: progress of each job from RFQ to payment */
.nx .c .nxp { display: block; height: 4px; background: #eef1f6; border-radius: 4px; margin-top: 6px; max-width: 260px; overflow: hidden; }
.nx .c .nxp i { display: block; height: 100%; background: linear-gradient(90deg, #1593c9, #f26a1b); border-radius: 4px; }
.desk-hi { position: relative; overflow: hidden; }
.desk-hi::after { content: ''; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(242,106,27,.35), rgba(242,106,27,0) 70%); pointer-events: none; }
.cc .v { font-variant-numeric: tabular-nums; }
#slist li > [dir=auto], .dlist li > [dir=auto] { text-align: left; }
.concl { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* ===== Home page as a menu: one section at a time ===== */
.desk-hi { padding: 14px 20px; }
.desk-hi .t { font-size: 21px; }
.home { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.hm-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid #e3e8ef; border-radius: 14px; padding: 8px; box-shadow: 0 1px 2px rgba(14,27,64,.04); }
.hm-nav button { display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 9px; cursor: pointer; font-size: 13.5px; font-weight: 500; color: #36425a; }
.hm-nav button i { font-style: normal; width: 22px; text-align: center; font-size: 15px; }
.hm-nav button span { flex: 1; min-width: 0; line-height: 1.25; }
.hm-nav button b { font-size: 11.5px; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 10px; background: #eef2f7; color: #56627a; }
.hm-nav button b.hot { background: #f26a1b; color: #fff; }
.hm-nav button:hover { background: #f4f7fb; }
.hm-nav button.on { background: #fff3ea; color: #b8520f; font-weight: 600; box-shadow: inset 3px 0 0 #f26a1b; }
.hm-body { min-width: 0; }
.hm-pane { display: flex; flex-direction: column; gap: 14px; }
.hm-pane[hidden] { display: none; }
.hm-h { font-size: 17px; margin: 2px 0 0; color: var(--navy); }
.hm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.hm-card { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; text-align: left; background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; transition: transform .12s, box-shadow .12s, border-color .12s; }
.hm-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(14,27,64,.1); border-color: #c9d3e1; }
.hm-card .i { grid-row: span 2; font-size: 20px; width: 38px; height: 38px; border-radius: 10px; background: #f2f5f9; display: flex; align-items: center; justify-content: center; }
.hm-card .t { font-weight: 600; font-size: 13.5px; }
.hm-card .n { font-size: 20px; font-weight: 800; color: var(--navy); grid-row: span 2; }
.hm-card .p { grid-column: 2; font-size: 12px; color: #7a8699; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 15px; }
.hm-card.hot { border-color: #f6c19d; background: #fffaf6; } .hm-card.hot .i { background: #ffe8d8; } .hm-card.hot .n { color: #d2560f; }
.cc .v { font-size: 20px; line-height: 1.25; }
/* email on the home page */
.hm-mail { padding: 6px 0 4px !important; overflow: hidden; }
.hm-mailbar { display: flex; align-items: center; gap: 8px; padding: 6px 14px 10px; border-bottom: 1px solid #eef1f5; }
.hm-ml { display: grid; grid-template-columns: 10px 220px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 14px; border-bottom: 1px solid #f0f3f7; cursor: pointer; font-size: 13.5px; }
.hm-ml:hover { background: #f6f9fd; }
.hm-ml .dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.hm-ml.unread .dot { background: #1593c9; }
.hm-ml.unread .fr, .hm-ml.unread .sj { font-weight: 700; }
.hm-ml .fr { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-ml .sj { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #36425a; }
.hm-ml .ac { font-size: 11px; background: #eef3fb; color: #1d4580; border-radius: 8px; padding: 1px 7px; }
.hm-ml .wh { font-size: 12px; color: #7a8699; white-space: nowrap; }
.hm-mail .empty-ok { padding: 14px; }
@media (max-width: 1100px) { .home { grid-template-columns: 1fr; } .hm-nav { position: static; flex-direction: row; overflow-x: auto; } .hm-nav button { flex: 0 0 auto; } .hm-nav button span { white-space: nowrap; } }
.hm-pane > .concl { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
/* the home menu inside the main menu on the left (under Dashboard) */
#navHome { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 18px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.12); }
html.shell #navHome button { padding: 6px 10px; font-size: 13px; gap: 9px; color: rgba(255,255,255,.66); border-radius: 8px; }
html.shell #navHome button i { font-style: normal; width: 18px; text-align: center; font-size: 13px; filter: saturate(.85); }
html.shell #navHome button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#navHome button b { font-size: 10.5px; padding: 0 6px; border-radius: 8px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.8); }
#navHome button b.hot { background: #f26a1b; color: #fff; }
html.shell #navHome button:hover { background: rgba(255,255,255,.06); color: #fff; }
html.shell #navHome button.on { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; box-shadow: none; }
body:not([data-view="dash"]) #navHome { display: none; }
/* full menu: the home menu is on the left → the page shows only the chosen section */
html.shell body:not(.navmin) .home { grid-template-columns: minmax(0, 1fr); }
html.shell body:not(.navmin) .hm-nav { display: none; }
/* icons-only menu: keep the home menu inside the page */
html.shell body.navmin #navHome { display: none; }
@media (max-width: 1280px) { html.shell body:not(.navfull) #navHome { display: none; }
  html.shell body:not(.navfull) .home { grid-template-columns: 250px minmax(0, 1fr); }
  html.shell body:not(.navfull) .hm-nav { display: flex; } }
@media (max-width: 1100px) { html.shell body:not(.navfull) .home { grid-template-columns: 1fr; } }

/* ===== home sections: Today, announcements, vessels, sales charts, exchange rates, attendance ===== */
.hm-list { padding: 4px 0 !important; overflow: hidden; }
.hm-sub { padding: 8px 16px 10px; font-size: 13px; color: #6b778c; border-bottom: 1px solid #eef1f5; }
.hm-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #f0f3f7; cursor: pointer; }
.hm-row:last-child { border-bottom: 0; }
.hm-row:hover { background: #f7fafd; }
.hm-row .ic { width: 36px; height: 36px; border-radius: 10px; background: #f2f5f9; display: flex; align-items: center; justify-content: center; font-size: 17px; flex: 0 0 auto; }
.hm-row.r .ic { background: #fdecec; }
.hm-row .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hm-row .tx b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-row .tx span { font-size: 12.5px; color: #6b778c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-row .go { color: #9aa5b5; font-size: 20px; }
.tg { font-size: 11px; font-weight: 700; border-radius: 8px; padding: 2px 8px; background: #eef2f7; color: #56627a; white-space: nowrap; }
.tg.r { background: #fdecec; color: #b03a2e; } .tg.w { background: #fff1e0; color: #a8530c; } .tg.g { background: #e6f6ec; color: #1f8f4e; }
.hm-empty { padding: 34px 20px; text-align: center; font-size: 16px; font-weight: 600; color: #36425a; }
.hm-empty span { display: block; font-size: 13px; font-weight: 400; color: #7a8699; margin-top: 6px; }
.hm-note { background: #fff8ec; border: 1px solid #f6d9a8; border-radius: 12px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
.hm-note .btn { margin-left: auto; }
/* announcements */
.hm-post textarea { width: 100%; }
.hm-ann { padding: 12px 16px; border-bottom: 1px solid #f0f3f7; }
.hm-ann .hd { display: flex; gap: 10px; align-items: baseline; } .hm-ann .hd span { font-size: 12px; color: #7a8699; }
.hm-ann .bd { margin-top: 4px; white-space: pre-wrap; line-height: 1.45; }
/* tables on the home page */
table.hm-vt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.hm-vt th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: #6b778c; font-weight: 600; padding: 10px 12px; border-bottom: 1px solid #e3e8ef; background: #f8fafc; }
table.hm-vt td { padding: 9px 12px; border-bottom: 1px solid #f0f3f7; vertical-align: middle; }
table.hm-vt tr:hover td { background: #fafcfe; }
/* charts */
.hm-charts { display: flex; flex-direction: column; gap: 14px; }
.hm-ctl { display: flex; align-items: center; gap: 10px; }
.hm-c2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1250px) { .hm-c2 { grid-template-columns: 1fr; } }
.hm-tot { font-size: 14px; font-weight: 700; color: var(--navy); }
.vbars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; height: 190px; align-items: end; padding: 18px 2px 0; border-bottom: 1px solid #d5dce6; margin-bottom: 22px; }
.vb { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; cursor: default; }
.vb .bar { width: 70%; max-width: 30px; background: #1593c9; border-radius: 4px 4px 0 0; min-height: 0; transition: background .12s; }
.vb:hover .bar { background: #0e6f9a; }
.vb .vl { font-size: 11px; font-weight: 600; color: #36425a; white-space: nowrap; margin-bottom: 3px; }
.vb i { position: absolute; bottom: -19px; font-style: normal; font-size: 11px; color: #7a8699; }
.hb { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; position: relative; }
.hb .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb .tr { height: 12px; background: #f0f3f7; border-radius: 0 4px 4px 0; }
.hb .bar { display: block; height: 100%; background: #1593c9; border-radius: 0 4px 4px 0; }
.hb .bar.mar { background: #1593c9; } .hb .bar.ind { background: #e8611a; }
.hb .v { font-size: 12.5px; color: #36425a; white-space: nowrap; font-variant-numeric: tabular-nums; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #0e1b40; color: #fff; font-size: 12px; font-weight: 500; padding: 5px 9px; border-radius: 7px; white-space: nowrap; z-index: 5; pointer-events: none; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.hb[data-tip]:hover::after { left: auto; right: 0; transform: none; }
.hm-tbl summary { cursor: pointer; font-size: 13px; color: #1d5fa8; }
.hm-tbl table { margin-top: 8px; background: #fff; border: 1px solid #e3e8ef; border-radius: 10px; }
/* exchange rates */
.hm-rates { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.hm-rate { display: flex; flex-direction: column; gap: 2px; }
.hm-rate .c { font-size: 12px; font-weight: 700; color: #6b778c; letter-spacing: .05em; }
.hm-rate b { font-size: 24px; color: var(--navy); font-variant-numeric: tabular-nums; }
.hm-rate .s { font-size: 12px; color: #7a8699; }
.hm-conv .row { gap: 10px; }
.hm-cr { font-size: 20px; color: var(--navy); margin-left: 8px; }
/* attendance */
.hm-att { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.hm-today { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.hm-today .l { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #6b778c; }
.hm-today .v { font-size: 22px; font-weight: 800; color: var(--navy); }
.hm-today .s { font-size: 12.5px; color: #6b778c; margin-bottom: 6px; }
.ptitle { flex-shrink: 0; }
/* the plain page when Dashboard opens */
.hm-calm { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 46vh; text-align: center; }
.hm-hint { border: 1px solid #e3e8ef; background: #fff; border-radius: 999px; padding: 10px 20px; font: inherit; font-size: 15px; font-weight: 600; color: var(--navy); cursor: pointer; box-shadow: 0 1px 3px rgba(14,27,64,.05); transition: box-shadow .12s, transform .12s; }
.hm-hint span { color: #f26a1b; margin-left: 6px; }
.hm-hint:hover { box-shadow: 0 6px 16px rgba(14,27,64,.1); transform: translateY(-1px); }
.hm-hint.quiet { cursor: default; color: #56627a; font-weight: 500; }
.hm-pick { color: #8a94a6; font-size: 13.5px; }
.hm-hint-s { align-self: flex-start; font-size: 13.5px; padding: 7px 16px; }
/* Dashboard › Email: the Email section with the Dashboard menu still open on the left */
body.mail-in-home #navHome { display: flex !important; }
html.shell body.navmin.mail-in-home #navHome { display: none !important; }
.jwarn { margin-top: 10px; background: #fdecec; border: 1px solid #f3b4ae; color: #8f2a20; border-radius: 10px; padding: 9px 14px; font-size: 13.5px; line-height: 1.45; }
.cleanbox { border-color: #f6d9a8 !important; background: #fffdf7; }
.cbt td { vertical-align: middle; }

/* the company name is filled in by brand.js – hidden until then so another company's copy never flashes the default name */
html:not(.branded) [data-brand] { visibility: hidden; }

/* clear buttons to make the delivery note and the invoice (job title bar, document top bar) */
.mk-docs { display: inline-flex; gap: 6px; margin-left: 8px; flex-wrap: wrap; }
.btn.mk-doc { background: #ecf8f1; border-color: #9fd3b4; color: #14603a; font-weight: 600; }
.btn.mk-doc:hover { background: #dff3e7; border-color: #6fbf91; }
.btn.mk-doc.mk-inv { background: #eef3fe; border-color: #b4c6f2; color: #23408e; }
.btn.mk-doc.mk-inv:hover { background: #e2eafd; border-color: #8ea9ea; }

/* job progress: how far the job is, and a "well done" line right after a step is finished */
.jsum .progbox .prog { height: 6px; background: #e3e9f1; border-radius: 4px; margin: 6px 0 4px; overflow: hidden; }
.jsum .progbox .prog i { display: block; height: 100%; background: linear-gradient(90deg, #2fbf71, #1f8f4e); border-radius: 4px; transition: width .6s ease; }
.jsum .progbox .s b { color: #1f8f4e; }
.jwin { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 10px 14px; border-radius: 10px; background: #e9f8ef; border: 1px solid #a9dfbe; color: #14603a; font-size: 14px; animation: jwinIn .5s ease; }
.jwin .ic { font-size: 22px; }
@keyframes jwinIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.jhint { margin: 8px 0 0; padding: 9px 12px; border-radius: 10px; background: #eef5fd; border: 1px solid #c9dcf3; color: #1d4580; font-size: 13.5px; }

/* every saved document: the final document (as it is printed and sent) with what can be done above it; locked once the case is with finance */
.ifb-wrap { max-width: 1000px; margin: 14px auto 24px; padding: 0 16px; }
.ifb { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-radius: 10px; background: #fff; border: 1px solid var(--line); border-left: 4px solid #2fbf71; }
.ifb .ifb-t { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 3px; }
.ifb .ifb-t > b { font-size: 15px; color: var(--navy); }
.ifb .ifb-t > span { font-size: 13px; color: #4f5f73; }
.ifb.lock { background: #f4f7fb; border-left-color: var(--navy); }
.ifb.open { background: #fffaf0; border-left-color: var(--orange); }
.ifb-ask { margin-top: 8px; padding: 12px 16px; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.ifb-ask label { font-weight: 600; font-size: 13px; }
.ifb-ask textarea { width: 100%; min-height: 56px; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.ifb-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 8px; }
.ifb-tools .badge { margin-right: 2px; }
.ifb-rel { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.ifb-info { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: #4f5f73; margin-left: 6px; }
.ifb-tools .o-status button { padding: 5px 12px 5px 18px; font-size: 12px; }
.ifb-paper { background: #e9edf2; border-radius: 10px; padding: 14px 0; overflow-x: auto; }
iframe.inv-final { display: block; width: 100%; min-width: 820px; height: 1150px; border: 0; background: transparent; }
.ifb-st { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #e9f8ef; color: #14603a; }
.ifb-st.lock { background: #e8edf5; color: var(--navy); }
/* the company stamp button: on = blue like the ink */
.btn.stamp-on { background: #eaf0fb; border-color: #9db5e8; color: #1d3f99; font-weight: 600; }
.btn.stamp-on:hover { background: #dde7f9; border-color: #7f9fe0; }

/* client commission: always in front of the operator while pricing (purple = money that goes back to the client) */
.commbar { margin: 0 0 10px; padding: 10px 14px; border-radius: 10px; background: #f5f0fc; border: 1px solid #d8c8f0; border-left: 4px solid #7b4fc0; color: #3b2566; font-size: 13px; line-height: 1.55; }
.commbar .ct { font-size: 14.5px; margin-bottom: 2px; }
.commbar .ex { margin-top: 6px; padding: 6px 10px; background: #fff; border-radius: 8px; border: 1px dashed #cdb8ec; font-size: 12.5px; }
table.costing th.comm-col, table.costing td.comm-col { background: #f8f4fd; color: #6b3fa0; }
.kpi.comm-kpi { border-top-color: #7b4fc0; } .kpi.comm-kpi .v.neg { color: #6b3fa0; }
.comm-tag { color: #6b3fa0; font-weight: 600; }
.comm-note { margin: 8px 0 0; padding: 7px 10px; border-radius: 8px; background: #f5f0fc; border: 1px solid #d8c8f0; color: #3b2566; font-size: 12.5px; }
td.comm-col { color: #6b3fa0; }
.kpis.comm-row + .kpis.comm-row { margin-top: 8px; }
.kpi.cost-tot { background: #f3f6fb; border-top-color: #1d2b4f; }
/* tick-box field in a quick form (several ports / zones) */
.ask .ask-l { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: #4a5568; }
.ask .ask-cks { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px; border-radius: 8px; }
.ask .ask-cks.bad { outline: 2px solid #c0392b; }
.ask .ask-cks label.ck { flex-direction: row; align-items: center; gap: 5px; font-weight: 500; color: #1d2b4f; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; cursor: pointer; background: #fff; }
.ask .ask-cks label.ck:has(input:checked) { background: #e7f3fb; border-color: #8cc4e4; }
.ask .ask-cks input { margin: 0; }
.jwarn:has(#aCostsOk) { display: flex; align-items: center; gap: 14px; } .jwarn:has(#aCostsOk) > div { flex: 1; } .jwarn #aCostsOk { flex: none; background: #fff; border-color: #e3a29a; color: #8f2a20; font-weight: 600; }
/* nothing priced yet: where the prices are typed (job › Items & prices) */
.price-first { margin: 0 0 12px; padding: 10px 16px; border-radius: 10px; background: #fff8ec; border: 1px solid #f3c98b; border-left: 4px solid #e8892b; color: #5a3a10; font-size: 13.5px; line-height: 1.5; }
.price-first ol { margin: 6px 0 0; padding-left: 22px; } .price-first li { margin: 2px 0; }
.price-first.in-doc { display: flex; align-items: center; gap: 16px; } .price-first.in-doc > div { flex: 1; }
.price-first.flash { animation: pfFlash 1.6s ease 2; }
@keyframes pfFlash { 0%, 100% { box-shadow: 0 0 0 0 rgba(232,137,43,0); } 40% { box-shadow: 0 0 0 6px rgba(232,137,43,.45); } }
