/*
 * MPMS content polish
 * Scope: application content + login surfaces only.
 * The navigation/sidebar is intentionally left untouched except Logout.
 */

:root {
  --mpms-content-bg: #f4f7fb;
  --mpms-surface: #ffffff;
  --mpms-surface-soft: #f8fafc;
  --mpms-surface-blue: #f3f7fc;
  --mpms-border: #dde6f0;
  --mpms-border-strong: #cbd8e6;
  --mpms-text: #18324b;
  --mpms-muted: #6d8093;
  --mpms-blue: #1f6687;
  --mpms-blue-deep: #173f68;
  --mpms-blue-bright: #246ea0;
  --mpms-focus: rgba(31, 102, 135, .16);
  --mpms-shadow-sm: 0 5px 18px rgba(25, 52, 77, .055);
  --mpms-shadow-md: 0 12px 32px rgba(25, 52, 77, .075);
}

/* ===== Main workspace only: do not restyle the sidebar ===== */
body.mpms-body:not(.print-view-body) {
  background: var(--mpms-content-bg) !important;
}

body.mpms-body:not(.print-view-body) .app-main {
  background:
    radial-gradient(circle at 82% 0%, rgba(64, 139, 179, .055), transparent 23rem),
    linear-gradient(180deg, #f7f9fc 0%, var(--mpms-content-bg) 320px) !important;
}

body.mpms-body:not(.print-view-body) .page-header {
  min-height: 92px !important;
  padding: 20px 30px !important;
  background: rgba(255, 255, 255, .94) !important;
  color: var(--mpms-text) !important;
  border-bottom: 1px solid var(--mpms-border) !important;
  box-shadow: 0 7px 24px rgba(25, 52, 77, .055) !important;
  backdrop-filter: blur(16px);
}

body.mpms-body:not(.print-view-body) .page-header .eyebrow {
  color: var(--mpms-blue-bright) !important;
  letter-spacing: .09em;
}

body.mpms-body:not(.print-view-body) .page-header h1 {
  margin-top: 3px;
  color: #142e48 !important;
  font-size: clamp(22px, 2vw, 29px);
  letter-spacing: -.025em;
}

body.mpms-body:not(.print-view-body) .profile-pill {
  padding: 8px 12px 8px 8px !important;
  background: #f7f9fc !important;
  color: var(--mpms-text) !important;
  border: 1px solid var(--mpms-border) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

body.mpms-body:not(.print-view-body) .profile-pill strong {
  color: #203a52 !important;
}

body.mpms-body:not(.print-view-body) .profile-pill small {
  color: #7b8da0 !important;
}

body.mpms-body:not(.print-view-body) .profile-avatar {
  background: linear-gradient(135deg, var(--mpms-blue-deep), var(--mpms-blue)) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(31, 102, 135, .18);
}

body.mpms-body:not(.print-view-body) .page-content {
  width: 100%;
  max-width: 1600px !important;
  padding: 28px 30px 54px !important;
}

body.mpms-body:not(.print-view-body) .accounting-page-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ===== Reusable surfaces ===== */
body.mpms-body:not(.print-view-body) .content-card,
body.mpms-body:not(.print-view-body) .filter-card,
body.mpms-body:not(.print-view-body) .mpms-panel,
body.mpms-body:not(.print-view-body) .monitoring-password,
body.mpms-body:not(.print-view-body) .ofp-document,
body.mpms-body:not(.print-view-body) .ofp-header-form-card,
body.mpms-body:not(.print-view-body) .ofp-po-picker-card,
body.mpms-body:not(.print-view-body) .ofp-draft-stage,
body.mpms-body:not(.print-view-body) .direct-ofp-form {
  background: var(--mpms-surface) !important;
  border: 1px solid var(--mpms-border) !important;
  border-radius: 18px !important;
  box-shadow: var(--mpms-shadow-sm) !important;
}

body.mpms-body:not(.print-view-body) .content-card:hover {
  border-color: #d2deea !important;
}

body.mpms-body:not(.print-view-body) .mpms-section-heading {
  min-height: 44px;
  margin-top: 2px;
}

body.mpms-body:not(.print-view-body) .mpms-section-heading h2,
body.mpms-body:not(.print-view-body) .ofp-page-head h2,
body.mpms-body:not(.print-view-body) .ofp-create-head h2 {
  color: #16334d !important;
  letter-spacing: -.02em;
}

body.mpms-body:not(.print-view-body) .mpms-section-heading p,
body.mpms-body:not(.print-view-body) .ofp-page-head p,
body.mpms-body:not(.print-view-body) .ofp-create-head p,
body.mpms-body:not(.print-view-body) .mpms-caption {
  color: var(--mpms-muted) !important;
  line-height: 1.55;
}

body.mpms-body:not(.print-view-body) .eyebrow {
  color: #46738f;
  font-weight: 850;
  letter-spacing: .08em;
}

/* ===== Buttons ===== */
body.mpms-body:not(.print-view-body) .btn {
  min-height: 40px;
  border-radius: 10px !important;
  font-weight: 750;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}

body.mpms-body:not(.print-view-body) .btn.compact {
  min-height: 36px;
  padding: 7px 11px;
}

body.mpms-body:not(.print-view-body) .btn.primary,
body.mpms-body:not(.print-view-body) .primary.btn {
  background: linear-gradient(135deg, #1d5f82, #26789a) !important;
  border-color: #1d5f82 !important;
  color: #fff !important;
  box-shadow: 0 6px 15px rgba(31, 102, 135, .16) !important;
}

body.mpms-body:not(.print-view-body) .btn.primary:hover,
body.mpms-body:not(.print-view-body) .primary.btn:hover {
  background: linear-gradient(135deg, #184f6d, #216b8b) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(31, 102, 135, .20) !important;
}

body.mpms-body:not(.print-view-body) .btn.secondary,
body.mpms-body:not(.print-view-body) .secondary.btn {
  background: #fff !important;
  border-color: var(--mpms-border-strong) !important;
  color: #35526c !important;
  box-shadow: 0 2px 7px rgba(25, 52, 77, .035) !important;
}

body.mpms-body:not(.print-view-body) .btn.secondary:hover,
body.mpms-body:not(.print-view-body) .secondary.btn:hover {
  background: #f4f8fb !important;
  border-color: #adc1d2 !important;
  color: #1f4e6b !important;
}

/* ===== Inputs / filters ===== */
body.mpms-body:not(.print-view-body) .page-content :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  border-color: #cfdbe7 !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #213d55 !important;
  box-shadow: inset 0 1px 2px rgba(25, 52, 77, .025);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

body.mpms-body:not(.print-view-body) .page-content :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus {
  outline: none !important;
  border-color: #4383a5 !important;
  box-shadow: 0 0 0 3px var(--mpms-focus) !important;
}

body.mpms-body:not(.print-view-body) .filter-card,
body.mpms-body:not(.print-view-body) .approved-filter-toolbar,
body.mpms-body:not(.print-view-body) .ofp-list-filter {
  padding: 12px 13px !important;
  background: #fff !important;
  border: 1px solid var(--mpms-border) !important;
  border-left: 1px solid var(--mpms-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 5px 18px rgba(25, 52, 77, .045) !important;
}

body.mpms-body:not(.print-view-body) .approved-filter-field > span,
body.mpms-body:not(.print-view-body) .ofp-filter-field > span,
body.mpms-body:not(.print-view-body) .ofp-field-label,
body.mpms-body:not(.print-view-body) .direct-field > span {
  color: #60778b !important;
  font-weight: 850 !important;
}

/* ===== Dashboard ===== */
body.mpms-body:not(.print-view-body) .dashboard-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 2px;
  padding: 27px 29px !important;
  border: 1px solid #d9e5ef !important;
  border-radius: 20px !important;
  background:
    radial-gradient(circle at 92% 16%, rgba(44, 130, 168, .12), transparent 14rem),
    linear-gradient(135deg, #ffffff 0%, #f3f8fc 100%) !important;
  box-shadow: var(--mpms-shadow-sm) !important;
}

body.mpms-body:not(.print-view-body) .dashboard-hero h2 {
  margin: 5px 0 6px;
  color: #17334d !important;
  font-size: clamp(25px, 2.4vw, 34px);
  letter-spacing: -.03em;
}

body.mpms-body:not(.print-view-body) .dashboard-hero p {
  max-width: 760px;
  color: #687d90 !important;
  line-height: 1.6;
}

body.mpms-body:not(.print-view-body) .dashboard-kpi-grid,
body.mpms-body:not(.print-view-body) .dashboard-mini-grid,
body.mpms-body:not(.print-view-body) .dashboard-main-grid,
body.mpms-body:not(.print-view-body) .dashboard-lower-grid {
  gap: 14px !important;
}

body.mpms-body:not(.print-view-body) .dashboard-kpi {
  position: relative;
  overflow: hidden;
  padding: 19px !important;
  background: #fff !important;
}

body.mpms-body:not(.print-view-body) .dashboard-kpi::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #1f6687, #56a4c1);
  opacity: .72;
}

body.mpms-body:not(.print-view-body) .dashboard-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px !important;
  background: #edf5fa !important;
  color: #236c91 !important;
}

body.mpms-body:not(.print-view-body) .dashboard-kpi strong {
  color: #15334d !important;
  letter-spacing: -.025em;
}

body.mpms-body:not(.print-view-body) .dashboard-mini-card {
  padding: 17px 18px !important;
  background: #fff !important;
}

body.mpms-body:not(.print-view-body) .dashboard-mini-card > span,
body.mpms-body:not(.print-view-body) .dashboard-kpi span {
  color: #708397 !important;
}

body.mpms-body:not(.print-view-body) .dashboard-mini-card strong {
  color: #1c3c56 !important;
}

body.mpms-body:not(.print-view-body) .dashboard-panel {
  overflow: hidden;
  padding: 0 !important;
}

body.mpms-body:not(.print-view-body) .dashboard-panel-head {
  min-height: 65px;
  padding: 16px 18px !important;
  background: #fbfcfe;
  border-bottom: 1px solid #e5ecf3 !important;
}

body.mpms-body:not(.print-view-body) .dashboard-panel-head h3 {
  color: #18364f !important;
  letter-spacing: -.015em;
}

body.mpms-body:not(.print-view-body) .dashboard-panel-head > a {
  color: #276d91 !important;
}

body.mpms-body:not(.print-view-body) .dashboard-record {
  padding: 14px 18px !important;
  border-bottom-color: #edf1f5 !important;
}

body.mpms-body:not(.print-view-body) .dashboard-record:hover,
body.mpms-body:not(.print-view-body) .dashboard-quick-actions > a:hover {
  background: #f5f9fc !important;
}

body.mpms-body:not(.print-view-body) .dashboard-record-icon {
  background: #edf5fa !important;
  color: #276f94 !important;
}

body.mpms-body:not(.print-view-body) .dashboard-ewt-grid article {
  background: #f9fbfd !important;
  border-color: #e1e9f1 !important;
}

/* ===== Purchase Orders / hero areas ===== */
body.mpms-body:not(.print-view-body) .accounting-hero,
body.mpms-body:not(.print-view-body) .notification-hero,
body.mpms-body:not(.print-view-body) .ofp-created-hero {
  border: 1px solid #1b5878 !important;
  border-radius: 20px !important;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .13), transparent 15rem),
    linear-gradient(135deg, #173f68 0%, #1f6687 62%, #287e98 100%) !important;
  box-shadow: 0 12px 30px rgba(23, 63, 104, .15) !important;
}

body.mpms-body:not(.print-view-body) .accounting-hero h2,
body.mpms-body:not(.print-view-body) .notification-hero h2,
body.mpms-body:not(.print-view-body) .ofp-created-hero h2 {
  color: #fff !important;
  letter-spacing: -.025em;
}

body.mpms-body:not(.print-view-body) .accounting-hero p,
body.mpms-body:not(.print-view-body) .notification-hero p,
body.mpms-body:not(.print-view-body) .ofp-created-hero p {
  color: rgba(255, 255, 255, .79) !important;
}

body.mpms-body:not(.print-view-body) .accounting-hero-stats article {
  background: rgba(255, 255, 255, .095) !important;
  border-color: rgba(255, 255, 255, .14) !important;
  backdrop-filter: blur(6px);
}

body.mpms-body:not(.print-view-body) .mpms-summary article {
  padding: 19px 20px !important;
  background: #fff !important;
}

body.mpms-body:not(.print-view-body) .mpms-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #edf5fa !important;
  color: #246f94 !important;
}

/* ===== Tables ===== */
body.mpms-body:not(.print-view-body) .page-content :is(
  .mpms-table-wrap,
  .approved-po-table-wrap,
  .ofp-register-wrap,
  .ofp-picker-table-wrap,
  .ofp-draft-table-wrap,
  .ofp-official-table-wrap,
  .direct-lines-table-wrap,
  .master-catalog-table-wrap
) {
  border-radius: 12px;
  scrollbar-color: #8fa7ba #edf2f6;
}

body.mpms-body:not(.print-view-body) .page-content table {
  background: #fff;
}

body.mpms-body:not(.print-view-body) .page-content table thead th {
  background: linear-gradient(135deg, #173f68 0%, #1f6687 100%) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, .13) !important;
  letter-spacing: .045em;
}

body.mpms-body:not(.print-view-body) .page-content table tbody td {
  border-color: #e8eef4 !important;
}

body.mpms-body:not(.print-view-body) .page-content table tbody tr:nth-child(even) {
  background: #fbfcfd;
}

body.mpms-body:not(.print-view-body) .page-content table tbody tr:hover {
  background: #f4f8fb !important;
}

body.mpms-body:not(.print-view-body) .approved-po-table-card,
body.mpms-body:not(.print-view-body) .ofp-register-card,
body.mpms-body:not(.print-view-body) .master-catalog-card {
  overflow: hidden;
  border-radius: 16px !important;
}

body.mpms-body:not(.print-view-body) .table-sort-link.active {
  background: rgba(255, 255, 255, .18) !important;
  border-color: rgba(255, 255, 255, .18) !important;
  color: #fff !important;
}

/* ===== Notification center ===== */
body.mpms-body:not(.print-view-body) .notification-list-card {
  overflow: hidden;
  padding: 0 !important;
}

body.mpms-body:not(.print-view-body) .notification-list-heading,
body.mpms-body:not(.print-view-body) .notification-toolbar {
  background: #fbfcfe !important;
  border-color: #e5ecf3 !important;
}

body.mpms-body:not(.print-view-body) .notification-item {
  border-color: #e8eef4 !important;
  transition: background .15s ease, box-shadow .15s ease;
}

body.mpms-body:not(.print-view-body) .notification-item:hover {
  background: #f6f9fc !important;
}

body.mpms-body:not(.print-view-body) .notification-item.is-unread {
  background: #f1f7fb !important;
  box-shadow: inset 3px 0 #2b789b;
}

body.mpms-body:not(.print-view-body) .notification-filter-tabs {
  background: #f2f6f9 !important;
  border-color: #dce6ee !important;
}

body.mpms-body:not(.print-view-body) .notification-filter-tab.active {
  background: #1d5d80 !important;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(31, 102, 135, .15) !important;
}

/* ===== OFP workflow ===== */
body.mpms-body:not(.print-view-body) .ofp-create-intro,
body.mpms-body:not(.print-view-body) .ofp-create-head,
body.mpms-body:not(.print-view-body) .direct-ofp-header {
  background: linear-gradient(135deg, #fbfdff, #f3f7fb) !important;
  border-color: #e1e9f0 !important;
}

body.mpms-body:not(.print-view-body) .ofp-step-icon,
body.mpms-body:not(.print-view-body) .monitoring-empty-icon,
body.mpms-body:not(.print-view-body) .master-data-head-icon,
body.mpms-body:not(.print-view-body) .master-data-card-icon {
  background: #eaf3f8 !important;
  color: #236d92 !important;
  box-shadow: none !important;
}

body.mpms-body:not(.print-view-body) .ofp-number-preview,
body.mpms-body:not(.print-view-body) .direct-badge,
body.mpms-body:not(.print-view-body) .ofp-unsaved-chip {
  background: #edf5fa !important;
  color: #245f82 !important;
  border-color: #d8e6ef !important;
}

body.mpms-body:not(.print-view-body) .direct-ofp-fields,
body.mpms-body:not(.print-view-body) .direct-lines-heading,
body.mpms-body:not(.print-view-body) .direct-actions,
body.mpms-body:not(.print-view-body) .ofp-create-footer {
  border-color: #e5ecf2 !important;
}

body.mpms-body:not(.print-view-body) .direct-summary {
  border-color: #d9e3eb !important;
  box-shadow: 0 3px 10px rgba(25, 52, 77, .035);
}

body.mpms-body:not(.print-view-body) .direct-summary > div {
  background: #f7f9fb !important;
}

body.mpms-body:not(.print-view-body) .direct-summary .grand {
  background: linear-gradient(135deg, #173f68, #1f6687) !important;
}

/* ===== Master Data ===== */
body.mpms-body:not(.print-view-body) .master-data-head,
body.mpms-body:not(.print-view-body) .master-data-shared-head {
  background: #fff !important;
  border-color: var(--mpms-border) !important;
  border-radius: 18px !important;
  box-shadow: var(--mpms-shadow-sm);
}

body.mpms-body:not(.print-view-body) .master-data-editor,
body.mpms-body:not(.print-view-body) .master-data-list-card,
body.mpms-body:not(.print-view-body) .master-catalog-card {
  background: #fff !important;
}

body.mpms-body:not(.print-view-body) .master-catalog-header,
body.mpms-body:not(.print-view-body) .master-data-list-head {
  background: #fbfcfe;
  border-color: #e5ecf3 !important;
}

body.mpms-body:not(.print-view-body) .master-catalog-form {
  background: #f8fafc !important;
  border-color: #e4ebf2 !important;
}

body.mpms-body:not(.print-view-body) .master-data-row:hover {
  background: #f7fafc;
}

/* ===== Empty, status and feedback blocks ===== */
body.mpms-body:not(.print-view-body) .monitoring-empty,
body.mpms-body:not(.print-view-body) .accounting-empty,
body.mpms-body:not(.print-view-body) .notification-empty {
  padding: 34px 28px !important;
  text-align: center;
}

body.mpms-body:not(.print-view-body) .monitoring-warning,
body.mpms-body:not(.print-view-body) .monitoring-notice,
body.mpms-body:not(.print-view-body) .monitoring-success,
body.mpms-body:not(.print-view-body) .mpms-demo {
  border-radius: 12px !important;
  box-shadow: 0 3px 10px rgba(25, 52, 77, .03);
}

body.mpms-body:not(.print-view-body) .mpms-pagination {
  min-height: 44px;
  padding: 3px 1px;
}

body.mpms-body:not(.print-view-body) .mpms-footer {
  margin-top: 8px !important;
  padding: 14px 17px !important;
  border: 1px solid #dce5ed !important;
  border-radius: 13px !important;
  background: rgba(255, 255, 255, .72) !important;
  color: #73869a !important;
  box-shadow: none !important;
}

/* ===== Login: light-only, cleaner card ===== */
body.mpms-login {
  background: #f3f6fa !important;
}

body.mpms-login .login-card {
  border: 1px solid #dce6ef !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 22px 55px rgba(23, 54, 82, .13) !important;
}

body.mpms-login .v57-login-heading h2 {
  color: #17344d !important;
  letter-spacing: -.025em;
}

body.mpms-login .v57-login-fields input {
  border-color: #cfdbe7 !important;
  background: #fff !important;
}

body.mpms-login .v57-login-fields input:focus {
  border-color: #4383a5 !important;
  box-shadow: 0 0 0 3px var(--mpms-focus) !important;
}

/* ===== The ONLY sidebar visual change requested: Logout ===== */
html body.mpms-body:not(.print-view-body) #appSidebar.sidebar .sidebar-logout {
  background: #cf3038 !important;
  border-color: #cf3038 !important;
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(166, 35, 42, .22) !important;
}

html body.mpms-body:not(.print-view-body) #appSidebar.sidebar .sidebar-logout:hover {
  background: #b9272f !important;
  border-color: #b9272f !important;
  color: #fff !important;
}

html body.mpms-body:not(.print-view-body) #appSidebar.sidebar .sidebar-logout :is(span, svg, i),
html body.mpms-body:not(.print-view-body) #appSidebar.sidebar .sidebar-logout .side-icon {
  color: #fff !important;
  stroke: #fff !important;
}

/* ===== Responsive content ===== */
@media (max-width: 1180px) {
  body.mpms-body:not(.print-view-body) .page-content {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}

@media (max-width: 900px) {
  body.mpms-body:not(.print-view-body) .page-header {
    min-height: auto !important;
    padding: 17px 18px !important;
  }

  body.mpms-body:not(.print-view-body) .page-content {
    padding: 17px 16px 92px !important;
    gap: 14px;
  }

  body.mpms-body:not(.print-view-body) .dashboard-hero,
  body.mpms-body:not(.print-view-body) .accounting-hero,
  body.mpms-body:not(.print-view-body) .notification-hero,
  body.mpms-body:not(.print-view-body) .ofp-created-hero {
    border-radius: 17px !important;
  }
}

@media (max-width: 600px) {
  body.mpms-body:not(.print-view-body) .page-header h1 {
    font-size: 22px;
  }

  body.mpms-body:not(.print-view-body) .profile-pill {
    padding: 6px !important;
  }

  body.mpms-body:not(.print-view-body) .profile-pill > div {
    display: none;
  }

  body.mpms-body:not(.print-view-body) .dashboard-hero {
    padding: 21px !important;
  }

  body.mpms-body:not(.print-view-body) .content-card,
  body.mpms-body:not(.print-view-body) .mpms-panel,
  body.mpms-body:not(.print-view-body) .ofp-header-form-card,
  body.mpms-body:not(.print-view-body) .ofp-po-picker-card,
  body.mpms-body:not(.print-view-body) .direct-ofp-form {
    border-radius: 15px !important;
  }

  body.mpms-body:not(.print-view-body) .mpms-section-heading {
    align-items: flex-start;
  }
}

@media print {
  body.mpms-body .page-content {
    gap: 0;
  }
}

/* ===== Account settings + user management ===== */
body.mpms-body:not(.print-view-body) .account-settings-hero,
body.mpms-body:not(.print-view-body) .user-management-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 24px 26px;
  border: 1px solid rgba(31, 102, 135, .12);
  border-radius: 20px;
  background: linear-gradient(135deg, #173f68 0%, #1f6687 100%);
  color: #fff;
  box-shadow: 0 15px 34px rgba(21, 64, 96, .16);
}

body.mpms-body:not(.print-view-body) :is(.account-settings-hero,.user-management-hero) h2 {
  margin: 4px 0 6px;
  color: #fff;
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: -.02em;
}

body.mpms-body:not(.print-view-body) :is(.account-settings-hero,.user-management-hero) p {
  max-width: 680px;
  margin: 0;
  color: rgba(255,255,255,.82);
  line-height: 1.55;
}

body.mpms-body:not(.print-view-body) .account-settings-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 15px;
  background: rgba(255,255,255,.09);
  backdrop-filter: blur(6px);
}

body.mpms-body:not(.print-view-body) .account-settings-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 13px;
  background: #fff;
  color: #174f72;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 7px 18px rgba(0,0,0,.12);
}

body.mpms-body:not(.print-view-body) .account-settings-summary strong,
body.mpms-body:not(.print-view-body) .account-settings-summary span {
  display: block;
}

body.mpms-body:not(.print-view-body) .account-settings-summary strong { color: #fff; font-size: 13px; }
body.mpms-body:not(.print-view-body) .account-settings-summary div > span { margin-top: 3px; color: rgba(255,255,255,.72); font-size: 10px; }

body.mpms-body:not(.print-view-body) .account-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

body.mpms-body:not(.print-view-body) .account-settings-card,
body.mpms-body:not(.print-view-body) .user-create-card,
body.mpms-body:not(.print-view-body) .user-list-card {
  margin: 0;
  padding: 21px;
}

body.mpms-body:not(.print-view-body) .settings-card-heading,
body.mpms-body:not(.print-view-body) .user-list-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

body.mpms-body:not(.print-view-body) .settings-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eaf4fb, #dfeff9);
  color: #1f6687;
}

body.mpms-body:not(.print-view-body) .settings-card-icon svg { width: 19px; height: 19px; }
body.mpms-body:not(.print-view-body) :is(.settings-card-heading,.user-list-heading) h2 { margin: 2px 0 4px; font-size: 17px; color: #173b57; }
body.mpms-body:not(.print-view-body) :is(.settings-card-heading,.user-list-heading) p { margin: 0; color: #718397; font-size: 11px; line-height: 1.5; }

body.mpms-body:not(.print-view-body) .account-settings-form,
body.mpms-body:not(.print-view-body) .user-create-form {
  display: grid;
  gap: 13px;
}

body.mpms-body:not(.print-view-body) :is(.account-settings-form,.user-create-form) > label:not(.user-force-change) > span {
  display: block;
  margin-bottom: 6px;
  color: #5e7388;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}

body.mpms-body:not(.print-view-body) :is(.account-settings-form,.user-create-form) :is(input,select) {
  width: 100%;
  min-height: 43px;
  border: 1px solid #cfdae5;
  border-radius: 10px;
  background: #fff;
  color: #21364e;
  box-shadow: 0 1px 2px rgba(24,56,83,.025);
}

body.mpms-body:not(.print-view-body) :is(.account-settings-form,.user-create-form) :is(input,select):focus {
  border-color: #4a88a8;
  box-shadow: 0 0 0 3px rgba(48,123,164,.10);
  outline: none;
}

body.mpms-body:not(.print-view-body) .account-settings-form input:disabled {
  background: #f5f8fb;
  color: #6d8093;
}

body.mpms-body:not(.print-view-body) .account-settings-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 1px 0 0;
  padding: 10px 11px;
  border: 1px solid #e0eaf2;
  border-radius: 10px;
  background: #f7fafc;
}

body.mpms-body:not(.print-view-body) .account-settings-note svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 1px; color: #34779a; }
body.mpms-body:not(.print-view-body) .account-settings-actions { display: flex; justify-content: flex-end; padding-top: 2px; }

body.mpms-body:not(.print-view-body) .user-management-count {
  display: grid;
  justify-items: center;
  min-width: 120px;
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 15px;
  background: rgba(255,255,255,.09);
}
body.mpms-body:not(.print-view-body) .user-management-count span { color: rgba(255,255,255,.72); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
body.mpms-body:not(.print-view-body) .user-management-count strong { margin-top: 2px; color: #fff; font-size: 27px; }

body.mpms-body:not(.print-view-body) .user-management-layout {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(0, 1.45fr);
  gap: 18px;
  align-items: start;
}

body.mpms-body:not(.print-view-body) .user-force-change {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid #dbe6ef;
  border-radius: 11px;
  background: #f8fbfd;
  cursor: pointer;
}
body.mpms-body:not(.print-view-body) .user-force-change input { width: 16px !important; min-height: 16px !important; height: 16px; flex: 0 0 16px; margin: 2px 0 0; box-shadow: none; }
body.mpms-body:not(.print-view-body) .user-force-change span { display: block; }
body.mpms-body:not(.print-view-body) .user-force-change strong { display: block; color: #29465e; font-size: 11px; }
body.mpms-body:not(.print-view-body) .user-force-change small { display: block; margin-top: 3px; color: #7b8da0; font-size: 9px; line-height: 1.4; }
body.mpms-body:not(.print-view-body) .user-create-submit { width: 100%; justify-content: center; min-height: 43px; }

body.mpms-body:not(.print-view-body) .user-list-heading { justify-content: space-between; gap: 16px; }
body.mpms-body:not(.print-view-body) .user-list-total { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: #eaf3f8; color: #336b88; font-size: 9px; font-weight: 900; }
body.mpms-body:not(.print-view-body) .user-account-table { min-width: 720px; }
body.mpms-body:not(.print-view-body) .user-account-table td { vertical-align: middle; }

body.mpms-body:not(.print-view-body) .user-table-person { display: flex; align-items: center; gap: 9px; min-width: 180px; }
body.mpms-body:not(.print-view-body) .user-table-person > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: #e9f2f8;
  color: #2b6787;
  font-size: 11px;
  font-weight: 900;
}
body.mpms-body:not(.print-view-body) .user-table-person strong { display: block; color: #233c53; font-size: 11px; }
body.mpms-body:not(.print-view-body) .user-table-person small { display: block; margin-top: 2px; color: #8897a5; font-size: 8px; }
body.mpms-body:not(.print-view-body) .user-table-username { color: #5b7186; font-weight: 700; font-size: 10px; }

body.mpms-body:not(.print-view-body) .user-role-badge,
body.mpms-body:not(.print-view-body) .user-status-badge,
body.mpms-body:not(.print-view-body) .user-password-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}
body.mpms-body:not(.print-view-body) .user-role-badge { background: #edf3f8; color: #4f687e; }
body.mpms-body:not(.print-view-body) .user-role-badge.role-admin { background: #f7eaf0; color: #9b3e62; }
body.mpms-body:not(.print-view-body) .user-role-badge.role-it { background: #e5f1fb; color: #276b9a; }
body.mpms-body:not(.print-view-body) .user-role-badge.role-accountant { background: #e7f6ef; color: #287457; }
body.mpms-body:not(.print-view-body) .user-role-badge.role-viewer { background: #f2f4f7; color: #657587; }
body.mpms-body:not(.print-view-body) .user-status-badge { background: #edf8f2; color: #287455; }
body.mpms-body:not(.print-view-body) .user-status-badge.inactive { background: #f5f5f6; color: #7d8790; }
body.mpms-body:not(.print-view-body) .user-status-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
body.mpms-body:not(.print-view-body) .user-password-state { background: #edf3f8; color: #62778a; }
body.mpms-body:not(.print-view-body) .user-password-state.pending { background: #fff4df; color: #9a6a1d; }

@media (max-width: 1050px) {
  body.mpms-body:not(.print-view-body) .user-management-layout { grid-template-columns: 1fr; }
  body.mpms-body:not(.print-view-body) .user-create-form { grid-template-columns: repeat(2, minmax(0,1fr)); }
  body.mpms-body:not(.print-view-body) .user-create-form .user-force-change,
  body.mpms-body:not(.print-view-body) .user-create-form .account-settings-note,
  body.mpms-body:not(.print-view-body) .user-create-form .user-create-submit { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body.mpms-body:not(.print-view-body) .account-settings-grid { grid-template-columns: 1fr; }
  body.mpms-body:not(.print-view-body) :is(.account-settings-hero,.user-management-hero) { align-items: flex-start; flex-direction: column; padding: 20px; }
  body.mpms-body:not(.print-view-body) .account-settings-summary { width: 100%; min-width: 0; }
  body.mpms-body:not(.print-view-body) .user-management-count { width: 100%; min-width: 0; grid-template-columns: auto auto; justify-content: space-between; justify-items: initial; align-items: center; }
}

@media (max-width: 580px) {
  body.mpms-body:not(.print-view-body) .user-create-form { grid-template-columns: 1fr; }
  body.mpms-body:not(.print-view-body) .user-create-form > * { grid-column: 1 !important; }
  body.mpms-body:not(.print-view-body) .account-settings-card,
  body.mpms-body:not(.print-view-body) .user-create-card,
  body.mpms-body:not(.print-view-body) .user-list-card { padding: 16px; }
}

/* ===== Create OFP layout refresh ===== */
body.mpms-body:not(.print-view-body) .ofp-create-form {
  display: grid;
  gap: 18px;
}

body.mpms-body:not(.print-view-body) .ofp-picker-search-card,
body.mpms-body:not(.print-view-body) .ofp-header-form-card,
body.mpms-body:not(.print-view-body) .ofp-po-picker-card,
body.mpms-body:not(.print-view-body) .ofp-draft-toolbar,
body.mpms-body:not(.print-view-body) .ofp-final-actions,
body.mpms-body:not(.print-view-body) .ofp-draft-document {
  border-radius: 18px !important;
}

body.mpms-body:not(.print-view-body) .ofp-picker-search-card,
body.mpms-body:not(.print-view-body) .ofp-header-form-card {
  border: 1px solid #e1eaf1 !important;
  box-shadow: 0 10px 30px rgba(17, 46, 70, .055) !important;
}

body.mpms-body:not(.print-view-body) .ofp-picker-search-card {
  grid-template-columns: minmax(260px, .95fr) minmax(420px, 1.2fr) !important;
  gap: 22px !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
}

body.mpms-body:not(.print-view-body) .ofp-picker-search {
  align-items: stretch !important;
}

body.mpms-body:not(.print-view-body) .ofp-picker-search label {
  min-height: 48px;
  border-radius: 12px !important;
}

body.mpms-body:not(.print-view-body) .ofp-picker-search .btn {
  min-height: 48px;
}

body.mpms-body:not(.print-view-body) .ofp-po-picker-card > header {
  padding: 18px 20px !important;
  background: linear-gradient(180deg, #fcfdff 0%, #f6f9fc 100%) !important;
}

body.mpms-body:not(.print-view-body) .ofp-po-selection-hint {
  padding: 11px 18px !important;
}

body.mpms-body:not(.print-view-body) .ofp-picker-table tbody tr.is-selected {
  box-shadow: inset 3px 0 0 #2d7598;
}

body.mpms-body:not(.print-view-body) .ofp-header-form-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
}

body.mpms-body:not(.print-view-body) .ofp-form-grid {
  grid-template-columns: minmax(280px, 1.65fr) minmax(190px, .8fr) minmax(190px, .8fr) !important;
  gap: 16px !important;
}

body.mpms-body:not(.print-view-body) .ofp-form-field :is(input, select) {
  min-height: 48px;
  border-radius: 12px !important;
}

body.mpms-body:not(.print-view-body) .ofp-field-help {
  margin-top: 7px;
  color: #6f8498;
  font-size: 11px;
}

body.mpms-body:not(.print-view-body) .ofp-draft-stage {
  display: grid;
  gap: 14px;
}

body.mpms-body:not(.print-view-body) .ofp-draft-toolbar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px !important;
  padding: 14px 16px !important;
  border: 1px solid #dfe8ef !important;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%) !important;
  box-shadow: 0 10px 26px rgba(18, 49, 75, .06) !important;
}

body.mpms-body:not(.print-view-body) .ofp-draft-toolbar > div > strong {
  color: #173b59 !important;
  font-size: 13px !important;
}

body.mpms-body:not(.print-view-body) .ofp-unsaved-chip {
  justify-self: end;
  padding: 9px 12px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.mpms-body:not(.print-view-body) .ofp-draft-document {
  border: 1px solid #d6e1ea !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%) !important;
  box-shadow: 0 22px 54px rgba(17, 46, 70, .09) !important;
}

body.mpms-body:not(.print-view-body) .ofp-draft-letterhead {
  grid-template-columns: minmax(280px, 1.1fr) minmax(280px, .95fr) minmax(220px, .75fr) !important;
  gap: 18px !important;
  padding: 26px 28px 22px !important;
}

body.mpms-body:not(.print-view-body) .ofp-draft-company img {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
}

body.mpms-body:not(.print-view-body) .ofp-draft-title span {
  min-width: 290px !important;
  padding: 14px 26px !important;
  border-color: #9fb7cb !important;
  box-shadow: inset 0 0 0 3px #f4f8fb, 0 6px 16px rgba(20, 50, 75, .06) !important;
}

body.mpms-body:not(.print-view-body) .ofp-draft-number strong {
  font-size: 18px !important;
}

body.mpms-body:not(.print-view-body) .ofp-draft-meta {
  grid-template-columns: minmax(0, 1.6fr) minmax(185px, .72fr) minmax(185px, .72fr) !important;
  background: #fcfdff;
}

body.mpms-body:not(.print-view-body) .ofp-draft-meta > label {
  min-height: 74px !important;
  padding: 12px 16px !important;
}

body.mpms-body:not(.print-view-body) .ofp-draft-meta > label > span {
  color: #47657d !important;
  font-size: 11px !important;
}

body.mpms-body:not(.print-view-body) .ofp-draft-meta > label > div {
  display: flex;
  align-items: center;
  min-height: 42px;
}

body.mpms-body:not(.print-view-body) .ofp-draft-header-input,
body.mpms-body:not(.print-view-body) .ofp-draft-meta > label > div .ofp-draft-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d6e1ea !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}

body.mpms-body:not(.print-view-body) .ofp-draft-table th {
  padding: 12px 16px !important;
}

body.mpms-body:not(.print-view-body) .ofp-draft-table td {
  padding: 16px 16px !important;
}

body.mpms-body:not(.print-view-body) .ofp-draft-particulars-cell {
  min-width: 0 !important;
}

body.mpms-body:not(.print-view-body) .ofp-draft-footer {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px) !important;
  gap: 24px !important;
  align-items: end !important;
  padding: 22px 24px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%) !important;
}

body.mpms-body:not(.print-view-body) .ofp-prepared-by {
  align-self: end;
  min-height: 100px;
  padding: 0 0 12px !important;
  border-bottom: 2px solid #dce6ee;
}

body.mpms-body:not(.print-view-body) .ofp-prepared-by span {
  font-size: 10px !important;
}

body.mpms-body:not(.print-view-body) .ofp-prepared-by strong {
  font-size: 20px !important;
}

body.mpms-body:not(.print-view-body) .ofp-draft-summary {
  display: grid !important;
  gap: 14px !important;
  align-self: stretch;
  padding: 18px 18px 16px !important;
  border: 1px solid #d9e4ed !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fb 100%) !important;
  box-shadow: 0 10px 26px rgba(20, 50, 75, .06) !important;
}

body.mpms-body:not(.print-view-body) .ofp-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

body.mpms-body:not(.print-view-body) .ofp-total-row span,
body.mpms-body:not(.print-view-body) .ofp-total-row label {
  color: #47657d !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .04em;
  text-transform: uppercase;
}

body.mpms-body:not(.print-view-body) .ofp-total-row strong {
  color: #173851 !important;
  font-size: 18px !important;
  white-space: nowrap;
}

body.mpms-body:not(.print-view-body) .ofp-ewt-row {
  display: grid !important;
  grid-template-columns: auto 112px auto;
  align-items: center;
}

body.mpms-body:not(.print-view-body) .ofp-ewt-row select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #cedbe6;
  border-radius: 12px;
  background: #ffffff;
  color: #213f5b;
}

body.mpms-body:not(.print-view-body) .ofp-grand-total-row {
  align-items: stretch !important;
  padding-top: 14px;
  border-top: 1px solid #d8e3eb;
}

body.mpms-body:not(.print-view-body) .ofp-grand-total-row > div:first-child {
  display: grid;
  gap: 5px;
}

body.mpms-body:not(.print-view-body) .ofp-grand-total-row > div:first-child small {
  color: #7b8ea0;
  font-size: 10px;
}

body.mpms-body:not(.print-view-body) .ofp-editable-total {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 8px;
  padding: 6px;
  border: 1px solid #cbd8e3;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

body.mpms-body:not(.print-view-body) .ofp-editable-total > span {
  padding-left: 6px;
  color: #5b7488 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}

body.mpms-body:not(.print-view-body) .ofp-editable-total input {
  min-width: 0;
  min-height: 42px;
  padding: 0 4px;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #173851 !important;
  font-size: 28px !important;
  font-weight: 900 !important;
  text-align: right;
  box-shadow: none !important;
}

body.mpms-body:not(.print-view-body) .ofp-editable-total button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #b7c7d4;
  border-radius: 10px;
  background: #f6f9fc;
  color: #214763;
  font-weight: 700;
  cursor: pointer;
}

body.mpms-body:not(.print-view-body) .ofp-final-actions {
  padding: 16px 18px !important;
  border: 1px solid #dce6ee !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
}

@media (max-width: 1100px) {
  body.mpms-body:not(.print-view-body) .ofp-picker-search-card {
    grid-template-columns: 1fr !important;
  }

  body.mpms-body:not(.print-view-body) .ofp-form-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  body.mpms-body:not(.print-view-body) .ofp-form-grid .ofp-paid-to {
    grid-column: 1 / -1;
  }

  body.mpms-body:not(.print-view-body) .ofp-draft-footer {
    grid-template-columns: 1fr !important;
  }

  body.mpms-body:not(.print-view-body) .ofp-prepared-by {
    min-height: 0;
    padding-bottom: 16px !important;
  }
}

@media (max-width: 760px) {
  body.mpms-body:not(.print-view-body) .ofp-draft-toolbar {
    grid-template-columns: 1fr !important;
  }

  body.mpms-body:not(.print-view-body) .ofp-unsaved-chip {
    justify-self: start;
  }

  body.mpms-body:not(.print-view-body) .ofp-form-grid {
    grid-template-columns: 1fr !important;
  }

  body.mpms-body:not(.print-view-body) .ofp-draft-letterhead {
    display: grid !important;
    grid-template-columns: 1fr !important;
    padding: 18px !important;
  }

  body.mpms-body:not(.print-view-body) .ofp-draft-title {
    justify-content: flex-start !important;
  }

  body.mpms-body:not(.print-view-body) .ofp-draft-title span {
    width: 100%;
    min-width: 0 !important;
  }

  body.mpms-body:not(.print-view-body) .ofp-draft-number {
    text-align: left !important;
  }

  body.mpms-body:not(.print-view-body) .ofp-draft-summary {
    gap: 12px !important;
  }

  body.mpms-body:not(.print-view-body) .ofp-ewt-row {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  body.mpms-body:not(.print-view-body) .ofp-grand-total-row {
    gap: 12px;
    flex-direction: column;
    align-items: stretch !important;
  }

  body.mpms-body:not(.print-view-body) .ofp-editable-total input {
    font-size: 22px !important;
  }
}
