/* PlusERP V1.0 - Cash & Banking cheque lifecycle and scoped sub-navigation */
.content:has(.banking-command-center) .banking-primary-nav,
.content:has(.banking-command-center) .cheque-queue-nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.content:has(.banking-command-center) .banking-primary-nav {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 0 0 20px;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.05);
}

.content:has(.banking-command-center) .banking-primary-nav button,
.content:has(.banking-command-center) .cheque-queue-nav button {
  flex: 0 0 auto;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.content:has(.banking-command-center) .banking-primary-nav button {
  padding: 9px 15px;
  border-bottom: 3px solid transparent;
}

.content:has(.banking-command-center) .banking-primary-nav button:hover,
.content:has(.banking-command-center) .cheque-queue-nav button:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.content:has(.banking-command-center) .banking-primary-nav button.active {
  border-bottom-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.content:has(.banking-command-center) .banking-primary-nav button:focus-visible,
.content:has(.banking-command-center) .cheque-queue-nav button:focus-visible,
.content:has(.banking-command-center) .cheque-row-actions button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.32);
  outline-offset: 2px;
}

.banking-detail-shell .cheque-management-panel {
  min-width: 0;
  scroll-margin-top: 72px;
}

.banking-detail-shell .cheque-management-head {
  align-items: flex-start;
  gap: 16px;
}

.banking-detail-shell .cheque-management-head > div {
  min-width: 0;
}

.banking-detail-shell .cheque-queue-nav {
  margin: 16px 0;
  padding: 5px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.banking-detail-shell .cheque-queue-nav button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
}

.banking-detail-shell .cheque-queue-nav button strong {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
}

.banking-detail-shell .cheque-queue-nav button.active {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

.banking-detail-shell .cheque-queue-nav button.active strong {
  background: #2563eb;
  color: #fff;
}

.banking-detail-shell .cheque-register-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.banking-detail-shell .cheque-register-filters {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 12px;
}

.banking-detail-shell .cheque-register-filters label {
  display: grid;
  gap: 5px;
  width: min(100%, 420px);
  font-weight: 600;
}

.banking-detail-shell .cheque-register-filters input {
  min-height: 44px;
}

.banking-detail-shell .cheque-register {
  width: max(100%, 1760px);
  table-layout: fixed;
}

.banking-detail-shell .cheque-register th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  white-space: nowrap;
}

.banking-detail-shell .cheque-register th:nth-child(1) { width: 120px; }
.banking-detail-shell .cheque-register th:nth-child(2) { width: 210px; }
.banking-detail-shell .cheque-register th:nth-child(3) { width: 135px; }
.banking-detail-shell .cheque-register th:nth-child(4) { width: 160px; }
.banking-detail-shell .cheque-register th:nth-child(n+5):nth-child(-n+10) { width: 132px; }
.banking-detail-shell .cheque-register th:nth-child(11) { width: 190px; }
.banking-detail-shell .cheque-register th:nth-child(12) { width: 145px; }
.banking-detail-shell .cheque-register th:nth-child(13) { width: 120px; }
.banking-detail-shell .cheque-register th:nth-child(14) { width: 270px; }

.banking-detail-shell .cheque-register td {
  vertical-align: top;
  overflow-wrap: anywhere;
}

.banking-detail-shell .cheque-register td.amount {
  overflow-wrap: normal;
  white-space: nowrap;
}

.banking-detail-shell .cheque-register .cheque-customer {
  line-height: 1.45;
  word-break: normal;
}

.banking-detail-shell .cheque-row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(108px, 1fr));
  gap: 6px;
  width: 100%;
}

.banking-detail-shell .cheque-row-actions .btn {
  min-width: 0;
  min-height: 36px;
  justify-content: center;
  white-space: normal;
  line-height: 1.2;
}

.banking-detail-shell .cheque-accounting-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #0ea5e9;
  background: #f0f9ff;
  color: #0c4a6e;
}

.cheque-receive-backdrop .cheque-receive-form {
  max-width: 880px;
}

.cheque-receive-backdrop .modal-title p {
  margin: 4px 0 0;
  color: #64748b;
}

@media (max-width: 1024px) {
  .content:has(.banking-command-center) .banking-primary-nav {
    position: static;
  }
}

@media (max-width: 760px) {
  .content:has(.banking-command-center) .cheque-management-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .content:has(.banking-command-center) .cheque-management-head .btn {
    width: 100%;
    min-height: 44px;
  }

  .content:has(.banking-command-center) .cheque-register-filters {
    display: grid;
    align-items: stretch;
  }

  .content:has(.banking-command-center) .cheque-register {
    width: max(100%, 1520px);
  }

  .content:has(.banking-command-center) .cheque-row-actions {
    grid-template-columns: 1fr;
  }

  .content:has(.banking-command-center) .cheque-row-actions .btn {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .content:has(.banking-command-center) .banking-primary-nav,
  .content:has(.banking-command-center) .cheque-queue-nav {
    margin-inline: -4px;
  }

  .content:has(.banking-command-center) .banking-primary-nav button,
  .content:has(.banking-command-center) .cheque-queue-nav button {
    min-height: 44px;
  }
}

/* Approved Cheque Management workspace, 2026-08-04. */
.banking-detail-shell { padding: 0 4px 20px; }
.banking-detail-shell > [data-banking-home] { margin: 8px 0 12px; color: #0867f2; }
.banking-detail-shell .cheque-management-panel { padding: 20px 22px; border: 1px solid #d8e1ec; border-radius: 14px; background: #fff; box-shadow: 0 2px 8px rgba(11,31,58,.04); }
.banking-detail-shell .cheque-management-panel::before { display:none; content:none; }
.banking-detail-shell .cheque-management-head { display:flex; align-items:center; justify-content:space-between; margin:0 0 18px; padding:0; border:0; }
.banking-detail-shell .cheque-management-head::before { display:none; content:none; }
.cheque-identity { display:flex; align-items:center; gap:16px; }
.cheque-identity-icon { display:grid; place-items:center; width:60px; height:60px; flex:0 0 60px; border-radius:10px; background:#0867f2; color:#fff; }
.cheque-identity-icon svg { width:30px; height:30px; }
.cheque-identity h2 { margin:0 0 4px; color:#0b1f3a; font-size:24px; line-height:1.15; }
.cheque-identity p { margin:0; color:#536987; font-size:15px; }
.cheque-receive-button { display:inline-flex; align-items:center; gap:10px; min-height:46px; padding:0 18px; border:0; border-radius:8px; background:#0867f2; color:#fff; font:inherit; font-weight:700; cursor:pointer; }
.cheque-receive-button:hover { background:#075bd6; }
.cheque-receive-button svg { width:20px; }
.cheque-kpi-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:18px; }
.cheque-kpi { display:flex; align-items:center; gap:18px; min-height:112px; padding:18px 20px; border:1px solid #d8e1ec; border-radius:10px; color:#0867f2; }
.cheque-kpi > span { display:grid; place-items:center; width:62px; height:62px; flex:0 0 62px; border:1.5px solid currentColor; border-radius:50%; }
.cheque-kpi > span svg { width:28px; height:28px; }
.cheque-kpi div { min-width:0; }
.cheque-kpi small { display:block; margin-bottom:4px; color:#102544; font-size:14px; }
.cheque-kpi strong { display:block; overflow:hidden; color:currentColor; font-size:25px; line-height:1.1; text-overflow:ellipsis; white-space:nowrap; }
.cheque-kpi p { margin:5px 0 0; color:#536987; font-size:14px; }
.cheque-kpi.amber { color:#d97706; }.cheque-kpi.cyan { color:#009dc7; }.cheque-kpi.red { color:#df172c; }
.banking-detail-shell .cheque-queue-nav { display:flex; align-items:stretch; overflow-x:auto; gap:0; width:max-content; max-width:100%; margin:0 0 12px; padding:0; border:1px solid #d8e1ec; border-radius:5px; background:#fff; }
.banking-detail-shell .cheque-queue-nav button { display:inline-flex; align-items:center; gap:7px; flex:0 0 auto; min-height:38px; padding:7px 20px; border:0; border-right:1px solid #d8e1ec; border-radius:0; background:#fff; color:#102544; font:inherit; font-size:13px; font-weight:600; white-space:nowrap; cursor:pointer; }
.banking-detail-shell .cheque-queue-nav button:last-child { border-right:0; }
.banking-detail-shell .cheque-queue-nav button strong { display:inline; min-width:auto; min-height:auto; padding:0; border-radius:0; background:transparent; color:inherit; font-size:13px; }
.banking-detail-shell .cheque-queue-nav button.active { box-shadow:inset 0 -2px #0867f2; background:#f3f8ff; color:#0867f2; }
.banking-detail-shell .cheque-queue-nav button.active strong { background:transparent; color:inherit; }
.banking-detail-shell .cheque-register-filters { display:grid; grid-template-columns:minmax(260px,440px) auto 1fr; align-items:center; justify-content:start; gap:12px; margin-bottom:10px; }
.cheque-search { display:flex!important; align-items:center; gap:10px; width:100%!important; min-height:44px; padding:0 14px; border:1px solid #d8e1ec; border-radius:8px; font-weight:400!important; }
.cheque-search svg { width:20px; color:#536987; }.cheque-search input { width:100%; min-height:40px!important; padding:0!important; border:0!important; outline:0; }
.cheque-toolbar-buttons { display:flex; gap:10px; }.cheque-tool-button { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:0 16px; border:1px solid #d8e1ec; border-radius:8px; background:#fff; color:#102544; font:inherit; font-weight:600; cursor:pointer; }.cheque-tool-button svg{width:18px}.cheque-tool-button:disabled{opacity:.45;cursor:not-allowed}
.cheque-result-count { justify-self:end; color:#102544; font-size:14px; }
.banking-detail-shell .cheque-register-wrap { width:100%; max-width:100%; overflow:hidden; border:1px solid #d8e1ec; border-radius:10px; }
.banking-detail-shell .cheque-register { width:100%; min-width:0; table-layout:fixed; border-collapse:collapse; }
.banking-detail-shell .cheque-register th { position:static; height:37px; padding:8px 16px; background:#f5f8fc; color:#28466f; font-size:12px; text-align:left; text-transform:uppercase; white-space:nowrap; }
.banking-detail-shell .cheque-register td { height:42px; padding:8px 16px; overflow:hidden; border-top:1px solid #e5ebf3; color:#102544; font-size:14px; text-overflow:ellipsis; white-space:nowrap; vertical-align:middle; }
.banking-detail-shell .cheque-register th:nth-child(1){width:12%}.banking-detail-shell .cheque-register th:nth-child(2){width:18%}.banking-detail-shell .cheque-register th:nth-child(3){width:17%}.banking-detail-shell .cheque-register th:nth-child(4){width:17%}.banking-detail-shell .cheque-register th:nth-child(5){width:13%;text-align:right}.banking-detail-shell .cheque-register th:nth-child(6){width:13%}.banking-detail-shell .cheque-register th:nth-child(7){width:10%}
.cheque-row-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.cheque-deposit-button { min-width:90px; height:30px; border:1px solid #0867f2; border-radius:5px; background:#fff; color:#075bd6; font:inherit; font-size:13px; cursor:pointer; }
.cheque-action-menu { position:relative; }.cheque-action-menu summary { display:grid; place-items:center; width:28px; height:30px; list-style:none; color:#102544; font-size:24px; cursor:pointer; }.cheque-action-menu summary::-webkit-details-marker{display:none}.cheque-action-menu div { position:absolute; z-index:20; top:34px; right:0; width:210px; padding:6px; border:1px solid #d8e1ec; border-radius:8px; background:#fff; box-shadow:0 10px 30px rgba(11,31,58,.16); }.cheque-action-menu button { display:block; width:100%; padding:9px 10px; border:0; border-radius:5px; background:#fff; color:#102544; text-align:left; cursor:pointer; }.cheque-action-menu button:hover{background:#f3f8ff}.cheque-action-menu button.danger{color:#c41225}
.cheque-action-menu .cheque-action-trigger { display:grid; place-items:center; width:28px; height:30px; padding:0; border:0; background:transparent; color:#102544; font-size:24px; line-height:1; cursor:pointer; }
.cheque-action-menu .cheque-action-trigger:hover,.cheque-action-menu .cheque-action-trigger:focus-visible,.cheque-action-menu .cheque-action-trigger[aria-expanded="true"]{background:#edf4ff;color:#075bd6;outline:none}
.cheque-action-menu > div[hidden] { display:none !important; }
.cheque-action-menu > .cheque-action-popover { position:fixed; z-index:2200; right:auto; bottom:auto; max-height:min(360px,calc(100vh - 24px)); overflow-y:auto; padding:8px; border:1px solid #dbe4ef; border-radius:10px; background:#fff; box-shadow:0 14px 32px rgba(15,35,70,.18); }
.banking-detail-shell .cheque-accounting-note { display:flex; align-items:center; gap:12px; min-height:42px; margin:12px 0 0; padding:8px 14px; border:1px solid #b8d5ff; border-radius:6px; background:#f3f8ff; color:#174f9e; font-size:14px; }.cheque-accounting-note svg{width:20px;flex:0 0 20px}
.cheque-filter-dialog{max-width:720px}.cheque-filter-dialog .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:1279px){.cheque-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.banking-detail-shell .cheque-register-wrap{overflow-x:auto}.banking-detail-shell .cheque-register{width:1050px}}
@media(max-width:767px){.banking-detail-shell{padding-inline:0}.banking-detail-shell .cheque-management-panel{padding:16px}.banking-detail-shell .cheque-management-head{align-items:stretch}.cheque-identity-icon{width:52px;height:52px;flex-basis:52px}.cheque-identity h2{font-size:21px}.cheque-receive-button{width:100%;justify-content:center}.cheque-kpi-grid{grid-template-columns:1fr}.banking-detail-shell .cheque-register-filters{grid-template-columns:1fr}.cheque-toolbar-buttons{grid-row:2}.cheque-result-count{grid-row:2;justify-self:end}.cheque-filter-dialog .form-grid{grid-template-columns:1fr}}
