.form-main {
    position: relative;
}
.text-err {
    position: absolute;
    color: red;
    font-size: 12px;
    font-style: italic;
    left: 5px;
}

.section-popup {
    position: fixed;
    inset: 0;
    z-index: 1065;
    display: none;
    padding: 24px;
    background: rgba(15, 23, 42, 0.48);
}

.section-popup .container {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-popup {
    position: relative;
    width: min(100%, 460px);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    padding: 30px;
    text-align: center;
}

.close-model {
    position: absolute;
    top: 14px;
    right: 16px;
    color: #64748b;
    font-size: 22px;
}

.title-model {
    margin: 0 24px 12px;
    color: #0f172a;
    font-size: 22px;
    font-weight: 800;
}

.body-model {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

.btn-model-wrapper {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.btn-back,
.btn-submit {
    min-width: 110px;
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: 700;
}

.btn-back {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #334155;
}

.btn-back:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #0f172a;
}

.btn-submit {
    background: #4361ee;
    border-color: #4361ee;
    color: #fff;
}

.btn-submit:hover {
    background: #304cd9;
    border-color: #304cd9;
}

.overlay-loader {
    position: fixed;
    inset: 0;
    z-index: 1070;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
}

.loading-text {
    border-radius: 999px;
    background: #152140;
    color: #fff;
    padding: 12px 20px;
    font-weight: 700;
}

.restaurant-category-table {
    width: 100% !important;
    table-layout: fixed;
}

.restaurant-category-table .col-no {
    width: 54px;
}

.category-table-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 14px;
    align-items: end;
    border: 1px solid rgba(151, 164, 194, 0.14);
    border-radius: 14px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.category-toolbar-search {
    position: relative;
    min-width: 0;
}

.category-toolbar-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
}

.category-toolbar-search input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #152140;
    padding: 10px 14px 10px 40px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}

.category-toolbar-search input:focus {
    border-color: #4361ee;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.category-toolbar-controls {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.category-toolbar-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.category-toolbar-field span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.category-toolbar-field select {
    min-width: 126px;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background-color: #fff;
    color: #152140;
    padding: 9px 34px 9px 12px;
    font-size: 13px;
    font-weight: 700;
    outline: none;
    transition: 0.2s;
}

.category-toolbar-field select:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.category-toolbar-length select {
    min-width: 78px;
}

.category-export-buttons {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.category-export-buttons .dt-buttons {
    display: flex;
    gap: 8px;
}

.category-export-btn {
    min-height: 44px;
    border: 1px solid rgba(67, 97, 238, 0.16) !important;
    border-radius: 10px !important;
    background: #eef2ff !important;
    color: #304cd9 !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 9px 14px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

.category-export-btn:hover {
    border-color: #4361ee !important;
    background: #4361ee !important;
    color: #fff !important;
}

.dashboard-panel-body {
    max-width: 100%;
    overflow: hidden;
}

.dashboard-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.dashboard-panel-head h2 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.dashboard-panel-head p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.btn-create {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 8px;
    background: #4361ee;
    color: #fff;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
}

.btn-create:hover {
    background: #304cd9;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge::before {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge.is-active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-badge.is-active::before {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-badge.is-inactive {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

.status-badge.is-inactive::before {
    background: #64748b;
}

.dataTables_wrapper {
    width: 100%;
    display: block;
    overflow: visible;
    margin-top: 24px;
    border: 1px solid rgba(151, 164, 194, 0.14);
    border-radius: 16px;
    background: #fff;
    padding: 20px;
}

.category-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 18px;
    width: 100%;
}

.category-table-footer .dataTables_info {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    padding-top: 0;
}

.category-table-footer .dataTables_paginate {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 0;
    float: none;
}

.category-table-footer .dataTables_paginate span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dataTables_wrapper
    .category-table-footer
    .dataTables_paginate
    .paginate_button {
    min-width: 34px;
    height: 34px;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #475569 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px !important;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    margin-left: 0;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease,
        color 0.15s ease;
}

.dataTables_wrapper
    .category-table-footer
    .dataTables_paginate
    .paginate_button.previous,
.dataTables_wrapper
    .category-table-footer
    .dataTables_paginate
    .paginate_button.next {
    min-width: 84px;
}

.dataTables_wrapper
    .category-table-footer
    .dataTables_paginate
    .paginate_button.current,
.dataTables_wrapper
    .category-table-footer
    .dataTables_paginate
    .paginate_button.current:hover {
    border-color: #4361ee !important;
    background: #4361ee !important;
    color: #fff !important;
}

.dataTables_wrapper
    .category-table-footer
    .dataTables_paginate
    .paginate_button:hover {
    border-color: #4361ee !important;
    background: #eef2ff !important;
    color: #304cd9 !important;
}

.dataTables_wrapper
    .category-table-footer
    .dataTables_paginate
    .paginate_button.disabled,
.dataTables_wrapper
    .category-table-footer
    .dataTables_paginate
    .paginate_button.disabled:hover,
.dataTables_wrapper
    .category-table-footer
    .dataTables_paginate
    .paginate_button.disabled:active {
    opacity: 0.5;
    pointer-events: none;
    border-color: #e2e8f0 !important;
    background: #f8fafc !important;
    color: #94a3b8 !important;
}

table.dataTable.no-footer {
    border-bottom: none;
}

table.dataTable thead th {
    border-bottom: 2px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    padding: 16px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    white-space: normal;
}

table.dataTable tbody td {
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    padding: 16px 20px;
    vertical-align: middle;
    font-size: 14px;
    white-space: normal;
}

table.dataTable tbody tr {
    background-color: #fff;
}

table.dataTable tbody tr:hover {
    background-color: #f8fafc !important;
}

.dataTables_length select,
.dataTables_filter input {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 12px;
    outline: none;
}

.dataTables_filter input:focus {
    border-color: #4361ee;
}

.category-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.cat-avatar {
    width: 44px;
    height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.img-full-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.table-number {
    color: #64748b;
    font-weight: 700;
}

.category-name {
    color: #152140;
    font-size: 15px;
    font-weight: 800;
}

.category-name-btn {
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    line-height: 1.35;
    transition: color 0.2s;
}

.category-name-btn:hover {
    color: #4361ee;
    text-decoration: underline;
}

.created-by-cell {
    color: #475569;
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.category-action-dropdown {
    position: relative;
}

.category-action-toggle {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.category-action-menu {
    min-width: 170px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    padding: 6px;
}

.category-action-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 600;
}

.category-action-menu .dropdown-item i {
    width: 16px;
    text-align: center;
}

.linked-count {
    color: #4361ee;
    font-weight: 600;
}

.linked-count span {
    color: #64748b;
    font-size: 12px;
    font-weight: 400;
}

.category-modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.category-modal-header {
    border-bottom: none;
    padding: 24px 32px 0;
}

.category-modal-title {
    color: #0f172a;
    font-size: 24px;
    font-weight: 800;
}

.category-modal-copy {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 14px;
}

.category-modal-close {
    align-self: flex-start;
    margin-top: 4px;
}

.category-modal-body {
    padding: 24px 32px;
}

.category-modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 20px 32px;
}

.category-form-label {
    color: #152140;
    font-size: 14px;
    font-weight: 700;
}

.category-form-control {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 16px;
}

.category-readonly-status {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    padding: 12px 16px;
}

.upload-box {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}

.upload-box:hover {
    border-color: #4361ee;
    background: #eff6ff;
}

.upload-box-icon {
    color: #94a3b8;
}

.upload-box-title {
    color: #152140;
    font-weight: 700;
}

.upload-box-copy {
    color: #94a3b8;
    font-size: 12px;
}

.image-preview-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: none;
    overflow: hidden;
    margin-top: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.image-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-remove-img {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
}

.btn-remove-img:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.category-btn-secondary,
.category-btn-primary {
    border-radius: 10px;
    padding: 10px 24px;
    font-weight: 700;
}

.category-btn-primary {
    border: none;
    background: #4361ee;
}
/* Category View
.category-view-layout {
    display: grid;
    grid-template-columns: minmax(180px, 240px) 1fr;
    gap: 24px;
    align-items: stretch;
}
 */
.category-view-media {
    min-height: 220px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 42px;
}

.category-view-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-view-detail {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 22px;
}

.category-view-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.category-view-label {
    margin: 0 0 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.category-view-head h3 {
    margin: 0;
    color: #0f172a;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.category-view-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.category-view-grid > div {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    padding: 14px;
}

.category-view-grid span {
    display: block;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.category-view-grid strong {
    color: #152140;
    font-size: 14px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

@media (max-width: 992px) {
    .restaurant-category-table {
        table-layout: auto;
    }

    .category-view-layout {
        grid-template-columns: 1fr;
    }

    .category-view-media {
        min-height: 190px;
    }

    .category-view-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dataTables_wrapper {
        padding: 0;
        border: none;
        background: transparent;
    }

    table.restaurant-category-table,
    table.restaurant-category-table thead,
    table.restaurant-category-table tbody,
    table.restaurant-category-table th,
    table.restaurant-category-table td,
    table.restaurant-category-table tr {
        display: block;
        width: 100% !important;
    }

    table.restaurant-category-table thead {
        display: none;
    }

    table.dataTable.restaurant-category-table tbody tr {
        margin-bottom: 14px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #fff;
        padding: 12px;
    }

    table.dataTable.restaurant-category-table tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        border-bottom: 1px solid #f1f5f9;
        padding: 10px 0;
        text-align: right;
    }

    table.dataTable.restaurant-category-table tbody td:last-child {
        border-bottom: 0;
    }

    table.dataTable.restaurant-category-table tbody td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 12px;
        font-weight: 800;
        text-align: left;
    }

    table.dataTable.restaurant-category-table tbody td:first-child {
        display: none;
    }

    table.dataTable.restaurant-category-table tbody td:first-child + td {
        align-items: flex-start;
        justify-content: flex-start;
        text-align: left;
    }

    table.dataTable.restaurant-category-table
        tbody
        td:first-child
        + td::before {
        display: none;
    }

    .category-cell {
        width: 100%;
    }

    .category-action-dropdown {
        margin-left: auto;
    }

    .category-modal-header,
    .category-modal-body,
    .category-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .category-view-head {
        flex-direction: column;
    }
}
