@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #FD6D32;
    --primary-dark: #e55a20;
    --primary-light: #fff5f0;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1f2937;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --sidebar-w: 260px;
    --header-h: 64px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); text-decoration: none; }

.page-wrapper { min-height: 100vh; }

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.page-brand {
    width: var(--sidebar-w);
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
}

.page-brand .link { display: flex; align-items: center; text-decoration: none; }
.page-brand .brand { font-size: 20px; font-weight: 700; color: var(--primary); }
.page-brand .brand-tip { color: var(--gray-800); font-weight: 600; }
.page-brand .brand-mini { display: none; font-size: 20px; font-weight: 700; color: var(--primary); }

.header .flexbox {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 100%;
}

.navbar-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-toolbar li { position: relative; }

.navbar-toolbar .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    color: var(--gray-600);
    transition: all 0.2s;
}

.navbar-toolbar .nav-link:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.navbar-toolbar .nav-link i { font-size: 18px; }

.sidebar-toggler { cursor: pointer; }

.dropdown-user .nav-link {
    width: auto;
    padding: 6px 12px;
    gap: 10px;
    background: var(--gray-50);
    border-radius: 50px;
}

.dropdown-user .nav-link img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
}

.dropdown-user .nav-link span { font-weight: 500; color: var(--gray-700); font-size: 13px; }
.dropdown-user .nav-link .fa-angle-down { font-size: 12px; color: var(--gray-400); }

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    margin-top: 8px;
    display: none;
    z-index: 1050;
}

.dropdown-menu.show, .show > .dropdown-menu { display: block; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--gray-700);
    font-size: 13px;
    transition: all 0.2s;
}

.dropdown-item i { width: 16px; color: var(--gray-400); }
.dropdown-item:hover { background: var(--primary-light); color: var(--primary); }
.dropdown-item:hover i { color: var(--primary); }
.dropdown-divider { height: 1px; background: var(--gray-200); margin: 8px 0; }

.notify-signal {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.page-sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 999;
    overflow-y: auto;
    overflow-x: hidden;
}

.page-sidebar::-webkit-scrollbar { width: 4px; }
.page-sidebar::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }

#sidebar-collapse { height: 100%; }

.admin-block {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, #ff8c5a 100%);
}

.admin-block img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    object-fit: cover;
}

.admin-block .admin-info { color: var(--white); }
.admin-block .font-strong { font-weight: 600; font-size: 14px; display: block; }
.admin-block small { opacity: 0.85; font-size: 12px; }

.side-menu {
    list-style: none;
    padding: 16px 12px;
    margin: 0;
}

.side-menu li { margin-bottom: 4px; }

.side-menu > li > a {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: var(--radius);
    color: var(--gray-600);
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s;
}

.side-menu > li > a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.side-menu > li > a.active,
.side-menu > li.active > a {
    background: linear-gradient(135deg, var(--primary) 0%, #ff8c5a 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(253, 109, 50, 0.3);
}

.sidebar-item-icon {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
    text-align: center;
    color: var(--gray-400);
    transition: color 0.2s;
}

.side-menu > li > a:hover .sidebar-item-icon { color: var(--primary); }
.side-menu > li > a.active .sidebar-item-icon,
.side-menu > li.active > a .sidebar-item-icon { color: var(--white); }

.nav-label { flex: 1; }

.side-menu .arrow { font-size: 12px; transition: transform 0.2s; }
.side-menu li.active > a .arrow { transform: rotate(-90deg); }

.nav-2-level {
    list-style: none;
    padding: 4px 0 4px 28px;
    margin: 0;
    display: none;
}

.side-menu li.active .nav-2-level { display: block; }

.nav-2-level a {
    display: block;
    padding: 8px 14px;
    color: var(--gray-500);
    font-size: 13px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.nav-2-level a:hover,
.nav-2-level a.active {
    background: var(--primary-light);
    color: var(--primary);
}

.content-wrapper {
    margin-left: var(--sidebar-w);
    margin-top: var(--header-h);
    padding: 24px;
    min-height: calc(100vh - var(--header-h));
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    background: transparent;
    font-size: 13px;
}

.breadcrumb-item { color: var(--gray-500); }
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item + .breadcrumb-item::before { content: '/'; padding: 0 8px; color: var(--gray-400); }

.page-content {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
    margin: 0;
}

.fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ibox {
    background: var(--white) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow) !important;
    margin-bottom: 24px !important;
    overflow: hidden !important;
    border: 1px solid var(--gray-200) !important;
}

.ibox .ibox,
.ibox-body .ibox {
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
}

.ibox.box-primary {
    border-top: 3px solid var(--primary);
}

.ibox.box-success {
    border-top: 3px solid var(--success);
}

.ibox.box-danger {
    border-top: 3px solid var(--danger);
}

.ibox.box-warning {
    border-top: 3px solid var(--warning);
}

.ibox.box-info {
    border-top: 3px solid var(--info);
}

.ibox-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
    border-bottom: 1px solid var(--gray-200);
    gap: 16px;
}

.ibox-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
    letter-spacing: -0.3px;
}

.ibox-tool {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ibox-body {
    padding: 0;
    background: var(--white);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

.btn-primary,
.btn-success,
.btn-info {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus,
.btn-info:hover,
.btn-info:focus {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover,
.btn-danger:focus {
    background: #dc2626;
    color: var(--white);
}

.btn-secondary,
.btn-default {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-default:hover,
.btn-default:focus {
    background: var(--gray-50);
    color: var(--gray-800);
}

.btn-rounded { border-radius: 50px; }

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-800);
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.form-control::placeholder { color: var(--gray-400); }

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.input-rounded { border-radius: 50px; }

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--gray-700);
}

.form-group { margin-bottom: 20px; }

.select2-container { width: 100% !important; }

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    min-height: 42px;
    padding: 4px 8px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 32px;
    color: var(--gray-800);
    padding-left: 4px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow { height: 40px; }

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: var(--primary);
}

.select2-dropdown {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.select2-container--default .select2-results__option { padding: 10px 12px; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--primary); }

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: var(--primary-light);
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 50px;
    padding: 4px 10px;
    font-size: 12px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--primary);
    margin-right: 6px;
}

.select2-container--open { z-index: 9999 !important; }

/* Override vendor: table.dataTable { margin-top:6px!important; border-collapse:separate!important } */
table.dataTable {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-collapse: collapse !important;
}
table.dataTable td,
table.dataTable th {
    box-sizing: border-box;
}

.table {
    width: 100%;
    background: var(--white);
    border-collapse: collapse !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.table-bordered,
.table-striped,
.table-hover {
    border: none !important;
}

.table-bordered td,
.table-bordered th,
.table-striped td,
.table-striped th {
    border: none !important;
}

.table thead th {
    padding: 10px 12px !important;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    background: var(--gray-50) !important;
    border-bottom: 1px solid var(--gray-200) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    position: relative;
    white-space: nowrap;
}

.table thead th:first-child {
    padding-left: 16px !important;
}

.table thead th:last-child {
    padding-right: 16px !important;
}

.table thead th.sorting,
.table thead th.sorting_asc,
.table thead th.sorting_desc {
    cursor: pointer;
    padding-right: 28px;
}

.table thead th.sorting:after,
.table thead th.sorting_asc:after,
.table thead th.sorting_desc:after {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.4;
    font-size: 12px;
}

.table thead th.sorting_asc:after,
.table thead th.sorting_desc:after {
    opacity: 1;
    color: var(--gray-800);
}

.table tbody td {
    padding: 10px 12px !important;
    font-size: 13px;
    color: var(--gray-800);
    background: var(--white) !important;
    border-bottom: 1px solid var(--gray-100) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    vertical-align: middle;
}

.table tbody td:first-child {
    padding-left: 16px !important;
}

.table tbody td:last-child {
    padding-right: 16px !important;
}

.table tbody tr:hover td {
    background: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none !important;
}

.table-striped tbody tr:nth-of-type(even) td {
    background: var(--white);
}

.table-striped tbody tr:nth-of-type(even):hover td,
.table-striped tbody tr:nth-of-type(odd):hover td {
    background: var(--gray-50);
}

/*
 * DataTables Override
 * JS outputs Bootstrap 4 pagination: ul.pagination > li.page-item > a.page-link
 * Vendor: div.dataTables_wrapper div.dataTables_paginate ul.pagination
 */

/* Wrapper */
div.dataTables_wrapper {
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Top row: length + search */
div.dataTables_wrapper > .row:first-child {
    margin: 0 !important;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Bottom row: info + pagination */
div.dataTables_wrapper > .row:last-child {
    margin: 0 !important;
    padding: 10px 16px;
    background: #fff;
    border-top: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Column sizing – only for toolbar rows (first-child = top, last-child = bottom) */
div.dataTables_wrapper > .row:first-child > div[class^="col-"],
div.dataTables_wrapper > .row:last-child > div[class^="col-"] {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    padding: 0;
}
div.dataTables_wrapper > .row:first-child > div[class^="col-"]:last-child,
div.dataTables_wrapper > .row:last-child > div[class^="col-"]:last-child {
    margin-left: auto;
}

/* Middle row (the table itself) – let columns take full width */
div.dataTables_wrapper > .row:nth-child(2) > div[class^="col-"] {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    padding: 0;
}

/* Length */
div.dataTables_wrapper div.dataTables_length {
    float: none;
    padding: 0;
}
div.dataTables_wrapper div.dataTables_length label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    font-weight: normal;
}
div.dataTables_wrapper div.dataTables_length select {
    width: auto;
    padding: 6px 24px 6px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7280' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") no-repeat right 6px center/10px;
    -webkit-appearance: none;
    appearance: none;
}

/* Search */
div.dataTables_wrapper div.dataTables_filter {
    float: none;
    padding: 0;
    text-align: right;
}
div.dataTables_wrapper div.dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    font-weight: normal;
}
div.dataTables_wrapper div.dataTables_filter input {
    display: inline-block;
    width: 200px;
    padding: 6px 10px 6px 32px;
    margin-left: 0;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 10px center;
}
div.dataTables_wrapper div.dataTables_filter input:focus {
    outline: none;
    border-color: #d1d5db;
}

/* Info */
div.dataTables_wrapper div.dataTables_info {
    float: none;
    padding: 0;
    font-size: 13px;
    color: #6b7280;
}

/* Pagination container */
div.dataTables_wrapper div.dataTables_paginate {
    float: none;
    margin: 0;
    padding: 0;
}
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
    margin: 0;
    gap: 6px;
    justify-content: flex-end;
}

/* Page buttons - Bootstrap 4: .page-item > .page-link */
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    margin: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    transition: all 0.15s;
}

/* Hover */
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item .page-link:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #1f2937;
}

/* Active */
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item.active .page-link {
    background: #FD6D32;
    border-color: #FD6D32;
    color: #fff;
}

/* Disabled */
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item.disabled .page-link {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #d1d5db;
    cursor: default;
}

/* Previous / Next */
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item:first-child .page-link,
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item:last-child .page-link {
    border-radius: 8px;
}

/* Processing */
div.dataTables_wrapper div.dataTables_processing {
    position: absolute;
    top: 50%;
    left: 50%;
    width: auto;
    margin: 0;
    transform: translate(-50%, -50%);
    padding: 16px 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-size: 13px;
    color: #6b7280;
}

/* Empty */
table.dataTable td.dataTables_empty {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
}

.table tbody tr.parent td {
    background: var(--white);
    border-bottom: none !important;
}

.table tbody tr.parent.shown td {
    background: var(--primary-light);
    border-bottom: none !important;
}

.table tbody tr.parent.shown td:first-child {
    border-left: 3px solid var(--primary);
}

.table tbody tr.child-row,
.table tbody tr.child {
    background: var(--gray-50) !important;
}

.table tbody tr.child-row td,
.table tbody tr.child td {
    background: transparent !important;
    padding: 0 !important;
    border-bottom: 1px solid var(--gray-200) !important;
}

.table tbody tr.child-row td:first-child,
.table tbody tr.child td:first-child {
    border-left: 3px solid var(--primary);
}

.child-row-content,
.child ul {
    padding: 20px 24px 20px 40px;
    margin: 0;
    list-style: none;
}

.child-row-content {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border-top: 1px dashed var(--gray-200);
}

.child li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--gray-200);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.child li:last-child {
    border-bottom: none;
}

.child li .dtr-title {
    font-weight: 600;
    color: var(--gray-600);
    min-width: 140px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.child li .dtr-data {
    color: var(--gray-800);
    font-size: 14px;
    flex: 1;
}

.detail-row {
    background: var(--gray-50);
}

.detail-row td {
    padding: 0 !important;
    background: transparent !important;
}

.detail-container {
    padding: 20px 24px;
    margin: 0 20px 0 40px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-200);
}

.detail-container .detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.detail-container .detail-header h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.detail-container .detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.detail-container .detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-container .detail-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
}

.detail-container .detail-value {
    font-size: 14px;
    color: var(--gray-800);
    font-weight: 500;
}

.btn-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.btn-expand:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-expand.expanded {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: rotate(180deg);
}

.btn-expand i,
.btn-expand .fa {
    transition: transform 0.2s ease;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
    position: relative;
    padding-left: 40px;
    cursor: pointer;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
    content: '+';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
    content: '-';
    background: var(--primary);
    color: var(--white);
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:hover:before {
    background: var(--primary-light);
    color: var(--primary);
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    border: none;
    background: transparent;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-action.edit:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.btn-action.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.table-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    object-fit: cover;
    border: 2px solid var(--gray-200);
}

.table-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
}

.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #ff8c5a 100%);
    border: none;
}

.modal-title { color: var(--white); font-weight: 600; font-size: 16px; }

.modal-header .close {
    color: var(--white);
    opacity: 0.8;
    text-shadow: none;
    font-size: 24px;
}

.modal-header .close:hover { opacity: 1; }

.modal-body { padding: 20px; }

.modal-footer {
    padding: 12px 20px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.badge {
    display: inline-flex;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 50px;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }

.f-25 { font-size: 16px; cursor: pointer; transition: transform 0.2s; }
.f-25:hover { transform: scale(1.1); }

.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-primary { color: var(--primary) !important; }
.text-muted { color: var(--gray-500) !important; }

.text-right { text-align: right; }
.text-center { text-align: center; }

.m-0 { margin: 0 !important; }
.m-t-10 { margin-top: 10px !important; }
.m-t-20 { margin-top: 20px !important; }
.m-b-10 { margin-bottom: 10px !important; }
.m-b-20 { margin-bottom: 20px !important; }
.m-r-5 { margin-right: 5px !important; }
.m-r-10 { margin-right: 10px !important; }
.m-l-5 { margin-left: 5px !important; }
.m-l-10 { margin-left: 10px !important; }
.p-20 { padding: 20px !important; }

.d-flex { display: flex !important; }
.d-block { display: block !important; }
.d-none { display: none !important; }
.flex-1 { flex: 1 !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }

.row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.col-md-6 { width: 50%; padding: 0 10px; }
.col-md-4 { width: 33.33%; padding: 0 10px; }
.col-md-12 { width: 100%; padding: 0 10px; }

.toast-success { background: var(--success) !important; }
.toast-error { background: var(--danger) !important; }
.toast-info { background: var(--info) !important; }
.toast-warning { background: var(--warning) !important; }

.theme-config { display: none !important; }

.dropdown-notification .dropdown-menu-media { width: 280px; }
.dropdown-menu-header { padding: 12px; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); }

.list-group-item {
    padding: 12px;
    border: none;
    border-bottom: 1px solid var(--gray-100);
}

.list-group-item:hover { background: var(--gray-50); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

.fade-in-up { animation: fadeInUp 0.3s ease; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== Dashboard Stat Cards ========== */
.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gray-300);
}

.stat-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card-info {
    flex: 1;
    min-width: 0;
}

.stat-card-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 4px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.stat-card-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    padding: 2px 6px;
}

.stat-card-change.up {
    color: #059669;
    background: rgba(16,185,129,0.1);
}

.stat-card-change.down {
    color: #dc2626;
    background: rgba(239,68,68,0.1);
}

.stat-card-change i {
    font-size: 10px;
}

@media (max-width: 991px) {
    .page-sidebar { left: -260px; transition: left 0.3s; }
    .page-sidebar.show { left: 0; }
    .content-wrapper { margin-left: 0; }
    .page-brand { width: auto; padding: 0 16px; }
    .page-brand .brand { font-size: 18px; }
}

@media (max-width: 768px) {
    .content-wrapper { padding: 16px; }
    .page-title { font-size: 20px; }
    .page-heading { flex-direction: column; align-items: flex-start; }
    .col-md-6, .col-md-4 { width: 100%; }
    .table thead th, .table tbody td { padding: 10px 12px; }
    .dropdown-user .nav-link span { display: none; }
}
