body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", sans-serif;
  background: #f4f7f5;
  color: #1f2933;
  hyphens: none;
  -webkit-hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

.card {
  max-width: 28rem;
  margin: 4rem auto;
  padding: 2rem;
  background: #ffffff;
  border: 1px solid #d5e0d8;
  border-radius: 12px;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: #1f7a4d;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1 {
  margin: 0 0 0.75rem;
}

.lead,
.hint {
  line-height: 1.5;
}

label {
  display: block;
  margin: 1rem 0 0.35rem;
  font-weight: 600;
}

input,
select {
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 0.7rem 0.85rem;
  border: 1px solid #cfd6e4;
  border-radius: 10px;
  background-color: #ffffff;
  color: #1f2933;
  font: inherit;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.4rem;
  background-image:
    linear-gradient(45deg, transparent 50%, #314056 50%),
    linear-gradient(135deg, #314056 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

input:focus,
select:focus {
  outline: 2px solid #d9e2f8;
  border-color: #7c8db5;
}

button {
  margin-top: 1.25rem;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 8px;
  background: #1f7a4d;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.message {
  margin: 0.8rem 0 0;
  color: #9f1239;
}

.hint {
  margin: 1.25rem 0 0;
  color: #52605a;
  font-size: 0.95rem;
}

body.home {
  background:
    radial-gradient(circle at 0 0, rgba(22, 131, 92, 0.08), transparent 32%),
    radial-gradient(circle at 100% 0, rgba(124, 58, 237, 0.08), transparent 28%),
    #f6f7f8;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: #ffffff;
  border-bottom: 1px solid #e6e8ee;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand img,
.sso-brand img,
.smr-brand img {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.brand span {
  margin-left: 0.6rem;
  color: #6b7280;
  font-weight: 600;
  letter-spacing: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #4b5563;
}

.topbar button {
  margin: 0;
  background: #1f2933;
}

.modules {
  max-width: 980px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.kicker {
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.heading h1 {
  margin: 0.25rem 0;
}

.heading p {
  margin-top: 0;
  color: #6b7280;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.module {
  position: relative;
  display: block;
  min-height: 250px;
  padding: 1.15rem 1.2rem 0.9rem;
  overflow: hidden;
  border-radius: 18px;
  text-decoration: none;
}

.module[hidden] {
  display: none !important;
}

.module-top,
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2rem;
  height: 2rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.open {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.number {
  margin-top: 1.4rem;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
}

.module h2 {
  margin: 0.35rem 0 0.4rem;
  font-size: 1.35rem;
}

.module p {
  margin: 0;
  line-height: 1.45;
}

.foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75rem 1.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.4rem;
  border-radius: 50%;
}

.smr {
  border: 1px solid rgba(22, 131, 92, 0.18);
  background:
    radial-gradient(circle at 92% 10%, rgba(119, 200, 108, 0.18), transparent 28%),
    linear-gradient(145deg, #ffffff 0%, #f3fbf6 58%, #eaf8f1 100%);
  box-shadow: 0 15px 38px rgba(22, 131, 92, 0.1);
}

.smr .code {
  background: linear-gradient(135deg, #0d6848, #16835c);
}

.smr .open,
.smr h2,
.smr .status {
  color: #0d6848;
}

.smr .number {
  color: rgba(22, 131, 92, 0.16);
}

.smr p,
.smr .foot {
  color: #557568;
}

.smr .foot {
  border-top: 1px solid rgba(22, 131, 92, 0.1);
  background: rgba(255, 255, 255, 0.38);
}

.smr .status::before {
  background: #31a86e;
}

.sso {
  border: 1px solid rgba(88, 70, 220, 0.17);
  background:
    radial-gradient(circle at 92% 8%, rgba(124, 58, 237, 0.17), transparent 29%),
    linear-gradient(145deg, #ffffff 0%, #f5f6ff 54%, #eef2ff 100%);
  box-shadow: 0 15px 38px rgba(79, 70, 229, 0.1);
}

.sso .code {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.sso .open,
.sso .status {
  color: #5145c7;
}

.sso h2 {
  color: #342a91;
}

.sso .number {
  color: rgba(79, 70, 229, 0.16);
}

.sso p,
.sso .foot {
  color: #626785;
}

.sso .foot {
  border-top: 1px solid rgba(79, 70, 229, 0.09);
  background: rgba(255, 255, 255, 0.38);
}

.sso .status::before {
  background: #6366f1;
}

.next-step {
  margin-top: 1.25rem;
  padding: 1.1rem 1.2rem;
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-radius: 16px;
}

.next-step h2 {
  margin: 0.2rem 0 0.45rem;
  font-size: 1.15rem;
}

.next-step p {
  margin: 0.25rem 0;
  color: #526075;
}

.next-step button {
  margin-top: 0.8rem;
}

.module-note.smr-note {
  border-color: rgba(22, 131, 92, 0.25);
}

.module-note.smr-note .eyebrow {
  color: #0d6848;
}

.module-note.sso-note {
  border-color: rgba(37, 99, 235, 0.25);
}

.module-note.sso-note .eyebrow {
  color: #2563eb;
}

.back {
  display: inline-block;
  margin-top: 1rem;
  color: #1f2933;
  font-weight: 700;
}

.text-link {
  color: #1f2933;
  font-weight: 700;
  text-decoration: none;
}

.shell-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}

.side {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  background: #ffffff;
  border-right: 1px solid #e6e8ee;
}

.nav {
  margin: 0;
  padding: 0.75rem 0.8rem;
  border-radius: 10px;
  background: transparent;
  color: #374151;
  font-weight: 600;
  text-align: left;
}

.smr-shell .nav.on {
  background: #eaf8f1;
  color: #0d6848;
}

.sso-shell {
  background: #f5f6fb;
}

.sso-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid #e6e8f2;
}

.sso-brand,
.sso-head-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sso-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2563eb, #7c3aed);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.sso-code {
  color: #2563eb;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.sso-name {
  color: #6b728a;
  font-size: 0.92rem;
}

.sso-home,
.sso-logout {
  margin: 0;
  min-height: 42px;
  padding: 0 1rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
}

.sso-home {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d4c6f5;
  background: #f7f4ff;
  color: #5b3cc4;
}

.sso-user {
  text-align: right;
}

.sso-user strong,
.sso-user span {
  display: block;
}

.sso-user strong {
  font-size: 0.92rem;
}

.sso-user span {
  color: #718096;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sso-logout {
  background: #1f2933;
  color: #ffffff;
}

.sso-tabs {
  display: flex;
  align-items: stretch;
  min-height: 62px;
  background: linear-gradient(90deg, #eef3ff 0%, #f7f5ff 65%, #f3eefe 100%);
  border-bottom: 2px solid #7c3aed;
}

.sso-shell .nav {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 60px;
  margin: 0;
  padding: 0.5rem 0.4rem;
  border: 0;
  border-right: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: 0;
  background: transparent;
  color: #24324a;
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
}

/* display:inline-flex di atas override atribut hidden — wajib !important */
.sso-shell .nav[hidden],
.sso-tabs .nav[hidden] {
  display: none !important;
}

.sso-shell .nav:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.sso-shell .nav.on {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
}

.smr-shell {
  background: #f3f6f0;
}

.smr-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid #e4eadf;
}

.smr-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.smr-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(145deg, #6ea318, #3f7d12);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.smr-code {
  color: #2f6d12;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.smr-name {
  color: #6b7566;
  font-size: 0.92rem;
}

.smr-head-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.smr-home,
.smr-logout {
  margin: 0;
  min-height: 42px;
  padding: 0 1rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
}

.smr-home {
  display: inline-flex;
  align-items: center;
  border: 1px solid #b8cba9;
  background: #f8fbf5;
  color: #315f12;
}

.smr-user {
  text-align: right;
}

.smr-user strong,
.smr-user span {
  display: block;
}

.smr-user strong {
  font-size: 0.92rem;
}

.smr-user span {
  color: #7b8676;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.smr-logout {
  background: #1f2933;
  color: #ffffff;
}

.smr-tabs {
  display: flex;
  align-items: stretch;
  min-height: 62px;
  background: linear-gradient(90deg, #f2f7eb 0%, #f8faf4 65%, #f0f5e9 100%);
  border-bottom: 2px solid #80ad3c;
}

.smr-shell .nav {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 60px;
  margin: 0;
  padding: 0.5rem 0.4rem;
  border: 0;
  border-right: 1px solid rgba(96, 125, 58, 0.08);
  border-radius: 0;
  background: transparent;
  color: #34432d;
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
}

.smr-shell .nav:hover {
  background: rgba(126, 168, 59, 0.1);
  color: #315f12;
}

.smr-shell .nav.on {
  background: linear-gradient(135deg, #5e8f00, #84ad00);
  color: #ffffff;
}

.smr-shell .brand {
  color: #0d6848;
}

.sso-shell .brand {
  color: #2563eb;
}

.panel {
  padding: 2rem 1.5rem;
}

.panel .kicker {
  margin-bottom: 0.35rem;
}

.smr-shell .kicker {
  color: #16835c;
}

.sso-shell .kicker {
  color: #7c3aed;
}

.page-heading p {
  margin-top: 0.25rem;
  color: #5c6778;
}

.form-card {
  max-width: none;
  margin: 0;
  padding: 1.25rem 1.35rem 1.4rem;
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-radius: 14px;
}

.form-card h2 {
  margin: 0 0 0.9rem;
  color: #24324a;
  font-size: 1.05rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem 1rem;
}

.form-card label {
  margin: 0;
  color: #314056;
  font-size: 0.92rem;
}

.form-card input,
.form-card select {
  margin-top: 0.35rem;
  background: #ffffff;
}

.form-card input[readonly] {
  background: #f4f6fb;
}

.field-note {
  display: block;
  margin-top: 0.35rem;
  color: #6b728a;
  font-size: 0.82rem;
  font-weight: 600;
}

.budget-period {
  margin: 0.8rem 0 0.35rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

.budget-period strong {
  font-weight: 800;
}

.budget-period.is-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* Baki coverage = maklumat boleh proceed (bukan amaran). Elak merah/oren. */
.budget-period.is-balance {
  background: #eef6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.budget-period.is-ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

#budget-source-note {
  white-space: pre-line;
}

#budget-source-note.is-error {
  color: #b91c1c;
  font-weight: 700;
}

#budget-source-note.is-balance {
  color: #1d4ed8;
  font-weight: 600;
}

#budget-source-note.is-ok {
  color: #047857;
  font-weight: 600;
}

.deadline {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin-top: 1.45rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: #eef3ff;
  color: #1d4ed8;
  font-weight: 700;
}

.menu-khas-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0.85rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid #dbe5f3;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
}

.menu-khas-toggle input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  flex: 0 0 auto;
  accent-color: #2563eb;
}

.menu-khas-toggle span {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.menu-khas-toggle strong {
  color: #1e3a8a;
  font-size: 0.95rem;
}

.menu-khas-toggle small {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
}

.menu-khas-toggle:has(input:checked) {
  border-color: #93c5fd;
  background: #eff6ff;
}

.menu-khas-toggle:has(input:disabled) {
  opacity: 0.72;
  cursor: not-allowed;
  background: #f1f5f9;
}

.mk-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
}

.mk-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.mk-row strong {
  color: #1e3a8a;
}

.mk-row small {
  display: block;
  color: #64748b;
  margin-top: 0.15rem;
}

.mk-row button {
  margin: 0;
}

.jamuan-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.jamuan-card {
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.jamuan-card.has-warehouse {
  border-color: #93c5fd;
  background: #f8fbff;
}

.jamuan-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.jamuan-card-head strong {
  color: #1e3a8a;
  font-size: 0.98rem;
}

.jamuan-card-head small {
  display: block;
  margin-top: 0.2rem;
  color: #64748b;
}

.jamuan-amount {
  font-weight: 800;
  color: #0f766e;
  white-space: nowrap;
}

.jamuan-meta {
  margin-top: 0.45rem;
  color: #475569;
  font-size: 0.84rem;
}

.jamuan-pay-line {
  color: #1e3a8a;
  font-weight: 700;
}

.jamuan-actions {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.jamuan-card.is-clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.jamuan-card.is-clickable:hover {
  border-color: #86efac;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.jamuan-head-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.jamuan-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  cursor: pointer;
}

.jamuan-icon-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.jamuan-icon-btn.jamuan-icon-danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff1f2;
}

.jamuan-icon-btn.jamuan-icon-danger:hover {
  background: #ffe4e6;
}

.jamuan-icon-btn[hidden] {
  display: none !important;
}

.jamuan-dialog {
  max-width: 680px;
  width: min(680px, 94vw);
  max-height: none;
  overflow: visible;
  padding: 0.85rem 1rem 1rem;
}

.jamuan-dialog.is-view .format8-edit-actions {
  display: none;
}

.jamuan-dialog.is-view select,
.jamuan-dialog.is-view input[type="date"],
.jamuan-dialog.is-view input[type="checkbox"],
.jamuan-dialog.is-view input[readonly],
.jamuan-dialog.is-view .jamuan-tick {
  pointer-events: none;
  caret-color: transparent;
}

.jamuan-dialog.is-view select {
  background: #f8fafc;
  color: #0f172a;
}

.jamuan-dialog-body {
  padding: 0;
  max-height: none;
  overflow: visible;
}

.jamuan-dialog-body .form-grid {
  gap: 0.55rem 0.85rem;
}

.jamuan-dialog-body .form-grid > label {
  margin-top: 0;
}

.jamuan-dialog-body .span-2 {
  grid-column: 1 / -1;
}

/* label { display:block } overrides HTML hidden — force hide */
.jamuan-ep-rate-wrap[hidden] {
  display: none !important;
}

.jamuan-dialog-body #jamuan-wh-budget:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.jamuan-wh-toggle {
  margin-top: 0.65rem;
  margin-bottom: 0;
}

.jamuan-budget-row {
  margin-top: 0.55rem;
}

.jamuan-pay-panel {
  margin-top: 0.65rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #f8fbff;
}

.jamuan-pay-panel[hidden] {
  display: none !important;
}

.jamuan-pay-label {
  margin: 0 0 0.45rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e3a8a;
}

.jamuan-pay-ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
}

.jamuan-tick {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}

.jamuan-tick input {
  width: auto;
  min-height: 0;
  margin: 0;
}

.jamuan-dialog .format8-edit-head {
  margin-bottom: 0.55rem;
}

.jamuan-dialog .format8-edit-actions {
  margin-top: 0.7rem;
}

.rule-box {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #f7f5ff;
  color: #3b3658;
}

.rule-box p {
  margin: 0.4rem 0 0;
}

.money {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.money span {
  font-weight: 800;
  color: #24324a;
}

.money input {
  margin-top: 0;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.form-actions button {
  min-width: 140px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.order-message {
  margin: 1rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
}

#weekly-budget-section,
#special-menu-budget-section {
  margin-top: 1.2rem;
}

.detail-head,
.info-strip {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.detail-head p {
  margin-top: 0.25rem;
  color: #5c6778;
}

.detail-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

#edit-order-info,
.ghost-button {
  margin: 0.8rem 0 0;
  background: #ffffff;
  color: #5b3cc4;
  border: 1px solid #d4c6f5;
}

.detail-head-actions #edit-order-info,
.detail-head-actions #discard-order-draft {
  margin: 0;
}

.detail-head-actions .danger-ghost,
button.danger-ghost {
  border-color: #f1c4c4;
  background: #fff5f5;
  color: #b91c1c;
}

.info-strip {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-radius: 14px;
}

.info-strip div {
  min-width: 140px;
}

.late-delivery-panel {
  margin: 0.85rem 0 1rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
}

.late-delivery-panel[hidden] {
  display: none !important;
}

.late-delivery-panel.reported {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}

.late-delivery-panel strong,
.late-delivery-panel span {
  display: block;
}

.late-delivery-panel span {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.late-delivery-panel .solid {
  margin-top: 0.75rem;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.2rem 0 1rem;
}

.order-actions[hidden],
#order-float[hidden],
#order-view .item-panel[hidden] {
  display: none !important;
}

.info-strip span,
.summary-card span {
  display: block;
  color: #6b728a;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.search-line {
  display: block;
  max-width: 420px;
  margin-top: 0.4rem;
}

/* Freeze maklumat sekolah + carian semasa scroll order detail */
.order-sticky-bar {
  position: sticky;
  top: 0;
  z-index: 25;
  padding: 0.65rem 0.85rem 0.85rem;
  margin: 0 0 0.75rem;
  background: #f5f6fb;
  border: 1px solid #e4e8f2;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.order-sticky-bar .info-strip {
  margin: 0;
}

.order-sticky-bar .search-line {
  margin-top: 0.7rem;
  max-width: 480px;
}

.summary-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: stretch;
  margin: 0;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-top: 1px solid #d9deea;
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.08);
}

.summary-bar.is-hidden,
.summary-bar[hidden] {
  display: none !important;
}

#order-detail {
  padding-bottom: 150px;
}

.item-group-head {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  background: #eef3ff;
  color: #24324a;
}

.item-group-body {
  overflow: auto;
}

.item-row td strong,
.item-row td small {
  display: block;
}

.item-row td small {
  color: #6b728a;
  font-size: 0.75rem;
}

.item-row input,
.item-row select {
  width: 100%;
  min-width: 0;
}

/* Elak spinner up/down pada kuantiti (type=number) — guna text field */
.item-qty,
.item-stock-qty {
  -moz-appearance: textfield;
  appearance: textfield;
}

.item-qty::-webkit-outer-spin-button,
.item-qty::-webkit-inner-spin-button,
.item-stock-qty::-webkit-outer-spin-button,
.item-stock-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.item-group[hidden] {
  display: none !important;
}

.summary-card {
  flex: 1 1 140px;
  padding: 0.75rem 0.85rem;
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-radius: 12px;
}

.summary-card.total {
  background: #eef3ff;
}

.summary-card strong,
.summary-card small {
  display: block;
}

.summary-card small {
  margin-top: 0.2rem;
  color: #5c6778;
}

.summary-meter {
  height: 6px;
  margin: 0.4rem 0 0.15rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf5;
}

.summary-meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #2867e8;
  transition: width 0.2s ease, background 0.2s ease;
}

.summary-card[data-budget-card="SEAFOOD"] .summary-meter span {
  background: #7c3aed;
}

.summary-card[data-budget-card].is-warn .summary-meter span {
  background: #eab308;
}

.summary-card[data-budget-card].is-over .summary-meter span {
  background: #dc2626;
}

.summary-card[data-budget-card].is-warn small {
  color: #a16207;
}

.summary-card[data-budget-card].is-over small,
.summary-card small.is-over {
  color: #dc2626;
  font-weight: 700;
}

#finalize-order {
  margin: 0;
  align-self: center;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

#finalize-message {
  white-space: pre-line;
  color: #b91c1c;
  font-weight: 600;
}

#finalize-order:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.order-saved-panel {
  margin-top: 1rem;
  padding: 1.1rem 1.2rem;
  border: 2px solid #15803d;
  background: #ecfdf5;
  color: #14532d;
}

.order-saved-panel strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.order-saved-panel p {
  margin: 0 0 0.9rem;
  line-height: 1.45;
}

.order-saved-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.page-row,
.filter-row,
.kpi-row,
.choice-grid,
.range-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.page-row {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.page-row h1,
.panel h1 {
  margin-bottom: 0.35rem;
}

.filter-row label {
  margin: 0;
  flex: 1 1 180px;
  min-width: 180px;
  font-size: 0.85rem;
}

.filter-row label:first-child {
  flex: 2 1 260px;
}

.filter-row select,
.filter-row input {
  margin-top: 0.3rem;
}

.filter-row > select {
  width: auto;
  flex: 0 0 auto;
}

.filter-row > select.month-select {
  width: 11.5rem;
}

.filter-row > select.year-select {
  width: 8rem;
}

.ghost,
.solid {
  margin: 0;
  min-height: 46px;
}

.ghost {
  background: #ffffff;
  color: #314056;
  border: 1px solid #d5dbe6;
}

.smr-shell .solid {
  background: linear-gradient(135deg, #5e8f00, #84ad00);
}

.sso-shell .solid {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.kpi {
  flex: 1 1 140px;
  min-height: 88px;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e4e8f2;
}

.kpi strong,
.kpi span {
  display: block;
}

.kpi strong {
  font-size: 1.8rem;
}

.kpi.green { background: #16835c; color: #ffffff; }
.kpi.blue { background: #2563eb; color: #ffffff; }
.kpi.yellow { background: #eab308; color: #1f2933; }
.kpi.red { background: #ef4444; color: #ffffff; }
.kpi.chase { background: #f8fafc; }

.smr-shell .kpi strong {
  font-size: 1.35rem;
}

.smr-shell .stock-row {
  cursor: pointer;
}

.smr-shell td.stock-neg {
  color: #b91c1c;
  font-weight: 700;
}

button.kpi {
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

button.kpi.on {
  border-color: #7c3aed;
  box-shadow: inset 0 0 0 2px #7c3aed;
}

button.exp-kpi-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  cursor: pointer;
}
button.exp-kpi-btn:hover {
  border-color: #86a87a;
}
.exp-kpi-sub {
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1f7a4d;
}
.exp-kpi-note {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}
.exp-cat-note {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}
.exp-total-row td {
  font-weight: 800;
  border-top: 2px solid #dbe4ee;
}
button.linkish {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #166534;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.hint {
  margin: 0.2rem 0 1rem;
  color: #5c6778;
}

.sheet,
.table-wrap {
  margin-top: 1rem;
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-radius: 14px;
}

.sheet,
.table-wrap {
  overflow: auto;
}

.sheet {
  padding: 1rem 1.1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.7rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid #eef2f7;
}

th {
  color: #526075;
  font-size: 0.82rem;
}

.table-title {
  margin: 1.1rem 0 0.4rem;
  font-size: 1rem;
}

.split {
  display: flex;
  height: 14px;
  margin: 0.8rem 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.split-on { width: 50%; background: #16835c; }
.split-off { width: 50%; background: #f87171; }

.smr-dash-table-wrap {
  margin-top: 0.7rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.smr-dash-table {
  border-collapse: collapse;
  width: 100%;
}
.smr-dash-table thead th {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.62rem 0.72rem;
}
table.smr-dash-table tbody td {
  border-bottom: 1px solid #eef2f7;
  padding: 0.52rem 0.72rem;
  color: #1f2933;
  font-size: 0.86rem;
  font-weight: 400;
  vertical-align: middle;
}
table.smr-dash-table tbody tr.smr-dash-row > td,
table.smr-dash-table tbody tr.smr-dash-row:nth-child(even) > td,
table.smr-dash-table tbody tr.smr-dash-row:nth-child(odd) > td {
  background: #fff;
  background-color: #fff;
}
table.smr-dash-table tbody tr:last-child td {
  border-bottom: 0;
}
table.smr-dash-table tbody tr.smr-dash-row {
  cursor: pointer;
}
table.smr-dash-table tbody tr.smr-dash-row:hover > td,
table.smr-dash-table tbody tr.smr-dash-row:nth-child(even):hover > td,
table.smr-dash-table tbody tr.smr-dash-row:nth-child(odd):hover > td {
  background: #f8fafc;
  background-color: #f8fafc;
}
.smr-dash-school,
.smr-dash-pic,
.smr-dash-exp {
  font-weight: 400;
  color: #1f2933;
}
table.smr-dash-table td.smr-dash-score {
  font-size: 0.86rem;
  font-weight: 700;
  text-align: right;
}
table.smr-dash-table tbody tr.smr-dash-row > td.smr-dash-score.green,
table.smr-dash-table tbody tr.smr-dash-row:nth-child(even) > td.smr-dash-score.green,
table.smr-dash-table tbody tr.smr-dash-row:nth-child(odd) > td.smr-dash-score.green,
table.smr-dash-table tbody tr.smr-dash-row:hover > td.smr-dash-score.green {
  background: #c6efce;
  background-color: #c6efce;
  color: #188038;
}
table.smr-dash-table tbody tr.smr-dash-row > td.smr-dash-score.blue,
table.smr-dash-table tbody tr.smr-dash-row:nth-child(even) > td.smr-dash-score.blue,
table.smr-dash-table tbody tr.smr-dash-row:nth-child(odd) > td.smr-dash-score.blue,
table.smr-dash-table tbody tr.smr-dash-row:hover > td.smr-dash-score.blue {
  background: #e8f0fe;
  background-color: #e8f0fe;
  color: #1a73e8;
}
table.smr-dash-table tbody tr.smr-dash-row > td.smr-dash-score.yellow,
table.smr-dash-table tbody tr.smr-dash-row:nth-child(even) > td.smr-dash-score.yellow,
table.smr-dash-table tbody tr.smr-dash-row:nth-child(odd) > td.smr-dash-score.yellow,
table.smr-dash-table tbody tr.smr-dash-row:hover > td.smr-dash-score.yellow {
  background: #fef7e0;
  background-color: #fef7e0;
  color: #b06000;
}
table.smr-dash-table tbody tr.smr-dash-row > td.smr-dash-score.red,
table.smr-dash-table tbody tr.smr-dash-row:nth-child(even) > td.smr-dash-score.red,
table.smr-dash-table tbody tr.smr-dash-row:nth-child(odd) > td.smr-dash-score.red,
table.smr-dash-table tbody tr.smr-dash-row:hover > td.smr-dash-score.red {
  background: #fce8e6;
  background-color: #fce8e6;
  color: #c5221f;
}
.smr-dash-tag {
  display: inline;
  padding: 0.05em 0.35em;
  border-radius: 4px;
  font-size: 0.86em;
  font-weight: 600;
  line-height: inherit;
  white-space: nowrap;
}
.smr-dash-tag.ok {
  background: #d1fae5;
  color: #047857;
}
.smr-dash-tag.warn {
  background: #fef3c7;
  color: #b45309;
}
.smr-dash-tag.bad {
  background: #fee2e2;
  color: #b91c1c;
}
.smr-rank-report .smr-dash-table tbody tr.smr-dash-row,
.smr-rank-report .smr-dash-table tbody tr.smr-dash-row:hover {
  cursor: default;
}

.smr-score-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow: auto;
}
.smr-score-detail-overlay[hidden] {
  display: none !important;
}
.smr-score-detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
}
.smr-score-detail {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  margin: 6vh auto 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(41, 77, 19, 0.18);
}
.smr-score-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  background: linear-gradient(135deg, #5e8f00, #84ad00);
  color: #fff;
  border-radius: 16px 16px 0 0;
}
.smr-score-detail-head h3 {
  margin: 0 0 4px;
  font-size: 20px;
  color: #fff;
}
.smr-score-detail-head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
}
.smr-score-detail-close {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}
#smr-score-detail-body {
  padding: 16px 18px 20px;
}
.smr-score-detail-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.smr-score-detail-cards div {
  background: #f4f8ee;
  border-radius: 10px;
  padding: 12px 14px;
}
.smr-score-detail-cards span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #7c9c57;
}
.smr-score-detail-cards strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
  color: #294d13;
}
.smr-score-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.smr-score-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #f2f7eb;
  color: #315f12;
}
.smr-score-chip.warn {
  background: #fef3c7;
  color: #92400e;
}
.smr-score-chip.bad {
  background: #fee2e2;
  color: #991b1b;
}
.smr-score-detail h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #294d13;
}
.smr-score-detail-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 14px;
}
.smr-score-detail-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #6b7280;
  padding: 6px 8px;
  border-bottom: 1px solid #e5e7eb;
}
.smr-score-detail-table td {
  padding: 9px 8px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
}
.smr-score-detail-table td.pct {
  text-align: right;
}
.smr-score-detail-table td.pct span {
  display: inline-block;
  min-width: 4.6rem;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 800;
  text-align: right;
}
.smr-score-detail-table td.pct span.ok {
  background: #dcfce7;
  color: #15803d;
}
.smr-score-detail-table td.pct span.mid {
  background: #fef3c7;
  color: #a16207;
}
.smr-score-detail-table td.pct span.over {
  background: #fecaca;
  color: #b91c1c;
}
.smr-score-detail-note {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.45;
}
.smr-score-detail-empty {
  margin: 0;
  color: #4b5563;
  font-size: 13px;
}

.smr-score-report-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.smr-score-report-overlay[hidden],
.smr-score-dl-overlay[hidden] {
  display: none !important;
}
.smr-score-report-backdrop,
.smr-score-dl-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.smr-score-dl-overlay {
  z-index: 95;
  display: grid;
  place-items: center;
}
.smr-score-report-dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, 96vw);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}
.smr-score-report-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, #5e8f00, #84ad00);
  color: #fff;
  border-radius: 16px 16px 0 0;
}
.smr-score-report-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
  color: #fff;
}
.smr-score-report-head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.86rem;
}
.smr-score-report-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.smr-score-report-head .ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.smr-score-report-filters {
  display: flex;
  gap: 0.7rem;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 1rem 1.15rem 0.4rem;
}
.smr-score-report-filters label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #4b5563;
}
.smr-score-report-filters select {
  min-width: 220px;
  min-height: 2.4rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}
.smr-score-report-body {
  padding: 0.4rem 1.15rem 1.15rem;
  overflow: auto;
  max-height: min(70vh, 640px);
}
.smr-score-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.smr-score-report-table th,
.smr-score-report-table td {
  border: 1px solid #e5e7eb;
  padding: 0.65rem 0.75rem;
  text-align: left;
  background: #f9fafb;
}
.smr-score-report-table th {
  font-weight: 700;
  background: #eef2f7;
}
.smr-score-report-table td.item {
  font-weight: 600;
  min-width: 7rem;
}
.smr-score-report-table tr.is-score td {
  font-weight: 800;
}
.smr-score-report-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#smr-score-report-body .smr-score-grid th,
#smr-score-report-body .smr-score-grid td {
  border-color: #d5e4b0;
  vertical-align: middle;
}
#smr-score-report-body .smr-score-grid th {
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, #84ad00, #5e8f00);
  border-color: #4f7a00;
}
#smr-score-report-body .smr-score-grid td {
  background: #fff;
}
#smr-score-report-body .smr-score-grid tbody tr:nth-child(even) td {
  background: #f4f8ee;
}
#smr-score-report-body .smr-score-grid td.item {
  color: #3f5c12;
  background: #f7faef;
}
#smr-score-report-body .smr-score-grid tbody tr:nth-child(even) td.item {
  background: #e7f0d4;
}
#smr-score-report-body .smr-score-grid tbody tr.is-score td {
  font-weight: 800;
  color: #243b00;
  background: #c5e07a;
}
#smr-score-report-body .smr-score-grid tbody tr.is-score td.item {
  background: #b7d45e;
  color: #1f3300;
}
.hl-payroll-table th,
.hl-payroll-table td {
  border-color: #d5e4b0;
}
.hl-payroll-table th {
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, #84ad00, #5e8f00);
  border-color: #4f7a00;
}
.hl-payroll-table td {
  background: #fff;
}
.hl-payroll-table tbody tr:nth-child(even) td {
  background: #f4f8ee;
}
.hl-payroll-table td.item {
  color: #3f5c12;
  background: #f7faef;
}
#hl-payroll-body .hl-payroll-table tr.is-status td {
  text-align: center;
  vertical-align: middle;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: #2f4a00;
  background: #d7eb9a;
}
#hl-payroll-body .hl-payroll-table tr.is-status td::before {
  content: none;
  display: none;
}
#hl-payroll-body .hl-payroll-table tr.is-total td {
  font-weight: 800;
  color: #243b00;
  background: #c5e07a;
}
#hl-payroll-body .hl-payroll-table tr.is-total td.item,
#hl-payroll-body .hl-payroll-table tr.is-status td.item {
  background: #b7d45e;
  color: #1f3300;
}
.smr-score-dl-card {
  position: relative;
  z-index: 1;
  width: min(360px, 92vw);
  padding: 1.1rem 1.2rem 1.15rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}
.smr-score-dl-card h3 {
  margin: 0 0 0.35rem;
}
.smr-score-dl-card p {
  margin: 0 0 0.9rem;
  color: #4b5563;
}
.smr-score-dl-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
#smr-score-report-status {
  padding: 0 1.15rem;
}

.smr-dash-heading {
  position: relative;
  padding-left: 0.85rem;
  margin: 0 0 1.15rem;
  border-left: 4px solid #7cb518;
}
.smr-dash-heading .kicker {
  margin: 0 0 0.2rem;
  color: #7cb518;
  letter-spacing: 0.1em;
}
.smr-dash-heading h1 {
  margin: 0;
}
.smr-dash-approve {
  margin: 0 0 1.25rem;
  padding: 1.05rem 1.2rem 1.1rem;
  border: 1px solid #e8edf2;
  border-radius: 18px;
  background: #fff;
}
.smr-dash-approve-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.smr-dash-approve-top h2 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1f2933;
}
.smr-dash-approve-ico {
  display: inline-block;
  width: 1rem;
  height: 1.15rem;
  flex-shrink: 0;
  background:
    linear-gradient(#94a3b8, #94a3b8) 20% 28% / 60% 8% no-repeat,
    linear-gradient(#94a3b8, #94a3b8) 20% 50% / 60% 8% no-repeat,
    linear-gradient(#94a3b8, #94a3b8) 20% 72% / 42% 8% no-repeat,
    #fff;
  border: 1.5px solid #94a3b8;
  border-radius: 2px 3px 2px 2px;
}
.smr-dash-approve-access {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0.5rem 0 0;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: #f3f6f0;
  color: #3f7d12;
  font-size: 0.75rem;
  font-weight: 700;
}
.smr-dash-approve-access::before {
  content: '✓';
  font-size: 0.72rem;
}
.smr-dash-approve-count {
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  background: #f3f6f0;
  color: #3f4a3a;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.smr-dash-approve-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.85rem 0 0.55rem;
}
.smr-dash-chip {
  margin: 0;
  min-height: 34px;
  padding: 0 0.9rem;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  background: #fff;
  color: #314056;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.smr-dash-chip.on {
  background: #2f6d12;
  border-color: #2f6d12;
  color: #fff;
}
.smr-dash-refresh {
  margin-left: auto;
}
.smr-dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0.4rem 0 1rem;
}
.smr-dash-toolbar .filter-row {
  align-items: center;
}
.smr-dash-toolbar .ghost,
.smr-dash-toolbar .solid {
  min-height: 42px;
}
.smr-dash-stamp {
  margin: 0;
  color: #7b8676;
  font-size: 0.82rem;
  text-align: right;
}
.smr-dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0.4rem 0 1.35rem;
}
.smr-dash-kpi {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  margin: 0;
  border: 0;
  border-radius: 18px;
  color: #fff;
  cursor: pointer;
  box-shadow: none;
}
.smr-dash-kpi strong {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
}
.smr-dash-kpi.green { background: #22c55e; }
.smr-dash-kpi.blue { background: #3b82f6; }
.smr-dash-kpi.yellow { background: #facc15; color: #1f2933; }
.smr-dash-kpi.red { background: #fca5a5; color: #7f1d1d; }
.smr-dash-kpi.on {
  box-shadow: inset 0 0 0 3px rgba(15, 23, 42, 0.28);
}
.smr-dash-sasaran {
  margin: 0 0 1.4rem;
  padding: 0.4rem 0 0.2rem;
  text-align: center;
}
.smr-dash-sasaran h2 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1f2933;
}
.smr-dash-sasaran .split {
  max-width: 36rem;
  height: 10px;
  margin: 0 auto 1rem;
}
.smr-dash-sasaran-nums,
.smr-dash-extrema {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  flex-wrap: wrap;
}
.smr-dash-sasaran-nums strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
}
.smr-dash-sasaran-nums span,
.smr-dash-extrema span {
  display: block;
  color: #7b8676;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.smr-dash-extrema {
  margin-top: 1.15rem;
}
.smr-dash-extrema strong {
  display: block;
  margin-top: 0.2rem;
  color: #526075;
  font-size: 0.82rem;
  font-weight: 700;
}
.smr-dash-extrema b {
  display: block;
  font-size: 1.55rem;
  color: #1f2933;
}
.smr-dash-hint {
  margin: 0 0 0.45rem;
  color: #7b8676;
  font-size: 0.82rem;
}
@media (max-width: 720px) {
  .smr-dash-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .smr-dash-kpi strong {
    font-size: 1.8rem;
  }
  .smr-dash-stamp {
    text-align: left;
  }
}

.split-legend,
.range-row {
  justify-content: space-between;
}

.split-legend strong,
.range-row strong,
.student-pill strong {
  display: block;
}

.student-pill,
.status-pill {
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e4e8f2;
  font-weight: 800;
}

.choice-grid button {
  margin: 0;
  min-width: 180px;
  min-height: 72px;
  background: #ffffff;
  color: #24324a;
  border: 1px solid #e4e8f2;
}

.smr-shell .choice-grid button.on {
  background: #eaf8f1;
  color: #0d6848;
  border-color: #16835c;
}

#local-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 5;
  max-width: 360px;
}

.item-group {
  margin-top: 0.8rem;
  padding: 0.8rem 0.9rem;
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-radius: 14px;
}

.item-group h2 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}

.item-row {
  display: table-row;
}

.item-row select,
.item-row input {
  margin: 0;
}

.item-price {
  font-weight: 400;
}

.item-line {
  font-weight: 600;
}

@media (max-width: 980px) {
  .smr-tabs,
  .sso-tabs {
    flex-wrap: wrap;
  }

  .smr-shell .nav,
  .sso-shell .nav {
    flex: 1 1 160px;
  }
}

.status-banner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid #dbe5f3;
  border-radius: 16px;
  background: linear-gradient(90deg, #f3f6ff 0%, #ffffff 42%, #fff7ed 100%);
}

.status-banner span,
.report-banner span {
  display: block;
  color: #5b6b88;
  font-size: 0.75rem;
  font-weight: 700;
}

.report-banner {
  display: block;
  margin-top: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid #dbe5f3;
  border-radius: 16px;
  background: linear-gradient(90deg, #f3f6ff 0%, #ffffff 55%, #fff7ed 100%);
}

.report-banner h2 {
  margin: 0.15rem 0;
  white-space: nowrap;
}

.status-banner h2 {
  margin: 0.15rem 0;
}

.status-banner p,
.report-banner p {
  margin: 0;
  color: #5c6778;
}

.status-banner > strong {
  min-width: 4.2rem;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(21, 49, 92, 0.08);
  font-size: 1.8rem;
  text-align: center;
}

.order-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.case-card {
  padding: 1rem 1.05rem 0.9rem;
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-left: 4px solid #7c3aed;
  border-radius: 16px;
  cursor: pointer;
}

.case-top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.case-top strong {
  color: #1d4ed8;
  font-size: 1.02rem;
  font-weight: 600;
  white-space: nowrap;
}

.case-top div div {
  margin-top: 0.15rem;
  font-weight: 800;
}

.case-badge {
  flex: 0 0 auto;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: #f3eefe;
  color: #6d28d9;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
}

.case-badge.over {
  background: #fff7ed;
  color: #c2410c;
}

.case-badge.late {
  background: #fef2f2;
  color: #b91c1c;
}

.case-badge.warehouse {
  background: #fffaf0;
  color: #9a6500;
}

.case-note {
  margin: 0.75rem 0 0;
  color: #475569;
}

.case-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: baseline;
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px solid #eef2f7;
}

.case-foot b {
  color: #b45309;
}

.case-foot span {
  color: #64748b;
  font-size: 0.85rem;
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.case-actions .solid,
.case-actions .ghost {
  margin: 0;
}

.approval-board {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sso-amend-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 1rem;
  margin: 0.35rem 0 0.15rem;
}

.sso-amend-list-head h2 {
  margin: 0;
}

.sso-amend-approvals {
  margin: 0.35rem 0 0;
  padding: 0.85rem 0.95rem 1rem;
  border: 1px solid #ddd6fe;
  border-radius: 14px;
  background: linear-gradient(180deg, #f5f3ff 0%, #fff 55%);
}

.sso-amend-school {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.55rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #ede9fe;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sso-amend-school:first-child {
  margin-top: 0;
}

.sso-amend-school:hover,
.sso-amend-school:focus-visible {
  border-color: #c4b5fd;
  box-shadow: 0 6px 16px rgba(91, 33, 182, 0.1);
  outline: none;
}

.sso-amend-school strong {
  display: block;
  font-size: 0.98rem;
  color: #5b21b6;
}

.sso-amend-meta {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.82rem;
}

.sso-amend-open-hint {
  flex-shrink: 0;
  color: #6d28d9;
  font-size: 0.85rem;
  font-weight: 700;
}

.sso-amend-dialog {
  max-width: 52rem;
}

.sso-amend-body {
  max-height: min(70vh, 36rem);
  overflow: auto;
}

.sso-amend-body .approval-panel {
  padding-top: 0.25rem;
  border-bottom: none;
}

.sso-amend-body .approval-badge:empty {
  display: none;
}

.approval-panel {
  padding: 1.1rem 0 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  background: transparent;
}

.approval-panel:last-child {
  border-bottom: none;
}

.approval-head {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  align-items: flex-start;
}

.approval-order-id {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: #2563eb;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}

.approval-school {
  display: block;
  margin-top: 0.15rem;
  color: #111827;
  font-weight: 700;
}

.approval-badge {
  flex: 0 0 auto;
  color: #6d28d9;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.approval-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1.5rem;
  margin: 0.85rem 0 0;
}

.approval-meta > div {
  min-width: 0;
}

.approval-meta dt {
  margin: 0;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 400;
}

.approval-meta dd {
  margin: 0.1rem 0 0;
  color: #111827;
  font-weight: 400;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.approval-note {
  margin: 0.75rem 0 0;
  color: #4b5563;
  font-weight: 400;
}

.approval-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: baseline;
  margin-top: 0.75rem;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 400;
}

.approval-rise {
  color: #b45309;
  font-weight: 500;
}

.amend-change-box {
  margin-top: 0.85rem;
  padding: 0;
  background: transparent;
  border: none;
}

.amend-change-title {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6b7280;
}

.amend-change-list {
  display: grid;
  gap: 0;
  border-top: 1px solid #e5e7eb;
}

.amend-change-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1.2fr) auto auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid #eef2f7;
  background: transparent;
}

.amend-change-row.is-approve {
  background: #f0fdf4;
}

.amend-change-row.is-reject {
  background: #fef2f2;
}

.amend-item-decide {
  display: inline-flex;
  gap: 0.3rem;
}

.amend-decide-btn {
  margin: 0;
  padding: 0.3rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.amend-decide-btn.on[data-decide='APPROVE'] {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.amend-decide-btn.on[data-decide='REJECT'] {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.amend-change-row em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

.amend-change-row.add em {
  background: #dcfce7;
  color: #166534;
}

.amend-change-row.remove em {
  background: #fee2e2;
  color: #b91c1c;
}

.amend-change-row.change em {
  background: #ffedd5;
  color: #c2410c;
}

.amend-change-name {
  display: block;
  font-weight: 400;
  color: #111827;
}

.amend-change-row small {
  display: block;
  color: #6b7280;
  font-weight: 400;
}

.amend-change-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: #374151;
  text-align: right;
  white-space: nowrap;
}

.amend-dir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.amend-dir.up {
  background: #fee2e2;
  color: #dc2626;
}

.amend-dir.down {
  background: #dcfce7;
  color: #16a34a;
}

.amend-dir.same {
  background: #f3f4f6;
  color: #6b7280;
}

@media (max-width: 720px) {
  .approval-meta {
    grid-template-columns: 1fr;
  }

  .amend-change-row {
    grid-template-columns: auto 1fr;
  }

  .amend-change-qty,
  .amend-item-decide {
    grid-column: 1 / -1;
    text-align: left;
  }
}

.order-card {
  padding: 1rem 1.05rem 0.9rem;
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-left: 4px solid #2563eb;
  border-radius: 16px;
  cursor: pointer;
}

.order-card-id {
  padding: 0;
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.order-card-details.pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.doc-link {
  margin-top: 0.75rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid #d5dbe8;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2937;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.doc-table .doc-link {
  display: inline-block;
  max-width: 100%;
  margin-top: 0;
  white-space: normal;
  line-height: 1.15;
  text-align: center;
}

.doc-table .doc-link.upload {
  padding: 0.45rem 0.55rem;
  border: 0;
  background: #6d28d9;
  color: #ffffff;
  font-weight: 600;
}

.doc-table .doc-link.upload:disabled {
  background: #f3e8ff;
  color: #7c3aed;
  cursor: default;
  opacity: 1;
}

.doc-table .doc-link.view {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.order-card-school {
  margin-top: 0.15rem;
  font-weight: 800;
}

.order-card-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.order-card-details div,
.ordered-item .facts div,
#order-meta div {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: #f8fafc;
}

.order-card-details span,
.ordered-item .facts span,
#order-meta span {
  display: block;
  color: #6b728a;
  font-size: 0.75rem;
}

.order-card-details small,
.warehouse-status small {
  display: block;
  color: #64748b;
}

.warehouse-status {
  margin-top: 0.8rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
}

.warehouse-status span {
  display: block;
  color: #45607f;
  font-size: 0.75rem;
  font-weight: 800;
}

.warehouse-status.pending {
  background: #fffaf0;
  border: 1px solid #f1d7a5;
}

.warehouse-status.pending strong {
  color: #9a6500;
}

.warehouse-status.amend-lock {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
}

.warehouse-status.amend-lock strong {
  color: #6d28d9;
}

.warehouse-status.received {
  background: #f0fbf4;
  border: 1px solid #b7e4c7;
}

.warehouse-status.received strong {
  color: #17733b;
}

.order-card .ghost {
  margin-top: 0.75rem;
}

.order-float {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1.15fr 1.15fr 0.9fr 0.9fr 0.95fr;
  gap: 0.6rem;
  margin: 0.8rem 0 1rem;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #dbe5f3;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(21, 49, 92, 0.12);
}

.float-card {
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid #dce5f2;
  border-top-width: 4px;
  border-radius: 11px;
  background: #ffffff;
}

.float-card span,
.float-card small,
.float-card em,
.float-card b {
  display: block;
  font-style: normal;
}

.float-card span {
  color: #435b7b;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.float-card strong {
  display: block;
  margin-top: 0.2rem;
  color: #173b73;
  font-size: 1rem;
}

.float-card small,
.float-card em {
  color: #334155;
  font-size: 0.75rem;
  font-weight: 600;
}

.float-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
}

.float-card b {
  color: #26364d;
  font-size: 0.75rem;
}

.float-bar {
  height: 5px;
  margin: 0.35rem 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf5;
}

.float-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.float-card.groceries { border-top-color: #2867e8; background: #f5f8ff; }
.float-card.seafood { border-top-color: #8746ef; background: #faf6ff; }
.float-card.meat { border-top-color: #dfaa13; background: #fff9e8; }
.float-card.chicken { border-top-color: #cfd8e7; }
.float-card.menukhas { border-top-color: #0f766e; background: #f0fdfa; }
.float-card.grand { border-top-color: #7044ef; background: #f6f4ff; }
.float-card.groceries .float-bar span { background: #2867e8; }
.float-card.seafood .float-bar span { background: #8746ef; }
.float-card.menukhas .float-bar span { background: #0f766e; }
.float-card .float-bar span.is-warn,
.float-card.is-warn .float-bar span { background: #eab308; }
.float-card .float-bar span.is-over,
.float-card.is-over .float-bar span { background: #dc2626; }
.float-card em.is-over { color: #dc2626; font-weight: 700; }

.item-panel {
  margin-top: 1rem;
  padding: 1rem 1.1rem 1.2rem;
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-radius: 16px;
}

.item-panel h2 {
  margin: 0;
}

.item-panel p {
  margin: 0.25rem 0 0;
  color: #6b728a;
}

.ordered-item {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(96px, 0.7fr));
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eef2f7;
}

.ordered-item.has-report {
  grid-template-columns: minmax(170px, 1.3fr) repeat(4, minmax(88px, 0.62fr)) auto;
}

.ordered-item .facts {
  display: contents;
}

.report-button {
  margin: 0;
  padding: 0.45rem 0.75rem;
  background: #ffffff;
  color: #e11d48;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.ordered-item strong,
.ordered-item small {
  display: block;
}

.ordered-item small {
  color: #6b728a;
}

.ordered-item .amend-qty {
  width: 100%;
  min-width: 0;
  margin-top: 0.2rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid #cad5e4;
  border-radius: 8px;
  font: inherit;
}

.amend-uom-pick {
  width: 100%;
  min-width: 120px;
  margin-top: 0.2rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid #cad5e4;
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.amend-add-btn {
  white-space: nowrap;
  padding: 0.45rem 0.85rem;
}

.amend-item-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
}

.amend-item-modal[hidden] {
  display: none !important;
}

.custom-item-dialog {
  max-width: 520px;
  width: min(520px, 94vw);
}

.custom-item-form {
  margin-top: 0.75rem;
}

.custom-item-form .span-2 {
  grid-column: 1 / -1;
}

.amend-item-dialog {
  width: min(640px, 100%);
  max-height: min(84vh, 720px);
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.2rem 1.2rem;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.2);
}

.amend-item-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.amend-item-head h2 {
  margin: 0;
}

.amend-item-head p {
  margin: 0.3rem 0 0;
  color: #6b728a;
  font-size: 0.9rem;
}

#amend-item-search {
  width: 100%;
  margin: 0.9rem 0 0.45rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #cad5e4;
  border-radius: 10px;
  font: inherit;
}

#amend-item-count {
  margin: 0 0 0.45rem;
}

.amend-item-list {
  overflow: auto;
  flex: 1;
  min-height: 180px;
  padding-right: 0.15rem;
}

.amend-pick-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.4fr) minmax(130px, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.7rem 0.15rem;
  border-top: 1px solid #eef2f7;
}

.amend-pick-row strong,
.amend-pick-row small {
  display: block;
}

.amend-pick-row small {
  color: #6b728a;
}

.amend-pick-meta {
  min-width: 0;
}

@media (max-width: 640px) {
  .amend-pick-row {
    grid-template-columns: 1fr;
  }

  .amend-add-btn {
    width: 100%;
  }
}

#order-item-search {
  width: min(280px, 100%);
  margin: 0;
}

#order-view {
  padding-bottom: 2rem;
}

@media (max-width: 800px) {
  .grid,
  .topbar,
  .shell-body,
  .form-grid,
  .order-card-grid,
  .order-float,
  .order-card-details {
    grid-template-columns: 1fr;
    display: grid;
  }

  .ordered-item,
  .ordered-item.has-report {
    display: block;
  }

  .ordered-item .facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-top: 0.55rem;
  }
}

.master-note {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: #eef4ff;
  color: #334155;
}

.master-actions {
  display: flex;
  gap: 0.5rem;
}

.master-actions .ghost {
  background: #ffffff;
}

.master-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.master-stat {
  flex: 1 1 140px;
  min-height: 84px;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: 16px;
  background: #f3e8ff;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.master-stat.is-item {
  background: #e8f1ff;
  cursor: default;
}

.master-stat.is-uom {
  background: #f3e8ff;
}

.master-stat span {
  display: block;
  color: #64748b;
  font-weight: 700;
}

.master-stat strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.8rem;
}

.master-stat.on {
  box-shadow: inset 0 0 0 2px #7c3aed;
}

.master-board {
  margin-top: 1rem;
  padding: 1rem 1.1rem 1.2rem;
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-radius: 16px;
}

.master-board h2 {
  margin: 0;
}

.master-board p {
  margin: 0.2rem 0 0.8rem;
  color: #6b728a;
}

.master-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  width: 100%;
  margin: 0 0 0.55rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 0;
  border-radius: 14px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.master-row strong,
.master-row small {
  display: block;
}

.master-row small {
  color: #6b728a;
}

.master-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.master-chips em {
  font-style: normal;
  color: #2563eb;
  font-weight: 700;
}

.master-badge {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-weight: 800;
  white-space: nowrap;
}

.master-badge.out-of-stock {
  background: #ffedd5;
  color: #c2410c;
}

.master-badge.tidak-aktif {
  background: #fee2e2;
  color: #b91c1c;
}

.master-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
}

.master-modal[hidden] {
  display: none !important;
}

.master-dialog {
  width: min(520px, 100%);
  padding: 1.1rem 1.2rem 1.2rem;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.2);
}

.master-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.master-dialog h2 {
  margin: 0;
}

.master-code-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.master-code {
  margin: 0.35rem 0 0.8rem;
  color: #64748b;
}

.master-uom-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.master-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.master-dialog-actions button {
  margin: 0;
  border-radius: 10px;
  font-weight: 700;
}

.master-dialog-actions .add {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.master-dialog-actions .stock {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.master-dialog-actions .warn {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.dash-grid[hidden],
#dash-list[hidden] {
  display: none !important;
}

.dash-card.lead {
  grid-column: 1 / -1;
}

.dash-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  min-height: 132px;
  padding: 1.1rem 1.15rem;
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-radius: 16px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.dash-card b {
  color: #173b73;
  font-size: 2rem;
  line-height: 1;
  min-width: 2.4rem;
}

.dash-card strong,
.dash-card span {
  display: block;
}

.dash-card strong {
  font-size: 1.05rem;
}

.dash-card span {
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.88rem;
}

.dash-badge {
  position: absolute;
  top: -0.45rem;
  right: -0.45rem;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-style: normal;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.dash-rows {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.dash-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-radius: 14px;
}

.dash-row strong,
.dash-row span,
.dash-row b {
  display: block;
}

.dash-row span {
  color: #64748b;
  font-size: 0.85rem;
}

.dash-row b {
  color: #b45309;
  text-align: right;
}

.panel.jejak-open {
  background:
    radial-gradient(ellipse 46% 32% at 82% 6%, rgba(191, 219, 254, 0.85), transparent 72%),
    radial-gradient(ellipse 34% 26% at 8% 0%, rgba(219, 234, 254, 0.95), transparent 70%),
    linear-gradient(180deg, #eaf3ff 0%, #f5f8fc 36%, #f5f6fb 100%);
}

.panel.jejak-open > .page-row,
.panel.jejak-open > #dash-note,
.panel.budget-open > .page-row,
.panel.budget-open > #dash-note {
  display: none;
}

#jejak-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "back back"
    "copy filters";
  align-items: end;
  gap: 0.35rem 1rem;
  margin-bottom: 1.15rem;
}

#jejak-hero > .ghost {
  grid-area: back;
  justify-self: start;
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.95rem;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
}

.jejak-copy { grid-area: copy; min-width: 0; }
.jejak-filter-slot { grid-area: filters; }

.jejak-kicker {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

#jejak-hero h2 {
  margin: 0.15rem 0 0.35rem;
  color: #12263f;
  font-size: 2rem;
  letter-spacing: -0.03em;
}

#jejak-hero .hint {
  margin: 0;
  color: #64748b;
}

.jejak-filter-slot .filter-row {
  flex-wrap: nowrap;
  gap: 0.75rem;
}

.jejak-filter {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 8.6rem;
  margin: 0;
  padding: 0.45rem 0.7rem 0.4rem 2.55rem;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
  font-weight: 700;
}

.jejak-filter::before {
  content: "";
  position: absolute;
  left: 0.65rem;
  top: 50%;
  width: 1.45rem;
  height: 1.45rem;
  transform: translateY(-50%);
  border-radius: 8px;
  background: #eff6ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round'%3E%3Crect x='4' y='5' width='16' height='15' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M4 10h16'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
}

.jejak-filter span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
}

.jejak-filter select {
  width: 100%;
  min-height: 0;
  height: 1.7rem;
  padding: 0 1.3rem 0 0;
  border: 0;
  background-color: transparent;
  color: #12263f;
  font-weight: 800;
}

.track-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.9rem;
  align-items: stretch;
}

.track-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  min-height: 176px;
  margin: 0;
  padding: 1rem 0.95rem 0.85rem;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 30%, #fff8e6 100%);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  text-align: left;
  font: inherit;
  font-weight: 500;
  color: #12263f;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.track-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
}

.track-card.processing { background: linear-gradient(180deg, #ffffff 30%, #eef5ff 100%); }
.track-card.feedback { background: linear-gradient(180deg, #ffffff 30%, #fff1f1 100%); }
.track-card.confirm { background: linear-gradient(180deg, #ffffff 30%, #fdf2f8 100%); }
.track-card.upload { background: linear-gradient(180deg, #ffffff 30%, #fff4e8 100%); }
.track-card.invoice { background: linear-gradient(180deg, #ffffff 30%, #f5f3ff 100%); }
.track-card.done { background: linear-gradient(180deg, #ffffff 30%, #eefbf3 100%); }

.track-top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 3.1rem;
}

.track-top strong {
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
}

.track-ico,
.track-mark {
  display: grid;
  place-items: center;
  flex: none;
}

.track-ico {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  background: #f5b400;
  color: #ffffff;
}

.track-card.processing .track-ico { background: #3b82f6; }
.track-card.feedback .track-ico { background: #ef4444; }
.track-card.confirm .track-ico { background: #db2777; }
.track-card.upload .track-ico { background: #f97316; }
.track-card.invoice .track-ico { background: #7c3aed; }
.track-card.done .track-ico { background: #22c55e; }

.track-ico svg,
.track-mark svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.track-mark {
  position: absolute;
  right: 0.75rem;
  top: 3.4rem;
  color: #f5b400;
  opacity: 0.18;
}

.track-mark svg {
  width: 3.4rem;
  height: 3.4rem;
  stroke-width: 1.6;
}

.track-card.processing .track-mark { color: #3b82f6; }
.track-card.feedback .track-mark { color: #ef4444; }
.track-card.confirm .track-mark { color: #db2777; }
.track-card.upload .track-mark { color: #f97316; }
.track-card.invoice .track-mark { color: #7c3aed; }
.track-card.done .track-mark { color: #22c55e; }

.track-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  margin-top: 0.85rem;
  position: relative;
  z-index: 1;
}

.track-card b {
  color: #10233f;
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.track-foot small {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
}

.track-line {
  margin-top: auto;
  padding-top: 0.85rem;
  color: #d97706;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

.track-card.processing .track-line { color: #2563eb; }
.track-card.feedback .track-line { color: #e11d48; }
.track-card.confirm .track-line { color: #be185d; }
.track-card.upload .track-line { color: #ea580c; }
.track-card.invoice .track-line { color: #6d28d9; }
.track-card.done .track-line { color: #16a34a; }

.invoice-reply-host,
#order-invoice {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

#order-invoice[hidden],
.invoice-reply-host[hidden] {
  display: none;
}

#order-invoice .form-card,
.invoice-reply {
  display: grid;
  gap: 0.55rem;
}

#order-invoice label,
.invoice-reply label {
  display: grid;
  gap: 0.25rem;
  font-weight: 700;
}

#order-invoice label[hidden],
.invoice-reply label[hidden] {
  display: none;
}

.invoice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.invoice-compare {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.invoice-compare th,
.invoice-compare td {
  padding: 0.72rem 0.85rem;
  border-bottom: 1px solid #e6eaf0;
  text-align: left;
  vertical-align: top;
}

.invoice-compare th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.invoice-compare th:nth-child(n + 2),
.invoice-compare td:nth-child(n + 2) {
  text-align: right;
  white-space: nowrap;
}

.invoice-compare .item-code {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 650;
}

.invoice-compare tfoot td {
  font-weight: 800;
}

#order-item-search[hidden] {
  display: none !important;
}

.wh-feedback-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.wh-feedback-head h2,
.wh-feedback-head p {
  margin: 0;
}

.wh-feedback-head p {
  color: #64748b;
}

.wh-feedback-head strong {
  font-size: 1.4rem;
}

.wh-feedback-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}

.invoice-align {
  margin-bottom: 0.9rem;
}

.invoice-align > .solid {
  min-height: 42px;
}

.invoice-align .form-card {
  margin-top: 0.75rem;
}

.invoice-align .form-card[hidden] {
  display: none !important;
}

.invoice-align-table input {
  width: 7.5rem;
  min-height: 38px;
  margin: 0;
  padding: 0.4rem 0.55rem;
}

.invoice-align-total {
  margin: 0.75rem 0 0;
  font-weight: 800;
}

.invoice-answer {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid #e6eaf0;
}

.invoice-answer p {
  margin: 0.15rem 0;
}

.wh-feedback-tools .solid {
  min-height: 38px;
  padding: 0 0.9rem;
  white-space: nowrap;
}

.wh-order-dialog .sso-dialog-card {
  width: min(760px, 94vw);
  max-height: min(86vh, 820px);
  text-align: left;
}

.wh-order-dialog .sso-dialog-card h2,
.wh-order-dialog-note {
  text-align: center;
}

.wh-order-dialog-note {
  margin: 0 0 0.85rem;
  color: #64748b;
}

.wh-order-dialog .invoice-compare {
  margin: 0;
}

.wh-feedback-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.wh-feedback-table th,
.wh-feedback-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #e6eaf0;
  text-align: left;
  vertical-align: top;
}

.wh-feedback-table th {
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
}

.wh-feedback-table .wh-problem-title {
  display: block;
  font-weight: 650;
  color: #0f172a;
}

.wh-feedback-table .wh-problem-line,
.invoice-report-found p span {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.92rem;
}

.wh-feedback-table input {
  min-height: 38px;
  margin-top: 0;
  text-transform: uppercase;
}

#order-view .item-panel .page-row[hidden],
#order-items[hidden] {
  display: none !important;
}

.wh-feedback-table input[hidden] {
  display: none !important;
}

.wh-feedback-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.85rem;
}

.wh-feedback-bar span,
.wh-feedback-bar strong {
  display: block;
}

.wh-feedback-bar .solid {
  min-height: 42px;
  padding: 0 1rem;
}

.wh-feedback-bar .solid:disabled {
  opacity: 0.45;
}

.info-strip.invoice-summary {
  position: sticky;
  top: 0.65rem;
  z-index: 8;
  align-items: center;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.invoice-sahkan-slot {
  margin-left: auto;
  min-width: 0;
}

.invoice-sahkan-slot .solid {
  min-height: 42px;
  padding: 0 1.15rem;
}

#order-invoice {
  margin-bottom: 0.85rem;
}

.invoice-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.invoice-sheet-head h2 {
  margin: 0;
}

.invoice-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 0.65rem 0.75rem;
  align-items: end;
  margin-top: 0.75rem;
}

.invoice-row .ghost {
  min-height: 42px;
}

.invoice-report {
  min-height: 34px;
  padding: 0.2rem 0.75rem;
}

.invoice-report.is-on {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

.invoice-compare,
#order-items,
.item-panel {
  overflow: visible;
}

.invoice-compare td.report-cell {
  position: relative;
  width: 1%;
  text-align: right;
  white-space: normal;
}

.invoice-report-summary {
  margin-top: 0.35rem;
  max-width: 180px;
  margin-left: auto;
  color: #be123c;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
}

.invoice-report-summary[hidden] {
  display: none;
}

.invoice-report-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 30;
  width: min(460px, 88vw);
  padding: 0.9rem;
  text-align: left;
  white-space: normal;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.invoice-report-menu[hidden] {
  display: none;
}

.invoice-report-menu > strong {
  display: block;
  margin-bottom: 0.2rem;
}

.invoice-report-menu > p {
  margin: 0 0 0.7rem;
  color: #64748b;
  font-size: 0.8rem;
}

.invoice-report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.invoice-report-field {
  display: grid;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.invoice-report-field small,
.invoice-report-block small {
  color: #64748b;
  font-weight: 500;
}

.invoice-report-field input,
.invoice-report-money input {
  width: 100%;
  min-height: 36px;
  font-weight: 500;
}

.invoice-report-field[hidden] {
  display: none !important;
}

.invoice-report-check input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
}

.invoice-report-check {
  margin: 0.85rem 0 0;
}

.invoice-report-penyelia {
  margin-top: 0.75rem;
  padding: 0.55rem 0.65rem;
  background: #f8fafc;
  border-radius: 10px;
}

.invoice-report-penyelia[hidden] {
  display: none;
}

.invoice-report-penyelia p {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
}

.invoice-report-money {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.invoice-report-money span {
  color: #64748b;
  font-weight: 700;
}

.invoice-report-block,
.invoice-report-check,
.invoice-report-found {
  margin-top: 0.75rem;
}

.invoice-report-block[hidden],
.invoice-report-grid[hidden],
.invoice-report-found[hidden],
.invoice-report-error[hidden] {
  display: none;
}

.invoice-report-choices {
  display: flex;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.invoice-report-choices label,
.invoice-report-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
}

.invoice-report-found {
  padding: 0.55rem 0.65rem;
  background: #f8fafc;
  border-radius: 10px;
}

.invoice-report-found p {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
}

.invoice-report-error {
  margin: 0.65rem 0 0;
  color: #be123c;
  font-size: 0.78rem;
  font-weight: 700;
}

.invoice-report-actions {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.invoice-report-actions .solid,
.invoice-report-actions .ghost {
  min-height: 36px;
  padding: 0 0.8rem;
}

@media (max-width: 980px) {
  .invoice-row {
    grid-template-columns: 1fr 1fr;
  }
}

.jejak-insights {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 1rem;
  margin: 0.25rem 0 1rem;
}

.jejak-panel {
  padding: 1.15rem 1.2rem 1.2rem;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.jejak-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.jejak-panel-head strong {
  display: block;
  color: #12263f;
  font-size: 1.05rem;
}

.jejak-panel-head p {
  margin: 0.15rem 0 0;
  color: #64748b;
  font-size: 0.84rem;
}

.jejak-mini {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  background: #eff6ff;
  flex: none;
}

.jejak-mini::before {
  content: "";
  width: 1.15rem;
  height: 1.15rem;
  background: center / contain no-repeat;
}

.jejak-mini.bars::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 19V10M12 19V5M19 19v-7'/%3E%3C/svg%3E");
}

.jejak-mini.pie::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2'%3E%3Cpath d='M12 3a9 9 0 1 0 9 9h-9z'/%3E%3Cpath d='M12 3v9h9'/%3E%3C/svg%3E");
}

.jejak-total {
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
  padding: 1.15rem 1.2rem 1.2rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #f5f9ff 0%, #e7f0ff 100%);
}

.jejak-total::after {
  content: "";
  position: absolute;
  right: 1.1rem;
  bottom: 0.9rem;
  width: 4.2rem;
  height: 4.2rem;
  opacity: 0.35;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.4'%3E%3Cpath d='M7 3h7l5 5v13a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z'/%3E%3Cpath d='M14 3v5h5M8 13h8M8 17h6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.jejak-total span,
.jejak-total small {
  display: block;
  color: #64748b;
  font-weight: 600;
}

.jejak-total b {
  display: block;
  margin: 0.25rem 0 0.2rem;
  color: #10233f;
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.jejak-chart {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  margin-top: 0.8rem;
}

.jejak-donut-wrap {
  position: relative;
  width: 168px;
  height: 168px;
}

.jejak-donut {
  width: 100%;
  height: 100%;
}

.jejak-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.jejak-donut-center b {
  color: #10233f;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.jejak-donut-center small {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.jejak-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.jejak-legend li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  color: #334155;
  font-size: 0.88rem;
}

.jejak-legend i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
}

.jejak-legend b {
  color: #12263f;
  font-weight: 800;
  white-space: nowrap;
}

.doc-host {
  display: block;
}

.doc-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(10rem, 0.8fr) minmax(9rem, 0.6fr);
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.doc-tools input,
.doc-tools select {
  width: 100%;
  min-height: 46px;
  padding: 0.55rem 0.75rem;
  border: 1px solid #cfd6e4;
  border-radius: 10px;
  background: #ffffff;
  font: inherit;
}

.doc-pin {
  position: sticky;
  top: 0;
  z-index: 8;
  padding-bottom: 0.35rem;
  background: #f5f6fb;
}

.doc-pin h2 {
  margin-bottom: 0.25rem;
}

.doc-table-wrap {
  overflow: visible;
  max-width: 100%;
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-radius: 16px;
}

.doc-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.doc-table th,
.doc-table td {
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
  white-space: normal;
}

.doc-table th:nth-child(1),
.doc-table td:nth-child(1) { width: 11%; }

.doc-table th:nth-child(2),
.doc-table td:nth-child(2) { width: 16%; }

.doc-table th:nth-child(3),
.doc-table td:nth-child(3) { width: 18%; }

.doc-table th:nth-child(4),
.doc-table td:nth-child(4) { width: 18%; }

.doc-table th:nth-child(5),
.doc-table td:nth-child(5) { width: 11%; }

.doc-table th:nth-child(6),
.doc-table td:nth-child(6) { width: 12%; }

.doc-table th:nth-child(7),
.doc-table td:nth-child(7) { width: 11%; }

.doc-table th:nth-child(8),
.doc-table td:nth-child(8) { width: 3%; }

.doc-table th {
  position: sticky;
  z-index: 7;
  padding: 0.7rem 0.45rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: left;
  text-transform: uppercase;
  background: #f8fafc;
  border-bottom: 1px solid #e4e8f2;
  box-shadow: 0 1px 0 #e4e8f2;
}

.doc-table td {
  padding: 0.75rem 0.45rem;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
  line-height: 1.35;
}

table tbody tr:nth-child(even) > td {
  background-color: #f4f7fb;
}

table tbody tr:nth-child(odd) > td {
  background-color: #ffffff;
}

.doc-id,
.doc-order,
.doc-date,
.doc-total,
.doc-received div:nth-child(1),
.doc-received div:nth-child(2) {
  white-space: nowrap;
}

.doc-school,
.doc-week,
.doc-received div:last-child {
  white-space: normal;
}

.doc-order,
.doc-open {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.doc-open {
  color: #94a3b8;
  font-size: 1.35rem;
  font-weight: 400;
}

.doc-received div:last-child {
  font-weight: 400;
  color: #334155;
}

.doc-received div:nth-child(2),
.doc-date {
  color: #64748b;
}

.doc-total {
  font-weight: 600;
  color: #1e293b;
}

.doc-uploaded {
  margin-top: 0.4rem;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
}

.doc-uploaded div {
  white-space: nowrap;
}

.doc-empty {
  color: #64748b;
  text-align: center;
}

@media (max-width: 1100px) {
  #jejak-hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "back"
      "copy"
      "filters";
  }

  .jejak-filter-slot .filter-row {
    flex-wrap: wrap;
  }

  .track-board,
  .jejak-insights,
  .budget-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .dash-grid,
  .track-board,
  .jejak-insights,
  .jejak-chart,
  .doc-tools,
  .order-card-details.pair,
  .budget-summary {
    grid-template-columns: 1fr;
  }
}

.budget-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0.8rem 0 0.85rem;
}

.budget-summary div {
  padding: 0.75rem 0.8rem;
  border: 1px solid #e4e8f2;
  border-radius: 14px;
  background: #ffffff;
}

.budget-summary span {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.budget-summary strong {
  display: block;
  margin-top: 0.25rem;
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.doc-table.budget-table th:nth-child(1),
.doc-table.budget-table td:nth-child(1) { width: 22%; }

.doc-table.budget-table th:nth-child(2),
.doc-table.budget-table td:nth-child(2) { width: 16%; }

.doc-table.budget-table th:nth-child(3),
.doc-table.budget-table td:nth-child(3) { width: 11%; }

.doc-table.budget-table th:nth-child(4),
.doc-table.budget-table td:nth-child(4) { width: 12%; }

.doc-table.budget-table th:nth-child(5),
.doc-table.budget-table td:nth-child(5) { width: 13%; }

.doc-table.budget-table th:nth-child(6),
.doc-table.budget-table td:nth-child(6) { width: 13%; }

.doc-table.budget-table th:nth-child(7),
.doc-table.budget-table td:nth-child(7) { width: 13%; }

.budget-school strong,
.budget-school small,
.budget-over strong,
.budget-over small {
  display: block;
}

.budget-school small,
.budget-over small {
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
}

.budget-money,
.budget-over strong {
  white-space: nowrap;
  font-weight: 600;
  color: #1e293b;
}

.budget-over strong {
  color: #b42318;
  font-weight: 700;
}

.budget-kind {
  font-weight: 600;
  color: #1e3a8a;
}

.panel.budget-open {
  background: #f4f7fb;
}

.budget-park {
  display: none;
}

.budget-page {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.budget-page button {
  margin-top: 0;
}

.budget-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  min-width: 0;
}

.budget-page #dash-back,
.budget-text-back {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #2563eb;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.budget-page #dash-back:hover,
.budget-text-back:hover {
  color: #1d4ed8;
}

.budget-home-row,
.budget-school-top,
.budget-view-head {
  width: 100%;
  min-width: 0;
}

.budget-home-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem 1.4rem;
}

.budget-copy h2,
.budget-school-copy h2,
.budget-view-head h2 {
  margin: 0.2rem 0 0;
  color: #12263f;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.budget-copy .hint,
.budget-school-copy p,
.budget-view-school,
.budget-quiet {
  margin: 0.28rem 0 0;
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 500;
}

.budget-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: stretch;
  gap: 0.6rem;
}

.budget-filters .filter-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.6rem;
  margin: 0;
}

.budget-filters .filter-row label {
  flex: 0 0 auto;
  min-width: 8.4rem;
}

.budget-filters .jejak-filter select,
.budget-school-filter select {
  font-weight: 600;
}

.budget-school-filter {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 8.6rem;
  margin: 0;
  padding: 0.45rem 0.75rem 0.4rem;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
}

.budget-school-filter span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
}

.budget-school-filter select {
  width: 12.5rem;
  max-width: 16rem;
  min-height: 0;
  height: 1.7rem;
  margin: 0;
  padding: 0 1.4rem 0 0;
  border: 0;
  background-color: transparent;
  color: #12263f;
}

.budget-body {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.budget-kpis,
.budget-money-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.budget-money-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.budget-kpi,
.budget-chart,
.budget-list,
.budget-money-card,
.budget-chip,
.budget-count-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.budget-kpi {
  display: grid;
  grid-template-columns: 2.55rem minmax(0, 1fr);
  column-gap: 0.75rem;
  align-items: center;
  padding: 0.95rem 1rem;
}

.budget-kpi-icon {
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 999px;
}

.budget-kpi-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.budget-kpi-icon.total { background: #eff6ff; color: #2563eb; }
.budget-kpi-icon.within { background: #ecfdf5; color: #16a34a; }
.budget-kpi-icon.over { background: #fef2f2; color: #ef4444; }
.budget-kpi-icon.amount { background: #fff7ed; color: #f97316; }

.budget-kpi-label,
.budget-money-card span,
.budget-count-card span {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
}

.budget-kpi-value,
.budget-money-card strong,
.budget-count-card strong {
  color: #12263f;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.budget-kpi-caption,
.budget-money-card em,
.budget-count-card em {
  color: #94a3b8;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 500;
}

.budget-charts {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(260px, 1.15fr) minmax(180px, 0.8fr);
  gap: 0.8rem;
  align-items: stretch;
  min-width: 0;
}

/* Lock Pemantauan Bajet home: 4 KPI + 3 chart columns (Gambar 2) */
.budget-page > .budget-body > .budget-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.budget-page > .budget-body > .budget-charts {
  grid-template-columns: minmax(220px, 0.95fr) minmax(260px, 1.15fr) minmax(180px, 0.8fr);
  overflow-x: auto;
}

.budget-chart,
.budget-list {
  min-width: 0;
  padding: 1rem 1rem 0.9rem;
}

.budget-chart h3,
.budget-list h3 {
  margin: 0 0 0.85rem;
  color: #12263f;
  font-size: 1rem;
  font-weight: 600;
}

.budget-donut-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.budget-donut {
  position: relative;
  width: 13.6rem;
  height: 13.6rem;
}

.budget-donut svg {
  display: block;
  width: 100%;
  height: 100%;
}

.budget-donut-label {
  fill: #ffffff;
  font-family: "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 700;
}

.budget-donut-center {
  position: absolute;
  inset: 27%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.budget-donut-center strong {
  color: #12263f;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.budget-donut-center span {
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 500;
}

.budget-legend {
  display: grid;
  gap: 0.55rem;
  width: min(100%, 16.5rem);
}

.budget-legend-row {
  display: grid;
  grid-template-columns: 0.55rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  color: #475569;
  font-size: 0.92rem;
  font-weight: 500;
}

.budget-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
}

.budget-legend-value {
  min-width: 7.2rem;
  color: #334155;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.budget-legend-note {
  margin: 0.15rem 0 0;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 500;
}

.budget-rank {
  display: grid;
  gap: 0.72rem;
}

.budget-rank-row {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr) 3.4rem;
  gap: 0.55rem;
  align-items: center;
}

.budget-rank-name,
.budget-rank-value {
  color: #334155;
  font-weight: 500;
  line-height: 1.3;
}

.budget-rank-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.budget-rank-track {
  height: 0.62rem;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f5f9;
}

.budget-rank-fill {
  height: 100%;
  border-radius: 999px;
}

.budget-rank-fill.over { background: #fb7185; }
.budget-rank-fill.groceries { background: #f87171; }
.budget-rank-fill.seafood { background: #fb923c; }

.budget-list-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.budget-list-head h3 {
  margin-bottom: 0;
}

.budget-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.budget-search {
  width: 14rem;
  max-width: 100%;
  min-height: 0;
  height: 2.4rem;
  margin: 0;
  padding: 0.35rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.budget-export {
  min-height: 0;
  padding: 0.45rem 0.9rem;
  border: 1px solid #dbe3f0;
  border-radius: 12px;
  background: #ffffff;
  color: #2563eb;
  font-weight: 600;
}

.budget-export:hover {
  background: #eff6ff;
}

.budget-page .doc-table th {
  font-weight: 600;
}

.budget-page .doc-table td {
  color: #334155;
  font-weight: 500;
}

.doc-table.budget-school-table th,
.doc-table.budget-school-table td,
.doc-table.budget-over-table th,
.doc-table.budget-over-table td,
.doc-table.budget-case-table th,
.doc-table.budget-case-table td,
.doc-table.budget-split th,
.doc-table.budget-split td,
.doc-table.budget-perf-table th,
.doc-table.budget-perf-table td,
.doc-table.budget-perf-order th,
.doc-table.budget-perf-order td {
  width: auto;
}

.doc-table.budget-school-table th:nth-child(1),
.doc-table.budget-school-table td:nth-child(1) { width: 6%; }
.doc-table.budget-school-table th:nth-child(2),
.doc-table.budget-school-table td:nth-child(2) { width: 26%; }
.doc-table.budget-school-table th:nth-child(3),
.doc-table.budget-school-table td:nth-child(3),
.doc-table.budget-school-table th:nth-child(4),
.doc-table.budget-school-table td:nth-child(4) { width: 10%; }
.doc-table.budget-school-table th:nth-child(5),
.doc-table.budget-school-table td:nth-child(5),
.doc-table.budget-school-table th:nth-child(6),
.doc-table.budget-school-table td:nth-child(6) { width: 12%; }
.doc-table.budget-school-table th:nth-child(7),
.doc-table.budget-school-table td:nth-child(7) { width: 14%; }
.doc-table.budget-school-table th:nth-child(8),
.doc-table.budget-school-table td:nth-child(8) { width: 10%; }

.doc-table.budget-over-table th:nth-child(1),
.doc-table.budget-over-table td:nth-child(1) { width: 7%; }
.doc-table.budget-over-table th:nth-child(2),
.doc-table.budget-over-table td:nth-child(2) { width: 17%; }
.doc-table.budget-over-table th:nth-child(3),
.doc-table.budget-over-table td:nth-child(3) { width: 15%; }
.doc-table.budget-over-table th:nth-child(4),
.doc-table.budget-over-table td:nth-child(4),
.doc-table.budget-over-table th:nth-child(5),
.doc-table.budget-over-table td:nth-child(5),
.doc-table.budget-over-table th:nth-child(6),
.doc-table.budget-over-table td:nth-child(6),
.doc-table.budget-over-table th:nth-child(7),
.doc-table.budget-over-table td:nth-child(7) { width: 15.25%; }

.doc-table.budget-case-table th:nth-child(1),
.doc-table.budget-case-table td:nth-child(1) { width: 8%; }
.doc-table.budget-case-table th:nth-child(2),
.doc-table.budget-case-table td:nth-child(2) { width: 32%; }
.doc-table.budget-case-table th:nth-child(3),
.doc-table.budget-case-table td:nth-child(3) { width: 22%; }
.doc-table.budget-case-table th:nth-child(4),
.doc-table.budget-case-table td:nth-child(4) { width: 18%; }
.doc-table.budget-case-table th:nth-child(5),
.doc-table.budget-case-table td:nth-child(5) { width: 20%; }

.budget-kpi.is-clickable,
.budget-chip.is-clickable,
.budget-rank-row.is-clickable {
  cursor: pointer;
}

.budget-kpi.is-on,
.budget-chip.is-on {
  box-shadow: inset 0 0 0 2px #2563eb;
}

.budget-kpi.within.is-on,
.budget-chip.within.is-on {
  box-shadow: inset 0 0 0 2px #16a34a;
}

.budget-kpi.over.is-on,
.budget-chip.over.is-on {
  box-shadow: inset 0 0 0 2px #ef4444;
}

.budget-rank-row.is-clickable:hover {
  background: #f8fafc;
}

.budget-rank-row.is-on {
  background: #fff1f2;
}

.budget-page .doc-table tr.budget-total td {
  border-top: 2px solid #e2e8f0;
  background: #f8fafc;
  color: #12263f;
  font-weight: 600;
}

.doc-table.budget-split th:nth-child(1),
.doc-table.budget-split td:nth-child(1) { width: 16%; }
.doc-table.budget-split th:nth-child(2),
.doc-table.budget-split td:nth-child(2),
.doc-table.budget-split th:nth-child(3),
.doc-table.budget-split td:nth-child(3),
.doc-table.budget-split th:nth-child(4),
.doc-table.budget-split td:nth-child(4),
.doc-table.budget-split th:nth-child(5),
.doc-table.budget-split td:nth-child(5),
.doc-table.budget-split th:nth-child(6),
.doc-table.budget-split td:nth-child(6) { width: 16.8%; }

.budget-num {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.budget-link {
  display: inline;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #2563eb;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

.budget-link.budget-id {
  white-space: nowrap;
}

.budget-link:hover {
  text-decoration: underline;
}

.budget-page .doc-table td.budget-gap.up,
.budget-page .doc-table td.budget-money.over,
.budget-page .doc-table td.budget-rate.over,
.budget-page .doc-table td.budget-count.over {
  color: #dc2626;
}

.budget-page .doc-table td.budget-gap.down,
.budget-page .doc-table td.budget-count.within {
  color: #16a34a;
}

.budget-page .doc-table td.budget-gap.near,
.budget-page .doc-table td.budget-count.near,
.budget-page .doc-table td.perf-late {
  color: #d97706;
}

.budget-pill.late {
  background: #ffedd5;
  color: #c2410c;
}

.budget-chip.late.is-on {
  box-shadow: inset 0 0 0 2px #d97706;
}

.budget-pill {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

.budget-pill.over { background: #fee2e2; color: #b91c1c; }
.budget-pill.near { background: #ffedd5; color: #c2410c; }
.budget-pill.within { background: #dcfce7; color: #15803d; }

.budget-empty {
  margin: 0.2rem 0 0.4rem;
  color: #64748b;
  font-weight: 500;
}

.budget-school-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: start;
}

.budget-count-card {
  min-width: 8.4rem;
  padding: 0.8rem 0.95rem;
  background: #eff6ff;
}

.budget-count-card strong {
  display: block;
  margin-top: 0.15rem;
  color: #1d4ed8;
}

.budget-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.budget-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 10rem;
  padding: 0.7rem 0.85rem;
}

.budget-chip-mark {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
}

.budget-chip.within .budget-chip-mark { background: #22c55e; }
.budget-chip.late .budget-chip-mark { background: #f59e0b; }
.budget-chip.near .budget-chip-mark { background: #f59e0b; }
.budget-chip.over .budget-chip-mark { background: #ef4444; }

.budget-chip strong {
  display: block;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 600;
}

.budget-chip span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 500;
}

.budget-view-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.3rem 1rem;
  align-items: center;
}

.budget-view-date {
  justify-self: end;
  color: #64748b;
  font-weight: 500;
}

.budget-view-head .budget-pill {
  justify-self: end;
}

.budget-view-head h2 {
  white-space: nowrap;
}

.budget-see-order {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 0.35rem;
  min-height: 40px;
  padding: 0.4rem 1rem;
}

.budget-order-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.2rem 1rem;
  overflow: auto;
  background: rgba(15, 23, 42, 0.45);
}

.budget-order-dialog {
  width: min(980px, 100%);
  margin-bottom: 2rem;
  padding: 1.1rem 1.2rem 1.25rem;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.budget-order-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.budget-order-dialog-head h2 {
  margin: 0;
  color: #12263f;
  font-size: 1.25rem;
}

.budget-order-dialog-head p {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.88rem;
}

.budget-order-dialog-body {
  margin-top: 0.9rem;
}

.budget-order-meta {
  margin-bottom: 0.4rem;
}

.budget-order-cat {
  margin-top: 1rem;
}

.budget-order-cat h3 {
  margin: 0 0 0.4rem;
  color: #1e3a8a;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.budget-item-code {
  display: block;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
}

.budget-order-cat .doc-table-wrap {
  overflow: auto;
  max-width: 100%;
}

.doc-table.budget-order-items {
  min-width: 860px;
}

.doc-table.budget-order-items th,
.doc-table.budget-order-items td {
  overflow: hidden;
  box-sizing: border-box;
  vertical-align: middle;
}

.doc-table.budget-order-items th {
  position: static;
  white-space: nowrap;
}

.doc-table.budget-order-items th:nth-child(1),
.doc-table.budget-order-items td:nth-child(1) { width: 5%; }

.doc-table.budget-order-items th:nth-child(2),
.doc-table.budget-order-items td:nth-child(2) { width: 22%; }

.doc-table.budget-order-items th:nth-child(3),
.doc-table.budget-order-items td:nth-child(3) { width: 12%; }

.doc-table.budget-order-items th:nth-child(4),
.doc-table.budget-order-items td:nth-child(4) { width: 11%; }

.doc-table.budget-order-items th:nth-child(5),
.doc-table.budget-order-items td:nth-child(5) { width: 12%; }

.doc-table.budget-order-items th:nth-child(6),
.doc-table.budget-order-items td:nth-child(6) { width: 13%; }

.doc-table.budget-order-items th:nth-child(7),
.doc-table.budget-order-items td:nth-child(7) { width: 11%; }

.doc-table.budget-order-items th:nth-child(8),
.doc-table.budget-order-items td:nth-child(8) { width: 14%; }

.doc-table.budget-order-items th:nth-child(1),
.doc-table.budget-order-items td:nth-child(1),
.doc-table.budget-order-items th:nth-child(3),
.doc-table.budget-order-items td:nth-child(3),
.doc-table.budget-order-items th:nth-child(4),
.doc-table.budget-order-items td:nth-child(4),
.doc-table.budget-order-items th:nth-child(5),
.doc-table.budget-order-items td:nth-child(5),
.doc-table.budget-order-items th:nth-child(7),
.doc-table.budget-order-items td:nth-child(7) {
  text-align: center;
}

.doc-table.budget-order-items th:nth-child(6),
.doc-table.budget-order-items td:nth-child(6),
.doc-table.budget-order-items th:nth-child(8),
.doc-table.budget-order-items td:nth-child(8) {
  text-align: right;
}

.doc-table.budget-order-items td.budget-num {
  white-space: nowrap;
}

.budget-money-card {
  padding: 0.9rem 1rem;
}

.budget-money-card.spend { background: #eff6ff; }
.budget-money-card.limit { background: #ecfdf5; }
.budget-money-card.over { background: #fef2f2; }
.budget-money-card.spend strong { color: #1d4ed8; }
.budget-money-card.limit strong { color: #15803d; }
.budget-money-card.over strong { color: #dc2626; }

.budget-money-card span,
.budget-money-card strong,
.budget-money-card em {
  display: block;
}

.budget-money-card strong {
  margin-top: 0.2rem;
}

.budget-page .doc-table-wrap {
  overflow: visible;
}

@media (max-width: 1100px) {
  .budget-money-row {
    grid-template-columns: 1fr 1fr;
  }

  /* Keep Pemantauan Bajet home 4+3 layout; only school/order subviews may stack */
  .budget-page > .budget-body > .budget-kpis {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
  }

  .budget-page > .budget-body > .budget-charts {
    grid-template-columns: minmax(220px, 0.95fr) minmax(260px, 1.15fr) minmax(180px, 0.8fr);
  }

  .budget-page .budget-money-row,
  .budget-page .budget-school-top .budget-kpis {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .budget-home-row,
  .budget-school-top,
  .budget-money-row,
  .budget-list-head,
  .budget-filters,
  .budget-filters .filter-row,
  .budget-tools {
    display: grid;
    grid-template-columns: 1fr;
  }

  .budget-page > .budget-body > .budget-kpis {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    overflow-x: auto;
  }

  .budget-page > .budget-body > .budget-charts {
    grid-template-columns: minmax(200px, 0.95fr) minmax(240px, 1.15fr) minmax(160px, 0.8fr);
    overflow-x: auto;
  }

  .budget-view-head h2 {
    white-space: normal;
  }

  .budget-school-filter select,
  .budget-search {
    width: 100%;
  }

  .perf-scores,
  .perf-detail {
    grid-template-columns: 1fr;
  }

  .perf-scores.warehouse-scores,
  .perf-scores.warehouse-scores > .perf-score,
  .perf-scores.warehouse-scores > .perf-score:nth-child(4),
  .perf-scores.warehouse-scores > .perf-score:nth-child(5) {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

.budget-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.45);
}

.budget-modal-dialog {
  width: min(960px, 100%);
  max-height: min(88vh, 820px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1rem 1.1rem 1rem;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.budget-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.budget-modal-head h3 {
  margin: 0;
  color: #12263f;
  font-size: 1.15rem;
  font-weight: 700;
}

.budget-modal-close {
  flex: 0 0 auto;
  width: 2rem;
  min-height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.budget-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.budget-modal-body {
  min-height: 0;
  overflow: auto;
}

.budget-list-modal {
  padding: 0;
  box-shadow: none;
  background: transparent;
}

.budget-rank-name.is-link {
  color: #2563eb;
  font-weight: 600;
}

.perf-filters {
  align-items: flex-end;
}

.perf-scores {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.perf-scores.warehouse-scores {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.perf-scores.warehouse-scores > .perf-score {
  grid-column: span 2;
}

.perf-scores.warehouse-scores > .perf-score:nth-child(4),
.perf-scores.warehouse-scores > .perf-score:nth-child(5) {
  grid-column: span 3;
}

@media (max-width: 1100px) {
  .perf-scores.warehouse-scores {
    grid-template-columns: 1fr 1fr;
  }

  .perf-scores.warehouse-scores > .perf-score,
  .perf-scores.warehouse-scores > .perf-score:nth-child(4),
  .perf-scores.warehouse-scores > .perf-score:nth-child(5) {
    grid-column: auto;
  }

  .perf-scores.warehouse-scores > .perf-score:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .perf-scores.warehouse-scores {
    grid-template-columns: 1fr;
  }

  .perf-scores.warehouse-scores > .perf-score:last-child {
    grid-column: auto;
  }
}

.warehouse-kpi-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.warehouse-kpi-facts span {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #eef4ff;
  color: #1e3a8a;
  font-size: 0.82rem;
  font-weight: 650;
}

.perf-score {
  display: block;
  padding: 0.95rem 1rem 0.85rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  text-align: left;
  cursor: pointer;
}

.perf-score.is-on { box-shadow: inset 0 0 0 2px #2563eb; }
.perf-score.budget.is-on { box-shadow: inset 0 0 0 2px #16a34a; }
.perf-score.amend.is-on { box-shadow: inset 0 0 0 2px #f97316; }

.perf-score-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.perf-index {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
}

.perf-score.time .perf-index { background: #2563eb; }
.perf-score.budget .perf-index { background: #16a34a; }
.perf-score.amend .perf-index { background: #f97316; }
.perf-score.docs .perf-index { background: #7c3aed; }
.perf-score.ship .perf-index { background: #0891b2; }
.perf-score.issue .perf-index { background: #dc2626; }

.perf-score-head strong,
.perf-detail-card strong {
  color: #12263f;
  font-size: 0.95rem;
}

.perf-score p,
.perf-detail-card p,
.perf-person-head p {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.82rem;
}

.perf-score-value {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin: 0.45rem 0 0.35rem;
}

.perf-score-value b,
.perf-detail-rate {
  color: #12263f;
  font-size: 1.8rem;
  line-height: 1;
}

.perf-score-value em {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
}

.perf-score-value em.up { color: #16a34a; }
.perf-score-value em.down { color: #dc2626; }

.perf-bar {
  height: 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.perf-score.time .perf-bar span,
.perf-detail-card.time .perf-bar span { background: #3b82f6; }
.perf-score.budget .perf-bar span,
.perf-detail-card.budget .perf-bar span { background: #22c55e; }
.perf-score.amend .perf-bar span,
.perf-detail-card.amend .perf-bar span { background: #fb923c; }
.perf-score.docs .perf-bar span { background: #8b5cf6; }
.perf-score.ship .perf-bar span { background: #06b6d4; }
.perf-score.issue .perf-bar span { background: #f87171; }
.perf-score.docs.is-on { box-shadow: inset 0 0 0 2px #7c3aed; }
.perf-score.ship.is-on { box-shadow: inset 0 0 0 2px #0891b2; }
.perf-score.issue.is-on { box-shadow: inset 0 0 0 2px #dc2626; }

.perf-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.perf-score-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.55rem;
  color: #64748b;
  font-size: 0.78rem;
}

.perf-score-foot b { color: #12263f; }
.perf-scores.warehouse-scores .perf-score-foot {
  align-items: flex-start;
}
.perf-scores.warehouse-scores .perf-score-foot span,
.perf-scores.warehouse-scores .perf-score-foot b {
  line-height: 1.35;
}

.wh-kpi-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.wh-kpi-filters button {
  border: 1px solid #dbe3ee;
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  color: #334155;
  font-weight: 650;
  cursor: pointer;
}

.wh-kpi-filters button.is-on {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #fff;
}

.wh-kpi-dialog .budget-modal-body {
  max-height: min(58vh, 560px);
}

.wh-kpi-dialog .wh-stamp small {
  display: block;
  margin-top: 0.12rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 650;
}

.wh-kpi-dialog .perf-pill.wh-status {
  min-width: 0;
  white-space: normal;
  line-height: 1.3;
}

.order-no,
.order-card-id,
.doc-order,
.doc-id,
.approval-order-id,
.budget-link.budget-id,
.perf-mini-row > b {
  white-space: nowrap;
}

.wh-kpi-dialog .doc-table {
  table-layout: auto;
}

.wh-kpi-dialog .doc-table-wrap {
  overflow-x: auto;
}

.doc-table td.order-no,
.wh-kpi-dialog .doc-table td.order-no {
  width: 1%;
  white-space: nowrap;
}

.perf-row { cursor: pointer; }
.perf-name { color: #2563eb; font-weight: 700; }

.perf-pill {
  display: inline-block;
  min-width: 4.4rem;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.perf-pill.good { background: #dcfce7; color: #15803d; }
.perf-pill.mid { background: #ffedd5; color: #c2410c; }
.perf-pill.bad { background: #fee2e2; color: #b91c1c; }

.perf-person-head h2 {
  margin: 0;
  color: #12263f;
}

.perf-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.perf-detail-card {
  padding: 0.9rem 0.95rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  min-width: 0;
}

.perf-detail-card.time { background: #f8fbff; }
.perf-detail-card.budget { background: #f6fdf8; }
.perf-detail-card.amend { background: #fffaf5; }

.perf-mini-head {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: center;
  margin: 0.7rem 0 0.35rem;
  color: #64748b;
  font-size: 0.78rem;
}

.budget-page button.perf-more {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: none;
  min-height: 0;
}

.perf-mini {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 18rem;
  overflow: auto;
}

.perf-mini-row {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0.25rem 0.4rem;
  padding: 0.4rem 0.15rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.78rem;
  color: #334155;
}

.perf-mini-row em {
  grid-column: 1 / -1;
  font-style: normal;
  font-weight: 700;
}

.perf-mini-row em.bad { color: #dc2626; }
.perf-mini-row em.mid { color: #c2410c; }

/* SEMAKAN AKHIR PESANAN (finalize review) */
body.finalize-open {
  overflow: hidden;
}

body.finalize-open .summary-bar {
  visibility: hidden;
}

.finalize-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.25rem 1rem 2rem;
  overflow: auto;
  background: rgba(15, 23, 42, 0.45);
}

.finalize-modal-overlay[hidden] {
  display: none !important;
}

.finalize-modal {
  width: min(980px, 100%);
  margin: 0.5rem auto 2rem;
  background: #fff;
  border: 1px solid #d9deea;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.finalize-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid #e4e8f2;
}

.finalize-modal-header h2 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
  color: #1e293b;
}

.finalize-modal-header p {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.finalize-modal-close {
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0.1rem 0.35rem;
}

.finalize-order-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e4e8f2;
}

.finalize-info-item span {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #6b728a;
  text-transform: uppercase;
}

.finalize-info-item strong {
  display: block;
  margin-top: 0.2rem;
  color: #1e293b;
  font-size: 0.95rem;
}

.finalize-order-tables {
  padding: 1rem 1.25rem;
}

.finalize-summary-group {
  margin-bottom: 1.25rem;
}

.finalize-summary-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  padding: 0.55rem 0.75rem;
  background: #eef3ff;
  border-radius: 10px;
}

.finalize-summary-heading h3 {
  margin: 0;
  font-size: 0.95rem;
  color: #24324a;
}

.finalize-summary-heading span {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4b5c7a;
}

.finalize-subcategory {
  margin: 0.7rem 0 1rem;
}

.finalize-subcategory h4 {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  color: #334155;
}

.finalize-table-wrap {
  overflow: auto;
  border: 1px solid #e4e8f2;
  border-radius: 10px;
}

.finalize-order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.finalize-order-table th,
.finalize-order-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #eef1f7;
  text-align: left;
  vertical-align: top;
}

.finalize-order-table th {
  background: #f8fafc;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
}

.finalize-order-table td small {
  display: block;
  margin-top: 0.15rem;
  color: #6b728a;
  font-size: 0.75rem;
}

.finalize-order-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.finalize-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid #e4e8f2;
  background: #f8fafc;
}

.finalize-summary-card {
  flex: 1 1 120px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  border: 1px solid #e4e8f2;
  border-radius: 10px;
}

.finalize-summary-card.total {
  background: #eef3ff;
}

.finalize-summary-card span {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #6b728a;
}

.finalize-summary-card strong {
  display: block;
  margin-top: 0.2rem;
  font-weight: 600;
}

.finalize-order-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 1rem 1.25rem 1.25rem;
}

.finalize-order-actions .solid {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  border: 0;
}

.finalize-order-actions .solid:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

#submit-order-message {
  margin: 0 1.25rem 1.1rem;
}

/* ======================================================
   SSO / SMR UNIVERSAL DIALOG (popup — bukan window.alert)
   ====================================================== */
.sso-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(20, 35, 60, 0.58);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.sso-dialog-overlay.is-visible {
  opacity: 1;
}

.sso-dialog-card {
  width: min(430px, 94vw);
  max-height: min(80vh, 640px);
  overflow: auto;
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid #d7e2f1;
  border-radius: 16px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 24px 70px rgba(15, 35, 70, 0.28);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.2s ease;
}

.sso-dialog-overlay.is-visible .sso-dialog-card {
  transform: translateY(0) scale(1);
}

.sso-dialog-icon {
  display: flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 13px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 27px;
  font-weight: 900;
}

.sso-dialog-warning { background: #e8a614; }
.sso-dialog-error { background: #dc2626; }
.sso-dialog-success { background: #16a34a; }
.sso-dialog-info { background: #2563eb; }
.sso-dialog-confirm {
  background: var(--sso-gradient, linear-gradient(90deg, #2563eb, #7c3aed));
}

.sso-dialog-card h2 {
  margin: 0 0 10px;
  color: #173e80;
  font-size: 19px;
  font-weight: 800;
}

.sso-dialog-message {
  color: #46566d;
  font-size: 13px;
  line-height: 1.65;
  text-align: left;
  overflow-wrap: anywhere;
}

.sso-dialog-reason-label {
  display: block;
  margin-top: 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}

.sso-dialog-reason-label textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid #d5ddd7;
  border-radius: 8px;
  font: inherit;
}

.sso-dialog-reason-hint {
  display: block;
  margin-top: 4px;
  color: #b71c1c;
  font-size: 12px;
  font-weight: 600;
}

.sso-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 21px;
}

.sso-dialog-primary,
.sso-dialog-secondary {
  min-width: 100px;
  padding: 10px 18px;
  border-radius: 9px;
  font-weight: 800;
  cursor: pointer;
}

.sso-dialog-primary {
  border: 0;
  background: var(--sso-gradient, linear-gradient(90deg, #2563eb, #7c3aed));
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(37, 99, 235, 0.2);
}

.sso-dialog-secondary {
  border: 1px solid #cad5e4;
  background: #ffffff;
  color: #42536c;
}

.sso-dialog-primary:hover,
.sso-dialog-secondary:hover {
  transform: translateY(-1px);
}

/* SMR theme override (hijau) */
.smr-confirm .sso-dialog-card h2 {
  color: #2f4f12 !important;
}

.smr-confirm .sso-dialog-icon,
.smr-confirm .sso-dialog-warning,
.smr-confirm .sso-dialog-confirm,
.smr-confirm .sso-dialog-info {
  background: #5e8f00 !important;
  color: #ffffff !important;
}

.smr-confirm .sso-dialog-success {
  background: #4f7d00 !important;
}

.smr-confirm .sso-dialog-error {
  background: #b45309 !important;
}

.smr-confirm .sso-dialog-primary {
  background: linear-gradient(135deg, #5e8f00, #84ad00) !important;
  box-shadow: 0 5px 14px rgba(94, 143, 0, 0.22) !important;
}

@media (max-width: 600px) {
  .sso-dialog-overlay { padding: 12px; }
  .sso-dialog-card { padding: 20px 16px; }
  .sso-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .sso-dialog-primary,
  .sso-dialog-secondary { width: 100%; }
}

/* Format 8 web edit */
.f8-pax-input {
  width: 5.5rem;
  min-height: 2rem;
  padding: 0.25rem 0.45rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  color: #12263f;
}

.f8-pax-input:focus {
  outline: 2px solid #16a34a;
  border-color: #16a34a;
}

#f8-pending {
  margin: 0.6rem 0 0.85rem;
  padding: 0.85rem 1rem;
}

#f8-pending h2 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}

.f8-pending-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding: 0.55rem 0;
  border-top: 1px solid #e2e8f0;
}

.f8-pending-row:first-of-type {
  border-top: 0;
}

.f8-row-locked td {
  background: #f8fafc;
  color: #64748b;
}

.format8-web-header {
  align-items: flex-start;
}

.format8-web-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.format8-student-card,
.format8-money-card {
  min-width: 8rem;
  padding: 0.55rem 0.85rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.format8-student-card span,
.format8-money-card span {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.format8-student-card strong,
.format8-money-card strong {
  color: #12263f;
  font-size: 1.35rem;
}

.format8-autosave {
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 600;
}

.format8-autosave.is-ok { color: #15803d; }
.format8-autosave.is-warn { color: #b45309; }
.format8-autosave.is-error { color: #dc2626; }
.format8-autosave.is-busy { color: #2563eb; }

/* Mohon Edit — soft sage (mesra mata, ikut tema SMR) */
button.f8-request-edit-btn,
button.ghost.f8-request-edit-btn {
  background: #eef5e6;
  border: 1px solid #b7c9a3;
  color: #3f5d2a;
  font-weight: 700;
}
button.f8-request-edit-btn:hover:not(:disabled),
button.ghost.f8-request-edit-btn:hover:not(:disabled) {
  background: #e4efc4;
  border-color: #9bb57e;
  color: #2f4f12;
}
button.f8-request-edit-btn:disabled,
button.ghost.f8-request-edit-btn:disabled {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.85;
}

/* Zakat ringkasan — strip metrik (tanpa kotak/jadual) */
.zakat-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem 1.75rem;
  margin: 0 0 1rem;
  padding: 0.15rem 0 0.85rem;
  border-bottom: 1px solid #e8efe0;
}

.zakat-metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 6.5rem;
}

.zakat-metric span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.zakat-metric strong {
  font-size: 1.35rem;
  font-weight: 800;
  color: #14532d;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.zakat-metric.is-total strong {
  color: #166534;
  font-size: 1.45rem;
}

.zakat-metric + .zakat-metric {
  padding-left: 1.75rem;
  border-left: 1px solid #e2e8f0;
}

@media (max-width: 640px) {
  .zakat-metric + .zakat-metric {
    padding-left: 0;
    border-left: none;
  }
}

.format8-lock-banner {
  margin: 0.35rem 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: #eef5e6;
  border: 1px solid #d7e3cc;
  color: #3f5d2a;
  font-size: 0.9rem;
  font-weight: 600;
}

.format8-ringkasan-wrap {
  margin: 0 0 1rem;
  overflow: auto;
}

.format8-ringkasan-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #14532d;
}

table.format8-ringkasan {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  overflow: hidden;
}

table.format8-ringkasan th,
table.format8-ringkasan td {
  border: 1px solid #dcfce7;
  padding: 0.45rem 0.55rem;
  text-align: center;
  font-size: 0.82rem;
}

table.format8-ringkasan thead th,
table.format8-ringkasan tr:first-child th {
  background: #dcfce7;
  color: #14532d;
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
}

table.format8-ringkasan th:first-child,
table.format8-ringkasan tr td:first-child,
table.format8-ringkasan tr th:first-child {
  text-align: left;
  white-space: nowrap;
}

table.format8-ringkasan tr.is-total th,
table.format8-ringkasan tr.is-total td {
  background: #166534;
  color: #fff;
  font-weight: 800;
}

/* Sticky header card — Format 8 / Zakat / Kantin */
.income-sticky-card,
.format8-sticky-toolbar {
  position: sticky;
  top: 0;
  z-index: 45;
  margin: 0 0 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #d7e3cc;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(47, 79, 18, 0.08);
  backdrop-filter: blur(8px);
}

.income-sticky-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 0 0 0.75rem;
  padding: 0 0 0.7rem;
  border-bottom: 1px solid #e8efe0;
}

.income-sticky-head h2,
.income-sticky-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #14532d;
  line-height: 1.25;
}

.income-sticky-aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.65rem;
}

.income-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.78rem !important;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.income-status-pill.is-ok {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #15803d;
}

.income-status-pill.is-warn {
  background: #ffedd5;
  border-color: #fdba74;
  color: #c2410c;
}

.income-status-pill.is-error {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

.income-status-pill.is-busy {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #2563eb;
}

.income-sticky-aside .format8-student-card,
.income-sticky-aside .format8-money-card {
  min-width: 7.25rem;
  padding: 0.4rem 0.7rem;
  border-radius: 12px;
  border: 1px solid #e8efe0;
  box-shadow: none;
  background: #f7faf3;
}

.income-sticky-aside .format8-student-card strong,
.income-sticky-aside .format8-money-card strong {
  font-size: 1.15rem;
}

.income-sticky-tools,
.format8-sticky-toolbar .format8-filter-row,
.format8-sticky-toolbar .income-sticky-tools {
  margin: 0;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
}

.format8-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.income-back-btn {
  margin: 0 0 0.55rem;
}

.sheet.income-sheet {
  padding-top: 0.75rem;
}

.income-sheet .format8-ringkasan-wrap {
  margin-top: 0;
}

.format8-table-wrap {
  overflow: visible;
}

table.format8-calendar {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

table.format8-calendar th,
table.format8-calendar td {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.35rem 0.45rem;
  text-align: center;
  white-space: nowrap;
}

/* Sticky: header kolum Hari/Tarikh/hidangan/Catatan (Gambar 3) */
table.format8-calendar thead th {
  position: sticky;
  top: var(--f8-sticky-top, 72px);
  z-index: 35;
  background: #e4efc4;
  color: #2f4f12;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #b8cf80;
  box-shadow: 0 2px 0 rgba(47, 79, 18, 0.08);
}

table.format8-calendar .format8-day-cell,
table.format8-calendar .format8-date-cell {
  text-align: left;
  font-weight: 600;
  color: #334155;
}

table.format8-calendar tr.is-today {
  background: #f0fdf4;
}

table.format8-calendar tr.is-future {
  opacity: 0.72;
}

table.format8-calendar tr.is-locked {
  background: #f8fafc;
}

.format8-pax-input {
  width: 3.6rem;
  min-height: 2rem;
  padding: 0.2rem 0.3rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  text-align: center;
  font: inherit;
  font-weight: 700;
}

.format8-pax-input.is-blank { background: #fff; }
.format8-pax-input.is-zero { background: #fef3c7; }
.format8-pax-input.has-value { background: #dcfce7; }
.format8-pax-input.no-rate { background: #f1f5f9; color: #94a3b8; }
.format8-pax-input.is-locked,
.format8-pax-input:disabled {
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

.format8-note-input {
  width: 100%;
  min-width: 7rem;
  min-height: 2rem;
  padding: 0.25rem 0.45rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  font-size: 0.82rem;
}

.format8-note-input.is-locked,
.format8-note-input:disabled {
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

#f8-save {
  white-space: nowrap;
}

.format8-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
}

.format8-edit-modal[hidden] {
  display: none !important;
}

.format8-edit-dialog {
  width: min(960px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

/* Modal tak perlu sticky header — offset halaman (72px) buat header terlekat tengah jadual */
.format8-edit-dialog table.format8-calendar thead th {
  position: static;
  top: auto;
  box-shadow: none;
}

.format8-edit-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.format8-edit-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.format8-edit-reason {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155;
}

.format8-edit-reason input {
  min-height: 2.25rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
}

.format8-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.f8-pending-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0;
  border-top: 1px solid #e2e8f0;
}

.f8-pending-line:first-of-type {
  border-top: 0;
}

.f8-pending-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.f8-change-tag {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Pax naik = income naik = hijau */
.f8-change-tag.is-up,
.f8-change-tag.is-change {
  background: #dcfce7;
  color: #15803d;
}

/* Pax turun = income turun = merah */
.f8-change-tag.is-down {
  background: #fee2e2;
  color: #b91c1c;
}

.f8-change-tag.is-same {
  background: #f1f5f9;
  color: #64748b;
}

.f8-dash-approvals {
  margin: 0.85rem 0 1.1rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 55%);
}

.f8-dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.55rem;
}

.f8-dash-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  color: #166534;
}

.f8-dash-head .field-note {
  margin: 0;
  max-width: 42rem;
}

.f8-dash-school {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.55rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #dcfce7;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.f8-dash-school:hover,
.f8-dash-school:focus-visible {
  border-color: #86efac;
  box-shadow: 0 6px 16px rgba(22, 101, 52, 0.1);
  outline: none;
}

.f8-dash-school strong {
  display: block;
  font-size: 0.98rem;
  color: #14532d;
}

.f8-dash-meta {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.82rem;
}

.f8-dash-open-hint {
  flex-shrink: 0;
  color: #15803d;
  font-size: 0.85rem;
  font-weight: 700;
}

.f8-dash-empty {
  margin: 0.35rem 0 0;
  padding: 1.35rem 1rem;
  border: 1px dashed #d5dbe6;
  border-radius: 12px;
  background: transparent;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: center;
}
.f8-dash-empty span {
  display: block;
}

.f8-decide-dialog {
  max-width: 42rem;
}

.f8-decide-list {
  max-height: min(55vh, 28rem);
  overflow: auto;
  margin-top: 0.35rem;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.nav-badge[hidden] {
  display: none !important;
}

/* ---- Makanan Tambahan (Zakat) — ikut Apps Script ---- */
.zakat-sheet .zakat-header {
  align-items: flex-start;
  gap: 1rem;
  margin: 0.35rem 0 0.85rem;
}

.zakat-sheet .zakat-header h2 {
  margin: 0;
  letter-spacing: 0.02em;
}

.zakat-header-aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
}

.zakat-filter-card {
  margin: 0 0 0.85rem;
  padding: 0.85rem 1rem 1rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.zakat-filter-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.65rem;
}

/* Sheet income: overflow visible supaya sticky toolbar + thead ikut scroll halaman */
.sheet.zakat-sheet,
.sheet.kantin-sheet {
  overflow: visible;
}

.zakat-table-wrap {
  margin-top: 0.35rem;
  overflow: visible;
}

.zakat-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.zakat-table th,
.zakat-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
}

.zakat-table th {
  position: sticky;
  top: var(--zk-sticky-top, 72px);
  z-index: 35;
  background: #e4efc4;
  color: #2f4f12;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #b8cf80;
  box-shadow: 0 2px 0 rgba(47, 79, 18, 0.08);
}

.zakat-pax-input,
.zakat-note-input {
  width: 100%;
  min-width: 0;
  padding: 0.4rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.zakat-pax-cell {
  width: 6.5rem;
}

.zakat-pax-input {
  text-align: right;
  font-weight: 600;
}

.zakat-pax-input:disabled,
.zakat-note-input:disabled,
.zakat-pax-input:read-only,
.zakat-note-input:read-only {
  background: #f8fafc;
  color: #334155;
}

.kantin-money-cell {
  width: 6.25rem;
}

.kantin-money-input {
  width: 100%;
  min-width: 0;
  padding: 0.4rem 0.45rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  text-align: right;
  background: #fff;
}

.kantin-money-input:disabled,
.kantin-money-input:read-only {
  background: #f8fafc;
  color: #334155;
}

.kantin-total-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kantin-day-total {
  font-size: 0.92rem;
  color: #14532d;
}

.kantin-table th:nth-child(n+3):nth-child(-n+6),
.kantin-table td:nth-child(n+3):nth-child(-n+6) {
  text-align: right;
}

/* Expenses Harian */
.exp-table .exp-supplier-row {
  cursor: pointer;
}

.exp-table .exp-supplier-row:hover {
  background: #f0fdf4;
}

.exp-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
}

.exp-modal-backdrop.exp-modal-stack {
  z-index: 90;
}

.exp-modal-backdrop.exp-modal-stack-top {
  z-index: 95;
}

.exp-modal {
  width: min(640px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.exp-modal-wide {
  width: min(960px, 100%);
}

.exp-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.exp-modal-head h3 {
  margin: 0;
  font-size: 1.15rem;
}

.exp-modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.exp-modal-manual {
  width: min(520px, 100%);
}

.exp-manual-sub {
  margin: 0.2rem 0 0;
}

.exp-ms-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 11rem;
  overflow: auto;
  margin: 0 0 0.85rem;
  padding: 0.45rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.exp-ms-cat-check {
  margin: 0 !important;
  min-width: 9.5rem;
}

.exp-ms-view-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
}

.exp-ms-cat-chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #065f46;
  font-size: 0.78rem;
  font-weight: 600;
}

.exp-manual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  margin: 0.85rem 0 0.75rem;
}

.exp-manual-grid label,
.exp-manual-note {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.exp-manual-grid input,
.exp-manual-grid select,
.exp-manual-note input {
  font-weight: 400;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.exp-manual-note {
  margin-bottom: 0.65rem;
}

.exp-manual-lines-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
}

.exp-manual-lines {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.exp-manual-line {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 2.2rem;
  gap: 0.4rem;
  align-items: center;
}

.exp-manual-line select,
.exp-manual-line input {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

.exp-manual-line .exp-m-del {
  min-height: 2.2rem;
  padding: 0.25rem;
}

.exp-manual-total {
  margin: 0.15rem 0 0.55rem;
  text-align: right;
  font-size: 0.92rem;
  color: #334155;
}

.exp-manual-total strong {
  color: #166534;
}

.exp-manual-actions {
  justify-content: stretch;
}

.exp-manual-save {
  width: 100%;
  justify-content: center;
  padding: 0.7rem 1rem;
}

@media (max-width: 560px) {
  .exp-manual-grid {
    grid-template-columns: 1fr;
  }
}

#stock-kpis.kpi-row {
  gap: 0.45rem;
  margin: 0.35rem 0 0.55rem;
}

#stock-kpis .kpi {
  flex: 1 1 110px;
  min-height: 0;
  padding: 0.4rem 0.65rem 0.45rem;
  border-radius: 10px;
}

#stock-kpis .kpi span {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  line-height: 1.2;
}

#stock-kpis .kpi strong,
.smr-shell #stock-kpis .kpi strong {
  margin-top: 0.12rem;
  font-size: 0.98rem;
  line-height: 1.25;
  font-weight: 800;
}

.stock-cat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.45rem;
  margin: 0.4rem 0 0.65rem;
}

.stock-cat-card {
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  background: #fff;
}

.stock-cat-card h4 {
  margin: 0 0 0.3rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: #166534;
  letter-spacing: 0.02em;
}

.stock-cat-card dl {
  margin: 0;
  display: grid;
  gap: 0.2rem;
}

.stock-cat-card div {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.3;
}

.stock-cat-card strong {
  color: #0f172a;
  font-weight: 700;
  font-size: 0.72rem;
}

.stock-section-title {
  margin: 0.75rem 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  color: #166534;
}

.stock-sticky-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0 0 0.65rem;
  padding: 0.75rem 0.9rem 0.65rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #d7e3cc;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(47, 79, 18, 0.08);
  backdrop-filter: blur(8px);
}

.stock-head-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.stock-actions-row {
  align-items: center;
  margin-top: 0.5rem;
}

.stock-sticky-toolbar .stock-actions-row {
  margin-bottom: 0;
}

.stock-delete-all-btn:not([disabled]) {
  border-color: #fca5a5;
  color: #b91c1c;
}

.stock-delete-all-btn:not([disabled]):hover {
  background: #fef2f2;
  border-color: #f87171;
}

/* Scroll ikut page — tajuk Stock Balance / status scroll hilang; toolbar + thead kekal */
.stock-lines-wrap {
  max-height: none;
  overflow: visible;
}

/* Sticky thead hanya dalam paparan isi (ada toolbar). Semakan: jangan sticky — elak overlap baris */
.stock-lines-wrap .stock-lines-table thead th {
  position: sticky;
  top: var(--stock-thead-top, 7.5rem);
  z-index: 3;
  background: #f8fafc;
  box-shadow: 0 1px 0 #dbe4ee;
}

#stock-review-view .stock-lines-table thead th {
  position: static;
  top: auto;
  box-shadow: none;
}

.stock-custom-modal {
  width: min(440px, 100%);
}

.stock-custom-sub {
  margin: 0.25rem 0 0;
}

.stock-custom-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.75rem;
  margin: 0.15rem 0 0.25rem;
}

.stock-custom-form label {
  display: grid;
  gap: 0.28rem;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.stock-custom-form .stock-custom-full {
  grid-column: 1 / -1;
}

.stock-custom-form input,
.stock-custom-form select {
  width: 100%;
  margin: 0;
  min-height: 42px;
  padding: 0.45rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  font-size: 0.95rem;
}

.stock-custom-form input:focus,
.stock-custom-form select:focus {
  outline: 2px solid rgba(110, 163, 24, 0.35);
  border-color: #6ea318;
}

.stock-lines-table input,
.stock-lines-table select,
.stock-opening-table input {
  width: 100%;
  max-width: 7.5rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.stock-lines-table .stock-qty,
.stock-lines-table .stock-price {
  max-width: 5.5rem;
}

.stock-line-dirty {
  background: #f0fdf4;
}

.stock-lines-table tr.stock-cat-header td {
  background: #ecfdf5;
  color: #166534;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 0.55rem 0.65rem;
  border-top: 1px solid #bbf7d0;
  border-bottom: 1px solid #bbf7d0;
}

.stock-lines-table tr.stock-cat-subtotal td {
  color: #166534;
  font-weight: 800;
  padding: 0.45rem 0.65rem 0.7rem;
  border-bottom: 1px solid #dbe4ee;
}

.stock-opening-wrap {
  margin: 0.5rem 0 0.75rem;
}

.exp-scan-docs {
  display: grid;
  gap: 0.75rem;
  max-height: min(52vh, 420px);
  overflow: auto;
  margin: 0.5rem 0 0.75rem;
}

.exp-scan-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: #fff;
}

.exp-scan-card.off {
  opacity: 0.55;
  background: #f8fafc;
}

.exp-scan-include {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #166534;
}

.exp-scan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.75rem;
}

.exp-scan-grid label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}

.exp-scan-grid input,
.exp-scan-grid select {
  font-weight: 400;
  padding: 0.4rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.exp-scan-warn {
  color: #b45309 !important;
}

@media (max-width: 640px) {
  .exp-scan-grid {
    grid-template-columns: 1fr;
  }
}

.exp-file-label {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.exp-file-label input[type='file'] {
  font-weight: 400;
}

.exp-detail-table select.exp-i-cat {
  width: 100%;
  min-width: 7.5rem;
  padding: 0.35rem 0.4rem;
}

.exp-receipt-files a {
  color: #0f766e;
  font-weight: 600;
}

.exp-cancel-reason {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155;
}

.exp-cancel-reason input,
.exp-detail-table input {
  min-height: 2.25rem;
  width: 100%;
  padding: 0.4rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
  box-sizing: border-box;
}

.exp-detail-table {
  width: 100%;
  border-collapse: collapse;
}

.exp-detail-table th,
.exp-detail-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
}

.exp-detail-table td.exp-cat-cell {
  font-size: 0.88rem;
  line-height: 1.35;
  white-space: normal;
}

.exp-sup-modal {
  width: min(560px, 100%);
}

.exp-sup-modal-wide {
  width: min(720px, 100%);
}

.exp-ms-dialog {
  width: min(920px, 100%);
  height: min(88vh, 760px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.exp-ms-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.1rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.exp-ms-top h3 {
  margin: 0 0 0.2rem;
  font-size: 1.1rem;
}

.exp-ms-sub {
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
}

.exp-ms-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  flex: 1;
  height: 100%;
}

@media (min-width: 760px) {
  .exp-ms-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.exp-ms-side {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

@media (min-width: 760px) {
  .exp-ms-side {
    border-bottom: 0;
    border-right: 1px solid #e2e8f0;
  }
}

.exp-ms-search {
  width: 100%;
  min-height: 2.1rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  font-size: 0.86rem;
  box-sizing: border-box;
  background: #fff;
}

.exp-ms-new {
  border: 1px dashed #86efac;
  background: #f0fdf4;
  color: #166534;
  border-radius: 8px;
  min-height: 2.1rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.exp-ms-list {
  overflow: auto;
  max-height: 28vh;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 0;
}

@media (min-width: 760px) {
  .exp-ms-list {
    max-height: none;
    flex: 1;
  }
}

.exp-ms-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.45rem;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  font: inherit;
}

.exp-ms-item[hidden] {
  display: none !important;
}

.exp-ms-item:hover {
  background: #fff;
}

.exp-ms-item.on {
  background: #dcfce7;
}

.exp-ms-item.inactive .exp-ms-item-name {
  color: #94a3b8;
}

.exp-ms-item-name {
  font-size: 0.86rem;
  font-weight: 650;
  color: #0f172a;
  line-height: 1.25;
}

.exp-ms-item-meta {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}

.exp-ms-edit-btn {
  flex-shrink: 0;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.exp-ms-empty,
.exp-ms-empty-state {
  margin: 0;
  padding: 1.25rem;
  color: #64748b;
  font-size: 0.9rem;
}

.exp-ms-main {
  padding: 0.85rem 1rem 1.15rem;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.exp-ms-editor {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 0;
  flex: 1;
  overflow: visible;
}

.exp-ms-view,
.exp-ms-edit-panel {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.exp-ms-view[hidden],
.exp-ms-edit-panel[hidden] {
  display: none !important;
}

.exp-ms-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

@media (min-width: 560px) {
  .exp-ms-fields {
    grid-template-columns: 1fr 140px;
  }
}

.exp-ms-fields label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}

.exp-ms-fields input,
.exp-ms-fields select {
  min-height: 2.2rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
}

.exp-ms-school-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.exp-ms-school-head em {
  font-style: normal;
  color: #166534;
}

.exp-ms-school-actions {
  display: flex;
  gap: 0.65rem;
}

.exp-ms-link {
  border: 0;
  background: transparent;
  color: #166534;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.exp-ms-schools {
  overflow: auto;
  flex: 0 1 auto;
  height: auto;
  min-height: 0;
  max-height: calc(88vh - 15rem);
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 0;
  padding: 0.2rem 0.3rem;
  margin-bottom: 0.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.exp-ms-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.18rem 0.3rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.25;
  color: #334155;
  cursor: pointer;
}

.exp-ms-check:hover {
  background: #f0fdf4;
}

.exp-ms-check.on {
  background: #ecfdf5;
}

.exp-ms-check input {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: #16a34a;
}

.exp-ms-check span {
  line-height: 1.25;
}

.exp-ms-save {
  min-height: 2.4rem;
  justify-content: center;
  flex: 1;
}

.exp-ms-block {
  padding: 0.85rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.exp-ms-block:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.exp-ms-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.exp-ms-block-head h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.exp-ms-block-head em {
  font-style: normal;
  color: #64748b;
  font-weight: 600;
}

.exp-ms-inline-actions {
  margin-bottom: 0.45rem;
}

.exp-ms-view-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.exp-ms-view-name {
  font-size: 1.05rem;
  font-weight: 750;
  color: #0f172a;
  line-height: 1.3;
}

.exp-ms-view-status {
  margin-top: 0.25rem;
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #166534;
  font-size: 0.78rem;
  font-weight: 700;
}

.exp-ms-view-status.off {
  background: #f1f5f9;
  color: #64748b;
}

.exp-ms-schools-ro {
  background: #f8fafc;
}

.exp-ms-ro-school {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.86rem;
  font-weight: 550;
  color: #334155;
}

.exp-ms-ro-school:last-child {
  border-bottom: 0;
}

.exp-ms-note {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.4;
}

.exp-ms-block-edit {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
}

.exp-ms-block-edit[hidden] {
  display: none !important;
}

.exp-ms-block-edit .exp-ms-cats {
  max-height: 12rem;
  flex: 0 1 auto;
}

.exp-ms-block-edit .exp-ms-schools {
  max-height: min(22rem, 48vh);
  min-height: 14rem;
  flex: 1 1 auto;
}

.exp-ms-edit-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.35rem;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  padding-top: 0.35rem;
  background: #fff;
  z-index: 2;
}

.exp-ms-edit-actions .ghost {
  min-height: 2.4rem;
}

.exp-ms-edit-actions .exp-ms-save {
  flex: 1;
}

.exp-sup-id {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
}

.exp-modal-x {
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0 0.25rem;
}

.exp-sup-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 0.85rem 0 1rem;
}

@media (min-width: 640px) {
  .exp-sup-form {
    grid-template-columns: 1.1fr 1.2fr 0.85fr;
    align-items: end;
  }
}

.exp-sup-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155;
}

.exp-sup-form input,
.exp-sup-form select {
  min-height: 2.4rem;
  width: 100%;
  padding: 0.4rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
  box-sizing: border-box;
  background: #fff;
}

.exp-sup-save {
  width: 100%;
  min-height: 2.6rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.exp-sup-list {
  max-height: 48vh;
  overflow: auto;
}

.exp-sup-list th {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.82rem;
}

.exp-sup-status {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #166534;
  font-size: 0.78rem;
  font-weight: 700;
}

.exp-sup-status.off {
  background: #f1f5f9;
  color: #64748b;
}

.exp-sup-form-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .exp-sup-form-2 {
    grid-template-columns: 1.6fr 0.9fr;
  }
}

.exp-sup-action {
  text-align: right;
  width: 5.5rem;
}

.exp-sup-edit,
.exp-cat-edit {
  color: #166534 !important;
  border: 1px solid #bbf7d0 !important;
  background: #f0fdf4 !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 0.12rem 0.5rem !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  border-radius: 999px !important;
}

/* HR Labour Cost */
.hl-school-link {
  display: inline;
  margin: 0;
  padding: 0;
  min-height: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #166534;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  vertical-align: middle;
}
.hl-badge {
  display: inline-block;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  background: #f1f5f9;
  color: #475569;
  vertical-align: middle;
}
.hl-badge.actual { background: #dcfce7; color: #166534; }
.hl-badge.draft { background: #fef3c7; color: #92400e; }
.hl-compare,
.hl-live {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.75rem 0;
}
.hl-compare > div,
.hl-live > div {
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: #fff;
}
.hl-compare span,
.hl-live span {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 0.2rem;
}
.hl-compare strong,
.hl-live strong {
  font-size: 1rem;
  color: #0f172a;
}
.hl-compare small {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.78rem;
}
.hl-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.75rem;
}
.hl-form label {
  display: grid;
  gap: 0.28rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}
.hl-form input {
  min-height: 40px;
  padding: 0.4rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}
.hl-table th,
.hl-table td {
  padding: 0.42rem 0.55rem;
  font-size: 0.8rem;
  line-height: 1.25;
  vertical-align: middle;
  text-align: center;
}
.hl-table th:first-child,
.hl-table td:first-child {
  text-align: left;
}
.hl-table th {
  font-size: 0.72rem;
  font-weight: 700;
}
.hl-school-link {
  font-size: 0.8rem;
}
@media (max-width: 800px) {
  .hl-compare,
  .hl-live,
  .hl-form {
    grid-template-columns: 1fr 1fr;
  }
}

.hl-sticky-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0 0 0.65rem;
  padding: 0.75rem 0.9rem 0.65rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #d7e3cc;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(47, 79, 18, 0.08);
  backdrop-filter: blur(8px);
}
.hl-sticky-toolbar .kpi-row {
  margin: 0.45rem 0 0;
  gap: 0.45rem;
}
.hl-sticky-toolbar .kpi {
  flex: 1 1 110px;
  min-height: 0;
  padding: 0.4rem 0.65rem 0.45rem;
  border-radius: 10px;
}
.hl-sticky-toolbar .kpi span {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}
.hl-sticky-toolbar .kpi strong,
.smr-shell .hl-sticky-toolbar .kpi strong {
  margin-top: 0.1rem;
  font-size: 0.98rem;
  font-weight: 800;
}
.hl-table-wrap {
  max-height: none;
  overflow: visible;
}
/* Sticky thead hanya dashboard Labour — jangan ganggu jadual Kemaskini Pekerja */
#labour-board .hl-table-wrap .hl-table thead th {
  position: sticky;
  top: var(--hl-thead-top, 9.5rem);
  z-index: 3;
  background: #f8fafc;
  box-shadow: 0 1px 0 #dbe4ee;
}
#labour-staff .hl-table thead th {
  position: static;
  top: auto;
  box-shadow: none;
}
.hl-check-row {
  grid-column: 1 / -1;
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.1rem;
}
.hl-check {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}
.hl-check input[type='checkbox'] {
  width: 1.05rem;
  height: 1.05rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}
