:root {
  --maroon: #c8102e;
  --maroon-dark: #c8102e;
  --orange: #EF7F1A;
  --bg: #f3f3f9;
  --card-bg: #FFFFFF;
  --card-border: #EDE5DE;
  --border-light: #F0EAE4;
  --border-lighter: #F6F1EC;
  --text-dark: #241F1C;
  --text-body: #3A332E;
  --text-muted: #040404;
  --text-muted2: #6e6e6e;
  --text-muted3: #525252;
  --text-muted4: #6e6e6e;
  --text-faint: #c8102e;
  --sidebar-active-bg: #FBEDE8;
  --field-bg: #FAF7F4;
  --field-border: #EAE1D9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
}

.mono {
  font-family: 'Poppins', sans-serif;
}

.serif,
.page-title,
.page-greeting,
.panel-title,
.crumb-title,
.section-card-title,
.form-title,
.detail-name {
  font-family: 'Poppins', sans-serif;
}

a {
  color: var(--text-muted);
  text-decoration: none;
}

a:hover {
  color: var(--text-dark);
}

/* ===== layout shell ===== */
.app-shell {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.app-sidebar {
  width: 300px;
  flex: 0 0 300px;
  background: var(--card-bg);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.sidebar-brand {
  padding: 19px 30px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  height: 81px;
  width: auto;
  display: block;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  scrollbar-width: thin;
  scrollbar-color: #D9D3CC transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: #D9D3CC;
  border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: #C4BCB2;
}

.nav-section-label {
  padding: 6px 12px;
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  margin-top: 8px;
}

.nav-section-label:first-child {
  margin-top: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin: 2px 0;
  border: none;
  border-radius: 0.35rem;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  background: transparent;
  color: var(--text-muted);
  transition: .12s;
  position: relative;
}

.nav-item:hover {
  background: #FAF5F1;
}

.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--text-dark);
  font-weight: 600;
}

.nav-badge {
  margin-left: auto;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 0.35rem;
  background: #FBE3E5;
  color: #B0263A;
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 11px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 0.35rem;
  background: linear-gradient(135deg, var(--maroon), var(--orange));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex: 0 0 auto;
}

.user-meta {
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11.5px;
  color: var(--text-muted3);
  white-space: nowrap;
}

/* ===== main / topbar ===== */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
}

.app-topbar {
  flex: 0 0 auto;
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  padding: 0 26px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--field-border);
  background: #fff;
  border-radius: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  flex: 0 0 auto;
}

.menu-toggle-btn:hover {
  background: var(--field-bg);
}

.sidebar-collapsed .app-sidebar {
  width: 0;
  flex: 0 0 0;
  border-right: none;
  overflow: hidden;
}

/* page header bar: uppercase title + right-aligned breadcrumb */
.page-header-bar {
  flex: 0 0 auto;
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-dark);
}

.page-header-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted3);
  flex: 0 0 auto;
}

.page-header-crumb .crumb-current {
  color: var(--text-dark);
  font-weight: 600;
}

.topbar-search {
  flex: 1;
  display: flex;
  justify-content: center;
  max-width: 420px;
  margin: 0 auto;
}

.search-box {
  width: 100%;
  position: relative;
}

.search-box .search-box-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #B0A69D;
  font-size: 15px;
}

.search-box input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--field-border);
  border-radius: 0.35rem;
  background: var(--field-bg);
  padding: 0 12px 0 36px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-dark);
  outline: none;
}

.currency-toggle {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.cur-btn {
  padding: 8px 16px;
  border: 1px solid var(--field-border);
  border-radius: 0.35rem;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  background: #fff;
  color: var(--text-muted2);
  white-space: nowrap;
}

.cur-btn:hover {
  border-color: #E4B79A;
}

.cur-btn.active {
  background: var(--maroon);
  color: #fff;
  border-color: var(--maroon);
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--field-border);
  background: #fff;
  border-radius: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  flex: 0 0 auto;
}

.icon-btn:hover {
  background: var(--field-bg);
}

.icon-btn-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 0.35rem;
  background: var(--maroon);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.role-switcher {
  position: relative;
  flex: 0 0 auto;
}

.role-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 4px 14px 4px 4px;
  border: 1px solid var(--field-border);
  background: #fff;
  border-radius: 0.35rem;
  cursor: pointer;
}

.role-btn:hover {
  background: var(--field-bg);
}

.role-btn-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--maroon), var(--orange));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

#roleBtnLabel {
  font-size: 13px;
  font-weight: 600;
  color: #3A332E;
  white-space: nowrap;
}

.role-menu {
  position: absolute;
  right: 0;
  top: 48px;
  width: 250px;
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: 0.35rem;
  box-shadow: 0 18px 40px -12px rgba(60, 40, 20, .28);
  padding: 7px;
  z-index: 40;
}

.role-menu-label {
  padding: 7px 11px 5px;
  font-size: 10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
}

.role-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  border: none;
  border-radius: 0.35rem;
  cursor: pointer;
  background: transparent;
  font-family: inherit;
}

.role-menu-item.active {
  background: var(--sidebar-active-bg);
}

.role-menu-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #3A332E;
}

.role-menu-item-sub {
  font-size: 11px;
  color: var(--text-muted3);
}

/* ===== content ===== */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

.view-wrap,
.view-wrap-narrow,
.view-wrap-notif,
.view-wrap-audit {
  width: 100%;
}

.page-greeting {
  font-size: 25px;
  font-weight: 600;
}

.page-greeting-sub {
  color: var(--text-muted2);
  font-size: 14px;
  margin-top: 3px;
}

.page-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.page-head-row > .page-sub {
  flex: 1 1 320px;
  min-width: 0;
}

.page-head-row > .btn-brand {
  flex: 0 0 auto;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
}

.page-sub {
  color: var(--text-muted2);
  font-size: 13.5px;
  margin-top: 3px;
}

.card-panel {
  background: #fff;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 0.35rem;
  padding: 20px 22px;
}

.panel-title {
  font-size: 16px;
  font-weight: 600;
}

.panel-sub {
  font-size: 12px;
  color: var(--text-muted3);
  margin-top: 2px;
}

.panel-total {
  font-size: 12px;
  color: var(--text-muted2);
}

.panel-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.text-maroon {
  color: var(--text-dark);
}

.btn-brand {
  height: 40px;
  padding: 0 16px;
  background: var(--maroon);
  color: #fff;
  border: none;
  border-radius: 0.35rem;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-brand:hover {
  background: var(--maroon-dark);
}

.btn-outline-brand {
  height: 44px;
  padding: 0 20px;
  background: #fff;
  color: var(--text-muted);
  border: 1px solid var(--field-border);
  border-radius: 0.35rem;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-outline-brand:hover {
  background: var(--field-bg);
}

.btn-green {
  height: 44px;
  padding: 0 22px;
  background: #2E7D4F;
  color: #fff;
  border: none;
  border-radius: 0.35rem;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-green:hover {
  background: #276A43;
}

/* ===== dashboard: KPI + charts ===== */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.kpi-card {
  background: #fff;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 0.5rem;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.kpi-body {
  min-width: 0;
}

.kpi-label {
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted3);
  font-weight: 600;
  white-space: nowrap;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: -.01em;
  color: var(--text-dark);
  white-space: nowrap;
}

.kpi-delta-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-size: 11.5px;
  white-space: nowrap;
}

.kpi-delta {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 0.35rem;
}

.kpi-delta-sub {
  color: var(--text-muted3);
}

.kpi-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 19px;
  font-family: 'Poppins', sans-serif;
  flex: 0 0 auto;
}

.dash-charts-row {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 210px;
  margin-top: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-light);
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.bar-amount {
  font-size: 10px;
  color: var(--text-muted2);
  font-family: 'Poppins', sans-serif;
  margin-bottom: 6px;
  opacity: .9;
}

.bar-fill {
  width: 100%;
  max-width: 26px;
  background: linear-gradient(180deg, var(--orange), var(--maroon));
  border-radius: 0.35rem;
}

.bar-labels {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.bar-label {
  flex: 1;
  text-align: center;
  font-size: 10.5px;
  color: var(--text-muted3);
  font-weight: 500;
}

.donut-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0 6px;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 6px;
}

.donut-legend-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.donut-swatch {
  width: 10px;
  height: 10px;
  border-radius: 0.35rem;
}

.donut-legend-label {
  font-size: 12.5px;
  color: #4A423C;
  flex: 1;
}

.donut-legend-count {
  font-size: 12.5px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
}

.donut-legend-pct {
  font-size: 11.5px;
  color: var(--text-muted3);
  width: 38px;
  text-align: right;
}

.module-card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.travel-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.module-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  padding: 18px;
  cursor: pointer;
  transition: box-shadow .15s, transform .15s;
  font-family: inherit;
  text-decoration: none;
}

.module-tile:hover {
  box-shadow: 0 10px 24px -14px rgba(90, 20, 30, .35);
  transform: translateY(-2px);
}

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

.module-tile-icon {
  width: 42px;
  height: 42px;
  border-radius: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.module-tile-arrow {
  color: var(--text-faint);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .15s, transform .15s, color .15s;
}

.module-tile:hover .module-tile-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--maroon);
}

.module-tile-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
}

.module-tile-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
}

.module-tile-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-lighter);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 5px;
  flex: 0 0 auto;
}

.activity-text {
  font-size: 12.5px;
  color: #3A332E;
  line-height: 1.4;
}

.activity-meta {
  font-size: 11px;
  color: var(--text-muted4);
  margin-top: 2px;
  font-family: 'Poppins', sans-serif;
}

.workflow-hint {
  font-size: 11.5px;
  color: var(--text-muted3);
  font-family: 'Poppins', sans-serif;
}

.small-link {
  font-size: 12px;
}

/* ===== stat strip (empanelment / module) ===== */
.stat-strip {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 160px;
  background: #fff;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 0.5rem;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-body {
  min-width: 0;
}

.stat-label {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted3);
  font-weight: 700;
  white-space: nowrap;
}

.stat-count {
  font-size: 26px;
  font-weight: 700;
  margin-top: 10px;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.stat-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
}

.table-toolbar-title {
  font-size: 13px;
  font-weight: 600;
}

.filter-chip {
  font-size: 11.5px;
  color: var(--text-muted3);
  padding: 5px 11px;
  border: 1px solid var(--field-border);
  border-radius: 0.35rem;
}

/* ===== vendor table (classic bordered enterprise style) ===== */
.vendor-table-head,
.vendor-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1.3fr 1.5fr 1.2fr 1.3fr 120px;
  gap: 14px;
  align-items: center;
}

.vendor-table-head {
  padding: 12px 18px;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--text-muted2);
  font-weight: 700;
  text-transform: uppercase;
  background: #FAF8F6;
  border-bottom: 1px solid var(--card-border);
  border-top: 1px solid var(--card-border);
}

.vendor-row {
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  border: none;
  border-bottom: 1px solid var(--border-lighter);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}

.vendor-row:hover {
  background: #FBF8F5;
}

.vendor-name-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.vendor-code {
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

.vendor-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dot-inline {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.pan-gst-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.pan-gst-cell .check-ok {
  color: #2E7D4F;
  font-weight: 600;
}

.pan-gst-cell .check-bad {
  color: #C77A00;
  font-weight: 600;
}

.btn-view-drawer {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--maroon);
  border-radius: 0.35rem;
  background: #fff;
  color: var(--text-dark);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.btn-view-drawer:hover {
  background: var(--maroon);
  color: #fff;
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 0.35rem;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ===== generic module table (classic bordered enterprise style) ===== */
.module-table-head,
.module-row {
  display: grid;
  grid-template-columns: 0.8fr 1.8fr 1.3fr 1.1fr 1.2fr;
  gap: 14px;
  align-items: center;
}

.module-table-head {
  padding: 12px 18px;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--text-muted2);
  font-weight: 700;
  text-transform: uppercase;
  background: #FAF8F6;
  border-bottom: 1px solid var(--card-border);
  border-top: 1px solid var(--card-border);
}

.module-row {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-lighter);
}

.module-row-id {
  font-family: 'Poppins', sans-serif;
  font-size: 11.5px;
  color: var(--text-dark);
  font-weight: 600;
}

.module-row-c1 {
  font-size: 12.5px;
  color: #3A332E;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.module-row-c2 {
  font-size: 12.5px;
  color: var(--text-muted);
}

.module-row-c3 {
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: 'Poppins', sans-serif;
}

.note-bar {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 16px;
  padding: 14px 18px;
  background: #FBF3EC;
  border: 1px solid #F3E1D0;
  border-radius: 0.35rem;
}

.note-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  flex: 0 0 auto;
}

.note-text {
  font-size: 12.5px;
  color: #8A5A12;
}

/* ===== vendor detail ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: 0.35rem;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 14px;
  margin-bottom: 14px;
  font-family: inherit;
}

.back-link:hover {
  background: var(--field-bg);
  border-color: var(--maroon);
  color: var(--text-dark);
}

.detail-header-card {
  background: #fff;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 0.35rem;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.detail-avatar {
  width: 58px;
  height: 58px;
  border-radius: 0.35rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  flex: 0 0 auto;
}

.detail-name {
  font-size: 21px;
  font-weight: 600;
}

.detail-meta {
  font-size: 12.5px;
  color: var(--text-muted3);
  margin-top: 3px;
  font-family: 'Poppins', sans-serif;
}

.btn-danger-outline {
  height: 40px;
  padding: 0 15px;
  background: #fff;
  color: #B0263A;
  border: 1px solid #E7C3C9;
  border-radius: 0.35rem;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.btn-danger-outline:hover {
  background: #FCF3F4;
}

.btn-approve {
  height: 40px;
  padding: 0 16px;
  background: #2E7D4F;
  color: #fff;
  border: none;
  border-radius: 0.35rem;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
}

.btn-approve:hover {
  background: #276A43;
}

.detail-tabs {
  display: inline-flex;
  gap: 6px;
  margin-top: 18px;
}

.detail-tab-btn {
  padding: 9px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 0.35rem;
  background: transparent;
  color: #8A8079;
  transition: .14s;
}

.detail-tab-btn.active {
  border-color: #EFE1DC;
  background: #fff;
  color: var(--text-dark);
  box-shadow: 0 2px 10px rgba(90, 20, 30, .10);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  margin-top: 18px;
  align-items: start;
}

.detail-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 22px;
}

.field-label {
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted4);
  font-weight: 600;
}

.field-value-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.field-value {
  font-size: 13.5px;
  color: #3A332E;
  font-weight: 500;
}

.badge-soft {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 0.35rem;
  font-size: 10.5px;
  font-weight: 700;
}

.declaration-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.declaration-check {
  width: 20px;
  height: 20px;
  border-radius: 0.35rem;
  background: #E6F3EC;
  color: #2E7D4F;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: 1px;
}

.declaration-text {
  font-size: 12.5px;
  color: #4A423C;
  line-height: 1.5;
}

.signed-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  font-size: 12.5px;
  color: #3A332E;
}

.callout {
  background: #FFF8EE;
  border: 1px solid #F3E1C0;
  border-radius: 0.35rem;
  padding: 16px 20px;
  display: flex;
  gap: 13px;
  align-items: flex-start;
}

.callout-icon {
  width: 32px;
  height: 32px;
  border-radius: 0.35rem;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.callout-title {
  font-size: 13px;
  font-weight: 600;
  color: #8A5A12;
}

.callout-text {
  font-size: 12.5px;
  color: #9A7434;
  margin-top: 3px;
  line-height: 1.5;
}

.doc-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  border: 1px solid #EEE7E0;
  border-radius: 0.35rem;
  background: #FBF8F5;
}

.doc-ext {
  width: 38px;
  height: 38px;
  border-radius: 0.35rem;
  background: #fff;
  border: 1px solid var(--field-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  flex: 0 0 auto;
}

.doc-name {
  font-size: 13px;
  font-weight: 600;
}

.doc-meta {
  font-size: 11px;
  color: var(--text-muted4);
  font-family: 'Poppins', sans-serif;
}

.timeline-row {
  display: flex;
  gap: 14px;
}

.timeline-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
}

.timeline-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-top: 4px;
}

.timeline-line {
  width: 2px;
  flex: 1;
  background: #EEE7E0;
  margin: 4px 0;
}

.timeline-body {
  padding-bottom: 16px;
}

.timeline-text {
  font-size: 13px;
  color: #3A332E;
  line-height: 1.45;
}

.timeline-meta {
  font-size: 11px;
  color: var(--text-muted4);
  margin-top: 3px;
  font-family: 'Poppins', sans-serif;
}

.stage-row {
  display: flex;
  gap: 13px;
}

.stage-node {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.stage-connector {
  width: 2px;
  flex: 1;
  min-height: 20px;
  margin: 3px 0;
}

.stage-level {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 700;
}

.stage-title {
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 2px;
}

.stage-role {
  font-size: 11.5px;
  color: var(--text-muted3);
  margin-top: 1px;
}

.stage-meta {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 0.35rem;
  font-size: 11px;
  font-weight: 600;
}

.comment-row {
  display: flex;
  gap: 11px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 0.35rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  flex: 0 0 auto;
}

.comment-name {
  font-weight: 600;
}

.comment-time {
  color: var(--text-muted4);
  font-size: 11px;
}

.comment-text {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.5;
}

.comment-input-row {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}

.comment-input-row input {
  flex: 1;
  height: 38px;
  border: 1px solid var(--field-border);
  border-radius: 0.35rem;
  background: var(--field-bg);
  padding: 0 12px;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
}

.comment-send {
  width: 38px;
  height: 38px;
  background: var(--maroon);
  border: none;
  border-radius: 0.35rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-send:hover {
  background: var(--maroon-dark);
}

/* ===== forms (new vendor / module create) ===== */
.form-title {
  font-size: 22px;
  font-weight: 600;
}

.form-subhead {
  color: var(--text-muted2);
  font-size: 13.5px;
  margin-top: 3px;
}

.section-card {
  background: #fff;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 0.35rem;
  padding: 22px 24px;
  margin-top: 16px;
}

.section-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}

.field-label-input {
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #A79E95;
  font-weight: 600;
  margin-bottom: 6px;
}

.field-input,
.field-textarea {
  width: 100%;
  border: 1px solid var(--field-border);
  border-radius: 0.35rem;
  background: #ffffff;
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-dark);
  outline: none;
}

.field-input {
  height: 40px;
}

.field-textarea {
  min-height: 84px;
  padding-top: 10px;
  resize: vertical;
}

.field-col-full {
  grid-column: 1 / -1;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.upload-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid #f3f6f9;
  border-radius: 0.35rem;
  background: #f3f6f9;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  width: 100%;
}

.upload-btn:hover {
  background: #FCEFE1;
}

.upload-icon {
  width: 34px;
  height: 34px;
  border-radius: 0.35rem;
  background: #fff;
  border: 1px solid var(--field-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--maroon);
  flex: 0 0 auto;
}

.upload-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #3A332E;
}

.upload-sub {
  font-size: 11px;
  color: var(--text-muted4);
}

.declare-box {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 16px;
  padding: 16px 20px;
  background: #FFF8EE;
  border: 1px solid #F3E1C0;
  border-radius: 0.35rem;
}

.declare-box input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--maroon);
  flex: 0 0 auto;
}

.declare-text {
  font-size: 12.5px;
  color: #8A5A12;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.excel-banner {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 18px;
  padding: 16px 20px;
  background: #FBF7ED;
  border: 1px solid #F0E2BE;
  border-radius: 0.35rem;
  flex-wrap: wrap;
}

.excel-icon {
  width: 34px;
  height: 34px;
  border-radius: 0.35rem;
  background: #2E7D4F;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.excel-title {
  font-size: 13px;
  font-weight: 600;
  color: #3A332E;
}

.excel-sub {
  font-size: 12px;
  color: #8A5A12;
}

.btn-white-green {
  height: 38px;
  padding: 0 15px;
  background: #fff;
  color: #2E7D4F;
  border: 1px solid #BFE0CC;
  border-radius: 0.35rem;
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
}

/* ===== CCS ===== */
.ccs-stat-strip {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.ccs-stat-card {
  flex: 1;
  min-width: 150px;
  background: #fff;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 0.35rem;
  padding: 14px 16px;
}

.ccs-stat-label {
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted3);
  font-weight: 600;
}

.ccs-stat-value {
  font-size: 16px;
  font-weight: 700;
  margin-top: 6px;
}

.ccs-table-head,
.ccs-row {
  display: grid;
  grid-template-columns: 2fr 1.1fr 1fr 1.2fr 0.8fr 2fr;
  gap: 12px;
  align-items: center;
}

.ccs-table-head {
  padding: 12px 18px;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--text-muted2);
  font-weight: 700;
  text-transform: uppercase;
  background: #FAF8F6;
  border-bottom: 1px solid var(--card-border);
  border-top: 1px solid var(--card-border);
}

.ccs-row {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border-lighter);
}

.ccs-row.is-l1 {
  background: #FBF7ED;
}

.ccs-vendor-avatar {
  width: 34px;
  height: 34px;
  border-radius: 0.35rem;
  background: #7A6F66;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex: 0 0 auto;
}

.l1-badge {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 8px;
  border-radius: 0.35rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  background: #F4A81D;
  color: #5E3A02;
}

.ccs-amount {
  font-size: 14px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
}

.ccs-remarks {
  font-size: 12px;
  color: #6B625B;
  line-height: 1.4;
}

/* ===== notifications / audit ===== */
.notif-row {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-lighter);
  align-items: flex-start;
}

.notif-row:last-child {
  border-bottom: none;
}

.notif-icon {
  width: 38px;
  height: 38px;
  border-radius: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
}

.notif-text {
  font-size: 13.5px;
  color: #3A332E;
  line-height: 1.45;
}

.notif-time {
  font-size: 11px;
  color: var(--text-muted4);
  margin-top: 3px;
  font-family: 'Poppins', sans-serif;
}

.notif-unread-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--maroon);
  margin-top: 6px;
  flex: 0 0 auto;
}

.audit-row {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr 2.4fr 1fr;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border-lighter);
  align-items: center;
}

.audit-head {
  padding: 12px 18px;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--text-muted2);
  font-weight: 700;
  text-transform: uppercase;
  background: #FAF8F6;
  border-bottom: 1px solid var(--card-border);
  border-top: 1px solid var(--card-border);
}

.audit-time {
  font-size: 11.5px;
  color: var(--text-muted2);
  font-family: 'Poppins', sans-serif;
}

.audit-user {
  font-size: 12.5px;
  font-weight: 600;
}

.audit-role {
  font-size: 11px;
  color: var(--text-muted4);
}

.audit-action {
  font-size: 12.5px;
  color: #3A332E;
}

.audit-module-chip {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 0.35rem;
  background: #F4EEE8;
  color: #7A6F66;
  font-weight: 600;
}

/* ===== misc ===== */
.d-none {
  display: none !important;
}

.min-w-0 {
  min-width: 0;
}

.overflow-hidden {
  overflow: hidden;
}

.p-0 {
  padding: 0 !important;
}

.mt-3 {
  margin-top: 16px;
}

.mb-1 {
  margin-bottom: 6px;
}

.mb-3 {
  margin-bottom: 14px;
}

.gap-2 {
  gap: 8px;
}

.flex-fill {
  flex: 1;
}

.fw-bold {
  font-weight: 700;
}

.fade-in {
  animation: floatUp .4s ease both;
}

@keyframes floatUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1400px) {
  .module-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-charts-row {
    grid-template-columns: 1fr;
  }

  .module-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .travel-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 780px) {
  .app-sidebar {
    display: none;
  }

  .field-grid,
  .upload-grid {
    grid-template-columns: 1fr;
  }
}