/* 掌門精釀後台 - 深炭側欄 + 琥珀 */
:root {
    --admin-side-w: 248px;
    --admin-accent-soft: rgba(196, 138, 58, 0.12);
    --admin-sidebar: #141210;
    --admin-sidebar-2: #1C1917;
    --admin-sidebar-ink: #F3EEE6;
    --admin-sidebar-muted: rgba(243, 238, 230, 0.65);
    --admin-accent: #C48A3A;
    --admin-accent-hover: #A8732F;
    --admin-bg: #F7F3EC;
    --admin-surface: #FFFFFF;
    --admin-ink: #1C1917;
    --admin-muted: #6B6560;
    --admin-line: #E5DFD6;
    --admin-error-bg: #FDECEC;
    --admin-error-ink: #9B1C1C;
    --admin-radius: 12px;
    --admin-radius-sm: 8px;
    --admin-shadow: 0 1px 2px rgba(28, 25, 23, 0.06), 0 4px 16px rgba(28, 25, 23, 0.05);
    --admin-font: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

body.admin-shell {
    background: var(--admin-bg) !important;
    color: var(--admin-ink);
    font-family: var(--admin-font);
}

/* login: brand panel on the left, form on the right */
body.admin-shell .login {
    display: grid;
    grid-template-columns: minmax(280px, 42%) minmax(0, 1fr);
    min-height: 100dvh;
}

/* a grid item grows to its widest child unless told otherwise */
body.admin-shell .login > * {
    min-width: 0;
}

body.admin-shell .login__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    color: var(--admin-sidebar-ink);
    background: linear-gradient(165deg, var(--admin-sidebar-2) 0%, var(--admin-sidebar) 55%, #0C0B0A 100%);
}

body.admin-shell .login__brand-inner {
    max-width: 360px;
    text-align: center;
}

body.admin-shell .login__mascot-host {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 260px;
    margin: 0 auto 12px;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

body.admin-shell .login__tag {
    margin: 0 0 8px;
    color: var(--admin-accent);
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.admin-shell .login__title-brand {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

body.admin-shell .login__lede {
    margin: 0;
    color: var(--admin-sidebar-muted);
    font-size: 15px;
}

body.admin-shell .login__main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--admin-bg);
}

body.admin-shell .login__panel {
    box-sizing: border-box;
    width: min(400px, 100%);
    padding: 32px 28px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
}

body.admin-shell .login__panel h1 {
    margin: 0 0 6px;
    font-size: 22px;
}

body.admin-shell .login__sub {
    margin: 0 0 18px;
    color: var(--admin-muted);
    font-size: 14px;
}

body.admin-shell .login__error {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: var(--admin-radius-sm);
    background: var(--admin-error-bg);
    color: var(--admin-error-ink);
    font-size: 14px;
}

body.admin-shell .login__field {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin-bottom: 14px;
}

body.admin-shell .login__field label {
    font-size: 14px;
    font-weight: 600;
}

body.admin-shell .login__field input {
    padding: 10px 12px;
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius-sm);
    font: inherit;
    background: #FFFFFF;
    width: 100%;
    box-sizing: border-box;
}

body.admin-shell .login__field input:focus {
    outline: 2px solid rgba(196, 138, 58, 0.35);
    border-color: var(--admin-accent);
}

body.admin-shell .login__captcha {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius-sm);
    background: #FBF9F5;
}

body.admin-shell .login__captcha-label {
    font-size: 14px;
    font-weight: 600;
}

body.admin-shell .login__captcha-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

body.admin-shell .login__captcha-img {
    flex: none;
    width: 140px;
    height: 48px;
    border-radius: 6px;
    border: 1px solid var(--admin-line);
    background: #FFFFFF;
}

/* drops under the image when there is no room for 120px next to it */
body.admin-shell .login__captcha-input {
    flex: 1 1 120px;
    width: 120px;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius-sm);
    font: inherit;
}

body.admin-shell .login__hint {
    margin: 0;
    font-size: 13px;
    color: var(--admin-muted);
}

body.admin-shell .login__remember {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 14px;
    color: var(--admin-muted);
}

body.admin-shell .login__submit {
    width: 100%;
    margin-top: 6px;
    padding: 12px 16px;
    border: 0;
    border-radius: var(--admin-radius-sm);
    background: var(--admin-accent);
    color: #FFFFFF;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

body.admin-shell .login__submit:hover {
    background: var(--admin-accent-hover);
}

body.admin-shell .login__help {
    margin: 16px 0 0;
    color: var(--admin-muted);
    font-size: 13px;
}

body.admin-shell .login__help a {
    color: var(--admin-accent);
}

@keyframes mascot-wobble {
    0%, 100% {
        transform: rotate(-1.2deg) translateY(0);
    }
    50% {
        transform: rotate(1.2deg) translateY(-2px);
    }
}

@media (max-width: 800px) {
    body.admin-shell .login {
        grid-template-columns: minmax(0, 1fr);
    }

    body.admin-shell .login__brand {
        padding: 28px 20px;
        min-height: 240px;
    }

    body.admin-shell .login__mascot-host {
        min-height: 200px;
    }

    body.admin-shell .login__main {
        padding: 24px 16px;
    }

    body.admin-shell .login__panel {
        padding: 24px 18px;
    }
}

/* ============================================================
   Shell: tenant admin pages (body.has-shell). God pages keep their
   own header/aside and only pick up the colours above.
   ============================================================ */

body.has-shell {
    font-size: 15px;
}

body.has-shell a {
    color: var(--admin-accent-hover);
}

body.has-shell a:hover {
    color: var(--admin-accent);
}

/* sidebar */
body.has-shell .shell-side {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 997;
    display: flex;
    flex-direction: column;
    width: var(--admin-side-w);
    padding: 20px 14px 16px;
    overflow-y: auto;
    color: var(--admin-sidebar-ink);
    background: linear-gradient(180deg, var(--admin-sidebar-2) 0%, var(--admin-sidebar) 60%);
    scrollbar-width: thin;
    scrollbar-color: rgba(243, 238, 230, 0.25) transparent;
}

body.has-shell .shell-side__brand {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 4px 10px 20px;
    color: inherit;
    text-decoration: none;
}

body.has-shell .shell-side__mark {
    flex: none;
    width: 38px;
    height: 38px;
    object-fit: contain;
}

body.has-shell .shell-side__brand-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

body.has-shell .shell-side__name {
    overflow: hidden;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.has-shell .shell-side__sub {
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--admin-sidebar-muted);
}

body.has-shell .shell-side__nav {
    display: grid;
    flex: 1;
    align-content: start;
    gap: 2px;
}

body.has-shell .shell-side__group {
    margin: 18px 10px 6px;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: rgba(243, 238, 230, 0.45);
}

body.has-shell .shell-side__nav a {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 9px 12px;
    border-radius: var(--admin-radius-sm);
    color: var(--admin-sidebar-ink);
    text-decoration: none;
}

body.has-shell .shell-side__nav a .bi {
    width: 18px;
    color: var(--admin-sidebar-muted);
}

body.has-shell .shell-side__nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

body.has-shell .shell-side__nav a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    font-weight: 600;
}

body.has-shell .shell-side__nav a[aria-current="page"] .bi {
    color: var(--admin-accent);
}

body.has-shell .shell-side__nav a[aria-current="page"]::before {
    content: "";
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 0;
    width: 3px;
    border-radius: 3px;
    background: var(--admin-accent);
}

body.has-shell .shell-side__user {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 4px 10px;
    align-items: center;
    margin-top: 12px;
    padding: 14px 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

body.has-shell .shell-side__avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: var(--admin-accent);
    color: var(--admin-sidebar);
    font-size: 18px;
}

body.has-shell .shell-side__who {
    display: grid;
    min-width: 0;
    line-height: 1.35;
}

body.has-shell .shell-side__uname {
    overflow: hidden;
    color: #FFFFFF;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.has-shell .shell-side__uid {
    font-size: 13px;
    color: var(--admin-accent);
}

body.has-shell .shell-side__actions {
    display: flex;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    gap: 6px 14px;
    padding-top: 8px;
    font-size: 14px;
}

body.has-shell .shell-side__actions a {
    color: var(--admin-sidebar-muted);
}

body.has-shell .shell-side__actions a:hover {
    color: #FFFFFF;
}

/* top bar and drawer, narrow screens only */
body.has-shell .shell-top,
body.has-shell .shell-backdrop {
    display: none;
}

/* content */
body.has-shell #main {
    margin: 0 0 0 var(--admin-side-w);
    padding: 28px 32px 32px;
}

body.has-shell #main > * {
    max-width: 1180px;
    margin-right: auto;
    margin-left: auto;
}

body.has-shell #footer {
    margin-left: var(--admin-side-w);
    border-top: 1px solid var(--admin-line);
}

body.has-shell #footer .copyright,
body.has-shell #footer .credits {
    color: var(--admin-muted);
}

body.has-shell .back-to-top {
    display: none !important;
}

/* page head: title, one line on what to do here, main actions on the right */
body.has-shell .page-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

body.has-shell .page-head h1 {
    margin: 0 0 6px;
    color: var(--admin-ink);
    font-size: 24px;
    font-weight: 700;
}

body.has-shell .page-head__lede {
    max-width: 42em;
    margin: 0;
    color: var(--admin-muted);
    font-size: 14px;
}

body.has-shell .page-head__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* breadcrumbs (pages without a page head) */
body.has-shell .pagetitle {
    margin-bottom: 14px;
}

body.has-shell .pagetitle h1 {
    color: var(--admin-ink);
}

body.has-shell .breadcrumb {
    margin: 0;
    font-size: 13px;
}

body.has-shell .breadcrumb a {
    color: var(--admin-muted);
}

body.has-shell .breadcrumb .active {
    color: var(--admin-ink);
}

/* cards */
body.has-shell .card {
    margin-bottom: 24px;
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
}

body.has-shell .card-body {
    padding: 20px;
}

body.has-shell .card-title {
    color: var(--admin-ink);
    font-family: var(--admin-font);
    font-weight: 600;
}

body.has-shell .card-title span {
    color: var(--admin-muted);
}

/* buttons: Bootstrap's primary becomes amber */
body.has-shell .btn {
    border-radius: var(--admin-radius-sm);
    font-weight: 600;
}

body.has-shell .btn-primary {
    --bs-btn-bg: var(--admin-accent);
    --bs-btn-border-color: var(--admin-accent);
    --bs-btn-hover-bg: var(--admin-accent-hover);
    --bs-btn-hover-border-color: var(--admin-accent-hover);
    --bs-btn-active-bg: var(--admin-accent-hover);
    --bs-btn-active-border-color: var(--admin-accent-hover);
    --bs-btn-disabled-bg: var(--admin-accent);
    --bs-btn-disabled-border-color: var(--admin-accent);
    color: #FFFFFF;
}

body.has-shell .btn-outline-primary,
body.has-shell .btn-light {
    --bs-btn-color: var(--admin-ink);
    --bs-btn-bg: var(--admin-surface);
    --bs-btn-border-color: var(--admin-line);
    --bs-btn-hover-color: var(--admin-ink);
    --bs-btn-hover-bg: #FBF9F5;
    --bs-btn-hover-border-color: #D4CCC0;
    --bs-btn-active-color: var(--admin-ink);
    --bs-btn-active-bg: #F3EEE6;
    --bs-btn-active-border-color: #D4CCC0;
}

body.has-shell a.btn-primary,
body.has-shell a.btn-primary:hover {
    color: #FFFFFF;
}

/* forms */
body.has-shell .form-control,
body.has-shell .form-select {
    border-color: var(--admin-line);
    border-radius: var(--admin-radius-sm);
}

body.has-shell .form-control:focus,
body.has-shell .form-select:focus,
body.has-shell .form-check-input:focus {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px rgba(196, 138, 58, 0.2);
}

body.has-shell .form-check-input:checked {
    border-color: var(--admin-accent);
    background-color: var(--admin-accent);
}

body.has-shell .nav-tabs .nav-link {
    color: var(--admin-muted);
}

body.has-shell .nav-tabs .nav-link.active,
body.has-shell .nav-tabs-bordered .nav-link.active {
    color: var(--admin-ink);
    border-bottom-color: var(--admin-accent);
}

/* tables and simple-datatables */
body.has-shell .table {
    --bs-table-hover-bg: var(--admin-accent-soft);
    margin-bottom: 0;
    font-size: 14px;
}

body.has-shell .table > :not(caption) > * > * {
    padding: 11px 14px;
    border-bottom-color: var(--admin-line);
}

body.has-shell .table thead th {
    background: #FCFBF8;
    color: var(--admin-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

body.has-shell .dataTable-sorter,
body.has-shell .dataTable-sorter:hover {
    color: inherit;
}

body.has-shell .dataTable-top,
body.has-shell .dataTable-bottom {
    padding: 12px 0;
}

body.has-shell .dataTable-input,
body.has-shell .dataTable-selector {
    padding: 7px 10px;
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius-sm);
    background-color: #FFFFFF;
}

body.has-shell .dataTable-input:focus {
    border-color: var(--admin-accent);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(196, 138, 58, 0.2);
}

body.has-shell .dataTable-info {
    color: var(--admin-muted);
    font-size: 13px;
}

body.has-shell .dataTable-pagination a {
    border-radius: var(--admin-radius-sm);
    color: var(--admin-muted);
}

body.has-shell .dataTable-pagination a:hover {
    background: var(--admin-accent-soft);
}

body.has-shell .dataTable-pagination .active a,
body.has-shell .dataTable-pagination .active a:hover {
    background: var(--admin-accent);
    color: #FFFFFF;
}

/* a halted beer: muted row instead of the old grey fill */
body.has-shell tr.is-halted > * {
    color: var(--admin-muted);
    background: #F3EFE8;
}

body.has-shell .pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

body.has-shell .pill--ok {
    background: #E6F4EF;
    color: #155E4B;
}

body.has-shell .pill--halt {
    background: #EFEAE2;
    color: var(--admin-muted);
}

/* dashboard: one card per module the account can open */
body.has-shell .quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

body.has-shell .quick-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 4px 12px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius);
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow);
    color: var(--admin-ink);
    text-decoration: none;
    transition: border-color 0.12s ease, transform 0.12s ease;
}

body.has-shell .quick-card:hover {
    border-color: var(--admin-accent);
    color: var(--admin-ink);
    transform: translateY(-1px);
}

body.has-shell .quick-card__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--admin-accent-soft);
    color: var(--admin-accent-hover);
    font-size: 20px;
}

body.has-shell .quick-card__name {
    font-weight: 600;
}

body.has-shell .dash-section {
    margin: 28px 0 12px;
    color: var(--admin-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
}

@media (max-width: 991px) {
    body.has-shell .shell-top {
        position: sticky;
        top: 0;
        z-index: 996;
        display: flex;
        gap: 10px;
        align-items: center;
        height: 56px;
        padding: 0 12px;
        background: var(--admin-sidebar);
        color: var(--admin-sidebar-ink);
    }

    body.has-shell .shell-top__menu {
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 0;
        border-radius: var(--admin-radius-sm);
        background: transparent;
        color: inherit;
        font-size: 24px;
    }

    body.has-shell .shell-top__brand {
        display: flex;
        gap: 8px;
        align-items: center;
        min-width: 0;
        color: inherit;
        font-weight: 700;
        text-decoration: none;
    }

    body.has-shell .shell-top__brand img {
        width: 28px;
        height: 28px;
    }

    body.has-shell .shell-top__brand span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.has-shell .shell-side {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    body.has-shell.shell-open .shell-side {
        transform: none;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
    }

    body.has-shell.shell-open .shell-backdrop {
        position: fixed;
        inset: 0;
        z-index: 996;
        display: block;
        background: rgba(20, 18, 16, 0.45);
    }

    body.has-shell #main {
        margin-left: 0;
        padding: 20px 16px 28px;
    }

    body.has-shell #footer {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.has-shell .shell-side,
    body.has-shell .quick-card {
        transition: none;
    }
}

/* edit pages: breadcrumbs sit as a small line above the title */
body.has-shell .page-head .breadcrumb {
    margin-bottom: 4px;
}

body.has-shell .page-head h1 {
    overflow-wrap: anywhere;
}

/* tabs: underline instead of Bootstrap's boxed tabs */
body.has-shell .card .nav-tabs {
    gap: 4px;
    margin: -20px -20px 16px;
    padding: 0 20px;
    border-bottom: 1px solid var(--admin-line);
    background: #FBF9F5;
    border-radius: var(--admin-radius) var(--admin-radius) 0 0;
}

body.has-shell .card .nav-tabs .nav-link {
    margin-bottom: -1px;
    padding: 14px 12px 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--admin-muted);
    font-weight: 600;
}

body.has-shell .card .nav-tabs .nav-link:hover {
    color: var(--admin-ink);
}

body.has-shell .card .nav-tabs .nav-link.active {
    border-bottom-color: var(--admin-accent);
    background: transparent;
    color: var(--admin-ink);
}

/* forms read better at a line length a person can scan */
body.has-shell form.needs-validation {
    max-width: 760px;
}

body.has-shell .form-label {
    color: var(--admin-ink);
    font-size: 14px;
    font-weight: 600;
}

/* Submit / Cancel: left-aligned bar under the form */
body.has-shell form.needs-validation > .text-center:last-child {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--admin-line);
    text-align: left !important;
}

body.has-shell .btn-secondary {
    --bs-btn-color: var(--admin-ink);
    --bs-btn-bg: var(--admin-surface);
    --bs-btn-border-color: var(--admin-line);
    --bs-btn-hover-color: var(--admin-ink);
    --bs-btn-hover-bg: #FBF9F5;
    --bs-btn-hover-border-color: #D4CCC0;
    --bs-btn-active-color: var(--admin-ink);
    --bs-btn-active-bg: #F3EEE6;
    --bs-btn-active-border-color: #D4CCC0;
}

body.has-shell .list-group-item.active {
    border-color: var(--admin-accent);
    background: var(--admin-accent);
}

body.has-shell .modal-content {
    border: 0;
    border-radius: var(--admin-radius);
}

/* 店舖設定 sections */
body.has-shell .accordion-button {
    padding: 16px 4px;
    font-size: 16px;
}

body.has-shell .accordion-button:not(.collapsed) {
    background: transparent;
    color: var(--admin-ink);
    box-shadow: inset 0 -1px 0 var(--admin-line);
}

body.has-shell .accordion-button:focus {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px rgba(196, 138, 58, 0.2);
}

body.has-shell .form-text {
    color: var(--admin-muted);
    font-size: 13px;
}

/* 酒單編輯: prices are typed straight into the cells */
body.has-shell .menu-table {
    min-width: 560px;
}

/* keeps absolutely positioned bits (the visually-hidden 換酒 label) inside
   the scroll box instead of widening the page */
body.has-shell .table-responsive,
body.has-shell .dataTable-container {
    position: relative;
}

body.has-shell .menu-table > tbody > tr > * {
    vertical-align: middle;
}

body.has-shell .menu-table__beer {
    cursor: pointer;
    font-weight: 600;
}

body.has-shell .menu-table__beer:hover {
    color: var(--admin-accent-hover);
}

/* an empty slot; ::before is not part of innerText, which menu_edit.js reads */
body.has-shell .menu-table__beer:empty::before {
    content: "點這裡選酒";
    color: var(--admin-muted);
    font-weight: 400;
}

body.has-shell .menu-table__price {
    width: 110px;
    border: 1px dashed var(--admin-line) !important;
    border-radius: var(--admin-radius-sm);
    text-align: right;
    font-variant-numeric: tabular-nums;
    cursor: text;
}

body.has-shell .menu-table__price:focus {
    outline: 2px solid rgba(196, 138, 58, 0.35);
    border-color: var(--admin-accent) !important;
    background: #FFFFFF;
}

/* a sold-out row reads as such at a glance */
body.has-shell .menu-table tr:has(input[name="sold_out"]:checked) > * {
    color: var(--admin-muted);
    background: #F3EFE8;
}

/* corner mascot: wide screens only, never catches clicks */
body.has-shell .shell-mascot {
    position: fixed;
    right: 18px;
    bottom: 6px;
    z-index: 990;
    pointer-events: none;
    filter: drop-shadow(0 8px 16px rgba(28, 25, 23, 0.18));
}

@media (max-width: 1199px) {
    body.has-shell .shell-mascot {
        display: none;
    }
}

/* 酒款圖片: the template caps the preview at 10% of the row */
body.has-shell #picture {
    max-width: min(240px, 100%) !important;
    margin-top: 16px;
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius-sm);
}

/* list filters (帳號列表) and server-side pagination */
body.has-shell .list-filter {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

body.has-shell .pagination {
    --bs-pagination-color: var(--admin-muted);
    --bs-pagination-border-color: var(--admin-line);
    --bs-pagination-hover-color: var(--admin-ink);
    --bs-pagination-hover-bg: var(--admin-accent-soft);
    --bs-pagination-hover-border-color: var(--admin-line);
    --bs-pagination-focus-color: var(--admin-ink);
    --bs-pagination-focus-box-shadow: 0 0 0 3px rgba(196, 138, 58, 0.2);
    --bs-pagination-active-bg: var(--admin-accent);
    --bs-pagination-active-border-color: var(--admin-accent);
    margin: 16px 0 0;
}

@media (max-width: 767px) {
    /* the table scrolls sideways inside its card instead of squeezing names */
    body.has-shell .dataTable-container,
    body.has-shell .table-responsive {
        overflow-x: auto;
    }

    body.has-shell .table th,
    body.has-shell .table td {
        white-space: nowrap;
    }

    body.has-shell .card-body {
        padding: 14px;
    }

    /* five store tabs do not fit a phone: swipe them */
    body.has-shell .card .nav-tabs {
        flex-wrap: nowrap;
        margin: -14px -14px 12px;
        padding: 0 14px;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }

    body.has-shell .list-filter {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    body.has-shell .list-filter__search {
        grid-column: 1 / -1;
    }
}
