/* Bootstrap owns the grid, controls and breakpoints. These refinements are scoped
   to the existing administrative shells, leaving specialized canvases intact. */
.app-shell, .admin-shell { min-width: 0; padding-bottom: 2rem; }
.app-shell header, .app-shell .d-flex { flex-wrap: wrap; gap: .75rem; }
.app-shell .row > *, .admin-shell .row > * { min-width: 0; }
.app-shell .hero { padding: clamp(1.25rem, 4vw, 3rem); margin-bottom: 1.5rem; }
.app-shell .hero h1, .bw-admin-header h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -.035em; overflow-wrap: anywhere; }
.app-shell .btn, .admin-shell .btn { max-width: 100%; white-space: normal; }
.app-shell .form-control, .app-shell .form-select { min-width: 0; max-width: 100%; }
.app-shell textarea.form-control { font-size: 1rem; line-height: 1.6; resize: vertical; }
.app-shell .badge { font-size: .8125rem; letter-spacing: 0; white-space: normal; overflow-wrap: anywhere; }
.app-shell pre { max-width: 100%; overflow: auto; }
.app-shell .table-responsive, .admin-shell .table-responsive,
.commercial-page .table-responsive { min-width: 0; overflow-y: hidden; }
.app-shell .table-responsive > table, .admin-table { min-width: 44rem; }
.app-shell .product-table td, .admin-table td { overflow-wrap: anywhere; }
.app-shell .product-table td:first-child { min-width: 15rem; }
.app-shell .product-table td:nth-child(2) { min-width: 8rem; }
.app-shell .product-table .badge { white-space: nowrap; }
.admin-shell .card { border-color: #e0e8e4; border-radius: 1rem; }
.admin-table th, .admin-table td { padding: 1rem; }
.admin-table th { font-size: .875rem; white-space: nowrap; }
.admin-shell .badge { font-size: .8125rem; letter-spacing: 0; }
.app-shell :is(a,button,input,textarea,select,summary):focus-visible,
.admin-shell :is(a,button,input,textarea,select,summary):focus-visible { outline: 3px solid #13795b; outline-offset: 3px; }
.app-shell .table-responsive:focus-visible, .admin-shell .table-responsive:focus-visible { outline: 3px solid #13795b; outline-offset: 2px; }
body .builder-header { flex-wrap: wrap; }
body .builder-header > div { min-width: 0; }
body .builder-header .d-flex { flex-wrap: wrap; }
body .builder-config { min-width: 0; overflow-wrap: anywhere; }
body .builder-config :is(input,select,textarea) { min-width: 0; max-width: 100%; }
body .builder-shell footer { overflow-wrap: anywhere; }
body .inbox-topbar { flex-wrap: wrap; gap: .75rem; }
body .inbox-topbar > div { min-width: 0; }
body .inbox-shell :is(dialog, .modal-content) { max-width: calc(100vw - 24px); overflow-wrap: anywhere; }
body .inbox-shell .message-composer { min-width: 0; }
body .inbox-shell .message-composer textarea { min-width: 0; }
/* A full-width canvas remains available on touch devices, with the existing
   node palette and configuration arranged around it rather than squeezing it. */
@media (max-width: 575.98px) {
    body .inbox-shell .message-composer { grid-template-columns: repeat(3,minmax(0,1fr)); }
    body .inbox-shell .message-composer > textarea { grid-column: 1/-1; }
    body .inbox-shell .message-composer > .btn,
    body .inbox-shell .attachment-picker > .btn { width: 100%; }
    body .builder-layout { grid-template-columns: minmax(0,1fr); }
    body .builder-palette { display: flex; flex-wrap: wrap; gap: .5rem; padding: 1rem; border-bottom: 1px solid #dce6e0; }
    body .builder-palette .block-button { width: auto; flex: 1 1 8rem; font-size: .8125rem; margin: 0; }
    body .builder-palette :is(h2,p,hr) { width: 100%; }
    body .builder-config { grid-column: 1; max-height: none; }
    body #drawflow { height: 60dvh; min-height: 400px; }
}
