:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #667085;
  --line: #d7e0ea;
  --accent: #36566f;
  --accent-2: #29465d;
  --danger: #b5475b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 1rem 2.4rem;
}

.top-nav-row {
  margin-top: 1rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.top-menu {
  position: relative;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
  align-items: flex-end;
  padding: 0.55rem 0.7rem 0;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 247, 251, 0.98) 100%);
  box-shadow: 0 10px 26px rgba(31, 41, 55, 0.05);
}

.top-menu::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0;
  border-bottom: 1px solid var(--line);
}

.menu-tab {
  position: relative;
  z-index: 1;
  min-height: 44px;
  padding: 0.72rem 1.05rem 0.84rem;
  border-radius: 14px 14px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  background: linear-gradient(180deg, #f9fbfd 0%, #edf2f7 100%);
  color: #516274;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: inset 0 -1px 0 rgba(54, 86, 111, 0.05);
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: tabPanelFade 0.14s ease-out;
}

.card {
  margin-top: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

h2 {
  margin: 0;
  font-size: 1.1rem;
}

h3 {
  margin: 0;
  font-size: 1rem;
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem;
  font-size: 0.95rem;
  background: #fbfcfe;
  color: var(--text);
}

input[type="checkbox"] {
  padding: 0;
  border: none;
  border-radius: 0;
  accent-color: var(--accent);
}

.actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.vendor-action-tools {
  align-items: center;
}

.mail-toolbar {
  margin-top: 0;
}

.global-settings-btn {
  flex: 0 0 auto;
  min-height: 44px;
  margin-bottom: 1px;
  border-radius: 14px 14px 0 0;
  border-bottom: none;
  padding-inline: 0.9rem;
  background: linear-gradient(180deg, #f9fbfd 0%, #edf2f7 100%);
  box-shadow: 0 10px 26px rgba(31, 41, 55, 0.05);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  height: 36px;
  padding: 0.38rem 0.68rem;
  line-height: 1;
}

.icon-btn .icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-only-btn {
  min-width: 42px;
  justify-content: center;
  padding-inline: 0.7rem;
}

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(54, 86, 111, 0.12);
}

button:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.top-menu .menu-tab {
  background: linear-gradient(180deg, #f9fbfd 0%, #edf2f7 100%);
  color: #516274;
  border-color: transparent;
}

.top-menu .menu-tab:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f0f4f8 100%);
  color: #31465c;
  transform: translateY(-1px);
}

.top-menu .menu-tab.active,
.top-menu .menu-tab[aria-selected="true"] {
  z-index: 2;
  background: #fff;
  border-color: var(--line);
  color: #173656;
  box-shadow: 0 -2px 10px rgba(17, 24, 39, 0.04);
}

.top-menu .menu-tab.active::after,
.top-menu .menu-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: #fff;
}

.top-menu .menu-tab:focus-visible,
#tab-dashboard-vendor .vendor-subtab:focus-visible {
  outline: 2px solid rgba(54, 86, 111, 0.22);
  outline-offset: 2px;
}

button.ghost {
  background: #fff;
  color: var(--accent-2);
}

.status {
  min-height: 1.2rem;
  margin: 0.6rem 0 0;
  color: var(--muted);
}

.status.error {
  color: var(--danger);
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.table-wrap {
  margin-top: 0.7rem;
  overflow-x: auto;
}

.mail-timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mail-day-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mail-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #e3eaf1;
}

.mail-day-header h3 {
  font-size: 0.98rem;
  color: #30465d;
}

.mail-day-header span {
  font-size: 0.82rem;
  color: #7b8794;
}

.mail-message-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mail-message-card {
  padding: 0.95rem 1rem;
  border: 1px solid #e1e8f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.03);
}

.mail-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.mail-message-time {
  font-size: 0.86rem;
  font-weight: 700;
  color: #425466;
}

.mail-message-flags {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.mail-flag,
.mail-vendor-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
}

.mail-flag {
  border: 1px solid #d4dee8;
  color: #5a6b7e;
  background: #f6f9fc;
}

.mail-message-vendors {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.55rem;
}

.mail-vendor-chip {
  border: 1px solid #dbe4ec;
  background: #eef4fa;
  color: #2f4a62;
}

.mail-vendor-chip.muted-chip {
  background: #f6f8fb;
  color: #7b8794;
}

.mail-message-subject {
  margin-top: 0.65rem;
  font-size: 1rem;
  color: #233548;
}

.mail-message-recipient,
.mail-message-preview {
  margin: 0.35rem 0 0;
  color: #5d6b79;
  line-height: 1.5;
  font-size: 0.88rem;
}

.mail-message-recipient strong {
  color: #334155;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: #fff5ea;
}

.preview-row td {
  color: var(--muted);
  font-size: 0.85rem;
}

.legacy-grid {
  margin-top: 0.9rem;
}

.legacy-summary-table tbody tr {
  cursor: pointer;
}

.legacy-summary-table tbody tr:hover {
  background: #fff1e1;
}

.legacy-summary-table tbody tr.selected {
  background: #ffe4c6;
}

.legacy-note {
  font-size: 0.85rem;
}

.vendor-row {
  cursor: context-menu;
}

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

.dash-filter-grid select[multiple] {
  min-height: 120px;
}

.vendor-search-grid {
  margin-top: 0.9rem;
  align-items: end;
}

.contacts-layout {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 0.9fr 1.35fr;
  gap: 1rem;
}

.contacts-toolbar {
  margin-top: 0;
}

.contacts-form-grid,
.contacts-filter-grid,
.contacts-vendor-grid {
  margin-top: 0.8rem;
}

.contacts-vendor-link-box {
  margin-top: 0.9rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff8ef;
}

.contacts-vendor-link-box h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #1d3557;
}

.contacts-results-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.contacts-associated-vendors {
  margin-top: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.associated-vendor-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #e1d6c8;
  border-radius: 10px;
  background: #fff;
}

.associated-vendor-scope {
  font-size: 0.72rem;
  font-weight: 700;
  color: #a35100;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.associated-vendor-text {
  margin-top: 0.1rem;
  color: #23374d;
  font-size: 0.92rem;
}

.contacts-remove-vendor-btn {
  white-space: nowrap;
}

.scope-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid #d7c8b3;
  background: #fff;
  color: #6b502f;
}

.scope-pill.active {
  border-color: #c7721d;
  background: #ffe2bf;
  color: #a35100;
}

.scope-pill.inactive {
  opacity: 0.55;
}

.contacts-table td:last-child,
.contacts-table th:last-child {
  white-space: nowrap;
}

.contacts-edit-btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
}

.contact-email-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.copy-email-btn {
  height: 30px;
  min-width: 30px;
  padding: 0.2rem;
  border-color: #d8e2ec;
  color: #47617d;
  box-shadow: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(22, 28, 36, 0.58);
}

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

.modal-card {
  width: min(720px, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(17, 24, 39, 0.22);
}

.modal-card-wide {
  width: min(920px, 100%);
}

.nested-card {
  margin-top: 1rem;
}

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

.recipient-chip-wrap,
.related-vendor-wrap,
.related-contact-wrap {
  margin-top: 0.8rem;
}

.recipient-chip-wrap,
.related-vendor-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.38rem 0.32rem 0.62rem;
  border-radius: 999px;
  border: 1px solid #d8e2ec;
  background: #f7fafc;
  color: #31465c;
  font-size: 0.83rem;
  font-weight: 600;
}

.recipient-chip-remove {
  padding: 0.2rem 0.45rem;
  min-height: auto;
  border-radius: 999px;
}

.related-vendor-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.64rem;
  border-radius: 999px;
  border: 1px solid #dae4ee;
  background: #f6f9fc;
  color: #425466;
  font-size: 0.8rem;
}

.related-vendor-chip strong {
  color: #1d3557;
  font-weight: 800;
}

.related-contact-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.related-contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #e0e7ef;
  border-radius: 12px;
  background: #fbfcfe;
}

.related-contact-main h4 {
  margin: 0;
  font-size: 0.92rem;
  color: #26384b;
}

.related-contact-main p {
  margin: 0.18rem 0 0;
  color: #5d6b79;
  font-size: 0.86rem;
}

.related-contact-vendors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.related-contact-vendor {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  background: #eef3f8;
  color: #4a6178;
  font-size: 0.76rem;
  font-weight: 600;
}

.related-contact-add-btn {
  white-space: nowrap;
}

.checkbox-row {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-size: 0.95rem;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.inline-input-actions {
  display: flex;
  gap: 0.45rem;
}

.inline-input-actions input {
  flex: 1;
}

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

.dash-kpi-card {
  min-height: 160px;
}

.dash-kpi-card h3 {
  margin-bottom: 0.45rem;
}

.dash-kpi-value {
  font-size: 3rem;
  line-height: 1;
  font-weight: 800;
}

.dash-kpi-meta {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.chart-wrap {
  margin-top: 0.75rem;
  min-height: 260px;
}

.chart-wrap canvas {
  width: 100%;
  min-height: 250px;
}

.executive-sheet {
  margin-top: 1rem;
  padding: 0.55rem;
  border: 1px solid #d8dde6;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfcfe 0%, #f2f5f9 100%);
}

#tab-dashboard-vendor .card {
  border-color: #cfd5dd;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(22, 33, 50, 0.08);
}

#tab-dashboard-vendor h2,
#tab-dashboard-vendor h3 {
  color: #1d3557;
}

#tab-dashboard-vendor .muted {
  font-size: 0.79rem;
}

#tab-dashboard-vendor .card {
  padding: 0.55rem;
}

#tab-dashboard-vendor .vendor-action-tools {
  margin-top: 0;
}

#tab-dashboard-vendor .vendor-subtabs-card {
  margin-top: 0.35rem;
  padding: 0.45rem 0.55rem 0;
  border-radius: 14px 14px 0 0;
  border: 1px solid #d7dce4;
  border-bottom: none;
  background: linear-gradient(180deg, #fdfefe 0%, #f3f6fa 100%);
  box-shadow: 0 8px 22px rgba(23, 53, 87, 0.06);
}

#tab-dashboard-vendor .vendor-subtabs {
  position: relative;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

#tab-dashboard-vendor .vendor-subtabs::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-bottom: 1px solid #d7dce4;
}

#tab-dashboard-vendor .vendor-subtab {
  position: relative;
  z-index: 1;
  min-height: 40px;
  padding: 0.6rem 0.95rem 0.72rem;
  border-radius: 12px 12px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  background: linear-gradient(180deg, #fafcff 0%, #edf3f8 100%);
  color: #58708b;
  font-weight: 800;
}

#tab-dashboard-vendor .vendor-subtab:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
  color: #32506f;
  transform: translateY(-1px);
}

#tab-dashboard-vendor .vendor-subtab.active,
#tab-dashboard-vendor .vendor-subtab[aria-selected="true"] {
  z-index: 2;
  background: #fff;
  border-color: #d7dce4;
  color: #1d3557;
  box-shadow: 0 -2px 10px rgba(23, 53, 87, 0.05);
}

#tab-dashboard-vendor .vendor-subtab.active::after,
#tab-dashboard-vendor .vendor-subtab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: #fff;
}

#tab-dashboard-vendor .vendor-subpanel {
  display: none;
}

#tab-dashboard-vendor .vendor-subpanel.active {
  display: block;
  animation: tabPanelFade 0.14s ease-out;
}

@keyframes tabPanelFade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#tab-dashboard-vendor .executive-top-half {
  margin-top: 0.35rem;
}

.vendor-header-row {
  align-items: center;
}

.vendor-title-block {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.vendor-title-block img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.vendor-brand-meta {
  margin-top: 0.25rem;
  color: #3b5068;
  font-weight: 600;
}

.executive-report-cover {
  padding: 0.8rem 0.95rem;
}

.vendor-report-brand {
  align-items: flex-start;
}

.vendor-report-heading {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-left: 0.15rem;
  padding-left: 0.8rem;
  border-left: 1px solid #cfd8e3;
  min-height: 64px;
  justify-content: center;
}

.vendor-report-heading h2 {
  font-size: 1.32rem;
  letter-spacing: 0;
}

.executive-report-note {
  margin-top: 0.55rem;
}

.executive-report-title-card {
  margin-top: 0.35rem;
  padding: 0.4rem 0.55rem;
}

.executive-report-title-card h2 {
  margin: 0;
  font-size: 1.18rem;
  color: #1d3557;
}

.executive-kpi-history-wrap {
  display: grid;
  grid-template-columns: 0.88fr 1.52fr;
  gap: 0.4rem;
  align-items: stretch;
}

.executive-kpi-group {
  display: grid;
  grid-template-columns: minmax(195px, 1fr) 0.72fr;
  gap: 0.3rem;
}

.main-kpi-card {
  min-height: 0;
  border-top: 3px solid #2f4b6e;
  padding: 0.45rem 0.52rem;
  aspect-ratio: 1 / 1;
}

.executive-mini-kpi-column {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.3rem;
}

.executive-mini-kpi {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 3px solid #2f4b6e;
  padding: 0.35rem 0.42rem;
}

.executive-mini-kpi h4 {
  margin: 0;
  font-size: 0.74rem;
  color: #173656;
}

.mini-kpi-value {
  margin-top: 0.12rem;
  font-size: 1.62rem;
  font-weight: 800;
  line-height: 1;
  color: #102a43;
}

.mini-kpi-meta {
  margin-top: 0.08rem;
  font-size: 0.65rem;
  color: #44556a;
}

#tab-dashboard-vendor .dash-kpi-card h3 {
  font-size: 0.84rem;
  margin-bottom: 0.14rem;
}

#tab-dashboard-vendor .dash-kpi-value {
  font-size: clamp(1.95rem, 2.8vw, 2.35rem);
  color: #102a43;
  margin-top: 0.06rem;
  line-height: 1;
}

#tab-dashboard-vendor .dash-kpi-meta {
  margin-top: 0.1rem;
  color: #3f4f62;
  font-size: 0.76rem;
  line-height: 1.14;
}

.executive-history-card {
  display: flex;
  flex-direction: column;
}

.executive-history-card h3 {
  margin-bottom: 0.2rem;
}

.executive-chart-row {
  margin-top: 0.34rem;
}

.executive-trend-chart {
  min-height: 316px;
  margin-top: 0.12rem;
}

.executive-trend-table {
  margin-top: 0.15rem;
  border: 1px solid #d9e0ea;
  border-radius: 6px;
  overflow: visible;
}

.executive-trend-table table {
  font-size: 0.53rem;
}

.executive-trend-table th,
.executive-trend-table td {
  padding: 0.14rem 0.22rem;
  line-height: 1.03;
}

.executive-bottom-half {
  margin-top: 0.36rem;
}

.pending-merged-card {
  min-height: 41vh;
}

.executive-table-card .table-wrap {
  margin-top: 0.55rem;
  border: 1px solid #d9e0ea;
  border-radius: 6px;
  overflow: visible;
  max-height: none;
}

.pending-pages-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pending-merged-card .table-wrap {
  border: none;
  margin-top: 0.45rem;
  padding: 0;
}

.pending-print-page {
  background: #ffffff;
  border: 1px solid #d5dce7;
  border-radius: 6px;
  padding: 0.35rem;
  box-shadow: 0 1px 2px rgba(32, 55, 81, 0.06);
}

.pending-page-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e3858;
}

.pending-page-meta {
  margin-top: 0.08rem;
  font-size: 0.66rem;
  color: #516273;
}

.executive-pdf-card {
  min-height: 420px;
}

.pdf-viewer-wrap {
  margin-top: 0.45rem;
  border: 1px solid #d1d9e5;
  border-radius: 6px;
  overflow: hidden;
  background: #e8edf5;
}

.pdf-viewer-wrap iframe {
  display: block;
  width: 100%;
  min-height: 840px;
  border: 0;
  background: #e8edf5;
}

#tab-dashboard-vendor .table-wrap {
  overflow: visible;
}

#tab-dashboard-vendor table {
  font-size: 0.7rem;
}

#tab-dashboard-vendor th {
  background: #edf2f8;
  color: #2b3f57;
  border-bottom: 1px solid #ccd6e3;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

#tab-dashboard-vendor td {
  padding: 0.28rem 0.34rem;
  border-bottom-color: #e3e8f0;
  line-height: 1.12;
}

#tab-dashboard-vendor tbody tr:nth-child(even) {
  background: #f8fafd;
}

.pending-table {
  width: 100%;
  table-layout: fixed;
}

.pending-table .col-idx {
  width: 5%;
}

.pending-table .col-po {
  width: 15%;
}

.pending-table .col-item {
  width: 6%;
}

.pending-table .col-date {
  width: 16%;
}

.pending-table .col-qty {
  width: 7%;
}

.pending-table .col-bal {
  width: 7%;
}

.pending-table .col-cat {
  width: 10%;
}

.pending-table .col-desc {
  width: 34%;
}

.pending-table .description-cell {
  font-size: 0.69rem;
  line-height: 1.1;
  word-break: break-word;
}

.delivery-date-cell {
  white-space: nowrap;
}

.delivery-flag {
  font-size: 0.85rem;
  margin-right: 0.28rem;
  vertical-align: baseline;
}

.delivery-flag.flag-green {
  color: #2e7d32;
}

.delivery-flag.flag-yellow {
  color: #c57c00;
}

.delivery-flag.flag-red {
  color: #b71c1c;
}

.delivery-flag.flag-unknown {
  color: #7d8792;
}

.table-note {
  margin: 0.35rem 0 0;
  font-size: 0.66rem;
  color: #5b6775;
}

.placeholder {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.muted {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

@media (max-width: 820px) {
  .top-nav-row {
    flex-direction: column;
    align-items: stretch;
  }

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

  .tab-visibility-grid {
    grid-template-columns: 1fr;
  }

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

  .contacts-layout {
    grid-template-columns: 1fr;
  }

  .modal-card,
  .modal-card-wide {
    width: 100%;
    max-height: calc(100vh - 1.5rem);
  }

  #tab-dashboard-vendor .executive-kpi-history-wrap {
    grid-template-columns: 1fr;
  }

  #tab-dashboard-vendor .executive-kpi-group {
    grid-template-columns: 1fr;
  }

  .vendor-title-block img {
    height: 46px;
  }

  .pdf-viewer-wrap iframe {
    min-height: 560px;
  }
}

@media print {
  @page {
    size: letter portrait;
    margin: 0.45in;
  }

  body {
    background: #fff !important;
    color: #111;
  }

  .hero,
  .top-menu,
  #tab-mail,
  #tab-legacy,
  #tab-dashboard,
  #dashVendorSearchBtn,
  #dashVendorRefreshBtn,
  #dashVendorExportExcelBtn,
  #dashVendorSendMailBtn,
  .executive-pdf-card {
    display: none !important;
  }

  #tab-dashboard-vendor {
    display: block !important;
  }

  #tab-dashboard-vendor .inline-input-actions,
  #tab-dashboard-vendor #dashVendorSearchResults {
    display: none !important;
  }

  .container {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .executive-sheet {
    border: none;
    background: #fff;
    padding: 0;
  }

  #tab-dashboard-vendor .card {
    box-shadow: none;
    break-inside: avoid;
  }

  .executive-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #tab-dashboard-vendor .executive-kpi-history-wrap {
    grid-template-columns: 0.88fr 1.52fr;
  }

  #tab-dashboard-vendor .executive-kpi-group {
    grid-template-columns: minmax(190px, 1fr) 0.72fr;
  }

  .executive-bottom-half {
    margin-top: 0.22rem;
  }
}
