:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #1c2433;
  --muted: #667085;
  --line: #e3e7ee;
  --primary: #2e348a;
  --primary-soft: #eaebf7;
  --ok: #1a7f4b;
  --ok-soft: #e4f5ec;
  --warn: #b25e00;
  --warn-soft: #fff3e0;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --radius: 10px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
a { color: var(--primary); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--line); height: 58px;
}
.spacer { flex: 1; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; cursor: pointer; }
.brand:hover .brand-name { color: var(--primary); }
.logo { display: block; height: 40px; width: auto; border-radius: 6px; }
.brand-name { font-weight: 700; font-size: 14px; }
.brand-sub { color: var(--muted); font-size: 12px; }

main { flex: 1; min-width: 0; padding: 24px 24px 80px; }

/* V18.17 the loading screen of a page (V18.18 white) */
.ld-screen { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 42%, #f3f4ff 0%, #ffffff 62%); color: #0f172a;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s ease, visibility 0s linear .25s; }
.ld-screen.ld-on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .2s ease .12s, visibility 0s linear .12s; }
.ld-box { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px; width: min(480px, 100%); }
.ld-rings { position: relative; width: 204px; height: 204px; display: grid; place-items: center; margin-bottom: 14px; }
.ld-rings span { position: absolute; border-radius: 50%; }
.ld-ring1 { inset: 0; border: 1px solid rgba(99, 102, 241, .14); }
.ld-ring2 { inset: 32px; border: 2px dashed rgba(99, 102, 241, .45); animation: ld-spin 9s linear infinite; }
.ld-ring3 { inset: 48px; border: 1px solid rgba(59, 130, 246, .22); box-shadow: 0 0 40px rgba(79, 70, 229, .14); }
.ld-icon { position: relative; width: 80px; height: 80px; border-radius: 18px; display: grid; place-items: center; font-size: 36px; line-height: 1;
  background: linear-gradient(135deg, #6d5cf6 0%, #4f46e5 45%, #2196f3 100%); box-shadow: 0 10px 30px rgba(79, 70, 229, .30); animation: ld-pulse 1.6s ease-in-out infinite; }
.ld-title { font-size: 28px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 8px; }
.ld-msg { font-size: 16px; color: #64748b; min-height: 22px; margin-bottom: 20px; }
.ld-bar { width: 100%; height: 6px; border-radius: 99px; background: #eef0f6; border: 1px solid #e2e5ee; overflow: hidden; margin-bottom: 36px; }
.ld-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #6366f1, #3b82f6); }
.ld-on .ld-bar i { animation: ld-fill 6s cubic-bezier(.1, .7, .3, 1) forwards; }
.ld-screen:not(.ld-on) .ld-bar i { width: 100%; }
.ld-close { background: #fff; color: #334155; border: 1px solid #dfe3ec; border-radius: 99px; padding: 10px 20px; font: inherit; font-weight: 600; cursor: pointer; }
.ld-close:hover { background: #f4f5fb; color: #0f172a; }
.ld-close kbd { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: #94a3b8; margin-left: 6px; }
@keyframes ld-spin { to { transform: rotate(360deg); } }
@keyframes ld-pulse { 50% { transform: scale(1.05); } }
@keyframes ld-fill { 0% { width: 0; } 100% { width: 92%; } }
@media (max-width: 600px) { .ld-rings { transform: scale(.8); margin: -20px 0 -6px; } .ld-title { font-size: 22px; } }
@media (prefers-reduced-motion: reduce) { .ld-ring2, .ld-icon { animation: none; } }
main > * { max-width: 1400px; margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #f7f8fb; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: #232870; }
.btn-danger { color: var(--bad); border-color: #f3c3be; }
.btn-danger:hover { background: var(--bad-soft); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 18px; overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; background: #f9fafc; border-bottom: 1px solid var(--line);
  cursor: pointer; user-select: none;
}
.card-head h2 { margin: 0; font-size: 15px; letter-spacing: .2px; }
.card-head .chev { transition: transform .15s; color: var(--muted); }
.card.collapsed .chev { transform: rotate(-90deg); }
.card.collapsed .card-body { display: none; }
.card-body { padding: 4px 0; }
.section-note { padding: 8px 18px 0; color: var(--muted); font-style: italic; }

/* ---------- Page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head h1 { margin: 0 0 4px; font-size: 22px; }
.page-head .sub { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Form header (form no / date) ---------- */
.form-title { text-align: center; padding: 18px; }
.form-title .co { font-weight: 800; font-size: 18px; }
.form-title .t1 { font-weight: 700; font-size: 16px; margin-top: 4px; }
.form-title .t2 { color: var(--muted); margin-top: 2px; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; padding: 0 18px 18px; }

/* ---------- Item rows ---------- */
.row {
  display: grid;
  grid-template-columns: 36px minmax(180px, 260px) 1fr 110px;
  gap: 12px; align-items: center;
  padding: 10px 18px; border-top: 1px solid #f0f2f6;
}
.row:first-child { border-top: none; }
.row-head { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; padding-top: 12px; padding-bottom: 6px; }
.row .no { color: var(--muted); font-weight: 600; text-align: center; }
.row .label { font-weight: 600; }
.row .label .req { color: var(--bad); margin-left: 2px; }
.row .hint { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 2px; }
.row.disabled { opacity: .45; }
.row.done { background: #fbfefc; }

.check { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ok); cursor: pointer; }
.check.on { color: var(--ok); font-weight: 600; }
.check-note { font-size: 11px; color: var(--muted); text-align: center; margin-top: 2px; }

label.field { display: block; }
label.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
div.field { display: block; } div.field > span:first-child { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }   /* V15.5: same as the label fields */
.ev-na { padding: 9px 12px; border: 1px dashed var(--line, #e5e7eb); border-radius: 8px; color: var(--muted, #64748b); font-size: 14px; background: #f8fafc; }

input[type=text], input[type=tel], input[type=url], input[type=search], input[type=password], input[type=date], input[type=month], input[type=number], input[type=email], input[type=time], input[type=datetime-local], select, textarea {
  width: 100%; padding: 8px 10px; font: inherit; color: inherit;
  border: 1px solid #d4d9e2; border-radius: 7px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #b9cdf1; border-color: var(--primary); }
input[readonly] { background: #f5f6f8; color: var(--muted); }
textarea { resize: vertical; min-height: 60px; }

.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline > * { flex: 1 1 160px; }

/* ---------- File upload ---------- */
.files { display: flex; flex-direction: column; gap: 6px; }
.file-list { display: flex; flex-wrap: wrap; gap: 6px; }
.file-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 12px;
}
.file-chip a { color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.file-chip button { border: none; background: transparent; color: inherit; cursor: pointer; font-size: 14px; padding: 0 6px; }
.upload-btn { position: relative; overflow: hidden; align-self: flex-start; }
.upload-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Badges / progress ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef0f4; color: var(--muted); }
.badge.draft { background: #eef0f4; color: #475467; }
.badge.submitted { background: var(--primary-soft); color: var(--primary); }
.badge.review { background: var(--warn-soft); color: var(--warn); }
.badge.approved { background: var(--ok-soft); color: var(--ok); }
.badge.rejected { background: var(--bad-soft); color: var(--bad); }
.badge.expiring { background: var(--warn-soft); color: var(--warn); }
.badge.expired { background: var(--bad-soft); color: var(--bad); }

.progress { height: 8px; background: #edf0f5; border-radius: 999px; overflow: hidden; min-width: 80px; }
.progress > div { height: 100%; background: var(--ok); border-radius: 999px; transition: width .2s; }
.progress-wrap { display: flex; align-items: center; gap: 8px; }
.progress-wrap small { color: var(--muted); font-weight: 600; min-width: 64px; }

/* ---------- Summary panel ---------- */
.layout { display: grid; grid-template-columns: 1fr 260px; gap: 18px; align-items: start; }
.side { position: sticky; top: 82px; }
.side .card { padding: 14px 16px; }
.side h3 { margin: 0 0 10px; font-size: 14px; }
.side-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 13px; cursor: pointer; }
.side-item:first-of-type { border-top: none; }
.side-item:hover { color: var(--primary); }
.big-pct { font-size: 32px; font-weight: 800; color: var(--ok); }
.alerts { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.alert { font-size: 12px; padding: 6px 8px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); }
.alert.bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- List page ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 26px; font-weight: 800; }
.stat .l { color: var(--muted); font-size: 12px; font-weight: 600; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.toolbar input, .toolbar select { width: auto; flex: 1 1 200px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid #f0f2f6; vertical-align: middle; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); background: #f9fafc; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f8faff; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #1c2433; color: #fff; padding: 10px 18px; border-radius: 8px; font-weight: 600;
  transition: transform .2s; z-index: 50;
}
.toast.show { transform: translateX(-50%) translateY(0); }

.savebar { font-size: 12px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; order: -1; }
}
@media (max-width: 680px) {
  .topbar { padding: 10px 16px; }
  .brand-sub { display: none; }
  .row { grid-template-columns: 28px 1fr; }
  .row .input-cell { grid-column: 1 / -1; }
  .row .check-cell { grid-column: 1 / -1; justify-content: flex-start; }
  .row .check { justify-content: flex-start; }
  .row-head { display: none; }
}

/* ---------- Print ---------- */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 11px; }
  .no-print, .side, .upload-btn, .file-chip button, .toast { display: none !important; }
  main { padding: 0; max-width: none; }
  .layout { display: block; }
  .card { border: 1px solid #999; border-radius: 0; break-inside: avoid; margin-bottom: 8px; }
  .card.collapsed .card-body { display: block; }
  .card-head { background: #eee; padding: 6px 10px; }
  .card-head .chev, .card-head .progress-wrap { display: none; }
  .row { padding: 4px 10px; grid-template-columns: 24px 200px 1fr 70px; }
  .row.disabled { opacity: 1; }
  input, select, textarea { border: none; border-bottom: 1px solid #bbb; border-radius: 0; padding: 2px 4px; appearance: none; background: transparent; }
  .file-chip { background: none; padding: 0; }
}

/* =========================================================
   Shell: side menu + user menu
   ========================================================= */
.shell-body { display: flex; align-items: flex-start; }
.sidebar {
  position: sticky; top: 58px; width: 300px; flex: 0 0 300px; height: calc(100vh - 58px);
  display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line);
}
.side-label {
  padding: 14px 18px 6px; font-size: 11px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--muted);
}
.program { display: flex; flex-direction: column; margin: 0 8px; }
.program.open { flex: 0 0 auto; }
.prog-head {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: none; background: transparent; font: inherit; font-weight: 700; color: var(--text);
  padding: 9px 10px; border-radius: 8px; cursor: pointer;
}
.prog-head:hover { background: #f4f6fa; }
.program.open .prog-head { background: var(--primary-soft); color: var(--primary); }
.prog-icon { font-size: 16px; }
.prog-name { flex: 1; }
.prog-head .chev { color: var(--muted); transition: transform .15s; }
.program:not(.open) .prog-head .chev { transform: rotate(-90deg); }
.prog-body { display: flex; flex-direction: column; flex: 1; min-height: 0; padding-top: 4px; }
.program:not(.open) .prog-body { display: none; }
.sub-link {
  display: block; text-align: left; text-decoration: none; color: var(--text); font-weight: 600;
  padding: 7px 12px 7px 36px; border-radius: 8px;
}
.side-admin .sub-link { margin: 0 8px; padding-left: 12px; }
.sub-link:hover { background: #f4f6fa; }
.sub-link.active { background: #eef3fc; color: var(--primary); }
.side-admin { margin-top: auto; border-top: 1px solid var(--line); padding-bottom: 10px; }
.side-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 8px 8px 12px; margin-top: 6px; border-top: 1px dashed var(--line);
  font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted);
}
.side-filter { display: flex; flex-direction: column; gap: 6px; padding: 0 4px 10px; }
.side-filter input, .side-filter select { padding: 6px 10px; font-size: 13px; }
.side-list { flex: 1; min-height: 120px; overflow-y: auto; padding: 0 0 12px; }
.side-app {
  display: block; text-decoration: none; color: var(--text);
  padding: 9px 10px; border-radius: 8px; border: 1px solid transparent; margin-bottom: 2px;
}
.side-app:hover { background: #f6f8fc; }
.side-app.active { background: var(--primary-soft); border-color: #c9d8f3; }
.side-app .top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.side-app .fno { font-weight: 700; font-size: 13px; }
.side-app .desc { color: var(--muted); font-size: 12px; margin: 2px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-app .badge { font-size: 10px; padding: 2px 8px; }
.side-app .progress { height: 5px; }
.side-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 24px 8px; }

.icon-btn { border: none; background: transparent; font-size: 20px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.icon-btn:hover { background: #f1f3f7; }
.menu-btn { display: none; }
.backdrop { display: none; }

.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 10px; border: 1px solid transparent; background: transparent;
  padding: 4px 8px; border-radius: 8px; cursor: pointer; font: inherit; color: inherit;
}
.user-btn:hover { background: #f4f6fa; border-color: var(--line); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 700;
}
.user-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.user-text small { color: var(--muted); text-transform: capitalize; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(20,30,50,.12); padding: 6px; z-index: 30;
}
.dropdown button {
  display: block; width: 100%; text-align: left; border: none; background: transparent; font: inherit;
  padding: 8px 10px; border-radius: 6px; cursor: pointer;
}
.dropdown button:hover { background: #f4f6fa; }

/* ---------- Login ---------- */
.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: linear-gradient(160deg, #2e348a 0%, #1c2060 100%);
}
.auth[hidden] { display: none; }
.auth-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 14px; padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.auth-card .logo { height: 64px; margin: 0 auto 16px; border-radius: 8px; }
.auth-card h1 { font-size: 18px; text-align: center; margin: 0; }
.auth-card .sub { text-align: center; color: var(--muted); margin: 4px 0 22px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-card .btn { justify-content: center; padding: 10px; font-size: 14px; }
.form-error { background: var(--bad-soft); color: var(--bad); padding: 8px 10px; border-radius: 7px; font-size: 13px; }
.form-error:empty { display: none; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }

/* ---------- Dialog ---------- */
dialog {
  border: none; border-radius: 12px; padding: 0; width: min(440px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
dialog::backdrop { background: rgba(15,23,42,.45); }
dialog form { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
dialog h3 { margin: 0 0 4px; }
dialog .dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.check-inline { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check-inline input { width: 16px; height: 16px; }

.banner { padding: 10px 14px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); margin-bottom: 14px; font-weight: 600; }
.readonly-note { background: #eef0f4; color: #475467; }
.muted { color: var(--muted); }

@media (max-width: 900px) {
  .menu-btn { display: inline-block; }
  .sidebar {
    position: fixed; left: 0; top: 58px; z-index: 25; transform: translateX(-100%);
    transition: transform .2s; box-shadow: 0 10px 40px rgba(0,0,0,.15);
  }
  body.side-open .sidebar { transform: none; }
  body.side-open .backdrop { display: block; position: fixed; inset: 58px 0 0 0; background: rgba(15,23,42,.35); z-index: 24; }
  main { padding: 18px 16px 80px; }
  .user-text { display: none; }
}
@media (max-width: 680px) {
  .brand-name { font-size: 12px; }
}
/* phones: logo only, so the top bar fits the screen */
@media (max-width: 520px) {
  .topbar .brand { min-width: 0; flex: 0 1 auto; }
  .topbar .brand > div { display: none; }
  .topbar .brand .logo { max-width: 130px; height: auto; }
  /* everything on one tidy line: smaller gaps and compact buttons */
  .topbar { gap: 6px; padding: 8px 10px; }
  .topbar .menu-btn { padding: 4px 6px; flex: none; }
  .topbar .brand { flex: 0 1 auto; overflow: hidden; }
  .topbar .brand .logo { width: 100%; max-width: 110px; min-width: 70px; object-fit: contain; }
  .topbar > * { flex-shrink: 0; }
  .topbar .brand, .topbar .spacer { flex-shrink: 1; }
  .lang-btn { padding: 4px 8px; font-size: 12px; white-space: nowrap; }
  .bell { margin-right: 0; padding: 4px 8px; font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; }
  .bell-count { min-width: 16px; padding: 0 5px; font-size: 11px; }
  .user-btn { padding: 2px; gap: 4px; }
  .user-btn .chev { display: none; }
}
@media (max-width: 360px) {
  .topbar .brand .logo { max-width: 84px; }
}
@media print {
  #shell { display: block !important; }
  .shell-body { display: block; }
  .banner { display: none; }
}
.readonly .upload-btn, .readonly [data-rmfile] { display: none !important; }
.side-app .progress-wrap small { min-width: 32px; text-align: right; font-size: 11px; }

/* ---------- Section submit / access control ---------- */
.sec-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 18px; margin-top: 4px; background: #f9fafc; border-top: 1px solid var(--line); font-size: 12px;
}
.sec-info { display: flex; flex-direction: column; gap: 2px; }
.sec-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
section.card.locked { border-color: #c9d8f3; }
section.card.locked .card-head { background: #f1f5fd; }
section.card.no-edit .upload-btn, section.card.no-edit [data-rmfile] { display: none !important; }
.card-head .badge { font-size: 11px; padding: 2px 8px; }


.badge.role-superadmin { background: #efe7fb; color: #6b2fb3; }
.badge.role-admin { background: var(--primary-soft); color: var(--primary); }
.badge.role-user { background: var(--ok-soft); color: var(--ok); }
.badge.role-viewer { background: #eef0f4; color: #475467; }

.matrix th, .matrix td { text-align: center; font-size: 12px; padding: 8px 10px; }
.matrix th:first-child, .matrix td:first-child, .matrix th:nth-child(2), .matrix td:nth-child(2) { text-align: left; }
.acc { color: var(--primary); font-weight: 600; white-space: nowrap; }
.acc.full { color: #6b2fb3; }
dialog.wide { width: min(640px, calc(100vw - 32px)); }
@media print { .sec-bar { display: none; } }

.prog-title { padding: 14px 18px; font-weight: 700; font-size: 15px; background: #f9fafc; border-bottom: 1px solid var(--line); }
.acc-table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.acc-table label.all { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; text-transform: none; letter-spacing: 0; cursor: pointer; margin-top: 4px; }
.acc-table label.all input { width: 14px; height: 14px; }
.acc-chip { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 600; white-space: nowrap; }
.create-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.create-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); cursor: pointer; }
.acc-chip.new { background: var(--ok-soft); color: var(--ok); }

/* ---------- Letterhead (printed on every page) ---------- */
.print-frame, .print-frame > tbody, .print-frame > tbody > tr, .print-frame > tbody > tr > td { display: block; }
.print-frame { width: 100%; min-width: 0; border-collapse: collapse; }
.print-frame > * > tr > td { padding: 0; border: none; }
.print-frame > tbody > tr { cursor: default; }
.print-frame > tbody > tr:hover { background: none; }
.print-only { display: none; }
.letterhead { display: block; width: 100%; height: auto; }
@media print {
  .print-frame { display: table; }
  .print-frame > thead { display: table-header-group; }
  .print-frame > tbody { display: table-row-group; }
  .print-frame > * > tr { display: table-row; }
  .print-frame > * > tr > td { display: table-cell; }
  .print-frame > thead td { padding-bottom: 10px; }
  .letterhead { padding-bottom: 6px; border-bottom: 2px solid #2e348a; }
  .form-title .co { display: none; }      /* company name is already on the letterhead */
  .form-title { padding: 8px 0 10px; }
}
@media print {
  .card { break-inside: auto; }
  .card-head { break-after: avoid; }
  .row, .form-title, .meta-grid { break-inside: avoid; }
  main .card input, main .card select, main .card textarea {
    border: none; border-bottom: 1px solid #bbb; border-radius: 0; background: transparent; box-shadow: none;
  }
}
@media print { main .card ::placeholder { color: transparent; } }
.badge.cancelled { background: #3f3f46; color: #fff; }
.cancel-banner {
  border: 2px solid var(--bad); background: var(--bad-soft); color: var(--bad);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; line-height: 1.6;
}
.cancel-banner strong { letter-spacing: 1px; }
@media print { .cancel-banner { border-radius: 0; margin: 0 0 8px; } }
.submit-all {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; border: 2px solid var(--primary); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px;
}
.submit-all .btn { padding: 10px 28px; font-size: 14px; }
.badge.completed { background: #1a7f4b; color: #fff; }

/* ---------- Audit trail ---------- */
.audit-table td { font-size: 13px; vertical-align: top; }
.audit-table tbody tr { cursor: default; }
.audit-table .aud-old { color: #9a3412; text-decoration: line-through; text-decoration-color: rgba(154, 52, 18, .45); }
.audit-table .aud-new { color: var(--ok); font-weight: 600; }
.audit-table .aud-old, .audit-table .aud-new { max-width: 260px; word-break: break-word; }
.audit-print-title { margin-bottom: 8px; font-size: 12px; }
@media print {
  .audit-table th, .audit-table td { padding: 4px 6px; font-size: 10px; }
  .audit-table tr { break-inside: avoid; }
}

/* ---------- Other supporting documents list ---------- */
.doclist-items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.doc-row { display: grid; grid-template-columns: 22px 1fr auto 26px; gap: 8px; align-items: center;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfd; font-size: 13px; }
.doc-no { color: var(--muted); font-weight: 600; }
.doc-note { font-weight: 600; word-break: break-word; }
.doc-row a { text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.doc-rm { border: none; background: transparent; color: var(--bad); font-size: 16px; cursor: pointer; }
.doclist-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.doclist-add input { flex: 1 1 220px; }
section.card.no-edit .doclist-add, section.card.no-edit .doc-rm { display: none !important; }
@media print { .doc-rm { display: none; } .doc-row { background: none; } }

/* ---------- Settings ---------- */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.opt-card { margin-bottom: 0; display: flex; flex-direction: column; }
.opt-head { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: #f9fafc; border-bottom: 1px solid var(--line); }
.opt-head .muted { font-size: 12px; }
.opt-items { padding: 6px 16px; flex: 1; max-height: 320px; overflow-y: auto; }
.opt-row { display: flex; align-items: center; gap: 2px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.opt-row:last-child { border-bottom: none; }
.opt-val { flex: 1; font-size: 13px; }
.opt-row .icon-btn { font-size: 13px; padding: 2px 7px; }
.opt-row .icon-btn:disabled { opacity: .25; cursor: default; }
.opt-del { color: var(--bad); }
.opt-add { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); }

/* ---------- Searchable port box ---------- */
.combo { position: relative; }
.combo-list {
  position: absolute; left: 0; right: 0; top: 40px; z-index: 15; max-height: 260px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(20,30,50,.15);
}
.combo-opt { display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; padding: 7px 10px; cursor: pointer; font-size: 13px; }
.combo-opt:hover { background: var(--primary-soft); }
.combo-opt strong { color: var(--primary); }
.combo-empty { padding: 10px; font-size: 12px; }
.combo-hint { font-size: 11px; margin-top: 3px; }
.ports-card { margin-top: 16px; }
.ports-card .toolbar input { flex: 1 1 260px; }
@media print { .combo-list { display: none !important; } }

/* ---------- Settings: program home + drop down settings ---------- */
.set-prog { max-width: 760px; }
.set-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px;
  text-decoration: none; color: var(--text); border-top: 1px solid var(--line); }
.set-link:hover { background: #f6f8fc; }
.set-link .muted { font-size: 12px; }
.set-arrow { font-size: 22px; color: var(--muted); }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { text-decoration: none; font-weight: 600; }
.dd-card { max-width: 760px; }
.dd-select { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.dd-select select { max-width: 380px; font-weight: 600; }
.dd-select .muted { font-size: 12px; }
.dd-title { padding: 12px 18px; font-weight: 700; background: #f9fafc; border-bottom: 1px solid var(--line); }
.dd-items { padding: 4px 18px; max-height: 440px; overflow-y: auto; }
.dd-items .opt-row { padding: 8px 0; }
.dd-add { display: flex; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.dd-add input { flex: 1 1 200px; }
.dd-note { font-size: 12px; max-width: 760px; }

/* Settings rows: fixed columns so ↑ ↓ ✕/🔒 line up in every row */
.opt-row { display: grid; grid-template-columns: 1fr 34px 34px 34px; align-items: center; gap: 2px; }
.opt-row .icon-btn {
  width: 34px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-family: "Segoe UI Symbol", "Segoe UI", sans-serif; color: var(--text); line-height: 1;
}
.opt-row .icon-btn:disabled { color: var(--text); opacity: .2; }
.opt-row .opt-del { color: var(--bad); }
.opt-row span.icon-btn { cursor: default; font-size: 13px; }

.acc-chip.view { background: #eef0f4; color: #475467; }
.acc-table span.all { display: inline-block; font-size: 10px; font-weight: 600; text-transform: none; letter-spacing: 0; margin-top: 4px; }

/* ---------- uploaded files: name + View + Download ---------- */
.file-list { flex-direction: column; align-items: flex-start; }
.file-chip { padding: 4px 6px 4px 10px; gap: 4px; flex-wrap: wrap; border-radius: 8px; }
.file-chip .fname, .doc-file .fname { color: var(--primary); text-decoration: none; font-weight: 600; max-width: 280px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.fname:hover { text-decoration: underline; }
.fbtn { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600;
  text-decoration: none; color: var(--primary); background: #fff; border: 1px solid #c9cde8; white-space: nowrap; }
.fbtn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.doc-row { grid-template-columns: 22px minmax(120px, 1fr) auto 26px; }
.doc-file { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.no-files { font-size: 12px; font-style: italic; }
section.card:not(.no-edit) .file-list .no-files { display: none; }   /* editors see the Upload button instead */
@media print { .fbtn { display: none; } .file-chip .fname { color: #000; } }

/* ---------- Dashboard column chooser ---------- */
.col-menu { position: relative; flex: 0 0 auto; }
.col-drop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 260px; max-height: 420px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(20,30,50,.15); padding: 8px 12px; }
.col-group { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin: 8px 0 4px; }
.col-opt { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; cursor: pointer; }
.col-opt input { width: 16px; height: 16px; accent-color: var(--primary); }
.col-actions { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; text-align: right; }
/* Columns menu: tick box on the left, label beside it (overrides the toolbar input sizing) */
.toolbar .col-drop .col-opt { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 10px;
  justify-items: start; text-align: left; white-space: nowrap; }
.toolbar .col-drop .col-opt input[type=checkbox] { flex: none; width: 16px; height: 16px; margin: 0; padding: 0; }
.toolbar .col-drop { width: 250px; }
/* file: name on line 1, View / Download / Remove on line 2 */
.file-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px 12px; max-width: 100%; }
.file-chip .fname, .doc-file .fname { max-width: 100%; white-space: normal; word-break: break-word; overflow: visible; }
.fbtns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.file-chip button.frm, .doc-file button.doc-rm { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px;
  border: 1px solid #f3c3be; background: #fff; color: var(--bad); cursor: pointer; }
.file-chip button.frm:hover, .doc-file button.doc-rm:hover { background: var(--bad-soft); }
.doc-row { grid-template-columns: 22px minmax(120px, 1fr) minmax(200px, 1.4fr); align-items: start; }
.doc-file { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
section.card.no-edit .frm { display: none !important; }
@media print { .fbtns { display: none; } }

/* free-text answers are shown (and saved) in CAPITAL LETTERS; placeholders stay normal */
section.card .input-cell input[type=text]:not([data-computed]), section.card .input-cell textarea,
section.card [data-remark], section.card [data-docnote], .doc-note { text-transform: uppercase; }
section.card .input-cell input::placeholder, section.card .input-cell textarea::placeholder { text-transform: none; }

/* ---------- COA expiry alert ---------- */
.bell { position: relative; border: 1px solid #f3c3be; background: var(--bad-soft); border-radius: 999px; font-size: 16px;
  padding: 5px 12px 5px 10px; cursor: pointer; margin-right: 8px; animation: bellPulse 2s ease-in-out 3; }
.bell-count { display: inline-block; min-width: 20px; margin-left: 4px; padding: 1px 6px; border-radius: 999px;
  background: var(--bad); color: #fff; font-size: 12px; font-weight: 700; }
@keyframes bellPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.coa-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; margin-bottom: 16px; border-radius: 10px; border: 2px solid var(--bad); background: var(--bad-soft); color: var(--bad); }
.coa-banner a { color: var(--bad); font-weight: 700; }
.alert-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.alert-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid #f5d6a8; background: var(--warn-soft); border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13px; }
.alert-item.bad { border-color: #f3c3be; background: var(--bad-soft); }
.alert-item:hover { filter: brightness(.97); }
.alert-days { font-weight: 700; color: var(--warn); white-space: nowrap; }
.alert-item.bad .alert-days { color: var(--bad); }
@media print { .bell, .coa-banner { display: none !important; } }
.alert-list { overflow-x: hidden; }
.alert-item > span:first-child { min-width: 0; overflow-wrap: anywhere; }

.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-top: 1px solid var(--line); }
.set-row .muted { font-size: 12px; }
.set-prog + .set-prog { margin-top: 16px; }

.bell.none { border-color: var(--line); background: #f4f6fa; animation: none; filter: grayscale(1); opacity: .8; }
.bell.none .bell-count { background: #98a2b3; }

/* ---------- SIRIM Inspection Form ---------- */
.row.nocheck { grid-template-columns: 36px minmax(180px, 260px) 1fr; }
.serial-panel { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fafbfd; }
.serial-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.serial-head input { flex: 1 1 200px; max-width: 280px; margin-left: auto; }
.serial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; max-height: 320px; overflow-y: auto; }
.serial { font-family: Consolas, "Courier New", monospace; font-size: 12px; padding: 3px 6px; border-radius: 4px; background: #fff; border: 1px solid var(--line); }
.serial.dup { background: var(--bad-soft); border-color: #f3c3be; color: var(--bad); font-weight: 700; }
.acc-chip.sirim { background: #fdf2e3; color: #9a5b00; }
.sirim-table { width: 100%; }
.sirim-table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
@media print {
  .row.nocheck { grid-template-columns: 24px 200px 1fr; }
  .serial-panel { max-height: none; }
  .serial-grid { max-height: none; overflow: visible; }
}

.serial-note { font-size: 13px; line-height: 1.6; }
.serial-note .muted { display: block; font-size: 12px; }

/* ---------- Versions ---------- */
.ver-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.ver-list { max-height: calc(100vh - 200px); overflow-y: auto; margin-bottom: 0; }
.ver-item { padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ver-item:hover { background: #f6f8fc; }
.ver-item.active { background: var(--primary-soft); border-left: 3px solid var(--primary); }
.ver-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ver-no { font-weight: 800; }
.ver-changes { font-size: 12px; margin-top: 3px; color: var(--text); }
.ver-bar { align-items: center; }
.ver-bar select { flex: 1 1 220px; }
.ver-table td { font-size: 13px; vertical-align: top; white-space: pre-line; }
.ver-table tbody tr { cursor: default; }
.ver-table tr.ver-diff td { background: #fffbe6; }
.ver-table tr.ver-diff td.ver-a { color: #9a3412; }
.ver-table tr.ver-diff td.ver-b { color: var(--ok); font-weight: 600; }
@media (max-width: 1000px) { .ver-layout { grid-template-columns: 1fr; } .ver-list { max-height: 260px; } }
@media print { .ver-layout { display: block; } .ver-table td { font-size: 10px; } }

/* ---------- Versions: full document ---------- */
.ver-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.ver-tab { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font: inherit;
  font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); }
.ver-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.vd-ver { margin-top: 6px; display: inline-block; padding: 3px 12px; border-radius: 999px; background: #fdf2e3; color: #9a5b00; font-size: 12px; font-weight: 700; }
.vd-val { font-size: 13px; white-space: pre-line; }
.vd-file { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0; }
.vd-tick { color: var(--ok); font-weight: 600; font-size: 12px; }
#verDocView .card-head { cursor: default; }
@media print { .vd-ver { border: 1px solid #999; } }

/* tick one or more choices (ST / eCOS) */
.multi { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 6px 0; }
.multi-opt { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.multi-opt input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

/* print: tick boxes must print as real boxes (ticked / not ticked), not as an underline */
@media print {
  main .card input[type=checkbox] {
    appearance: auto; -webkit-appearance: checkbox; width: 13px; height: 13px; margin: 0 4px 0 0;
    border: none; padding: 0; background: none; accent-color: #000;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}

/* print: every tick box is printed as a clear ☐ / ☑ symbol (does not depend on how the browser prints tick boxes) */
@media print {
  main .card label:has(> input[type=checkbox]) > input[type=checkbox] { display: none !important; }
  main .card label:has(> input[type=checkbox])::before {
    content: "\2610"; font-size: 15px; line-height: 1; margin-right: 5px; color: #000; font-family: "Segoe UI Symbol", "Segoe UI", sans-serif;
  }
  main .card label:has(> input[type=checkbox]:checked)::before { content: "\2611"; }
  main .card .check, main .card .multi-opt { color: #000; }
}

/* ---------- Consignment Test Application ---------- */
.ct-group { background: #e8ecf6; color: #2b3a67; font-weight: 700; font-size: 13px; letter-spacing: .4px; text-transform: uppercase;
  padding: 9px 16px; margin: 0 -1px; border-top: 1px solid var(--line); }
.ct-group:first-child { border-top: none; }
.ct-upper { text-transform: uppercase; }
.ct-upper::placeholder { text-transform: none; }
.ct-unit { display: flex; align-items: stretch; max-width: 260px; }
.ct-unit input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.ct-unit span { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-left: none;
  border-radius: 0 8px 8px 0; background: #f4f6fa; font-weight: 600; font-size: 13px; }
.ct-lookup { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ct-lookup input { flex: 1 1 200px; }
#sirimCard textarea { width: 100%; resize: vertical; font: inherit; }
@media print { .ct-group { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Consignment Test – Section B */
.ct-group.ct-sub { background: #f4f6fb; color: #44506e; font-size: 12px; padding: 7px 16px 7px 28px; }
.ct-note { color: #c0392b; font-size: 12px; margin-top: 6px; }
.ct-note a { color: #1d4ed8; font-weight: 600; }
.ct-lines { display: grid; gap: 6px; }
.ct-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ct-ab { display: flex; align-items: center; gap: 8px; }
.ct-ab > span { font-weight: 700; color: var(--muted); width: 18px; }
.ct-ab > input { flex: 1; min-width: 0; }
.ct-dt { display: grid; grid-template-columns: 1fr 160px; gap: 8px; max-width: 480px; }
#sirimCard select[data-skey] { width: 100%; }
.loc-grid { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 6px 8px; align-items: center; margin-top: 12px; }
.loc-grid > span { font-size: 13px; font-weight: 600; }
.loc-h { font-weight: 700; color: var(--muted); font-size: 12px; }
@media (max-width: 700px) { .ct-pair, .ct-dt { grid-template-columns: 1fr; } .loc-grid { grid-template-columns: 1fr; } .loc-h { display: none; } }

.combo-opt.ct-coa-opt { grid-template-columns: auto 1fr auto; }
.serial-panel:empty { display: none; }
.serial-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.serial-body { margin-top: 8px; }
.serial-body #serialQ { width: 100%; margin-bottom: 8px; }
@media print { .serial-body, .serial-btns { display: none !important; } }
/* Quantity vs serial numbers */
.ct-import { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; }
.ct-qty-msg { font-size: 12px; margin-top: 6px; font-weight: 600; }
.ct-qty-msg.good { color: var(--ok); }
.ct-qty-msg.bad { color: var(--bad); }
.ct-qty-msg.muted { color: var(--muted); font-weight: 400; }

/* the site's own confirm / message window */
.ask-dlg { border: none; border-radius: 14px; padding: 22px 24px 18px; width: min(440px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(20,30,50,.3); }
.ask-dlg::backdrop { background: rgba(20,30,50,.45); }
.ask-msg { white-space: pre-line; font-size: 14px; line-height: 1.5; margin-bottom: 18px; overflow-wrap: anywhere; }

/* Save + Submit at the bottom of a form */
.submit-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }

/* two people changed the same detail */
.cf-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.cf-label { font-weight: 700; margin-bottom: 6px; }
.cf-opt { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; cursor: pointer; font-size: 13px; }
.cf-opt input { margin-top: 3px; }
.cf-by { display: block; font-size: 11px; }

/* Settings > AppSheet */
.as-card { padding: 18px 20px; margin-bottom: 16px; }
.as-card h3 { margin: 0 0 10px; font-size: 15px; }
.as-steps { margin: 0 0 12px; padding-left: 20px; line-height: 1.7; font-size: 13px; }
.as-script-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; font-size: 13px; }
.as-script-head .btn { margin-left: auto; }
.as-script { width: 100%; font-family: Consolas, "Courier New", monospace; font-size: 12px; background: #f7f8fb; }
.as-row { display: grid; grid-template-columns: 180px 1fr; gap: 12px; }
.check-line { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
@media (max-width: 700px) { .as-row { grid-template-columns: 1fr; } }

.as-note { background: #f4f7ff; border: 1px solid #d9e2fb; border-radius: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.6; margin-bottom: 12px; }

/* Settings > Email Alerts */
.em-rules { display: grid; gap: 10px; font-size: 13px; line-height: 1.8; }
.em-rules input { padding: 4px 8px; }
.em-grid { display: grid; grid-template-columns: 2fr 1fr 1.3fr; gap: 10px 12px; }
@media (max-width: 700px) { .em-grid { grid-template-columns: 1fr; } }

.em-rule { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.em-rule > input { margin-top: 5px; }

.em-people td, .em-people th { vertical-align: middle; }
.em-people input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); }
.linkish { border: none; background: none; padding: 0; color: var(--primary); font-size: 11px; cursor: pointer; text-decoration: underline; font-weight: 600; }

/* Email templates editor */
.tpl-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tpl-edit textarea, .tpl-edit input[type=text] { width: 100%; font-family: inherit; }
.tpl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.tpl-chip { border: 1px solid #c7d2fe; background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 2px 10px;
  font-size: 12px; font-family: Consolas, monospace; cursor: pointer; }
.tpl-chip:hover { background: #e0e7ff; }
.tpl-preview { position: sticky; top: 70px; padding: 14px; }
.tpl-pv-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tpl-pv-head select { margin-left: auto; width: auto; }
.tpl-subject { font-size: 13px; font-weight: 600; padding: 8px 10px; background: #f7f8fb; border: 1px solid var(--line); border-radius: 8px 8px 0 0; }
#tplFrame { width: 100%; height: 560px; border: 1px solid var(--line); border-top: none; border-radius: 0 0 8px 8px; background: #fff; }
@media (max-width: 900px) { .tpl-layout { grid-template-columns: 1fr; } .tpl-preview { position: static; } }

/* sub-heading inside a Settings section */
.set-sub { padding: 8px 20px 4px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); background: #fbfcfe; border-top: 1px solid var(--line); }

/* Section I: ST / eCOS tabs */
.sec-tabs { display: flex; gap: 6px; padding: 10px 16px 4px; border-bottom: 1px solid var(--line); }
.sec-tab { border: 1px solid var(--line); border-bottom: none; background: #f4f6fa; color: var(--muted); font: inherit; font-weight: 700;
  font-size: 13px; padding: 8px 22px; border-radius: 8px 8px 0 0; cursor: pointer; margin-bottom: -5px; }
.sec-tab.active { background: #fff; color: var(--primary); box-shadow: inset 0 3px 0 var(--primary); }
.row.tab-off, .row.only-off, .tab-head.only-off { display: none !important; }
.tab-head { display: none; }
@media print {
  .row.tab-off:not(.only-off) { display: grid !important; }        /* print both tabs */
  .tab-head:not(.only-off) { display: block !important; font-weight: 700; padding: 8px 12px; background: #eee; margin-top: 6px; }
}

/* tabs sit on top of the section, above the Item / Details / Checklist heading */
.sec-tabs { padding-top: 12px; }
.sec-tabs + .row-head { border-top: none; }

/* Sidebar: department > programs */
.dept { display: flex; flex-direction: column; margin: 0 8px 4px; }
.dept-head {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: none; background: transparent;
  font: inherit; font-size: 13px; font-weight: 800; letter-spacing: .3px; color: var(--text); padding: 8px 10px;
  border-radius: 8px; cursor: pointer; border-left: 3px solid var(--primary);
}
.dept-head:hover { background: #f4f6fa; }
.dept-icon { font-size: 15px; }
.dept-name { flex: 1; }
.dept-head .chev { color: var(--muted); transition: transform .15s; }
.dept:not(.open) .dept-head .chev { transform: rotate(-90deg); }
.dept:not(.open) .dept-body { display: none; }
.dept-body { display: flex; flex-direction: column; padding: 4px 0 0 10px; }
.dept-body .program { margin: 0 0 2px; }

/* Settings > Program Settings: department heading, programs indented under it */
.set-dept { padding: 10px 20px 8px; font-size: 13px; font-weight: 800; color: var(--text); background: #fbfcfe;
  border-top: 1px solid var(--line); border-left: 3px solid var(--primary); }
.set-dept-body .set-link { padding-left: 40px; }

/* ---------- Email Batch ---------- */
.eb-card .card-head { cursor: default; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.eb-pad { padding: 14px 18px; }
.eb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eb-card textarea { width: 100%; font-family: inherit; line-height: 1.5; }
.eb-fields { font-size: 12px; margin: -4px 0 10px; }
.eb-fields code { background: #eef2ff; color: #3730a3; border-radius: 6px; padding: 1px 6px; margin-right: 4px; }
.eb-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.eb-table-wrap { max-height: 460px; overflow: auto; }
.eb-table td, .eb-table th { vertical-align: top; font-size: 12px; }
.eb-table input { min-width: 140px; padding: 5px 7px; font-size: 12px; }
.eb-table tr.eb-sel td { background: #f5f8ff; }
.eb-mail { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.eb-mail-head { background: #f7f8fb; border-bottom: 1px solid var(--line); padding: 10px 14px; font-size: 13px; line-height: 1.7; }
.eb-mail-head b { display: inline-block; width: 64px; color: var(--muted); font-weight: 600; }
.eb-sent { color: var(--ok); font-weight: 600; font-size: 12px; }
.eb-warn { color: var(--bad); font-weight: 600; font-size: 12px; margin: 4px 0; }
#ebFrame { width: 100%; height: 520px; border: none; background: #fff; }
@media (max-width: 700px) { .eb-grid { grid-template-columns: 1fr; } }

/* sidebar blocks the person has no access to */
.dept[hidden], .program[hidden], .sub-link[hidden] { display: none !important; }

.eb-steps { margin: 6px 0 12px; padding-left: 20px; line-height: 1.6; font-size: 13px; }
.eb-steps li { margin-bottom: 8px; }

/* Email Batch template editor */
.eb-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; border: 1px solid var(--line);
  border-bottom: none; border-radius: 8px 8px 0 0; background: #f7f8fb; }
.eb-toolbar + textarea { border-top-left-radius: 0; border-top-right-radius: 0; }
.eb-tool { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.eb-tool:hover { background: #eef2ff; }
.eb-tool-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.eb-chip { border: 1px solid #c7d2fe; background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 2px 10px; font-size: 12px;
  font-family: Consolas, monospace; cursor: pointer; margin: 2px; }
.eb-chip:hover { background: #e0e7ff; }

/* Email Batch: formatted-text editor */
.eb-editor { min-height: 280px; max-height: 560px; overflow: auto; border: 1px solid var(--line); border-radius: 0 0 8px 8px;
  padding: 12px 14px; background: #fff; font-family: Segoe UI, Arial, sans-serif; font-size: 14px; line-height: 1.5; color: #1f2937; outline: none; }
.eb-editor:focus { border-color: var(--primary); box-shadow: 0 0 0 2px #b9cdf1; }
.eb-editor.readonly { border-radius: 8px; background: #fafbfc; }
.eb-editor p { margin: 0 0 10px; }
.eb-color { position: relative; display: inline-flex; align-items: center; }
.eb-color input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
select.eb-tool { width: auto; padding: 3px 6px; }

/* Email Batch: import from Word */
.eb-word-note { margin: 4px 0 12px; padding: 10px 12px; border: 1px solid #c7d2fe; background: #f5f7ff; border-radius: 8px; font-size: 13px; }
.eb-word-note ul { margin: 6px 0 0; padding-left: 18px; }
.eb-word-note li { margin: 3px 0; }

/* Email Batch: sending limit / paused */
.eb-quota { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; padding: 12px 16px; margin-bottom: 14px; }
.eb-quota-set { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.eb-quota-set label { display: flex; gap: 6px; align-items: center; font-weight: 600; }
.eb-paused { border: 1px solid #fecaca; background: #fef2f2; color: #7f1d1d; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; font-size: 13px; }
.eb-table textarea.eb-cell { width: 100%; min-width: 140px; resize: vertical; font: inherit; font-size: 13px; line-height: 1.35;
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.eb-find { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 10px; }
.eb-find input[type=search] { flex: 1; min-width: 220px; max-width: 460px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; font-size: 14px; background: #fff; }
.eb-find input[type=search]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px #b9cdf1; }
.eb-find select { width: auto; }

/* HR Dept: Staff Master Data */
.hr-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hr-toolbar input[type=search] { flex: 1; min-width: 220px; max-width: 420px; }
.hr-toolbar select { width: auto; }
.hr-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { .hr-form { grid-template-columns: 1fr; } }

/* Settings > HR Setting */
.hrs-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .hrs-grid { grid-template-columns: 1fr; } }
.hrs-body { padding: 12px 16px 16px; }
.hrs-row { display: flex; gap: 6px; margin-bottom: 6px; }
.hrs-row input { flex: 1; }
.hrs-outlet { display: grid; grid-template-columns: 130px 1fr auto; gap: 6px; margin-bottom: 6px; align-items: center; }
.hrs-head { font-size: 12px; font-weight: 700; color: var(--muted, #6b7280); text-transform: uppercase; letter-spacing: .03em; }
.hrs-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* Access Control: Access Roles */
.acc-chip.role { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.acc-rolebody { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; padding: 12px 16px 6px; }
.acc-rolebody select { width: auto; min-width: 220px; }
.acc-rolebody .check-line { font-weight: 500; font-size: 13px; }
.hrs-note { font-size: 12px; background: #f5f3ff; border: 1px solid #ddd6fe; color: #4c1d95; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }

.ver-pdf { margin-left: auto; font-size: 11px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; background: #fff; }
.ver-pdf:hover { background: #eef2ff; }
.hr-resigned td { color: #9ca3af; }
.hr-resigned td strong { color: #6b7280; }
.toolbar.hr-toolbar input[type=search] { flex: 1 1 260px; max-width: 420px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; }
.toolbar.hr-toolbar select { flex: 0 0 auto; width: auto; min-width: 0; }
.sec-tabhint { align-self: center; margin-left: 10px; font-size: 12px; color: #92400e; }

/* Staff Master Data: batch actions */
.hr-selcol { width: 34px; text-align: center; cursor: pointer; }
.hr-selcol input { width: 16px; height: 16px; cursor: pointer; }
tr.hr-picked td { background: #eef2ff; }
.hr-batch { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 14px; background: #eef2ff;
  border-top: 1px solid #c7d2fe; border-bottom: 1px solid #c7d2fe; }
.hr-batch strong { margin-right: 6px; color: #3730a3; }
.hr-bulk { display: grid; grid-template-columns: 150px 1fr; gap: 8px 12px; align-items: center; }
.hr-new { background: #fef3c7; border-color: #fcd34d; color: #92400e; font-weight: 600; }
.hr-new:hover { background: #fde68a; }

/* HR Dept: MC Request */
.mcs { display: inline-block; min-width: 86px; text-align: center; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #fff; }
.mcs-incomplete { background: #991b1b; box-shadow: 0 0 0 2px #fecaca; }
.mc-recv { font-size: 11px; font-weight: 600; margin-top: 2px; } .mc-recv.ok { color: #16a34a; } .mc-recv.no { color: #dc2626; }
.mc-stat-bad .n { color: #dc2626; }
.mcs-processing { background: #9ca3af; } .mcs-approved { background: #2563eb; } .mcs-completed { background: #16a34a; } .mcs-rejected { background: #dc2626; }
.mc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
@media (max-width: 760px) { .mc-grid { grid-template-columns: 1fr; } }
.mc-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; border: 2px dashed #94a3b8;
  border-radius: 10px; cursor: pointer; background: #f8fafc; padding: 16px; text-align: center; }
.mc-drop.over, .mc-drop:hover { border-color: var(--primary); background: #eef2ff; }
.mc-drop-icon { font-size: 34px; }
.mc-picked { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mc-file { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 12px; background: #fff; }
.mc-file img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
.mc-pdf { width: 48px; height: 48px; display: grid; place-items: center; background: #fee2e2; color: #b91c1c; font-weight: 700; border-radius: 4px; }
.mc-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 8px; }
.btn-success { background: #16a34a; border-color: #16a34a; color: #fff; }
.mc-shots { display: flex; flex-wrap: wrap; gap: 10px; }
.mc-shots img { max-width: 260px; max-height: 260px; border: 1px solid var(--line); border-radius: 8px; object-fit: contain; background: #fff; }
.mc-pdfbox { display: inline-flex; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.mc-hr { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }
.mc-leadbox { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #f1f5f9; }
.mc-leadbox.low { background: #fee2e2; color: #b91c1c; }
.mc-lead-low { color: #dc2626; font-weight: 700; }
.mc-remind { padding: 12px 16px; margin-bottom: 14px; background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.mc-remind a { color: #991b1b; }
.mc-flt { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.mc-flt select, .mc-flt input { width: auto; }
.mc-table td, .mc-table th { white-space: nowrap; }
.mc-pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; }
.hrs-mc { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font-size: 13px; }
.hrs-mc input { width: 70px; margin: 0 4px; }
.mc-form .card-body { padding: 16px 20px 20px; }
.mc-form .card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
/* compulsory fields: red star; empty ones turn red after pressing Submit / Save */
.req { color: #dc2626; font-weight: 700; }
form.tried :invalid, form.tried input:invalid, form.tried select:invalid { border-color: #dc2626 !important; box-shadow: 0 0 0 2px #fecaca; }
.mc-drop.missing { border-color: #dc2626; background: #fef2f2; }
.mcs-submitted { background: #9ca3af; } .mcs-processing { background: #f59e0b; }
.stats.mc-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 700px) { .stats.mc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* side menu: scrolls by itself when the programs do not fit the screen */
.sidebar { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.sidebar > * { flex-shrink: 0; }
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
@media (max-width: 900px) { .sidebar { height: calc(100vh - 58px); } }
/* sortable table headings */
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--primary); background: #eef2ff; }
th.sorted { color: var(--primary); }
.sort-arrow { font-size: 10px; }
.hr-batch[hidden] { display: none !important; }
/* first passwords (shown once) + server settings */
.pw-warn { background: #fef3c7; border: 1px solid #fcd34d; color: #78350f; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.pw-table { max-height: 320px; overflow: auto; }
.pw-code { font-size: 14px; font-weight: 700; background: #eef2ff; padding: 2px 8px; border-radius: 6px; letter-spacing: .5px; }
.pw-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.srv-form { align-items: center; gap: 12px; flex-wrap: wrap; }
.srv-inputs { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.srv-inputs input[type=text] { width: 260px; }
.mc-leadcell { display: inline-block; min-width: 64px; padding: 3px 10px; border-radius: 999px; background: #eef2ff; color: #1e3a8a; font-size: 13px; }
.mc-leadcell.low { background: #fee2e2; color: #b91c1c; }
.mc-leadcell.done { background: #f1f5f9; color: #64748b; }

/* HR Dept: Transfer Form */
.trs-drafted { background: #facc15; color: #713f12; } .trs-processing { background: #2563eb; } .trs-completed { background: #16a34a; }
.trs-checked { background: #9ca3af; } .trs-cancelled { background: #dc2626; }
.tr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
@media (max-width: 760px) { .tr-grid { grid-template-columns: 1fr; } }
.tr-times { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px 10px; margin: 6px 0; }
@media (max-width: 900px) { .tr-times { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tr-fromto { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 8px; align-items: center; }
.tr-fromto > span { font-size: 12px; font-weight: 600; color: var(--muted, #6b7280); }
.tr-line { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; background: #fafbff; }
.tr-line-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.tr-logins { display: flex; gap: 16px; flex-wrap: wrap; }
.tr-signs { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.tr-sign { flex: 1 1 260px; }
.tr-sign-t { font-weight: 700; text-decoration: underline; margin-bottom: 4px; font-size: 13px; }
.tr-sign textarea { width: 100%; }
.tr-menu-cell { position: relative; width: 40px; }
.tr-dots { font-size: 16px; line-height: 1; padding: 2px 8px; }
.tr-menu { position: fixed; z-index: 60; left: 0; top: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 110px; padding: 4px; }
.tr-menu a, .tr-menu button { display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; background: none; font: inherit; font-size: 13px; color: inherit; text-decoration: none; cursor: pointer; border-radius: 6px; }
.tr-menu a:hover, .tr-menu button:hover { background: #eef2ff; }
.tr-menu[hidden] { display: none; }
.tr-search th { padding: 4px 6px; background: #f8fafc; }
.tr-search input, .tr-search select { width: 100%; font-size: 12px; padding: 4px 6px; }
.tr-tmp td, .tr-tmp th { white-space: nowrap; font-size: 12px; }
.hrs-outlet { grid-template-columns: 110px 1fr auto auto !important; }
.hrs-hours { white-space: nowrap; }

/* ---------------- General – Memo */
.memo-new-n { display: inline-block; background: #dc2626; color: #fff; border-radius: 999px; font-size: 10px; font-weight: 700; padding: 0 6px; margin-left: 4px; line-height: 16px; }
.memo-new-n[hidden] { display: none; }
.memo-h1 { display: flex; align-items: center; gap: 12px; }
.memo-modes { display: inline-flex; gap: 2px; }
.memo-modes .btn { font-size: 16px; padding: 2px 9px; }
.memo-modes .btn.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.memo-wait { background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.memo-wait.ok { background: #f0fdf4; border-color: #bbf7d0; }
.memo-wait.warn { background: #fffbeb; border-color: #fde68a; }
.memo-wait.bad { background: #fef2f2; border-color: #fecaca; }
.memo-year { margin-bottom: 8px; }
.memo-yh { background: none; border: 0; font: inherit; font-size: 20px; font-weight: 800; text-decoration: underline; cursor: pointer; color: inherit; padding: 6px 0; display: flex; align-items: center; gap: 8px; }
.memo-yh .chev { font-size: 14px; text-decoration: none; }
.memo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; margin: 6px 0 18px; }
.memo-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; background: none; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; }
.memo-thumb { position: relative; aspect-ratio: 3 / 4; background: #fff; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 22px; letter-spacing: 3px; color: #1e293b; box-shadow: 0 1px 3px rgba(0,0,0,.06); transition: transform .15s, box-shadow .15s, border-color .15s; }
.memo-card:hover .memo-thumb { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.memo-thumb small { font-size: 11px; letter-spacing: 0; color: #64748b; margin-top: 6px; }
.memo-kind { position: absolute; bottom: 8px; font-size: 11px; letter-spacing: 0; }
.memo-new { position: absolute; top: 8px; right: 8px; background: #dc2626; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .5px; padding: 2px 6px; border-radius: 999px; }
.memo-new.static { position: static; vertical-align: middle; }
.memo-plus { font-size: 64px; font-weight: 200; letter-spacing: 0; color: #334155; line-height: 1; }
.memo-cap { font-size: 12px; display: grid; grid-template-columns: auto 1fr; gap: 0 6px; overflow-wrap: anywhere; }
.memo-cap span:nth-child(odd) { font-weight: 600; white-space: nowrap; }
.memo-li { margin-bottom: 20px; }
.memo-li-h { display: flex; gap: 16px; align-items: center; font-weight: 700; padding: 4px 2px 6px; }
.memo-li-h .grow { flex: 1; text-align: center; }
.memo-li-body { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.memo-li-load { padding: 30px; text-align: center; }
.memo-pdf { width: 100%; height: 78vh; min-height: 420px; border: 0; display: block; background: #f1f5f9; }
.memo-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.memo-choice-b { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 200px; border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: inherit; font-size: 16px; background: #fff; transition: border-color .15s, background .15s; text-align: center; padding: 12px; }
.memo-choice-b:hover { border-color: var(--primary); background: #eef2ff; }
.memo-choice-i { font-size: 54px; line-height: 1; }
@media (max-width: 600px) { .memo-choice { grid-template-columns: 1fr; } }
.memo-page { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.memo-page > .memo-paper:only-child { grid-column: 1 / -1; }
@media (max-width: 1000px) { .memo-page { grid-template-columns: 1fr; } }
.memo-paper { overflow: hidden; background: #fff; }
.memo-stamp { display: flex; justify-content: flex-end; padding: 10px 24px 18px; border-top: 1px solid var(--line); }
.memo-side { padding-bottom: 12px; }
.memo-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; padding: 10px 14px; font-size: 13px; overflow-wrap: anywhere; }
.memo-kv span:nth-child(odd) { color: #64748b; white-space: nowrap; }
.memo-hist { padding: 0 14px; font-size: 12px; }
.memo-hist summary { cursor: pointer; font-weight: 600; margin-bottom: 6px; }
.memo-hist div { margin-bottom: 4px; }
.memo-letter { background: #fff; color: #111; max-width: 820px; margin: 0 auto; padding: 28px 36px; font-family: "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.5; }
.memo-lh { width: 100%; max-height: 110px; object-fit: contain; display: block; margin-bottom: 8px; }
.memo-title { text-align: center; font-size: 26px; font-weight: 800; letter-spacing: 6px; color: #1e3a8a; margin: 6px 0 12px; }
.memo-meta { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.memo-meta td { border: 1px solid #cbd5e1; padding: 6px 10px; vertical-align: top; }
.memo-meta td:nth-child(odd) { background: #f1f5f9; font-weight: 600; width: 16%; white-space: nowrap; }
.memo-content { min-height: 120px; overflow-wrap: anywhere; }
.memo-sign { width: 240px; margin-top: 28px; }
.memo-sign-t { font-weight: 700; text-decoration: underline; }
.memo-sign-img { height: 70px; display: flex; align-items: flex-end; }
.memo-sign-img img { max-height: 70px; max-width: 230px; }
.memo-sign-line { border-bottom: 1px solid #111; margin: 2px 0 6px; }
.mm-form { padding: 18px 20px; }
.mm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
@media (max-width: 700px) { .mm-grid { grid-template-columns: 1fr; } }
.mm-file { font-size: 13px; color: var(--primary); font-weight: 600; }
.mm-editor { min-height: 280px; }
.mm-editor.missing { outline: 2px solid #dc2626; }
.mm-aud { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-top: 10px; }
.mm-aud.missing { border-color: #dc2626; background: #fef2f2; }
.mm-aud.disabled .mm-group:not(.mm-all) { opacity: .4; pointer-events: none; }
.mm-group { margin-top: 10px; }
.mm-gt { font-weight: 700; font-size: 13px; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mm-gtools { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
.mm-gtools input { font-size: 12px; padding: 3px 8px; width: 180px; }
.mm-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.mm-checks.scroll { max-height: 230px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.mm-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; min-width: 150px; cursor: pointer; }
.mm-check[hidden] { display: none; }
.mm-btns { display: flex; gap: 8px; margin-top: 16px; }
.mm-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; font-size: 13px; flex-wrap: wrap; }
.mm-top select, .mm-top input { font-size: 13px; padding: 3px 6px; }
.mms-processing { background: #f59e0b; }
.mms-approved { background: #2563eb; }
.mms-posted { background: #16a34a; }
.mms-cancelled { background: #dc2626; }
.sig-wrap { display: flex; align-items: flex-end; gap: 8px; margin: 4px 0 8px 26px; min-width: 0; }
.sig-wrap .sig-pad { flex: 1; min-width: 0; }
.sig-pad { border: 1px dashed #94a3b8; border-radius: 8px; background: #fff; touch-action: none; width: 100%; max-width: 460px; height: 150px; cursor: crosshair; }
.sig-saved { margin: 2px 0 8px 26px; }
.sig-saved img { max-height: 80px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 4px; }
.hrs-outlet { grid-template-columns: 130px minmax(220px, 1fr) 190px 150px 40px !important; }
.hrs-row select { font-size: 13px; }
.mm-top label { display: inline-flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.mm-top select { width: auto !important; }
.mm-top input { width: 200px !important; }
.sig-cell { background: #fff; border: 1px dashed var(--line); border-radius: 6px; padding: 2px 8px; cursor: pointer; min-width: 90px; height: 38px; display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: 12px; color: var(--primary); }
.sig-cell:hover { border-color: var(--primary); background: #eef2ff; }
.sig-cell img { max-height: 32px; max-width: 120px; }
.sig-current { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sig-current .sig-saved { margin: 0; }
.sig-upl-pv:empty { display: none; }
#sigDel[hidden] { display: none !important; }
.acc-dept-row td { background: #eef2ff; font-weight: 700; font-size: 13px; color: var(--primary); padding-top: 8px; padding-bottom: 8px; cursor: default; }
.acc-pos { padding-left: 34px !important; }
.acc-role-fields { display: grid; grid-template-columns: 240px minmax(0, 420px); gap: 12px; margin-top: 10px; }
@media (max-width: 700px) { .acc-role-fields { grid-template-columns: 1fr; } }
.mm-check.off { display: none !important; }
.mm-cnote { font-size: 12px; margin-top: 4px; }
.mm-cnote:empty { display: none; }
.mm-preview { margin-top: 16px; overflow: hidden; }
.mm-pv-info { border-bottom: 1px solid var(--line); padding: 12px 16px; font-size: 13px; }
.mm-pv-todo { color: #b45309; font-style: italic; }
.mm-pv-body { background: #f1f5f9; padding: 16px; }
.mm-pv-body .memo-letter { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.mm-pv-body .memo-stamp { background: #fff; align-items: flex-end; }
.memo-thumb { overflow: hidden; }
.memo-thumb.has-pv .memo-ph { display: none; }
.memo-thumb-pv { position: absolute; inset: 0; overflow: hidden; background: #fff; }
.memo-thumb-pv img { width: 100%; display: block; }
.memo-thumb-scale { width: 820px; transform-origin: top left; pointer-events: none; }
.memo-thumb-scale .memo-letter { padding: 24px 32px; }
.memo-thumb-no { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; background: rgba(255,255,255,.94); border-top: 1px solid var(--line);
  font-size: 11px; letter-spacing: 0; text-align: center; color: #475569; padding: 4px 6px; }
.memo-thumb .memo-new { z-index: 3; }
.memo-thumb-pv.wide { display: flex; align-items: center; padding-bottom: 24px; background: #f8fafc; }
.hrs-wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .hrs-outlet { grid-template-columns: 1fr 1fr !important; } }
.new-version { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1000; display: flex; align-items: center; gap: 10px;
  background: #1e293b; color: #fff; padding: 10px 14px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 14px; max-width: calc(100% - 32px); flex-wrap: wrap; }
.new-version .btn:not(.btn-primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
/* ---------------- General Dashboard */
.gd-stats .stat { text-decoration: none; color: inherit; }
.gd-stats a.stat:hover { border-color: var(--primary); }
.gd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .gd-grid { grid-template-columns: 1fr; } }
.gd-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.gd-more { font-size: 13px; font-weight: 600; text-decoration: none; }
.gd-list { padding: 6px 14px 12px; }
.gd-memo { display: flex; flex-direction: column; gap: 2px; padding: 10px 6px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; border-radius: 6px; }
.gd-memo:hover { background: #eef2ff; }
.gd-memo .muted { font-size: 12px; }
.gd-note { display: block; margin: 0 14px 10px; padding: 8px 12px; border-radius: 8px; background: #eef2ff; border: 1px solid #c7d2fe; text-decoration: none; font-size: 13px; }
.gd-upd { padding: 10px 6px; border-bottom: 1px solid var(--line); }
.gd-upd.is-new { background: #fffbeb; border-radius: 6px; }
.gd-upd-h { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.gd-upd ul { margin: 6px 0 0; padding-left: 20px; font-size: 13px; }
.gd-upd li { margin-bottom: 2px; }
.gd-older summary { cursor: pointer; font-size: 13px; font-weight: 600; padding: 10px 6px 4px; }
.gd-tasks { margin-top: 16px; }
.gd-task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; padding: 12px 14px 14px; }
.gd-task { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; }
.gd-task-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; padding: 4px 4px 6px; border-bottom: 1px solid var(--line); }
.gd-count { background: #dc2626; color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 1px 8px; }
.gd-task .gd-more { display: inline-block; padding: 8px 6px 2px; }
.gd-hot { border-color: #fca5a5 !important; background: #fef2f2 !important; }
.gd-hot .n { color: #dc2626; }
.gd-docs { margin-top: 16px; }
.gd-doc-tools { display: inline-flex; gap: 8px; font-weight: 400; flex-wrap: wrap; }
.gd-doc-tools select { width: auto; font-size: 13px; padding: 4px 8px; }
.gd-doc-tools input { width: 230px; font-size: 13px; padding: 4px 8px; }
.gd-doc-table tbody tr { cursor: pointer; }
.gd-doc-table td { font-size: 13px; }
.gd-doc-foot { padding: 8px 14px 12px; }
.gd-doc-foot:empty { display: none; }
.gds { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.gds-ok { background: #dcfce7; color: #166534; } .gds-run { background: #dbeafe; color: #1e40af; } .gds-wait { background: #fef3c7; color: #92400e; }
.gds-bad { background: #fee2e2; color: #991b1b; } .gds-off { background: #f1f5f9; color: #475569; }
/* ---------------- User Manual */
.man-tools { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; }
.man-tools input[type=search] { flex: 1; min-width: 240px; max-width: 520px; }
.man-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .man-wrap { grid-template-columns: 1fr; } .man-toc { position: static !important; } }
.man-toc { position: sticky; top: 76px; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.man-toc-h { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: #64748b; padding: 4px 8px 6px; }
.man-toc a { padding: 6px 8px; border-radius: 6px; text-decoration: none; font-size: 13px; color: inherit; }
.man-toc a:hover { background: #eef2ff; color: var(--primary); }
.man-sec { padding: 14px 20px 10px; margin-bottom: 16px; }
.man-sec h2 { margin: 0 0 4px; font-size: 18px; color: var(--primary); }
.man-sec h3 { margin: 14px 0 6px; font-size: 14px; }
.man-sec ol { margin: 0; padding-left: 22px; }
.man-sec li { margin-bottom: 5px; font-size: 14px; line-height: 1.55; }
.man-intro { margin: 0 0 4px; color: #64748b; font-size: 13px; }
.side-label[hidden], .side-admin .sub-link[hidden] { display: none !important; }
/* Staff Master Data: coverage */
.hr-cover { font-size: 12px; max-width: 220px; white-space: normal; }
.hr-cov { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.hr-cov summary { cursor: pointer; font-weight: 700; font-size: 13px; }
.hr-cov-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 6px; font-size: 13px; }
.hr-cov-h input { width: 200px; font-size: 12px; padding: 4px 8px; }
/* Access Control: position structure */
.pos-tree { white-space: nowrap; }
.pos-line { color: #94a3b8; margin-right: 6px; font-family: Consolas, monospace; }
.pos-root td { background: #f8fafc; }
.pos-dept { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 600; color: #475569; background: #eef2ff; border-radius: 999px; padding: 1px 8px; }
.acc-role-fields { grid-template-columns: 220px minmax(0, 360px) 260px !important; }
@media (max-width: 900px) { .acc-role-fields { grid-template-columns: 1fr !important; } }
/* suggestion list (replaces the browser's own datalist popup) */
.combo-box { position: fixed; z-index: 3000; max-height: 320px; overflow: auto; background: #fff; color: #0f172a; border: 1px solid #cbd5e1;
  border-radius: 10px; box-shadow: 0 12px 32px rgba(15,23,42,.18); padding: 4px; }
.combo-item { display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.combo-item strong { font-size: 14px; }
.combo-item span { font-size: 12px; color: #64748b; }
.combo-item:hover { background: #f1f5f9; }
.combo-item.on { background: #e0e7ff; }
.combo-more { padding: 8px 10px; font-size: 12px; color: #64748b; }
.hr-imp-cov { margin-top: 8px; font-size: 12px; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 8px; padding: 8px 10px; line-height: 1.5; }
.auth-lang { text-align: center; margin-top: 10px; font-size: 13px; }
.auth-lang a { text-decoration: none; font-weight: 600; }
.lang-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; font-weight: 700;
  color: var(--primary); cursor: pointer; margin-right: 8px; white-space: nowrap; }
.lang-btn:hover { background: #eef2ff; border-color: var(--primary); }
/* ---- Time Adjustment */
.tas-draft { background: #facc15; color: #713f12; } .tas-submitted { background: #111827; } .tas-processing { background: #0ea5e9; }
.tas-incomplete { background: #f97316; } .tas-completed { background: #eab308; } .tas-ack { background: #16a34a; } .tas-cancelled { background: #dc2626; }
.ta-head { margin-bottom: 14px; } .ta-head th { background: #e5e7eb; white-space: nowrap; }
.ta-grid th { background: #e5e7eb; font-size: 12px; white-space: nowrap; } .ta-grid td { padding: 4px 5px; font-size: 12.5px; vertical-align: middle; }
.ta-grid input, .ta-grid select { padding: 4px 6px; font-size: 12.5px; }
.ta-grid input[type=time] { width: 88px; } .ta-grid input[type=date] { width: 126px; } .ta-grid input[data-f=staffId] { width: 90px; }
.ta-grid select { min-width: 78px; max-width: 170px; } .ta-grid input[data-f=remark] { width: 140px; }
.ta-view td { white-space: nowrap; } .ta-auto { color: #475569; white-space: nowrap; }
.ta-add { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #94a3b8; background: #fff; font-size: 18px; cursor: pointer; margin: 8px 0 0 4px; color: #475569; }
.ta-add:hover { border-color: var(--primary); color: var(--primary); }
.ta-agree { margin-top: 14px; font-weight: 600; }
.ta-ev { white-space: nowrap; }
.ta-thumb { width: 34px; height: 34px; padding: 0; border: 1px solid #cbd5e1; border-radius: 6px; background: #f8fafc; cursor: zoom-in; overflow: hidden; vertical-align: middle; font-size: 16px; }
.ta-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; } .ta-thumb:hover { border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79, 70, 229, .2); }
.ta-thumb.ta-wait { border-style: dashed; border-color: #f59e0b; } .ta-file { text-decoration: none; margin-right: 1px; } .ta-evlink { display: block; font-size: 12px; text-decoration: none; }
.ta-x { border: 0; background: none; cursor: pointer; color: #94a3b8; padding: 0 3px; } .ta-x:hover { color: #dc2626; }
.ta-up { border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; cursor: pointer; padding: 2px 7px; }
tr.ta-declined td { background: #fff7ed; } tr.ta-note td { background: #fff7ed; color: #c2410c; font-size: 12px; padding-top: 0; }
.ta-pill { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; }
.ta-pill.ok { background: #bbf7d0; color: #14532d; } .ta-pill.bad { background: #fed7aa; color: #7c2d12; }
.ta-why { font-size: 11.5px; color: #c2410c; max-width: 200px; white-space: normal; }
.ta-ack { display: flex; gap: 6px; } .ta-ack button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #cbd5e1; background: #fff; cursor: pointer; font-size: 14px; color: #64748b; }
.ta-ack .ta-ok.on { background: #16a34a; border-color: #16a34a; color: #fff; } .ta-ack .ta-no.on { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.ta-why-in { margin-top: 4px; width: 190px; padding: 4px 6px; font-size: 12px; }
.ta-stage { border-left: 4px solid var(--primary); } .ta-stage .card-body { padding: 12px 16px; font-weight: 600; color: #1e3a8a; }
.ta-stat { cursor: pointer; } .ta-stat.on { outline: 2px solid var(--primary); }
.ta-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-start; }
.ta-tools input[type=search] { flex: 1 1 260px; min-width: 200px; max-width: 420px; } .ta-tools select { width: auto; flex: 0 0 180px; }
.ta-dot { color: #dc2626; font-size: 12px; }
.trs-submitted { background: #111827; }
.mc-rmlist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
/* a drop-down (Columns) must not be cut off by its card when the list is short */
.card:has(.col-drop:not([hidden])) { overflow: visible; }
.mc-types { flex-basis: 100%; display: flex; flex-direction: column; gap: 6px; margin: 4px 0; }
.mc-type-row { display: flex; gap: 6px; align-items: center; max-width: 560px; }
.mc-type-row input[data-tc] { width: 110px; flex: 0 0 110px; text-transform: uppercase; } .mc-type-row input[data-tn] { flex: 1; }
.mc-types .btn { align-self: flex-start; }
.lang-menu { position: fixed; z-index: 3000; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.14); padding: 4px; min-width: 160px; }
.lang-menu button { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; background: none; font: inherit; font-size: 14px; cursor: pointer; border-radius: 7px; color: inherit; }
.lang-menu button:hover { background: #eef2ff; } .lang-menu button.on { font-weight: 700; color: var(--primary); }
.auth-lang a { margin: 0 2px; }
/* ---- Memo translations */
.mm-trans { margin-top: 10px; }
.mm-tr-bar { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; flex-wrap: wrap; }
.mm-tr-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .mm-tr-panes { grid-template-columns: 1fr; } }
.mm-tr-pane { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: #fafbff; }
.mm-tr-h { font-weight: 700; color: var(--primary); }
.mm-tr-editor { min-height: 160px; max-height: 420px; }
.mm-langs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
/* ---- "Install the Darson Portal app" bar (phones) */
.install-bar { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 2500; display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(15, 23, 42, .22); padding: 10px 10px 10px 12px; }
.install-bar img { width: 44px; height: 44px; border-radius: 10px; flex: 0 0 44px; }
.install-bar .ib-text { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.3; min-width: 0; }
.install-bar .ib-text strong { color: var(--primary); font-size: 14px; }
.install-bar .ib-text span { color: var(--muted); }
.install-bar .ib-x { border: 0; background: none; font-size: 18px; color: var(--muted); cursor: pointer; padding: 4px 6px; }
@media print { .install-bar { display: none; } }

/* ---------- Warehouse Dept: Online Shop Delivery (Carrier Manifest) ---------- */
.wh-h { margin: 0 0 14px; font-size: 20px; }
.wh-form { padding: 22px 24px; }
.wh-form .field { display: block; margin-bottom: 16px; }
.wh-form .field > span { display: block; font-weight: 600; margin-bottom: 6px; }
.wh-form .field input:not([type=checkbox]), .wh-form .field select { width: 100%; }
.wh-form .field small { display: block; margin-top: 6px; font-size: 13px; line-height: 1.4; }
.wh-form .req { color: var(--bad); font-weight: 400; }
.wh-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.wh-start { width: 100%; margin-top: 8px; padding: 12px; font-size: 16px; font-weight: 700; color: #fff; border: 0;
  background: var(--primary); justify-content: center; text-align: center; }
.wh-start:hover { background: #232870; }
.wh-switch { position: relative; display: inline-block; width: 52px; height: 30px; cursor: pointer; }
.wh-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.wh-switch i { position: absolute; inset: 0; border-radius: 999px; background: #cbd2dc; transition: background .2s; }
.wh-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.wh-switch input:checked + i { background: var(--primary); }
.wh-switch input:checked + i::after { transform: translateX(22px); }
.wh-switch input:focus-visible + i { outline: 2px solid var(--primary); outline-offset: 2px; }
.wh-scan { padding: 18px 20px; }
.wh-scan-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.wh-count { font-size: 14px; font-weight: 600; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 2px 10px; margin-left: 6px; }
.wh-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wh-pill { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px;
  background: #d5dae2; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; }
.wh-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.wh-pill i { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.wh-pill.on { background: var(--primary); flex-direction: row-reverse; padding: 4px 4px 4px 12px; }
.wh-pill input:focus-visible ~ i { outline: 2px solid var(--primary); }
.wh-input { display: block; margin: 8px 0 6px; }
.wh-input > span { display: block; font-weight: 600; margin-bottom: 6px; }
.wh-input input { width: 100%; font-size: 18px; padding: 10px 12px; letter-spacing: .5px; border: 1.5px solid var(--primary); }
.wh-input input:disabled { border-color: var(--line); background: #f4f6fa; }
.wh-msg { min-height: 22px; margin: 4px 0 10px; font-weight: 600; font-size: 14px; }
.wh-msg.ok { color: #138a43; }
.wh-msg.bad { color: #fff; background: var(--bad); border-radius: 8px; padding: 8px 12px; }
.wh-msg.shake { animation: whShake .35s; }
@keyframes whShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.wh-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.wh-cell { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 15px; min-width: 0; }
.wh-cell:first-child { background: var(--primary-soft); }
.wh-no { color: var(--muted); font-size: 13px; min-width: 30px; }
.wh-tr { flex: 1; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.wh-x { border: 0; background: var(--bad-soft); color: var(--bad); border-radius: 6px; width: 28px; height: 28px; cursor: pointer; font-weight: 700; flex: none; }
.wh-x:hover { background: var(--bad); color: #fff; }
.wh-trfind { display: flex; gap: 6px; }
.wh-note { padding: 8px 16px; background: #eef2ff; font-size: 13px; }
@media (max-width: 1000px) { .wh-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) {
  .wh-2 { grid-template-columns: 1fr; }
  .wh-form, .wh-scan { padding: 14px; }
  .wh-trfind { width: 100%; }
  .wh-trfind input { flex: 1; }
}
@media (max-width: 420px) { .wh-grid { grid-template-columns: 1fr; } }
@media print { .wh-tools, .wh-input, .wh-msg { display: none !important; } }
/* phone camera scanning */
.wh-input > .wh-inrow { display: flex; gap: 8px; margin: 0; }
.wh-inrow input { flex: 1; min-width: 0; }
.wh-cambtn { flex: none; font-size: 15px; font-weight: 600; }
.wh-cambtn[hidden] { display: none; }
.wh-cam { position: fixed; inset: 0; z-index: 200; background: #0b1020; color: #fff; display: flex; flex-direction: column;
  padding: max(10px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
.wh-cam-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 10px; font-size: 17px; }
.wh-cam-view { position: relative; flex: 1; min-height: 0; border-radius: 12px; overflow: hidden; background: #000; }
.wh-cam-view video { width: 100%; height: 100%; object-fit: cover; }
.wh-cam-line { position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.wh-cam-view::after { content: ""; position: absolute; left: 8%; right: 8%; top: 32%; bottom: 32%; border: 2px solid rgba(255,255,255,.8); border-radius: 10px; }
.wh-cam-msg { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: #1f2937; font-weight: 600; font-size: 15px; min-height: 22px; }
.wh-cam-msg.ok { background: #138a43; }
.wh-cam-msg.bad { background: var(--bad); }
.wh-cam-hint { margin-top: 6px; font-size: 13px; opacity: .75; text-align: center; }

/* ---------- IT Dept: U2 Session Kill ---------- */
.u2-agent { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.u2-agent i { width: 8px; height: 8px; border-radius: 50%; }
.u2-agent.on { background: var(--ok-soft); color: var(--ok); } .u2-agent.on i { background: var(--ok); }
.u2-agent.off { background: var(--bad-soft); color: var(--bad); } .u2-agent.off i { background: var(--bad); }
.u2-who { margin: 0 0 12px; font-size: 14px; }
.u2-who code { background: var(--primary-soft); color: var(--primary); border-radius: 5px; padding: 1px 6px; }
.u2-note { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; }
.u2-note.bad { background: var(--bad-soft); color: var(--bad); }
.u2-spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%;
  animation: u2spin .8s linear infinite; vertical-align: -2px; }
@keyframes u2spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .u2-spin { animation: none; } }
.u2-tick { width: 34px; text-align: center; }
.u2-tick input { width: 17px; height: 17px; cursor: pointer; accent-color: var(--bad); }
tr.u2-picked td { background: var(--bad-soft); }
.u2-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.u2-sort:hover { color: var(--primary); }
.u2-sort .u2-arrow { font-size: 10px; opacity: .45; }
.u2-sort.on { color: var(--primary); }
.u2-sort.on .u2-arrow { opacity: 1; }
.hr-cov-list { max-height: min(60vh, 560px); overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
dialog.staff-dlg { width: min(900px, calc(100vw - 32px)); }
.hr-cov-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.hr-cov-row:last-child { border-bottom: 0; }
.hr-cov-row label { flex: 1 1 190px; display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; font-size: 13px; }
.hr-cov-d { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.hr-cov-d input[type=date] { width: 132px; padding: 3px 6px; font-size: 12.5px; }
.hr-cov-row.on { background: var(--primary-soft); }
.hr-cov-row.ended label > span { color: var(--muted); text-decoration: line-through; }

/* ---------- Warehouse Dept: Picklist (WMS) ---------- */
.pk-ftp { margin: -4px 0 10px; font-size: 12.5px; }
.pk-sheet { padding: 16px 18px; }
.pk-head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; font-size: 14px; margin-bottom: 12px; }
.pk-head span { display: inline-block; min-width: 110px; color: var(--muted); font-size: 12.5px; }
.pk-head strong { margin-right: 6px; }
.pk-table td, .pk-table th { white-space: nowrap; }
.pk-table code { font-size: 13px; }
.pk-box { font-family: ui-monospace, Consolas, monospace; white-space: pre; }
button.pk-box { border: 1px dashed var(--primary); background: var(--card); color: var(--primary); border-radius: 6px; padding: 2px 6px; cursor: pointer; font-weight: 700; }
.pk-table tr.pk-done td { background: var(--ok-soft); }
.pk-table tr.pk-part td { background: var(--warn-soft); }
.pk-table tr.pk-hit td { box-shadow: inset 0 2px 0 var(--primary), inset 0 -2px 0 var(--primary); }
.pk-table tr.pk-hit td:first-child { box-shadow: inset 2px 2px 0 var(--primary), inset 0 -2px 0 var(--primary); }
.pk-foot { display: flex; justify-content: space-between; margin: 12px 4px 0; font-family: ui-monospace, Consolas, monospace; }
.pk-sign { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.pk-sign > div { border-top: 1.5px solid var(--text); padding-top: 6px; min-width: 0; }
.pk-sign span { display: block; font-weight: 700; font-size: 13px; }
.pk-sign strong { display: block; } .pk-sign em { display: block; font-style: normal; color: var(--muted); font-size: 12px; }
.pk-sign small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.pk-short { border: 1.5px solid var(--bad); border-radius: 8px; margin-top: 8px; padding: 6px 8px; font-size: 12px; }
.pk-short-h { font-weight: 700; color: var(--bad); margin-bottom: 4px; }
.pk-short table { width: 100%; border-collapse: collapse; }
.pk-short th { text-align: left; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--line, #ddd); padding: 2px 4px; }
.pk-short td { padding: 2px 4px; overflow-wrap: anywhere; } .pk-short td + td, .pk-short th + th { text-align: right; white-space: nowrap; }
.pk-short-note { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pk-savebar:not(:empty) { display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.pk-box.pk-draft { background: var(--warn-bg, #fff4d6); border-style: solid; }
.pk-sign .pk-cancel { grid-column: 1 / -1; border: 0; color: var(--bad); font-weight: 600; }
.pk-scanbar { margin-bottom: 8px; }
.pk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.pk-grid .field { display: block; margin-bottom: 10px; } .pk-grid .field > span { display: block; font-weight: 600; margin-bottom: 4px; }
.pk-grid input, .pk-grid select { width: 100%; }
.pk-ftpst { margin: 8px 0; }
@media (max-width: 700px) { .pk-head, .pk-grid, .pk-sign { grid-template-columns: 1fr; } }

.mc-hospnote { grid-column: 1 / -1; padding: 8px 12px; border-radius: 8px; background: var(--soft, #eef2ff); }

.trs-rejected { background: #b91c1c; }
.tr-rejected { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: #fee2e2; color: #991b1b; font-weight: 600; }

.tr-canopy { width: 100%; border-collapse: collapse; } .tr-canopy th { text-align: left; font-size: 12px; padding: 6px; }
.tr-canopy td { padding: 4px; } .tr-canopy input { width: 100%; min-width: 90px; }
.tr-pos-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; max-height: 50vh; overflow: auto; }

.pk-table tr.pe-cur td { box-shadow: inset 0 0 0 2px var(--accent, #2563eb); }

.pe-out { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.pe-lpncard { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 34px 8px 12px; border: 1.5px solid var(--line, #ddd);
  border-radius: 10px; background: var(--card, #fff); cursor: pointer; font: inherit; text-align: left; }
.pe-lpncard.on { border-color: var(--accent, #2563eb); box-shadow: 0 0 0 2px rgba(37, 99, 235, .25); }
.pe-lpncard small { color: var(--muted); } .pe-lpncard .pe-lbl { position: absolute; right: 8px; top: 8px; }
.pe-in { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--soft, #eef2ff); margin: 1px 0; }
.pe-in.on { background: #dbeafe; font-weight: 700; }

.pe-lpnbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.pe-lpnbar[hidden] { display: none; }
.pe-lpnbar > span { font-weight: 600; }
.pe-lpnbar select { width: auto; min-width: 170px; flex: none; }

.pe-qbtns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

.pe-wh { border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.pe-wh-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.pe-wh-head input[type=text] { width: auto; flex: 1; min-width: 160px; } .pe-wh-head input[data-f=code] { flex: none; }
.pe-wh-states { display: flex; flex-wrap: wrap; gap: 4px 14px; }

.mc-table tr.pe-master td { background: var(--soft, #eef2ff); }
.mc-table tr.pe-child td:first-child { padding-left: 26px; }
.pe-branch { color: var(--muted); margin-right: 6px; font-family: monospace; }

.pe-lpncard.ok { border-color: #16a34a; background: #f0fdf4; }

.pe-sns { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pe-sn { display: inline-flex; align-items: center; gap: 4px; font-family: monospace; font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--soft, #eef2ff); }
.pe-sn button { border: 0; background: none; cursor: pointer; color: var(--bad, #dc2626); padding: 0; }

.acc-dept-tog td { cursor: pointer; user-select: none; } .acc-chev { display: inline-block; width: 14px; }
.acc-pick { width: 16px; height: 16px; vertical-align: middle; margin-right: 6px; cursor: pointer; }
.acc-batchbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: #fef9c3; border-top: 1px solid var(--line); }

.acc-rdept { border-top: 1px solid var(--line); }
.acc-rdept-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; border: 0; background: #eef2ff; color: var(--primary);
  font: inherit; font-weight: 800; font-size: 15px; text-align: left; cursor: pointer; }
.acc-rdept.shut .acc-rdept-b { display: none; }
.acc-rdept-b > .prog-title { border-top: 1px solid var(--line); }

.pe-cons { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mc-table tr.pe-diff td { background: #fff7ed; }
.pe-cons tfoot td { background: var(--soft, #eef2ff); }

.pe-fixhint { font-weight: 600; color: var(--primary); padding: 6px 10px; border: 1.5px dashed var(--primary); border-radius: 8px; }
.pe-fixhint[hidden] { display: none; }

.pe-ok { color: #16a34a; font-weight: 800; font-size: 16px; }
.pe-ord td { white-space: nowrap; }

.hr-cov-tog { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 11px; user-select: none; }
.hr-cov-rest[hidden] { display: none; }

.t24 { width: 6.5em; min-width: 0; text-align: center; font-variant-numeric: tabular-nums; }
.t24:invalid { border-color: var(--bad, #dc2626); }
.field .tr-lunch { display: flex; align-items: center; gap: 4px; margin: 0; font-weight: 400; }
.field .tr-lunch .tr-lunch-h { flex: 1 1 0; width: auto; min-width: 0; text-align: center; }
.field .tr-lunch b { font-weight: 400; font-size: 12px; color: var(--muted, #64748b); }

.pe-type { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; border: 1px solid; }

.pe-pack-line { display: flex; gap: 4px; align-items: center; margin-top: 2px; flex-wrap: wrap; }
.pe-pack, .pe-pack-ctn { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; border: 1px solid; white-space: nowrap; }
.pe-pack-ctn { background: #fff; color: #334155; border-color: #94a3b8; }

.pe-col-grid { display: grid; grid-template-columns: minmax(140px, 220px) 56px 1fr; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.pe-col-grid input[type=color] { width: 48px; height: 30px; padding: 2px; border-radius: 6px; cursor: pointer; }
.pe-col-grid > span:last-child, .pe-col-grid span .btn { margin-left: 6px; }
.pe-col-grid .pe-pack-line { display: inline-flex; margin: 0; }

.btn-warning { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.btn-warning:hover { background: #d97706; border-color: #d97706; }

.pe-adj-btn { border: 1px solid var(--line, #cbd5e1); background: #fff; border-radius: 6px; padding: 0 5px; cursor: pointer; font-size: 12px; line-height: 18px; }
.pe-adj-btn:hover { border-color: var(--primary); color: var(--primary); }
.pe-adj-was { font-size: 11px; color: #b45309; white-space: normal; max-width: 160px; margin-left: auto; line-height: 1.3; }
.pe-adj-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; max-width: 520px; }
.pe-adj-row input { flex: 1; }

.pe-aud-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pe-aud-tools input[type=search] { flex: 1 1 220px; }
.pe-aud-doc { background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 8px; padding: 3px 8px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.pe-aud-type { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; border: 1px solid #cbd5e1; background: #f1f5f9; color: #334155; white-space: nowrap; }
.pe-aud-type.t-Picklist { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.pe-aud-type.t-Distribution { background: #dcfce7; color: #15803d; border-color: #86efac; }
.pe-aud-type.t-LPNStock { background: #fef3c7; color: #b45309; border-color: #fcd34d; }

.pe-var-item { border: 1px solid var(--line, #e2e8f0); border-left: 4px solid #dc2626; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.pe-var-item.ok { border-left-color: #16a34a; }
.pe-var-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pe-var-q { white-space: nowrap; }
.pe-var-neg { color: #dc2626; font-weight: 700; }
.pe-var-pos { color: #b45309; font-weight: 700; }
.pe-var-photos { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.pe-var-thumb { position: relative; display: inline-block; }
.pe-var-thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid #cbd5e1; display: block; }
.pe-var-thumb button { position: absolute; top: -6px; right: -6px; border: 0; border-radius: 50%; width: 18px; height: 18px; background: #dc2626; color: #fff; font-size: 11px; cursor: pointer; line-height: 18px; padding: 0; }
.pe-var-item input[type=text] { width: 100%; }

/* WMS menu: Inbound / Outbound / Picklist groups */
.wms-grp { padding: 8px 12px 2px 36px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #64748b); }
.wms-grp.wms-l1 { padding-left: 50px; text-transform: none; letter-spacing: 0; font-size: 12px; }
.sub-link.wms-l1 { padding-left: 50px; }
.sub-link.wms-l2 { padding-left: 64px; font-weight: 500; }

.pe-adj-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 10px; }
.pe-adj-h { font-weight: 700; margin-bottom: 8px; }
.pe-adj-h.add { color: #15803d; }
.pe-adj-h.reduce { color: #b91c1c; }

.pe-var-rem { display: flex; gap: 6px; flex-wrap: wrap; }
.pe-var-rem select { flex: 1 1 180px; }
.pe-var-rem input { flex: 2 1 200px; width: auto !important; }
.pe-adj-h.variance { color: #b45309; }

.pe-aud-val { min-width: 200px; max-width: 360px; max-height: 6.2em; overflow: hidden; white-space: normal; overflow-wrap: anywhere; word-break: break-word; font-size: 12.5px; }
.pe-aud-type.t-Settings { background: #f1f5f9; color: #334155; }

.wh-pics { margin-top: 14px; padding: 18px 20px; }
.wh-pics .wh-h { margin-bottom: 6px; }
.wh-pics .wh-scan-head { margin-bottom: 4px; }
.wh-pic-note { font-size: 12px; margin: 0 0 12px; }
.wh-pics .pe-var-photos { gap: 12px; }
.wh-thumb { padding: 6px 6px 0 0; }
.wh-thumb img { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line, #e2e8f0); background: #fff; }
.wh-thumb button { top: 0; right: 0; width: 22px; height: 22px; line-height: 22px; font-size: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.wh-pic-add { white-space: nowrap; }
@media (max-width: 640px) { .wh-pics { padding: 14px; } .wh-thumb img { width: 96px; height: 96px; } }

.pe-lpnwrap { display: inline-flex; flex-direction: column; gap: 4px; vertical-align: top; }
.pe-lpnwrap .pe-lpncard { width: 100%; }
.pe-done-btn { width: 100%; justify-content: center; }
.pe-lpncard.done { border-style: solid; }
.pe-done-tag { color: #15803d; font-size: 11px; }
.pe-done-toggle { align-self: center; }
.pe-done-btn:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(1); }

.pe-bt { border-top: 1px solid var(--line, #e2e8f0); padding: 12px 16px 6px; }
.pe-bt:first-child { border-top: 0; }
.pe-bt-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.pe-bt-all { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pe-bt-all input { width: 180px; text-transform: uppercase; }
.pe-bt-in { width: 140px; text-transform: uppercase; }

.mm-dirpos { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 260px; overflow: auto; padding: 4px 0; }
.memo-sign-blank { display: inline-block; min-width: 120px; border-bottom: 1px solid #999; height: 1em; vertical-align: bottom; }

.ob-bar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 9999; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 13px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18); cursor: pointer; background: #1e293b; color: #fff; max-width: calc(100vw - 32px); text-align: center; }
.ob-bar.off { background: #b45309; }
.ob-bar.sending { background: #1d4ed8; }
.ob-bar.bad { background: #b91c1c; }

.gs-card { padding: 16px 18px; }
.gs-form { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(220px, 1.6fr) 90px minmax(260px, 2fr) auto; gap: 8px; align-items: end; }
.gs-form input { font-size: 16px; text-transform: uppercase; }
@media (max-width: 920px) { .gs-form { grid-template-columns: 1fr; } }
.gs-form input::placeholder { text-transform: none; }

.gs-bar { height: 6px; background: #e2e8f0; border-radius: 99px; overflow: hidden; min-width: 80px; margin: 2px 0; }
.gs-bar i { display: block; height: 100%; background: #16a34a; }
.gs-bar.big { height: 10px; margin-top: 10px; }

.gs-copy td { font-family: Consolas, 'Courier New', monospace; font-size: 14px; user-select: text; }
/* GRF (Scan Serial Number): the three boxes and Add on one line, all the same height */
.gs-form { align-items: end; }
.gs-form .field { margin: 0; }
.gs-form .field > span:first-child { display: block; min-height: 18px; }
.gs-form .wh-inrow { display: flex; flex-wrap: nowrap; gap: 6px; align-items: stretch; }
.gs-form .wh-inrow input { flex: 1 1 auto; min-width: 0; }
.gs-form .wh-inrow .wh-cambtn { flex: 0 0 auto; white-space: nowrap; }
.gs-form input, .gs-form .wh-cambtn, .gs-form #gsAdd { height: 44px; box-sizing: border-box; }
.gs-form #gsAdd { white-space: nowrap; }
@media (max-width: 760px) { .gs-form #gsAdd { width: 100%; } }
.gs-form .field > .wh-inrow { margin: 0 !important; }

.gs-qprog { margin-top: 8px; font-size: 14px; }
.gs-qprog .gs-bar { margin: 0 0 4px; max-width: 420px; }

/* GRF Batch Banner & Model Selection */
.gs-batch-banner { padding: 14px 18px; margin-bottom: 12px; background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 8px; }
.gs-bb-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid #e2e8f0; padding-bottom: 10px; margin-bottom: 12px; }
.gs-bb-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.gs-bb-badge { background: #2563eb; color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.gs-bb-title { font-size: 15px; color: #0f172a; }
.gs-bb-tag { background: #e2e8f0; color: #334155; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.gs-bb-prog { font-size: 13px; color: #0f172a; margin-left: 4px; }
.gs-bb-actions { display: flex; align-items: center; gap: 8px; }

.gs-model-picker-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13px; color: #475569; }
.gs-model-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gs-mcard { background: #fff; border: 2px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; cursor: pointer; transition: all .15s ease-in-out; position: relative; user-select: none; }
.gs-mcard:hover { border-color: #94a3b8; transform: translateY(-1px); box-shadow: 0 3px 6px rgba(0,0,0,0.06); }
.gs-mcard.active { border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 2px rgba(37,99,235,0.2); }
.gs-mcard.done { border-color: #16a34a; background: #f0fdf4; }
.gs-mcard.done.active { box-shadow: 0 0 0 2px rgba(22,163,74,0.25); }

.gs-mc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.gs-mc-name { font-size: 15px; font-weight: 700; color: #0f172a; }
.gs-mc-status { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: #e2e8f0; color: #475569; }
.gs-mcard.active .gs-mc-status { background: #2563eb; color: #fff; }
.gs-mcard.done .gs-mc-status { background: #16a34a; color: #fff; }
.gs-mc-bc { font-size: 12px; color: #64748b; margin-bottom: 6px; font-family: monospace; }
.gs-mc-bar { height: 6px; background: #e2e8f0; border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.gs-mc-bar i { display: block; height: 100%; background: #2563eb; transition: width .2s; }
.gs-mcard.done .gs-mc-bar i { background: #16a34a; }
.gs-mc-meta { display: flex; justify-content: space-between; font-size: 11px; color: #64748b; }
.gs-mc-rem { font-weight: 600; }
.gs-mcard.done .gs-mc-rem { color: #16a34a; }

/* Import Dialog Styling */
dialog.grf-imp-dlg { width: min(880px, calc(100vw - 32px)); max-height: 90vh; }
.grf-dropzone { border: 2px dashed #94a3b8; border-radius: 8px; padding: 24px 16px; text-align: center; background: #f8fafc; cursor: pointer; transition: all .15s; margin-bottom: 12px; }
.grf-dropzone:hover, .grf-dropzone.dragover { border-color: #2563eb; background: #eff6ff; }
.grf-dropzone .grf-dz-icon { font-size: 32px; margin-bottom: 6px; }
.grf-dropzone .grf-dz-txt { font-weight: 600; color: #1e293b; font-size: 14px; }
.grf-dropzone .grf-dz-sub { font-size: 12px; color: #64748b; margin-top: 2px; }

.grf-preview-box { border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px; background: #fff; max-height: 380px; overflow-y: auto; }
.grf-prev-head { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.grf-prev-badges { display: flex; gap: 8px; margin-bottom: 10px; }
.grf-badge { background: #e0e7ff; color: #3730a3; padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }

/* Manual Batch Dialog */
dialog.grf-man-dlg { width: min(840px, calc(100vw - 32px)); max-height: 90vh; }
.grf-man-grid { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; padding: 4px 2px; }
.grf-man-row { display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(140px, 1.2fr) 100px 40px; gap: 8px; align-items: center; }
.grf-man-row input { height: 38px; font-size: 14px; text-transform: uppercase; }

.acc-pkp { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; align-items: center; }

/* ================================================================ HR Dept – Aduan (Borang HR 12) ================================================================ */
.ad-doc-wrap { max-width: 980px; margin: 0 auto; }
.ad-paper { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); margin-bottom: 24px; }
.ad-official-hdr { border-bottom: 2px solid #0f172a; padding-bottom: 14px; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ad-official-hdr .co-name { font-size: 18px; font-weight: 800; color: #1e3a8a; letter-spacing: 0.5px; }
.ad-official-hdr .form-title { font-size: 15px; font-weight: 700; color: #0f172a; margin-top: 2px; }
.ad-official-hdr .form-code { font-size: 13px; font-weight: 700; color: #dc2626; margin-top: 2px; }
.ad-meta-table { border-collapse: collapse; font-size: 12px; background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 6px; overflow: hidden; }
.ad-meta-table td { padding: 5px 10px; border: 1px solid #cbd5e1; }
.ad-meta-table td.lbl { background: #f1f5f9; font-weight: 600; color: #475569; }

.ad-part-sec { margin-top: 20px; margin-bottom: 20px; border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; }
.ad-part-hdr { background: #1e3a8a; color: #fff; padding: 10px 16px; font-weight: 700; font-size: 13.5px; letter-spacing: 0.5px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.ad-part-hdr.part-b { background: #7c2d12; }
.ad-part-body { padding: 18px; background: #fff; }

.ad-sub-hdr { font-weight: 700; font-size: 13px; color: #1e293b; background: #f1f5f9; padding: 6px 12px; border-left: 4px solid #2563eb; margin: 14px 0 10px; border-radius: 0 4px 4px 0; }
.ad-sub-hdr.part-b-sub { border-left-color: #ea580c; }
.ad-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ad-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 768px) { .ad-grid-2, .ad-grid-3 { grid-template-columns: 1fr; } }

.ad-view-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: 13px; }
.ad-view-table th, .ad-view-table td { border: 1px solid #e2e8f0; padding: 8px 12px; text-align: left; vertical-align: top; }
.ad-view-table th { background: #f8fafc; width: 220px; color: #475569; font-weight: 600; }
.ad-view-table td { color: #0f172a; }
@media (max-width: 640px) {
  .ad-view-table th, .ad-view-table td { display: block; width: 100%; }
  .ad-view-table tr { display: block; margin-bottom: 6px; }
}

.ad-sig-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
@media (max-width: 768px) { .ad-sig-row { grid-template-columns: 1fr; } }
.ad-sig-box { border: 1px dashed #94a3b8; border-radius: 8px; padding: 12px; background: #fafafa; }
.ad-sig-box-title { font-weight: 700; font-size: 13px; margin-bottom: 8px; color: #334155; }
.ad-sig-canvas-wrap { position: relative; width: 100%; height: 140px; background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.ad-sig-canvas-wrap canvas { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.ad-sig-preview { width: 100%; height: 140px; background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.ad-sig-preview img { max-width: 90%; max-height: 120px; object-fit: contain; }
.ad-sig-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }

.ad-note-bottom { font-size: 11.5px; font-style: italic; color: #b91c1c; margin-top: 16px; border-top: 1px solid #cbd5e1; padding-top: 8px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.ad-drop-zone { border: 2px dashed #94a3b8; border-radius: 8px; padding: 18px; text-align: center; cursor: pointer; background: #f8fafc; transition: border-color .2s, background .2s; }
.ad-drop-zone:hover, .ad-drop-zone.over { border-color: #2563eb; background: #eff6ff; }
.ad-file-chip { display: inline-flex; align-items: center; gap: 8px; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px; padding: 6px 10px; margin: 4px; font-size: 12.5px; }
.ad-file-chip a { text-decoration: none; color: #1e3a8a; font-weight: 600; }
.ad-file-chip button { border: none; background: transparent; color: #dc2626; cursor: pointer; font-weight: 700; font-size: 14px; padding: 0 4px; }

/* ================================================================ Marketing Dept – Digital Signage ================================================================ */
.sg-wrap { max-width: 1300px; margin: 0 auto; }
.sg-stats-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: center; }
.sg-stat-chip { background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 14px; font-size: 13px; display: inline-flex; align-items: center; gap: 8px; }
.sg-stat-chip strong { color: #0f172a; font-size: 14px; }
.sg-stat-chip.live { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }
.sg-ticker-preview { flex: 1; min-width: 260px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 8px; padding: 8px 14px; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 14px; }
.sg-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; position: relative; }
.sg-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.sg-card.inactive { opacity: 0.6; filter: grayscale(0.5); }

.sg-card-thumb-wrap { height: 180px; background: #0f172a; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.sg-card-thumb { width: 100%; height: 100%; object-fit: cover; }
.sg-card-badge { position: absolute; top: 10px; left: 10px; background: #dc2626; color: #fff; border-radius: 4px; padding: 3px 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; box-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.sg-card-dur { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,0.75); color: #fff; border-radius: 4px; padding: 2px 7px; font-size: 11px; font-weight: 600; }
.sg-card-type { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.65); color: #fff; border-radius: 4px; padding: 2px 7px; font-size: 11px; }

.sg-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.sg-card-title { font-size: 15px; font-weight: 700; margin: 0 0 4px; color: #0f172a; }
.sg-card-sub { font-size: 12.5px; color: #64748b; margin: 0 0 10px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sg-card-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: #64748b; margin-bottom: 12px; }
.sg-card-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f1f5f9; padding-top: 10px; margin-top: auto; }
.sg-order-btns { display: flex; gap: 4px; }
.sg-order-btn { border: 1px solid #cbd5e1; background: #fff; border-radius: 4px; padding: 2px 7px; font-size: 11px; cursor: pointer; }
.sg-order-btn:hover { background: #f1f5f9; }

/* Toggle switch */
.sg-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; gap: 6px; font-size: 12px; font-weight: 600; }
.sg-switch input { opacity: 0; width: 0; height: 0; }
.sg-slider { width: 34px; height: 18px; background: #cbd5e1; border-radius: 99px; transition: .2s; position: relative; }
.sg-slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 2px; bottom: 2px; background: #fff; border-radius: 50%; transition: .2s; }
.sg-switch input:checked + .sg-slider { background: #16a34a; }
.sg-switch input:checked + .sg-slider:before { transform: translateX(16px); }

/* Dialog */
dialog.sg-dlg { width: min(720px, calc(100vw - 32px)); max-height: 90vh; }
.sg-dropzone { border: 2px dashed #94a3b8; border-radius: 8px; padding: 20px 16px; text-align: center; background: #f8fafc; cursor: pointer; transition: all .15s; margin-bottom: 12px; }
.sg-dropzone:hover, .sg-dropzone.dragover { border-color: #2563eb; background: #eff6ff; }
.sg-dropzone .sg-dz-icon { font-size: 30px; margin-bottom: 4px; }
.sg-dropzone .sg-dz-txt { font-weight: 600; color: #1e293b; font-size: 13.5px; }
.sg-dropzone .sg-dz-sub { font-size: 11.5px; color: #64748b; margin-top: 2px; }

/* ================================= Fullscreen Signage Player ================================= */
#signagePlayer { position: fixed; inset: 0; z-index: 9999999; background: #000; color: #fff; font-family: Segoe UI, -apple-system, sans-serif; overflow: hidden; user-select: none; }
#sgStage { width: 100vw; height: 100vh; position: relative; overflow: hidden; }

.sg-slide-view { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.8s ease-in-out; pointer-events: none; }
.sg-slide-view.active { opacity: 1; pointer-events: auto; z-index: 2; }

.sg-player-img { width: 100%; height: 100%; object-fit: contain; }
.sg-player-img.cover { object-fit: cover; }
.sg-player-vid { width: 100%; height: 100%; object-fit: contain; }

.sg-caption-box { position: absolute; bottom: 70px; left: 36px; max-width: 60%; background: rgba(15,23,42,0.85); backdrop-filter: blur(10px); padding: 18px 24px; border-radius: 12px; border-left: 6px solid #2563eb; box-shadow: 0 10px 25px rgba(0,0,0,0.5); z-index: 5; animation: sgFadeIn 0.5s ease-out; }
.sg-caption-badge { display: inline-block; background: #dc2626; color: #fff; padding: 3px 10px; border-radius: 4px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 8px; }
.sg-caption-title { font-size: 28px; font-weight: 800; margin: 0 0 6px; color: #fff; line-height: 1.25; text-shadow: 0 2px 4px rgba(0,0,0,0.6); }
.sg-caption-sub { font-size: 16px; color: #cbd5e1; margin: 0; line-height: 1.4; }

.sg-card-fullscreen { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px; box-sizing: border-box; }
.sg-cf-badge { display: inline-block; padding: 6px 18px; border-radius: 99px; font-size: 18px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.sg-cf-title { font-size: clamp(32px, 5vw, 64px); font-weight: 900; margin: 0 0 16px; line-height: 1.15; max-width: 80%; text-shadow: 0 3px 8px rgba(0,0,0,0.4); }
.sg-cf-sub { font-size: clamp(18px, 2.5vw, 28px); max-width: 70%; margin: 0 0 28px; opacity: 0.9; line-height: 1.4; }
.sg-cf-cta { display: inline-block; background: #fff; color: #0f172a; padding: 10px 24px; border-radius: 99px; font-size: 18px; font-weight: 800; box-shadow: 0 4px 14px rgba(0,0,0,0.25); }

.sg-tv-top { position: absolute; top: 20px; left: 30px; right: 30px; display: flex; justify-content: space-between; align-items: center; z-index: 10; pointer-events: none; }
.sg-tv-brand { display: flex; align-items: center; gap: 10px; background: rgba(15,23,42,0.7); backdrop-filter: blur(8px); padding: 8px 18px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); }
.sg-tv-brand img { height: 24px; }
.sg-tv-brand span { font-weight: 800; font-size: 14px; letter-spacing: 1px; color: #fff; text-transform: uppercase; }
.sg-tv-clock { background: rgba(15,23,42,0.7); backdrop-filter: blur(8px); padding: 8px 20px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); text-align: right; }
.sg-tv-time { font-size: 22px; font-weight: 800; letter-spacing: 0.5px; color: #fff; }
.sg-tv-date { font-size: 12px; color: #94a3b8; font-weight: 600; text-transform: uppercase; }

.sg-tv-bottom { position: absolute; bottom: 0; left: 0; right: 0; height: 52px; background: #0f172a; border-top: 3px solid #2563eb; display: flex; align-items: center; z-index: 10; overflow: hidden; }
.sg-tv-ticker-tag { background: #2563eb; color: #fff; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; padding: 0 16px; height: 100%; display: flex; align-items: center; flex-shrink: 0; z-index: 2; box-shadow: 4px 0 10px rgba(0,0,0,0.4); }
.sg-tv-marquee-wrap { flex: 1; overflow: hidden; white-space: nowrap; position: relative; }
.sg-tv-marquee { display: inline-block; padding-left: 100%; font-size: 18px; font-weight: 600; color: #fde047; animation: sgMarquee 30s linear infinite; }

.sg-tv-dots { position: absolute; bottom: 62px; right: 30px; display: flex; gap: 6px; z-index: 10; }
.sg-tv-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.35); transition: all .3s; }
.sg-tv-dot.active { background: #2563eb; transform: scale(1.4); }

.sg-tv-controls { position: absolute; bottom: 70px; left: 50%; transform: translateX(-50%); background: rgba(15,23,42,0.85); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); border-radius: 99px; padding: 8px 18px; display: flex; align-items: center; gap: 12px; z-index: 20; opacity: 0; transition: opacity .25s ease-in-out; pointer-events: none; }
#signagePlayer.show-ctrl .sg-tv-controls { opacity: 1; pointer-events: auto; }
#signagePlayer .sg-tv-brand { pointer-events: auto; }
#signagePlayer:not(.sg-unlocked) .sg-locked-only { display: none !important; }
.sg-ctrl-btn { background: rgba(255,255,255,0.15); border: none; color: #fff; padding: 6px 14px; border-radius: 99px; cursor: pointer; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; transition: background .15s; }
.sg-ctrl-btn:hover { background: rgba(255,255,255,0.3); }

@keyframes sgMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
@keyframes sgFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sgPulseSlow {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.98); }
}
@keyframes sgGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.6), 0 0 20px rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 18px rgba(245, 158, 11, 0.9), 0 0 32px rgba(239, 68, 68, 0.6); }
}

/* Happy Hour Badge */
.sg-hh-badge { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; padding: 4px 12px; border-radius: 99px; font-size: 13px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; animation: sgGlow 2s infinite ease-in-out; }
.sg-card-badge.hh { background: linear-gradient(135deg, #f59e0b, #ef4444); animation: sgGlow 2s infinite ease-in-out; }

/* Portrait Totem Orientation Mode */
#signagePlayer.sg-portrait .sg-caption-box { bottom: 120px; left: 24px; right: 24px; max-width: none; }
#signagePlayer.sg-portrait .sg-caption-title { font-size: clamp(24px, 4vw, 36px); }
#signagePlayer.sg-portrait .sg-caption-sub { font-size: 15px; }
#signagePlayer.sg-portrait .sg-tv-top { top: 30px; left: 24px; right: 24px; flex-direction: column; gap: 10px; align-items: stretch; }
#signagePlayer.sg-portrait .sg-tv-clock { text-align: center; }
#signagePlayer.sg-portrait .sg-tv-bottom { height: 64px; }
#signagePlayer.sg-portrait .sg-tv-marquee { font-size: 20px; }
#signagePlayer.sg-portrait .sg-tv-dots { bottom: 80px; right: 24px; }
#signagePlayer.sg-portrait .sg-card-fullscreen { padding: 32px 20px; }
#signagePlayer.sg-portrait .sg-cf-title { font-size: clamp(28px, 6vw, 48px); max-width: 95%; }
#signagePlayer.sg-portrait .sg-cf-sub { font-size: clamp(16px, 3.5vw, 22px); max-width: 90%; }

/* Sleep / Blackout Standby Mode */
#signagePlayer.sg-tv-sleep { background: #000000 !important; }
#signagePlayer.sg-tv-sleep #sgStage, #signagePlayer.sg-tv-sleep .sg-tv-top, #signagePlayer.sg-tv-sleep .sg-tv-bottom, #signagePlayer.sg-tv-sleep .sg-tv-dots { display: none !important; }
.sg-sleep-box { position: fixed; inset: 0; background: #000000; color: #475569; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; z-index: 9999999; cursor: pointer; }
.sg-sleep-pulse { font-size: 56px; margin-bottom: 16px; animation: sgPulseSlow 4s infinite ease-in-out; filter: grayscale(1) opacity(0.4); }
.sg-sleep-title { font-size: 18px; font-weight: 700; color: #64748b; margin: 0 0 8px; letter-spacing: 1px; text-transform: uppercase; }
.sg-sleep-sub { font-size: 13px; color: #334155; margin: 0 0 20px; max-width: 400px; line-height: 1.5; }
.sg-sleep-wake-btn { background: #1e293b; color: #94a3b8; border: 1px solid #334155; padding: 8px 20px; border-radius: 99px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; }
.sg-sleep-wake-btn:hover { background: #334155; color: #fff; }

/* Control Panel Tabs & Batches */
.sg-tab-bar { display: flex; gap: 8px; margin: 16px 0; border-bottom: 2px solid #e2e8f0; padding-bottom: 8px; }
.sg-tab-btn { background: none; border: none; padding: 8px 18px; font-size: 14px; font-weight: 600; color: #64748b; border-radius: 6px; cursor: pointer; transition: all .15s; }
.sg-tab-btn:hover { background: #f1f5f9; color: #1e293b; }
.sg-tab-btn.active { background: #eff6ff; color: #2563eb; }

/* Campaigns & Batches */
.sg-camp-card { background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; margin-bottom: 16px; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.sg-camp-head { padding: 14px 18px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.sg-camp-title { font-size: 16px; font-weight: 700; color: #0f172a; margin: 0; display: flex; align-items: center; gap: 8px; }
.sg-camp-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: #64748b; }
.sg-tag { background: #e2e8f0; color: #334155; padding: 2px 8px; border-radius: 4px; font-weight: 600; font-size: 11px; }
.sg-tag.green { background: #dcfce7; color: #166534; }
.sg-tag.amber { background: #fef3c7; color: #92400e; }
.sg-tag.purple { background: #f3e8ff; color: #6b21a8; }
.sg-camp-slides { padding: 14px 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; background: #fff; }

/* Presets & Power Modal */
.sg-preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin: 16px 0; }
.sg-preset-card { background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 8px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.sg-preset-card.active { border-color: #2563eb; background: #eff6ff; }
.sg-preset-title { font-size: 15px; font-weight: 700; color: #0f172a; margin: 0 0 6px; }
.sg-preset-desc { font-size: 12.5px; color: #64748b; margin: 0 0 12px; flex: 1; }
.sg-preset-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid #e2e8f0; padding-top: 10px; }




/* Digital Signage: branch picker */
.sg-op { border: 1px solid var(--border, var(--line)); border-radius: 6px; padding: 6px; background: var(--card-bg, #fff); }
.sg-op-tools { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.sg-op-q { flex: 1; min-width: 160px; }
.sg-op-n { font-size: 12px; white-space: nowrap; }
.sg-op-list { max-height: 260px; overflow-y: auto; }
.sg-op-chh { background: #e0e7ff; color: #312e81; font-size: 13px; }
.sg-op-grp { margin-bottom: 6px; }
.sg-op-st { display: flex; gap: 6px; align-items: center; font-size: 12px; padding: 3px 4px; background: var(--bg, #f3f4f6); border-radius: 4px; cursor: pointer; }
.sg-op-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 8px; padding: 4px 4px 0 18px; }
.sg-op-it { font-size: 12px; }

.sg-ou-ch { margin-bottom: 6px; }
.sg-ou-chh { display: flex; gap: 8px; align-items: center; font-size: 14px; padding: 6px 8px; background: #e0e7ff; color: #312e81; border-radius: 6px; margin-top: 6px; }

/* Kiosk mode of the TV player: no cursor / selecting / zoom while locked */
body.sg-kiosk { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; overscroll-behavior: none; }
body.sg-kiosk.sg-idle, body.sg-kiosk.sg-idle * { cursor: none !important; }
body.sg-kiosk dialog input { user-select: text; -webkit-user-select: text; }
#signagePlayer #sgTvLogo { height: 32px; width: auto; max-width: 180px; object-fit: contain; }

/* HR Setting › Channel list */
.hrs-ch { display: grid; grid-template-columns: 56px minmax(140px, 1fr) 170px 180px minmax(120px, 1fr) 34px; gap: 8px; align-items: center; margin-bottom: 6px; }
.hrs-ch-logo { display: flex; gap: 4px; align-items: center; }
.hrs-ch-logo img { height: 30px; max-width: 80px; object-fit: contain; background: #fff; border: 1px solid var(--border, #e5e7eb); border-radius: 4px; }
.hrs-ch-outs { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .hrs-ch { grid-template-columns: 48px 1fr auto; grid-template-areas: "c n d" "l l o" "m m m"; padding-bottom: 6px; border-bottom: 1px dashed var(--border, #e5e7eb); }
  .hrs-ch > :nth-child(1) { grid-area: c; } .hrs-ch > :nth-child(2) { grid-area: n; } .hrs-ch > :nth-child(3) { grid-area: l; }
  .hrs-ch > :nth-child(4) { grid-area: m; } .hrs-ch > :nth-child(5) { grid-area: o; text-align: right; } .hrs-ch > :nth-child(6) { grid-area: d; }
  .hrs-ch.hrs-head { display: none; }
}
#sgOutletUrlsDlg { padding: 18px 20px; }

/* Aduan › section 5: the printed form, signed by hand and uploaded */
.ad-sign-note { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.5; margin-bottom: 10px; }
.ad-signed { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; border: 1px dashed #fdba74; background: #fff7ed; border-radius: 8px; padding: 12px; }
.ad-signed.ok { border-color: #86efac; background: #f0fdf4; }
.ad-signed-pv img { height: 110px; max-width: 160px; object-fit: contain; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; display: block; }
.ad-signed-pdf { display: flex; align-items: center; justify-content: center; width: 90px; height: 110px; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; font-weight: 700; text-decoration: none; }
.ad-signed-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* SB Client › ② Upload: the three folders in one card */
.pk-up-sec { border: 1px solid var(--border, #e5e7eb); border-radius: 8px; padding: 10px 12px 2px; margin-bottom: 12px; }
.pk-up-sec > b { display: block; margin-bottom: 6px; font-size: 13px; }
@media (max-width: 600px) { .pk-up-sec .pk-grid { grid-template-columns: 1fr !important; } }

/* Summary cards that filter the table (all modules): hand cursor, the chosen card outlined */
.stat-f, .pk-stat, .wh-stat, .ta-stat { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.stat-f:hover, .pk-stat:hover, .wh-stat:hover, .ta-stat:hover { border-color: var(--primary); }
.stat.on { outline: 2px solid var(--primary); outline-offset: -1px; background: #eef2ff; }

/* Leave Request › Special Request */
.sl-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.sl-type { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius, 10px); background: #fff; cursor: pointer; font: inherit; }
.sl-type:hover { border-color: var(--primary); } .sl-type.on { outline: 2px solid var(--primary); background: #eef2ff; } .sl-type[disabled] { cursor: default; } .sl-type[disabled]:not(.on) { opacity: .45; }
.sl-type .sl-ic { font-size: 24px; } .sl-type .muted { font-size: 12px; }
.sl-ro { padding: 8px 10px; background: var(--bg, #f8fafc); border: 1px solid var(--line); border-radius: 6px; min-height: 36px; }
.sl-file { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; font-size: 13px; }
.sl-picked { font-size: 12px; margin-left: 6px; }
.sl-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.sl-step { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; font-size: 12px; color: var(--muted); }
.sl-step b { display: block; font-size: 13px; } .sl-step.done { border-color: #86efac; background: #f0fdf4; color: #14532d; }
.sl-ack { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid #f59e0b; background: #fffbeb; flex-wrap: wrap; }
.mc-shots a small { display: block; font-size: 11px; text-align: center; color: var(--muted); }
@media (max-width: 800px) { .sl-types { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sl-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.slset-nums { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.slset-nums input { width: 70px; margin: 0 4px; }

/* GRF (Scan Serial Number): one box for Barcode / Model Code */
.gs-code { position: relative; }
.gs-what { position: absolute; left: 0; right: 0; top: 100%; display: block; font-size: 11.5px; margin-top: 2px; color: #166534; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gs-form { row-gap: 20px; margin-bottom: 14px; }
@media (max-width: 920px) { .gs-form .gs-code { margin-bottom: 14px; } }
@media (min-width: 921px) and (max-width: 1280px) {
  .gs-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) 100px; }
  .gs-form .field:has(.wh-inrow) { grid-column: 1 / 3; }
}

/* Import Distribution header boxes (V11.15) */
.pe-dhead { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 8px; }

/* Access Control › Outlet access (V11.19) */
.acc-out { padding: 10px 16px 14px; }
.acc-out-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.acc-out-tools input[type=search] { flex: 1; min-width: 200px; }
.acc-out-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; padding: 6px; }
.acc-out-grp { margin-bottom: 6px; }
.acc-out-st { display: flex; gap: 6px; align-items: center; font-size: 12px; padding: 3px 4px; background: var(--bg, #f3f4f6); border-radius: 4px; cursor: pointer; }
.acc-out-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 8px; padding: 4px 4px 0 18px; }
.acc-out-it { font-size: 12px; }

/* Item Master detail (V11.25) */
.im-det { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; font-size: 13px; }
@media (max-width: 640px) { .im-det { grid-template-columns: 1fr; } }
#imRows tr[data-im] { cursor: pointer; }

/* Label printers (V11.51) */
/* V19.12 fixed columns - every control under its own header, nothing overlaps */
.table-wrap > table.pe-prn { table-layout: fixed; width: 1860px; min-width: 1860px; }
.pe-prn th, .pe-prn td { box-sizing: border-box; padding: 6px 8px; vertical-align: middle; overflow: hidden; }
.pe-prn th { white-space: nowrap; }
.pe-prn td { white-space: normal; }
.pe-prn input, .pe-prn select { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; padding: 6px 8px; font-size: 13px; }
.pe-prn input[type=checkbox] { width: auto; padding: 0; margin: 0; flex: none; }
.pe-prn col.c-name { width: 220px; } .pe-prn col.c-model { width: 160px; } .pe-prn col.c-num { width: 90px; } .pe-prn col.c-off { width: 150px; }
.pe-prn col.c-by { width: 240px; } .pe-prn col.c-use { width: 130px; } .pe-prn col.c-den { width: 170px; } .pe-prn col.c-spd { width: 170px; }
.pe-prn col.c-ip { width: 130px; } .pe-prn col.c-port { width: 90px; } .pe-prn col.c-act { width: 130px; }
.pe-prn td.pe-prn-off { white-space: nowrap; } .pe-prn td.pe-prn-off input { width: 56px; display: inline-block; } .pe-prn td.pe-prn-off input + input { margin-left: 4px; }
.pe-prn td.pe-prn-use label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; line-height: 1.2; margin: 2px 0; white-space: nowrap; cursor: pointer; }
.pe-prn td.pe-prn-act { white-space: nowrap; overflow: visible; } .pe-prn td.pe-prn-act > * + * { margin-left: 6px; }
.pe-prn td.pe-prn-act .btn { width: auto; }
.pe-prn .pe-prn-saved { white-space: normal; }
/* V19.13 rows of the same NIIMBOT (same Model, another label size) */
.pe-prn tr.pe-prn-same > td { background: #eef0fe; }
.table-wrap > table.pe-prn tbody tr.pe-prn-same > td:first-child { background: #eef0fe; box-shadow: inset 3px 0 0 #6366f1, 1px 0 0 #e5e7eb; }
.pe-prn .pe-prn-same-note { font-size: 11.5px; line-height: 1.2; margin-top: 3px; white-space: normal; }

/* PDA mode - the Darson WMS app (V11.52) */
body.pda .topbar, body.pda .sidebar, body.pda #sidebar { display: none !important; }
body.pda #app { padding: 8px !important; margin: 0 !important; max-width: none !important; }
body.pda .layout, body.pda .main-wrap { display: block !important; padding: 0 !important; }
body.pda .page-head { flex-direction: column; align-items: stretch; gap: 8px; }
body.pda .page-head h1 { font-size: 20px; }
body.pda .page-head .actions { display: flex; flex-wrap: wrap; gap: 6px; }
body.pda .page-head .actions .btn { flex: 1 1 45%; min-height: 46px; font-size: 16px; }
body.pda .pk-head { grid-template-columns: 1fr 1fr !important; font-size: 13px; }
body.pda .pk-scanbar input, body.pda #peIn { font-size: 22px !important; min-height: 52px; }
body.pda .pk-scanbar .btn { min-height: 48px; font-size: 16px; }
body.pda .wh-msg { font-size: 18px; }
body.pda dialog .btn { min-height: 46px; font-size: 16px; }
body.pda dialog input { font-size: 20px; min-height: 46px; }
.pda-home { max-width: 560px; margin: 0 auto; }
.pda-top { display: flex; align-items: center; gap: 10px; padding: 6px 2px 12px; border-bottom: 1px solid var(--line, #e2e8f0); margin-bottom: 12px; }
.pda-top img { height: 28px; }
.pda-top div { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.pda-top span { font-size: 12px; color: var(--muted, #64748b); }
.pda-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.pda-role { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 6px; font-size: 34px; border: 2px solid var(--line, #e2e8f0);
  border-radius: 14px; background: var(--card, #fff); color: inherit; cursor: pointer; }
.pda-role b { font-size: 18px; }
.pda-role.on { border-color: var(--brand, #2e3192); background: #eef0ff; }
.pda-h { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin: 4px 2px 8px; }
.pda-list { display: flex; flex-direction: column; gap: 8px; }
.pda-card { display: block; padding: 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 12px; background: var(--card, #fff); color: inherit; text-decoration: none; }
.pda-card strong { font-size: 17px; }
.pda-card .muted { font-size: 13px; margin-top: 4px; }
body.pda .pk-scanbar { flex-wrap: wrap; }
body.pda .pk-scanbar > .field, body.pda .pk-scanbar .wh-input { flex: 1 1 100% !important; width: 100% !important; }
body.pda .pk-scanbar .wh-input input, body.pda #peIn { width: 100% !important; }
body.pda .pk-scanbar .wh-inrow { display: flex; flex-wrap: wrap; gap: 6px; }
body.pda .pk-scanbar .wh-inrow > input { flex: 1 1 100% !important; }
body.pda .pk-scanbar .wh-inrow > .btn { flex: 1 1 45%; }

/* Digital Signage V11.56: outlet filter, Screens */
.sg-outf { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; font-size: 13px; }
.sg-outf select { min-width: 220px; }
.sg-scr input, .sg-scr select { width: 100%; min-width: 90px; }
.sg-scr td { padding: 4px; vertical-align: middle; }
dialog.sg-scr-dlg { width: min(1150px, 96vw); max-width: 96vw; }
.pe-wh-left { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: 13px; }
.pe-wh-ok { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #dcfce7; color: #166534; font-size: 13px; }

/* V12.0 Complaint › disciplinary process */
.adc { margin-top: 20px; border: 2px solid #c7d2fe; }
.adc .card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.adc-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.adc-step { flex: 1; min-width: 120px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #f1f5f9; color: #64748b; font-size: 13px; }
.adc-step b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #cbd5e1; color: #fff; font-size: 12px; flex: none; }
.adc-step.done { background: #dcfce7; color: #166534; } .adc-step.done b { background: #16a34a; }
.adc-step.now { background: #e0e7ff; color: #3730a3; font-weight: 700; } .adc-step.now b { background: #4f46e5; }
.adc-who { margin: 6px 0 10px; font-size: 13px; }
.adc-warn { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; font-size: 13px; }
.adc-closed { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: #f0fdf4; border: 1px solid #86efac; font-size: 13px; }
.adc-next { margin: 6px 0 10px; padding: 8px 12px; border-radius: 8px; background: #eef2ff; border: 1px solid #c7d2fe; font-size: 13px; }
.adc-sec { border-top: 1px solid var(--line, #e2e8f0); padding: 12px 0 4px; }
.adc-h { font-weight: 800; color: #1e3a8a; margin-bottom: 8px; }
.adc-sub { margin-top: 12px; padding-top: 8px; border-top: 1px dashed #e2e8f0; }
.adc-txt { margin: 6px 0; padding: 8px 10px; background: #f8fafc; border-radius: 6px; font-size: 13px; }
.adc-btns, .adc-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.adc-acts .btn { font-size: 12.5px; }
.adc-files { margin: 6px 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.adc-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; margin: 4px 0; }
.adc-form .field { margin-bottom: 8px; }
.adc-guide { margin: 0 0 10px; font-size: 12.5px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 6px 10px; }
.adc-guide summary { cursor: pointer; font-weight: 700; color: #92400e; }
.adc-tbl td, .adc-tbl th { font-size: 12.5px; vertical-align: top; }
.adc-x td { opacity: .55; text-decoration: line-through; }
.adc-rp { color: #475569; font-style: italic; }
.adc-ok { color: #166534; font-weight: 700; }
.adc-qa { display: grid; grid-template-columns: 1fr 1.4fr; gap: 6px; margin-bottom: 6px; }
.adc-qa textarea { width: 100%; }
.adm .card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-ev { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px dashed #e2e8f0; font-size: 13.5px; }
@media (max-width: 640px) { .adc-qa { grid-template-columns: 1fr; } .adc-step { min-width: 46%; } }

/* V12.1: the disciplinary process panel laid out like the form (padding, boxed sections with a header bar) */
.adc { margin-top: 20px; border: 1px solid #cbd5e1; border-radius: 10px; overflow: hidden; background: #fff; }
.adc > .card-head { background: #1e3a8a; color: #fff; padding: 12px 18px; margin: 0; }
.adc > .card-head h2 { color: #fff; }
.adc > .card-head h2 .muted { color: #c7d2fe !important; }
.adc > .card-body { padding: 18px 20px 6px; }
.adc-sec { border: 1px solid #e2e8f0; border-radius: 8px; padding: 0 16px 12px; margin: 0 0 16px; background: #fff; }
.adc-sec > .adc-h { margin: 0 -16px 12px; padding: 9px 16px; background: #e0e7ff; color: #1e3a8a; font-size: 13.5px; border-bottom: 1px solid #c7d2fe; border-radius: 8px 8px 0 0; }
.adc-sec .field { display: block; margin-bottom: 10px; }
.adc-sec textarea, .adc-sec select, .adc-sec input[type=text] { width: 100%; box-sizing: border-box; }
.adc-sub { margin: 12px -16px 0; padding: 10px 16px 0; border-top: 1px dashed #cbd5e1; }
.adc-btns { justify-content: flex-end; }
.adc-acts { gap: 8px; }
.adc-who { padding: 8px 12px; background: #f8fafc; border-radius: 8px; border: 1px solid #e2e8f0; }
@media (max-width: 640px) { .adc > .card-body { padding: 12px 10px 4px; } .adc-sec { padding: 0 10px 10px; } .adc-sec > .adc-h { margin: 0 -10px 10px; padding: 8px 10px; } .adc-sub { margin: 10px -10px 0; padding: 8px 10px 0; } .adc-btns { justify-content: flex-start; } }

/* V12.6 DI checklist, panel rows */
.adc-ckl > summary { cursor: pointer; list-style: none; }
.adc-ckl > summary::-webkit-details-marker { display: none; }
.adc-ckbody { padding: 4px 0 6px; }
.adc-ckh { font-weight: 700; margin: 10px 0 4px; color: #1e3a8a; font-size: 13px; }
.adc-ck { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; font-size: 13px; }
.adc-ck.on span { color: #166534; }
.adc-ck small { margin-left: auto; }
.adc-prow { display: grid; grid-template-columns: 1.2fr 1.2fr 0.9fr; gap: 6px; margin-bottom: 6px; }
.adc-di-acts { padding: 8px 10px; background: #f8fafc; border-radius: 8px; border: 1px dashed #cbd5e1; }
/* V19.23: letter / DI actions as a vertical list */
.adc-act-list { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; padding: 0; list-style: none; max-width: 640px; }
.adc-act-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 14px; border: 1px solid #e2e8f0; background: #fff; border-radius: 8px; cursor: pointer; font-size: 13.5px; color: inherit; line-height: 1.35; box-sizing: border-box; }
.adc-act-row:hover:not(:disabled) { background: #f8fafc; border-color: #94a3b8; }
.adc-act-row:disabled { opacity: 0.55; cursor: not-allowed; }
.adc-di-list { margin: 10px 0 8px; padding: 10px 12px 12px; background: #f8fafc; border-radius: 10px; border: 1px dashed #cbd5e1; max-width: 640px; }
.adc-di-list > .adc-di-h { font-weight: 700; margin: 0 0 8px; font-size: 13.5px; }
.adc-di-list .adc-act-list { margin: 0; max-width: none; }
@media (max-width: 640px) { .adc-prow { grid-template-columns: 1fr; } }

/* V12.7 email */
.adc-mail { margin: 10px 0; padding: 8px 12px; border-radius: 8px; background: #eff6ff; border: 1px solid #bfdbfe; }
.adc-mail .field { margin: 6px 0 0; }
.adc-sent { font-size: 11.5px; color: #1d4ed8; }

/* V12.10 the letter link page (no login) · V19.23: full-width letter, no inner 62vh scroll box */
.adl { width: 100%; max-width: none; margin: 0; background: #fff; border-radius: 0; box-shadow: none; overflow: visible; text-align: left; color: #111; min-height: 100vh; display: flex; flex-direction: column; }
.adl-head { display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: #1e3a8a; color: #fff; position: sticky; top: 0; z-index: 2; }
.adl-head img { height: 34px; background: #fff; border-radius: 6px; padding: 3px 6px; }
.adl-head .muted { color: #c7d2fe; }
.adl-head .adl-head-acts { margin-left: auto; display: flex; gap: 8px; }
.adl-head .adl-head-acts .btn { background: #fff; color: #1e3a8a; }
.adl-doc { width: 100%; height: auto; min-height: 0; border: 0; border-bottom: 1px solid #e2e8f0; background: #fff; display: block; }
.adl-act { padding: 14px 16px; }
.adl-act textarea { width: 100%; box-sizing: border-box; margin: 6px 0; }
.adl-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.adl-ok { padding: 10px 12px; border-radius: 8px; background: #f0fdf4; border: 1px solid #86efac; color: #166534; font-weight: 600; margin: 8px 0; }
.adl-sign { padding: 12px 16px 8px; border-top: 1px dashed #94a3b8; background: #f8fafc; }
.adl-sign-h { font-weight: 600; margin: 0 0 8px; font-size: 13.5px; }
.adl-sign-cv { display: block; width: 100%; max-width: 640px; height: 160px; border: 1px solid #94a3b8; border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; }
.adl-sign-btns { margin: 8px 0 0; }
.adl.is-full { position: fixed; inset: 0; z-index: 80; overflow: auto; background: #fff; min-height: 0; }
.adl:fullscreen, .adl:-webkit-full-screen { background: #fff; width: 100%; height: 100%; }
@media (max-width: 640px) { .adl { margin: 0; border-radius: 0; } .adl-doc { height: auto; } .adl-head { flex-wrap: wrap; } }
.auth:has(> .adl) { display: block; padding: 0; place-items: unset; background: #e8eaf6; }
.auth > .adl { width: 100%; }

/* V12.15: My Letters - card padding, the 1 / 2 / 3 answers in one row */
.adm .card-body { padding: 14px 18px; }
.adm-ev { align-items: center; }
.adm-ev > span:first-child { flex: 1 1 320px; }
.adm-ev > span:last-child { display: flex; gap: 18px; flex: 0 0 auto; }
.adm-ev .check-inline { gap: 5px; cursor: pointer; }
.adm form .field { margin-top: 10px; }
.adm form > .btn { margin-top: 10px; }

/* V12.18: MC form - Hospitalised hides Leave Number + Date Apply (HR keys them in when approving) */
#mcForm .field[hidden], #mcForm .mc-hospnote[hidden] { display: none !important; }

/* V12.19: letter templates */
.tpl-body { font-family: Consolas, "Courier New", monospace; font-size: 12.5px; line-height: 1.45; }
.tpl-help { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 14px; margin-top: 6px; }
.tpl-help code, .adm code { background: #eef2ff; padding: 0 4px; border-radius: 4px; }
.adc-tpl { margin-top: 10px; border: 1px dashed #c7d2fe; border-radius: 8px; padding: 8px 10px; background: #f8faff; }

/* V12.20: boxes in one row line up (a two-line label no longer pushes its box down) */
.ad-grid-2, .ad-grid-3 { align-items: end; }
.ad-grid-2 > .field, .ad-grid-3 > .field { margin-bottom: 0; }
#dialog .ad-grid-2, #dialog .ad-grid-3 { margin-bottom: 12px; }
.ad-drop-zone.missing { border-color: #dc2626; background: #fef2f2; }

/* V12.23: email preview */
.adc-mailprev { width: 100%; height: 420px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; margin-top: 6px; }

/* V13.0 Canopy / Event */
.ev-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; }
@media (max-width: 768px) { .ev-grid-4 { grid-template-columns: 1fr 1fr; } }
.ev-tbl input { width: 100%; min-width: 70px; }
.ev-tbl input[type=number] { min-width: 100px; max-width: 140px; }
.ev-tbl input[data-k=descr], .ev-tbl input[data-k=item] { min-width: 220px; }
.ev-tbl input[data-k=date] { min-width: 140px; }
.ev-tbl td { vertical-align: middle; }
.ev-bal { font-weight: 600; text-align: right; }
.ev-neg { color: var(--bad); }
.ev-cs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .ev-cs { grid-template-columns: 1fr; } }
.ev-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 14px; }
.ev-sum > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #f8fafc; display: flex; flex-direction: column; gap: 4px; }
.ev-sum span { font-size: 12px; color: var(--muted); }
.tr-evpick { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 6px; padding: 10px 12px; border: 1px dashed #c7d2fe; border-radius: 10px; background: #f8faff; }
.tr-evpick .field { flex: 1 1 420px; margin-bottom: 0; }

/* V13.1 event staff ↔ Canopy transfer */
.ev-warn { color: var(--warn); font-weight: 600; }
.ev-ok { color: var(--ok); font-weight: 600; }
.ev-trbox { margin-top: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ev-trc { white-space: nowrap; font-size: 12.5px; }

/* V13.2 tent size */
.ev-size { padding: 9px 12px; font-size: 15px; border: 1px solid var(--line, #e5e7eb); border-radius: 8px; background: #f8fafc; min-height: 40px; box-sizing: border-box; }
.ev-sq { white-space: nowrap; }
#evTentRows input[type=number] { min-width: 70px; max-width: 90px; }
#evTentRows input[data-k=name] { min-width: 140px; }

/* V14.0 Attendance (GPS) */
.att-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.att-sched { text-align: center; margin: 0 0 12px; font-size: 13.5px; } .att-late { color: #dc2626; font-weight: 600; } .att-ok { color: #16a34a; }
.att-tt td, .att-tt th { text-align: center; } .ev-rv-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } @media (max-width: 700px) { .ev-rv-steps { grid-template-columns: 1fr; } }
.ev-mx-ch { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 8px; }
.ev-rv-step { border: 1px solid var(--line, #e5e7eb); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: #6b7280; }
.ev-rv-step.done { border-color: #86efac; background: #f0fdf4; color: #14532d; } .ev-rv-step span { font-size: 12.5px; }
.ev-rv-rej { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; }
.ev-rv .card-head { display: flex; align-items: center; gap: 10px; }
.ev-bands { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .ev-bands b { background: #eef2ff; border-radius: 6px; padding: 4px 10px; font-size: 13px; }
.ev-mp-sub td { border-top: 0 !important; padding-top: 2px !important; } .att-tt .t24 { width: 80px; text-align: center; } .att-ttbtn { white-space: nowrap; }
@media (max-width: 900px) { .att-grid { grid-template-columns: 1fr; } }
.att-main { padding: 20px; }
.att-date { text-align: center; font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.att-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.att-times > div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; background: #f8fafc; display: flex; flex-direction: column; gap: 4px; }
.att-times span { font-size: 12px; color: var(--muted); }
.att-times b { font-size: 26px; letter-spacing: .5px; }
.att-times small { font-size: 11.5px; color: var(--muted); }
.att-times-sm b { font-size: 20px; }
.att-btns { display: flex; justify-content: center; margin: 18px 0 8px; }
.att-btns .btn { font-size: 20px; padding: 16px 44px; border-radius: 14px; font-weight: 700; color: #fff; border: 0; }
.att-in { background: #16a34a; } .att-out { background: #dc2626; }
.att-btns .btn:disabled { opacity: .6; }
.att-trk { text-align: center; font-size: 12.5px; color: var(--ok); margin-top: 6px; }
.att-warn { padding: 12px 16px; background: #fff7ed; border-color: #fdba74; margin-bottom: 14px; }
.att-out-row { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.att-loc input[data-k=address] { min-width: 260px; }
.att-loc input[data-k=lat], .att-loc input[data-k=lng] { min-width: 110px; max-width: 130px; }

/* V14.1 manpower control */
.ev-mp { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.ev-mp-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ev-mp-i { display: inline-flex; flex-direction: column; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.ev-mp-i small { color: var(--muted); font-size: 11px; }
.ev-mp-i.ok { border-color: #86efac; background: #f0fdf4; }
.ev-mp-i.short { border-color: #fdba74; background: #fff7ed; }
.ev-mpx { white-space: nowrap; color: var(--muted); }
#evMpRows input[data-k=position] { min-width: 200px; }
#evMpRows input[data-k=sqft] { min-width: 90px; max-width: 120px; }

/* V14.2 event expenses, documents, allowance */
.ev-due { margin-bottom: 8px; padding: 8px 12px; border-radius: 8px; background: #eff6ff; border: 1px solid #bfdbfe; font-size: 13px; }
.ev-due.late { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.ev-cost td.ev-docs { min-width: 260px; font-size: 12.5px; }
.ev-up { display: inline-flex; gap: 4px; align-items: center; margin: 2px 0; }
.ev-up select { font-size: 12px; padding: 2px 4px; }
.ev-allow { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--line); font-size: 13.5px; }
.ev-alw, .ev-days { white-space: nowrap; text-align: right; }
.ev-rate { min-width: 70px !important; max-width: 90px; }
#evMpRows input[data-k=role] { min-width: 160px; }
.ev-sum small { font-size: 11px; color: var(--muted); }

/* V14.5 event guideline */
.ev-hqok { font-size: 12px; color: var(--warn); font-weight: 600; white-space: nowrap; }
.ev-nl { white-space: nowrap; font-size: 12.5px; }
.ev-mamt, .ev-iamt { white-space: nowrap; text-align: right; }
.ev-mcap { font-size: 12px; }
#evMeals select, #evInc select { min-width: 110px; }
#gDuty input[data-k=role] { min-width: 180px; } #gDuty input[type=number], #gTk input { max-width: 120px; }

/* V14.13: every wide table keeps its 1st column on the left while it scrolls sideways (like Excel Freeze First Column) */
.table-wrap > table > thead > tr > th:first-child,
.table-wrap > table > tbody > tr > td:first-child { position: sticky; left: 0; z-index: 2; background: var(--card); box-shadow: 1px 0 0 #e5e7eb; }
.table-wrap > table > thead > tr > th:first-child { background: #f9fafc; z-index: 3; }
.table-wrap > table > tbody > tr:hover > td:first-child { background: #f8faff; }
.table-wrap > table > tbody > tr > td.empty:first-child { position: static; box-shadow: none; }

/* V15.0 Warehouse › Outbound: Delivery Notify + Online Serial Number Tracking */
.dn-auto { padding: 8px 14px; font-size: 13px; margin-bottom: 12px; }
.dn-assign { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line, #e5e7eb); font-size: 13px; }
.dn-tbl td { vertical-align: top; } .dn-addr { max-width: 240px; } .dn-wa { margin-top: 4px; }
.dn-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.dn-card { padding: 0; } .dn-card-h { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line, #e5e7eb); font-size: 15px; }
.dn-card-b { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.dn-items { background: #f8fafc; border-radius: 8px; padding: 6px 10px; font-size: 13px; } .dn-times { font-size: 12.5px; color: #475569; }
.dn-big { padding: 12px; font-size: 16px; }
.dn-sides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dn-side { border: 2px dashed #cbd5e1; border-radius: 10px; min-height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; overflow: hidden; font-size: 12.5px; position: relative; }
.dn-side.done { border: 2px solid #16a34a; } .dn-side img { width: 100%; height: 70px; object-fit: cover; } .dn-side .dn-cam { font-size: 26px; }
.dn-side.busy { opacity: .5; pointer-events: none; }
.dn-side2 { padding: 0; justify-content: stretch; gap: 0; }   /* V19.38 take the picture or upload it */
.dn-side2 .dn-take { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; padding: 8px 4px 4px; }
.dn-upl { width: 100%; border-top: 1px dashed #cbd5e1; padding: 6px 4px; text-align: center; font-size: 12px; font-weight: 600; color: #4338ca; background: #f8fafc; cursor: pointer; }
.dn-upl:hover { background: #eef2ff; }
.dn-reups { position: absolute; top: 4px; right: 4px; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; z-index: 1; }
.dn-reups .dn-reup { position: static; }
.dn-steps { grid-template-columns: repeat(5, 1fr); margin-bottom: 14px; } @media (max-width: 800px) { .dn-steps { grid-template-columns: 1fr 1fr; } }
.sn-scan input[type=text] { font-size: 17px; padding: 10px; }
.dn-assign select, .dn-assign input { width: auto; min-width: 140px; }
.sn-plats { display: flex; flex-wrap: wrap; gap: 8px; } .sn-plat { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line, #e5e7eb); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 600; }
.sn-plat:has(input:checked) { border-color: var(--primary, #312e81); background: var(--primary-soft, #eef2ff); color: var(--primary, #312e81); }
.sn-grid3 { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 12px; } @media (max-width: 700px) { .sn-grid3 { grid-template-columns: 1fr; } }
.sn-prog { margin: 6px 0; font-size: 15px; }
.dn-post { color: #b45309; font-size: 12.5px; }
.dn-nav { align-self: flex-start; } .dn-trk { font-size: 12.5px; color: #0369a1; }
.dn-live { background: #ecfeff; border: 1px solid #a5f3fc; border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.ev-setcard { margin-bottom: 18px; } .ev-setcard h3 { margin-top: 0; }
.pe-prn-saved { font-size: 11px; color: #15803d; margin-top: 2px; white-space: nowrap; }
.ev-rw-sum { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } .ev-rw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; margin-top: 8px; }
@media (max-width: 600px) { .ev-rw-grid { grid-template-columns: 1fr; } }
.ev-rw-hq { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line, #e5e7eb); }
@media (max-width: 900px) { .ev-rw-hq { grid-template-columns: 1fr; } }
.g-rw { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; background: #fafbff; }
.g-rw-h { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; } .g-rw-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
@media (max-width: 800px) { .g-rw-cols { grid-template-columns: 1fr; } }
.ev-colt { white-space: nowrap; text-align: right; }
select.ta-reason { min-width: 240px; max-width: 360px; }
.g-grp { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.g-grp-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .g-grp-n { background: #1e3a8a; color: #fff; border-radius: 50%; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.g-grp-name { font-weight: 700; font-size: 15px; flex: 1; max-width: 420px; } .g-grp h4 { margin: 12px 0 6px; }
.ev-grp { margin-top: 12px; max-width: 520px; } .ev-grp table { margin: 6px 0; } select.ev-cat { min-width: 170px; }
#evForm .card input:disabled, #evForm .card select:disabled, #evForm .card textarea:disabled { background: #f3f4f6; color: #374151; cursor: not-allowed; }
.ev-sec { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 22px 0 10px; padding: 10px 14px; border-radius: 10px; color: #fff; }
.ev-sec b { font-size: 15.5px; } .ev-sec span { font-size: 12.5px; opacity: .92; } .ev-sec .badge { margin-left: auto; color: #1f2937; opacity: 1; }
.ev-sec-info { background: #1e3a8a; } .ev-sec-out { background: #047857; } .ev-sec-mkt { background: #6d28d9; }
.card.ev-c-info { border-left: 4px solid #1e3a8a; } .card.ev-c-out { border-left: 4px solid #047857; } .card.ev-c-mkt { border-left: 4px solid #6d28d9; }
.ev-rv-float { position: fixed; bottom: 14px; right: 18px; z-index: 60; max-width: calc(100vw - 36px); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  background: #fff; border: 1px solid var(--line, #e5e7eb); border-left: 5px solid #047857; border-radius: 12px; padding: 8px 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, .18); }
.ev-rv-float[hidden] { display: none; } .ev-rv-mini { display: flex; gap: 10px; font-size: 12.5px; color: #6b7280; } .ev-rv-mini .done { color: #047857; font-weight: 600; }
.ev-rv-fbtns { display: flex; gap: 6px; flex-wrap: wrap; } .ev-rv-fbtns .btn { padding: 6px 12px; font-size: 13px; }
@media (max-width: 700px) { .ev-rv-float { left: 10px; right: 10px; bottom: 10px; } }
.ev-rv-float .btn { height: 34px; padding: 0 14px; font-size: 13px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; }
.ev-rv-float [data-rvtop] { min-width: 34px; padding: 0 10px; }
body.ev-has-bar #app { padding-bottom: 80px; }
.ev-sec-adm { background: #b45309; } .card.ev-c-adm { border-left: 4px solid #b45309; }
.g-by { white-space: nowrap; } .g-by .check-inline { margin-right: 10px; font-size: 12.5px; }
tr.att-imp td { background: #ecfdf5; }
.vt-res { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.vt-win { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; } .vt-win > div { background: #fff7ed; border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
.vt-bar { margin: 8px 0; } .vt-bar > div { display: flex; justify-content: space-between; font-size: 14px; } .vt-bar i { display: block; height: 10px; background: #2e348a; border-radius: 5px; margin-top: 3px; min-width: 2px; }
/* V16.2 the voting editor */
.vt-card .card-body { padding: 16px 20px 18px; } .vt-card .card-head .muted { font-size: 12.5px; }
.vt-g { display: grid; gap: 4px 18px; margin-bottom: 4px; } .vt-g .field { margin-bottom: 8px; }
.vt-g-13 { grid-template-columns: 1fr 2fr; } .vt-g-21 { grid-template-columns: 2fr 1fr; } .vt-g-11 { grid-template-columns: 1fr 1fr; } .vt-g-111 { grid-template-columns: 1fr 1fr 1fr; align-items: end; }
@media (max-width: 860px) { .vt-g-13, .vt-g-21, .vt-g-11, .vt-g-111 { grid-template-columns: 1fr; } }
.vt-code { text-transform: uppercase; font-weight: 700; letter-spacing: .5px; } .vt-link { font-size: 12.5px; margin: -4px 0 10px; word-break: break-all; }
.vt-color { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 5px 10px; height: 42px; background: #fff; }
.vt-color input[type=color] { width: 44px; height: 30px; border: 0; padding: 0; background: none; cursor: pointer; } .vt-color code { font-size: 13px; color: #374151; }
.vt-switch { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; padding: 8px 14px; margin-bottom: 8px; cursor: pointer; background: #fff; min-height: 52px; }
.vt-switch input { display: none; } .vt-switch i { width: 46px; height: 26px; border-radius: 13px; background: #d1d5db; position: relative; flex: none; transition: background .2s; }
.vt-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.vt-switch input:checked + i { background: #047857; } .vt-switch input:checked + i::after { left: 23px; }
.vt-switch span { display: flex; flex-direction: column; line-height: 1.25; } .vt-switch small { color: #6b7280; font-size: 12px; }
.vt-switch .on { display: none; color: #047857; } .vt-switch .off { color: #b91c1c; } .vt-switch:has(input:checked) .on { display: inline; } .vt-switch:has(input:checked) .off { display: none; }
.vt-banner { position: relative; height: 150px; border: 2px dashed var(--line, #d1d5db); border-radius: 14px; background: #f8fafc center / cover no-repeat; display: flex; align-items: center; justify-content: center; }
.vt-banner-btns { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; } .vt-banner-btns .btn { background: #fff; }
.vt-opt { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: #fff; }
.vt-opt input { margin-top: 3px; width: 18px; height: 18px; accent-color: #2e348a; } .vt-opt span { display: flex; flex-direction: column; } .vt-opt small { color: #6b7280; font-size: 12px; }
.vt-opt:has(input:checked) { border-color: #2e348a; background: #f5f6ff; }
.vt-g-opts { align-items: stretch; } .vt-g-111:not(.vt-g-opts) { grid-template-columns: 1fr 1fr 1.25fr; }
.vt-qrbox { position: relative; } .vt-qrbox svg { width: 100%; height: auto; display: block; }
.vt-qrlogo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34%; background: #fff; padding: 2% 3%; border-radius: 8px; }
.vt-addr { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; } .vt-codebox { display: flex; gap: 6px; } .vt-codebox input { flex: 1; }
/* V16.7 the letter / email page: bigger, the letter beside the form */
dialog.full { width: min(1600px, calc(100vw - 24px)); max-width: none; height: calc(100vh - 24px); max-height: none; }
dialog.full > form { display: flex; flex-direction: column; height: 100%; } dialog.full .dlg-actions { margin-top: auto; padding-top: 10px; }
.adl-split { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(420px, 1.05fr); gap: 16px; min-height: 0; flex: 1; }
dialog.full .adl-split { height: calc(100vh - 170px); } dialog.full .adl-form { overflow: auto; padding-right: 6px; }
.adl-prev { display: flex; flex-direction: column; min-height: 0; } .adl-prev-h { font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adl-ifr { flex: 1; width: 100%; min-height: 520px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 6px #f3f4f6; }
.adl-split-tpl { height: auto; } .adl-split-tpl .adl-ifr { min-height: 640px; }
.tpl-body { font-family: Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.5; min-height: 300px; }
.tpl-tb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 6px; } .tpl-tb select { max-width: 280px; }
.tpl-tb-tbl { display: inline-flex; gap: 6px; align-items: center; background: #f5f6ff; border-radius: 8px; padding: 4px 8px; font-size: 12.5px; } .tpl-tb-tbl input[type=number] { width: 54px; }
.adm-mail-grid { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(460px, 1.4fr); gap: 16px; height: calc(100vh - 170px); min-height: 0; }
.adm-mail-l { overflow: auto; } .adm-mail-r { display: flex; flex-direction: column; min-height: 0; } .adm-mail-tb { margin-left: auto; display: flex; gap: 4px; }
.adm-mail-ifr { flex: 1; width: 100%; min-height: 480px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; background: #fff; }
@media (max-width: 1000px) { .adl-split, .adm-mail-grid { grid-template-columns: 1fr; height: auto; } dialog.full { height: auto; } .adl-ifr, .adm-mail-ifr { min-height: 420px; } }
.tpl-tb-tbl[hidden] { display: none; }
/* V16.8 the big page: the panels take the space left, the buttons always stay visible at the bottom */
dialog.full { overflow: hidden; } dialog.full > form { box-sizing: border-box; height: 100%; min-height: 0; padding: 16px 20px; gap: 8px; }
dialog.full > form > h3, dialog.full .dlg-actions, dialog.full .form-error { flex: none; }
dialog.full .adl-split, dialog.full .adm-mail-grid { height: auto; flex: 1 1 0; min-height: 0; }
dialog.full .adl-form, dialog.full .adm-mail-l { min-height: 0; overflow: auto; } dialog.full .adl-ifr, dialog.full .adm-mail-ifr { min-height: 0; }
dialog.full .dlg-actions { margin-top: 0; padding-top: 8px; border-top: 1px solid var(--line, #e5e7eb); }
@media (max-width: 1000px) { dialog.full { height: calc(100vh - 24px); } dialog.full .adl-split, dialog.full .adm-mail-grid { display: block; overflow: auto; } dialog.full .adl-ifr, dialog.full .adm-mail-ifr { height: 460px; } }
/* V16.12 Submit – choose the sections */
.sub-pick { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow: auto; }
.sub-pick-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line, #e5e7eb); border-radius: 8px; cursor: pointer; }
.sub-pick-row input { margin-top: 3px; } .sub-pick-row small { display: block; color: var(--ok, #047857); font-size: 12px; margin-top: 2px; }
.sub-pick-row.miss small { color: #b45309; } .sub-pick-row:has(input:checked) { background: #f0f4ff; border-color: #c7d2fe; }
.sub-pick-all { display: flex; gap: 6px; }
.ro-lock { background: #f3f4f6 !important; color: #374151; cursor: not-allowed; }  /* V16.13 */
/* V16.14 Memo of the outlet: titles on the left, the memo on the right */
.mr-wrap { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 16px; height: calc(100vh - 170px); min-height: 480px; }
.mr-list { display: flex; flex-direction: column; overflow: hidden; margin: 0; } .mr-find { padding: 10px; border-bottom: 1px solid var(--line, #e5e7eb); } .mr-find input { width: 100%; }
.mr-items { overflow: auto; flex: 1; padding: 4px 6px 10px; }
.mr-year { font-weight: 700; font-size: 12px; color: var(--muted, #6b7280); padding: 10px 8px 4px; letter-spacing: .04em; }
.mr-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 10px; cursor: pointer; font: inherit; color: inherit; }
.mr-item:hover { background: #f3f4f6; } .mr-item.on { background: #eef0ff; color: #2b2f7a; font-weight: 600; }
.mr-item .mr-t { flex: 1; min-width: 0; overflow-wrap: anywhere; } .mr-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.mr-item.unread .mr-dot { background: #4f46e5; } .mr-item.unread .mr-t { font-weight: 600; }
.mr-view { display: flex; flex-direction: column; overflow: hidden; margin: 0; } .mr-view-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line, #e5e7eb); }
.mr-view-h h2 { flex: 1; margin: 0; font-size: 18px; } .mr-doc { flex: 1; min-height: 0; overflow: auto; background: #f3f4f6; }
.mr-pdf { width: 100%; height: 100%; border: 0; display: block; background: #fff; } .mr-letter { background: #fff; max-width: 860px; margin: 16px auto; padding: 24px; }
@media (max-width: 900px) { .mr-wrap { grid-template-columns: 1fr; height: auto; } .mr-items { max-height: 260px; } .mr-view { height: 80vh; } }
/* V16.15 memo list: year -> month */
button.mr-year { display: flex; justify-content: space-between; align-items: center; width: 100%; background: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 14px; color: inherit; padding: 10px 8px 6px; border-top: 1px solid var(--line, #e5e7eb); margin-top: 4px; letter-spacing: 0; }
button.mr-year:first-child { border-top: 0; margin-top: 0; } button.mr-year .muted { font-weight: 400; font-size: 12px; } .mr-nnew { color: #dc2626; }
.mr-month { font-size: 11.5px; font-weight: 600; color: var(--muted, #6b7280); text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px 2px; }
.mm-presig { margin-top: 8px; padding: 8px 12px; border: 1px solid #c7d2fe; background: #f5f6ff; border-radius: 8px; }  /* V16.16 */
/* V16.17 COA item locked after the editable time */
.coa-lock-b { font-size: 11.5px; color: #92400e; margin-top: 3px; } .coa-locked [data-key]:disabled { background: #f3f4f6; }
/* V16.18 Users & Access Control tabs, people search, outlet grey tick, Program Settings fold */
.ua-tabs { display: flex; gap: 4px; margin: 10px 0 4px; border-bottom: 2px solid var(--line, #e5e7eb); }
.ua-tabs a { padding: 8px 16px; border-radius: 8px 8px 0 0; text-decoration: none; color: var(--muted, #6b7280); font-weight: 600; margin-bottom: -2px; border-bottom: 2px solid transparent; }
.ua-tabs a.on { color: var(--primary, #2f3483); border-bottom-color: var(--primary, #2f3483); background: #f5f6ff; } .ua-tabs a:hover { color: var(--primary, #2f3483); }
.acc-find { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line, #e5e7eb); } .acc-find input { flex: 1; max-width: 460px; }
.acc-out-fixed { accent-color: #9ca3af; opacity: .75; cursor: not-allowed; }
button.set-dept-tog { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; }
button.set-dept-tog:hover { background: #f3f4ff; } .set-chev { width: 12px; color: var(--muted, #6b7280); font-size: 11px; }
.uac-table .sig-cell img { max-height: 28px; } .uac-table td { vertical-align: middle; }  /* V16.19 */
#hrStats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }  /* V16.21: 5 cards */
.ev-sales-tot td { background: #f5f6ff; border-top: 2px solid #c7d2fe; font-weight: 600; }  /* V16.24 */
/* V16.25 Guideline › Expense items: Claimed by = one row of tick chips */
.g-items td.g-by { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-start; text-align: left; }
.g-items td.g-by label.check-inline { display: inline-flex; align-items: center; gap: 6px; width: auto; margin: 0; padding: 5px 12px; border: 1px solid var(--line, #e5e7eb); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 500; white-space: nowrap; justify-content: flex-start; }
.g-items td.g-by label.check-inline input { width: auto; margin: 0; flex: none; }
.g-items td.g-by label.check-inline:has(input:checked) { background: #eef0ff; border-color: #c7d2fe; color: #2b2f7a; }
.g-items th:first-child, .g-items td:first-child { width: 42%; } .g-items td:last-child { width: 48px; text-align: right; }
/* V16.26 Guideline: hide / show each Main Cost Group */
.g-tog { border: 1px solid var(--line, #e5e7eb); background: #fff; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; font-size: 12px; color: var(--muted, #6b7280); flex: none; }
.g-tog:hover { background: #f3f4ff; color: var(--primary, #2f3483); } .g-grp-cnt { font-size: 12px; white-space: nowrap; }
.g-grp.g-shut > :not(.g-grp-h) { display: none !important; } .g-grp.g-shut { padding-bottom: 6px; }
.g-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .g-allbtns { margin-left: auto; display: flex; gap: 6px; font-weight: 400; }
/* V17.0 User Manual (All System) */
.um-wrap { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
.um-nav { position: sticky; top: 12px; max-height: calc(100vh - 140px); display: flex; flex-direction: column; overflow: hidden; margin: 0; }
.um-find { padding: 10px; border-bottom: 1px solid var(--line, #e5e7eb); } .um-find input { width: 100%; }
.um-list { overflow: auto; padding: 4px 6px 10px; } .um-dept { font-weight: 800; font-size: 13px; padding: 12px 8px 4px; border-top: 1px solid var(--line, #e5e7eb); margin-top: 4px; }
.um-dept:first-child { border-top: 0; margin-top: 0; }
.um-it { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.um-it:hover { background: #f3f4f6; } .um-it.on { background: #eef0ff; color: #2b2f7a; font-weight: 600; }
.um-ic { width: 20px; text-align: center; flex: none; } .um-tt { flex: 1; min-width: 0; } .um-mine { color: var(--ok, #047857); font-weight: 700; }
.um-ord { display: none; gap: 2px; } .um-it:hover .um-ord, .um-it.on .um-ord { display: inline-flex; } .um-ord button { border: 1px solid var(--line, #e5e7eb); background: #fff; border-radius: 4px; font-size: 9px; padding: 1px 4px; cursor: pointer; }
.um-view { margin: 0; padding: 18px 24px; min-height: 60vh; } .um-view-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .um-view-h h2 { flex: 1; margin: 0; font-size: 22px; }
.um-view-btns { display: flex; gap: 6px; } .um-meta { font-size: 12px; margin: 4px 0 12px; } .um-fb { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; margin-bottom: 10px; }
.um-body { line-height: 1.65; font-size: 14.5px; } .um-body h2 { font-size: 18px; margin: 18px 0 6px; } .um-body h3 { font-size: 15.5px; margin: 16px 0 6px; color: var(--primary, #2f3483); }
.um-body ol, .um-body ul { padding-left: 22px; } .um-body li { margin-bottom: 4px; } .um-body img, .um-editor img { max-width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line, #e5e7eb); margin: 6px 0; }
.um-body table, .um-editor table { border-collapse: collapse; width: 100%; margin: 8px 0; } .um-body td, .um-body th, .um-editor td, .um-editor th { border: 1px solid #cbd5e1; padding: 6px 10px; text-align: left; vertical-align: top; }
.um-body th, .um-editor th { background: #eef2f7; } .um-langs { display: inline-flex; gap: 4px; margin-right: 6px; }
.um-ed-grid { display: grid; grid-template-columns: 1fr 120px 1fr; gap: 10px; } .um-ed-tabs { display: flex; gap: 6px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.um-editor { min-height: 45vh; max-height: calc(100vh - 360px); overflow: auto; }
dialog.full .um-ed-lang { display: flex; flex-direction: column; min-height: 0; } dialog.full .um-ed-lang[hidden] { display: none; }
@media (max-width: 900px) { .um-wrap { grid-template-columns: 1fr; } .um-nav { position: static; max-height: 300px; } .um-ed-grid { grid-template-columns: 1fr; } }
/* V17.1 User Manual: systems + documents */
button.um-sys { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: #f5f6ff; color: #2b2f7a; font: inherit; font-weight: 800; font-size: 13.5px; padding: 9px 10px; border-radius: 8px; cursor: pointer; margin-top: 8px; text-align: left; }
button.um-sys:first-child { margin-top: 0; } button.um-sys .muted { margin-left: auto; font-weight: 400; font-size: 12px; } button.um-sys:not(.portal) { background: #f0fdf4; color: #14532d; }
.um-docn { font-size: 12px; white-space: nowrap; }
.um-docs { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.um-doc { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; overflow: hidden; background: #fff; }
.um-doc-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: #f8fafc; border-bottom: 1px solid var(--line, #e5e7eb); }
.um-pdf { width: 100%; height: 75vh; border: 0; display: block; }
.um-doc.file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; } .um-doc-ic { font-size: 28px; } .um-doc-n { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.um-ed-sys input { width: 100%; } .um-ed-docs { border: 1px dashed #c7d2fe; border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.um-ed-docs-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .um-ed-docs-h label { margin-left: auto; cursor: pointer; }
#umDocList { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .um-ed-doc { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line, #e5e7eb); border-radius: 999px; font-size: 12.5px; background: #fff; }
.um-ed-doc button { border: 0; background: none; cursor: pointer; color: #b91c1c; }
/* V17.2 User Manual – first page: choose the system */
.um-hfind { padding: 12px; } .um-hfind input { width: 100%; font-size: 15px; }
.um-hres { padding: 6px; display: flex; flex-direction: column; } .um-hit { display: flex; justify-content: space-between; gap: 10px; border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 8px; cursor: pointer; font: inherit; }
.um-hit:hover { background: #f3f4ff; }
.um-sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 8px; }
.um-sys-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 20px; border-radius: 14px; border: 1px solid var(--line, #e5e7eb); background: #fff; cursor: pointer; font: inherit; color: inherit; transition: box-shadow .15s, transform .15s; min-height: 170px; }
.um-sys-card:hover { box-shadow: 0 6px 18px rgba(30, 41, 99, .12); transform: translateY(-2px); border-color: #c7d2fe; }
.um-sys-card.portal { background: linear-gradient(180deg, #f5f6ff, #fff); border-color: #c7d2fe; }
.um-sys-ic { font-size: 34px; } .um-sys-n { font-size: 18px; font-weight: 800; color: var(--primary, #2f3483); } .um-sys-m { font-size: 13px; color: var(--muted, #6b7280); }
.um-sys-mine { font-size: 12.5px; color: var(--ok, #047857); font-weight: 600; } .um-sys-d { font-size: 15px; letter-spacing: 2px; } .um-sys-go { margin-top: auto; font-weight: 700; color: var(--primary, #2f3483); font-size: 13px; }
.um-sys-card.add { border-style: dashed; background: #fafafa; justify-content: center; align-items: center; text-align: center; } .um-sys-card.add .um-sys-n { color: inherit; }
/* V17.5 Home stay bookings */
.hb-search { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(2, minmax(130px, 1fr)) repeat(2, 90px); gap: 8px 10px; align-items: end; }
.hb-btns { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; } .hb-tip { font-size: 12.5px; margin: 6px 0 10px; }
.hb-tbl td { vertical-align: top; } .ev-hb-line td { background: #f8fafc; }
.hb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; } .hb-grid .hb-wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .hb-search, .hb-grid { grid-template-columns: 1fr 1fr; } .hb-search .field:first-child { grid-column: 1 / -1; } }
.ev-out-hint { display: block; font-size: 11.5px; margin-top: 3px; }  /* V17.7 */
/* V17.9 Book hotel for manpower */
.hb-wiz-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; } .hb-wiz-btn { font-weight: 700; }
.hb-mark { font-size: 11.5px; color: #0f766e; font-weight: 600; margin-top: 2px; }
.hbw { display: flex; flex-direction: column; gap: 12px; overflow: auto; flex: 1; min-height: 0; padding-right: 4px; }
.hbw-s { border: 1px solid var(--line, #e5e7eb); border-radius: 12px; padding: 12px 14px; background: #fff; }
.hbw-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; } .hbw-h b { font-size: 15px; color: var(--primary, #2f3483); }
.hbw-opt { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.hbw-sum { margin-top: 8px; font-size: 13.5px; } .hbw-off td { opacity: .55; }
.hbw-search { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; } .hbw-search .field { flex: 1; min-width: 240px; margin: 0; }
.hbw-drop { min-height: 90px; }
.hbw-opt select { width: auto; min-width: 60px; } .hbw-opt .check-inline { white-space: nowrap; }
/* V17.10 hotel requests */
.hrq-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.hrq-atk { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; background: #fff; color: inherit; text-decoration: none; }
.hrq-atk:hover { border-color: #4f46e5; box-shadow: 0 2px 10px rgba(79, 70, 229, .12); }
.hrq-atk-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; background: #eef2ff; flex: none; }
.hrq-atk-m { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; min-width: 0; flex: 1; } .hrq-atk-m .muted { flex-basis: 100%; font-size: 12.5px; }
.hrq-atk-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: #4f46e5; font-size: 12.5px; font-weight: 600; } .hrq-atk-r b { color: var(--ink, #0f172a); font-size: 14px; }
.hq-for { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 600; }
.hrq-old { margin-top: 10px; } .hrq-old summary { cursor: pointer; margin-bottom: 8px; }
.hrq-card { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.hrq-h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; } .hrq-act { margin-left: auto; display: flex; gap: 6px; }
.hrq-opt { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 4px 0; font-size: 13.5px; } .hrq-opt .btn { margin-left: auto; }
.hrq-wait { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 12px; margin: 10px 0; } .hrq-wait-h { font-weight: 700; margin-bottom: 8px; color: #92400e; }
.hbw-opt-row { display: grid; grid-template-columns: 22px minmax(160px, 1.3fr) minmax(200px, 2fr) 110px minmax(140px, 1.3fr); gap: 6px; align-items: center; margin-bottom: 6px; }
@media (max-width: 900px) { .hbw-opt-row { grid-template-columns: 22px 1fr 1fr; } }

/* V17.11 who searches the hotel */
.hbw-by { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; font-size: 13.5px; } .hbw-by > span { font-weight: 600; }
/* V17.12 each staff's dates */
.hbw-d { width: 140px; padding: 4px 6px; font-size: 13px; } .hbw-ro { background: #f3f4f6; color: #374151; pointer-events: none; }
/* V17.17 serial scan: the item of the barcode */
.sn-item { display: block; min-height: 16px; margin-top: 3px; font-size: 12.5px; }
.sn-scan .field > .wh-inrow { display: flex; flex-wrap: nowrap; gap: 6px; align-items: stretch; margin: 0; } .sn-scan .wh-inrow input { flex: 1 1 auto; min-width: 0; } .sn-scan .wh-inrow .wh-cambtn { flex: 0 0 auto; }
/* V17.18 Scan Serial Number laid out like GRF */
.sn-form #snAdd { height: 44px; box-sizing: border-box; white-space: nowrap; }
@media (max-width: 760px) { .sn-form #snAdd { width: 100%; } }
.sn-form .gs-what .ev-neg { color: var(--bad, #b91c1c); }
.sn-sub { display: flex; gap: 16px; align-items: end; flex-wrap: wrap; margin-top: 6px; } .sn-sub .sn-order { width: 260px; margin: 0; } .sn-sub .check-line { margin: 0 0 10px; }
/* V17.19 Scan Serial Number: own columns (Tracking / Order ID, then Barcode · Qty · Serial · Add); serials listed under each item */
.sn-head { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr); gap: 12px; margin-bottom: 10px; max-width: 900px; }
.sn-form { display: grid; grid-template-columns: minmax(260px, 1.6fr) 190px minmax(280px, 2fr) auto; gap: 10px; align-items: end; row-gap: 22px; }
.sn-head .field, .sn-form .field { margin: 0; }
.sn-head input, .sn-form input, .sn-head .wh-cambtn, .sn-form .wh-cambtn, .sn-form #snAdd { height: 44px; box-sizing: border-box; font-size: 16px; }
.sn-form input, .sn-head #snTrk { text-transform: uppercase; } .sn-form input::placeholder, .sn-head input::placeholder { text-transform: none; }
@media (max-width: 900px) { .sn-head, .sn-form { grid-template-columns: 1fr; } .sn-form #snAdd { width: 100%; } .sn-form .gs-code { margin-bottom: 12px; } }
.sn-prog { margin-top: 10px; }
.sn-tbl .sn-grp td { background: #f1f5f9; border-top: 2px solid #cbd5e1; } .sn-tbl .sn-cnt { float: right; font-weight: 700; }
/* V17.22 Serial Tracking List: one row per item */
tr.sn-more td { border-top: 1px dashed #e5e7eb; }
.sn-list td, .sn-list th { white-space: nowrap; } .sn-list .sn-file { display: inline-block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
/* V17.23 platform chip in the scanned list */
.sn-gp { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #e0e7ff; color: #3730a3; font-size: 12px; font-weight: 700; }
/* V17.28 Telegram bot */
.tg-status { font-weight: 700; } .tg-code { font-size: 16px; padding: 3px 8px; background: #eef2ff; border-radius: 6px; }
/* V17.30 AI Agent API */
.ag-new { padding: 14px 18px; border: 2px solid #86efac; background: #f0fdf4; } .ag-keyline { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; } .ag-keyline code { font-size: 14px; padding: 6px 10px; background: #fff; border: 1px solid #d1d5db; border-radius: 6px; word-break: break-all; }
.ag-form { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; } .ag-form .field { margin: 0; } .ag-doc td { vertical-align: top; padding: 6px 8px; } .ag-doc code { word-break: break-all; }
/* V17.31 the customer's tracking link */
.dn-tlink { font-size: 12.5px; margin: 6px 0; word-break: break-all; }
/* V17.33 the Darson Driver / Darson Online app: full screen, a small bar on top */
body.one-app .topbar, body.one-app .sidebar, body.one-app #sidebar { display: none !important; }
body.one-app .layout, body.one-app .main-wrap { display: block !important; padding: 0 !important; }
body.one-app #app { padding: 10px !important; margin: 0 !important; max-width: none !important; }
#appBar { position: sticky; top: 0; z-index: 50; background: #2e348a; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
#appBar .ab-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
#appBar img { height: 26px; background: #fff; border-radius: 6px; padding: 2px 6px; } #appBar b { font-size: 16px; }
#appBar .ab-user { margin-left: auto; font-size: 12.5px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
#appBar .ab-tabs { display: flex; gap: 4px; padding: 0 8px 8px; overflow-x: auto; }
#appBar .ab-tabs a { flex: 1; text-align: center; padding: 8px 10px; border-radius: 8px; color: #fff; text-decoration: none; background: rgba(255,255,255,.12); font-weight: 600; font-size: 14px; white-space: nowrap; }
#appBar .ab-tabs a.on { background: #fff; color: #2e348a; }

/* V17.35 Scan Serial: Qty 1 by default (locked) – ✎ Change opens it */
.sn-form #snQty[readonly] { background: #f1f5f9; font-weight: 700; text-align: center; }
.sn-form #snQtyEdit { white-space: nowrap; }

/* V17.35 Bin Transfer: Qty amend + DL / Normal tabs + normal Bin Transfer form */
.pe-bt .mc-table input.pe-bt-qty { width: 100px; min-width: 100px; text-align: right; font-weight: 700; }
.pe-bt .mc-table input.pe-bt-in { width: 150px; min-width: 150px; }
.bt-tabs { display: flex; gap: 0; margin: 0 0 14px; border-bottom: 2px solid var(--line, #e2e8f0); flex-wrap: wrap; }
.bt-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: 10px 18px; font: inherit; font-weight: 600; font-size: 15px; color: var(--muted, #64748b); cursor: pointer; }
.bt-tabs button.on { color: var(--primary, #312e81); border-bottom-color: var(--primary, #312e81); }
.bt-tabs .bt-n { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; background: #eef2ff; color: var(--primary, #312e81); font-size: 12px; }
.pe-bn-form { display: grid; grid-template-columns: 170px minmax(220px, 2fr) minmax(140px, 1fr) minmax(140px, 1fr) 110px auto; gap: 12px; align-items: end; }
.pe-bn-form .field { margin: 0; }
.pe-bn-form input, .pe-bn-form select, .pe-bn-form #bnAdd { height: 44px; box-sizing: border-box; font-size: 16px; }
.pe-bn-form #bnAdd { white-space: nowrap; padding: 0 20px; }
.pe-bn-form input { text-transform: uppercase; } .pe-bn-form input::placeholder { text-transform: none; }
.pe-bn-what { min-height: 20px; margin: 6px 0 10px; font-size: 13px; }
@media (max-width: 900px) { .pe-bn-form { grid-template-columns: 1fr 1fr; } .pe-bn-form #bnAdd { grid-column: 1 / -1; width: 100%; } }
.pe-bt-man { border-left: 3px solid var(--primary, #312e81); }
.pe-bn-form #bnWh[readonly] { background: #f1f5f9; font-weight: 700; }

/* V17.35 Scan Serial Number – tidy layout: Platform · Tracking | Barcode | Quantity · Serial Number | Add */
.sn-scan .card-body, .sn-scanned .card-body { padding: 16px 20px 18px; }
.sn-scan .sn-platf { margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line, #e5e7eb); }
.sn-grid { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.3fr) 230px; gap: 14px 14px; align-items: start; }
.sn-grid .field { margin: 0; }
.sn-grid .sn-serf { grid-column: 1 / 3; }
.sn-grid input, .sn-grid .wh-cambtn, .sn-grid #snAdd { height: 46px; box-sizing: border-box; font-size: 16px; }
.sn-grid .wh-cambtn { min-width: 52px; justify-content: center; }
.sn-grid #snAdd { width: 100%; font-size: 16px; }
.sn-grid input { text-transform: uppercase; } .sn-grid input::placeholder { text-transform: none; }
.sn-grid #snQty[readonly] { background: #f1f5f9; font-weight: 700; text-align: center; }
.sn-grid #snQtyEdit { white-space: nowrap; }
.sn-grid .gs-what { position: static; display: block; min-height: 16px; margin-top: 4px; font-size: 12.5px; }
.sn-scan .sn-prog { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line, #e5e7eb); }
.sn-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line, #e5e7eb); }
.sn-foot .btn { height: 42px; padding: 0 20px; }
.sn-foot-note { font-size: 12.5px; margin-left: auto; }
@media (max-width: 900px) {
  .sn-grid { grid-template-columns: 1fr; } .sn-grid .sn-serf { grid-column: auto; } .sn-grid .sn-addf > span { display: none; }
  .sn-scan .card-body, .sn-scanned .card-body { padding: 12px 12px 14px; } .sn-foot-note { margin-left: 0; width: 100%; }
  .sn-foot .btn { flex: 1; }
}
.sn-grid .gs-what .ev-neg { color: var(--bad, #b91c1c); }
.tr-am-row { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }   /* V19.47 */
.tr-am-who { margin-bottom: 6px; } .tr-am-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; } .tr-am-tt:empty { display: none; }
.ad-signed-lock { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 8px; background: #f1f5f9; color: #475569; font-size: 13px; font-weight: 600; }   /* V19.49 */
tr.adc-draft-row { cursor: pointer; } tr.adc-draft-row:hover td { background: #f8fafc; }   /* V19.54 */
.adc-draft-link { font-weight: 600; text-decoration: underline; }
/* V19.55 E-sign Approval */
.es-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 12px; border: 1px dashed var(--line, #cbd5e1); border-radius: 10px; background: #f8fafc; font-size: 13px; }
.es-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12.5px; }
.es-card .es-card-b { padding: 12px 16px; } .es-row { cursor: pointer; } .es-row:hover td { background: #f8fafc; }
.es-view { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; } .es-view.es-view-1 { grid-template-columns: 1fr; }
.es-doc { padding: 0; overflow: hidden; } .es-doc iframe { width: 100%; height: 78vh; border: 0; background: #fff; display: block; }
.es-sign { padding: 14px; position: sticky; top: 70px; } .es-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
@media (max-width: 900px) { .es-view { grid-template-columns: 1fr; } .es-sign { position: static; } .es-doc iframe { height: 60vh; } }
.adc-resp-row { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 10px 12px; margin-top: 8px; background: #fff; }   /* V19.56 */
.adc-resp-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .adc-resp-h .btn { margin-left: auto; }
.adc-resp-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 14px; margin-top: 8px; font-size: 13px; }
.adc-resp-g > div > span.muted { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; }
.adc-resp-sig { max-height: 54px; max-width: 200px; display: block; background: #fff; border: 1px dashed #cbd5e1; border-radius: 6px; padding: 2px; }
/* V19.57 Voting – the winner screen editor */
.vt-win { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line, #cbd5e1); }
.vt-win-h { margin-bottom: 8px; } .vt-win-stage { position: relative; width: 100%; max-width: 760px; aspect-ratio: 16 / 9; background: #0b1020; border-radius: 10px; overflow: hidden; touch-action: none; user-select: none; }
.vt-win-stage > img, .vt-win-stage > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.vt-win-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #cbd5e1; text-align: center; padding: 20px; font-size: 13px; }
.vt-slot { position: absolute; border: 2px dashed #f59e0b; background: rgba(245, 158, 11, .18); border-radius: 6px; cursor: move; box-sizing: border-box; }
.vt-slot.drag { background: rgba(245, 158, 11, .32); } .vt-slot span { position: absolute; left: 4px; top: 3px; background: #f59e0b; color: #111; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.vt-rz { position: absolute; right: -6px; bottom: -6px; width: 14px; height: 14px; background: #f59e0b; border: 2px solid #fff; border-radius: 50%; cursor: nwse-resize; }
.vt-win-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; } .vt-win-bar input[type=color] { width: 34px; height: 24px; padding: 0; border: 0; vertical-align: middle; }
.vt-slot-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; } .vt-slot-it select { width: auto; padding: 2px 6px; }
/* V19.70 a phone: the whole letter, the page scrolls (not a small box) */
@media (max-width: 760px) { .adl.adl-fit { height: auto !important; max-height: none !important; overflow: visible !important; display: block !important; } .adl.adl-fit .adl-doc { flex: none !important; }
  .adl.adl-fit .adl-act, .adl.adl-fit .adl-sign { max-height: none !important; overflow: visible !important; } .adl.adl-fit.is-full { overflow: auto !important; -webkit-overflow-scrolling: touch; } }
.adc-reply { min-width: 160px; max-width: 280px; font-size: 12px; } .adc-reply-t { white-space: normal; word-break: break-word; }
.adc-prow4 { grid-template-columns: 1.3fr 1fr 1.2fr .9fr !important; }
.ad-lock { padding: 12px 16px; border-left: 4px solid #64748b; background: #f1f5f9; margin-bottom: 10px; }   /* V19.46 */
.sl-dob { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; background: #f8fafc; }   /* V19.44 */
.sl-dob input[type="date"] { width: auto; } .sl-dob .sl-ro { min-width: 140px; }
.sl-hr11 { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line, #e5e7eb); }   /* V19.45 inside the Paternity Leave card */
.sl-hr11 > .sl-ld-h { font-size: 14px; font-weight: 700; color: var(--ink, #1c2433); margin-bottom: 8px; display: block; }
.sl-hr11-card > .card-body { padding: 14px 18px !important; } .sl-hr11-card .sl-hr11 { margin: 0; }   /* V19.37 */
.sl-hr11-b { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; background: #f8fafc; }   /* V19.35 */
.sl-hr11-b input[type="date"] { width: auto; }
.sl-wd { margin: 4px 0 10px; padding: 10px 12px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; background: #f8fafc; }   /* V19.35 HR18 item 7 */
.sl-wd-h { font-weight: 600; font-size: 13.5px; margin-bottom: 8px; }
.sl-wd-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 14px; }
.sl-wd-g label { display: grid; grid-template-columns: 86px minmax(64px, 1fr); align-items: center; gap: 6px; font-size: 13px; }
.sl-wd-g input { width: 100%; min-width: 64px; box-sizing: border-box; text-align: center; padding: 6px 4px; }
.sl-wd-f { font-size: 12.5px; margin-top: 6px; }
.sl-deliv { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; } .sl-deliv .field { margin: 0; width: 220px; }
/* V17.35 Delivery Notify: SB Client Delivery Notifier fields */
.dn-zone { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #e0f2fe; color: #075985; font-size: 12px; font-weight: 700; white-space: nowrap; }
.dn-rmk { margin-top: 4px; padding: 4px 8px; border-radius: 6px; background: #fef3c7; color: #92400e; font-size: 12.5px; font-weight: 600; }
.dn-svc { margin-top: 4px; color: var(--muted, #64748b); font-size: 12px; }
.sys-upd-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* V17.37 Delivery Notify reports */
.dnr-card { padding: 0; overflow: hidden; } .dnr-tbl { width: 100%; } .dnr-tbl th { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #6b7280); }
.dnr-tbl td { vertical-align: top; } .dnr-n { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: nowrap; } .dnr-bad { color: #c2410c; font-weight: 600; }
.dnr-h { font-size: 17px; margin: 18px 0 8px; }
.dns-sheet { background: #fff; color: #111; padding: 14px 16px; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; }
.dns-lh { display: block; max-width: 640px; width: 100%; margin: 0 auto 6px 0; }   /* V17.39 the letterhead on the left */ .dns-title { font-weight: 800; margin: 6px 0 4px; }
.dns-meta { display: flex; gap: 60px; flex-wrap: wrap; padding: 6px 0 8px; border-bottom: 1px solid #333; margin-bottom: 10px; } .dns-meta input { border: 0; border-bottom: 1px dotted #999; font: inherit; width: 160px; background: transparent; }
.dns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; align-items: start; }
.dns-out table { width: 100%; border-collapse: collapse; } .dns-out th, .dns-out td { border: 1px solid #333; padding: 3px 6px; font-size: 13px; height: 24px; } .dns-out th { font-weight: 600; text-align: left; }
.dns-oh { background: #ffff00; color: #c00000; font-weight: 600; padding: 3px 6px; font-size: 13px; border: 1px solid #333; border-bottom: 0; }
@media print { body.dns-print .dns-sheet { border: 0; padding: 0; } body.dns-print .dns-grid { grid-template-columns: repeat(6, 1fr); gap: 8px; } body.dns-print .dns-lh { max-width: 520px; } .dnr .no-print, .page-head.no-print { display: none !important; } }
@page { margin: 10mm; }
/* V17.38 the 6 sides of each item */
.dn-item-h { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin: 12px 0 6px; padding: 6px 10px; border-radius: 8px; background: #f1f5f9; font-size: 13.5px; }
.dn-item-h.done { background: #dcfce7; } .dn-item-h span { font-weight: 700; white-space: nowrap; }
.dn-item-h.later { background: #fef3c7; color: #92400e; } .dn-pick { display: grid; gap: 6px; margin-top: 4px; }
/* V17.41 the Delivery Notify / Serial Tracking cards on the SB Client page */
#pkDnHost > .page-head { display: none; } #pkDnHost { margin-top: 14px; }
/* V17.44 Canopy / Event – Setting: the Darson / DOMAIO tabs */
.ev-co-tabs { display: flex; gap: 6px; margin: 4px 0 8px; border-bottom: 2px solid var(--line, #e5e7eb); }
.ev-co-tabs .tab { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: 9px 20px; font-weight: 700; font-size: 15px; cursor: pointer; color: var(--muted, #64748b); }
.ev-co-tabs .tab.active { color: var(--brand, #2e3192); border-bottom-color: var(--brand, #2e3192); }
.ev-co-note { font-size: 12.5px; margin: 0 0 12px; }
/* V17.47 Performance Bonus: the 10 Days reward of a table */
.g-rw-long { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line, #e5e7eb); }
/* V17.48 the 10 Days reward: its own column (a box) between the reward steps and the split by role */
.g-rw-long { margin-top: 0; padding: 10px 12px; border: 1px solid var(--line, #e5e7eb); border-top: 3px solid var(--brand, #2e3192); border-radius: 10px; background: #fff; }
.g-rw-long .field { margin-top: 6px; }
@media (min-width: 900px) { .g-rw-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-rw-cols > div:last-child { grid-column: 1 / -1; } }
.g-rw-cols .ev-tbl { width: 100%; } .g-rw-cols .ev-tbl input { min-width: 0; width: 100%; box-sizing: border-box; }
/* V17.49 the Save buttons stick to the bottom of the screen while their form is in view */
.sticky-save { position: sticky; bottom: 0; z-index: 30; background: var(--card, #fff); padding: 10px 12px !important; margin-top: 12px;
  border-top: 1px solid var(--line, #e5e7eb); box-shadow: 0 -8px 14px -10px rgba(15, 23, 42, .35); border-radius: 0 0 10px 10px; }
dialog .sticky-save { bottom: -1px; }
.card:has(.sticky-save), .ev-setcard:has(.sticky-save), form:has(.sticky-save) { overflow: clip; }
body.ev-has-bar .sticky-save { bottom: 72px; }
#floatSave { position: fixed; right: 22px; bottom: 22px; z-index: 60; box-shadow: 0 6px 18px rgba(15,23,42,.35); padding: 12px 20px; font-size: 15px; }
/* V17.51 Super Admin delete on the page head */
.page-head .sa-del { margin-left: auto; align-self: center; }
/* V17.52 Admin Dept on its own page: the event page without section 4, the Admin Dept page with only it */
.ev-mode-main .ev-c-hs, .ev-mode-adm .ev-c-adm:not(.ev-c-hs) { display: none !important; }
.ev-mode-adm .ev-sec:not(.ev-sec-adm), .ev-mode-adm .card.adm:not(.ev-c-adm):not(.ev-c-info):not(.ev-c-hrq):not(.ev-rv) { display: none !important; }
.ev-mode-adm .ev-rv { border: 0; background: none; box-shadow: none; margin: 0; }
.ev-mode-adm .ev-rv > .card-head, .ev-mode-adm .ev-rv > .card-body > :not(.ev-rv-float), .ev-mode-adm .ev-rv-float > :not(.ev-save-all) { display: none !important; }
.ev-mode-adm .ev-rv > .card-body { padding: 0; }
.ev-mode-adm .ev-rv-float[hidden] { display: flex; }
.ev-adm-sum { border-left: 4px solid #b45309; } .ev-adm-sum .card-head .btn { margin-left: auto; }
.ev-adm-sumb { display: flex; flex-wrap: wrap; gap: 10px 36px; } .ev-adm-sumb > div { display: flex; flex-direction: column; gap: 2px; } .ev-adm-sumb b { font-size: 16px; }
/* V17.53 Air Ticket Booking Form (HR17) */
.atk-trip { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.atk-h { margin: 18px 0 8px; font-size: 15px; border-bottom: 1px solid var(--line, #e5e7eb); padding-bottom: 4px; }
.atk-leg { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 12px; }
.atk-steps { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
/* V17.54 Booking for: Flight / Home Stay / both */
.atk-kind { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 14px; }
.atk-kopt { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; cursor: pointer; font-weight: 600; }
.atk-kopt.on { border-color: var(--primary, #2e3192); background: #eef0ff; color: var(--primary, #2e3192); }
/* V17.55 search the model code */
.item-sugg { position: absolute; left: 0; right: 0; top: 100%; z-index: 80; margin-top: 4px; max-height: 320px; overflow-y: auto; background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb); border-radius: 10px; box-shadow: 0 10px 24px rgba(15, 23, 42, .18); }
.item-sugg-row { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line, #f1f5f9); font-size: 14px; }
.item-sugg-row .muted { font-size: 12px; } .item-sugg-row.on, .item-sugg-row:hover { background: #eef0ff; }
/* V17.59 Access Control rights page: clearer view */
.acc-nav { position: sticky; top: 0; z-index: 25; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px;
  background: var(--card, #fff); border-top: 1px solid var(--line, #e5e7eb); border-bottom: 1px solid var(--line, #e5e7eb); box-shadow: 0 6px 12px -10px rgba(15, 23, 42, .35); }
.acc-nav #accQ { flex: 1 1 260px; min-width: 200px; }
.acc-jumps { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.acc-jump { border: 1px solid var(--line, #e5e7eb); background: #f8fafc; border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; color: #475467; }
.acc-jump.has { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.acc-jump b { margin-left: 4px; }
.acc-rdept-n { margin-left: auto; font-size: 12px; font-weight: 700; color: #047857; }
.acc-rdept-b { padding: 4px 0 8px; }
.acc-prog { margin: 10px 14px; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; overflow: hidden; background: var(--card, #fff); }
.acc-prog.has { border-color: #a7f3d0; }
.acc-prog > .prog-title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; background: #f8fafc; border-top: 0 !important; }
.acc-prog.has > .prog-title { background: #f0fdf4; }
.acc-prog-n { margin-left: auto; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #eef0f4; color: #667085; white-space: nowrap; }
.acc-prog.has .acc-prog-n { background: #d1fae5; color: #047857; }
.acc-prog table td:has(> input[type="checkbox"]:checked), .acc-prog table td:has(> label > input[type="checkbox"]:checked) { background: #ecfdf5; }
.acc-prog input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary, #2e3192); cursor: pointer; }
.acc-prog table td .muted { font-size: 12px; line-height: 1.4; }
.acc-prog[hidden], .acc-rdept[hidden] { display: none !important; }
@media (max-width: 700px) { .acc-prog { margin: 8px 6px; } }
/* V17.61 Flight & Home Stay: event, options, the chosen, the invoice */
.atk-ev { padding: 12px 16px; border-left: 4px solid #b45309; }
.atk-chosen { margin-top: 6px; padding: 8px 12px; border-radius: 8px; background: #ecfdf5; color: #065f46; font-size: 13.5px; }
.atk-opt { display: block; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.atk-opt-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.atk-opt-h select { width: auto; min-width: 160px; }
.atk-opt-h a[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.atk-opt-ro { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.atk-opt-ro input { margin-top: 4px; width: 18px; height: 18px; }
.atk-opt-ro > div { flex: 1; } .atk-opt-ro .muted { font-size: 12.5px; }
.atk-opt-ro.on { border-color: #10b981; background: #ecfdf5; }
.atk-opt-p { float: right; font-weight: 700; color: var(--primary, #2e3192); }
.atk-inv { display: flex; flex-wrap: wrap; gap: 10px 36px; } .atk-inv > div { display: flex; flex-direction: column; gap: 2px; }
/* V17.63 the booking: flight and home stay apart */
.atk-bk { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 8px 12px 4px; margin: 0 0 12px; }
.atk-bk legend { font-weight: 700; padding: 0 6px; }
.atk-inv + .atk-inv { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line, #e5e7eb); }
/* V17.63 overseas flight: the passports */
#atkPaxT .atk-pp { display: none; } #atkPaxT.atk-ovs-on .atk-pp { display: table-cell; }
.atk-ovs { margin-left: 12px; padding: 4px 10px; border-radius: 8px; background: #eff6ff; }
/* V17.64 Flight & Home Stay: places, baggage, option pictures + zoom */
.atk-place-in { display: flex; gap: 6px; } .atk-place-in > * { flex: 1; min-width: 0; } .atk-place-in input { text-transform: uppercase; }
.atk-pl-c, .atk-pl-o { display: none; } #atkFlight.atk-intl .atk-pl-c, #atkFlight.atk-intl .atk-pl-o { display: block; } #atkFlight.atk-intl .atk-pl-s { display: none; }
.atk-bag { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 10px; }
.atk-bagi { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line, #e5e7eb); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.atk-bagi.on { border-color: #10b981; background: #ecfdf5; }
.atk-bagi input[type=number] { width: 64px; padding: 4px 6px; } .atk-bagi input[type=number]:disabled { opacity: .45; }
.atk-mode, .atk-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; } .atk-search { margin-top: 8px; }
.atk-opt.cur { border-color: var(--primary, #2e3192); box-shadow: 0 0 0 2px rgba(46, 49, 146, .12); }
.atk-pics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.atk-pic { position: relative; } .atk-pic img { display: block; width: 132px; height: 92px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line, #e5e7eb); cursor: zoom-in; background: #f8fafc; }
.atk-pic-x { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #ef4444; color: #fff; font-size: 11px; cursor: pointer; }
.atk-pic-add { width: 132px; height: 92px; border: 2px dashed var(--line, #cbd5e1); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; font-size: 22px; color: #64748b; }
.atk-pic-add span { font-size: 12px; }
.atk-zoom { position: fixed; inset: 0; z-index: 9999; background: rgba(15, 23, 42, .94); display: flex; flex-direction: column; }
.atk-zoom-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 8px; color: #fff; }
.atk-zoom-bar button, .atk-zoom-bar a { background: rgba(255, 255, 255, .16); color: #fff; border: 0; border-radius: 8px; padding: 6px 14px; font-size: 15px; cursor: pointer; text-decoration: none; }
.atk-zoom-bar span { min-width: 56px; text-align: center; }
.atk-zoom-in { flex: 1; overflow: auto; display: flex; cursor: grab; touch-action: none; }
.atk-zoom-in img { margin: auto; max-width: none; user-select: none; -webkit-user-drag: none; }
/* V17.65 Outsource Driver */
.dn-out-tbl td { vertical-align: middle; } .dn-out-off td { opacity: .55; } .dn-out-soon { color: #b45309; font-weight: 600; }
/* V17.68 Screens: the TV link QR */
.sg-qr { display: flex; gap: 14px; align-items: center; padding: 6px 0; } .sg-qr svg { width: 150px; height: 150px; flex: none; background: #fff; }
/* V17.69 Claim */
.clm-pay { display: flex; gap: 16px; padding-top: 6px; }
/* V17.70 Claim: the related document linked */
.clm-link { display: block; font-size: 12.5px; margin-top: 4px; color: #065f46; }
.clm-ready { border-left: 4px solid #f59e0b; } .clm-ready-r { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line, #e5e7eb); }
.clm-ready-r:last-child { border-bottom: 0; }

/* ===== V17.75 Claim – the claim page ===== */
.clm-head { margin-bottom: 10px; }
.clm-note { border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; font-size: 14px; }
.clm-note.rejected { background: var(--bad-soft); color: var(--bad); border: 1px solid #f6c9c4; }
.clm-note.cancelled { background: #f2f4f7; color: #475467; border: 1px solid var(--line); }
.clm-note span { color: var(--text); opacity: .8; }
.clm-hero { padding: 22px 24px 18px; border-radius: 14px; background: linear-gradient(135deg, #ffffff 0%, #f6f7fd 100%); box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(46,52,138,.06); }
.clm-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.clm-kicker { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.clm-hero h1 { margin: 4px 0 0; font-size: 26px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.clm-chip { display: inline-block; text-transform: none; letter-spacing: 0; background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 2px 9px; font-size: 11.5px; }
.clm-amt { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.clm-amt small { color: var(--muted); font-size: 12px; }
.clm-amt b { font-size: 30px; line-height: 1.1; color: var(--primary); font-variant-numeric: tabular-nums; }
.clm-meta { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.6fr; gap: 14px 20px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.clm-meta > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.clm-meta small { color: var(--muted); font-size: 12px; }
.clm-meta b { font-size: 14.5px; }
.clm-person { flex-direction: row !important; align-items: center; gap: 10px !important; }
.clm-person > div { display: flex; flex-direction: column; min-width: 0; }
.clm-av { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.clm-ref { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 5px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: 13.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.clm-ref:hover { border-color: var(--primary); color: var(--primary); }
.clm-ref b { font-size: 13.5px !important; }
.clm-tlist { list-style: none; margin: 18px 0 0; padding: 0; display: flex; gap: 0; }
.clm-tl { flex: 1; display: flex; align-items: center; gap: 10px; position: relative; padding-right: 14px; }
.clm-tl:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: var(--line); margin-left: 4px; min-width: 20px; }
.clm-tl.done:not(:last-child)::after { background: var(--ok); }
.clm-tl > div { display: flex; flex-direction: column; min-width: 0; }
.clm-tl b { font-size: 13.5px; white-space: nowrap; }
.clm-tl small { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.clm-dot { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: #f2f4f7; color: var(--muted); border: 2px solid var(--line); }
.clm-tl.done .clm-dot { background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 700; }
.clm-tl.now .clm-dot { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.clm-tl.now b { color: var(--primary); }
.clm-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.clm-card { border-radius: 14px; }
.clm-card .card-head h2 { font-size: 15px; }
.clm-grid { align-items: start; }
.clm-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; min-height: 16px; }
.clm-money { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.clm-money:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.clm-money span { display: grid; place-items: center; padding: 0 12px; background: #f8f9fc; color: var(--muted); font-weight: 600; border-right: 1px solid var(--line); }
.clm-money input { border: 0 !important; box-shadow: none !important; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.clm-refrow { align-items: start; }
.clm-link { display: block; font-size: 12.5px; margin-top: 6px; color: var(--ok); }
.clm-drop { display: flex; align-items: center; gap: 14px; margin-top: 4px; padding: 16px 18px; border: 2px dashed #cdd3e3; border-radius: 12px; background: #fafbff; cursor: pointer; position: relative; }
.clm-drop:hover, .clm-drop.on { border-color: var(--primary); background: var(--primary-soft); }
.clm-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.clm-drop-i { font-size: 26px; }
.clm-drop > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.clm-drop small { color: var(--muted); font-size: 12.5px; }
.clm-drop.on small { color: var(--primary); font-weight: 600; }
.clm-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.clm-foot.sticky-save { box-shadow: 0 -6px 16px rgba(16,24,40,.06); border-top: 1px solid var(--line); margin-left: -16px; margin-right: -16px; padding-left: 16px !important; padding-right: 16px !important; border-radius: 0 0 14px 14px; }
.clm-remark { white-space: pre-wrap; font-size: 14px; line-height: 1.5; }
.clm-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.clm-file { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; min-width: 0; }
.clm-file:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(46,52,138,.08); }
.clm-fic { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 800; letter-spacing: .03em; background: #eef0f6; color: var(--muted); }
.clm-fic.clm-pdf { background: #fdecea; color: #b42318; } .clm-fic.clm-img { background: #e8f1fd; color: #1d5fbf; }
.clm-fn { font-size: 13.5px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.clm-file small { color: var(--muted); font-size: 11.5px; }
.clm-add { border-style: dashed; border-width: 2px; border-color: #cdd3e3; background: #fafbff; cursor: pointer; }
.clm-add .clm-fic { background: var(--primary-soft); color: var(--primary); font-size: 22px; font-weight: 400; }
.clm-add:hover { background: var(--primary-soft); }
.clm-sub-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 8px; }
.clm-pm { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 12px; margin-bottom: 14px; }
.clm-pm-o { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.clm-pm-o input { position: absolute; opacity: 0; pointer-events: none; }
.clm-pm-o:hover { border-color: #b9bde6; }
.clm-pm-o.on { border-color: var(--primary); background: var(--primary-soft); }
.clm-pm-i { font-size: 26px; }
.clm-pm-o > span:last-child { display: flex; flex-direction: column; }
.clm-pm-o small { color: var(--muted); font-size: 12px; }
.clm-paid { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: var(--ok-soft); margin-bottom: 4px; }
.clm-paid-i { width: 36px; height: 36px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-weight: 700; }
.clm-paid > div { display: flex; flex-direction: column; } .clm-paid b { color: var(--ok); } .clm-paid small { color: var(--text); font-size: 13px; }
.clm-wait { color: var(--muted); font-size: 14px; padding: 6px 0; }
.clm-log { list-style: none; margin: 0; padding: 0 0 0 4px; }
.clm-log li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; font-size: 13.5px; }
.clm-log li::before { content: ""; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); }
.clm-log li:first-child::before { background: var(--primary); }
.clm-log li > span { color: var(--muted); font-size: 12.5px; }
@media (max-width: 900px) {
  .clm-meta { grid-template-columns: 1fr 1fr; }
  .clm-tlist { flex-direction: column; gap: 10px; } .clm-tl::after { display: none; }
  .clm-amt { text-align: left; } .clm-pm { grid-template-columns: 1fr 1fr; }
  .clm-log li { grid-template-columns: 1fr; gap: 2px; }
}
.clm-card .card-body { padding: 16px 20px; }
/* V17.76 Time Adjustment: the times keyed in stand out */
.ta-tc.ta-has { background: #fff4c2; box-shadow: inset 0 0 0 2px #f5b301; border-radius: 6px; }
.ta-tc.ta-has input { background: #fffbe6; border-color: #f5b301 !important; font-weight: 700; color: #7a4b00; }
.ta-tc.ta-has b { color: #7a4b00; }
/* V17.77 opening: never a blank page */
.boot-card { text-align: center; } .boot-card .btn { margin-top: 12px; }
.boot-spin { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--primary-soft); border-top-color: var(--primary); border-radius: 50%; animation: bootspin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes bootspin { to { transform: rotate(360deg); } }

/* ===== V17.78 User Access Control – the new look ===== */
.acc-hero { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.acc-av { flex: none; width: 48px; height: 48px; border-radius: 12px; background: #4f46e5; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.acc-hero-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acc-hero-t h1 { margin: 0; font-size: 22px; }
.acc-hero-s { color: var(--muted); font-size: 13.5px; margin-top: 3px; } .acc-hero-s b { color: var(--text); }
.acc-chip2 { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; background: #f2f4f7; color: #344054; border: 1px solid var(--line); white-space: nowrap; }
.acc-chip2.ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.acc-chip2.pri { background: #eef0ff; color: #4338ca; border-color: #c7cbfa; }
.acc-top2 { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; margin-bottom: 16px; }
.acc-top2 > .card { margin: 0; }
.acc-tcard { border-radius: 14px; padding: 0; }
.acc-tcard-h { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.acc-tcard-h > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acc-tcard-h b { font-size: 15.5px; } .acc-tcard-h small { color: var(--muted); font-size: 12.5px; }
.acc-ico { flex: none; width: 34px; height: 34px; border-radius: 9px; background: #eef0ff; display: grid; place-items: center; font-size: 17px; }
.acc-i { cursor: help; color: var(--muted); font-weight: 400; font-size: 13px; }
.acc-rolebox .acc-rolebody { padding: 14px 18px 16px; gap: 14px; }
.acc-rolebox .acc-rolebody select { min-width: 220px; height: 40px; font-weight: 600; }
.acc-modes { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.acc-rolebox #roleApply { background: #4f46e5; border-color: #4f46e5; padding: 9px 16px; }
.acc-out-sum { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 18px 16px; }
.acc-out-sum .muted { margin-left: auto; font-size: 12.5px; }
#accOutCard .acc-out { border-top: 1px solid var(--line); padding: 12px 18px 14px; }
.acc-nav { border-radius: 14px; padding: 14px 16px; gap: 10px 14px; flex-direction: column; align-items: stretch; box-shadow: 0 2px 10px rgba(16,24,40,.05); }
.acc-nav-r1 { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; }
.acc-nav-r1 #accQ { flex: 1 1 280px; height: 38px; border-radius: 10px; }
.acc-sw { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.acc-sw input { position: absolute; opacity: 0; pointer-events: none; }
.acc-sw > span:first-of-type { width: 36px; height: 20px; border-radius: 999px; background: #d0d5dd; position: relative; transition: background .15s; flex: none; }
.acc-sw > span:first-of-type::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.acc-sw input:checked + span { background: #4f46e5; } .acc-sw input:checked + span::after { left: 18px; }
.acc-mode { display: inline-flex; background: #f2f4f7; border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-left: auto; }
.acc-mode button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #475467; cursor: pointer; white-space: nowrap; }
.acc-mode button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.acc-jumps { gap: 8px; }
.acc-jump { border-radius: 10px; padding: 7px 14px; font-weight: 600; font-size: 13.5px; background: #fff; display: inline-flex; align-items: center; gap: 8px; }
.acc-jump b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #f2f4f7; color: #475467; display: inline-grid; place-items: center; font-size: 12px; margin: 0; }
.acc-jump.has b { background: #059669; color: #fff; }
.acc-jump.on { background: #4f46e5; border-color: #4f46e5; color: #fff; } .acc-jump.on b { background: rgba(255,255,255,.25); color: #fff; }
.acc-rdept { border: 1px solid var(--line); border-radius: 14px; margin: 14px 0; overflow: hidden; background: var(--card, #fff); }
.acc-rdept-h { background: #fff; color: var(--text); padding: 16px 20px; gap: 12px; border-bottom: 1px solid var(--line); }
.acc-rdept-t { display: flex; flex-direction: column; align-items: flex-start; text-align: left; } .acc-rdept-t b { font-size: 16px; } .acc-rdept-t small { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.acc-rdept-n { padding: 4px 12px; border-radius: 999px; background: #f2f4f7; color: var(--muted); font-size: 13px; }
.acc-rdept-n.has { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.acc-tabmode .acc-chev { display: none; }
.acc-rdept-b { padding: 0; }
.acc-prog { margin: 0; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.acc-prog:last-child { border-bottom: 0; }
.acc-prog.has { border-color: var(--line); box-shadow: inset 3px 0 0 #4f46e5; }
.acc-prog > .prog-title { background: #fafbfc; font-size: 13px; }
.acc-prog > .prog-title.acc-t-hide { display: none; }
.acc-rows-foot { padding: 8px 20px 12px; }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 14px 20px; flex-wrap: wrap; }
.acc-row + .acc-row { border-top: 1px dashed var(--line); }
.acc-row-l { flex: 1 1 300px; min-width: 0; }
.acc-row-n b { font-size: 15px; }
.acc-row-d { color: var(--muted); font-size: 13px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 640px; }
.acc-desc-on .acc-row-d { white-space: normal; max-width: none; }
.acc-row-r { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.acc-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
.acc-pill:hover { border-color: #b4b9f3; }
.acc-pill:has(input:checked) { border-color: #4f46e5; background: #eef0ff; color: #3730a3; }
.acc-pill:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.acc-pill input[type=checkbox] { width: 17px; height: 17px; margin: 0; }
.acc-pill-x { cursor: default; } .acc-pill-x input:not([type=checkbox]) { width: 64px; height: 30px; text-align: center; }
.acc-pill-ro { cursor: default; color: var(--muted); background: #f8f9fb; }
@media (max-width: 900px) { .acc-top2 { grid-template-columns: 1fr; } .acc-mode { margin-left: 0; } .acc-row-r { justify-content: flex-start; } }
.acc-help { margin-top: 8px; font-size: 13px; } .acc-help summary { cursor: pointer; color: var(--muted); } .acc-help .sub { margin-top: 6px; }
/* V17.79 flight stops, the payment at Book */
.atk-stop { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #fff4e5; color: #b25e00; vertical-align: 1px; }
.atk-stop.direct { background: #ecfdf5; color: #047857; }
.atk-pay-o { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.atk-pay .clm-pm-o { padding: 10px 12px; }
.atk-paid { margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.atk-paid.card { background: #eef0ff; color: #3730a3; } .atk-paid.tr { background: #fff4e5; color: #7a4b00; }
/* V17.80 date + 24-hour time */
.dt24 { display: flex; gap: 6px; } .dt24 input[type=date] { flex: 1 1 auto; min-width: 0; } .dt24 .t24 { flex: 0 0 82px; text-align: center; }
/* V17.81 stops route, pay to */
.atk-route { font-size: 12.5px; font-weight: 600; color: #7a4b00; }
.atk-stops2 { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; } .atk-stopw { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.atk-leg-l { font-size: 12px; color: var(--muted); min-width: 64px; }
.atk-stoped { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; flex-basis: 100%; }
.atk-route-prev { flex-basis: 100%; font-size: 12.5px; color: #7a4b00; background: #fff8eb; border-radius: 8px; padding: 6px 10px; }
.atk-payto { border: 1px dashed #f5b301; background: #fffbeb; border-radius: 10px; padding: 10px 12px 2px; margin-bottom: 8px; }
.atk-payto-h { font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #7a4b00; }
.clm-payto { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; background: #fff8eb; border: 1px solid #fde3a7; }
.clm-payto small { color: #7a4b00; font-weight: 700; text-transform: uppercase; font-size: 11.5px; letter-spacing: .05em; } .clm-payto b { font-size: 15px; } .clm-payto span { color: #475467; }
/* V17.81 the Going / Back screenshots */
.atk-legshot { flex-basis: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-top: 8px; background: #fafbff; }
.atk-legshot-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .atk-legshot-h select { width: auto; }
.atk-legshot .atk-pics { margin-top: 6px; }
.atk-legro { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.atk-homemax { margin: -2px 0 10px; padding: 8px 12px; border-radius: 8px; background: #eef0ff; color: #3730a3; font-size: 13px; }   /* V17.83 */
/* V17.84 the home stay guests */
.atk-guests { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px; } #atkGuestList { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.atk-guest { font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: #f2f4f7; } .atk-guest.m { background: #e8f1fd; color: #1d5fbf; } .atk-guest.f { background: #fdeef6; color: #b0246c; }
/* V17.84 the guests box: Male – names · Female – names */
.atk-guests { flex-direction: column; align-items: stretch; } .atk-guests > .btn { align-self: flex-start; } #atkGuestList { display: block; }
.atk-gbox { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.atk-gcol { padding: 10px 14px; } .atk-gcol + .atk-gcol { border-left: 1px solid var(--line); }
.atk-gcol-h { font-weight: 700; font-size: 13.5px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.atk-gcol-h b { min-width: 22px; height: 22px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 12px; background: #fff; }
.atk-gcol.m { background: #f2f7fe; } .atk-gcol.m .atk-gcol-h { color: #1d5fbf; }
.atk-gcol.f { background: #fdf2f8; } .atk-gcol.f .atk-gcol-h { color: #b0246c; }
.atk-gcol.u { background: #fff8eb; } .atk-gcol.u .atk-gcol-h { color: #7a4b00; }
.atk-gname { font-size: 13.5px; padding: 3px 0; display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed rgba(0,0,0,.06); } .atk-gname small { color: var(--muted); }
/* V17.88 the action buttons follow */
.float-acts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 60; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  padding: 10px 12px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(16,24,40,.18); max-width: calc(100vw - 24px); }
.float-acts[hidden] { display: none; }
body.ev-has-bar .float-acts { bottom: 84px; }
.float-acts { left: 0; right: 0; margin: 0 auto; width: max-content; transform: none; flex-wrap: wrap; } .float-acts .btn { white-space: nowrap; }
/* V17.89 the screenshot boxes: paste (Ctrl+V / right-click › Paste) or drop */
.atk-pastew { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.atk-paste { outline: none; caret-color: transparent; color: transparent; overflow: hidden; cursor: pointer; text-align: center; }
.atk-paste::before { content: "📋 " attr(data-lbl) "\A click, then Ctrl+V"; white-space: pre; color: #64748b; font-size: 12px; line-height: 1.5; }
.atk-paste:focus { border-color: var(--primary, #2e348a); background: #eef0ff; box-shadow: 0 0 0 3px rgba(46,52,138,.12); }
.atk-paste:focus::before { content: "📋 Now paste\A Ctrl+V / right-click › Paste"; color: var(--primary, #2e348a); font-weight: 600; }
.atk-paste.over { border-color: #10b981; background: #ecfdf5; }
.atk-paste > * { display: none; }
.atk-pic-up { font-size: 12px; color: var(--primary, #2e348a); cursor: pointer; }
.atk-pic-up:hover { text-decoration: underline; }
/* V17.90 Flight & Home Stay request – new look: numbered cards + summary */
.atk-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.atk-tic { width: 46px; height: 46px; border-radius: 12px; background: #4f46e5; color: #fff; display: inline-grid; place-items: center; font-style: normal; font-size: 22px; box-shadow: 0 6px 14px rgba(79,70,229,.28); }
.atk-hr { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #4f46e5; background: #eef0ff; border: 1px solid #c7d2fe; padding: 3px 10px; border-radius: 8px; }
.atk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; counter-reset: atksec; margin-top: 14px; }
.atk-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.atk-layout .field { margin-top: 12px; }
.atk-sec { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 3px rgba(16,24,40,.05); }
.atk-sec[hidden] { display: none; }
.atk-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.atk-sec-h h2 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 12px; }
.atk-num { counter-increment: atksec; width: 30px; height: 30px; border-radius: 8px; background: #eef0ff; color: #4f46e5; display: inline-grid; place-items: center; font-style: normal; font-size: 15px; font-weight: 700; }
.atk-num::before { content: counter(atksec); }
.atk-sec-b { padding: 8px 24px 22px; }
.atk-sec-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.atk-date { color: var(--muted); font-size: 14px; } .atk-date b { color: var(--text); text-transform: uppercase; }
.atk-app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 0 20px; }
.atk-staffin { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 4px 6px 4px 12px; background: #fff; min-height: 46px; }
.atk-staffin:focus-within { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.atk-staffin > i { font-style: normal; opacity: .6; }
.atk-staffin input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: transparent; padding: 8px 0; font-weight: 600; font-size: 15px; outline: none; }
.atk-switch { border: 0; background: #f1f5f9; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--text); white-space: nowrap; }
.atk-switch:hover { background: #e2e8f0; }
.atk-who { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 7px 12px; min-height: 46px; background: #fbfbfe; overflow: hidden; }
.atk-who > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.atk-who > span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.atk-av { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #4f46e5; color: #fff; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; }
.atk-ok, .atk-sv { font-style: normal; font-size: 12px; font-weight: 600; flex: none; }
.atk-ok { background: #dcfce7; color: #15803d; padding: 3px 8px; border-radius: 6px; }
.atk-sv { color: #4f46e5; }
.atk-kind { display: block; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.atk-lbl { margin-bottom: 10px; } .atk-lbl .muted { font-size: 13.5px; }
.atk-kgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.atk-kopt { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); font-weight: 400; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.atk-kopt:hover { border-color: #a5b4fc; }
.atk-kopt.on { border-color: #4f46e5; background: #fafaff; color: var(--text); box-shadow: 0 0 0 3px rgba(79,70,229,.10); }
.atk-kopt input { position: absolute; opacity: 0; pointer-events: none; }
.atk-kopt:has(input:focus-visible) { outline: 2px solid #4f46e5; outline-offset: 2px; }
.atk-kopt:has(input:disabled) { cursor: default; }
.atk-kic { flex: none; width: 48px; height: 48px; border-radius: 12px; background: #f1f5f9; display: grid; place-items: center; font-style: normal; font-size: 22px; }
.atk-kopt.on .atk-kic { background: #4f46e5; }
.atk-ktx { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .atk-ktx b { font-size: 15.5px; } .atk-ktx small { color: var(--muted); font-size: 13px; }
.atk-kck { margin-left: auto; align-self: flex-start; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cbd5e1; display: grid; place-items: center; font-style: normal; }
.atk-kopt.on .atk-kck { background: #4f46e5; border-color: #4f46e5; }
.atk-kopt.on .atk-kck::after { content: "✓"; color: #fff; font-size: 12px; font-weight: 700; }
.atk-seg { display: inline-flex; background: #f1f5f9; border-radius: 10px; padding: 4px; }
.atk-seg label { cursor: pointer; } .atk-seg input { position: absolute; opacity: 0; pointer-events: none; }
.atk-seg span { display: block; padding: 6px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); }
.atk-seg input:checked + span { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.atk-seg input:focus-visible + span { outline: 2px solid #4f46e5; }
.atk-sec-tools .atk-ovs { margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.atk-sec-tools .atk-ovs .muted { font-weight: 400; font-size: 12.5px; }
.atk-legc { border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px 16px; margin-top: 16px; background: #fcfcff; }
.atk-legc[hidden] { display: none; }
.atk-legc-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.atk-legc-h b { display: flex; align-items: center; gap: 10px; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; }
.atk-legc-h b i { width: 28px; height: 28px; border-radius: 8px; background: #4f46e5; display: grid; place-items: center; font-style: normal; font-size: 14px; }
.atk-chip { background: #eef0ff; color: #4f46e5; border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 700; }
.atk-leg4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; }
.atk-leg4 .atk-place > span { display: flex; align-items: center; gap: 4px; }
.atk-swap { margin-left: auto; border: 0; background: none; color: #4f46e5; font-weight: 600; font-size: 12.5px; cursor: pointer; padding: 0; }
.atk-swap:hover { text-decoration: underline; }
#atkFlight.atk-intl .atk-leg4 .atk-place-in { flex-direction: column; }
.atk-legc .atk-bag { margin-top: 12px; }
.atk-side { position: sticky; top: 16px; }
.atk-sum { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 10px 28px rgba(16,24,40,.08); }
.atk-sum-top { background: linear-gradient(135deg, #1e1b4b, #0f172a); color: #fff; padding: 20px 24px 22px; }
.atk-sum-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #a5b4fc; }
.atk-sum-badge { background: rgba(129,140,248,.18); border: 1px solid rgba(165,180,252,.4); color: #c7d2fe; padding: 3px 10px; border-radius: 6px; font-size: 12px; }
.atk-sum-route { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.atk-sum-route .pt { min-width: 0; } .atk-sum-route .pt.r { text-align: right; }
.atk-sum-route .pt b { display: block; font-size: 30px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.atk-sum-route .pt.long b { font-size: 18px; }
.atk-sum-route .pt small { color: #cbd5e1; font-size: 13px; }
.atk-sum-route .mid { flex: 1; text-align: center; font-size: 12px; font-weight: 600; color: #e0e7ff; white-space: nowrap; }
.atk-sum-route .mid i { display: block; height: 1px; background: rgba(165,180,252,.55); margin-bottom: 8px; }
.atk-sum-b { padding: 4px 24px; }
.atk-sg { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.atk-sr { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; font-size: 14px; }
.atk-sr > span:first-child { color: var(--muted); } .atk-sr > b { text-align: right; }
.atk-schs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.atk-sch { font-style: normal; background: #eef0ff; color: #4f46e5; border-radius: 6px; padding: 3px 8px; font-size: 12.5px; font-weight: 600; }
.atk-st { display: flex; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-top: 6px; font-size: 13px; font-weight: 600; background: #fbfbfe; }
.atk-st small { color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-weight: 400; white-space: nowrap; }
.atk-sum-f { padding: 16px 24px 20px; }
.atk-submit { width: 100%; border: 0; border-radius: 12px; background: #4f46e5; color: #fff; font-weight: 700; font-size: 16px; padding: 14px; cursor: pointer; box-shadow: 0 6px 16px rgba(79,70,229,.3); }
.atk-submit:hover { background: #4338ca; } .atk-submit:disabled { opacity: .6; cursor: wait; }
.atk-sum-f p { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
@media (max-width: 1150px) { .atk-layout { grid-template-columns: 1fr; } .atk-side { position: static; } }
@media (max-width: 900px) { .atk-leg4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .atk-kgrid { grid-template-columns: 1fr; } .atk-app { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .atk-leg4 { grid-template-columns: 1fr; } .atk-sec-h, .atk-sec-b { padding-left: 16px; padding-right: 16px; } }
/* V17.91 Super Admin "View as" */
.viewas-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 7px 16px; background: linear-gradient(90deg, #b45309, #d97706); color: #fff; font-size: 13.5px; }
.viewas-bar small { opacity: .85; margin-left: 4px; }
.viewas-btns { display: flex; gap: 6px; }
.viewas-btns button { border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.15); color: #fff; border-radius: 8px; padding: 4px 10px; font-weight: 600; cursor: pointer; }
.viewas-btns button:hover { background: rgba(255,255,255,.3); }
#vaBack { background: #fff; color: #b45309; border-color: #fff; }
body.viewas-on .topbar { top: 38px; }
.va-now { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; margin-bottom: 10px; }
.va-depts { display: flex; flex-wrap: wrap; gap: 6px; }
.va-dept { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.va-dept small { color: var(--muted); margin-left: 3px; }
.va-dept.on { background: var(--primary); border-color: var(--primary); color: #fff; } .va-dept.on small { color: #dbe0ff; }
.va-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.va-p { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; cursor: pointer; }
.va-p:last-child { border-bottom: 0; } .va-p:hover { background: #f5f7ff; } .va-p.on { background: #fff7ed; }
.va-p > i { flex: none; width: 32px; height: 32px; border-radius: 50%; background: #eef0ff; color: var(--primary); display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; }
.va-p > span { flex: 1; min-width: 0; display: flex; flex-direction: column; } .va-p small { color: var(--muted); }
.va-p > em { font-style: normal; font-size: 12px; color: var(--muted); text-align: right; }
.va-log { margin-top: 10px; font-size: 12.5px; } .va-log summary { cursor: pointer; font-weight: 600; } .va-log > div { padding: 3px 0; border-bottom: 1px dashed var(--line); }
/* V17.93 the requester chooses; the summary has every detail; documents as pictures; ⋮ in the list */
.atk-formcol { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.atk-roview #atkForm { display: none; } .atk-roview.formon #atkForm { display: flex; }
.atk-roview:not(.formon) #atkSave { display: none; }
.atk-formtg { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border: 1px dashed #c7d2fe; border-radius: 14px; background: #fafaff; font-size: 14px; }
.atk-sr > b small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
.atk-srm { margin-top: 4px; padding: 8px 10px; border-radius: 8px; background: #f8fafc; font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.atk-st { display: block; } .atk-st-h { display: flex; justify-content: space-between; gap: 10px; }
.atk-st-d { margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
.atk-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.atk-doc { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; transition: box-shadow .15s, border-color .15s; }
.atk-doc:hover { border-color: #a5b4fc; box-shadow: 0 6px 16px rgba(16,24,40,.08); }
.atk-doc-th { display: grid; place-items: center; height: 110px; background: #f1f5f9; overflow: hidden; }
.atk-doc-th img { width: 100%; height: 100%; object-fit: cover; }
.atk-doc-ic { display: grid; place-items: center; width: 54px; height: 64px; border-radius: 8px; background: #e2e8f0; font-size: 26px; font-weight: 800; color: #475569; }
.atk-doc-ic.pdf { background: #fee2e2; color: #b91c1c; font-size: 15px; }
.atk-doc-l { display: flex; flex-direction: column; padding: 8px 10px; color: var(--text); text-decoration: none; min-width: 0; }
.atk-doc-l b { font-size: 13px; } .atk-doc-l small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atk-doc-x { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(15,23,42,.65); color: #fff; cursor: pointer; font-size: 12px; }
.atk-dots { width: 40px; text-align: center; padding-left: 6px !important; padding-right: 0 !important; }
.atk-dot { position: relative; width: 32px; height: 32px; border: 1px solid transparent; border-radius: 8px; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); }
.atk-dot:hover { background: #f1f5f9; border-color: var(--line); color: var(--text); }
.atk-dot i { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 10px; font-style: normal; line-height: 16px; }
.atk-dmenu { position: fixed; z-index: 80; width: 300px; max-height: 60vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(16,24,40,.18); padding: 6px; }
.atk-dmenu-h { padding: 6px 10px 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.atk-dmenu-i { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.atk-dmenu-i:hover { background: #f5f7ff; }
.atk-dmenu-i img, .atk-dmenu-i .atk-doc-ic { flex: none; width: 40px; height: 40px; border-radius: 6px; object-fit: cover; font-size: 12px; }
.atk-dmenu-i span { display: flex; flex-direction: column; min-width: 0; } .atk-dmenu-i small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atk-dmenu-go { border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; font-weight: 600; color: var(--primary); }
/* V17.95 the request-form bar: on top, the same card style as the sections */
.atk-formtg { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 24px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 3px rgba(16,24,40,.05); }
.atk-formtg-t { display: flex; align-items: center; gap: 12px; min-width: 0; }
.atk-formtg-t b { display: block; font-size: 18px; }
.atk-formtg-t small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.atk-formtg-ic { flex: none; width: 30px; height: 30px; border-radius: 8px; background: #eef0ff; color: #4f46e5; display: grid; place-items: center; font-style: normal; font-size: 15px; }
.atk-formtg-b { border: 1px solid #c7d2fe; background: #eef0ff; color: #4f46e5; border-radius: 10px; padding: 8px 14px; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.atk-formtg-b:hover { background: #e0e7ff; }
.atk-formon .atk-formtg-b, .formon .atk-formtg-b { background: #4f46e5; border-color: #4f46e5; color: #fff; }
#atkOpts > .card { border-radius: 18px; }
/* V17.97 the header: the icon tile fits two / three icons (✈🏨🚆); the buttons together on the right */
.atk-tic { width: auto; min-width: 46px; padding: 0 9px; gap: 2px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; letter-spacing: 1px; line-height: 1; }
.page-head .actions .sa-del { display: inline-flex; }
.page-head:has(.atk-title) { align-items: center; }
/* V18.01 the outsource driver's Darson Driver app PIN */
.dn-pin { margin-top: 12px; padding: 12px 14px; border: 1px solid #c7d2fe; border-radius: 12px; background: #fafaff; }
.dn-pin-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dn-pin-b { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; } .dn-pin-b .field { min-width: 200px; }
.dn-pin-on { display: inline-block; background: #dcfce7; color: #15803d; border-radius: 6px; padding: 2px 8px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
/* V18.06 the outsource driver / assistant Nickname */
.dn-nick { display: inline-block; background: #eef2ff; color: #3730a3; border-radius: 6px; padding: 1px 8px; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
/* V18.11 SB Client picklists: only the warehouses ticked */
.pk-whs-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0; }
.pk-wh { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 6px 12px; background: #fff; }
.pk-wh:has(input:checked) { border-color: #4f46e5; background: #eef2ff; }

/* V18.29 Delivery List: manual upload next to the automatic pickup line */
.dn-auto { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.dn-auto-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* V18.33 Canopy / Event – Setting › Staff groups; the group tag on Staff assigned (V18.34 under the role) */
.g-grps { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.g-grpbox { border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: 6px 10px; background: #fff; }
.g-grpbox summary { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.g-grpbox summary input[data-gn] { max-width: 260px; font-weight: 600; }
.g-grp-pos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 12px; margin-top: 8px; max-height: 320px; overflow: auto; }
.ev-grp-tag { font-size: 11.5px; color: #4f46e5; font-weight: 600; margin-top: 2px; }
.g-grp-addrole { display: flex; gap: 6px; margin-top: 8px; max-width: 420px; }
.ev-grp-tag:empty { display: none; }

/* V18.36 delivery pictures: tap = zoom; Retake (driver) / Replace + Upload (HQ, completed) */
.dn-side img[data-dnzoom] { cursor: zoom-in; }
.dn-side.dn-noup { cursor: default; }
.dn-side small { color: #64748b; }
.dn-reup { position: absolute; top: 4px; right: 4px; background: rgba(255,255,255,.92); border: 1px solid #cbd5e1; border-radius: 8px; padding: 1px 7px; font-size: 11.5px; font-weight: 600; cursor: pointer; }

/* V18.42 WMS › Bin Scan (free format) + report */
.bs-binbar { display: flex; align-items: center; gap: 10px; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.bs-binbar span { font-size: 12px; font-weight: 700; color: #4338ca; }
.bs-binbar b { font-size: 22px; letter-spacing: .5px; flex: 1; }
.wh-inrow input.bs-qty { flex: 0 0 80px; width: 80px; text-align: center; }
body.pda .pk-scanbar .wh-inrow > input.bs-qty { flex: 0 0 90px !important; }
.bs-sum { margin: 10px 2px 6px; color: #475569; }
.bs-tbl td.num, .bs-tbl th.num { text-align: right; }
.bs-tbl tr.bs-newbin td { border-top: 2px solid #cbd5e1; }
.bs-whrow { margin-bottom: 10px; }
.bs-whrow select { min-width: 140px; }

/* V18.43 timetable breaks */
.att-tt input.att-brk { width: 72px; text-align: center; }

/* V18.48 Staff Master Data service years */
.hr-svcc { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; }
.hr-svcc[hidden] { display: none; }
.hr-svcc input { width: 64px; }

/* V18.49 warehouse acknowledge */
.dn-ack-undo { padding: 0 6px; font-size: 11px; margin-top: 2px; }
.dn-ackd { align-self: center; font-weight: 600; margin-right: 6px; }

/* V18.50 customer pin */
.dn-pin { margin: 6px 0; padding: 6px 10px; border-radius: 8px; background: #f0fdf4; border: 1px solid #bbf7d0; font-size: 13px; }
.dn-navs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.dn-pinb { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: #dcfce7; color: #166534; text-decoration: none; white-space: nowrap; }

/* V18.52 manpower over the max */
.ev-mp-i.over { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }

/* V18.54 Security page */
.sec-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.sec-tile { background: #fff; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.sec-tile b { font-size: 24px; } .sec-tile span { color: var(--muted, #6b7280); font-size: 12.5px; } .sec-tile.warn { border-color: #fdba74; background: #fff7ed; }

/* V18.55 data protection */
.pii { white-space: nowrap; } .pii-eye { border: 0; background: none; cursor: pointer; padding: 0 2px; font-size: 13px; opacity: .7; } .pii-eye:hover { opacity: 1; }
.pii-ro { padding: 8px 10px; border: 1px solid var(--line, #e5e7eb); border-radius: 8px; background: #f8fafc; min-height: 38px; }
#printWm { display: none; } @media print { #printWm { display: block; position: fixed; right: 4mm; bottom: 2mm; font: 8pt Arial, sans-serif; color: #555; z-index: 99999; } .pii-eye { display: none; } }

/* V18.57 Import Distribution: the four header numbers */
.pe-keyin { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 12px; }
.pe-keyin input { text-transform: uppercase; font-weight: 600; } .pe-hk-miss { border-color: #f87171 !important; background: #fef2f2 !important; }

/* V18.59 the floating action bar of every page */
.act-dock { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 900; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: calc(100vw - 32px); padding: 8px 10px; background: rgba(255,255,255,.97); border: 1px solid var(--line, #e5e7eb); border-radius: 14px; box-shadow: 0 10px 28px rgba(15,23,42,.18); animation: actDockIn .18s ease-out; }
.act-dock[hidden] { display: none; } .act-dock .btn { white-space: nowrap; }
@keyframes actDockIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 600px) { .act-dock { left: 8px; right: 8px; transform: none; max-width: none; bottom: 8px; } @keyframes actDockIn { from { opacity: 0; } to { opacity: 1; } } }
@media print { .act-dock { display: none !important; } }

/* V18.60 Canopy / Event page – new look */
#evPage .ev-head { align-items: flex-start; background: #fff; margin: -6px -6px 18px; padding: 14px 18px 18px; border-radius: 0 0 16px 16px; box-shadow: 0 1px 0 #eef0f4; }
.ev-hero { display: flex; gap: 16px; align-items: flex-start; margin-top: 12px; }
.ev-hero-ic { width: 56px; height: 56px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 28px; background: linear-gradient(135deg, #ef4444, #f97316); box-shadow: 0 6px 16px rgba(239, 68, 68, .28); }
.ev-hero h1 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 26px; line-height: 1.2; }
.ev-hero h1 .badge { font-size: 13px; }
.ev-hero .sub { margin-top: 6px; }
.ev-pill { display: inline-block; margin-top: 8px; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid; }
.ev-pill-draft { background: #fefce8; color: #854d0e; border-color: #fde68a; } .ev-pill-submitted { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.ev-pill-checked { background: #ecfeff; color: #155e75; border-color: #a5f3fc; } .ev-pill-approved { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.ev-pill-rejected { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
#evPage .ev-head { flex-wrap: nowrap; } #evPage .ev-head > div:first-child { flex: 1; min-width: 0; }
@media (max-width: 760px) { #evPage .ev-head { flex-wrap: wrap; } }
#evPage .ev-c-info > .card-head { display: none; }                  /* the dark bar above has the title + lock */
#evPage .ev-head .actions { flex: none; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; max-width: 330px; }
#evPage .ev-head .actions .btn { background: #fff; border: 1px solid #d6d9e0; border-radius: 10px; }
#evPage .ev-head .actions .btn-danger { background: #fff1f2; color: #e11d48; border-color: #fecdd3; }
/* pipeline */
.ev-rv { border-radius: 16px; } .ev-rv .card-head { flex-wrap: wrap; }
.ev-pp-h { display: flex; align-items: center; gap: 10px; font-size: 14.5px !important; text-transform: uppercase; letter-spacing: .04em; }
.ev-pp-dot { width: 18px; height: 2px; background: #4f46e5; position: relative; } .ev-pp-dot::after { content: ""; position: absolute; left: 5px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #4f46e5; }
.ev-pp-rules { margin-left: auto; border: 0; background: none; color: #4f46e5; font-weight: 600; cursor: pointer; font-size: 13.5px; }
.ev-pp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; } @media (max-width: 760px) { .ev-pp-steps { grid-template-columns: 1fr; } }
.ev-pp { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid #e5e7eb; border-radius: 14px; background: #f8fafc; }
.ev-pp i { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; background: #e5e7eb; color: #6b7280; }
.ev-pp b { display: block; font-size: 14.5px; color: #111827; } .ev-pp span { display: block; margin-top: 3px; font-size: 13px; color: #6b7280; }
.ev-pp.now { background: #f5f7ff; border-color: #a5b4fc; box-shadow: 0 0 0 1px #c7d2fe inset; } .ev-pp.now i { background: #6366f1; color: #fff; }
.ev-pp.done { background: #f0fdf4; border-color: #bbf7d0; } .ev-pp.done i { background: #16a34a; color: #fff; }
.ev-pp.rej { background: #fef2f2; border-color: #fecaca; } .ev-pp.rej i { background: #dc2626; color: #fff; }
/* dark section bars */
#evPage .ev-sec { background: #0f172a; border-radius: 16px 16px 0 0; margin: 26px 0 0; padding: 14px 18px; gap: 8px 14px; }
#evPage .ev-sec + .card, #evPage .ev-sec + form, #evPage .ev-sec + div { margin-top: 0; }
#evPage .ev-sec + .card { border-top-left-radius: 0; border-top-right-radius: 0; }
.ev-sec-n { min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center; background: #6366f1; color: #fff; font-weight: 700; font-size: 14px !important; opacity: 1 !important; }
#evPage .ev-sec b { font-size: 17px; letter-spacing: -.01em; }
.ev-sec-chip { padding: 3px 10px; border-radius: 7px; border: 1px solid #334155; background: #1e293b; font-size: 12px !important; font-weight: 600; max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-sec-r { margin-left: auto; display: flex; align-items: center; gap: 10px; } .ev-sec-r:empty { display: none; }
.ev-sec-lock { font-size: 13px; opacity: .95; }
/* the ↓ button */
.ev-jump { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 70; width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer;
  background: #1f2937; color: #fff; font-size: 22px; box-shadow: 0 8px 20px rgba(15, 23, 42, .3); }
.ev-jump[hidden] { display: none; } .ev-jump:hover { background: #111827; }
@media (max-width: 900px) { .ev-jump { display: none; } }
@media print { .ev-jump, .ev-pp-rules { display: none !important; } #evPage .ev-sec { background: #fff; color: #111; border: 1px solid #999; } }

/* V18.64 the Event calendar */
.ev-view-sw { display: inline-flex; margin-left: auto; border: 1px solid var(--line, #e5e7eb); border-radius: 9px; overflow: hidden; }
.ev-view-sw .btn { border: 0; border-radius: 0; background: transparent; }
.ev-view-sw .btn.on { background: var(--primary, #2563eb); color: #fff; }
.ev-cal { padding: 10px 14px 14px; }
.ev-cal-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ev-cal-h > b { font-size: 17px; min-width: 150px; text-align: center; }
.ev-cal-lg { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: #64748b; }
.ev-cal-lg span { display: inline-flex; align-items: center; gap: 5px; }
.ev-cal-lg i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.ev-cal-dow, .ev-cal-wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ev-cal-dow div { font-size: 12px; font-weight: 700; color: #64748b; text-transform: uppercase; padding: 4px 6px; }
.ev-cal-wk { min-height: 92px; column-gap: 0; row-gap: 3px; border-top: 1px solid var(--line, #e5e7eb); }
.ev-cal-day { border-left: 1px solid var(--line, #e5e7eb); padding: 3px 6px; font-size: 12.5px; color: #334155; }
.ev-cal-day:last-of-type { border-right: 1px solid var(--line, #e5e7eb); }
.ev-cal-day.we { background: #fafafa; }
.ev-cal-day.out { color: #cbd5e1; background: #fcfcfd; }
.ev-cal-day.today span { background: var(--primary, #2563eb); color: #fff; border-radius: 999px; padding: 1px 7px; font-weight: 700; }
.ev-cal-bar { position: relative; z-index: 1; margin: 0 3px; border-radius: 6px; cursor: pointer; overflow: hidden; color: #fff; font-size: 12px; line-height: 24px; height: 24px; }
.ev-cal-bar.cont { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.ev-cal-bar.more { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.ev-cal-bar:hover { filter: brightness(1.08); box-shadow: 0 2px 8px rgba(15,23,42,.25); }
.ev-cal-cells { position: absolute; inset: 0; display: flex; }
.ev-cal-cells i { flex: 1; }
.ev-cal-cells i.su, .ev-cal-lg i.su { background: repeating-linear-gradient(135deg, rgba(255,255,255,.55) 0 4px, rgba(255,255,255,0) 4px 8px); }
.ev-cal-lg i.su { background-color: #94a3b8; }
.ev-cal-t { position: relative; display: block; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-cal-bar.st-upcoming, .ev-cal-lg i.st-upcoming { background-color: #2563eb; }
.ev-cal-bar.st-running, .ev-cal-lg i.st-running { background-color: #16a34a; }
.ev-cal-bar.st-finished, .ev-cal-lg i.st-finished { background-color: #64748b; }
.ev-cal-bar.st-cancelled, .ev-cal-lg i.st-cancelled { background-color: #e5e7eb; }
.ev-cal-bar.st-cancelled { color: #94a3b8; text-decoration: line-through; }
@media (max-width: 700px) { .ev-cal { padding: 8px 4px; } .ev-cal-t b { display: none; } .ev-cal-bar { font-size: 11px; } .ev-cal-lg { margin-left: 0; } .ev-view-sw { margin-left: 0; } }
@media print { .ev-view-sw, .ev-cal-h .btn { display: none !important; } }

.ev-cal-more { position: relative; z-index: 1; justify-self: start; align-self: start; margin: 1px 4px; border: 0; background: none; color: var(--primary, #2563eb); font-size: 12px; font-weight: 700; cursor: pointer; padding: 0 4px; }
.ev-cal-more:hover { text-decoration: underline; }
.ev-cal-daylist { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; min-width: min(560px, 80vw); }
.ev-cal-li { display: block; padding: 8px 10px; border: 1px solid var(--line, #e5e7eb); border-radius: 8px; text-decoration: none; color: inherit; }
.ev-cal-li:hover { background: #f8fafc; }
.ev-cal-li i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.ev-cal-li i.st-upcoming { background: #2563eb; } .ev-cal-li i.st-running { background: #16a34a; } .ev-cal-li i.st-finished { background: #64748b; } .ev-cal-li i.st-cancelled { background: #e5e7eb; }
.ev-cal-li .muted { display: block; font-size: 12px; margin-top: 2px; }

/* V18.65 picklist: print every LPN label in one go */
.pe-lblall { margin-top: 6px; display: block; }
@media print { .pe-lblall { display: none !important; } }

/* V18.68 AI Agent API – x402 pay per call */
.x4-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 14px; align-items: end; }
.x4-grid .x4-on { grid-column: 1 / -1; }
.x4-ok { color: var(--ok, #16a34a); font-weight: 600; } .x4-bad { color: var(--bad, #dc2626); font-size: 12px; }

/* ---- V18.69 WMS menu (nav-rich): line icons, section headings with a dot, guide lines, sub-groups, counts, tags */
.nav-rich { --nr-acc: #4f46e5; --nr-soft: #eef2ff; --nr-line: #e5e7eb; --nr-ink: #1f2937; --nr-mute: #8b93a7; }
.nav-rich .nr-ic { display: inline-flex; width: 18px; height: 18px; flex: 0 0 18px; font-style: normal; color: #64748b; }
.nav-rich .nr-ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-rich > .prog-head { border: 1px solid #c7d2fe; background: var(--nr-soft); border-radius: 12px; padding: 9px 10px; gap: 12px; }
.nav-rich:not(.open) > .prog-head { background: #fff; border-color: var(--nr-line); }
.nav-rich > .prog-head .prog-name { font-size: 14.5px; font-weight: 800; color: var(--nr-ink); line-height: 1.25; }
.nav-rich .nr-tile { width: 34px; height: 34px; border-radius: 9px; background: var(--nr-acc); display: inline-flex; align-items: center; justify-content: center; }
.nav-rich .nr-tile .nr-ic { color: #fff; width: 19px; height: 19px; flex-basis: 19px; }
.nav-rich .nr-cnt { margin-left: auto; min-width: 26px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; text-align: center;
  background: #fff; color: var(--nr-acc); border: 1px solid #c7d2fe; line-height: 20px; }
.nav-rich .nr-cnt[hidden], .nav-rich .nr-tag[hidden] { display: none; }
.nav-rich .nr-hcnt { border-radius: 7px; color: var(--nr-ink); border-color: var(--nr-line); }
.nav-rich .wms-grp.nr-sec { display: flex; align-items: center; gap: 8px; padding: 16px 10px 6px 18px; font-size: 11px; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--nr-mute); }
.nav-rich .nr-sec::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, #6366f1); flex: 0 0 7px; }
.nav-rich .nr-sec::after { content: ""; flex: 1; height: 1px; background: var(--nr-line); }
.nav-rich .nr-sec[hidden], .nav-rich .nr-sub[hidden], .nav-rich .nr-kids[hidden] { display: none !important; }
.program.nav-rich .sub-link, .program.nav-rich .nr-sub { position: relative; display: flex; align-items: center; gap: 12px; margin: 0 4px 0 30px; padding: 8px 10px 8px 12px;
  border-radius: 10px; font-weight: 500; color: var(--nr-ink); font-size: 14.5px; }
.program.nav-rich .sub-link::before, .program.nav-rich .nr-sub::before { content: ""; position: absolute; left: -10px; top: 0; bottom: 0; width: 1.5px; background: var(--nr-line); }
.program.nav-rich .nr-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.program.nav-rich .sub-link:hover, .program.nav-rich .nr-sub:hover { background: #f5f6fb; }
.program.nav-rich .nr-sub { width: calc(100% - 34px); border: 0; background: transparent; font: inherit; font-weight: 600; text-align: left; cursor: pointer;
  text-transform: none; letter-spacing: 0; }
.program.nav-rich .nr-sub:has(+ .nr-kids .sub-link.active) { background: var(--nr-soft); color: var(--nr-acc); }
.program.nav-rich .nr-sub .nr-chev { color: var(--nr-mute); font-size: 12px; transition: transform .15s; }
.program.nav-rich .nr-sub.shut .nr-chev { transform: rotate(-90deg); }
.program.nav-rich .nr-sub.shut + .nr-kids { display: none; }
.program.nav-rich .nr-sub .nr-cnt { margin-left: 0; color: var(--nr-ink); border-color: var(--nr-line); }
.program.nav-rich .nr-kids { position: relative; margin-left: 30px; }
.program.nav-rich .nr-kids::before { content: ""; position: absolute; left: -10px; top: 0; bottom: 0; width: 1.5px; background: var(--nr-line); }
.program.nav-rich .nr-kids .sub-link { margin-left: 22px; font-size: 14px; }
.program.nav-rich .sub-link.active { background: var(--nr-acc); color: #fff; font-weight: 700; box-shadow: 0 4px 12px rgba(79, 70, 229, .28); }
.program.nav-rich .sub-link.active .nr-ic { color: #fff; }
.program.nav-rich .sub-link.active .nr-cnt { background: rgba(255, 255, 255, .22); color: #fff; border-color: transparent; }
.program.nav-rich .sub-link.active::before { background: var(--nr-acc); }
.nav-rich .nr-tag { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; line-height: 18px; white-space: nowrap; }
.nav-rich .nr-tag.live { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.nav-rich .nr-tag.fast { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.nav-rich .sub-link.active .nr-tag { background: rgba(255, 255, 255, .2); color: #fff; border-color: transparent; }
.program.nav-rich .nr-sec:first-child { padding-top: 8px; }
.program.nav-rich .memo-new-n { flex: 0 0 auto; }

/* ---- V18.70 menu: departments (coloured tile, count, accent bar), tree lines to the programs, folded program rows */
.dept.nav-dept { margin: 0 10px 6px; --nr-acc: #4f46e5; --nr-line: #e2e8f0; }
.dept.nav-dept > .dept-head { position: relative; border: 1px solid transparent; border-left: 1px solid transparent; border-radius: 14px; padding: 9px 12px 9px 20px;
  gap: 12px; font-size: 15.5px; font-weight: 800; letter-spacing: 0; color: #111827; }
.dept.nav-dept.open > .dept-head { background: #f1f4f8; border-color: #e3e8ef; }
.dept.nav-dept.open > .dept-head::before { content: ""; position: absolute; left: 9px; top: 11px; bottom: 11px; width: 4px; border-radius: 3px; background: var(--dc); }
.dept.nav-dept .nd-tile { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; background: var(--ds); display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06); }
.dept.nav-dept .nd-tile .nr-ic { display: inline-flex; width: 20px; height: 20px; color: var(--dc); }
.dept.nav-dept .nd-tile svg, .dept.nav-dept .np-tile svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dept.nav-dept .nd-cnt { margin-left: auto; min-width: 26px; padding: 1px 8px; border-radius: 7px; font-size: 12px; font-weight: 700; text-align: center; line-height: 20px;
  background: #fff; color: #334155; border: 1px solid var(--nr-line); }
.dept.nav-dept .nd-cnt[hidden] { display: none; }
.dept.nav-dept > .dept-head .chev { font-size: 11px; }
/* the tree: a line down from the department, a short branch to each program */
.dept.nav-dept > .dept-body { position: relative; margin-left: 28px; padding: 6px 0 2px 16px; }
.dept.nav-dept > .dept-body::before { content: ""; position: absolute; left: 0; top: 0; bottom: 24px; width: 1.5px; background: var(--nr-line); }
.dept.nav-dept > .dept-body > .program { position: relative; margin: 0 0 4px; }
.dept.nav-dept > .dept-body > .program::before { content: ""; position: absolute; left: -16px; top: 21px; width: 12px; height: 1.5px; background: var(--nr-line); }
/* a folded program: a plain row with a soft tile in the department colour */
.dept.nav-dept .program.nav-rich:not(.open) > .prog-head { background: transparent; border-color: transparent; padding: 6px 8px; }
.dept.nav-dept .program.nav-rich:not(.open) > .prog-head:hover { background: #f5f6fb; }
.dept.nav-dept .program.nav-rich:not(.open) .nr-tile { width: 30px; height: 30px; border-radius: 8px; background: var(--ds); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06); }
.dept.nav-dept .program.nav-rich:not(.open) .nr-tile .nr-ic { color: var(--dc); width: 17px; height: 17px; flex-basis: 17px; }
.dept.nav-dept .program.nav-rich:not(.open) > .prog-head .prog-name { font-weight: 600; font-size: 14.5px; }
.dept.nav-dept .program.nav-rich:not(.open) .nr-hcnt { background: transparent; border-color: transparent; color: #94a3b8; min-width: 0; padding: 0 2px; }
/* the program of the page shown, folded: filled */
.dept.nav-dept .program.nav-rich.has-active:not(.open) > .prog-head { background: var(--nr-acc); color: #fff; box-shadow: 0 4px 12px rgba(79, 70, 229, .28); }
.dept.nav-dept .program.nav-rich.has-active:not(.open) > .prog-head .prog-name, .dept.nav-dept .program.nav-rich.has-active:not(.open) > .prog-head .chev { color: #fff; }
.dept.nav-dept .program.nav-rich.has-active:not(.open) .nr-tile { background: rgba(255, 255, 255, .18); box-shadow: none; }
.dept.nav-dept .program.nav-rich.has-active:not(.open) .nr-tile .nr-ic, .dept.nav-dept .program.nav-rich.has-active:not(.open) .nr-hcnt { color: #fff; }
/* "2 New" on a program (instead of its page count) */
.np-new { margin-left: auto; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; line-height: 18px; background: #312e81; color: #fff; white-space: nowrap; }
.np-new[hidden] { display: none; }
.np-new:not([hidden]) + [data-pgcnt] { display: none; }
.program.nav-rich:not(.has-active) .np-new { background: #ef4444; }

/* inside a department there is less room: the page links a bit closer */
.dept.nav-dept .program.nav-rich .sub-link, .dept.nav-dept .program.nav-rich .nr-sub { margin-left: 22px; }
.dept.nav-dept .program.nav-rich .nr-sub { width: calc(100% - 26px); }
.dept.nav-dept .program.nav-rich .nr-kids { margin-left: 22px; }
.dept.nav-dept .program.nav-rich .nr-kids .sub-link { margin-left: 18px; }

/* V18.71 numbers only when something waits: the department total in red, like the program badges */
.dept.nav-dept .nd-cnt { background: #ef4444; color: #fff; border-color: #ef4444; border-radius: 999px; }
.dept.nav-dept .nd-cnt + .chev { margin-left: 4px; }
.dept.nav-dept > .dept-head .chev { margin-left: auto; }
.dept.nav-dept .nd-cnt:not([hidden]) + .chev { margin-left: 4px; }
.program.nav-rich > .prog-head .chev { margin-left: auto; }
.program.nav-rich > .prog-head .np-new:not([hidden]) ~ .chev { margin-left: 4px; }

/* ---- V18.73 a list with more than 20 rows: 20 rows shown, the rest scroll inside; the header row stays on top */
.table-wrap.tbl-cap { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.table-wrap.tbl-cap > table > thead > tr > th { position: sticky; top: 0; z-index: 4; box-shadow: inset 0 -1px 0 #e5e7eb; }
.table-wrap.tbl-cap > table > thead > tr > th:first-child { z-index: 5; box-shadow: inset 0 -1px 0 #e5e7eb, 1px 0 0 #e5e7eb; }
@media print { .table-wrap.tbl-cap { max-height: none !important; overflow: visible !important; } .table-wrap.tbl-cap > table > thead > tr > th { position: static; } }

/* ---- V18.74 Canopy / Event: a staff marked Not available – the line stays, in red (no allowance / incentive / reward); HR sees it red on the transfer */
#evStaff tr.ev-na > td { background: rgba(239, 68, 68, .10); color: #b91c1c; }
#evStaff tr.ev-na > td:first-child { box-shadow: inset 3px 0 0 #dc2626; }
#evStaff tr.ev-na input { color: #b91c1c; }
.ev-na-tag, .tr-na-tag { color: #b91c1c; font-weight: 600; font-size: 12px; margin-top: 2px; line-height: 1.3; }
.ev-na-tag small, .tr-na-tag small { font-weight: 400; opacity: .85; }
.btn.ev-na-btn { color: #b91c1c; border-color: #fca5a5; white-space: nowrap; }
.tr-table tr.tr-na > td, table.tr-tmp tr.tr-na > td { background: rgba(239, 68, 68, .10); color: #b91c1c; }
.tr-table tr.tr-na > td:first-child, table.tr-tmp tr.tr-na > td:first-child { box-shadow: inset 3px 0 0 #dc2626; }
.tr-table tr.tr-na a { color: #b91c1c; }
.tr-na-note { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: rgba(239, 68, 68, .10); color: #b91c1c; font-weight: 600; }

/* V18.75 a Canopy transfer sent back to HR because a staff is not available */
.tr-na-note.tr-resub { background: rgba(245, 158, 11, .12); color: #b45309; }

/* V18.76 Book › Bank Transfer: supporting documents (SSM, IC …) – many files */
.atk-paydocs { border-top: 1px dashed #f5b301; margin-top: 2px; padding: 8px 0; }
.atk-pd-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.atk-pd-add select { max-width: 300px; }
.atk-pd-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.atk-pd-list:empty { display: none; }

/* V18.77 Flight & Home Stay: Search by Admin Dept / Requester */
.atk-who-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .atk-who-grid { grid-template-columns: 1fr; } }
#atkOwn { margin-top: 14px; }
#atkOwn .atk-legc[hidden], #atkOwn [data-own-back][hidden] { display: none; }
.atk-ownfiles { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.atk-ownfiles .atk-pd-list { flex-basis: 100%; }
.atk-ownrow { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line, #e5e7eb); }
.atk-ownrow:last-of-type { border-bottom: 0; }
.atk-ownrow em { font-style: normal; font-weight: 700; white-space: nowrap; }
.atk-owncard > .card-body { padding: 4px 18px 12px !important; }   /* V18.97 */
.atk-owncard .atk-ownrow { padding: 12px 0; }
.atk-ownfl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.atk-ownfl a { width: 92px; height: 66px; border: 1px solid var(--line, #e5e7eb); border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: #f8fafc; text-decoration: none; }
.atk-ownfl a:hover { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99, 102, 241, .18); }
.atk-ownfl img { width: 100%; height: 100%; object-fit: cover; }
.atk-ownfl span { font-size: 12px; font-weight: 800; color: #b91c1c; letter-spacing: .5px; }
.atk-ownnone { font-size: 12.5px; padding: 8px 0 0; }
@media (max-width: 640px) { .atk-owncard > .card-body { padding: 4px 12px 10px !important; } .atk-ownrow { grid-template-columns: 96px 1fr auto; } }
.atk-ownnote { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #f8fafc; }

/* V18.78 Search by = the 1st section; by the requester: "Your flight / home stay / train" inside each section */
.atk-who-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .atk-who-grid { grid-template-columns: 1fr; } }
.atk-who-o { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 40px 14px 14px; border: 1.5px solid var(--line, #e5e7eb); border-radius: 12px; cursor: pointer; background: var(--card, #fff); transition: border-color .15s, box-shadow .15s, background .15s; }
.atk-who-o:hover { border-color: #a5b4fc; }
.atk-who-o.on { border-color: #6366f1; background: rgba(99, 102, 241, .06); box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }
.atk-who-o input { position: absolute; opacity: 0; pointer-events: none; }
.atk-who-ic { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; display: grid; place-items: center; font-style: normal; font-size: 22px; background: rgba(99, 102, 241, .1); }
.atk-who-o b { display: block; font-size: 15px; }
.atk-who-o small { display: block; color: var(--muted, #6b7280); font-size: 12.5px; margin-top: 2px; line-height: 1.35; }
.atk-who-o .atk-kck { position: absolute; top: 12px; right: 12px; }
.atk-who-o.on .atk-kck { background: #4f46e5; border-color: #4f46e5; }
.atk-who-o.on .atk-kck::after { content: "✓"; color: #fff; font-size: 12px; font-weight: 700; }
.atk-who-o.on .atk-who-ic { background: #4f46e5; }
.atk-who-o:has(input:disabled) { cursor: default; }
.atk-ownx { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line, #e5e7eb); }
.atk-ownx-tip { padding: 8px 12px; border-radius: 8px; background: rgba(99, 102, 241, .08); color: #3730a3; font-size: 13px; margin-bottom: 10px; }
.atk-ownbox { margin-top: 14px; padding: 12px 14px 4px; border: 1.5px solid rgba(99, 102, 241, .35); border-radius: 12px; background: rgba(99, 102, 241, .04); }
.atk-ownbox-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.atk-ownbox-h > i { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; display: grid; place-items: center; font-style: normal; background: #6366f1; color: #fff; font-size: 16px; }
.atk-ownbox-h b { display: block; color: #3730a3; }
.atk-ownbox-h small { display: block; color: var(--muted, #6b7280); font-size: 12px; }
.atk-own-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.atk-own-g.g4 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .9fr); }
@media (max-width: 900px) { .atk-own-g.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.atk-own-sub { font-size: 12.5px; font-weight: 700; color: #4f46e5; margin: 4px 0 2px; }
.atk-rm { display: flex; align-items: stretch; }
.atk-rm > i { font-style: normal; display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--line, #d1d5db); border-right: 0; border-radius: 8px 0 0 8px; background: #f8fafc; font-size: 12.5px; font-weight: 600; color: #475569; }
.atk-rm > input { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; min-width: 0; flex: 1; }
.atk-opaste { margin: 2px 0 12px; padding: 12px 14px; border: 1.5px dashed rgba(99, 102, 241, .55); border-radius: 10px; background: rgba(255, 255, 255, .6); cursor: pointer; outline: none; }   /* V18.85 */
.atk-opaste:focus { border-style: solid; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, .18); background: rgba(99, 102, 241, .06); }
.atk-opaste-t { font-size: 13px; color: var(--muted, #6b7280); }
.atk-opaste-t b { color: #3730a3; }
.atk-opaste-a { color: #4f46e5; font-weight: 600; cursor: pointer; text-decoration: underline; }
.atk-opaste-l { display: flex; flex-wrap: wrap; gap: 8px; }
.atk-opaste-l:not(:empty) { margin-top: 10px; }
.atk-opaste-c { position: relative; width: 96px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px; border: 1px solid var(--line, #e5e7eb); border-radius: 8px; background: #fff; }
.atk-opaste-c img { width: 86px; height: 64px; object-fit: cover; border-radius: 5px; }
.atk-opaste-c i { font-style: normal; font-size: 34px; line-height: 64px; height: 64px; }
.atk-opaste-c small { width: 100%; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.atk-opaste-c button { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #ef4444; color: #fff; font-size: 11px; cursor: pointer; line-height: 20px; padding: 0; }
.atk-ownbox[hidden], .atk-ownx[hidden], [data-own-back][hidden] { display: none !important; }

/* V18.79 Flight + Home Stay: the Area / Check-in / Check-out follow the flights */
.atk-hsh { display: block; font-size: 11.5px; color: #4f46e5; margin-top: 3px; min-height: 0; }
.atk-hsh:empty { display: none; }
.atk-hsh.bad { color: var(--bad, #b91c1c); font-weight: 600; }
input.atk-sync { background: rgba(99, 102, 241, .06) !important; border-color: rgba(99, 102, 241, .45) !important; }
input.atk-bad { border-color: var(--bad, #b91c1c) !important; }

/* V18.80 Picklist: Document Type (Outlet Request OSR, Direct BT) */
.pe-pf { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #f1f5f9; color: #475569; }

/* V18.86 Borang HR 16 – Commission & Incentive Release */
.ki-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--kc); background: color-mix(in srgb, var(--kc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--kc) 35%, transparent); vertical-align: middle; }
.ki-filt { display: flex; gap: 10px; flex-wrap: wrap; } .ki-filt input { flex: 1; min-width: 200px; }
.ki-list tbody tr { cursor: pointer; } .ki-list tr.ki-todo td:first-child { box-shadow: inset 3px 0 0 #d97706; }
.ki-form, .ki-w { max-width: 980px; margin-left: auto !important; margin-right: auto !important; box-sizing: border-box; }   /* V18.95 the Status box as wide as the form */ .ki-form > .card-body { padding: 16px 20px 20px !important; } .ki-filt.card-body { padding: 12px 16px !important; }
@media (max-width: 640px) { .ki-form > .card-body { padding: 12px !important; } }
.ki-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; } .ki-head > div:first-child { flex: 1; text-align: center; }
.ki-head h3 { margin: 6px 0 2px; font-size: 16px; letter-spacing: .3px; } .ki-bor { border: 1.5px solid currentColor; padding: 6px 14px; text-align: center; font-weight: 600; line-height: 1.45; border-radius: 4px; }
.ki-kv { display: grid; grid-template-columns: minmax(150px, 34%) 12px 1fr; align-items: start; gap: 8px; margin: 8px 0; } .ki-kv > span { padding-top: 8px; font-size: 13.5px; } .ki-kv > b { padding-top: 8px; }
.ki-val { min-height: 38px; padding: 8px 10px; border: 1px solid var(--line, #e5e7eb); border-radius: 8px; background: var(--card, #fff); box-sizing: border-box; width: 100%; }
select.ki-val { padding: 6px 8px; }
.ki-tall .ki-val { min-height: 76px; } .ki-sig { max-height: 70px; max-width: 260px; display: block; }
.ki-tbl { table-layout: fixed; width: 100%; margin-top: 8px; } .ki-tbl td, .ki-tbl th { vertical-align: middle; } .ki-tbl input { width: 100%; box-sizing: border-box; }
.ki-tbl .atk-rm input { text-align: right; } .ki-other { display: inline-block; padding: 1px 6px; border-radius: 6px; background: #fef3c7; color: #92400e; font-size: 11px; }
.ki-note { font-size: 12.5px; margin-top: 8px; } .ki-sec { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line, #e5e7eb); } .ki-sec h4 { margin: 0 0 4px; font-size: 14px; }
.ki-files { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; } .ki-file { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; } .ki-frm { border: 0; background: #fee2e2; color: #b91c1c; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; }
.ki-foot { text-align: center; font-weight: 600; font-size: 12.5px; margin-top: 16px; }
@media (max-width: 640px) { .ki-kv { grid-template-columns: 1fr; gap: 2px; } .ki-kv > b { display: none; } .ki-tbl { min-width: 620px; } }

/* ---------- V19.09 NIIMBOT print status window (bottom right, the page stays usable) ---------- */
.niim-job { position: fixed; right: 16px; bottom: 16px; z-index: 9000; width: 360px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid #d7dbe6;
  border-radius: 12px; box-shadow: 0 12px 36px rgba(15, 23, 42, .22); font-size: 13px; color: #1f2937; }
.niim-job .nj-head { display: flex; align-items: center; gap: 6px; padding: 9px 10px 8px 12px; border-bottom: 1px solid #eef0f5; background: var(--primary-soft); border-radius: 12px 12px 0 0; }
.niim-job .nj-title { flex: 1; font-size: 13px; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.niim-job .nj-head button { border: 0; background: transparent; cursor: pointer; font-size: 13px; color: #475569; padding: 2px 6px; border-radius: 6px; }
.niim-job .nj-head button:hover { background: #fff; }
.niim-job .nj-body { padding: 10px 12px 12px; }
.niim-job .nj-big { font-size: 16px; margin-bottom: 6px; }
.niim-job .nj-bar { height: 8px; background: #edf0f5; border-radius: 999px; overflow: hidden; }
.niim-job .nj-bar i { display: block; height: 100%; background: var(--primary); transition: width .25s; }
.niim-job .nj-stage { margin-top: 7px; font-weight: 600; } .niim-job .nj-stage.bad { color: var(--bad); }
.niim-job .nj-times { margin-top: 3px; font-size: 12px; }
.niim-job .nj-notes { margin-top: 6px; padding: 6px 8px; background: #fff7e6; border: 1px solid #f5d9a8; border-radius: 8px; font-size: 12px; }
.niim-job .nj-err { margin-top: 6px; padding: 6px 8px; background: #fdecea; border: 1px solid #f3c3be; border-radius: 8px; color: var(--bad); font-size: 12px; white-space: pre-wrap; }
.niim-job .nj-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 168px; overflow: auto; border: 1px solid #eef0f5; border-radius: 8px; }
.niim-job .nj-list li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 8px; border-bottom: 1px solid #f3f4f8; font-size: 12px; }
.niim-job .nj-list li:last-child { border-bottom: 0; }
.niim-job .nj-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.niim-job .nj-list li em { font-style: normal; color: #64748b; white-space: nowrap; }
.niim-job .nj-list li.nj-sending { background: var(--primary-soft); } .niim-job .nj-list li.nj-sending em { color: var(--primary); font-weight: 700; }
.niim-job .nj-list li.nj-printed em, .niim-job .nj-list li.nj-sent em { color: #15803d; }
.niim-job .nj-list li.nj-failed em, .niim-job .nj-list li.nj-not-printed em { color: var(--bad); font-weight: 700; }
.niim-job .nj-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-top: 10px; }
.niim-job .nj-btns .btn { padding: 5px 10px; font-size: 12px; }
.niim-job.nj-small .nj-list, .niim-job.nj-small .nj-times, .niim-job.nj-small .nj-notes { display: none; }
.niim-job.nj-note { width: 300px; }
@media print { .niim-job { display: none !important; } }


/* V19.29: acknowledge / letter view fits the page (not a small scrolling box) */
.adl.adl-fit { height: 100vh; max-height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.adl.adl-fit .adl-doc { flex: 1 1 auto; min-height: 0; height: auto; width: 100%; border: 0; }
.adl.adl-fit .adl-act, .adl.adl-fit .adl-sign { flex: 0 0 auto; overflow: auto; max-height: 36vh; }
/* V19.29: MC Submit / Approve stay in a fixed place */
.mc-actions.sticky-save { position: sticky; bottom: 0; z-index: 6; background: #fff; padding: 10px 0; box-shadow: 0 -6px 16px rgba(15,23,42,.08); }

.pk-grid[hidden] { display: none !important; }   /* V19.53 the FTP / folder boxes hide again */

/* V19.73 Transfer Form: the To outlet's timetable shown (no choosing) */
.tr-ttshow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; margin: 4px 0; }
.tr-ttchip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--chip, #eef2ff); border: 1px solid var(--border, #c7d2fe); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tr-times .t24[readonly] { width: 100%; min-width: 6.5em; background: var(--muted-bg, #f3f4f6); }

/* V19.97 Canopy / Event attendance */
.ev-att th, .ev-att td { text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev-att td:nth-child(2), .ev-att th:nth-child(2) { text-align: left; }
.ev-att .ev-att-d { border-left: 2px solid var(--line); }
.ev-att-na { color: var(--muted, #94a3b8); } .ev-att-abs { color: var(--bad, #dc2626); font-weight: 600; } .ev-att-mid { color: #d97706; }

/* V20.03 COA Application: no checklist tick boxes */
.row .check-cell .check { display: none !important; }

/* V20.05 Support Ticket */
.sp-itg { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
.sp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 16px; align-items: start; }
@media (max-width: 900px) { .sp-grid { grid-template-columns: 1fr; } }
.sp-pics { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-pic { position: relative; display: inline-block; width: 110px; height: 110px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f1f5f9; }
.sp-pic img { width: 100%; height: 100%; object-fit: cover; display: block; } .sp-pic span { display: block; padding: 8px; font-size: 12px; }
.sp-pic button { position: absolute; top: 3px; right: 3px; border: 0; border-radius: 50%; width: 22px; height: 22px; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.sp-desc { white-space: normal; line-height: 1.5; font-size: 15px; }
.sp-kv { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; } .sp-kv > span { color: var(--muted); min-width: 80px; font-size: 13px; }
.sp-seg { display: flex; gap: 6px; } .sp-seg label { flex: 1; } .sp-seg input { display: none; }
.sp-seg span { display: block; text-align: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.sp-seg input:checked + span { background: var(--primary, #2e348a); color: #fff; border-color: var(--primary, #2e348a); }
.sp-pri { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #e2e8f0; }
.sp-pri-high { background: #fee2e2; color: #b91c1c; } .sp-pri-medium { background: #fef3c7; color: #b45309; } .sp-pri-low { background: #dcfce7; color: #15803d; }
.sp-chatcard { display: flex; flex-direction: column; position: sticky; top: 80px; }
.sp-chat { height: 420px; overflow-y: auto; padding: 12px 14px; background: #f8fafc; display: flex; flex-direction: column; gap: 8px; }
.sp-msg { display: flex; flex-direction: column; max-width: 85%; } .sp-msg.me { align-self: flex-end; align-items: flex-end; } .sp-msg.it { align-self: flex-start; }
.sp-bub { padding: 8px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); line-height: 1.4; }
.sp-msg.me .sp-bub { background: var(--primary, #2e348a); color: #fff; border-color: transparent; }
.sp-msg small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.sp-sys { align-self: center; font-size: 11.5px; color: var(--muted); background: #eef2ff; padding: 3px 10px; border-radius: 999px; }
.sp-send { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); } .sp-send textarea { flex: 1; resize: none; }
.sp-new { background: #ef4444; color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 999px; }

/* V20.07 Flight: the preferred seat per passenger */
.atk-seatpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; } .atk-seatpick input { display: none; }
.atk-seatpick span { display: block; text-align: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; }
.atk-seatpick input:checked + span { background: var(--primary, #2e348a); color: #fff; border-color: var(--primary, #2e348a); }
.atk-seatc { white-space: nowrap; text-align: center; }

/* V20.10 Support Ticket: who / outlet, chat pictures, IT note */
.sp-from { font-size: 13px; color: var(--muted); margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); } .sp-from b { color: var(--ink, #0f172a); }
.sp-chatimg { display: block; max-width: 220px; max-height: 220px; border-radius: 10px; margin-bottom: 4px; }
.sp-camb { padding: 0 12px; display: flex; align-items: center; font-size: 18px; }
.sp-notecard { border-left: 4px solid #f59e0b; }
.sp-note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; } .sp-note small { color: var(--muted); font-size: 11px; }
@media (max-width: 900px) { .sp-chatcard { position: static; } .sp-chat { height: 340px; } }
.sp-btns { display: flex; gap: 8px; margin-top: 8px; }

/* V20.12 Transfer: Working Hours / 1st / 2nd Break like the paper form HR 05B */
.tr-wh { border-collapse: collapse; margin: 6px 0 10px; width: 100%; max-width: 560px; }
.tr-wh th, .tr-wh td { border: 1px solid var(--line, #cbd5e1); padding: 6px 10px; text-align: center; vertical-align: middle; }
.tr-wh th { background: var(--muted-bg, #f3f4f6); font-size: 12px; } .tr-wh th i { font-weight: 600; color: var(--muted, #6b7280); }
.tr-wh td { font-variant-numeric: tabular-nums; font-weight: 600; }
.tr-whp { display: block; white-space: nowrap; } .tr-atau { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted, #6b7280); }
.tr-whc { white-space: nowrap; }
.tr-ttbox:has(.tr-wh) + .tr-times { display: none; }

/* V20.13 a page that could not be loaded */
.pg-guard { border-left: 4px solid var(--warn, #d97706); margin-bottom: 12px; }

/* V20.17 Overtime Record (HR 24) */
.ot-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; } .ot-types input { display: none; }
.ot-types span { display: block; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 700; }
.ot-types span small { display: block; font-weight: 400; color: var(--muted, #6b7280); font-size: 12px; margin-top: 2px; }
.ot-types input:checked + span { border-color: var(--primary, #2e348a); background: color-mix(in srgb, var(--primary, #2e348a) 8%, transparent); box-shadow: 0 0 0 1px var(--primary, #2e348a) inset; }
.ot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 14px; } .ot-grid .field small { font-weight: 400; }
.ot-h { margin: 14px 0 4px; font-size: 14px; }
.ot-tbl { min-width: 860px; } .ot-tbl td { padding: 4px 5px; } .ot-tbl .t24 { width: 100%; text-align: center; } .ot-tbl input[type=number] { text-align: center; }
.ot-tbl .ot-day, .ot-tbl .ot-tot { text-align: center; } .ot-tbl .ot-nm { font-size: 12.5px; }
.ot-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.ot-sum > div { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.ot-sum span small { display: block; color: var(--muted, #6b7280); font-size: 11.5px; font-style: italic; } .ot-sum b { font-size: 18px; }
.ot-sigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 6px 0 10px; }
.ot-sigbox { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.ot-sigbox > small { color: var(--muted, #6b7280); font-style: italic; margin-top: -4px; } .ot-nosig { min-height: 40px; padding: 6px 0; font-size: 13px; }

/* V20.19 Overtime Record (HR 24) – arranged */
.ot-w { max-width: 1180px; margin-left: auto !important; margin-right: auto !important; box-sizing: border-box; } .ot-w > .card-body { padding: 18px 22px 20px !important; }
.ot-banner { padding: 12px 16px; border-left: 4px solid #64748b; } .ot-banner.bad { border-left-color: var(--bad); } .ot-banner.bad b { color: var(--bad); }
.ot-steps { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } .ot-steps .ot-cur { box-shadow: 0 0 0 2px var(--primary, #2e348a) inset; }
.ot-esbar { margin-top: 12px; }
.ot-types { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
.ot-types span { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 12px 16px; }
.ot-types span i { grid-row: 1 / 3; font-style: normal; font-size: 24px; } .ot-types span small { margin-top: 0; }
.ot-sec { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line, #e5e7eb); } .ot-sec:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.ot-sec > h3 { margin: 0 0 10px; font-size: 15px; } .ot-sec > h3 small { font-weight: 400; color: var(--muted, #6b7280); font-style: italic; margin-left: 6px; font-size: 12.5px; }
.ot-grid { display: grid; gap: 12px 16px; align-items: end; } .ot-grid.m { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ot-grid.i { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ot-grid .field { margin: 0; } .ot-grid .field > span { display: block; font-weight: 600; } .ot-grid .field > span small { display: block; font-weight: 400; font-style: italic; color: var(--muted, #6b7280); font-size: 11.5px; }
.ot-grid input, .ot-grid select { width: 100%; box-sizing: border-box; height: 40px; }
.ot-tbl { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.ot-tbl th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .3px; padding: 8px 6px; background: var(--muted-bg, #f3f4f6); text-align: left; } .ot-tbl th small { text-transform: none; font-weight: 400; }
.ot-tbl td { padding: 6px; border-bottom: 1px solid var(--line, #e5e7eb); vertical-align: middle; } .ot-tbl td.c, .ot-tbl th:nth-child(1) { text-align: center; }
.ot-tbl input { width: 100%; box-sizing: border-box; height: 36px; } .ot-tbl .t24, .ot-tbl input[type=number] { text-align: center; }
.ot-tbl .ot-nm { font-size: 12.5px; line-height: 1.25; } .ot-tbl .ot-tot b { font-size: 14px; }
.ot-rm { border: 0; background: #fee2e2; color: #b91c1c; border-radius: 50%; width: 26px; height: 26px; cursor: pointer; }
.ot-addrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 14px; } .ot-addrow .muted { font-size: 12px; }
.ot-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.ot-sum > div { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--muted-bg, #f9fafb); }
.ot-sum i { font-style: normal; font-size: 20px; } .ot-sum b { font-size: 20px; }
.ot-need { display: flex; gap: 10px; align-items: flex-start; border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; cursor: pointer; }
.ot-need input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 18px; } .ot-need small { display: block; color: var(--muted, #6b7280); font-size: 12px; margin-top: 2px; }
.ot-need.on { border-style: solid; border-color: var(--primary, #2e348a); background: color-mix(in srgb, var(--primary, #2e348a) 6%, transparent); }
.ot-sigs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 10px; }
.ot-sigbox { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.ot-sigbox .t { font-weight: 700; } .ot-sigbox .t small { display: block; font-weight: 400; font-style: italic; color: var(--muted, #6b7280); font-size: 12px; }
.ot-sigbox .ki-sig, .ot-sigbox .ot-nosig { min-height: 64px; } .ot-sigbox .ot-nosig { display: flex; align-items: center; color: var(--muted, #6b7280); font-size: 13px; border-bottom: 1px solid var(--line); }
.ot-sl { display: grid; grid-template-columns: 110px 1fr; font-size: 13px; } .ot-sl span { color: var(--muted, #6b7280); }
.ot-files { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.ot-kvs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; } .ot-kv { display: grid; grid-template-columns: 170px 1fr; font-size: 13.5px; }
.ot-kv span { color: var(--muted, #6b7280); } .ot-kv span small { display: block; font-style: italic; font-size: 11px; }
@media (max-width: 900px) { .ot-grid.m, .ot-grid.i { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ot-steps { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 600px) { .ot-grid.m, .ot-grid.i, .ot-types, .ot-sigs, .ot-kvs { grid-template-columns: 1fr; } .ot-kv { grid-template-columns: 1fr; } }
.ot-tbl.m { min-width: 900px; }

/* V20.22 OT reasons */
.ot-tbl select { width: 100%; height: 36px; box-sizing: border-box; } .ot-rf { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 4px; margin-top: 4px; }
.ot-rf input { height: 32px !important; font-size: 12.5px; } .ot-rinfo { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: var(--muted, #6b7280); }
.ot-rs { width: 100%; border-collapse: collapse; } .ot-rs th { text-align: left; font-size: 12px; padding: 4px; } .ot-rs td { padding: 3px 4px; } .ot-rs input { width: 100%; box-sizing: border-box; }
.ot-tbl.m { min-width: 980px; }

/* V20.26 Corporate Hotel */
.atk-corp-t .atk-corp-h td { background: var(--soft, #f8fafc); }
.atk-corp-sub > td { padding-top: 0; }
.atk-corp-rt { width: 100%; border-collapse: collapse; margin: 0 0 8px; }
.atk-corp-rt th { font-size: 12px; color: var(--muted, #64748b); text-align: left; padding: 4px 6px; font-weight: 600; }
.atk-corp-rt td { padding: 4px 6px; vertical-align: middle; }
.atk-corp-pic { display: flex; align-items: center; gap: 8px; }
.atk-corp-pic img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line, #e2e8f0); }
.atk-corp { margin-top: 12px; padding: 12px; border: 1px solid #c7d2fe; border-radius: 10px; background: #eef2ff; }
.atk-corp-hd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.atk-corp-hd small { color: var(--muted, #64748b); }
.atk-corp-ho { margin-bottom: 8px; }
.atk-corp-hn { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.atk-corp-bal { font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #fff; border: 1px solid #c7d2fe; }
.atk-corp-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.atk-corp-room { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; background: #fff; border: 1.5px solid #e2e8f0; cursor: pointer; }
.atk-corp-room.on { border-color: var(--primary, #4f46e5); box-shadow: 0 0 0 2px rgba(79, 70, 229, .15); }
.atk-corp-room img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; cursor: zoom-in; }
.atk-corp-room span { display: flex; flex-direction: column; }
.atk-corp-room small { color: var(--muted, #64748b); }
.atk-corp-nopic { width: 72px; height: 54px; display: grid; place-items: center; font-size: 24px; font-style: normal; background: #f1f5f9; border-radius: 6px; }
.atk-corp-other { margin-top: 4px; max-width: 360px; }
.atk-corp-tot { margin-top: 8px; font-size: 13.5px; }

.atk-corp-use { margin: 0 0 10px; font-size: 12.5px; }
.atk-corp-use summary { cursor: pointer; color: var(--muted, #64748b); }
.atk-corp-use div { padding: 2px 0 2px 16px; }

.atk-corp-room .btn { margin-top: 4px; align-self: flex-start; }
.atk-corp-tag { font-size: 11.5px; padding: 1px 7px; border-radius: 10px; background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; font-weight: 600; }

/* V20.31 the Book dialog */
.atk-corp-note { background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 8px; }
.atk-calc-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.atk-calc-t td { padding: 5px 4px; border-bottom: 1px dashed #e2e8f0; }
.atk-calc-t td:last-child { text-align: right; white-space: nowrap; }
.atk-calc-t tr.tot td { font-weight: 700; border-top: 1.5px solid #cbd5e1; }
.atk-calc-t tr.cp td { color: #3730a3; }
.atk-calc-t tr.pay td { font-weight: 700; background: #f8fafc; }
.atk-calc-t tr.bal td { border-bottom: 0; }
.atk-calc-t .neg { color: var(--bad, #dc2626); }

.ad-whole-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #eef2ff; border: 1px solid #c7d2fe; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }

.ad-whole-doc { overflow: hidden; }
.ad-whole-doc .card-head { display: flex; align-items: center; gap: 10px; }
.ad-whole-doc .card-head .btn { margin-left: auto; }
.ad-whole-img { display: block; max-width: 100%; margin: 0 auto; }

/* V20.39 Uniform Order (HR 20) */
.uni-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 14px; margin-bottom: 10px; }
.uni-tbl { min-width: 1020px; border-collapse: collapse; width: 100%; }
.uni-tbl th, .uni-tbl td { border: 1px solid var(--line); padding: 4px 6px; font-size: 13px; vertical-align: middle; }
.uni-tbl thead th { background: var(--soft, #f1f5f9); text-align: center; font-size: 12px; }
.uni-tbl .uni-sz, .uni-tbl .uni-c, .uni-tbl .uni-q2 { text-align: center; width: 40px; }
.uni-tbl .uni-p { text-align: right; white-space: nowrap; } .uni-tbl .uni-q { width: 60px; text-align: center; }
.uni-tbl tfoot td { background: var(--soft, #f8fafc); } .uni-nm { min-width: 180px; }
.uni-notes { margin-top: 10px; font-size: 12px; color: #dc2626; line-height: 1.6; }

/* V20.40 Uniform Order: padding */
.uni-card > .card-body { padding: 18px 22px 20px; }
.uni-card .uni-head { margin-bottom: 16px; }
.uni-card .table-wrap { margin: 0 -2px; }
.uni-card .uni-tbl th, .uni-card .uni-tbl td { padding: 7px 9px; }
.uni-card .uni-notes { margin-top: 14px; padding: 10px 14px; background: #fef2f2; border-radius: 8px; }
.uni-card #uniBtns { margin-top: 16px !important; }
@media (max-width: 640px) { .uni-card > .card-body { padding: 14px 12px; } }

/* V20.45 Flight & Home Stay – Actual dates */
.atk-act-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 4px 12px; }
.atk-act-g input.atk-act-ch { border-color: #d97706; background: #fffbeb; }
.atk-actual { border-left: 4px solid #2563eb; }
.atk-act-list { display: flex; flex-wrap: wrap; gap: 10px; }
.atk-act-i { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; min-width: 150px; }
.atk-act-i span { font-size: 12.5px; color: var(--muted, #64748b); } .atk-act-i b { font-size: 16px; }
.atk-act-i.ch { border-color: #f59e0b; background: #fffbeb; } .atk-act-i small { color: #b45309; text-decoration: line-through; }

/* V20.46 the request list: the Actual dates */
.atk-dch { color: #b45309; font-weight: 700; }
.atk-dact { font-size: 11px; color: #2563eb; }

/* V20.47 the Actual times */
.atk-act-g { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.atk-act-dt { display: flex; gap: 6px; } .atk-act-dt input[type=date] { min-width: 150px; } .atk-act-dt input[type=date] { flex: 1; min-width: 0; } .atk-act-dt .t24 { width: 74px; text-align: center; }
.atk-act-dt .t24.atk-act-ch { border-color: #d97706; background: #fffbeb; }

/* V20.49 iPhone / iPad: the page stays put - date / time boxes shrink to the screen (Safari keeps them wide), nothing slides sideways */
html.ios, html.ios body { overflow-x: clip; max-width: 100%; }
html.ios input[type=date], html.ios input[type=time], html.ios input[type=month], html.ios input[type=datetime-local] {
  -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; min-height: 36px; text-align: left; }
html.ios input::-webkit-date-and-time-value { text-align: left; margin: 0; }
html.ios input, html.ios select, html.ios textarea { max-width: 100%; }
html.ios .card, html.ios section, html.ios .field { min-width: 0; }

/* V20.50 Home stay option: the Link */
.atk-opt-url { grid-column: 1 / -1; }
.atk-opt-lnk { margin-top: 4px; }
