
:root {
    --topbar-bg: #3c8dbc;
    --topbar-border: #367fa9;
    --sidebar-bg: #1a2733;
    --sidebar-header-bg: #16202b;
    --sidebar-hover: #0f141b;
    --sidebar-active: #0c4d79;
    --sidebar-text: #e8edf5;
    --sidebar-muted: #8fa2b5;
    --content-bg: #ecf0f5;
    --card-bg: #ffffff;
    --card-border: #dfe5ec;
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.app-header {
    height: 60px;
    background-color: var(--topbar-bg);
    border-bottom: 3px solid var(--topbar-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    position: sticky;
    top: 0;
    z-index: 1000;
    color: #fff;
}
.rz-panel-menu .rz-navigation-menu .rz-navigation-item-wrapper {
    padding-left: 17px;
}
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding-right: 30px;
    gap: 16px;
}
.rz-sidebar-toggle{
    margin-right: 8px;
    background: transparent;
    border: 1px solid white;
    padding: 4px;
    color: white;
    font-size: 14px;
    border-radius: 5px;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
  
.app-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 500;
    color: #fff;
    width: 263px;
    border-right: 1px solid #dadada;
    line-height: 22px;
}

.app-brand i {
    height: 50px;
    width: 50px;
    background: #135981;
    border-radius: 5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0;
    border-radius: 5px;
}
.user_profile_top{
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding-left: 5px;

}
/* Header Back Button */
.header-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    margin-right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    margin-right: 30px;
}

.header-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
    transform: translateY(-1px);
}

.header-back-btn:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.15);
}

.header-back-btn .back-text {
    font-size: 13px;
}

.header-back-btn i {
    font-size: 16px;
}

@media (max-width: 768px) {
    .header-back-btn {
        display: none;
    }

}
.header-right img{
    width: 28px;
    height: 28px;
    border-radius: 5px;
}
.auth-hero-brand-mobile{
    text-align: center;
    border-bottom: 1px solid #d1d1d1;
    padding-bottom: 7px;
    margin-bottom: 8px;  
}
.auth-hero-brand-mobile img{
    width: 90px;
}
.app-header .rz-button,
.app-header .rz-profilemenu {
    color: #fff;
    border-radius: 5px!important;
}

.app-header .rz-button .rz-icon {
    color: #fff;
}

/* ============================================
   Sidebar - Left Menu (Single unified class)
   ============================================ */
.rz-tabview-nav{
    background: transparent;
    display: flex;
    gap: 10px;
}
.rz-tabview-nav li a{
    color: #1a1a1a !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    text-transform: capitalize !important;
    padding: 5px 14px !important;
}
.rz-tabview-nav li.rz-tabview-selected a{
    background: #167ac1;
    color: white !important;
}
.tab_content .tab_text p{
    font-size: 16px;
    margin-bottom: 7px;
}
.app-sidebar {
    position: sticky!important;
    top: 0; /* anchor to very top */
    height: 100vh;
    overflow-y: auto;
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 0;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.18);
    z-index: 100; /* Ensure sidebar is above content but below dialogs */
}

.app-sidebar .rz-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background-color: var(--sidebar-header-bg);
    color: var(--sidebar-text);
}


.app-sidebar .rz-panelmenu {
    padding: 8px 0 12px 0;
}

.app-sidebar .rz-panelmenu-item {
    margin: 2px 8px;
}

.app-sidebar .rz-panelmenu-item-link {
    padding: 12px 16px;
    border-radius: 6px;
    transition: background-color 0.18s ease, color 0.18s ease;
    color: var(--sidebar-text);
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    width: auto;
    max-width: 100%;
}

.app-sidebar .rz-panelmenu-item-link:hover {
    background-color: var(--sidebar-hover);
    color: #fff;
}

.app-sidebar .rz-panelmenu-item-link.rz-state-active {
    background-color: var(--sidebar-active);
    color: #fff;
    font-weight: 600;
}

.app-sidebar .rz-panelmenu-submenu {
    padding-left: 16px;
}

.app-sidebar .rz-panelmenu-submenu .rz-panelmenu-item-link {
    padding: 10px 20px;
    font-size: 0.875rem;
    color: var(--sidebar-muted);
}

.app-content {
    padding: 20px;
    background-color: var(--content-bg);
    width: 100%;
    flex: 1 1 auto;
}
.layout-shell {
    display: flex;
    background: var(--content-bg);
    padding: 0;
}
.rz-card {
    padding: 10px;
    border-radius: 10px;
}
.rz-card h4{
    font-weight: 600;
    color: #0f172a;
    font-size: 18px;
    margin-bottom: 14px;
}
.app-sidebar .rz-sidebar-header {
    position: sticky;
    top: 0;
    z-index: 2;
}
.content-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--card-border);
}

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #212121;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #e0e0e0;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .rz-tabview-nav {
        gap: 4px!important;
        flex-direction: column !important;
    }
    
    .app-brand {
        border: 0!important;
    }
    .app-content{
        padding-top: 42px!important;
    }
    .s_name {
        position: absolute;
        top: 60px;
        background: #033d6c;
        left: 0;
        right: 0;
        text-align: center;
        padding: 4px 0;
    }

    .user-info span:not(.user-role-badge) {
        display: none;
    }
    .app-brand {
        width: 100%;
    }
    .app-content {
        padding: 16px;
    }

    .layout-shell {
        position: relative;
        margin-bottom: 50px;
    }

    .app-sidebar.mobile-sidebar {
        position: fixed!important;
        top: 34px;
        left: 0;
        bottom: 0;
        height: 100%;
        z-index: 999;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease-in-out !important;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3) !important;
    }

    .app-sidebar.mobile-sidebar[aria-expanded="true"],
    .app-sidebar.mobile-sidebar.rz-sidebar-expanded {
        transform: translateX(0) !important;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 998;
        animation: fadeIn 0.3s ease-in-out;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }
}

/* ============================================
   Scrollbar Styling
   ============================================ */

.app-content::-webkit-scrollbar,
.app-sidebar::-webkit-scrollbar {
    width: 8px;
}

.app-content::-webkit-scrollbar-track,
.app-sidebar::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.app-content::-webkit-scrollbar-thumb,
.app-sidebar::-webkit-scrollbar-thumb {
    background: #bdbdbd;
    border-radius: 4px;
}

.app-content::-webkit-scrollbar-thumb:hover,
.app-sidebar::-webkit-scrollbar-thumb:hover {
    background: #9e9e9e;
}
.rz-badge {
    padding: 5px 8px !important;
    font-size: 12px !important;
    text-transform: capitalize;
    font-weight: 400 !important;
}
/* Common Page Card Styles */
.page-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin-bottom: 20px;
}

.page-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 12px;
    border-bottom: 1px solid #bcbcbc;
    background: #ffffff;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.page-card-header-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-card-header-title i {
    font-size: 18px;
    color: #495057;
}

.page-card-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.page-card-header-actions button{
    padding: 3px 8px;
    font-size: 14px;
}

.page-card-body {
    padding: 10px;
}

/* Page Grid Styling - Reusable for all data grids */
.page-grid {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.page-grid th {
    padding: 2px 2px !important;
}
.page-grid th .rz-column-title-content {
    font-size: 14px;
    font-weight: 600;
    color: #050505;
}
.rz-form-field {
    display: block;
}
.page-grid td {
    padding: 3px 6px;
    border-right: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}
.page-grid td .rz-cell-data{
    font-weight: 600;
    font-size: 13px;
    color: #050505;
}
.page-grid tr:hover {
    background-color: #f8f9fa;
}
.page-grid .rz-inputtext,
.page-grid .rz-dropdown {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
}
.rz-form-field-content{display:block;}
.page-grid .rz-inputtext:focus,
.page-grid .rz-dropdown:focus {
    border-color: #3b82f6;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}
.rz-grid-table-fixed {
    table-layout: auto;
}
.btn-sm{
    padding: 2px !important;
    min-height: auto;
    line-height: normal !important;
}
.btn-sm i{
    font-size: 13px !important;
}
.btn-success {
    color: #fff !important;
    background-color: #22c55e !important;
    border-color: #22c55e !important;
}

.btn-success:hover,
.btn-success:focus {
    color: #fff !important;
    background-color: #16a34a !important;
    border-color: #15803d !important;
}

.btn-primary {
    color: #fff !important;
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

.btn-primary:hover,
.btn-primary:focus {
    color: #fff !important;
    background-color: #2563eb !important;
    border-color: #1d4ed8 !important;
}

.btn-danger {
    color: #fff !important;
    background-color: #ef4444 !important;
    border-color: #ef4444 !important;
}

.btn-danger:hover,
.btn-danger:focus {
    color: #fff !important;
    background-color: #dc2626 !important;
    border-color: #b91c1c !important;
}

.btn-warning {
    color: #000 !important;
    background-color: #f59e0b !important;
    border-color: #f59e0b !important;
}

.btn-warning:hover,
.btn-warning:focus {
    color: #000 !important;
    background-color: #d97706 !important;
    border-color: #b45309 !important;
}

.btn-info {
    color: #fff !important;
    background-color: #06b6d4 !important;
    border-color: #06b6d4 !important;
}

.btn-info:hover,
.btn-info:focus {
    color: #fff !important;
    background-color: #0891b2 !important;
    border-color: #0e7490 !important;
}

.btn-secondary {
    color: #fff !important;
    background-color: #6b7280 !important;
    border-color: #6b7280 !important;
}

.btn-secondary:hover,
.btn-secondary:focus {
    color: #fff !important;
    background-color: #4b5563 !important;
    border-color: #374151 !important;
}

/* Responsive View Controls */
.desktop-view {
    display: block;
}

.mobile-view {
    display: none;
}
.main_title{
    font-size: 19px;
    margin-bottom: 17px;
    color: #2f2f2f;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}
.main_title i{
    font-size: 22px;
    color: #2f2f2f;
}
@media (max-width: 768px) {
    .desktop-view {
        display: none;
    }
    
    .mobile-view {
        display: block;
    }
    
    .thumbnail-card {
        border: 1px solid #dee2e6;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        transition: transform 0.2s, box-shadow 0.2s;
    }
    
    .thumbnail-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }
    
    .thumbnail-card .card-body {
        padding: 1rem;
    }
    
    .thumbnail-card .card-title {
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: #212529;
    }
    
    .thumbnail-card .card-text {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
}

/* Back Button Styles */
.back-button-container {
    padding: 0 1rem;
    margin-top: 1rem;
}

.back-button-container .back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: 1px solid #dee2e6;
    background-color: #fff;
    color: #495057;
    transition: all 0.2s ease;
}

.back-button-container .back-button:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    color: #212529;
}

.back-button-container .back-button i {
    font-size: 1rem;
}

/* Dashboard Stat Cards - Compact & Symmetrical Design */
.dashboard-stat-card {
    padding: 16px !important;
    border-radius: 12px !important;
    border: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: 100%;
    margin-bottom: 0;
    display: block;
    background: #ffffff;
}

.dashboard-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.stat-card-content {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.stat-icon .rz-icon {
    font-size: 24px !important;
}

.stat-details {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #475569;
    text-transform: none;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

/* Light Color Themes for Stat Cards */
.stat-card-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

.stat-card-info .stat-icon {
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
}

.stat-card-info .stat-label {
    color: #0c4a6e;
}

.stat-card-info .stat-value {
    color: #0369a1;
}

.stat-card-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.stat-card-warning .stat-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.stat-card-warning .stat-label {
    color: #92400e;
}

.stat-card-warning .stat-value {
    color: #b45309;
}

.stat-card-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.stat-card-success .stat-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.stat-card-success .stat-label {
    color: #065f46;
}

.stat-card-success .stat-value {
    color: #047857;
}

.stat-card-primary {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.stat-card-primary .stat-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.stat-card-primary .stat-label {
    color: #1e3a8a;
}

.stat-card-primary .stat-value {
    color: #1e40af;
}

.stat-card-secondary {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.stat-card-secondary .stat-icon {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.stat-card-secondary .stat-label {
    color: #1f2937;
}

.stat-card-secondary .stat-value {
    color: #374151;
}

.stat-card-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.stat-card-danger .stat-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.stat-card-danger .stat-label {
    color: #991b1b;
}

.stat-card-danger .stat-value {
    color: #b91c1c;
}

/* Responsive adjustments for stat cards */
@media (max-width: 768px) {
    .dashboard-stat-card {
        padding: 14px !important;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .stat-icon .rz-icon {
        font-size: 20px !important;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .stat-value {
        font-size: 24px;
    }
}