/* Bootstrap 5 integration and responsive refinements for Atelier Nova */
:root {
  --bs-body-font-family: 'DM Sans', sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--paper);
  --bs-border-color: var(--line);
}

.app-shell { grid-template-columns: 246px minmax(0, 1fr); }
.content.container-fluid { padding: 34px 38px 60px; max-width: 1600px; }

.table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: #fcfcf8;
  --bs-table-color: var(--ink);
  font-size: 11px;
}
.table > :not(caption) > * > * { padding: 12px 16px; border-color: #f0f1ee; box-shadow: none; }
.table thead th { padding: 10px 16px; background: #fafaf8; color: #929693; }
.table-responsive { border-radius: 0 0 12px 12px; scrollbar-width: thin; scrollbar-color: #cfd3cf transparent; }

.form-control, .form-select { font-size: 12px; min-height: 42px; }
.form-control:focus, .form-select:focus { border-color: #8ba23b; box-shadow: 0 0 0 .2rem rgba(216,245,109,.35); }

/* Prevent Bootstrap component defaults from interfering with the custom dialog/toasts. */
.modal-backdrop { opacity: 1; }
.modal { position: relative; inset: auto; display: block; height: auto; overflow: auto; }
.toast { display: block; width: auto; opacity: 1; }

@media (max-width: 991.98px) {
  .content.container-fluid { padding: 28px 24px 50px; }
  .page-heading { gap: 18px; }
  .metric { min-width: 0; }
}

@media (max-width: 767.98px) {
  .content.container-fluid { padding: 22px 16px 42px; }
  .topbar { height: 64px; }
  .page-heading { margin-bottom: 22px; flex-wrap: wrap; }
  .page-heading > button { width: 100%; justify-content: center; }
  .page-heading > .secondary-btn { display: none; }
  .panel-head { gap: 12px; }
  .recent-panel .panel-head { align-items: center; }
  .recent-panel .panel-head p { display: none; }
  .table-responsive { -webkit-overflow-scrolling: touch; }
  .table { min-width: 760px; }
  .customer-stats { gap: 12px; flex-wrap: wrap; }
  .modal { padding: 20px; }
}

@media (max-width: 575.98px) {
  .search-wrap { min-width: 0; }
  .search-wrap input { font-size: 12px; text-overflow: ellipsis; }
  .metrics, .inventory-metrics, .finance-metrics { grid-template-columns: 1fr; }
  .metric { min-height: 104px; }
  .activity-panel, .status-panel { padding: 16px; }
  .chart-wrap { height: 185px; }
  .donut-area { height: auto; min-height: 200px; flex-direction: column; padding: 18px 0; }
  .legend { width: 100%; grid-template-columns: 1fr 1fr; }
  .page-heading .primary-btn { width: 100%; justify-content: center; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions button { width: 100%; justify-content: center; }
  .toast-container { left: 16px; right: 16px; bottom: 16px; }
}
