body {
    padding-top: 2rem;
    margin: 0;
    overflow: hidden;
    /* 不讓整頁出現滾動條 */
}

a,
p,
label,
.btn,
.col-form-label,
th,
td,
.form-control,
.form-select,
.form-text,
.fs-6 {
    color: #3c3c3c;
    font-size: 14px;
    font-weight: normal;
    text-decoration: none !important;
}

th,
td {
    white-space: nowrap;
}

.navbar-brand {
    font-size: 18px !important;
}

.fs-5 {
    font-size: 16px !important;
}

.text-muted {
    font-size: 12px !important;
}

.bg-light {
    background-color: rgba(0,0,0,.05);
}

.border {
    box-shadow: 0 1px 4px 0 rgba(74, 74, 78, .12);
}

/* 讓btn被點擊時不會變成有外框 */
.btn:focus,
.btn:active {
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

/* 讓摺疊的清單按鈕的>能夠轉動 */
.btn-toggle {
    display: inline-flex;
    align-items: center;
    padding: .25rem .5rem;
    font-weight: 600;
    color: rgba(0, 0, 0, .65);
    background-color: transparent;
    border: 0;
}

.btn-toggle::before {
    width: 1.25em;
    line-height: 0;
    content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");
    transition: transform .35s ease;
    transform-origin: .5em 50%;
}

.btn-toggle[aria-expanded="true"]::before {
    transform: rotate(90deg);
}

.text-muted {
    font-size: 70%;
}

input[type=text] {
    min-width: 100px;
}

.sortable-product-category-placeholder {
    height: 40px;
    background: #f0f0f0;
    border: 1px dashed #999;
    margin-bottom: 8px;
}

#main_menu {
    margin-top: 1rem;
}

#sidebar {
    overflow-y: auto;
    min-width: 150px !important;
}

#sidebar.collapse:not(.show) {
    width: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

#mainContent {
    margin-top: 30px;
    overflow-y: auto;
    height: calc(100vh - 60px);
    /* iOS 滾動順暢 */
    -webkit-overflow-scrolling: touch;
    /* 扣掉固定 navbar 高度 */
    padding-bottom: 60px;
    /* ✅ 預留底部空間 */
}

#mainContent .container-fluid {
    margin-top: 30px;
    max-width: 1600px !important;
}

/* 讓ios鍵盤開啟後不會推擠layout重要css */
body.keyboard-open {
    position: fixed;
    /* 鎖定頁面防止擠壓 */
    width: 100%;
    top: var(--scroll-top);
    /* 通過 JS 動態設置 */
}

@media (max-width: 991px) {
    #mainContent .container-fluid {
        padding: 0.75rem;
    }
}