/* AI Camera Manager Project — giao diện web quản trị (Nam Son AI Software Solutions)
   Màu thương hiệu: xanh #152BC7, đỏ #BC1A23. Chỉ dùng font hệ thống. */
:root {
  --brand: #152BC7; --brand-red: #BC1A23; --brand-deep: #0a1460;
  --bg: #f3f5fa; --panel: #ffffff; --panel-2: #f7f8fc; --text: #172033; --muted: #5a6478; --line: #e1e5ef;
  --accent: #152BC7; --accent-strong: #0f20a0; --accent-soft: #e8ebfb; --on-accent: #ffffff;
  --danger: #BC1A23; --danger-soft: #fbe9ea; --err: #b3161f; --ok: #1f7a3a;
  --focus: #3d55ff66;
  --radius: 10px; --radius-sm: 7px;
  --shadow-sm: 0 1px 2px #10183a14, 0 1px 3px #10183a0f;
  --shadow: 0 8px 28px #10183a26;
  --scroll: #c3c9d8;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; font-size: 14px; color: var(--text);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1220; --panel: #161b2c; --panel-2: #1b2136; --text: #e7eaf3; --muted: #a2abc0; --line: #2a3150;
    --accent: #9eadff; --accent-strong: #c2cbff; --accent-soft: #212a55; --on-accent: #0a1240;
    --danger: #ff7a82; --danger-soft: #3a1a20; --err: #ff8a91; --ok: #6fcf8a;
    --focus: #9eadff66; --shadow-sm: 0 1px 2px #0006; --shadow: 0 10px 30px #0009; --scroll: #3a4366;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 12px; } .err { color: var(--err); }
a { color: var(--accent); }

/* Thanh cuộn mảnh */
* { scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* Nút & ô nhập */
button, .btn { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: var(--radius-sm); padding: 6px 11px; cursor: pointer; display: inline-block; box-shadow: var(--shadow-sm); transition: border-color .15s, background-color .15s, color .15s; }
button:hover, .btn:hover { border-color: var(--accent); color: var(--accent); }
button:focus-visible, .btn:focus-within, input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
button.primary, .card button[type=submit] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
button.primary:hover, .card button[type=submit]:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
button.ghost { background: transparent; box-shadow: none; }
button.err, button.ghost.err { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
button.err:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
@media (prefers-color-scheme: dark) { button.err:hover { color: #2a0a0d; } }
input, select, textarea { font: inherit; padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); color: var(--text); min-width: 0; }
input[type=checkbox] { accent-color: var(--brand); }
h3 { font-size: 14px; margin: 14px 0 8px; color: var(--text); letter-spacing: .1px; }
.pane > h3:first-child { margin-top: 2px; }

/* ===== Màn đăng nhập ===== */
.login { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.loginbanner { position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background: linear-gradient(150deg, #0a1460 0%, #10209a 48%, #152BC7 100%); }
.loginbanner::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: 13%; height: 5px; background: linear-gradient(90deg, transparent, #BC1A23 25%, #e2343e 60%, transparent); transform: rotate(-8deg); opacity: .9; z-index: -1; }
.bannerart { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1;
  -webkit-mask-image: linear-gradient(105deg, #0003 0%, #0005 45%, #000 85%); mask-image: linear-gradient(105deg, #0003 0%, #0005 45%, #000 85%); }
.bannerbody { position: relative; padding: 56px 56px 48px; max-width: 600px; display: flex; flex-direction: column; gap: 18px; min-height: 100%; }
.bannertop { display: flex; align-items: center; gap: 12px; }
.bannericon { width: 52px; height: 52px; border-radius: 13px; box-shadow: 0 6px 18px #0005; }
.bannerkicker { font-size: 12px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: #dfe4ff; }
.bannertitle { margin: 6px 0 0; font-size: 36px; line-height: 1.15; font-weight: 700; letter-spacing: -.3px; }
.bannertitle::after { content: ""; display: block; width: 64px; height: 4px; border-radius: 4px; background: #e2343e; margin-top: 14px; }
.bannerlead { margin: 0; font-size: 15px; line-height: 1.6; color: #e6e9ff; max-width: 34em; }
.bannerfeats { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; }
.bannerfeats li { display: flex; gap: 12px; align-items: center; font-size: 14px; line-height: 1.45; color: #eef0ff;
  background: #ffffff12; border: 1px solid #ffffff22; border-radius: 12px; padding: 10px 14px; backdrop-filter: blur(2px); }
.bannerfeats b { color: #fff; } .bannerfeats em { font-style: normal; }
.bannerfeats svg { flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 9px; background: #BC1A23; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bannerslogan { margin: auto 0 0; padding-top: 18px; font-size: 13px; font-style: italic; color: #d4daff; }

.loginmain { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px 24px 24px; background: var(--bg); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; width: 360px; max-width: 100%; display: grid; gap: 12px; box-shadow: var(--shadow); }
.card h1 { margin: 0; font-size: 21px; } .card label { display: grid; gap: 5px; font-weight: 600; font-size: 13px; }
.card label input { font-weight: 400; padding: 9px 11px; }
.card button[type=submit] { padding: 10px; margin-top: 4px; }
.card .err:empty { display: none; }
.brandicon { width: 56px; height: 56px; border-radius: 14px; }
.loginbanner ~ .loginmain .brandicon { display: none; }

.copyright { font-size: 11px; color: var(--muted); padding: 8px 12px; border-top: 1px solid var(--line); line-height: 1.5; }
.copyright a { color: var(--accent); }
.loginfoot { border-top: 0; text-align: center; display: grid; justify-items: center; gap: 6px; font-size: 12px; max-width: 420px; }
.loginfoot p { margin: 0; }
.contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; }
.eco { display: inline-flex; align-items: center; gap: 8px; }
.aiosmark { height: 22px; width: auto; }
/* Logo ngang: chữ xám đậm → luôn đặt trên khung sáng */
.lockupbox { display: inline-flex; background: #fff; border-radius: 10px; padding: 6px 10px; border: 1px solid var(--line); }
.lockup { height: 40px; width: auto; display: block; }

@media (max-width: 760px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .bannerkicker { overflow-wrap: anywhere; }
  .bannerbody { padding: 22px 18px 20px; gap: 10px; min-height: 0; }
  .bannericon { width: 40px; height: 40px; border-radius: 10px; }
  .bannerkicker { font-size: 11px; }
  .bannertitle { font-size: 23px; margin: 0; }
  .bannertitle::after { margin-top: 8px; width: 48px; height: 3px; }
  .bannerlead { font-size: 13px; line-height: 1.5; }
  .bannerart { -webkit-mask-image: linear-gradient(180deg, #0004, #0008); mask-image: linear-gradient(180deg, #0004, #0008); }
  .bannerfeats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .bannerfeats li { font-size: 12px; padding: 8px; gap: 8px; }
  .bannerfeats em { display: none; }
  .bannerfeats svg { width: 26px; height: 26px; padding: 5px; border-radius: 7px; }
  .bannerslogan, .loginbanner::after { display: none; }
  .loginmain { padding: 20px 16px; justify-content: flex-start; }
  .card { padding: 20px; }
}

/* ===== Ứng dụng ===== */
.app { display: grid; grid-template-columns: 420px 1fr; height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.bar { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.bar select { flex: 1; font-weight: 600; }
.tabs { display: flex; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.tabs button { flex: 1; border: 1px solid transparent; border-radius: 999px; background: transparent; padding: 6px 4px; box-shadow: none; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tabs button:hover { color: var(--accent); border-color: transparent; background: var(--accent-soft); }
.tabs button.on, .tabs button.on:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; box-shadow: var(--shadow-sm); }
.pane { padding: 12px; overflow: auto; flex: 1; min-height: 0; }
.row { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; } .row.wrap { flex-wrap: wrap; } .row input { flex: 1; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 8px 8px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 6px; }
.list li:hover { background: var(--accent-soft); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; border: 1px solid #0004; }
.mapwrap { position: relative; background: var(--panel-2); } #map { position: absolute; inset: 0; }
.drawer { position: absolute; top: 12px; right: 12px; bottom: 12px; width: 440px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: auto; padding: 16px; box-shadow: var(--shadow); border-top: 3px solid var(--brand); }
.drawer h2 { margin: 0 0 6px; font-size: 17px; } .drawer h3 { font-size: 14px; margin: 16px 0 6px; }
.drawer .grid { display: grid; grid-template-columns: 120px 1fr; gap: 6px; align-items: center; }
.drawer .close { position: absolute; right: 10px; top: 10px; }
table { border-collapse: collapse; width: 100%; } th, td { border-bottom: 1px solid var(--line); padding: 5px 6px; text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: var(--panel-2); font-weight: 600; font-size: 12px; color: var(--muted); }
td input { width: 100%; padding: 3px 5px; } td.num, th.num { text-align: right; }
.tablewrap { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.params { display: grid; grid-template-columns: 1fr 90px; gap: 6px; margin-bottom: 10px; align-items: center; }
.kpi { background: var(--accent-soft); border-radius: var(--radius); padding: 10px 12px; margin: 8px 0; border-left: 4px solid var(--brand); }
.warn { color: var(--err); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #0f1a4ae6; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 9; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.splice { display: grid; grid-template-columns: 1fr 24px 1fr; gap: 2px 6px; font-size: 12px; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); margin-left: 4px; }
@media (max-width: 900px) { .app { grid-template-columns: 1fr; grid-template-rows: 50vh 50vh; } .drawer { width: auto; left: 12px; } }
.cablepanel { position: absolute; left: 12px; bottom: 24px; width: 420px; max-width: calc(100% - 24px); max-height: 55vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); border-top: 3px solid var(--brand-red); }
.cablepanel .big { font-size: 20px; font-weight: 600; }
button.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Thanh thương hiệu cột trái */
.brand { display: flex; align-items: center; gap: 11px; padding: 11px 12px; color: #fff; font-weight: 600; position: relative;
  background: linear-gradient(120deg, #0a1460 0%, #152BC7 100%); }
.brand::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #BC1A23 0 30%, #e2343e 30% 34%, transparent 34%); }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 2px 8px #0004; }
.brand > span, .brandtext { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.brandname { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brandsub { font-size: 11px; font-weight: 400; color: #d6dcff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand button { background: #ffffff1a; color: #fff; border-color: #ffffff55; padding: 3px 9px; box-shadow: none; }
.brand button:hover { background: #ffffff33; color: #fff; border-color: #fff; }
.sidefoot { display: flex; gap: 10px; align-items: center; background: var(--panel-2); }
.sidefoot .lockupbox { padding: 3px 6px; border-radius: 8px; flex: none; }
.sidefoot .lockup { height: 28px; }
.sidefoottext { min-width: 0; }

/* Hộp Giới thiệu */
dialog.about { border: 1px solid var(--line); border-radius: 14px; padding: 0; max-width: 560px; width: calc(100% - 32px); background: var(--panel); color: var(--text); box-shadow: var(--shadow); overflow: hidden; }
dialog.about::backdrop { background: #0a1033a0; }
.aboutbody { padding: 0 20px 20px; display: block; }
.abouthead { display: flex; gap: 12px; align-items: center; margin: 0 -20px 4px; padding: 18px 20px; color: #fff; background: linear-gradient(120deg, #0a1460, #152BC7); border-bottom: 3px solid #BC1A23; }
.abouthead .muted { color: #d6dcff; }
.abouthead img { width: 56px; height: 56px; border-radius: 12px; }
.abouthead h2 { margin: 0; font-size: 18px; }
.about h3 { font-size: 15px; margin: 16px 0 6px; }
.about a { color: var(--accent); }
.aboutlogo { text-align: center; }
.aboutlogo .lockup { height: 52px; }

/* v0.7: QR, ảnh thực tế */
.modal{position:fixed;inset:0;background:rgba(10,16,51,.55);display:flex;align-items:center;justify-content:center;z-index:50}
.modal .card{background:var(--panel,#fff);color:inherit;padding:16px;border-radius:12px;max-width:360px;width:92%}
.photos{display:flex;flex-wrap:wrap;gap:8px}
.photos figure{margin:0;width:130px}
.photos img,.photos .ph{width:130px;height:98px;object-fit:cover;border-radius:6px;background:#ddd;display:flex;align-items:center;justify-content:center}

/* Logo công ty cũ (giữ lớp cho tương thích; logo nền trắng đặt trong khung trắng) */
.companylogo { height: 96px; width: auto; background: #fff; border-radius: 12px; padding: 6px; margin: 8px 0; }
.companylogo.small { height: 56px; }

/* v0.13: Nhập bản vẽ CAD (DWG/DXF) */
dialog.cad { max-width: 640px; }
.cadgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; align-items: center; margin: 10px 0; }
.cadgrid select, .cadgrid input { width: 100%; }
.cadmaps { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.cadmaps td, .cadmaps th { border-bottom: 1px solid var(--line); padding: 5px 6px; text-align: left; vertical-align: top; }
.cadwarn { color: var(--danger); font-size: 12px; }
@media (max-width: 560px) { .cadgrid { grid-template-columns: 1fr; } }

/* v0.14: thêm tab Workspace – cho thanh tab cuộn ngang khi hẹp */
.tabs { overflow-x: auto; scrollbar-width: thin; }
.tabs button { flex: 1 0 auto; padding: 6px 8px; }
#wsCode textarea { font: inherit; font-size: 12px; margin: 6px 0; }

/* ===== v0.29 web: menu chức năng giống app (☰ Menu) ===== */
.side { position: relative; }
.ambtn { font-weight: 600; white-space: nowrap; background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ambtn:hover, .ambtn[aria-expanded="true"] { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.ampanel { position: fixed; z-index: 1100; left: 10px; width: 380px; top: 112px; max-height: calc(100vh - 130px); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.ampanel > input { margin: 10px; }
.amlist-wrap { overflow-y: auto; padding: 0 6px 6px; }
.amgroup { border-bottom: 1px solid var(--line); }
.amgroup:last-child { border-bottom: 0; }
.amghead, .amitem { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; border: 0; border-radius: 8px; box-shadow: none; background: transparent; }
.amghead { padding: 9px 10px; font-weight: 600; color: var(--accent); justify-content: space-between; }
.amghead:hover, .amitem:hover { background: var(--accent-soft); color: var(--text); }
.amchev { transition: transform .15s; font-size: 16px; }
.amgroup.open .amchev { transform: rotate(90deg); }
.amitems { padding: 0 0 6px 8px; }
.amitem { padding: 7px 10px; color: var(--text); font-size: 13px; }
.amitem + .amitem { border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); border-radius: 0; }
.amno { color: var(--muted); min-width: 22px; font-variant-numeric: tabular-nums; }
.amtext { flex: 1; }
.amtag { font-size: 10px; font-weight: 700; letter-spacing: .3px; padding: 1px 6px; border-radius: 999px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.amfootnote { padding: 8px 12px; border-top: 1px solid var(--line); background: var(--panel-2); }
dialog.amdlg { max-width: 640px; }
.ambody { max-height: min(62vh, 620px); overflow-y: auto; }
.amfoot { margin-top: 12px; justify-content: flex-end; }
.amlist li { cursor: pointer; }
.amok { color: var(--ok); font-weight: 600; } .amerr { color: var(--err); font-weight: 600; }
.tag.amwarn { background: var(--danger-soft); color: var(--danger); }
.amtbl { border-collapse: collapse; width: 100%; } .amtbl td { padding: 4px 6px; border-bottom: 1px solid var(--line); } .amtbl td:nth-child(n+2) { text-align: right; white-space: nowrap; }
.amsteps li { margin-bottom: 6px; }

/* Nút Đăng xuất trên thanh đầu (08/11/2026) */
.logoutbtn { display: inline-flex; align-items: center; gap: 5px; flex: none; white-space: nowrap; padding: 6px 10px; background: transparent; box-shadow: none; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); font-weight: 600; }
.logoutbtn:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: var(--danger); color: var(--danger); }
@media (max-width: 1100px) { .logoutbtn .lbl { display: none; } }

/* ===== v0.30 web: quét máy & phần mềm hỗ trợ ===== */
.scbanner { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin: 8px 10px 0; padding: 8px 10px; border-radius: 9px; font-size: 13px; border: 1px solid; }
.scbanner.err { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.scbanner.warn { background: #fff6e0; border-color: #e8c66a; color: #6b4e00; }
@media (prefers-color-scheme: dark) { .scbanner.warn { background: #3a2f12; border-color: #7a6320; color: #f3d98a; } }
.scbanner .scbtns { display: flex; gap: 4px; flex: none; }
.scbanner button { padding: 3px 9px; font-size: 12px; }
.sclist { list-style: none; padding: 0; margin: 0; }
.sclist li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--line); }
.scic { flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; margin-top: 1px; }
.sc-ok .scic { background: var(--ok); } .sc-err .scic { background: var(--danger); } .sc-warn .scic { background: #d99a00; } .sc-info .scic { background: var(--muted); }
.scfix { margin-top: 3px; } .sc-err .scfix { color: var(--err); }
.screason { background: var(--danger-soft); padding: 8px 10px; border-radius: 8px; }

/* ===== v0.31 web: biểu tượng như app + menu chuột phải ===== */
img.devico { vertical-align: middle; flex: none; }
#list li img.devico { margin-right: 4px; }
#addTypeIco { display: inline-flex; align-items: center; }
.dot.big { width: 14px; height: 14px; }
.ctxmenu { position: fixed; z-index: 1200; min-width: 240px; max-width: 340px; background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow); padding: 4px; font-size: 13px; max-height: calc(100vh - 8px); overflow-y: auto; }
.cxtitle { padding: 6px 10px 7px; border-bottom: 1px solid var(--line); margin-bottom: 3px; display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cxitem { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; box-shadow: none; background: transparent; border-radius: 7px; padding: 6px 8px; text-align: left; color: var(--text); }
.cxitem:hover:not([disabled]), .cxitem:focus-visible { background: var(--accent-soft); color: var(--text); }
.cxitem[disabled] { opacity: .5; cursor: default; }
.cxitem.danger { color: var(--danger); }
.cxic { width: 20px; display: inline-flex; justify-content: center; flex: none; color: var(--muted); }
.cxlb { flex: 1; } .cxar { color: var(--muted); transition: transform .15s; }
.cxitem.open .cxar { transform: rotate(90deg); }
.cxsub { display: none; padding-left: 14px; border-left: 2px solid var(--accent-soft); margin: 0 0 4px 16px; }
.cxitem.open + .cxsub { display: block; }
.cxsep { height: 1px; background: var(--line); margin: 4px 6px; }
.icgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; margin-top: 10px; }
.icgrid button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 4px; font-size: 11px; line-height: 1.2; text-align: center; box-shadow: none; }
.icgrid button.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent) inset; }
input.mocolor { width: 46px; height: 30px; padding: 2px; }
#amDlg .cadgrid input.mocolor { width: 46px; flex: none; }
#amDlg .cadgrid .row label { white-space: nowrap; }
