html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

th {
    white-space:nowrap;
}

td {
    white-space: nowrap;
}

/* Optional micro-nudge for icon baseline in navbar */
.navbar .nav-link .bi {
    transform: translateY(1px);
}

/* Purchase Order View Details */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    gap: 12px;
}

/* Card style to match your screenshot */
.stat-card {
    background: #fff;
    border: 1px solid #ecf0f4;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 3px 14px rgba(17,24,39,.06);
    min-width: 0; /* allow inner text to shrink */
}

.stat-label {
    font-size: clamp(.78rem,.9vw,.95rem);
    color: #6b7a90;
    margin-bottom: .25rem;
}

.stat-value {
    font-weight: 800;
    font-size: clamp(1rem,1vw,1rem);
    line-height: 1;
    letter-spacing: .4px;
    color: #0f172a;
    white-space: nowrap;
}

/* Icon chip */
.stat-chip {
    display: inline-grid;
    place-items: center;
    width: clamp(36px,3.2vw,52px);
    height: clamp(36px,3.2vw,52px);
    border-radius: 14px;
    background: #f3f5f8;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 1px 2px rgba(0,0,0,.04);
    color: #0f2537;
    flex-shrink: 0;
}

.stat-chip i {
    font-size: clamp(16px,1.6vw,22px);
}

/* Pale tinted chip variants */
.chip-warn {
    background: #fff3cd;
}

.chip-success {
    background: #eafaf0;
}

.chip-danger {
    background: #fde7e9;
}

.chip-info {
    background: #e7f4fa;
}

/* Tighten spacing on very narrow viewports to keep 5 on one row */
@media (max-width: 992px) {
    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        padding: 14px 16px;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        gap: 8px;
    }

    .stat-card {
        padding: 12px 12px;
        border-radius: 14px;
    }
}


/* Wrapper card */
.fact {
    display: flex;
    align-items: stretch;
    gap: 16px;
    background: #fff;
    border: 1px solid #ecf0f4;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 3px 14px rgba(17,24,39,.06);
}

/* Notes variant (you can theme here if needed) */
.fact-notes .fact-icon {
    background: #f3f5f8;
}

/* Icon chip */
.fact-icon {
    flex: 0 0 56px;
    height: 56px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #0f2537;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 1px 2px rgba(0,0,0,.04);
    font-size: 22px;
}

/* Content stack */
.fact-content {
    flex: 1 1 auto;
    min-width: 0; /* allow inner elements to shrink */
}

/* Title */
.fact-label {
    font-size: .95rem;
    color: #6b7a90;
    margin-bottom: .5rem;
}

/* Note box */
.fact-note-box {
    background: #fafbfc;
    border: 1px solid #eef1f4;
    border-radius: 12px;
    padding: 12px 14px;
    min-height: 84px; /* comfortable default height */
    max-height: 260px; /* cap large notes */
    overflow: auto; /* scroll only when needed */
    color: #0f172a;
    line-height: 1.3;
    white-space: pre-wrap; /* keep line breaks */
    word-break: break-word; /* prevent overflow from long strings */
}

/* Empty state */
.fact-note-box.is-empty {
    color: #8a97ad;
    font-style: italic;
}

/* Subtle scrollbar (optional) */
.fact-note-box::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.fact-note-box::-webkit-scrollbar-thumb {
    background: #d7dfe7;
    border-radius: 8px;
}

/* Center the chip content */
.fact-icon {
    display: flex; /* instead of grid if you prefer */
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px; /* your chip size */
    border-radius: 14px;
}

/* Kill BI's default vertical offset and line-height quirks */
.fact-icon .bi {
    display: block;
    line-height: 1;
    vertical-align: middle; /* overrides -.125em from BI */
    font-size: 22px; /* your icon size */
}

.fact {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Purchase Order View Details */