/* Custom Layout Styles */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.nxl-navigation {
    width: 280px;
    min-height: 100vh;
    background: #fff;
    border-right: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
}

.nxl-navigation.collapsed {
    width: 70px;
}

.nxl-navigation.collapsed .nxl-mtext,
.nxl-navigation.collapsed .nxl-arrow,
.nxl-navigation.collapsed .nxl-caption {
    display: none;
}

.nxl-navigation.collapsed .nxl-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    width: 200px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0 4px 4px 0;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    margin-left: 280px;
    transition: all 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper.sidebar-collapsed {
    margin-left: 70px;
}

/* Header Styles */
.nxl-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 0.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Navigation Items */
.nxl-navbar {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nxl-item {
    margin: 0;
}

.nxl-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 4px;
    margin: 0.25rem 0.5rem;
}

.nxl-link:hover {
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
}

.nxl-link.active {
    background: #007bff;
    color: #fff;
}

.nxl-micon {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.nxl-mtext {
    flex: 1;
}

.nxl-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.nxl-item.active .nxl-arrow {
    transform: rotate(90deg);
}

/* Submenu Styles */
.nxl-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f8f9fa;
    border-radius: 4px;
    margin: 0 0.5rem 0.5rem 2rem;
    display: none;
}

.nxl-submenu .nxl-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin: 0.125rem 0;
}

.nxl-submenu .nxl-link:hover {
    background: #e9ecef;
}

.nxl-submenu .nxl-link.active {
    background: #007bff;
    color: #fff;
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 2rem;
    background: #f8f9fa;
}

/* Footer */
.footer {
    background: #fff;
    border-top: 1px solid #e9ecef;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* Mobile Responsiveness */
@media (max-width: 991.98px) {
    .nxl-navigation {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .nxl-navigation.collapsed {
        transform: translateX(0);
    }
    
    .content-wrapper {
        margin-left: 0;
    }
    
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    
    .mobile-overlay.active {
        display: block;
    }
}

/* Brand/Logo */
.b-brand {
    display: block;
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.logo {
    max-width: 100%;
    height: auto;
}

.logo-sm {
    display: none;
}

.nxl-navigation.collapsed .logo-lg {
    display: none;
}

.nxl-navigation.collapsed .logo-sm {
    display: block;
}

/* Card in Sidebar */
.nxl-navigation .card {
    margin: 1rem;
    border: 1px solid #e9ecef;
}

/* Utility Classes */
.wd-20 { width: 20px; }
.wd-100 { width: 100px; }
.wd-150 { width: 150px; }
.ht-5 { height: 5px; }
.ht-8 { height: 8px; }
.ht-10 { height: 10px; }

/* Avatar Styles */
.avatar-text {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #6c757d;
    color: #fff;
    border-radius: 50%;
}

.avatar-sm { width: 24px; height: 24px; font-size: 12px; }
.avatar-md { width: 32px; height: 32px; font-size: 14px; }
.avatar-lg { width: 48px; height: 48px; font-size: 18px; }

.avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Badge Styles */
.badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
}

/* Dropdown Styles */
.nxl-h-dropdown {
    min-width: 250px;
    padding: 0.5rem 0;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: #495057;
    text-decoration: none;
    display: block;
    transition: background 0.3s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    text-decoration: none;
    color: #495057;
}

/* Search Styles */
.search-form {
    padding: 1rem;
}

.search-input-field {
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0.5rem;
}

/* Notification Styles */
.notifications-item {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.notifications-item:last-child {
    border-bottom: none;
}

.notifications-desc {
    flex: 1;
}

.notifications-date {
    font-size: 0.875rem;
    color: #6c757d;
}

/* User Dropdown */
.nxl-user-dropdown .dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.user-avtar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Language Selector */
.language_select {
    margin-bottom: 0.5rem;
}

.language_select a {
    color: #495057;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.language_select a:hover {
    background: #f8f9fa;
    text-decoration: none;
}

.language_select.active a {
    background: #007bff;
    color: #fff;
}

/* Responsive Utilities */
@media (max-width: 575.98px) {
    .header-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-right {
        justify-content: center;
    }
    
    .footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Table Styles - Fix alignment issues */
.table {
    margin-bottom: 0;
    width: 100%;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table th,
.table td {
    vertical-align: middle;
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Card Styles */
.card {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1rem;
}

.card-body {
    padding: 1rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

/* Page Header Styles */
.page-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
}

.page-header-title h5 {
    margin: 0;
    color: #495057;
    font-weight: 600;
}

.breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* Form Styles */
.form-control {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Button Styles */
.btn {
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Dropdown Styles */
.dropdown-menu {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: #495057;
    text-decoration: none;
    display: block;
    transition: background 0.3s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    text-decoration: none;
    color: #495057;
}

/* Avatar Styles */
.avatar-text {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #6c757d;
    color: #fff;
    border-radius: 50%;
}

.avatar-sm { width: 24px; height: 24px; font-size: 12px; }
.avatar-md { width: 32px; height: 32px; font-size: 14px; }
.avatar-lg { width: 48px; height: 48px; font-size: 18px; }
.avatar-xl { width: 64px; height: 64px; font-size: 24px; }

.avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Utility Classes */
.wd-7 { width: 7px; }
.wd-20 { width: 20px; }
.wd-30 { width: 30px; }
.wd-100 { width: 100px; }
.wd-150 { width: 150px; }
.ht-5 { height: 5px; }
.ht-7 { height: 7px; }
.ht-8 { height: 8px; }
.ht-10 { height: 10px; }

.fs-11 { font-size: 0.6875rem; }
.fs-12 { font-size: 0.75rem; }
.fs-13 { font-size: 0.8125rem; }
.fs-20 { font-size: 1.25rem; }
.fs-24 { font-size: 1.5rem; }

.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }
.fw-bolder { font-weight: 800; }

/* Responsive Table */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
    
    .page-header {
        padding: 0.75rem;
    }
    
    .page-header-right-items-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }
}
