/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
    color: #ffffff !important;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Force styles to load */
.master-title {
    color: #ffffff !important;
    font-size: 32px !important;
    font-weight: 700 !important;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1003; /* Higher than main content */
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 20px;
    padding: 12px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1001; /* Increased z-index to stay on top */
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 30px 25px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-title {
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.mobile-close-btn {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.mobile-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Navigation Styles */
.sidebar-nav {
    flex: 1;
    padding: 0 20px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 200px);
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-list {
    list-style: none;
    padding-bottom: 20px;
}

.nav-item {
    margin-bottom: 8px;
}

.nav-section {
    margin: 20px 0 10px 0;
    padding: 0 20px;
}

.nav-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    text-decoration: none;
    color: #ffffff;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.nav-item.active .nav-link {
    background: linear-gradient(135deg, #2a2a3e 0%, #3a3a4e 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(4px);
}

.nav-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff 0%, #00ff88 100%);
    margin-right: 16px;
    flex-shrink: 0;
}

.nav-text {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
}

.active-badge {
    background: linear-gradient(135deg, #8b5cf6 0%, #00d4ff 100%);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    margin-top: 5px;
}

.user-info small {
    color: #00d4ff;
    font-size: 11px;
    font-weight: 500;
}

.app-name {
    font-size: 12px;
    color: #a0a0a0;
    font-weight: 400;
}

.reseller-btn {
    background: linear-gradient(135deg, #6b46c1 0%, #8b5cf6 100%);
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

.reseller-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.logout-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: #ffffff;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    text-decoration: none;
    color: #ffffff;
}

.logout-btn i {
    font-size: 12px;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Top Header Styles - Hidden since header is removed */
.top-header {
    display: none; /* Header removed, so hide these styles */
}

.header-left {
    display: none; /* Header removed */
}

.header-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.header-subtitle {
    font-size: 14px;
    color: #a0a0a0;
    margin: 0;
    font-weight: 400;
}

.header-center {
    display: none; /* Header removed */
}

.quick-actions-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.header-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-action-btn i {
    font-size: 12px;
    color: #00d4ff;
}

.header-right {
    display: none; /* Header removed */
}

.header-search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 8px 15px;
    transition: all 0.3s ease;
}

.header-search:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.search-input {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 14px;
    padding: 0;
    margin: 0;
    outline: none;
    width: 200px;
}

.search-input::placeholder {
    color: #a0a0a0;
}

.search-btn {
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: #00d4ff;
}

.header-notifications {
    position: relative;
}

.notification-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.notification-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.header-user {
    position: relative;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-dropdown:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff 0%, #00ff88 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 14px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

.user-role {
    font-size: 12px;
    color: #a0a0a0;
    font-weight: 400;
}

.dropdown-arrow {
    font-size: 12px;
    color: #a0a0a0;
    transition: transform 0.3s ease;
}

.user-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
}

.dropdown-item i {
    font-size: 14px;
    color: #00d4ff;
    width: 16px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.logout-item {
    color: #ff6b6b !important;
}

.logout-item:hover {
    background: rgba(255, 107, 107, 0.1) !important;
    color: #ff6b6b !important;
}

.logout-item i {
    color: #ff6b6b !important;
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    padding: 40px;
    padding-top: 40px; /* Removed header space since header is removed */
    transition: margin-left 0.3s ease;
    position: relative;
    z-index: 1002; /* Higher z-index to appear in front of sidebar */
    width: calc(100% - 280px); /* Ensure content doesn't exceed available space */
    max-width: calc(100% - 280px); /* Prevent content from overflowing */
}

.content-header {
    margin-bottom: 30px;
}

.content-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.content-subtitle {
    color: #a0a0a0;
    font-size: 16px;
}

.content-body {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .mobile-close-btn {
        display: block;
    }
    
    .sidebar-nav {
        max-height: calc(100vh - 150px);
        padding: 0 15px;
    }
    
    .sidebar-nav::-webkit-scrollbar {
        width: 4px;
    }
    
    /* Header responsive styles */
    .top-header {
        display: none; /* Header removed */
    }
    
    .header-title h1 {
        font-size: 20px;
    }
    
    .header-subtitle {
        font-size: 12px;
    }
    
    .header-center {
        display: none; /* Hide quick actions on mobile */
    }
    
    .header-search {
        display: none; /* Hide search on mobile */
    }
    
    .header-right {
        gap: 15px;
    }
    
    .user-dropdown {
        padding: 6px 12px;
        gap: 8px;
    }
    
    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .user-name {
        font-size: 13px;
    }
    
    .user-role {
        font-size: 11px;
    }
    
    .user-dropdown-menu {
        min-width: 180px;
        right: -10px;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-top: 20px; /* Removed header space since header is removed */
        width: 100%; /* Full width on mobile */
        max-width: 100%; /* Full width on mobile */
    }
    
    .sidebar-header {
        padding: 20px 25px 15px;
    }
    
    .dashboard-title {
        font-size: 24px;
    }
    
    .nav-link {
        padding: 14px 16px;
    }
    
    .nav-text {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
    }
    
    /* Header styles for very small screens */
    .top-header {
        display: none; /* Header removed */
    }
    
    .header-title h1 {
        font-size: 18px;
    }
    
    .header-subtitle {
        display: none; /* Hide subtitle on very small screens */
    }
    
    .user-dropdown {
        padding: 4px 8px;
        gap: 6px;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    .user-name {
        font-size: 12px;
    }
    
    .user-role {
        display: none; /* Hide role on very small screens */
    }
    
    .user-dropdown-menu {
        min-width: 160px;
        right: -15px;
    }
    
    .main-content {
        padding: 15px;
        padding-top: 15px; /* Removed header space since header is removed */
        width: 100%; /* Full width on very small screens */
        max-width: 100%; /* Full width on very small screens */
    }
    
    .content-body {
        padding: 20px;
    }
    
    .content-title {
        font-size: 28px;
    }
}

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
    display: block;
}

/* Smooth animations */
* {
    transition: all 0.3s ease;
}

/* Dashboard Content Styles */
.dashboard-grid {
    display: grid;
    gap: 30px;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00d4ff 0%, #00ff88 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
}

.stat-info h3 {
    font-size: 14px;
    color: #a0a0a0;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 20px;
}

.stat-change.positive {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.stat-change.negative {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

/* Quick Actions */
.quick-actions {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.quick-actions h2 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.action-btn i {
    font-size: 18px;
    color: #00d4ff;
}

/* Recent Activities */
.recent-activities {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-activities h2 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #8b5cf6 0%, #00d4ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #ffffff;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin: 0;
    line-height: 1.5;
}

.activity-content p:first-child {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 5px;
}

.activity-content p:nth-child(2) {
    color: #a0a0a0;
    font-size: 14px;
    margin-bottom: 8px;
}

.activity-time {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* Custom scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Responsive adjustments for dashboard */
@media (max-width: 768px) {
    .stats-section {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .action-btn {
        padding: 15px;
        font-size: 14px;
    }
    
    .activity-item {
        padding: 12px;
    }
    
    .activity-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .quick-actions,
    .recent-activities {
        padding: 20px;
    }
}

/* Master Management Styles - Moved to dashboard.php */

/* Navigation Tabs - Moved to dashboard.php */

/* Form Section - Moved to dashboard.php */

/* Preview Table - Moved to dashboard.php */

/* Responsive Design for Master Management - Moved to dashboard.php */

/* Message Display - Moved to dashboard.php */

/* Form Section Inner - Moved to dashboard.php */

/* Shipping Address and Form Actions - Moved to dashboard.php */

/* Responsive adjustments for new elements - Moved to dashboard.php */

/* Modal Styles - Moved to dashboard.php */

/* Modal Responsive - Moved to dashboard.php */

/* Categories Section Styles - Moved to dashboard.php */
/* All remaining dashboard CSS moved to dashboard.php */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box .search-input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 15px 10px 40px;
    color: #ffffff;
    font-size: 14px;
    width: 250px;
    transition: all 0.3s ease;
}

.search-box .search-input:focus {
    border-color: rgba(0, 212, 255, 0.5);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.search-box .search-input::placeholder {
    color: #a0a0a0;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: #a0a0a0;
    font-size: 14px;
    pointer-events: none;
}

.filter-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 15px;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    border-color: rgba(0, 212, 255, 0.5);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.filter-select option {
    background: #1a1a2e;
    color: #ffffff;
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 15px;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.refresh-btn i {
    font-size: 12px;
}

/* Categories Stats */
.categories-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-label {
    font-size: 12px;
    color: #a0a0a0;
    font-weight: 500;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.stat-value.active {
    color: #00ff88;
}

.stat-value.inactive {
    color: #ff6b6b;
}

/* Categories Table */
.categories-table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.categories-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.03);
}

.categories-table th {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-weight: 600;
    padding: 16px 12px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.categories-table td {
    color: #ffffff;
    padding: 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

.categories-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.category-name {
    font-weight: 600;
    color: #00d4ff;
}

.description-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.status-badge.inactive {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.actions-cell {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.edit-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.3);
    color: #00d4ff;
}

.delete-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.empty-cell {
    text-align: center;
    color: #a0a0a0;
    font-style: italic;
    padding: 40px 20px;
}

.empty-cell i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
    color: #666;
}

.loading-cell {
    text-align: center;
    color: #a0a0a0;
    padding: 40px 20px;
}

.loading-cell i {
    font-size: 20px;
    margin-right: 10px;
    color: #00d4ff;
}

/* Responsive Categories Section */
@media (max-width: 768px) {
    .categories-section {
        padding: 20px !important;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .filter-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-box .search-input {
        width: 100%;
    }
    
    .categories-stats {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .categories-table th,
    .categories-table td {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .description-cell {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .categories-section {
        padding: 15px !important;
    }
    
    .categories-stats {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .categories-table th,
    .categories-table td {
        padding: 10px 6px;
        font-size: 12px;
    }
    
    .action-btn {
        width: 28px;
        height: 28px;
        padding: 6px;
    }
}

/* Purchase Management Styles */
.purchase-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.purchase-header {
    margin-bottom: 30px;
}

.purchase-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.grn-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #00d4ff 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.grn-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.purchase-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.03);
    min-width: 1200px;
}

.items-table th {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-weight: 600;
    padding: 16px 12px;
    text-align: center;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.items-table td {
    color: #ffffff;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
    text-align: center;
}

.items-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.items-table .form-input,
.items-table .form-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 10px;
    color: #ffffff;
    font-size: 13px;
    width: 100%;
    min-width: 80px;
}

.items-table .form-input:focus,
.items-table .form-select:focus {
    border-color: rgba(0, 212, 255, 0.5);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1);
}

.line-total {
    font-weight: 600;
    color: #00d4ff;
}

.table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.totals {
    font-size: 1.4rem;
    font-weight: 700;
    color: #00d4ff;
    text-align: right;
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.payment-section,
.ledger-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #00d4ff;
}

.total-display {
    background: linear-gradient(135deg, #8b5cf6 0%, #00d4ff 100%);
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.ledger-balance {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.balance-item {
    flex: 1;
}

.balance-item.credit .form-input {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    color: #00ff88;
}

.balance-item.debit .form-input {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #00d4ff 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
    padding: 8px 12px;
    font-size: 12px;
}

.btn-danger:hover {
    background: rgba(255, 107, 107, 0.3);
    transform: translateY(-1px);
}

/* Autocomplete Styles */
.autocomplete {
    position: relative;
    display: inline-block;
    width: 100%;
}

.autocomplete-items {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    max-height: 200px;
    overflow-y: auto;
    border-radius: 0 0 8px 8px;
}

.autocomplete-items div {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff;
    transition: background 0.3s ease;
}

.autocomplete-items div:hover {
    background: rgba(255, 255, 255, 0.08);
}

.autocomplete-active {
    background: rgba(0, 212, 255, 0.2) !important;
    color: #00d4ff !important;
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
}

/* Responsive Purchase Styles */
@media (max-width: 768px) {
    .purchase-container {
        padding: 20px;
    }
    
    .purchase-title {
        font-size: 24px;
    }
    
    .section-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .table-actions {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .ledger-balance {
        flex-direction: column;
        gap: 10px;
    }
    
    .items-table {
        min-width: 800px;
    }
    
    .items-table th,
    .items-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .items-table .form-input,
    .items-table .form-select {
        padding: 6px 8px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .purchase-container {
        padding: 15px;
    }
    
    .purchase-title {
        font-size: 20px;
    }
    
    .grn-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .total-display {
        font-size: 1.2rem;
        padding: 12px 16px;
    }
    
    .totals {
        font-size: 1.1rem;
    }
}