/* Small additions on top of the OLD dashboard CSS (assets/panel/old/*) for core-only widgets. Uses old theme-vars tokens. */
.item-ph { width: 44px; height: 44px; flex: 0 0 44px; }
.min-w-0 { min-width: 0; }
.tbl-card .mm-table-shape { display: flex; margin-top: 6px; }
[hidden] { display: none !important; }
.phone-frame { width: 360px; max-width: 100%; height: 680px; border: 10px solid #1f2937; border-radius: 36px; overflow: hidden; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.phone-frame iframe { width: 100%; height: 100%; border: 0; }
.theme-swatch .form-control-color { width: 44px; height: 36px; padding: 2px; }
/* signup plan picker inside old login card */
.plan-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.plan-pick__opt { display: flex; gap: .5rem; align-items: flex-start; border: 1px solid var(--border-subtle, #e5e7eb); border-radius: 12px; padding: .6rem; cursor: pointer; }
.plan-pick__opt:has(input:checked) { border-color: var(--bs-primary, #198754); background: color-mix(in srgb, var(--bs-primary, #198754) 8%, transparent); }
.plan-pick__opt span { display: flex; flex-direction: column; }
.plan-pick__opt small { color: var(--bs-secondary-color, #6b7280); font-size: .75rem; }
.otp-input { letter-spacing: .5em; text-align: center; font-weight: 700; }
/* printable QR cards */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.qr-card { border: 1px dashed #9ca3af; border-radius: 16px; padding: 16px; text-align: center; break-inside: avoid; background: #fff; }
.qr-card h2 { font-size: 1.05rem; margin: 0 0 8px; }
.qr-card .qr svg { width: 160px; height: 160px; }
.qr-card__table { font-weight: 800; font-size: 1.2rem; margin: 6px 0 0; }
.qr-card__hint { color: #6b7280; margin: 0 0 6px; font-size: .85rem; }
.qr-card small { font-size: .65rem; color: #9ca3af; word-break: break-all; }
@media print { .no-print { display: none !important; } .qr-print { padding: 0 !important; } }

/* ---- Polish (Saber, 2026-10-10): rounder controls via tokens, spacing, preview ---- */
:root, [data-bs-theme] {
    --control-radius: 14px;
    --control-radius-sm: 10px;
    --btn-radius: 999px;
    --bs-border-radius: 14px;
    --bs-border-radius-sm: 10px;
    --bs-border-radius-lg: 18px;
    --bs-border-radius-pill: 999px;
}
.btn { border-radius: var(--btn-radius); }
.btn-group > .btn { border-radius: 0; }
.btn-group > .btn:first-child { border-start-start-radius: var(--btn-radius); border-end-start-radius: var(--btn-radius); }
.btn-group > .btn:last-child { border-start-end-radius: var(--btn-radius); border-end-end-radius: var(--btn-radius); }
.form-control, .form-select { border-radius: var(--control-radius); }
.form-control-color { border-radius: 12px; }
.card { border-radius: 18px; }
.alert { border-radius: 16px; }
.modal-content { border-radius: 22px; }
.badge.rounded-pill, .dashboard-module-nav .btn { border-radius: 999px; }
.auth-btn, .login-field-wrap, .login-field-input, .auth-tab { border-radius: 999px !important; }
.auth-card { border-radius: 22px; }

/* spacing/consistency */
.dashboard-page { max-width: 1280px; margin-inline: auto; }
.dashboard-page h3 { font-weight: 800; font-size: 1.35rem; }
.dashboard-module-nav { gap: .5rem !important; }
.list-group-item { background: transparent; }
.app-header-brand-text { gap: 2px; }
@media (max-width: 768px) {
    .dashboard-page { padding: 1rem .85rem !important; }
    .dashboard-page h3 { font-size: 1.2rem; }
    .dashboard-module-nav { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .dashboard-module-nav .btn { white-space: nowrap; flex: 0 0 auto; }
    .card-body.p-4 { padding: 1.1rem !important; }
    /* old CSS: fixed bottom nav covered the last rows */
    .app-content { padding-bottom: calc(var(--mobile-bottom-space, 110px) + 16px) !important; }
}

/* theme editor: prominent live preview */
.theme-preview-sticky { position: sticky; top: calc(var(--app-header-offset, 80px) + 12px); display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.theme-preview-label { font-weight: 700; color: var(--bs-secondary-color); }
.phone-frame { width: 380px; height: 760px; }
@media (max-width: 991.98px) { .phone-frame { width: 100%; max-width: 360px; height: 600px; } }
.form-range { accent-color: var(--bs-success, #198754); }
.form-range::-webkit-slider-thumb { background: var(--bs-success, #198754); }
.form-range::-moz-range-thumb { background: var(--bs-success, #198754); }

/* Phase 03. Sidebar and bottom-nav visibility stay in the shell chrome files.
   Do not set .app-sidebar or .app-bottom-nav display here. */
html, body { max-width: 100%; }
body { overflow-x: clip; }
.container-fluid { max-width: 100%; padding-inline: 0; }
.app-header-dock { width: 100%; max-width: 100%; }
.app-content,
.auth-main,
.auth-main-inner,
.auth-card,
.dashboard-page,
.dashboard-module-panel,
.login-field,
.login-field-wrap,
.card { min-width: 0; max-width: 100%; }
a, .login-field-input, .form-control, .auth-link, .app-header-brand-name, .header-account-name, .alert, .list-group-item {
  overflow-wrap: anywhere;
}
.table-responsive { overflow-x: auto; max-width: 100%; }
img, svg { max-width: 100%; }
.auth-logo, .default-avatar-svg { max-width: none; }
.avatar-slot--32 { width: 32px; height: 32px; }
.avatar-slot--40 { width: 40px; height: 40px; }
.avatar-slot--32 .default-avatar-svg,
.avatar-slot--40 .default-avatar-svg { width: 100%; height: 100%; }
.mm-skel {
  display: inline-block;
  width: 7rem;
  height: 0.85em;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  vertical-align: middle;
}
.invite-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; min-width: 0; }
.invite-row > span { flex: 1 1 auto; min-width: 0; }
.invite-row .auth-btn { width: auto; flex: 0 0 auto; }
.later-note { margin: 0; }
.menu-add-form { flex: 1 1 16rem; min-width: 0; }
.menu-add-form .form-control { min-width: 0; }
.menu-cat-head { min-width: 0; }
.menu-cat-head h5 { min-width: 0; overflow-wrap: anywhere; }
.menu-item-main { flex: 1 1 8rem; min-width: 0; }
.menu-item-main .fw-semibold { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-thumb { width: 44px; height: 44px; flex: 0 0 44px; object-fit: cover; max-width: none; }
#imgPreview.menu-thumb { width: 72px; height: 72px; flex-basis: 72px; }
@media (max-width: 768px) {
  .menu-add-form { width: 100%; }
  .menu-add-form .btn { white-space: normal; }
}
@media (max-width: 768px) {
  .auth-main { padding-inline: 1rem; }
  .auth-title { font-size: 1.45rem; }
  .app-header-brand-name, .header-account-name { max-width: 46vw; }
}
.tbl-card, .qr-card, #hallList .list-group-item { min-width: 0; }
.tbl-card .card-body, .qr-card small { overflow-wrap: anywhere; }
.qr-card--store .qr svg { width: 200px; height: 200px; }
.qr-card--big { max-width: 28rem; margin-inline: auto; }
.qr-card--big .qr svg { width: min(280px, 70vw); height: auto; }
@media print {
  .app-sidebar, .app-bottom-nav, #turbo-app-header, .dashboard-module-nav, .no-print { display: none !important; }
  .qr-print { padding: 0 !important; }
}
