/* Admin-specific styles */
:root {
    --primary-color: #4e73df;
    --secondary-color: #6c757d;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
    --body-color: #858796;
    --border-color: #e3e6f0;
    --white-color: #fff;
}

body.sb-nav-fixed {
    padding-top: 56px;
    background-color: #212529;
    color: #fff;
}

#layoutSidenav {
    display: flex;
}

#layoutSidenav_nav {
    width: 225px;
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    z-index: 1038;
}

.sb-nav-fixed #layoutSidenav_nav {
    width: 225px;
    height: 100vh;
    position: fixed;
    top: 56px;
    left: 0;
}

.sb-nav-fixed #layoutSidenav_content {
    padding-left: 225px;
    top: 56px;
}

.sb-sidenav {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-wrap: nowrap;
}

.sb-sidenav-dark {
    background-color: #212529;
    color: rgba(255, 255, 255, 0.5);
}

.sb-sidenav-dark .sb-sidenav-menu .nav-link {
    color: rgba(255, 255, 255, 0.5);
}

.sb-sidenav-dark .sb-sidenav-menu .nav-link:hover {
    color: rgba(255, 255, 255, 0.75);
}

.sb-sidenav-dark .sb-sidenav-menu .nav-link.active {
    color: #fff;
}

.sb-sidenav-menu-heading {
    padding: 1.75rem 1rem 0.75rem;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.admin-card {
    margin-bottom: 1rem;
    box-shadow: 0 0.125rem 0.5rem 0 rgba(58, 59, 69, 0.15);
    border: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

/* Dark mode specific styles */
[data-bs-theme="dark"] .admin-card {
    background-color: #2d3238; /* Slightly lighter than the background */
}

[data-bs-theme="dark"] .admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.75rem 0 rgba(58, 59, 69, 0.2);
    background-color: #30353d; /* Even lighter on hover */
}

/* Light mode specific styles */
[data-bs-theme="light"] .admin-card {
    background-color: #f8f9fa; /* Light gray background */
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 0.25rem 1rem 0 rgba(58, 59, 69, 0.15);
}

[data-bs-theme="light"] .admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.75rem 0 rgba(58, 59, 69, 0.15);
    background-color: #ffffff; /* Pure white on hover */
}

/* Left border styles */
.border-left-primary {
    border-left: 0.25rem solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 0.25rem solid var(--success-color) !important;
}

.border-left-info {
    border-left: 0.25rem solid var(--info-color) !important;
}

.border-left-warning {
    border-left: 0.25rem solid var(--warning-color) !important;
}

.border-left-danger {
    border-left: 0.25rem solid var(--danger-color) !important;
}

.border-left-secondary {
    border-left: 0.25rem solid var(--secondary-color) !important;
}

.border-left-dark {
    border-left: 0.25rem solid var(--dark-color) !important;
}

/* Soft background colors for icons - Dark Mode */
[data-bs-theme="dark"] .bg-primary-soft {
    background-color: rgba(78, 115, 223, 0.25);
}

[data-bs-theme="dark"] .bg-success-soft {
    background-color: rgba(28, 200, 138, 0.25);
}

[data-bs-theme="dark"] .bg-info-soft {
    background-color: rgba(54, 185, 204, 0.25);
}

[data-bs-theme="dark"] .bg-warning-soft {
    background-color: rgba(246, 194, 62, 0.25);
}

[data-bs-theme="dark"] .bg-danger-soft {
    background-color: rgba(231, 74, 59, 0.25);
}

[data-bs-theme="dark"] .bg-secondary-soft {
    background-color: rgba(108, 117, 125, 0.25);
}

[data-bs-theme="dark"] .bg-dark-soft {
    background-color: rgba(90, 92, 105, 0.25);
}

/* Soft background colors for icons - Light Mode */
[data-bs-theme="light"] .bg-primary-soft {
    background-color: rgba(78, 115, 223, 0.15);
}

[data-bs-theme="light"] .bg-success-soft {
    background-color: rgba(28, 200, 138, 0.15);
}

[data-bs-theme="light"] .bg-info-soft {
    background-color: rgba(54, 185, 204, 0.15);
}

[data-bs-theme="light"] .bg-warning-soft {
    background-color: rgba(246, 194, 62, 0.15);
}

[data-bs-theme="light"] .bg-danger-soft {
    background-color: rgba(231, 74, 59, 0.15);
}

[data-bs-theme="light"] .bg-secondary-soft {
    background-color: rgba(108, 117, 125, 0.15);
}

[data-bs-theme="light"] .bg-dark-soft {
    background-color: rgba(90, 92, 105, 0.15);
}

/* Card icon styling */
.card-icon-container {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.card-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.admin-card:hover .card-icon {
    transform: scale(1.1);
}

.card-icon::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-card:hover .card-icon::after {
    opacity: 1;
}

.card-icon i {
    font-size: 1.75rem;
    transition: transform 0.3s ease;
}

.admin-card:hover .card-icon i {
    transform: scale(1.1);
}

.card-header {
    background-color: #212529;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    color: #ffffff;
}

.card-header h6, .card-header h5 {
    margin-bottom: 0;
    color: #ffffff;
    font-weight: 600;
}

/* Light mode card header styling */
[data-bs-theme="light"] .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: #333333;
}

[data-bs-theme="light"] .card-header h6, 
[data-bs-theme="light"] .card-header h5 {
    color: #333333;
    text-shadow: none;
}

.admin-table {
    width: 100%;
    margin-bottom: 0;
    color: #fff;
    border-collapse: collapse;
    border: none;
    background-color: #212529;
}

.admin-table th,
.admin-table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border: none;
    color: #fff;
    font-size: 0.875rem;
}

.admin-table thead th {
    vertical-align: middle;
    border: none;
    background-color: #2c3e50;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 0.85rem 0.75rem;
}

.admin-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-table tbody tr:last-child {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.1);
}

.admin-table tbody + tbody {
    border-top: 2px solid var(--bs-border-color);
}

.btn-icon {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.template-editor {
    height: 400px;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.CodeMirror {
    height: 400px !important;
    border-radius: 0.25rem;
}

.breadcrumb {
    background-color: transparent;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
}

/* Template preview panel */
.template-preview {
    border: 1px solid var(--bs-border-color);
    padding: 1rem;
    border-radius: 0.25rem;
    margin-top: 1rem;
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

/* Additional admin dashboard styles */
.admin-panel {
    padding: 0.5rem 0;
}

.admin-card .card-body {
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
}

/* Dark mode card body styling */
[data-bs-theme="dark"] .admin-card .card-body {
    background: linear-gradient(145deg, rgba(45, 50, 56, 0.8) 0%, rgba(30, 33, 37, 0.95) 100%);
}

[data-bs-theme="dark"] .admin-card .card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Light mode card body styling */
[data-bs-theme="light"] .admin-card .card-body {
    background: linear-gradient(145deg, rgba(248, 249, 250, 0.9) 0%, rgba(255, 255, 255, 1) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-bs-theme="light"] .admin-card .card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 100% 100%, rgba(0, 0, 0, 0.01) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.admin-card .btn {
    margin-top: auto;
    position: relative;
    z-index: 2;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.admin-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.admin-card .card-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* Dark mode text styles */
[data-bs-theme="dark"] .admin-card .card-title {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #ffffff;
}

[data-bs-theme="dark"] .admin-card .card-text {
    color: rgba(255, 255, 255, 0.8);
}

/* Light mode text styles */
[data-bs-theme="light"] .admin-card .card-title {
    color: #333333;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

[data-bs-theme="light"] .admin-card .card-text {
    color: #6c757d;
}

.admin-card .card-text {
    margin-bottom: 0.75rem;
    flex-grow: 1;
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkpoint-btn {
    white-space: nowrap;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.35rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.h-100 {
    height: 100% !important;
}

/* Enhanced card color borders with gradients and improved visibility */
.border-left-primary {
    position: relative;
    border-left: none !important;
}

/* Dark mode border styles */
[data-bs-theme="dark"] .border-left-primary {
    box-shadow: 0 0.5rem 2rem 0 rgba(78, 115, 223, 0.25);
}

[data-bs-theme="dark"] .border-left-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 6px;
    background: linear-gradient(to bottom, #4e73df, #3a5fd9);
    border-radius: 6px 0 0 6px;
    box-shadow: 0 0 15px rgba(78, 115, 223, 0.5);
}

/* Light mode border styles */
[data-bs-theme="light"] .border-left-primary {
    box-shadow: 0 0.25rem 1rem 0 rgba(78, 115, 223, 0.15);
}

[data-bs-theme="light"] .border-left-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 6px;
    background: linear-gradient(to bottom, #4e73df, #3a5fd9);
    border-radius: 6px 0 0 6px;
    box-shadow: 0 0 8px rgba(78, 115, 223, 0.3);
}

.border-left-success {
    position: relative;
    border-left: none !important;
}

/* Dark mode success border */
[data-bs-theme="dark"] .border-left-success {
    box-shadow: 0 0.5rem 2rem 0 rgba(28, 200, 138, 0.25);
}

[data-bs-theme="dark"] .border-left-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 6px;
    background: linear-gradient(to bottom, #1cc88a, #13a56f);
    border-radius: 6px 0 0 6px;
    box-shadow: 0 0 15px rgba(28, 200, 138, 0.5);
}

/* Light mode success border */
[data-bs-theme="light"] .border-left-success {
    box-shadow: 0 0.25rem 1rem 0 rgba(28, 200, 138, 0.15);
}

[data-bs-theme="light"] .border-left-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 6px;
    background: linear-gradient(to bottom, #1cc88a, #13a56f);
    border-radius: 6px 0 0 6px;
    box-shadow: 0 0 8px rgba(28, 200, 138, 0.3);
}

.border-left-info {
    position: relative;
    border-left: none !important;
}

/* Dark mode info border */
[data-bs-theme="dark"] .border-left-info {
    box-shadow: 0 0.5rem 2rem 0 rgba(54, 185, 204, 0.25);
}

[data-bs-theme="dark"] .border-left-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 6px;
    background: linear-gradient(to bottom, #36b9cc, #2a9aaa);
    border-radius: 6px 0 0 6px;
    box-shadow: 0 0 15px rgba(54, 185, 204, 0.5);
}

/* Light mode info border */
[data-bs-theme="light"] .border-left-info {
    box-shadow: 0 0.25rem 1rem 0 rgba(54, 185, 204, 0.15);
}

[data-bs-theme="light"] .border-left-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 6px;
    background: linear-gradient(to bottom, #36b9cc, #2a9aaa);
    border-radius: 6px 0 0 6px;
    box-shadow: 0 0 8px rgba(54, 185, 204, 0.3);
}

.border-left-warning {
    position: relative;
    border-left: none !important;
}

/* Dark mode warning border */
[data-bs-theme="dark"] .border-left-warning {
    box-shadow: 0 0.5rem 2rem 0 rgba(246, 194, 62, 0.25);
}

[data-bs-theme="dark"] .border-left-warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 6px;
    background: linear-gradient(to bottom, #f6c23e, #e8b423);
    border-radius: 6px 0 0 6px;
    box-shadow: 0 0 15px rgba(246, 194, 62, 0.5);
}

/* Light mode warning border */
[data-bs-theme="light"] .border-left-warning {
    box-shadow: 0 0.25rem 1rem 0 rgba(246, 194, 62, 0.15);
}

[data-bs-theme="light"] .border-left-warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 6px;
    background: linear-gradient(to bottom, #f6c23e, #e8b423);
    border-radius: 6px 0 0 6px;
    box-shadow: 0 0 8px rgba(246, 194, 62, 0.3);
}

.border-left-danger {
    position: relative;
    border-left: none !important;
}

/* Dark mode danger border */
[data-bs-theme="dark"] .border-left-danger {
    box-shadow: 0 0.5rem 2rem 0 rgba(231, 74, 59, 0.25);
}

[data-bs-theme="dark"] .border-left-danger::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 6px;
    background: linear-gradient(to bottom, #e74a3b, #d6392a);
    border-radius: 6px 0 0 6px;
    box-shadow: 0 0 15px rgba(231, 74, 59, 0.5);
}

/* Light mode danger border */
[data-bs-theme="light"] .border-left-danger {
    box-shadow: 0 0.25rem 1rem 0 rgba(231, 74, 59, 0.15);
}

[data-bs-theme="light"] .border-left-danger::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 6px;
    background: linear-gradient(to bottom, #e74a3b, #d6392a);
    border-radius: 6px 0 0 6px;
    box-shadow: 0 0 8px rgba(231, 74, 59, 0.3);
}

.border-left-secondary {
    position: relative;
    border-left: none !important;
}

/* Dark mode secondary border */
[data-bs-theme="dark"] .border-left-secondary {
    box-shadow: 0 0.5rem 2rem 0 rgba(133, 135, 150, 0.25);
}

[data-bs-theme="dark"] .border-left-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 6px;
    background: linear-gradient(to bottom, #858796, #6c6e7a);
    border-radius: 6px 0 0 6px;
    box-shadow: 0 0 15px rgba(133, 135, 150, 0.5);
}

/* Light mode secondary border */
[data-bs-theme="light"] .border-left-secondary {
    box-shadow: 0 0.25rem 1rem 0 rgba(133, 135, 150, 0.15);
}

[data-bs-theme="light"] .border-left-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 6px;
    background: linear-gradient(to bottom, #858796, #6c6e7a);
    border-radius: 6px 0 0 6px;
    box-shadow: 0 0 8px rgba(133, 135, 150, 0.3);
}

.border-left-dark {
    position: relative;
    border-left: none !important;
}

/* Dark mode dark border */
[data-bs-theme="dark"] .border-left-dark {
    box-shadow: 0 0.5rem 2rem 0 rgba(90, 92, 105, 0.25);
}

[data-bs-theme="dark"] .border-left-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 6px;
    background: linear-gradient(to bottom, #5a5c69, #44454f);
    border-radius: 6px 0 0 6px;
    box-shadow: 0 0 15px rgba(90, 92, 105, 0.5);
}

/* Light mode dark border */
[data-bs-theme="light"] .border-left-dark {
    box-shadow: 0 0.25rem 1rem 0 rgba(90, 92, 105, 0.15);
}

[data-bs-theme="light"] .border-left-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 6px;
    background: linear-gradient(to bottom, #5a5c69, #44454f);
    border-radius: 6px 0 0 6px;
    box-shadow: 0 0 8px rgba(90, 92, 105, 0.3);
}

/* Admin form card styling */
.admin-form-card {
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    position: relative;
}

/* Dark mode admin form card */
[data-bs-theme="dark"] .admin-form-card {
    background: linear-gradient(145deg, rgba(45, 50, 56, 0.8) 0%, rgba(30, 33, 37, 0.95) 100%);
    box-shadow: 0 0.25rem 1.75rem 0 rgba(58, 59, 69, 0.3);
    border: none;
}

/* Light mode admin form card */
[data-bs-theme="light"] .admin-form-card {
    background: linear-gradient(145deg, rgba(248, 249, 250, 0.9) 0%, rgba(255, 255, 255, 1) 100%);
    box-shadow: 0 0.25rem 1rem 0 rgba(58, 59, 69, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Admin form card header */
.admin-form-card .card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

[data-bs-theme="dark"] .admin-form-card .card-header {
    background-color: rgba(33, 37, 41, 0.7);
}

[data-bs-theme="light"] .admin-form-card .card-header {
    background-color: rgba(248, 249, 250, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .admin-form-card .card-header h5,
[data-bs-theme="light"] .admin-form-card .card-header h6 {
    color: #333333;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Admin form card body */
.admin-form-card .card-body {
    padding: 1.75rem;
    position: relative;
    z-index: 1;
}

/* Form control styling */
.admin-form-card .form-control,
.admin-form-card .form-select {
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    transition: all 0.2s ease;
}

[data-bs-theme="dark"] .admin-form-card .form-control,
[data-bs-theme="dark"] .admin-form-card .form-select {
    background-color: rgba(30, 33, 37, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

[data-bs-theme="dark"] .admin-form-card .form-control:focus,
[data-bs-theme="dark"] .admin-form-card .form-select:focus {
    background-color: rgba(35, 38, 42, 0.9);
    border-color: rgba(78, 115, 223, 0.5);
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
}

[data-bs-theme="light"] .admin-form-card .form-control,
[data-bs-theme="light"] .admin-form-card .form-select {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #333333;
}

[data-bs-theme="light"] .admin-form-card .form-control:focus,
[data-bs-theme="light"] .admin-form-card .form-select:focus {
    background-color: #ffffff;
    border-color: rgba(78, 115, 223, 0.5);
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
}

/* Form label styling */
.admin-form-card .form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

[data-bs-theme="dark"] .admin-form-card .form-label {
    color: rgba(255, 255, 255, 0.9);
}

[data-bs-theme="light"] .admin-form-card .form-label {
    color: #444444;
}

/* Form check styling */
.admin-form-card .form-check-input {
    cursor: pointer;
}

[data-bs-theme="dark"] .admin-form-card .form-check-input {
    background-color: rgba(30, 33, 37, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .admin-form-card .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Form button styling */
.admin-form-card .btn {
    border-radius: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.admin-form-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}
/* Search bar styling */
.search-container {
    max-width: 400px;
    margin-bottom: 1rem;
}

/* Enhanced search styling for category pages */
#category-search-input {
    border-radius: 20px;
    padding-left: 15px;
    padding-right: 40px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

/* Dark mode search input styles */
[data-bs-theme="dark"] #category-search-input {
    background-color: #2d3238;
    color: #fff;
    border-color: #444;
}

[data-bs-theme="dark"] #category-search-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
    border-color: rgba(78, 115, 223, 0.5);
    background-color: #30353d;
}

/* Light mode search input styles */
[data-bs-theme="light"] #category-search-input {
    background-color: #fff;
    color: #333;
    border-color: #ced4da;
}

[data-bs-theme="light"] #category-search-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
    border-color: rgba(78, 115, 223, 0.5);
}

/* No results message styling */
.no-results-message {
    margin-top: 1.5rem;
    text-align: center;
    padding: 1.5rem;
    border-radius: 8px;
}

/* Dark mode no results styling */
[data-bs-theme="dark"] .no-results-message {
    background-color: #2d3238;
    border: 1px solid #444;
    box-shadow: 0 0.25rem 1.75rem 0 rgba(0, 0, 0, 0.2);
    color: #fff;
}

/* Light mode no results styling */
[data-bs-theme="light"] .no-results-message {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    box-shadow: 0 0.25rem 1rem 0 rgba(0, 0, 0, 0.1);
    color: #333;
}

/* ===================================
   ADMIN ORDERS PAGE - SPECIFIC STYLES
   =================================== */

/* Hide footer on admin orders page only */
body:has(.orders-table-container) .footer {
    display: none !important;
}

/* Header collapse animations */
.order-page-header {
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
    max-height: 500px;
    overflow: hidden;
}

.order-page-header.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* Table container - override Bootstrap's table-responsive overflow to allow sticky positioning */
.table-responsive.orders-table-container {
    overflow-x: visible !important;
    overflow-y: visible !important;
    position: relative;
}

/* Ensure table takes full width */
.orders-table-container table {
    width: 100%;
}

/* Bulk actions collapse animation */
.order-bulk-actions {
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    max-height: 100px;
    overflow: hidden;
}

.order-bulk-actions.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Orders card header collapse animation */
#ordersCardHeader {
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    max-height: 100px;
    overflow: hidden;
}

#ordersCardHeader.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Remove bottom margin to extend page to bottom */
.container-fluid.section-padding {
    margin-bottom: 0 !important;
    padding-bottom: 2rem !important;
}

/* Sticky table headers that stick to viewport - very specific selector to override Bootstrap */
.table-responsive.orders-table-container thead.table-light.orders-table-header,
.table-responsive.orders-table-container table thead.table-light.orders-table-header,
.orders-table-container thead.orders-table-header {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 80px !important;
    z-index: 1000 !important;
}

.orders-table-container thead.orders-table-header tr {
    background-color: #f8f9fa !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.orders-table-container thead.orders-table-header th {
    background-color: #f8f9fa !important;
    background-clip: padding-box !important;
}

/* Dark mode support */
[data-bs-theme="dark"] .orders-table-container thead.orders-table-header tr {
    background-color: #212529 !important;
}

[data-bs-theme="dark"] .orders-table-container thead.orders-table-header th {
    background-color: #212529 !important;
    color: #f8f9fa !important;
}

/* Override text-dark class in dark mode for header links and buttons */
[data-bs-theme="dark"] .orders-table-container thead.orders-table-header th .text-dark,
[data-bs-theme="dark"] .orders-table-container thead.orders-table-header th a.text-dark,
[data-bs-theme="dark"] .orders-table-container thead.orders-table-header th button.text-dark {
    color: #f8f9fa !important;
}

/* Also override Bootstrap's btn-link in dark mode */
[data-bs-theme="dark"] .orders-table-container thead.orders-table-header th .btn-link {
    color: #f8f9fa !important;
}

/* Dark mode styling for table body cells */
[data-bs-theme="dark"] .orders-table-container tbody tr {
    background-color: #212529 !important;
}

[data-bs-theme="dark"] .orders-table-container tbody tr:hover {
    background-color: #2c3034 !important;
}

[data-bs-theme="dark"] .orders-table-container tbody td {
    background-color: #212529 !important;
    color: #f8f9fa !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .orders-table-container tbody tr:hover td {
    background-color: #2c3034 !important;
}

/* Ensure text in table cells is visible in dark mode */
[data-bs-theme="dark"] .orders-table-container tbody td a {
    color: #6ea8fe !important;
}

[data-bs-theme="dark"] .orders-table-container tbody td .fw-bold {
    color: #f8f9fa !important;
}

/* Badge colors in dark mode should remain as-is */
[data-bs-theme="dark"] .orders-table-container tbody td .badge {
    /* Keep badge colors as defined */
}

