*,
*::before,
*::after { box-sizing: border-box; }

html, body { max-width: 100%; overflow-x: hidden; }
body { overflow-wrap: anywhere; }

img, svg, canvas, video, iframe { max-width: 100%; height: auto; }
input, select, textarea, button { max-width: 100%; }
textarea { min-height: 110px; }

.customer-main, .admin-content, .customer-content, .admin-page { min-width: 0; }
.dream-card, .aw-card, .landing-panel, .auth-premium-card { min-width: 0; overflow-wrap: anywhere; }
.dream-grid, .row { min-width: 0; }
.table { min-width: 720px; }
.table-responsive, .aw-card.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.dream-button, .btn, .customer-nav-link, .customer-bottom-nav a {
    min-height: 42px;
    align-items: center;
    justify-content: center;
    white-space: normal;
}

.modal-dialog { max-width: min(96vw, var(--bs-modal-width, 500px)); margin-inline: auto; }
.dropdown-menu { max-width: min(92vw, 360px); overflow-wrap: anywhere; }
.nav, .nav-tabs, .tabs, [role="tablist"] { overflow-x: auto; flex-wrap: nowrap; }

.payment-method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.payment-method-card {
    display: grid;
    gap: 6px;
    border: 1px solid rgba(15, 23, 42, .14);
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    background: #fff;
}
.payment-method-card:has(input:checked) {
    border-color: #198754;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, .14);
}
.payment-method-card input { width: 18px; height: 18px; }
.payment-method-title { font-weight: 800; }
.payment-method-copy, .payment-method-meta { color: #64748b; font-size: .9rem; }
.payment-qr { max-width: 180px; border-radius: 8px; border: 1px solid rgba(15, 23, 42, .12); }

@media (max-width: 1024px) {
    .admin-shell { display: block; }
    .admin-sidebar { position: static; width: auto; max-height: none; }
    .admin-nav { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 8px; }
    .admin-nav-link { flex: 0 0 auto; }
    .admin-content { padding-inline: 14px; }
}

@media (max-width: 768px) {
    .customer-topbar, .admin-topbar, .dream-page-head, .dream-section-head {
        display: grid;
        gap: 12px;
        align-items: start;
    }
    .customer-topbar-actions { flex-wrap: wrap; justify-content: stretch; }
    .customer-topbar-actions > * { flex: 1 1 auto; }
    .dream-grid, .dream-grid-main, .dream-grid-2, .dream-grid-3 { grid-template-columns: 1fr !important; }
    .field-span-full { grid-column: auto !important; }
    .customer-content { padding-bottom: 92px; }
    .customer-bottom-nav { z-index: 1040; }
}

@media (max-width: 430px) {
    .customer-content, .admin-page { padding-inline: 10px; }
    .dream-card, .aw-card { padding: 14px !important; }
    .payment-method-grid { grid-template-columns: 1fr; }
    .auth-premium-card { width: min(100%, 94vw); padding-inline: 16px; }
}
