:root {
    --admin-font-family: "Poppins", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --admin-bg: #F9F9F9;
    --admin-surface: #ffffff;
    --admin-surface-soft: rgba(238, 219, 114, 0.18);
    --admin-border: rgba(49, 61, 24, 0.16);
    --admin-text: #363636;
    --admin-text-soft: rgba(49, 61, 24, 0.72);
    --admin-sidebar: #313D18;
    --admin-sidebar-hover: #3e4d1e;
    --admin-accent: #EEDB72;
    --admin-accent-deep: #d7bf4f;
    --admin-success: #313D18;
}

body,
button,
input,
select,
textarea,
.table,
.card,
.btn,
.form-control,
.form-select,
.dropdown-menu {
    font-family: var(--admin-font-family);
}

body {
    background: var(--admin-bg);
    color: var(--admin-text);
    font-size: 14px;
    line-height: 1.5;
}

.page-content {
    background: var(--admin-bg);
}

.page-title-box h4,
.page-title-box1 h4,
h5.modal-title,
.card-header h4,
.card-header h5,
.card-title,
.dashboard-main-card .number-value,
.reports-page .number-value {
    color: var(--admin-text);
    font-family: var(--admin-font-family);
}

.page-title-box h4,
.page-title-box1 h4 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.text-muted,
p.text-muted,
small.text-muted {
    color: var(--admin-text-soft) !important;
}

.text-primary {
    color: var(--admin-sidebar) !important;
}

#page-topbar,
.navbar-header {
    background: var(--admin-accent);
}

.navbar-logo-box {
    background: transparent;
}

#sidebar-btn {
    color: var(--admin-sidebar);
}

.sidebar-left {
    background: var(--admin-sidebar);
}

.sidebar-left .sidebar-menu,
.sidebar-left #sidebar-menu {
    background: var(--admin-sidebar);
}

.sidebar-left .user-info h4,
.sidebar-left .user-info small,
.sidebar-left #sidebar-menu ul li a,
.sidebar-left #sidebar-menu ul li a i {
    color: rgba(255, 255, 255, 0.92) !important;
}

.sidebar-left #sidebar-menu ul li a {
    font-size: 14px;
    font-weight: 500;
}

.sidebar-left #sidebar-menu ul li a:hover,
.sidebar-left #sidebar-menu ul li a.active,
.sidebar-left #sidebar-menu ul li.mm-active > a {
    background: var(--admin-sidebar-hover);
    color: #fff !important;
}

.sidebar-left #sidebar-menu .sub-menu li a {
    font-size: 13px;
}

.card,
.dash-cards,
.custom-card,
.reports-page .card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    box-shadow: 0 4px 16px rgba(48, 68, 18, 0.04);
}

.card-header,
.reports-page .card-header {
    background: var(--admin-surface);
    border-bottom: 1px solid var(--admin-border);
}

.card-header .card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--admin-text);
}

.create-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--admin-text);
}

.card-body1 .form-label,
.modal-body label.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--admin-text);
}

.card-body1 .form-control,
.modal-body .form-control {
    padding: 12px 14px;
    font-size: 14px;
    border: 1px solid rgba(49, 61, 24, 0.22);
    border-radius: 10px;
    background: #fff;
    color: var(--admin-text);
}

.card-body1 .form-control:focus,
.modal-body .form-control:focus {
    border-color: var(--admin-accent-deep);
    box-shadow: 0 0 0 0.2rem rgba(238, 219, 114, 0.24);
}

.custom-card {
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-surface);
    overflow: hidden;
}

.custom-card .card-header {
    background: var(--admin-surface);
    padding: 16px 20px;
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-text);
    font-size: 16px;
    font-weight: 700;
}

.custom-card .card-body,
.card-body1 {
    padding: 20px;
}

.radio-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--admin-text);
    border-bottom: 1px solid rgba(49, 61, 24, 0.08);
}

.radio-row:last-child {
    border-bottom: 0;
}

.custom-radio {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(49, 61, 24, 0.4);
    border-radius: 50%;
    position: relative;
    background: #fff;
}

.radio-row input:checked + .custom-radio {
    border-color: var(--admin-accent);
}

.radio-row input:checked + .custom-radio::after {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--admin-accent);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.user-tbl-bdy td {
    font-size: 14px;
    color: var(--admin-text);
    vertical-align: middle;
    padding-top: 16px;
    padding-bottom: 16px;
}

#usersTable {
    border-collapse: separate;
    border-spacing: 0;
}

#usersTable thead th {
    padding: 16px 14px;
}

#usersTable tbody tr {
    background: #fff;
}

#usersTable tbody tr:hover {
    background: rgba(238, 219, 114, 0.08);
}

.users-status-cell {
    min-width: 170px;
}

.users-actions-cell {
    min-width: 120px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.users-action-form {
    margin-right: 0;
}

.users-action-btn {
    min-height: 36px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    box-shadow: none;
    background: var(--admin-sidebar) !important;
    border: 1px solid var(--admin-sidebar) !important;
    color: #fff !important;
}

.users-action-btn-icon {
    width: 42px;
    min-width: 42px;
    padding: 8px 0;
    text-align: center;
}

.users-action-btn-toggle {
    min-width: 94px;
}

.users-status-select {
    min-width: 150px;
    max-width: 170px;
    min-height: 38px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(49, 61, 24, 0.18);
    background-color: #fff;
}

.users-status-select:hover,
.users-status-select:focus {
    border-color: rgba(49, 61, 24, 0.42) !important;
    background: #fff !important;
}

.users-action-btn-danger,
button.btn.btn-danger.btn-delete.users-action-btn-danger {
    width: 42px;
    min-width: 42px;
    padding: 8px 0;
    text-align: center;
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.22);
    color: #b42318;
    border-radius: 10px;
}

.users-action-btn-danger:hover,
button.btn.btn-danger.btn-delete.users-action-btn-danger:hover {
    background: #b42318;
    border-color: #b42318;
    color: #fff;
}

.dataTables_filter input {
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(49, 61, 24, 0.18) !important;
    padding: 10px 14px !important;
    color: var(--admin-text) !important;
    background: #fff !important;
}

.dataTables_filter input::placeholder {
    color: rgba(49, 61, 24, 0.45);
}

.dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    border: 1px solid rgba(49, 61, 24, 0.14) !important;
    background: #fff !important;
    color: var(--admin-text) !important;
}

.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover {
    background: var(--admin-accent) !important;
    border-color: var(--admin-accent) !important;
    color: var(--admin-sidebar) !important;
}

.dataTables_paginate .paginate_button:hover {
    background: rgba(238, 219, 114, 0.2) !important;
    border-color: rgba(49, 61, 24, 0.16) !important;
    color: var(--admin-sidebar) !important;
}

.dataTables_length select {
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(49, 61, 24, 0.18);
}

#usersTable thead th,
table#offersTable thead th,
table#categoriesTable thead th,
table#withdrawTable thead th,
table.table thead th {
    background: var(--admin-sidebar) !important;
    color: #fff !important;
    border-color: var(--admin-sidebar) !important;
}

#usersTable thead th.sorting,
#usersTable thead th.sorting_asc,
#usersTable thead th.sorting_desc,
table#offersTable thead th.sorting,
table#offersTable thead th.sorting_asc,
table#offersTable thead th.sorting_desc,
table#categoriesTable thead th.sorting,
table#categoriesTable thead th.sorting_asc,
table#categoriesTable thead th.sorting_desc,
table#withdrawTable thead th.sorting,
table#withdrawTable thead th.sorting_asc,
table#withdrawTable thead th.sorting_desc,
table.table thead th.sorting,
table.table thead th.sorting_asc,
table.table thead th.sorting_desc {
    background: var(--admin-sidebar) !important;
    color: #fff !important;
}

#usersTable tbody td,
table#offersTable tbody td,
table#categoriesTable tbody td,
table#withdrawTable tbody td,
table.table tbody td {
    vertical-align: middle;
}

table#categoriesTable code {
    color: #b42318;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
}

table#categoriesTable a.btn.btn-warning,
table#categoriesTable a.btn.btn-warning.users-action-btn {
    background: rgba(238, 219, 114, 0.72) !important;
    border-color: rgba(238, 219, 114, 0.72) !important;
    color: var(--admin-sidebar) !important;
}

table#categoriesTable a.btn.btn-warning:hover,
table#categoriesTable a.btn.btn-warning.users-action-btn:hover {
    background: var(--admin-accent) !important;
    border-color: var(--admin-accent) !important;
    color: var(--admin-sidebar) !important;
}

table#withdrawTable a.btn.btn-info.btn-edit,
table#withdrawTable a.btn.btn-info.btn-edit.users-action-btn {
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--admin-sidebar) !important;
    border-color: var(--admin-sidebar) !important;
    color: #fff !important;
}

table#withdrawTable a.btn.btn-info.btn-edit:hover,
table#withdrawTable a.btn.btn-info.btn-edit.users-action-btn:hover,
table#withdrawTable a.btn.btn-info.btn-edit:focus {
    background: var(--admin-sidebar-hover) !important;
    border-color: var(--admin-sidebar-hover) !important;
    color: #fff !important;
}

table#offersTable .status-select {
    min-width: 170px;
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(49, 61, 24, 0.18) !important;
    background: #fff !important;
    color: var(--admin-text) !important;
    font-size: 13px;
    font-weight: 600;
    box-shadow: none !important;
}

table#offersTable .status-select:hover,
table#offersTable .status-select:focus {
    border-color: rgba(49, 61, 24, 0.42) !important;
    box-shadow: 0 0 0 0.2rem rgba(238, 219, 114, 0.24) !important;
}

table#offersTable a.btn.btn-info.btn-edit {
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--admin-sidebar) !important;
    border-color: var(--admin-sidebar) !important;
    color: #fff !important;
}

table#offersTable a.btn.btn-info.btn-edit:hover,
table#offersTable a.btn.btn-info.btn-edit:focus {
    background: var(--admin-sidebar-hover) !important;
    border-color: var(--admin-sidebar-hover) !important;
    color: #fff !important;
}

table#offersTable .badge.bg-info {
    background: rgba(238, 219, 114, 0.72) !important;
    color: var(--admin-sidebar) !important;
    border: 1px solid rgba(49, 61, 24, 0.08);
}

.badge.bg-danger {
    background: rgba(49, 61, 24, 0.12) !important;
    color: var(--admin-sidebar) !important;
}

.badge.bg-secondary {
    background: rgba(49, 61, 24, 0.12) !important;
    color: var(--admin-sidebar) !important;
}

.dash-cards {
    background: linear-gradient(180deg, var(--admin-surface-soft) 0%, var(--admin-surface) 100%);
}

.dash-cards p,
.reports-page .summary-row,
.table tbody td,
.table tbody th,
.dataTables_info,
.dataTables_length,
.dataTables_filter label {
    font-size: 14px;
    color: var(--admin-text);
}

.number-value {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.table thead th,
.reports-page .table thead th {
    background: var(--admin-sidebar);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: none;
}

.table tbody td {
    border-color: var(--admin-border);
}

.form-control,
.form-select,
.filter-dropdown {
    border: 1px solid rgba(49, 61, 24, 0.22);
    color: var(--admin-text);
    background: #fff;
    font-size: 14px;
    min-height: 42px;
}

.form-control:focus,
.form-select:focus,
.filter-dropdown:focus {
    border-color: var(--admin-accent-deep);
    box-shadow: 0 0 0 0.2rem rgba(238, 219, 114, 0.24);
}

.btn,
.user-btn.btn,
a.btn.btn-edit,
button.btn.edit-btn,
button.btn.btn-delete,
button.btn.btn-warning.btn-edit,
button.btn.btn-success.btn-edit,
a.btn.btn-info.btn-edit {
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
}

.btn-success,
.user-btn.btn,
.reports-page .btn-primary {
    background: var(--admin-sidebar);
    border-color: var(--admin-sidebar);
    color: #fff;
}

.btn-success:hover,
.user-btn.btn:hover,
.reports-page .btn-primary:hover {
    background: var(--admin-sidebar-hover);
    border-color: var(--admin-sidebar-hover);
}

.btn-primary,
a.btn.btn-primary,
button.btn.btn-primary {
    background: var(--admin-sidebar) !important;
    border-color: var(--admin-sidebar) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
a.btn.btn-primary:hover,
a.btn.btn-primary:focus,
button.btn.btn-primary:hover,
button.btn.btn-primary:focus {
    background: var(--admin-sidebar-hover) !important;
    border-color: var(--admin-sidebar-hover) !important;
    color: #fff !important;
}

.btn-secondary {
    background: rgba(49, 61, 24, 0.55);
    border-color: rgba(49, 61, 24, 0.55);
    color: #fff;
}

.btn-outline-primary,
a.btn.btn-edit,
a.btn.btn-info.btn-edit {
    border-color: var(--admin-sidebar);
    color: var(--admin-sidebar);
}

.btn-outline-primary:hover,
a.btn.btn-edit:hover,
a.btn.btn-info.btn-edit:hover {
    background: var(--admin-sidebar);
    border-color: var(--admin-sidebar);
    color: #fff;
}

.toggle-user-status-btn.btn-warning,
.toggle-user-status-btn.btn-success {
    background: var(--admin-sidebar);
    border-color: var(--admin-sidebar);
    color: #fff;
}

.toggle-user-status-btn.btn-warning:hover,
.toggle-user-status-btn.btn-success:hover {
    background: var(--admin-sidebar-hover);
    border-color: var(--admin-sidebar-hover);
    color: #fff;
}

.badge.bg-success {
    background: var(--admin-success) !important;
}

.badge.bg-warning,
.badge.text-dark {
    background: var(--admin-accent) !important;
    color: var(--admin-text) !important;
}

.badge.bg-info {
    background: rgba(238, 219, 114, 0.42) !important;
    color: var(--admin-sidebar) !important;
}

.dropdown-menu {
    border: 1px solid var(--admin-border);
}

#page-header-user-dropdown + .dropdown-menu .card {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(49, 61, 24, 0.12);
    box-shadow: 0 10px 28px rgba(49, 61, 24, 0.12);
}

#page-header-user-dropdown + .dropdown-menu .card-header,
#page-header-user-dropdown + .dropdown-menu .card-header.bg-primary {
    background: var(--admin-sidebar) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#page-header-user-dropdown + .dropdown-menu .card-header h6,
#page-header-user-dropdown + .dropdown-menu .card-header small {
    color: #fff !important;
}

#page-header-user-dropdown + .dropdown-menu .list-group-item {
    background: #fff;
    color: var(--admin-text);
    border-color: var(--admin-border);
    font-size: 14px;
}

#page-header-user-dropdown + .dropdown-menu .card-footer {
    background: #fff;
    border-top: 1px solid var(--admin-border);
}

#page-header-user-dropdown + .dropdown-menu .btn-label-danger {
    background: rgba(238, 219, 114, 0.24) !important;
    border: 1px solid rgba(49, 61, 24, 0.12) !important;
    color: var(--admin-sidebar) !important;
    border-radius: 10px;
    font-weight: 600;
    padding: 8px 16px;
}

#page-header-user-dropdown + .dropdown-menu .btn-label-danger:hover,
#page-header-user-dropdown + .dropdown-menu .btn-label-danger:focus {
    background: var(--admin-accent) !important;
    border-color: var(--admin-accent) !important;
    color: var(--admin-sidebar) !important;
}

.breadcrumb-item,
.breadcrumb-item a {
    font-size: 13px;
    color: var(--admin-text-soft);
}

.breadcrumb-item.active {
    color: var(--admin-text-soft);
}

.table-bordered > :not(caption) > * > * {
    border-color: var(--admin-border);
}

.card-header.d-flex,
.btn-div,
.table-toolbar,
.table-toolbar1,
.reports-filter,
.page-title-box,
.page-title-box1 {
    gap: 12px;
}

.card-header.d-flex,
.btn-div,
.reports-filter,
.page-title-box,
.page-title-box1 {
    flex-wrap: wrap;
}

.page-title-box .page-title-right,
.page-title-box1 .page-title-right {
    margin-left: auto;
}

@media (max-width: 767.98px) {
    .page-title-box .page-title-right,
    .page-title-box1 .page-title-right {
        display: none !important;
    }
}

.reports-filter .form-control,
.reports-filter .form-select {
    flex: 1 1 180px;
    min-width: 0;
}

.filter-wrapper {
    width: 100%;
    max-width: 180px;
}

.table-responsive,
.dataTables_wrapper {
    width: 100%;
}

.dataTables_wrapper .row {
    row-gap: 12px;
}

.w-md-50 {
    width: 100%;
}

.status-select {
    max-width: 220px;
}

@media (max-width: 991.98px) {
    .page-title-box h4,
    .page-title-box1 h4 {
        font-size: 26px;
    }

    .number-value {
        font-size: 28px;
    }

    .table-responsive,
    .dataTables_wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-content {
        overflow-x: hidden;
    }
}

@media (min-width: 768px) {
    .w-md-50 {
        width: 50%;
    }
}

@media (max-width: 767.98px) {
    .page-title-box h4,
    .page-title-box1 h4 {
        font-size: 22px;
    }

    .card-header .card-title {
        font-size: 16px;
    }

    .filter-wrapper,
    .reports-filter .form-control,
    .reports-filter .form-select,
    .reports-filter .btn {
        width: 100%;
        max-width: 100%;
    }

    .btn,
    .user-btn.btn,
    a.btn.btn-edit,
    button.btn.edit-btn,
    button.btn.btn-delete,
    button.btn.btn-warning.btn-edit,
    button.btn.btn-success.btn-edit,
    a.btn.btn-info.btn-edit {
        width: auto;
    }

    .status-select {
        max-width: 100%;
    }

    .breadcrumb {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .users-actions-cell {
        min-width: 120px;
        flex-wrap: wrap;
        white-space: normal;
    }

    .users-action-btn-toggle {
        min-width: 84px;
    }

    .users-status-select {
        min-width: 100%;
        max-width: 100%;
    }
}
