/* Rexson ColorPoint Manager - web edition. Visual language follows the Windows application:
   blue Aero-style menu/toolbar, light-blue command buttons, striped data grids, right-hand filter panel. */
:root {
  --blue-1: #e6eef9; --blue-2: #d3e2f5; --blue-3: #b8d1ef; --blue-4: #9bbce6; --blue-5: #6f9fd8;
  --border: #7da2d3; --text: #1b1b1b; --red: #d11a1a; --orange-1: #fee8b6; --orange-2: #fbc96b; --orange-b: #e0a23b;
  --row-a: #f5f5f5; --row-b: #cdcdcd; --panel: #eef2f8; --title: #1f6bc4;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 12px/1.35 "Segoe UI", Tahoma, "Helvetica Neue", Arial, sans-serif; color: var(--text); background: #f0f0f0; display: flex; flex-direction: column; min-height: 100vh; }
a { color: #0b4fa8; }
button, input, select, textarea { font: inherit; }

/* ---- title bar, menu bar, toolbar ---- */
.titlebar { background: linear-gradient(#2b78d0, #1b5fb4); color: #fff; height: 26px; display: flex; align-items: center; padding: 0 8px; gap: 8px; font-size: 12px; }
.titlebar .logo { width: 16px; height: 16px; border-radius: 3px; background: #e8321a; display: inline-grid; place-items: center; font-weight: 700; font-size: 10px; }
.titlebar .spacer { flex: 1; }
.titlebar .who { opacity: .9; }
.menubar { background: linear-gradient(#e9f0fa, #d5e3f5); border-bottom: 1px solid #aebfd6; display: flex; flex-wrap: wrap; padding: 2px 6px; position: relative; z-index: 30; }
.menu { position: relative; }
.menu > button { background: none; border: 1px solid transparent; padding: 3px 14px; cursor: pointer; color: #111; }
.menu:hover > button, .menu.open > button { background: #c9dcf4; border-color: #8fb0dd; }
.menu ul { display: none; position: absolute; left: 0; top: 100%; min-width: 210px; margin: 0; padding: 3px; list-style: none; background: #f7faff; border: 1px solid #7da2d3; box-shadow: 2px 3px 6px rgba(0,0,0,.25); }
.menu.open ul { display: block; }
.menu ul a, .menu ul button { display: block; width: 100%; text-align: left; padding: 4px 16px; color: #111; text-decoration: none; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.menu ul a:hover, .menu ul button:hover { background: #c9dcf4; }
.menu ul hr { border: 0; border-top: 1px solid #c3d3e8; margin: 3px 0; }
.menu ul .muted { color: #777; padding: 4px 16px; }
.toolbar { background: linear-gradient(#e3edf9, #cfe0f4); padding: 4px 6px; display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid #aebfd6; }
.tgroup { display: flex; border: 1px solid #7ea6d8; border-radius: 3px; background: linear-gradient(#e8f1fc, #c5daf3); padding: 1px 1px 1px 8px; position: relative; }
.tgroup:before { content: ""; position: absolute; left: 2px; top: 4px; bottom: 4px; width: 3px; background: repeating-linear-gradient(#7b9cc9 0 2px, transparent 2px 4px); }
.tgroup a { padding: 6px 8px; text-decoration: none; color: #0f2a52; border: 1px solid transparent; border-radius: 2px; }
.tgroup a:hover { background: #d9e8fa; border-color: #8fb0dd; }
.tgroup a.on { background: linear-gradient(#b9d3f2, #9fc0ea); border-color: #6f9fd8; }
.doctabs { background: #e9eef6; padding: 3px 4px 0; display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid #9fb4d2; min-height: 26px; }
.doctab { background: #dce6f3; border: 1px solid #9fb4d2; border-bottom: 0; padding: 4px 8px; display: flex; gap: 8px; align-items: center; border-radius: 2px 2px 0 0; text-decoration: none; color: #000; }
.doctab.on { background: #fff; position: relative; top: 1px; }
.doctab .x { color: #333; cursor: pointer; font-size: 13px; line-height: 1; border: 0; background: none; padding: 0 2px; }
.doctab .x:hover { color: var(--red); }

/* ---- shell ---- */
.shell { flex: 1; display: flex; min-height: 0; background: #f4f4f4; border-top: 1px solid #fff; }
.side { width: 134px; flex: none; padding: 5px 4px; display: flex; flex-direction: column; gap: 4px; background: #f0f4fa; }
.btn, .side a, .side button { display: block; width: 100%; text-align: center; text-decoration: none; color: #101820; padding: 5px 4px; min-height: 29px; border: 1px solid var(--border); border-radius: 3px; background: linear-gradient(#dcebfd, #b9d5f7); cursor: pointer; box-shadow: inset 0 1px 0 #fff; }
.btn:hover, .side a:hover, .side button:hover { background: linear-gradient(#e9f3ff, #c8defa); }
.side .on { background: linear-gradient(#fee9b8, #fbc66a); border-color: var(--orange-b); }
.side .off { opacity: .5; pointer-events: none; }
.side .danger { color: #8a0f0f; margin-top: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: auto; padding: 4px 10px; }
.btn svg { width: 15px; height: 15px; }
.btn.primary { font-weight: 600; }
.btn[disabled] { opacity: .5; cursor: default; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 4px 6px 4px 0; }
.content { flex: 1; min-height: 0; display: flex; gap: 6px; }
.centre { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.actionbar { display: flex; gap: 6px; padding: 5px 0 2px; align-items: center; }
.actionbar .grow { flex: 1; }
.statusbar { background: linear-gradient(#cfe0f6, #b9d1ef); border-top: 1px solid #98b4dc; padding: 3px 8px; text-align: right; font-size: 11.5px; }
.flash { margin: 3px 0; padding: 5px 9px; border: 1px solid #7fb27f; background: #e4f5e0; }
.flash.err { border-color: #d28a8a; background: #fbe5e5; color: #7a1111; }
.err-list { margin: 3px 0 6px; padding: 6px 10px 6px 24px; background: #fbe5e5; border: 1px solid #d28a8a; color: #7a1111; }

/* ---- lists ---- */
.listbar { display: flex; align-items: center; gap: 4px; padding: 3px 4px; background: linear-gradient(#e6effb, #cddff5); border: 1px solid #98b4dc; margin-bottom: 3px; flex-wrap: wrap; }
.listbar .pg { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; }
.listbar .pg a, .listbar .pg span.dis { display: inline-grid; place-items: center; width: 26px; height: 24px; color: #e8561d; text-decoration: none; font-size: 15px; border: 1px solid transparent; }
.listbar .pg a:hover { background: #d9e8fa; border-color: #8fb0dd; }
.listbar .pg span.dis { color: #aab6c6; }
.listbar .pg input { width: 34px; text-align: right; border: 1px solid #7da2d3; padding: 1px 3px; }
.listbar .btn { background: linear-gradient(#e8f1fc, #cfe1f8); }
.dd { position: relative; display: inline-block; }
.dd > .menu-pop { display: none; position: absolute; left: 0; top: 100%; z-index: 20; background: #f7faff; border: 1px solid #7da2d3; min-width: 170px; box-shadow: 2px 3px 6px rgba(0,0,0,.25); }
.dd.open > .menu-pop { display: block; }
.menu-pop a { display: block; padding: 5px 12px; color: #111; text-decoration: none; white-space: nowrap; }
.menu-pop a:hover { background: #c9dcf4; }
.gridwrap { flex: 1; min-height: 120px; overflow: auto; background: #efefef; border: 1px solid #98b4dc; }
table.grid { border-collapse: collapse; width: 100%; background: #efefef; }
table.grid th { position: sticky; top: 0; z-index: 2; background: linear-gradient(#cfe1f7, #a8c8ef); border: 1px solid #8fb0dd; padding: 2px 8px; text-align: center; font-weight: 400; white-space: nowrap; }
table.grid th a { color: #000; text-decoration: none; display: block; }
table.grid td { padding: 3px 8px; white-space: nowrap; border-left: 1px solid transparent; }
table.grid tbody tr:nth-child(odd) { background: var(--row-a); }
table.grid tbody tr:nth-child(even) { background: var(--row-b); }
table.grid tbody tr:hover { background: #f9e4a8; }
table.grid tbody tr.sel { background: #ffd982 !important; }
table.grid td.num, table.grid th.num { text-align: right; }
table.grid td a { color: #000; text-decoration: none; }
table.grid td a:hover { text-decoration: underline; }
table.grid .empty { text-align: center; padding: 30px; background: #f7f7f7; }
.sw { display: inline-block; width: 20px; height: 14px; border: 1px solid #5d5d5d; vertical-align: middle; }
.obs { color: #888; font-style: italic; }
.grid input[type=text], .grid input[type=number] { width: 90px; border: 1px solid #7da2d3; padding: 1px 4px; }
.footnote { padding: 6px 2px; color: #555; }

/* ---- filter panel ---- */
.filters { width: 238px; flex: none; background: var(--panel); border-left: 1px solid #b9c9de; padding: 6px 6px 10px; overflow: auto; }
.filters .f { margin-bottom: 8px; }
.filters label.t { display: block; margin-bottom: 1px; }
.filters .row { display: flex; gap: 3px; }
.filters .row input[type=text] { flex: 1; min-width: 0; border: 1px solid #7da2d3; padding: 2px 4px; }
.filters select { border: 1px solid #7da2d3; background: #fff; padding: 1px 2px; }
.filters .to { border: 1px solid var(--border); border-radius: 2px; background: linear-gradient(#e8f1fc, #c5daf3); cursor: pointer; padding: 0 6px; }
.filters .v2 { display: none; margin-top: 2px; }
.filters .v2.show { display: flex; }
.fbox { border: 1px solid #a9bfdd; background: #f5f8fd; margin: 8px 0; }
.fbox > h4 { margin: 0; padding: 3px 6px; font-weight: 400; background: linear-gradient(#cfe1f7, #a8c8ef); border-bottom: 1px solid #8fb0dd; }
.fbox .b { padding: 5px 6px; }
.fbox .b .row { display: flex; gap: 3px; align-items: center; margin-top: 3px; }
.fbox .chip { display: flex; gap: 4px; align-items: center; margin-top: 3px; }
.fbox .chip input { flex: 1; min-width: 0; border: 1px solid #7da2d3; padding: 2px 4px; }
.xbtn { border: 0; background: none; color: var(--red); font-weight: 700; cursor: pointer; font-size: 14px; }
.fine { color: #555; font-size: 11px; }
.plus { border: 1px solid var(--border); background: linear-gradient(#e8f1fc, #c5daf3); width: 24px; height: 22px; cursor: pointer; color: #1a8a1a; font-weight: 700; }

/* ---- forms (Details panel) ---- */
.panel { border: 1px solid #98b4dc; background: linear-gradient(#fff, #efefef); margin-bottom: 8px; }
.panel > h3 { margin: 0; padding: 3px 7px; font-weight: 400; background: linear-gradient(#cfe1f7, #a8c8ef); border-bottom: 1px solid #8fb0dd; }
.panel .body { padding: 6px 8px; }
.frm { display: grid; grid-template-columns: max-content 1fr; gap: 6px 10px; align-items: center; }
.frm label { text-align: left; }
.frm .fld { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.frm input[type=text], .frm input[type=number], .frm input[type=password], .frm input[type=email], .frm input[type=date], .frm select, .frm textarea { border: 1px solid #7da2d3; padding: 2px 4px; background: #fff; min-width: 125px; }
.frm input.w-wide { min-width: 280px; }
.frm input:focus, .frm select:focus, .frm textarea:focus { outline: 0; background: #fffbe8; border-color: #e0a23b; }
.verr { color: var(--red); font-style: italic; }
.swbtn { width: 18px; height: 16px; border: 1px solid #333; padding: 0; cursor: pointer; background: #000; }
.fs { border: 1px solid #a9bfdd; margin: 0 0 8px; padding: 3px 6px 6px; background: #f8f8f8; }
.fs > legend { padding: 0 4px; }
.attrgroup { border: 1px solid #98b4dc; margin-bottom: 6px; }
.attrgroup > .gh { background: linear-gradient(#e2edfb, #c3d8f3); padding: 2px 6px; cursor: pointer; display: flex; gap: 6px; }
.attrgroup > .gb { border: 2px solid #5b9be0; margin: 3px; padding: 4px; background: #fff; }
.attr { display: inline-block; vertical-align: top; margin: 0 14px 6px 0; }
.attr .l { display: block; }
.attr .ctl { display: flex; gap: 6px; align-items: center; }
.attr input[type=text], .attr input[type=number], .attr input[type=date], .attr select { border: 1px solid #7da2d3; padding: 2px 4px; min-width: 150px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.chips .c { border: 1px solid #98b4dc; background: #e6effb; padding: 1px 7px; border-radius: 9px; }
.itemctl { display: flex; justify-content: flex-end; gap: 6px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.itemctl input[list] { width: 230px; border: 1px solid #7da2d3; padding: 3px 4px; }
.totals { padding: 3px 2px; }
.hidden { display: none !important; }
dialog { border: 1px solid #5d86bd; padding: 0; min-width: 340px; box-shadow: 3px 5px 14px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(0,0,0,.25); }
dialog > h3 { margin: 0; padding: 5px 9px; font-weight: 400; color: #fff; background: linear-gradient(#2b78d0, #1b5fb4); }
dialog .body { padding: 10px; }
dialog .foot { padding: 6px 10px 10px; display: flex; gap: 6px; justify-content: flex-end; }
mark { background: #fff06a; }
.note { padding: 6px 8px; border: 1px solid #b9c9de; background: #fff; margin-bottom: 6px; white-space: pre-wrap; }
.matrix td, .matrix th { padding: 2px 8px; }
.matrix td.c { text-align: center; }

/* ---- login ---- */
.loginwrap { flex: 1; display: grid; place-items: center; background: #dfe9f6; padding: 20px; }
.loginbox { width: min(380px, 94vw); border: 1px solid #5d86bd; background: #f8fbff; box-shadow: 3px 5px 14px rgba(0,0,0,.25); }
.loginbox h1 { margin: 0; font-size: 13px; font-weight: 400; color: #fff; padding: 6px 10px; background: linear-gradient(#2b78d0, #1b5fb4); }
.loginbox .body { padding: 14px; }

/* ---- responsive: keep the desktop look, let panels wrap/scroll on small screens ---- */
@media (max-width: 980px) {
  .content { flex-direction: column; }
  .filters { width: auto; border-left: 0; border-top: 1px solid #b9c9de; max-height: 55vh; }
  .shell { flex-direction: column; }
  .side { width: auto; flex-direction: row; flex-wrap: wrap; }
  .side a, .side button { width: auto; flex: 1 1 110px; }
  .menu ul { min-width: 170px; }
  .frm { grid-template-columns: 1fr; }
}
@media print {
  .titlebar, .menubar, .toolbar, .doctabs, .side, .filters, .listbar, .actionbar, .statusbar, .noprint { display: none !important; }
  body { background: #fff; }
  .shell, .main, .content, .centre, .gridwrap { display: block !important; overflow: visible !important; border: 0; }
  table.grid th { position: static; }
  table.grid tbody tr:nth-child(even) { background: #eee; }
}
.side form { display: block; margin: 0; }
.side form button { width: 100%; }
.side .sep { height: 6px; }
