:root {
  --psi-bg: #eef3f9;
  --psi-panel: #ffffff;
  --psi-line: #d9e2ef;
  --psi-muted: #6f7e95;
  --psi-text: #1f2a3a;
  --psi-brand: #2563eb;
  --psi-brand-soft: #eaf2ff;
  --psi-a4-content-width: 190mm;
}

body.psi-admin {
  background:
    radial-gradient(1000px 360px at 95% 5%, #e4edff 0, transparent 60%),
    linear-gradient(180deg, #f6f9ff 0%, var(--psi-bg) 100%);
  color: var(--psi-text);
}

.psi-admin #appSidebar {
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%) !important;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .05);
}

.psi-admin #appSidebar .btn.btn-dark {
  background: transparent;
  border-color: rgba(255, 255, 255, .08);
  color: #d9e4f3;
}

.psi-admin #appSidebar .btn.btn-dark:hover {
  background: rgba(255, 255, 255, .07);
}

.psi-admin #appSidebar .nav-link {
  margin: 2px 0;
  transition: all .18s ease;
}

.psi-admin #appSidebar .nav-link:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, .08);
}

.psi-admin #appSidebar .nav-link.bg-primary {
  background: linear-gradient(90deg, #2563eb 0, #3b82f6 100%) !important;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .35);
}

.psi-admin #appSidebar .bi {
  font-size: .92rem;
}

.psi-admin .navbar {
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, .88) !important;
}

.psi-admin .navbar .btn {
  border-radius: 10px;
}

.psi-admin .navbar a[title="首页"] {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-color: #c8d5ea;
  background: #f8fbff;
  color: #31507a;
}

.psi-admin .navbar a[title="首页"]:hover {
  background: #edf4ff;
  border-color: #9ab6df;
}

.psi-admin .navbar .badge {
  background: linear-gradient(90deg, #64748b 0, #475569 100%) !important;
  border-radius: 999px;
  padding: .42rem .62rem;
}

.psi-admin section.container-fluid.py-3 {
  padding: 1.1rem 1.25rem !important;
}

.page-card {
  border: 1px solid #e6edf8;
  border-radius: 14px;
  background: var(--psi-panel);
  box-shadow: 0 6px 18px rgba(17, 24, 39, .05) !important;
  padding: 1rem;
}

.page-card h1,
.page-card h2,
.page-card h3,
.page-card h4,
.page-card h5 {
  color: #1e2f49;
}

.page-card .form-label {
  color: #4b5f7f;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: .35rem;
}

.page-card .card-body {
  padding: 0;
}

.page-card .form-control,
.page-card .form-select {
  border-color: #ced8e8;
}

.page-card .form-control:focus,
.page-card .form-select:focus {
  border-color: #8fb1ff;
  box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .15);
}

.page-card .btn.btn-outline-secondary {
  border-color: #c9d5e7;
  color: #415169;
  background: #fff;
}

.page-card .btn.btn-outline-secondary:hover {
  border-color: #95add1;
  color: #274162;
  background: #f8fbff;
}

.page-card .btn.btn-primary {
  background: linear-gradient(90deg, #2563eb 0, #3b82f6 100%);
  border-color: #2563eb;
}

.page-card .btn.btn-primary:hover {
  background: linear-gradient(90deg, #1d4ed8 0, #2563eb 100%);
  border-color: #1d4ed8;
}

.page-card .table {
  margin-bottom: 0;
}

.page-card .table thead th {
  background: #f6f9ff;
  color: #4a5b77;
  border-color: #dbe4f2;
  font-weight: 600;
  font-size: .82rem;
  white-space: nowrap;
}

.page-card .table td {
  border-color: #e6edf8;
  color: #243247;
  font-size: .89rem;
}

.page-card .table tbody tr:hover {
  --bs-table-accent-bg: #f2f7ff;
}

#pager {
  padding-top: .35rem;
}

#pager .badge {
  min-width: 2.1rem;
}

#pager .form-control,
#pager .form-select {
  min-height: 31px;
}

#pager .pager-jump-input {
  width: 76px;
}

.modal-content {
  border: 1px solid #d8e1ef;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, .18);
}

.modal-header {
  border-bottom-color: #e4ebf6;
  background: #f9fbff;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

.modal-footer {
  border-top-color: #e4ebf6;
  background: #fbfdff;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

.nav-tabs {
  border-bottom-color: #d8e4f5;
}

.nav-tabs .nav-link {
  color: #526686;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.nav-tabs .nav-link.active {
  color: #1d4ed8;
  font-weight: 600;
  border-color: #d8e4f5 #d8e4f5 #fff;
}

.psi-login {
  min-height: 100vh;
  background:
    radial-gradient(1100px 380px at 85% 100%, #dce7fb 0, transparent 60%),
    linear-gradient(180deg, #eef4ff 0, #e8f0fb 100%);
}

.psi-login .card {
  border-radius: 18px;
  border: 1px solid #d6e0f0;
  box-shadow: 0 18px 48px rgba(30, 64, 175, .12) !important;
}

.psi-login .card-body {
  padding: 2rem 2.1rem;
}

.psi-login .display-5 {
  letter-spacing: .2px;
  color: #0f2f67;
}

.psi-login .lead {
  color: #506a94 !important;
}

.psi-login .input-group-text {
  border-color: #d2ddef;
  color: #7f93b4;
}

.psi-login .form-control {
  border-color: #d2ddef;
}

.psi-login .form-control:focus {
  border-color: #8fb1ff;
  box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .15);
}

.psi-login #captchaView {
  border-color: #d2ddef !important;
}

.psi-login .login-captcha-img {
  height: 38px;
  width: 110px;
  cursor: pointer;
  object-fit: cover;
}

/* order form polish */
#prosBody input.form-control {
  min-width: 88px;
}

#allGoodsList,
#selectedGoodsList {
  max-height: 360px;
  overflow: auto;
}

.bill-sheet-card {
  width: var(--psi-a4-content-width);
  max-width: 100%;
}

.bill-sheet-card .table {
  width: 100%;
  border-collapse: collapse;
}

.bill-sheet-card .table-responsive {
  /* border:1px solid #dbe5f3 !important; */
}

.bill-sheet-card .table,
.bill-sheet-card .table-bordered {
  border-color: #dbe5f3 !important;
}

.bill-sheet-card .table> :not(caption)>*>*,
.bill-sheet-card .table-bordered> :not(caption)>*>* {
  border-color: #dbe5f3 !important;
  border-width: 1px !important;
}

.bill-sheet-card .bill-head-item {
  display: flex;
  align-items: center;
  gap: .42rem;
  min-width: 0;
  flex-wrap: nowrap;
}

.bill-sheet-card .bill-head-item .form-label {
  margin-bottom: 0;
  white-space: nowrap;
  flex: 0 0 auto;
}

.bill-sheet-card .bill-head-item .form-control,
.bill-sheet-card .bill-head-item .form-select {
  flex: 1 1 auto;
  min-width: 0;
}

.bill-sheet-card .bill-tail-item {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: nowrap;
}

.bill-sheet-card .bill-tail-item .form-label {
  margin-bottom: 0;
  white-space: nowrap;
  flex: 0 0 auto;
}

.bill-sheet-card .bill-tail-item .form-control {
  flex: 1 1 auto;
  min-width: 0;
}

/* print keeps clean white sheet */
@media print {
  body {
    background: #fff !important;
  }

  #appSidebar,
  .navbar,
  .col-xl-3,
  .btn,
  .modal,
  .d-flex.align-items-center.gap-2.mb-3 {
    display: none !important;
  }

  .col-xl-9 {
    width: 100% !important;
  }

  .page-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .bill-sheet-card {
    width: var(--psi-a4-content-width) !important;
    max-width: var(--psi-a4-content-width) !important;
    margin: 0 auto !important;
  }

  .bill-sheet-card .row {
    --bs-gutter-x: .6rem !important;
    --bs-gutter-y: .35rem !important;
  }

  .bill-sheet-card .bill-head-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2.5mm 2.5mm !important;
  }

  .bill-sheet-card .bill-head-grid>[class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  .bill-sheet-card .bill-head-grid .form-label {
    margin-bottom: 0 !important;
    white-space: nowrap !important;
  }

  .bill-sheet-card .bill-head-item,
  .bill-sheet-card .bill-tail-item {
    flex-wrap: nowrap !important;
  }

  .bill-sheet-card .table {
    table-layout: fixed;
    border-collapse: collapse !important;
    border-color: #dbe5f3 !important;
  }

  .bill-sheet-card .table> :not(caption)>*>*,
  .bill-sheet-card .table-bordered> :not(caption)>*>* {
    border-color: #dbe5f3 !important;
    border-width: 1px !important;
  }

  .bill-sheet-card,
  .bill-sheet-card * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .bill-sheet-card .form-control,
  .bill-sheet-card .form-select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    padding: .08rem .22rem !important;
    line-height: 1.2 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }

  .bill-sheet-card .form-select {
    background-image: none !important;
    padding-right: .22rem !important;
  }

  .bill-sheet-card input[type="date"] {
    -webkit-appearance: none !important;
    appearance: none !important;
  }

  .bill-sheet-card input[type="date"]::-webkit-calendar-picker-indicator {
    display: none !important;
    opacity: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .bill-sheet-card .form-control::placeholder,
  .bill-sheet-card .form-select::placeholder {
    color: transparent !important;
  }
}

@media (max-width: 992px) {
  .psi-admin #appSidebar {
    min-width: 240px;
  }

  .psi-admin section.container-fluid.py-3 {
    padding: 1rem !important;
  }
}


/* unified toolbar + action strip */
.page-card .toolbar {
  background: linear-gradient(180deg, #f8fbff 0, #f3f7ff 100%);
  border: 1px solid #dce6f5;
  border-radius: 12px;
  padding: .65rem .75rem;
  margin-bottom: .9rem !important;
}

.page-card .toolbar .btn,
.page-card .toolbar .form-control,
.page-card .toolbar .form-select,
.page-card .toolbar .input-group-text {
  min-height: 33px;
}

.page-card .toolbar .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: .42rem .78rem;
  border-radius: .2rem;
}

.page-card .toolbar .btn-group > .btn {
  border-radius: 0;
}

.page-card .toolbar .btn-group > .btn:first-child {
  border-top-left-radius: .2rem;
  border-bottom-left-radius: .2rem;
}

.page-card .toolbar .btn-group > .btn:last-child {
  border-top-right-radius: .2rem;
  border-bottom-right-radius: .2rem;
}

.page-card .toolbar .form-control,
.page-card .toolbar .form-select {
  background: #fff;
}

.top-toolbar {
  background: linear-gradient(180deg, #f8fbff 0, #f3f7ff 100%);
  border: 1px solid #dce6f5;
  border-radius: 12px;
  padding: .55rem .75rem;
}

.top-toolbar h5 {
  margin-bottom: 0;
}

.page-card .table-responsive {
  /* border:1px solid #dee7f4 !important;
  border-radius:12px !important;
  overflow:hidden; */
  background: #fff;
}

.page-card .table-responsive .table {
  border: none;
}

.page-card .table td,
.page-card .table th {
  vertical-align: middle;
}

.page-card .table td .btn.btn-link {
  font-weight: 600;
}

#pager {
  border-top: 1px solid #e8eef8;
  margin-top: .8rem !important;
  padding-top: .8rem !important;
}

#pager .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: .25rem .65rem;
}

#pager .pagination .page-link {
  color: #3a4f73;
  border-color: #cfdcf0;
  min-width: 2.25rem;
  text-align: center;
}

#pager .pagination .page-item.active .page-link {
  background: linear-gradient(90deg, #2563eb 0, #3b82f6 100%);
  border-color: #2563eb;
}

#pager .input-group-text {
  color: #60748f;
  border-color: #cfdcf0;
  background: #f7faff;
}

/* index quick entry */
.psi-admin .page-entry .btn {
  border-radius: 12px;
  min-height: 44px;
  font-weight: 600;
}

/* order form page */
#prosBody .form-control {
  min-height: 31px;
}

#prosBody tr:hover {
  --bs-table-accent-bg: #f2f7ff;
}

/* strengthen left menu readability */
.psi-admin #appSidebar .small.text-secondary {
  color: #94a3b8 !important;
  font-weight: 600;
  letter-spacing: .2px;
}

.psi-admin #appSidebar .nav-link {
  font-size: .94rem;
}

/* mobile spacing */
@media (max-width: 768px) {
  .page-card .toolbar {
    padding: .55rem;
  }

  .page-card .toolbar .form-control,
  .page-card .toolbar .form-select {
    width: 100% !important;
  }
}

/* ===== Modern Refresh ===== */
:root {
  --psi-bg-soft: #f4f7fb;
  --psi-surface: #ffffff;
  --psi-text-main: #1e293b;
  --psi-text-sub: #64748b;
  --psi-line-soft: #e2e8f0;
  --psi-brand-600: #2563eb;
  --psi-brand-500: #3b82f6;
  --psi-sidebar-top: #111827;
  --psi-sidebar-bottom: #0b1220;
}

body.psi-admin {
  background:
    radial-gradient(920px 320px at 88% -8%, rgba(59, 130, 246, .15) 0, rgba(59, 130, 246, 0) 60%),
    linear-gradient(180deg, #f8faff 0%, var(--psi-bg-soft) 100%) !important;
  color: var(--psi-text-main);
}

.psi-admin #appSidebar {
  min-width: 244px;
  width: 244px;
  background: linear-gradient(180deg, var(--psi-sidebar-top) 0%, var(--psi-sidebar-bottom) 100%) !important;
  border-right: 1px solid rgba(148, 163, 184, .16);
}

.psi-admin #appSidebar .border-bottom {
  border-color: rgba(148, 163, 184, .2) !important;
}

.psi-admin #appSidebar .fw-bold {
  letter-spacing: .2px;
}

.psi-admin #appSidebar .btn.btn-dark {
  border-radius: 10px;
  border-color: transparent;
  background: rgba(148, 163, 184, .12);
  color: #dbeafe;
}

.psi-admin #appSidebar .btn.btn-dark:hover {
  background: rgba(148, 163, 184, .22);
}

.psi-admin #appSidebar .nav-link {
  color: #cbd5e1 !important;
  border-radius: 10px;
  padding-top: .45rem !important;
  padding-bottom: .45rem !important;
  font-weight: 500;
}

.psi-admin #appSidebar .nav-link:hover {
  color: #f8fafc !important;
  background: rgba(148, 163, 184, .2) !important;
}

.psi-admin #appSidebar .nav-link.bg-primary {
  color: #ffffff !important;
  background: linear-gradient(90deg, var(--psi-brand-600) 0%, var(--psi-brand-500) 100%) !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .35);
}

.psi-admin #appSidebar .small.text-secondary {
  color: #93a6c0 !important;
  font-size: .76rem !important;
  letter-spacing: .25px;
}

.psi-admin .navbar {
  min-height: 58px;
  background: rgba(255, 255, 255, .9) !important;
  border-bottom: 1px solid #dde6f3 !important;
  backdrop-filter: blur(10px);
}

.psi-admin .navbar .badge {
  font-weight: 500;
}

.psi-admin section.container-fluid.py-3 {
  padding: 1.15rem 1.35rem !important;
}

.page-card {
  border: 1px solid #e5edf7 !important;
  border-radius: 14px !important;
  background: var(--psi-surface) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06) !important;
}

.top-toolbar {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  border: 1px solid #e3ebf8 !important;
  border-radius: 12px !important;
  padding: .62rem .82rem !important;
}

.page-card .toolbar {
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9ff 100%) !important;
  border: 1px solid #e4ebf7 !important;
  border-radius: 12px !important;
  padding: .68rem .82rem !important;
}

.page-card .toolbar .btn {
  border-radius: .2rem;
  font-weight: 500;
}

.page-card .toolbar .btn-group .btn {
  border-radius: 0;
}

.page-card .toolbar .btn-group .btn:first-child {
  border-top-left-radius: .2rem;
  border-bottom-left-radius: .2rem;
}

.page-card .toolbar .btn-group .btn:last-child {
  border-top-right-radius: .2rem;
  border-bottom-right-radius: .2rem;
}

.page-card .toolbar .form-control,
.page-card .toolbar .form-select {
  border-color: #d7e2f1;
  background: #fff;
}

.page-card .table-responsive {
  border: 1px solid #e2eaf6 !important;
  border-radius: 12px !important;
  overflow: hidden;
}

.page-card .table {
  margin-bottom: 0;
}

.page-card .table thead th {
  background: #f7faff;
  color: #52627b;
  font-size: .82rem;
  letter-spacing: .15px;
  border-bottom-color: #dbe5f3;
}

.page-card .table tbody td {
  color: #243247;
  border-color: #e8eef8;
}

.page-card .table-striped>tbody>tr:nth-of-type(odd)>* {
  --bs-table-accent-bg: #fcfdff;
}

.page-card .table-hover>tbody>tr:hover>* {
  --bs-table-accent-bg: #f2f7ff;
}

.page-card .table td .btn-link {
  color: #1d4ed8;
}

#pager {
  border-top: 1px solid #e6edf8 !important;
}

#pager .pagination .page-link {
  background: #fff;
  border-color: #d6e2f2;
  color: #43536d;
}

#pager .pagination .page-item.active .page-link {
  color: #fff;
  background: linear-gradient(90deg, var(--psi-brand-600) 0%, var(--psi-brand-500) 100%);
  border-color: var(--psi-brand-600);
}

#pager .input-group-text {
  background: #f8fbff;
  color: #64748b;
}

.modal-content {
  border: 1px solid #e2eaf6 !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .2) !important;
}

.modal-header {
  background: #f8fbff !important;
  border-bottom: 1px solid #e3ebf8 !important;
}

.modal-footer {
  background: #fbfdff !important;
  border-top: 1px solid #e3ebf8 !important;
}

/* order form visual polish */
.bill-sheet-card {
  border: 1px solid #dde7f6 !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .08) !important;
}

.bill-sheet-card #companyName {
  font-weight: 700;
  color: #1f2e44;
}

.bill-sheet-card #companyAddr {
  color: #6b7f98 !important;
}

.bill-sheet-card #billTitle {
  color: #1f2e44;
  letter-spacing: .3rem;
  font-weight: 700;
}

.bill-sheet-card .form-control,
.bill-sheet-card .form-select {
  border-color: #d4e0f0;
}

.bill-sheet-card .table thead th {
  background: #f7faff;
}

.bill-sheet-card .table tfoot td {
  background: #fcfdff;
}

/* cleaner focus ring */
.btn:focus,
.btn:focus-visible,
.page-link:focus,
.form-control:focus,
.form-select:focus {
  outline: 0 !important;
  box-shadow: 0 0 0 .12rem rgba(37, 99, 235, .16) !important;
}

@media (max-width: 1200px) {
  .psi-admin #appSidebar {
    min-width: 224px;
    width: 224px;
  }
}

@media (max-width: 992px) {
  .psi-admin #appSidebar {
    width: 240px;
    min-width: 240px;
  }

  .psi-admin section.container-fluid.py-3 {
    padding: 1rem !important;
  }
}

/* ===== Minimal Light Tuning ===== */
body.psi-admin {
  background:
    radial-gradient(820px 280px at 88% -10%, rgba(59, 130, 246, .1) 0, rgba(59, 130, 246, 0) 62%),
    linear-gradient(180deg, #fbfdff 0%, #f5f8fc 100%) !important;
}

.psi-admin #appSidebar {
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%) !important;
  border-right-color: rgba(148, 163, 184, .12);
}

.psi-admin #appSidebar .nav-link {
  color: #c9d4e5 !important;
}

.psi-admin #appSidebar .nav-link:hover {
  background: rgba(148, 163, 184, .16) !important;
}

.psi-admin #appSidebar .nav-link.bg-primary {
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%) !important;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .28);
}

.psi-admin .navbar {
  background: rgba(255, 255, 255, .96) !important;
  border-bottom-color: #e6edf7 !important;
}

.page-card {
  border-color: #e9eff8 !important;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .045) !important;
}

.top-toolbar {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%) !important;
  border-color: #e8eef8 !important;
}

.page-card .toolbar {
  background: linear-gradient(180deg, #fcfdff 0%, #f8faff 100%) !important;
  border-color: #e8eef8 !important;
}

.page-card .btn.btn-outline-secondary {
  border-color: #d8e2f1;
  color: #4a5b73;
  background: #fff;
}

.page-card .btn.btn-outline-secondary:hover {
  border-color: #c7d6ec;
  color: #33445f;
  background: #f8fbff;
}

.page-card .btn.btn-primary {
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
  border-color: #3b82f6;
}

.page-card .btn.btn-primary:hover {
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
  border-color: #2563eb;
}

.page-card .table-responsive {
  border-color: #e7eef8 !important;
}

.page-card .table thead th {
  background: #f9fbff;
  color: #5a6980;
  border-bottom-color: #e3ebf7;
}

.page-card .table tbody td {
  border-color: #edf2fa;
}

#pager {
  border-top-color: #eaf0f8 !important;
}

#pager .pagination .page-link {
  border-color: #dde7f5;
  color: #51617a;
}

.modal-content {
  border-color: #e6edf8 !important;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .16) !important;
}

.bill-sheet-card {
  border-color: #e4ecf8 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06) !important;
}

.bill-sheet-card #companyAddr {
  color: #74879f !important;
}

.btn:focus,
.btn:focus-visible,
.page-link:focus,
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 .1rem rgba(59, 130, 246, .14) !important;
}

/* ===== Final Typography Tuning ===== */
body,
.btn,
.form-control,
.form-select,
.table {
  font-size: .875rem;
}

.psi-admin #appSidebar .fw-bold {
  font-size: 1.02rem;
  font-weight: 700;
}

.psi-admin #appSidebar .nav-link {
  font-size: .9rem !important;
  font-weight: 500;
  letter-spacing: .05px;
}

.psi-admin #appSidebar .small.text-secondary {
  font-size: .74rem !important;
  font-weight: 600;
}

.psi-admin .navbar .badge {
  font-size: .78rem;
  font-weight: 500;
}

.top-toolbar h5 {
  font-size: 1rem;
  font-weight: 650;
  color: #32455f;
}

.page-card .toolbar .btn {
  font-size: .82rem;
  font-weight: 550;
}

.page-card .toolbar .text-secondary.small {
  font-size: .76rem !important;
}

.page-card .table thead th {
  font-size: .79rem;
  font-weight: 650;
}

.page-card .table tbody td {
  font-size: .86rem;
  font-weight: 450;
}

#pager {
  font-size: .82rem;
}

#pager .small,
#pager .input-group-text,
#pager .page-link {
  font-size: .8rem;
}

.modal-title {
  font-size: 1rem;
  font-weight: 650;
}

.modal-body .form-label {
  font-size: .8rem;
  font-weight: 600;
}

.bill-sheet-card #companyName {
  font-size: 1.55rem;
  letter-spacing: .1px;
}

.bill-sheet-card #billTitle {
  font-size: 1.38rem;
  letter-spacing: .22rem;
}

.bill-sheet-card .form-label {
  font-size: .8rem;
  font-weight: 600;
}

.bill-sheet-card .table thead th {
  font-size: .79rem;
}

/* list page table tuning */
.page-card:not(.bill-sheet-card) .table.table-sm thead th,
.page-card:not(.bill-sheet-card) .table.table-sm tbody td {
  font-size: 12px !important;
}

.page-card:not(.bill-sheet-card) .table.table-sm> :not(caption)>*>* {
  padding: .58rem .55rem;
  line-height: 1.34;
}

.page-card:not(.bill-sheet-card) .table.table-sm thead th {
  border-bottom-color: #e9eff8 !important;
}

/* toast emphasis */
#toastStack {
  z-index: 1095 !important;
}

#toastStack .toast {
  min-width: 300px;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .22) !important;
}

#toastStack .toast .toast-body {
  font-size: .9rem;
  padding: .72rem .85rem;
}

#toastStack .toast .toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  font-size: .78rem;
  line-height: 1;
}

#toastStack .toast .toast-icon i {
  font-size: .78rem;
}

#toastStack .toast-success {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
  color: #fff;
}

#toastStack .toast-error {
  background: linear-gradient(90deg, #ea580c 0%, #ef4444 100%);
  color: #fff;
}

#toastStack .toast-info {
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
  color: #fff;
}

#toastStack .toast-warning {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
  color: #1f2937;
}

#toastStack .toast-success .btn-close,
#toastStack .toast-error .btn-close,
#toastStack .toast-info .btn-close {
  filter: invert(1) grayscale(100%) brightness(180%);
}

#toastStack .toast-error .btn-close {
  filter: invert(1) grayscale(100%) brightness(180%);
}

#toastStack .toast-warning .btn-close {
  filter: none;
}

/* content text safety guard (avoid white text on white backgrounds) */
.psi-admin main,
.psi-admin main .page-card,
.psi-admin main .card-body,
.psi-admin main .table,
.psi-admin main .table td,
.psi-admin main .table th,
.psi-admin main .form-label,
.psi-admin main .form-control,
.psi-admin main .form-select {
  color: #243247;
}

.psi-admin main .text-secondary {
  color: #64748b !important;
}

.psi-admin main .btn.btn-outline-secondary {
  color: #4a5b73;
}

.psi-admin main .btn.btn-link {
  color: #1d4ed8;
}

.psi-admin main .text-white,
.psi-admin main .text-white-50 {
  color: inherit !important;
  opacity: 1 !important;
}

/* stock alarm badge colors */
.alarm-badge {
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
  padding: .42em .72em;
}

.alarm-badge.alarm-zhengchang {
  color: #166534;
  background: #dcfce7;
}

.alarm-badge.alarm-buzu {
  color: #b91c1c;
  background: #fee2e2;
}

.alarm-badge.alarm-guoliang {
  color: #92400e;
  background: #fef3c7;
}

/* list layout alignment + single bottom border */
.page-card:not(.bill-sheet-card) .toolbar,
.page-card:not(.bill-sheet-card) .table-responsive {
  width: 100%;
  box-sizing: border-box;
}

.page-card:not(.bill-sheet-card) .row.toolbar {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.page-card:not(.bill-sheet-card) #pager {
  border-top: 0 !important;
  margin-top: .55rem !important;
  padding-top: .3rem !important;
}

.page-card:not(.bill-sheet-card) .table-responsive .table {
  border: 0 !important;
}

.page-card:not(.bill-sheet-card) .table tbody tr:last-child>* {
  border-bottom: 0 !important;
}

@page {
  size: A4 portrait;
  margin: 8mm;
}

@media print {

  html,
  body {
    background: #fff !important;
  }

  .bill-sheet-card {
    background: #fff !important;
    overflow: hidden !important;
  }

  .bill-sheet-card .table,
  .bill-sheet-card .table th,
  .bill-sheet-card .table td {
    background: #fff !important;
  }

  .bill-sheet-card .bill-head-item .form-control,
  .bill-sheet-card .bill-head-item .form-select,
  .bill-sheet-card .bill-tail-item .form-control {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

/* final print hard override */
@media print {

  html,
  body,
  .container-fluid,
  .container-fluid>.row,
  .container-fluid>.row>main,
  .container-fluid>.row>main>section,
  .container-fluid>.row>main>section>.row,
  .container-fluid>.row>main>section>.row>.col-xl-9 {
    background: #fff !important;
  }

  .container-fluid>.row>main>section {
    padding: 0 !important;
    margin: 0 !important;
  }

  .bill-sheet-card,
  .bill-sheet-card.page-card,
  .bill-sheet-card .table-responsive {
    background: #fff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .bill-sheet-card.page-card {
    border: 0 !important;
    padding: 0 !important;
  }

  .bill-sheet-card .table-responsive {
    border: 1px solid #dbe5f3 !important;
  }

  .bill-sheet-card .table,
  .bill-sheet-card .table th,
  .bill-sheet-card .table td {
    color: #111827 !important;
    background: #fff !important;
  }

  .bill-sheet-card .form-select.print-empty {
    color: transparent !important;
    text-shadow: none !important;
  }
}

/* final form table border fix: avoid double borders in in/out/cancel forms */
.bill-sheet-card .table-responsive {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.bill-sheet-card .table.table-bordered {
  border: 1px solid #dbe5f3 !important;
  border-collapse: collapse !important;
}

.bill-sheet-card .table.table-bordered> :not(caption)>*>* {
  border: 1px solid #dbe5f3 !important;
}

@media print {
  .bill-sheet-card .table-responsive {
    border: 0 !important;
  }

  .bill-sheet-card .table.table-bordered {
    border: 1px solid #dbe5f3 !important;
  }
}

/* ===== 2026-04 UI refresh layer (high priority) ===== */
:root {
  --psi-bg: #f3f7fc;
  --psi-panel: #ffffff;
  --psi-panel-soft: #f8fbff;
  --psi-line: #e4ebf5;
  --psi-line-strong: #d7e1ef;
  --psi-text: #1f2f45;
  --psi-text-soft: #607189;
  --psi-brand: #2563eb;
  --psi-brand-weak: #eff5ff;
  --psi-sidebar-bg: linear-gradient(180deg, #2f3d50 0%, #354559 44%, #3b4c61 100%);
}

body.psi-admin {
  background: linear-gradient(180deg, #f5f9ff 0%, #f2f6fc 100%) !important;
  color: var(--psi-text);
}

.psi-admin #appSidebar {
  background: var(--psi-sidebar-bg) !important;
  border-right: 1px solid rgba(255, 255, 255, .09);
}

.psi-admin #appSidebar .fw-bold {
  color: #f4f7fe !important;
  letter-spacing: .3px;
}

.psi-admin #appSidebar #sidebarToggleBtn {
  border-color: rgba(255, 255, 255, .2);
  color: #e8eef9;
}

.psi-admin #appSidebar #sidebarToggleBtn:hover {
  background: rgba(255, 255, 255, .11);
  border-color: rgba(255, 255, 255, .3);
}

.psi-admin #appSidebar .menu-group-toggle {
  background: rgba(255, 255, 255, .04) !important;
  border: 1px solid transparent !important;
  color: #ebf1fb !important;
  border-radius: 12px;
  padding: .52rem .65rem;
  font-size: .91rem;
  font-weight: 600;
}

.psi-admin #appSidebar .menu-group-toggle .menu-icon-badge {
  width: 1.24rem;
  height: 1.24rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .36rem;
  background: rgba(255, 255, 255, .13);
  color: #eef4ff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.psi-admin #appSidebar .menu-group-toggle .menu-icon-badge i {
  font-size: .78rem;
}

.psi-admin #appSidebar .menu-group-toggle:hover {
  background: rgba(255, 255, 255, .09) !important;
  border-color: rgba(255, 255, 255, .12) !important;
}

.psi-admin #appSidebar .menu-group-toggle[aria-expanded="true"] {
  background: rgba(37, 99, 235, .2) !important;
  border-color: rgba(147, 197, 253, .3) !important;
}

.psi-admin #appSidebar .menu-group-toggle[aria-expanded="true"] .menu-icon-badge {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26);
}

.psi-admin #appSidebar .menu-group-toggle.group-active {
  background: linear-gradient(90deg, rgba(59, 130, 246, .25) 0%, rgba(37, 99, 235, .14) 100%) !important;
  border-color: rgba(147, 197, 253, .36) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 6px 14px rgba(30, 64, 175, .16);
}

.psi-admin #appSidebar .menu-group-toggle.group-active .menu-icon-badge {
  background: rgba(255, 255, 255, .24) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34);
}

.psi-admin #appSidebar .menu-group-toggle[data-group="workbench"] .menu-icon-badge { background: rgba(56, 189, 248, .24); }
.psi-admin #appSidebar .menu-group-toggle[data-group="master"] .menu-icon-badge { background: rgba(94, 234, 212, .22); }
.psi-admin #appSidebar .menu-group-toggle[data-group="purchase"] .menu-icon-badge { background: rgba(250, 204, 21, .24); }
.psi-admin #appSidebar .menu-group-toggle[data-group="sales"] .menu-icon-badge { background: rgba(251, 146, 60, .24); }
.psi-admin #appSidebar .menu-group-toggle[data-group="inventory"] .menu-icon-badge { background: rgba(52, 211, 153, .24); }
.psi-admin #appSidebar .menu-group-toggle[data-group="finance"] .menu-icon-badge { background: rgba(167, 139, 250, .24); }
.psi-admin #appSidebar .menu-group-toggle[data-group="system"] .menu-icon-badge { background: rgba(148, 163, 184, .24); }

.psi-admin #appSidebar .menu-group-toggle .menu-arrow i {
  transition: transform .2s ease;
}

.psi-admin #appSidebar .menu-group-toggle[aria-expanded="true"] .menu-arrow i {
  transform: rotate(180deg);
}

.psi-admin #appSidebar .menu-section-title {
  color: rgba(226, 234, 247, .58);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: .58rem .8rem .35rem;
}

.psi-admin #appSidebar .menu-link {
  color: #d9e4f5 !important;
  font-size: .875rem !important;
  font-weight: 500;
  border-radius: 10px;
  margin: .13rem .3rem;
  padding: .45rem .72rem !important;
  transition: all .16s ease;
}

.psi-admin #appSidebar .menu-link:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, .11);
}

.psi-admin #appSidebar .menu-link.active {
  color: #fff !important;
  background: linear-gradient(90deg, rgba(37, 99, 235, .82) 0%, rgba(59, 130, 246, .72) 100%) !important;
  box-shadow: inset 2px 0 0 rgba(255, 255, 255, .72);
}

/* sidebar hierarchy refinement */
.psi-admin #appSidebar nav > .px-2.mb-2 {
  margin-bottom: .45rem !important;
  padding-top: .26rem;
}

.psi-admin #appSidebar nav > .px-2.mb-2:not(:first-child) {
  border-top: 0;
}

.psi-admin #appSidebar .menu-group-toggle {
  min-height: 38px;
  letter-spacing: .15px;
}

.psi-admin #appSidebar .collapse {
  margin-top: 0;
  padding: 0 .08rem .18rem;
}

.psi-admin .toolbar .toolbar-keyword-label {
  display: inline-flex;
  align-items: center;
  height: 31px;
  line-height: 31px;
}

.psi-admin #appSidebar .menu-link {
  position: relative;
  padding-left: 1.12rem !important;
  margin-left: .36rem;
  margin-right: .28rem;
}

.psi-admin #appSidebar .menu-link::before {
  content: "";
  position: absolute;
  left: .52rem;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(223, 232, 247, .52);
  transform: translateY(-50%);
  transition: all .16s ease;
}

.psi-admin #appSidebar .menu-link:hover {
  transform: translateX(2px);
}

.psi-admin #appSidebar .menu-link:hover::before {
  background: rgba(255, 255, 255, .88);
}

.psi-admin #appSidebar .menu-link.active::before {
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .28);
}

.psi-admin .psi-topbar.navbar {
  background: rgba(255, 255, 255, .92) !important;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--psi-line) !important;
  min-height: 58px;
}

.psi-admin .topbar-icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 10px;
  border-color: #d8e2f0;
  color: #475b78;
}

.psi-admin .topbar-icon-btn i {
  font-size: 1rem;
}

.psi-admin #userNick.badge {
  color: #3f5370 !important;
  background: #f4f8ff !important;
  border-color: #dce6f6 !important;
  font-weight: 600;
  padding: .45rem .62rem;
}

.psi-admin .topbar-logout-btn {
  border-radius: 10px;
  border-color: #d8e2f0;
  color: #4d607a;
  font-weight: 600;
}

.psi-admin .topbar-logout-btn:hover {
  background: #f4f8ff;
  border-color: #c5d3e6;
}

.psi-admin section.container-fluid {
  padding: 1rem 1rem 1.2rem !important;
}

.psi-admin .page-card {
  background: var(--psi-panel) !important;
  border: 1px solid var(--psi-line) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 20px rgba(30, 64, 175, .05) !important;
  padding: .9rem .95rem .8rem !important;
}

.psi-admin .top-toolbar .btn,
.psi-admin .toolbar .btn,
.psi-admin .toolbar .btn-group .btn {
  min-height: 33px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-weight: 600;
}

.psi-admin .toolbar .text-secondary.small {
  color: #687c95 !important;
  font-weight: 600;
}

.psi-admin .page-card .form-control,
.psi-admin .page-card .form-select {
  border-color: #d6e1f0;
  min-height: 33px;
  font-size: .84rem;
}

.psi-admin .page-card .form-control::placeholder {
  color: #94a3b8;
}

.psi-admin .page-card .form-control:focus,
.psi-admin .page-card .form-select:focus {
  border-color: #9bbcf0 !important;
  box-shadow: 0 0 0 .12rem rgba(59, 130, 246, .13) !important;
}

.psi-admin .page-card .btn.btn-outline-secondary {
  color: #455a76;
  border-color: #d4deed;
  background: #fff;
}

.psi-admin .page-card .btn.btn-outline-secondary:hover {
  color: #2f4561;
  background: #f6f9ff;
  border-color: #c5d5ea;
}

.psi-admin .page-card .btn.btn-primary {
  background: linear-gradient(90deg, #2f6cf2 0%, #4f8eff 100%);
  border-color: #2f6cf2;
}

.psi-admin .page-card .btn.btn-primary:hover {
  background: linear-gradient(90deg, #235ee2 0%, #3f80f5 100%);
  border-color: #235ee2;
}

.psi-admin .page-card .table-responsive {
  border: 1px solid var(--psi-line) !important;
  border-radius: 12px !important;
  overflow: hidden;
  background: #fff;
}

.psi-admin .page-card:not(.bill-sheet-card) .table {
  margin-bottom: 0;
  color: #243247;
}

.psi-admin .page-card:not(.bill-sheet-card) .table> :not(caption)>*>* {
  padding: .42rem .58rem;
  font-size: 12px !important;
  line-height: 1.4;
  vertical-align: middle;
}

.psi-admin .page-card:not(.bill-sheet-card) .table thead th {
  background: #f7faff !important;
  color: #5a6d86 !important;
  font-weight: 700;
  border-bottom: 1px solid #e4ecf8 !important;
  border-top: 0 !important;
}

.psi-admin .page-card:not(.bill-sheet-card) .table tbody td {
  border-color: #e9eff8 !important;
}

.psi-admin .page-card:not(.bill-sheet-card) .table-striped>tbody>tr:nth-of-type(odd)>* {
  --bs-table-accent-bg: #fcfdff;
}

.psi-admin .page-card:not(.bill-sheet-card) .table-hover>tbody>tr:hover>* {
  --bs-table-accent-bg: #f3f8ff;
}

.psi-admin .page-card:not(.bill-sheet-card) .table .btn-link {
  color: #1d4ed8;
  font-weight: 600;
}

.psi-admin .page-card #pager {
  border-top: 1px solid #edf2fa !important;
  padding-top: .62rem !important;
  margin-top: .58rem !important;
}

.psi-admin .page-card #pager .pagination .page-link {
  border-color: #d7e3f3;
  color: #48607f;
  min-width: 34px;
  text-align: center;
  border-radius: 8px;
  margin: 0 2px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
  transition: all .15s ease;
}

.psi-admin .page-card #pager .pagination .page-link:hover {
  background: #f1f6ff;
  border-color: #c4d7f3;
  color: #2559a8;
}

.psi-admin .page-card #pager .page-item.active .page-link {
  background: linear-gradient(180deg, #4f93ff 0%, #3b82f6 100%);
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 4px 10px rgba(59, 130, 246, .28);
}

.psi-admin .page-card #pager .page-item.disabled .page-link {
  background: #f7f9fd;
  color: #9baac0;
  border-color: #e2e9f4;
}

.psi-admin .modal-content {
  border-radius: 14px !important;
  border-color: #dde6f3 !important;
}

.psi-admin .modal-header {
  background: #f8fbff;
}

.psi-admin .modal-title {
  font-size: 1.03rem;
  font-weight: 700;
  color: #304763;
}

.psi-admin .usage-help-card {
  border-style: dashed;
  border-color: #d9e5f5 !important;
  background: linear-gradient(180deg, #fbfdff 0%, #f6faff 100%);
}

.psi-admin .usage-help-title {
  font-size: .92rem;
  font-weight: 700;
  color: #2f4e76;
  margin-bottom: .45rem;
}

.psi-admin .usage-help-title .usage-role-badge {
  font-size: .68rem;
  font-weight: 600;
  vertical-align: middle;
}

.psi-admin .usage-help-list {
  margin: 0;
  padding-left: 1.1rem;
}

.psi-admin .usage-help-list li {
  font-size: .82rem;
  color: #607492;
  line-height: 1.5;
  margin-bottom: .2rem;
}

.psi-admin .btn-inline-hint {
  margin-left: .38rem;
  font-size: .75rem;
  color: #7a8ea9;
  white-space: nowrap;
}

.psi-admin .bill-sheet-card {
  width: min(var(--psi-a4-content-width), 100%);
  margin: 0 auto;
  border: 1px solid #e2eaf6 !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .05) !important;
}

.psi-admin .bill-sheet-card #companyName {
  font-size: 1.72rem;
  color: #182a40;
  font-weight: 800;
}

.psi-admin .bill-sheet-card #billTitle {
  font-size: 1.46rem;
  color: #15253c;
  letter-spacing: .25rem;
}

.psi-admin .bill-sheet-card .bill-head-item .form-label,
.psi-admin .bill-sheet-card .bill-tail-item .form-label {
  color: #475b77;
  font-size: .8rem;
  font-weight: 700;
}

.psi-admin .bill-sheet-card .table.table-bordered {
  border: 1px solid #d8e3f3 !important;
}

.psi-admin .bill-sheet-card .table.table-bordered> :not(caption)>*>* {
  border-color: #d8e3f3 !important;
  padding: .44rem .36rem;
}

.psi-admin .bill-sheet-card .table thead th {
  background: #f8fbff !important;
  color: #495f7a !important;
}

.psi-admin .bill-sheet-card .table tfoot td {
  background: #fbfdff;
}

.psi-admin .alarm-badge {
  font-size: 12px !important;
  font-weight: 700;
  padding: .34em .7em;
}

.psi-admin #toastStack .toast {
  border-radius: 12px;
  min-width: 310px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .22) !important;
}

.psi-admin #toastStack .toast .toast-body {
  font-size: .9rem;
  font-weight: 600;
}

.psi-admin #toastStack .toast-success {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%) !important;
  color: #fff !important;
}

.psi-admin #toastStack .toast-error {
  background: linear-gradient(90deg, #ea580c 0%, #ef4444 100%) !important;
  color: #fff !important;
}

.psi-admin #toastStack .toast-warning {
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%) !important;
  color: #fff !important;
}

.psi-admin #toastStack .toast-info {
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%) !important;
  color: #fff !important;
}

/* login visual refresh */
body.psi-login {
  background:
    radial-gradient(850px 420px at 16% 18%, rgba(190, 211, 255, .5), transparent 62%),
    radial-gradient(960px 480px at 78% 88%, rgba(220, 235, 255, .6), transparent 65%),
    linear-gradient(180deg, #eef4fc 0%, #e8f0fa 100%) !important;
  color: #22334b;
}

.psi-login .badge {
  font-size: .86rem;
  font-weight: 700;
  padding: .45rem .9rem;
  border-radius: 999px;
}

.psi-login .display-5 {
  color: #1d3252;
  letter-spacing: .3px;
}

.psi-login .lead {
  color: #5f7692 !important;
  max-width: 520px;
}

.psi-login .card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid #d9e5f6 !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 50px rgba(59, 130, 246, .12) !important;
}

.psi-login .card-body {
  padding: 2.1rem 2.15rem !important;
}

.psi-login .h3 {
  font-size: 2rem;
  color: #2262df !important;
}

.psi-login .text-secondary {
  color: #6d809a !important;
}

.psi-login .input-group-text {
  border-color: #d7e2f2;
  color: #7e90aa;
  min-width: 44px;
  justify-content: center;
}

.psi-login .input-group-text i {
  font-size: 1.03rem;
}

.psi-login .form-control {
  border-color: #d7e2f2;
  min-height: 42px;
  font-size: .95rem;
}

.psi-login .form-control:focus {
  border-color: #9dbef0;
  box-shadow: none !important;
  outline: 0 !important;
  border-color: transparent !important;
  -webkit-tap-highlight-color: transparent;
}

.psi-login #captchaView {
  border-color: #d7e2f2 !important;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
  height: 42px !important;
  width: 110px;
  object-fit: cover;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55);
}

.psi-login .btn.btn-primary {
  min-height: 42px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  background: linear-gradient(90deg, #2f6cf2 0%, #4a88ff 100%);
  border-color: #2f6cf2;
}

.psi-login .btn.btn-primary:hover {
  background: linear-gradient(90deg, #235edf 0%, #3d7df4 100%);
  border-color: #235edf;
}

@media (max-width: 991.98px) {
  .psi-login .col-lg-7 {
    display: none;
  }
}

/* ===== critical hotfix: form table single border + print no shell border ===== */
.psi-admin .bill-sheet-card .table-responsive {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #fff !important;
}

.psi-admin .bill-sheet-card .table.table-bordered {
  border: 1px solid #d8e3f3 !important;
  border-collapse: collapse !important;
}

.psi-admin .bill-sheet-card .table.table-bordered> :not(caption)>*>* {
  border: 1px solid #d8e3f3 !important;
}

@media print {

  .psi-admin .bill-sheet-card,
  .psi-admin .bill-sheet-card.page-card {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .psi-admin .bill-sheet-card .card-body {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .psi-admin .bill-sheet-card .table-responsive {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }
}

/* order form: serial center + smaller quantity input */
.psi-admin .bill-sheet-card .table th:first-child,
.psi-admin .bill-sheet-card .table td.bill-idx-cell {
  text-align: center !important;
}

.psi-admin .bill-sheet-card .table td .bill-num-input {
  width: 50% !important;
  min-width: 46px !important;
}

@media print {
  .psi-admin .bill-sheet-card .table thead th {
    background: #fff !important;
    background-color: #fff !important;
  }
}

.psi-admin #approvalModeBanner {
  border-radius: 12px;
}

.psi-admin #approvalTimelineCard {
  border: 1px solid #e4ebf6;
}

.psi-admin #approvalTimelineBody .approval-step:last-child {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: 0 !important;
}

/* home dashboard redesign */
.psi-admin .dashboard-home {
  max-width: 100%;
}

.psi-admin .dashboard-hero {
  background:
    radial-gradient(600px 220px at 95% 0%, rgba(96, 165, 250, .18), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

.psi-admin .dashboard-badge {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .3px;
  color: #2a62df;
  background: #edf4ff;
  border: 1px solid #d4e4ff;
  border-radius: 999px;
  padding: .34rem .75rem;
}

/* ===== final print scope: print bill body only ===== */
@media print {
  .psi-admin #appSidebar,
  .psi-admin header.navbar,
  .psi-admin .top-toolbar,
  .psi-admin #approvalModeBanner,
  .psi-admin #approvalActionCard,
  .psi-admin #approvalTimelineCard,
  .psi-admin .usage-help-panel,
  .psi-admin .usage-help-card,
  .psi-admin .btn-inline-hint {
    display: none !important;
  }

  .psi-admin .container-fluid,
  .psi-admin .container-fluid > .row,
  .psi-admin .container-fluid > .row > main,
  .psi-admin .container-fluid > .row > main > section {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .psi-admin .container-fluid > .row > main {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  .psi-admin .container-fluid > .row > main > section > .row.g-3 {
    display: block !important;
    margin: 0 !important;
  }

  .psi-admin .container-fluid > .row > main > section > .row.g-3 > .col-xl-9 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  .psi-admin .container-fluid > .row > main > section > .row.g-3 > .col-xl-3 {
    display: none !important;
  }

  .psi-admin .bill-sheet-card {
    margin: 0 auto !important;
    box-shadow: none !important;
  }
}

.psi-admin .dashboard-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: .2px;
  color: #1b2f4d;
}

.psi-admin .dashboard-subtitle {
  color: #5d7392;
  font-size: .95rem;
  max-width: 620px;
}

.psi-admin .dashboard-card-panel {
  padding: .9rem;
  border: 1px solid #dce8f8;
  border-radius: 14px;
  background: #fff;
}

.psi-admin .dashboard-card-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 74px;
  align-items: center;
  gap: .75rem;
}

.psi-admin .dashboard-card-avatar {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 14px;
  background: #eaf2ff;
  color: #2563eb;
  font-size: 1.2rem;
  font-weight: 800;
}

.psi-admin .dashboard-card-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.psi-admin .dashboard-card-person {
  min-width: 0;
}

.psi-admin .dashboard-card-kicker {
  display: flex;
  align-items: center;
  margin-bottom: .18rem;
  color: #5d718c;
  font-size: .75rem;
  font-weight: 700;
}

.psi-admin .dashboard-card-person strong,
.psi-admin .dashboard-card-person span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.psi-admin .dashboard-card-person strong {
  color: #203652;
  font-size: .98rem;
  font-weight: 800;
}

.psi-admin .dashboard-card-person span {
  margin-top: .15rem;
  color: #69809d;
  font-size: .78rem;
  font-weight: 600;
}

.psi-admin .dashboard-card-qr {
  justify-self: end;
  color: #5d718c;
}

.psi-admin .dashboard-card-qr img {
  width: 68px;
  height: 68px;
  display: block;
  background: #fff;
}

.psi-admin .dashboard-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
  margin-top: .85rem;
}

.psi-admin .dashboard-card-actions .btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.psi-admin .dashboard-stat-card {
  height: 100%;
  display: flex;
  align-items: center;
  gap: .72rem;
  border: 1px solid #dfe8f6;
  border-radius: 14px;
  background: #fff;
  padding: .85rem .84rem;
  transition: all .18s ease;
}

.psi-admin .dashboard-stat-card:hover {
  border-color: #cbdcf3;
  box-shadow: 0 10px 22px rgba(59, 130, 246, .11);
  transform: translateY(-1px);
}

.psi-admin .dashboard-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(180deg, #eef5ff 0%, #e5efff 100%);
  color: #2a63df;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
}

.psi-admin .dashboard-stat-icon i {
  font-size: 1.08rem;
}

.psi-admin .dashboard-stat-label {
  font-size: .9rem;
  font-weight: 700;
  color: #243854;
  line-height: 1.2;
}

.psi-admin .dashboard-stat-desc {
  margin-top: .22rem;
  font-size: .76rem;
  color: #68809f;
  line-height: 1.35;
}

.psi-admin .dashboard-section-title {
  color: #2a3f5d;
  font-size: 1rem;
  font-weight: 700;
}

.psi-admin .dashboard-entry-grid .dashboard-entry-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .1rem;
  border-radius: 11px;
  border: 1px solid #d7e2f2;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #3d5472;
  font-size: .84rem;
  font-weight: 600;
  line-height: 1;
  transition: all .16s ease;
}

.psi-admin .dashboard-entry-grid .dashboard-entry-btn:hover {
  border-color: #bfd2ef;
  background: #f3f8ff;
  color: #264b82;
}

.psi-admin .dashboard-entry-grid .dashboard-entry-btn i {
  font-size: .92rem;
}

.psi-admin .todo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: .75rem .9rem;
  border: 1px solid #dbe4f2;
  border-radius: 10px;
  background: #fff;
  color: #31425e;
  text-decoration: none;
}

.psi-admin .todo-card strong {
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eef4ff;
  color: #2563eb;
}

.psi-admin .todo-card-hot {
  border-color: #f6c66d;
  background: #fffaf0;
}

.psi-admin .todo-card-hot strong {
  background: #f59e0b;
  color: #fff;
}

.psi-admin .page-soft-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  border: 1px solid #dfe8f6;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
}

.psi-admin .page-soft-head h5 {
  color: #223854;
  font-weight: 800;
}

.psi-admin .report-filter-card .toolbar {
  margin-bottom: 0 !important;
}

.psi-admin .report-metric {
  height: 100%;
  border-left: 4px solid #90a8c9;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.psi-admin .report-metric:hover {
  border-color: #3b82f6;
  box-shadow: 0 12px 26px rgba(37, 99, 235, .1) !important;
  transform: translateY(-1px);
}

.psi-admin .report-metric .card-body {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.psi-admin .report-metric .small {
  font-weight: 700;
}

.psi-admin .report-metric h4 {
  color: #20324d;
  font-weight: 800;
  letter-spacing: 0;
}

.psi-admin .report-metric-good {
  border-left-color: #22c55e;
}

.psi-admin .report-metric-profit {
  border-left-color: #3b82f6;
}

.psi-admin .report-metric-warn {
  border-left-color: #f59e0b;
}

.psi-admin .card-header.bg-body-secondary {
  border-bottom: 1px solid #dfe8f6;
  background: #f7faff !important;
  color: #334966;
}

.psi-admin .flow-hero {
  background:
    linear-gradient(90deg, rgba(37, 99, 235, .08), rgba(20, 184, 166, .05)),
    #fff;
}

.psi-admin .flow-hero h5 {
  color: #1e3556;
  font-weight: 800;
}

.psi-admin .flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.psi-admin .flow-steps span {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: .32rem .68rem;
  border: 1px solid #cfdcf0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: #355170;
  font-size: .8rem;
  font-weight: 700;
}

.psi-admin .flow-card {
  padding-top: .85rem;
}

.psi-admin .flow-section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .45rem .8rem;
  margin-bottom: .7rem;
  padding: 0 .1rem;
}

.psi-admin .flow-section-title span {
  color: #21324d;
  font-size: .96rem;
  font-weight: 800;
}

.psi-admin .flow-section-title em {
  color: #75859a;
  font-size: .78rem;
  font-style: normal;
}

.psi-admin .date-range-field .input-group-text {
  color: #64748b;
  border-color: #ced8e8;
  background: #f7faff;
  font-size: .78rem;
  font-weight: 700;
}

.psi-admin .date-range-field .form-control {
  min-width: 0;
}

.psi-admin .leave-employee-search {
  background: #fbfdff;
}

.psi-admin [data-leave-department-display] {
  color: #475569;
  cursor: not-allowed;
}

.psi-admin .employee-profile-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.psi-admin .employee-profile-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: .35rem .65rem;
  border: 1px solid #dbe4f2;
  border-radius: 999px;
  background: #f8fbff;
  color: #334966;
  font-size: .84rem;
  font-weight: 700;
}

.psi-admin .employee-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

.psi-admin .employee-profile-item {
  min-width: 0;
  padding: .75rem .85rem;
  border: 1px solid #dbe4f2;
  border-radius: 10px;
  background: #f8fbff;
}

.psi-admin .employee-profile-item span {
  display: block;
  margin-bottom: .25rem;
  color: #70819b;
  font-size: .78rem;
  font-weight: 700;
}

.psi-admin .employee-profile-item strong {
  display: block;
  overflow: hidden;
  color: #22324a;
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.psi-admin .business-card-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 1rem;
  border: 1px solid #d8e3f2;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
}

.psi-admin .business-card-share-main {
  min-width: 0;
  flex: 1 1 auto;
}

.psi-admin .business-card-share-title {
  display: flex;
  align-items: center;
  color: #223854;
  font-size: .98rem;
  font-weight: 800;
}

.psi-admin .business-card-share .input-group {
  max-width: 760px;
}

.psi-admin .business-card-share .form-control {
  background: #fff;
}

.psi-admin .business-card-share-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  flex: 0 0 auto;
  color: #5d718c;
  font-size: .76rem;
  font-weight: 700;
}

.psi-admin .business-card-share-qr img {
  width: 86px;
  height: 86px;
  padding: 4px;
  border: 1px solid #d5e0ee;
  border-radius: 10px;
  background: #fff;
}

.psi-admin .card-privacy-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem 1rem;
  min-height: 31px;
  padding: .28rem .65rem;
  border: 1px solid #ccd8e8;
  border-radius: .2rem;
  background: #fff;
}

.psi-admin .card-privacy-group .form-check-input {
  margin-top: .18rem;
}

.psi-admin .employee-self-page .table td {
  max-width: 260px;
}

.psi-admin .employee-self-page .table .status-col {
  display: table-cell !important;
  min-width: 76px;
  width: 86px;
  white-space: nowrap;
}

.psi-admin .org-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.psi-admin .org-page-subtitle {
  color: #64748b;
  font-size: .9rem;
}

.psi-admin .org-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
}

.psi-admin .org-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}

.psi-admin .org-stat {
  min-height: 78px;
  padding: .9rem 1rem;
  border: 1px solid #dbe4f2;
  border-radius: 10px;
  background: #f8fbff;
}

.psi-admin .org-stat span {
  display: block;
  color: #64748b;
  font-size: .82rem;
}

.psi-admin .org-stat strong {
  display: block;
  margin-top: .25rem;
  color: #21324d;
  font-size: 1.45rem;
  line-height: 1.1;
}

.psi-admin .org-tree {
  display: grid;
  gap: 1rem;
}

.psi-admin .org-company-section {
  border: 1px solid #dbe4f2;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.psi-admin .org-company-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #e5ecf6;
  background: #f7faff;
}

.psi-admin .org-company-title {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}

.psi-admin .org-company-avatar {
  width: 42px;
  height: 42px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #e8f0ff;
  color: #2563eb;
  font-size: 1.1rem;
}

.psi-admin .org-company-title h5 {
  margin: 0;
  color: #21324d;
  font-size: 1.05rem;
  font-weight: 800;
}

.psi-admin .org-company-title p {
  margin: .2rem 0 0;
  color: #64748b;
  font-size: .84rem;
}

.psi-admin .org-company-badge {
  flex: 0 0 auto;
  padding: .25rem .55rem;
  border-radius: 999px;
  background: #e8f7ef;
  color: #16834a;
  font-size: .78rem;
  font-weight: 700;
}

.psi-admin .org-dept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  padding: 1rem;
}

.psi-admin .org-dept-card {
  min-width: 0;
  padding: .95rem;
  border: 1px solid #dce6f3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .04);
}

.psi-admin .org-dept-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.psi-admin .org-dept-card-head h6 {
  margin: 0;
  color: #21324d;
  font-size: 1rem;
  font-weight: 800;
}

.psi-admin .org-dept-card-head p {
  margin: .25rem 0 0;
  color: #7a8799;
  font-size: .78rem;
}

.psi-admin .org-dept-card-head > span {
  flex: 0 0 auto;
  min-width: 48px;
  padding: .22rem .45rem;
  border-radius: 8px;
  background: #eef4ff;
  color: #2563eb;
  font-size: .82rem;
  font-weight: 800;
  text-align: center;
}

.psi-admin .org-child-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .8rem;
}

.psi-admin .org-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  max-width: 100%;
  padding: .28rem .5rem;
  border: 1px solid #d8e3f2;
  border-radius: 999px;
  background: #f8fbff;
  color: #31425e;
  font-size: .78rem;
  font-weight: 700;
}

.psi-admin .org-chip em {
  color: #7a8799;
  font-style: normal;
  font-weight: 600;
}

.psi-admin .org-chip-muted {
  color: #64748b;
  font-weight: 600;
}

.psi-admin .org-people {
  display: grid;
  gap: .5rem;
  margin-top: .85rem;
}

.psi-admin .org-person-row {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  padding: .5rem .6rem;
  border-radius: 8px;
  background: #f8fafc;
}

.psi-admin .org-person-avatar {
  width: 30px;
  height: 30px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e8f0ff;
  color: #315cbd;
  font-size: .82rem;
  font-weight: 800;
}

.psi-admin .org-person-main {
  min-width: 0;
}

.psi-admin .org-person-main strong,
.psi-admin .org-person-main em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.psi-admin .org-person-main strong {
  color: #21324d;
  font-size: .86rem;
}

.psi-admin .org-person-main em {
  color: #7a8799;
  font-size: .76rem;
  font-style: normal;
}

.psi-admin .org-more,
.psi-admin .org-empty-line {
  color: #7a8799;
  font-size: .82rem;
}

.psi-admin .org-empty-block {
  padding: 1rem;
}

.psi-admin .org-loading,
.psi-admin .org-empty {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 1px dashed #cad7ea;
  border-radius: 12px;
  background: #f8fbff;
  color: #64748b;
  text-align: center;
}

.psi-admin .org-empty i {
  color: #2563eb;
  font-size: 1.6rem;
}

.psi-admin .org-empty strong {
  color: #21324d;
}

@media (max-width: 767.98px) {
  .psi-admin .dashboard-title {
    font-size: 1.35rem;
  }

  .psi-admin .dashboard-entry-grid .dashboard-entry-btn {
    min-height: 40px;
    font-size: .8rem;
  }

  .psi-admin .org-page-head,
  .psi-admin .org-company-head {
    align-items: stretch;
    flex-direction: column;
  }

  .psi-admin .org-actions {
    justify-content: flex-start;
  }

  .psi-admin .org-summary-grid,
  .psi-admin .org-dept-grid {
    grid-template-columns: 1fr;
  }

  .psi-admin .employee-profile-grid {
    grid-template-columns: 1fr;
  }

  .psi-admin .business-card-share {
    align-items: stretch;
    flex-direction: column;
  }

  .psi-admin .business-card-share .input-group {
    display: grid;
    grid-template-columns: 1fr;
  }

  .psi-admin .business-card-share .input-group > * {
    width: 100%;
    border-radius: .2rem !important;
  }
}

/* Sidebar style refresh: light, flat, compact (visual-only) */
.psi-admin #appSidebar {
  background: #ffffff !important;
  box-shadow: none;
  border-right: none !important;
}

.psi-admin #appSidebar .border-bottom {
  border-bottom: 1px solid #dfe6f2 !important;
}

.psi-admin #appSidebar .fw-bold {
  color: #1f2937 !important;
  letter-spacing: 0;
}

.psi-admin #appSidebar #sidebarToggleBtn {
  border-color: #d9dde2 !important;
  color: #4b5563 !important;
  background: #fff !important;
}

.psi-admin #appSidebar #sidebarToggleBtn:hover {
  background: #f9fafb !important;
  border-color: #cfd5dc !important;
}

/* keep only top-right toggle, hide sidebar header toggle */
.psi-admin #appSidebar #sidebarToggleBtn {
  display: none !important;
}

.psi-admin .psi-topbar #mobileSidebarBtn {
  display: inline-flex !important;
}

.psi-admin #appSidebar nav {
  padding-top: .45rem !important;
}

.psi-admin #appSidebar nav > .px-2.mb-2 {
  padding-left: .7rem !important;
  padding-right: .7rem !important;
  margin-bottom: .5rem !important;
}

.psi-admin #appSidebar nav > .px-2.mb-2:not(:first-child) {
  border-top: none;
  padding-top: .2rem;
}

.psi-admin #appSidebar .menu-group-toggle {
  min-height: 38px;
  width: calc(100% + 1.4rem) !important;
  margin-left: -.7rem !important;
  margin-right: 0 !important;
  padding: .42rem 1.25rem;
  border-radius: 8px;
  border: none;
  background: transparent !important;
  color: #4b5563 !important;
  font-size: .88rem !important;
  font-weight: 520;
  line-height: 1.16;
  box-shadow: none !important;
}

.psi-admin #appSidebar .menu-group-toggle:hover {
  background: #e8f0ff !important;
  color: #1f4f8f !important;
  border-radius: 8px !important;
}

.psi-admin #appSidebar .menu-group-toggle[aria-expanded="true"],
.psi-admin #appSidebar .menu-group-toggle.group-active {
  background: transparent !important;
  color: #0f766e !important;
}

.psi-admin #appSidebar .menu-group-toggle .menu-icon-badge {
  width: 22px;
  height: 22px;
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  color: #4b5563 !important;
  box-shadow: none !important;
}

.psi-admin #appSidebar .menu-group-toggle .menu-icon-badge i {
  font-size: 1rem;
}

.psi-admin #appSidebar .menu-group-toggle .menu-arrow i {
  color: #9aa3af !important;
}

.psi-admin #appSidebar .menu-group-toggle .menu-arrow {
  display: none !important;
}

.psi-admin #appSidebar .menu-link {
  position: relative;
  min-height: 36px;
  padding: .48rem 1rem .48rem 1.85rem !important;
  margin: 2px 0;
  border-radius: 8px;
  border: none;
  color: #111827 !important;
  background: transparent !important;
  font-size: .76rem !important;
  font-weight: 460;
  line-height: 1.14;
  box-shadow: none !important;
}

.psi-admin #appSidebar .menu-link::before {
  display: none !important;
}

.psi-admin #appSidebar .menu-link:hover {
  background: #eaf2ff !important;
  color: #1f4f8f !important;
  font-size: .76rem !important;
}

.psi-admin #appSidebar .menu-link.active {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 1.85rem !important;
  padding-right: 1rem !important;
  border-radius: 8px;
  background: #eaf2ff !important;
  color: #1f4f8f !important;
  font-size: .76rem !important;
}

.psi-admin #appSidebar .menu-link:hover::before,
.psi-admin #appSidebar .menu-link.active::before {
  background: #1f4f8f;
}

.psi-admin #appSidebar .menu-link.active::before {
  left: 1.38rem;
}

.psi-admin #appSidebar nav > .px-2.mb-2 .collapse {
  margin-top: .2rem;
  padding: .28rem .2rem;
  border-radius: 8px;
  background: transparent;
}

.psi-admin #appSidebar nav > .px-2.mb-2 .collapse.show {
  background: #f4f8f6;
}

/* stronger overrides for level-1 active + level-2 full-bleed area */
.psi-admin #appSidebar nav > .px-2.mb-2 {
  position: relative;
}

.psi-admin #appSidebar .menu-group-toggle.group-active,
.psi-admin #appSidebar .menu-group-toggle[aria-expanded="true"] {
  color: #1f4f8f !important;
  background: #eaf2ff !important;
  border-radius: 8px 8px 0 0 !important;
  border: none !important;
  font-weight: 560 !important;
  margin-bottom: 0 !important;
}

.psi-admin #appSidebar .menu-group-toggle:focus,
.psi-admin #appSidebar .menu-group-toggle:focus-visible,
.psi-admin #appSidebar .menu-group-toggle:active,
.psi-admin #appSidebar .menu-group-toggle[aria-expanded="true"]:focus,
.psi-admin #appSidebar .menu-group-toggle[aria-expanded="true"]:focus-visible,
.psi-admin #appSidebar .menu-group-toggle[aria-expanded="true"]:active,
.psi-admin #appSidebar .menu-group-toggle.group-active:focus,
.psi-admin #appSidebar .menu-group-toggle.group-active:focus-visible,
.psi-admin #appSidebar .menu-group-toggle.group-active:active {
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.psi-admin #appSidebar .btn-check:focus + .menu-group-toggle,
.psi-admin #appSidebar .btn-check:active + .menu-group-toggle,
.psi-admin #appSidebar .menu-group-toggle.btn:focus,
.psi-admin #appSidebar .menu-group-toggle.btn:active,
.psi-admin #appSidebar .menu-group-toggle.btn.show,
.psi-admin #appSidebar .menu-group-toggle.btn:not(.btn-check)+.btn:active {
  border-color: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
}

.psi-admin #appSidebar nav > .px-2.mb-2 .collapse,
.psi-admin #appSidebar nav > .px-2.mb-2 .collapsing {
  margin-left: -.7rem !important;
  margin-right: -.7rem !important;
  margin-top: 0 !important;
  padding: .15rem .9rem .3rem !important;
  border-radius: 0 0 8px 8px !important;
  background: #eef4ff !important;
}

.psi-admin #appSidebar nav > .px-2.mb-2 .collapse.show {
  /* keep same box metrics as .collapse/.collapsing to avoid flicker */
  margin-left: -.7rem !important;
  margin-right: -.7rem !important;
  margin-top: 0 !important;
  padding: .15rem .9rem .3rem !important;
  border-radius: 0 0 8px 8px !important;
  background: #eef4ff !important;
}

/* polished selector modals */
.psi-admin .picker-modal .modal-header {
  background: #f8fbff;
  border-bottom-color: #dce6f3;
}

.psi-admin .picker-toolbar {
  padding: .35rem;
  border-radius: 10px;
  background: transparent;
}

.psi-admin .picker-toolbar .form-control,
.psi-admin .picker-toolbar .form-select {
  border-color: #ccd8e8;
  background-color: #fff;
}

.psi-admin .picker-count-badge {
  min-width: 66px;
  white-space: nowrap;
  padding: .42rem .62rem;
  border: 1px solid #d9e4f2;
  border-radius: 999px;
  color: #3f5b7d !important;
  background: #eef5ff;
  font-weight: 700;
  line-height: 1;
}

.psi-admin .picker-table {
  border: 0;
  border-radius: 0;
  overflow: hidden;
}

.psi-admin .picker-table .table {
  --bs-table-hover-bg: #f3f8ff;
}

.psi-admin .picker-table thead th {
  background: #f5f8fc;
  color: #2f4664;
  font-weight: 700;
  border-bottom: 1px solid #cfdbea;
}

.psi-admin .picker-table tbody td {
  border-color: #e4ebf4;
  color: #23344d;
}

.psi-admin .picker-table tbody tr:hover td {
  color: #1d4d87;
}

.psi-admin .picker-action-btn {
  min-width: 54px;
  padding: .25rem .55rem;
  border: 1px solid #b8c8dc;
  border-radius: .2rem;
  background: #fff;
  color: #2f5f9f;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
}

.psi-admin .picker-action-btn:hover {
  background: #eaf3ff;
  border-color: #8fb1da;
  color: #1d4d87;
}

.psi-admin .picker-load-more {
  min-width: 92px;
  border-radius: .2rem;
  font-weight: 700;
}

.psi-admin .detail-delete-btn {
  min-width: 54px;
  height: 28px;
  padding: 0 .62rem;
  border: 1px solid #f0b8bd;
  border-radius: .2rem;
  background: #fff7f8;
  color: #d92d3b;
  font-size: .86rem;
  font-weight: 700;
  line-height: 26px;
  text-decoration: none;
}

.psi-admin .detail-delete-btn:hover {
  border-color: #e45b67;
  background: #ffecef;
  color: #b51f2c;
}

.psi-admin .detail-status-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 .55rem;
  border-radius: .2rem;
  background: #edf3f9;
  color: #60748d;
  font-size: .82rem;
  font-weight: 700;
}
