/* Modern visual treatment for the Brands index and reusable create/edit modals. */
.brand-page {
    min-height: calc(100vh - 50px);
    background: #f6f8fc;
}

.brand-page-header {
    padding: 24px 24px 16px;
}

.brand-page-heading,
.brand-modal-heading {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-page-icon,
.brand-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 13px;
    background: linear-gradient(145deg, #e9f2ff, #f4f8ff);
    color: #1769e8;
    font-size: 20px;
    box-shadow: inset 0 0 0 1px rgba(23, 105, 232, 0.08);
}

.brand-page-header h1 {
    margin: 0 0 4px;
    color: #172542;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.2;
}

.brand-page-header p {
    margin: 0;
    color: #758099;
    font-size: 13px;
}

.brand-page-content {
    padding: 0 24px 24px;
}

.brand-page .brand-card {
    margin: 0;
    overflow: visible;
    border: 1px solid #e5eaf2;
    border-top: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(22, 39, 75, 0.06);
}

.brand-page .brand-card > .box-header {
    min-height: 66px;
    padding: 19px 20px;
    border-bottom: 1px solid #edf0f5;
    border-radius: 12px 12px 0 0;
}

.brand-page .brand-card > .box-header .box-title {
    color: #263754;
    font-size: 17px;
    font-weight: 700;
    line-height: 28px;
}

.brand-card-tools {
    top: 14px !important;
    right: 18px !important;
}

.brand-add-button,
.brand-submit-button {
    min-height: 38px;
    padding: 9px 16px;
    border: 0;
    border-radius: 7px;
    background: linear-gradient(135deg, #2376ec, #1262df);
    box-shadow: 0 6px 14px rgba(23, 105, 232, 0.2);
    font-size: 12px;
    font-weight: 600;
}

.brand-add-button i,
.brand-submit-button i {
    margin-right: 5px;
}

.brand-add-button:hover,
.brand-add-button:focus,
.brand-submit-button:hover,
.brand-submit-button:focus {
    background: linear-gradient(135deg, #1268e7, #0d57cb);
    box-shadow: 0 8px 18px rgba(23, 105, 232, 0.26);
    color: #fff;
}

.brand-page .brand-card > .box-body {
    padding: 20px;
}

.brand-table-wrap {
    overflow: visible;
}

.brand-table.dataTable thead th:first-child {
    min-width: 220px;
}

.brand-table.dataTable thead th:nth-child(3),
.brand-table.dataTable tbody td:nth-child(3) {
    width: 135px;
    text-align: center;
}

.brand-table.dataTable thead th:nth-child(4) {
    min-width: 150px;
}

.brand-table.dataTable thead th:nth-child(5) {
    min-width: 145px;
}

.brand-table.dataTable thead th:last-child,
.brand-table.dataTable tbody td:last-child {
    width: 150px;
    text-align: center;
}

.brand-table.dataTable tbody td {
    vertical-align: middle;
}

.brand-product-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 48px;
    padding: 5px 9px;
    border-radius: 7px;
    background: #edf8f2;
    color: #248554;
    font-size: 11px;
    font-weight: 700;
}

.brand-product-count i {
    color: #2eae70;
}

/* Reusable create/edit modal. */
.brand-modal-dialog {
    width: min(560px, calc(100% - 30px));
    margin: 60px auto;
}

.brand-modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(10, 25, 55, 0.24);
}

.brand-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    padding: 16px 20px;
    border-bottom: 1px solid #e9edf4;
    background: #fff;
}

.brand-modal-header::before,
.brand-modal-header::after {
    display: none;
    content: none;
}

.brand-modal-heading {
    margin-right: auto;
    min-width: 0;
}

.brand-modal-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 11px;
    background: #eaf8f0;
    color: #1eae65;
    font-size: 17px;
}

.brand-modal-icon-edit {
    background: #eef3ff;
    color: #516fe8;
}

.brand-modal-heading .modal-title {
    margin: 0 0 3px;
    color: #172542;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
}

.brand-modal-heading p {
    margin: 0;
    color: #7b859a;
    font-size: 12px;
}

.brand-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    border-radius: 8px;
    background: #f4f6f9 !important;
    color: #536078;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    opacity: 1;
    text-shadow: none;
}

.brand-modal-close:hover,
.brand-modal-close:focus {
    background: #e9edf4 !important;
    color: #172542;
    opacity: 1;
}

.brand-modal-body {
    padding: 22px 22px 8px;
    background: #fbfcfe;
}

.brand-form-group {
    margin-bottom: 18px;
}

.brand-form-group > label {
    margin-bottom: 7px;
    color: #35435e;
    font-size: 12px;
    font-weight: 600;
}

.brand-input-wrap {
    position: relative;
}

.brand-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 2;
    color: #94a0b5;
    font-size: 13px;
    transform: translateY(-50%);
    pointer-events: none;
}

.brand-input-wrap .form-control {
    height: 42px;
    padding: 9px 12px 9px 38px;
    border: 1px solid #dfe5ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    color: #273650;
    font-size: 13px;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.brand-input-wrap .form-control:focus {
    border-color: #8bb3ee;
    box-shadow: 0 0 0 3px rgba(23, 105, 232, 0.09);
}

.brand-input-wrap:focus-within > i {
    color: #1769e8;
}

.brand-repair-option {
    margin: 3px 0 14px;
    padding: 12px 14px;
    border: 1px solid #e5eaf2;
    border-radius: 8px;
    background: #fff;
}

.brand-repair-option label {
    margin: 0;
    color: #45516a;
    font-size: 12px;
    font-weight: 500;
}

.brand-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 15px 20px;
    border-top: 1px solid #e9edf4;
    background: #fff;
}

.brand-modal-footer::before,
.brand-modal-footer::after {
    display: none;
}

.brand-cancel-button {
    min-height: 38px;
    margin: 0 !important;
    padding: 9px 16px;
    border: 1px solid #dfe5ef;
    border-radius: 7px;
    background: #fff;
    color: #56627a;
    font-size: 12px;
    font-weight: 600;
}

.brand-cancel-button:hover,
.brand-cancel-button:focus {
    border-color: #ccd4e1;
    background: #f5f7fa;
    color: #273650;
}

.brand-submit-button {
    margin: 0 !important;
}

@media (max-width: 767px) {
    .brand-page-header {
        padding: 18px 14px 12px;
    }

    .brand-page-header h1 {
        font-size: 22px;
    }

    .brand-page-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 11px;
        font-size: 17px;
    }

    .brand-page-content {
        padding: 0 12px 18px;
    }

    .brand-page .brand-card > .box-header {
        min-height: 62px;
        padding: 17px 14px;
    }

    .brand-page .brand-card > .box-header .box-title {
        max-width: calc(100% - 100px);
        font-size: 15px;
    }

    .brand-card-tools {
        right: 12px !important;
    }

    .brand-page .brand-card > .box-body {
        padding: 14px 12px;
    }

    .brand-modal-dialog {
        width: calc(100% - 20px);
        margin: 20px auto;
    }

    .brand-modal-header {
        padding: 14px;
    }

    .brand-modal-body {
        padding: 18px 14px 5px;
    }

    .brand-modal-footer {
        padding: 13px 14px;
    }
}
