html, body {
    height: 100%;
}

body {
    height: 100vh;
    overflow: hidden;
}

*::-webkit-scrollbar {
    width: 4px;
}

*::-webkit-scrollbar-thumb {
    background: #FE6225;
    border-radius: 10px;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #3A4050 !important;
}

.sidebar .offcanvas-body {
    flex-grow: 1;
    height: 100%;
    overflow-y: auto;
}

.offcanvas-body {
}

.main-content {
    flex: 1;
    min-width: 0;

    height: 100vh;
    /*overflow-y: auto;*/
}

.offcanvas-body > .row:last-child {
    /*margin-top: auto;*/ /* чтобы профиль мог “дожиматься” вниз корректно */
}

@media (max-width: 991px) {
    body {
        display: block !important;
        overflow: auto;
        height: auto;
    }

    .sidebar {
        position: fixed;
        width: 260px;
        height: auto !important;
        overflow: visible !important;
        z-index: 1050;
    }

    .nav {
        margin: 0 !important;
    }

    .main-content {
        width: 100% !important;
        margin-left: 0 !important;
        min-width: 0;
    }
}

@media (min-width: 992px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 260px;
        z-index: 1050;
    }

    .main-content {
        margin-left: 260px;
        height: 100vh;
        overflow-y: auto;
        min-width: 0;
    }
}

.card-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.message-box {
    display: none;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.message-box.success {
    background: #e9f7ef;
    border-color: #b7e4c7;
}

.message-box.info {
    background: #e7f1ff;
    border-color: #b6d4fe;
}

.message-box.error {
    background: #fdecea;
    border-color: #f5c2c7;
}

.bg-primary {
    background: #FE6225 !important;
}

.border-primary {
    border-color: #FE6225 !important;
}

.btn-primary {
    border-color: #FE6225 !important;
    background: #FE6225 !important;
}

.btn-primary:hover {
    border-color: #f15a1f !important;
    background: #f15a1f !important;
}

.btn-outline-primary {
    border-color: #FE6225 !important;
    color: inherit;
}

.btn-outline-primary:hover {
    border-color: #f15a1f !important;
    background: #f15a1f !important;
    color: #fff !important;
}

.btn-outline-primary.active {
    border-color: #f15a1f !important;
    background: #f15a1f !important;
    color: #fff !important;
}

.content-box h1 {
    font-size: 2.0rem;
}

.big-btn {
    font-size: 2rem;
}

.drop-zone {
    border: 2px dashed #aaa;
    padding: 20px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    -webkit-transition: all 0.2s ease-in-out 0s;
    -moz-transition: all 0.2s ease-in-out 0s;
    -o-transition: all 0.2s ease-in-out 0s;
    -ms-transition: all 0.2s ease-in-out 0s;
    transition: all 0.2s ease-in-out 0s;
}

.drop-zone.dragover {
    background: #f5f5f5;
    border-color: #333;
}

.drop-zone:hover {
    border: 2px dashed #FE6225;
    -webkit-transition: all 0.2s ease-in-out 0s;
    -moz-transition: all 0.2s ease-in-out 0s;
    -o-transition: all 0.2s ease-in-out 0s;
    -ms-transition: all 0.2s ease-in-out 0s;
    transition: all 0.2s ease-in-out 0s;
}

.codes-scroll {
    max-height: 210px;
    overflow-y: auto;
}

.codes-scroll .code-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-family: monospace;
    transition: background 0.2s;
    cursor: pointer;
    color: #fff;
}

.codes-scroll .client-code-item:hover {
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.codes-scroll .code-item.active-code {
    background: #FE6225;
    color: #fff;
}

.sidebar-block-title {
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: bold;
    border-bottom: 2px solid #30374b;
}

#branchBlock .map-link, #branchBlock .phone-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 1.2em;
}

#branchBlock .map-icon {
    width: 1em;
    height: 1em;
    object-fit: contain;
}

#branchBlock .address-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

#branchBlock .address-text {
    word-break: break-word;
}

#branchBlock .copy-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#branchBlock .copy-btn:hover {
    opacity: 0.7;
}

#branchBlock h5 {
    margin: 0;
}

#ordersAccordion .accordion-button {
    border-radius: 10px !important;
    border: 1px solid #FE6225;
}

/*Для выделения кодов клиента на странице Мои коды клиента*/
.client-code-card {
    border: 0;
    border-radius: 16px;
    transition: all .2s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.client-code-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

/* Выделение комментария к товару — виден и в свёрнутой карточке, и в раскрытых деталях */
.comment-highlight {
    display: inline-block;
    background: #fff3cd;
    color: #7a5b00;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.client-code {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FE6225 ;
    letter-spacing: 1px;
}

#pagination .btn {
    font-size: 1.2em;
}

.quick-action-card {
    transition: all .2s ease;
    border: none;
    color: inherit;
}

.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
}

.submenu {
    background-color: #4e5568 !important;
}