/* Bright Punjabi cultural theme - COMPACT VERSION */
* {
    box-sizing: border-box;
}

/* Theme-specific CSS variables */
body.theme-default {
    --primary-color: #FF4500; /* Orange */
    --secondary-color: #228B22; /* Green */
    --background-color: #FFD700; /* Gold */
    --text-color: #333333; /* Dark gray */
    --header-color: #FF4500; /* Orange */
    --footer-color: #FF4500; /* Orange */
}

body.theme-blue {
    --primary-color: #1E90FF; /* Dodger Blue */
    --secondary-color: #4169E1; /* Royal Blue */
    --background-color: #87CEEB; /* Sky Blue */
    --text-color: #333333; /* Dark gray */
    --header-color: #1E90FF; /* Dodger Blue */
    --footer-color: #1E90FF; /* Dodger Blue */
}

body.theme-red {
    --primary-color: #DC143C; /* Crimson */
    --secondary-color: #B22222; /* Fire Brick */
    --background-color: #FF6347; /* Tomato */
    --text-color: #FFFFFF; /* White */
    --header-color: #DC143C; /* Crimson */
    --footer-color: #DC143C; /* Crimson */
}

body.theme-green {
    --primary-color: #228B22; /* Forest Green */
    --secondary-color: #32CD32; /* Lime Green */
    --background-color: #90EE90; /* Light Green */
    --text-color: #333333; /* Dark gray */
    --header-color: #228B22; /* Forest Green */
    --footer-color: #228B22; /* Forest Green */
}

body.theme-white {
    --primary-color: #2F4F4F; /* Dark Slate Gray */
    --secondary-color: #708090; /* Slate Gray */
    --background-color: #FFFFFF; /* White */
    --text-color: #333333; /* Dark gray */
    --header-color: #2F4F4F; /* Dark Slate Gray */
    --footer-color: #2F4F4F; /* Dark Slate Gray */
}

/* Footer theme colors - Increased specificity */
body.theme-default footer {
    background-color: #FF4500; /* Orange */
    color: white;
}

body.theme-blue footer {
    background-color: #1E90FF; /* Dodger Blue */
    color: white;
}

body.theme-red footer {
    background-color: #DC143C; /* Crimson */
    color: white;
}

body.theme-green footer {
    background-color: #228B22; /* Forest Green */
    color: white;
}

body.theme-white footer {
    background-color: #2F4F4F; /* Dark Slate Gray */
    color: white;
}

html {
    overflow-x: hidden;
}

/* Ensure body has proper positioning context */
body {
    font-family: 'Noto Sans Gurmukhi', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.4;
    font-size: 14px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    /* Enable sticky positioning */
    height: auto;
    min-height: 100vh;
    position: relative; /* Ensure proper stacking context */
    /* Fix for header scrollable issue */
    overflow: auto;
}

header {
    background-color: var(--header-color);
    color: white;
    padding: 0 10px; /* Adjusted padding */
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 999999;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    isolation: isolate;
    overflow: visible;
    height: 60px; /* Consistent height */
    display: flex;
    align-items: center;
}

/* Sticky header class */
.header-sticky {
    position: -webkit-sticky !important; /* Safari support */
    position: sticky !important;
    top: 0 !important;
    z-index: 999999 !important; /* Maximum z-index for sticky header */
    /* Ensure proper sticky behavior */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    /* Add a subtle shadow to distinguish it when sticky */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    /* Ensure the header doesn't get cut off */
    width: 100%;
    box-sizing: border-box;
}

header h1 {
    margin: 0;
    font-size: 1.5em;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1002;
    isolation: isolate;
    overflow: visible;
    height: 100%;
    width: 100%;
}

.logo-img {
    height: 40px; /* Adjust as needed */
}

.main-nav {
    flex-grow: 1;
    text-align: center;
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
}

.nav-menu {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

.nav-menu li {
    margin: 0 8px;
}

.nav-menu li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

.nav-menu li a:hover {
    text-decoration: underline;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: all 0.3s ease;
}

main {
    padding: 10px; /* Reduced from 15px */
    max-width: 100%; /* Changed from 1200px to allow full width */
    margin: 0; /* Changed from 0 auto to remove centering */
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    /* Add scroll padding to account for sticky header */
    scroll-padding-top: 60px;
    position: relative; /* Ensure proper stacking context */
    z-index: 1; /* Ensure main content is below header and menu */
    /* Ensure main content doesn't interfere with header positioning */
    isolation: isolate;
    /* Fix for header scrollable issue */
    overflow: visible;
}

.frontpage-info, .about-us, .contact-us {
    text-align: center;
    background-color: #ffffff;
    padding: 10px; /* Reduced from 15px */
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    width: 100% !important; /* Ensure full width */
    max-width: none !important; /* Remove any max-width restrictions */
    margin: 0 !important; /* Remove any margin */
}

.explore-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 14px;
}

.explore-button:hover {
    background-color: #1B6B1B;
}

.akhan-list {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 column */
    gap: 8px; /* Reduced from 10px */
    padding: 0;
    list-style-type: none;
    width: 100% !important; /* Ensure full width */
    max-width: none !important; /* Remove any max-width restrictions */
    margin: 0 !important; /* Remove any margin */
}

.akhan-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 8px; /* Reduced from 10px */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: #fff;
}

.akhan-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.akhan-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.akhan-item a:hover {
    text-decoration: none;
    color: inherit;
}

.gurmukhi {
    font-size: 1.2em !important;
    color: #d9534f !important; /* Red for emphasis */
}

.gurmukhi_footer {
    font-size: 1.1em !important;
    color: #fafafa !important; /* Red for emphasis */
}

.gurmukhi_title {
    font-size: 1.2em !important;
    color: #ffffff !important; /* Red for emphasis */
}

.english_title {
    font-size: 1.2em !important;
    color: #ffffff !important; /* Red for emphasis */
}

.gurmukhi-meaning, .transliteration, .literal, .meaning, .english {
    font-size: 0.9em !important;
}

#pagination-controls {
    text-align: center;
    margin: 8px 0; /* Reduced from 10px */
}

#pagination-controls select, #pagination-controls button {
    padding: 6px 10px;
    margin: 3px;
    font-size: 0.9em;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

#pagination-controls button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Search Form Styles */
.search-form {
    margin: 8px 0; /* Changed from 10px auto to remove side margins */
    padding: 10px; /* Reduced from 15px */
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    width: 100%; /* Changed from max-width: 1200px to full width */
    box-sizing: border-box;
}

.search-form .search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.search-form label {
    font-weight: bold;
    white-space: nowrap;
    margin: 0;
    flex-shrink: 0;
    font-size: 0.9em;
}

.search-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.9em;
}

.search-form input[type="submit"] {
    padding: 8px 10px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
    white-space: nowrap;
    flex-shrink: 0;
    width: auto;
    min-width: 50px;
}

.search-form input[type="submit"]:hover {
    background-color: #1B6B1B;
}

.clear-search {
    display: inline-block;
    padding: 8px 12px;
    margin-top: 8px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9em;
}

.clear-search:hover {
    background-color: #E63900;
}

/* Akhan page heading center alignment */
.akhan-heading {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.3em;
}

form {
    max-width: 500px;
    margin: 8px auto; /* Reduced from 10px */
    width: 100%;
    box-sizing: border-box;
}

form label {
    display: block;
    margin: 4px 0 2px; /* Reduced from 5px 0 3px */
    font-size: 0.9em;
}

form input, form textarea, form select {
    width: 100%;
    padding: 5px; /* Reduced from 6px */
    margin-bottom: 6px; /* Reduced from 8px */
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.9em;
}

form input[type="submit"] {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 0.9em;
}

form input[type="submit"]:hover {
    background-color: #1B6B1B;
}

footer {
    background-color: var(--footer-color);
    color: white;
    text-align: center;
    padding: 20px 10px;
    position: relative;
    bottom: 0;
    width: 100%;
    font-size: 0.9em;
    line-height: 1.5;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Responsive Grid */
@media (min-width: 768px) {
    .akhan-list {
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 columns */
        gap: 10px; /* Reduced from 15px */
    }
}

@media (min-width: 1024px) {
    .akhan-list {
        grid-template-columns: repeat(3, 1fr); /* Desktop: 3 columns */
        gap: 10px; /* Reduced from 15px */
    }
}

/* Mobile Styles */
@media (max-width: 767px) {
    main {
        padding: 5px; /* Reduced from 10px */
    }
    .akhan-item {
        padding: 6px; /* Reduced from 8px */
    }
    .hamburger {
        display: flex;
        position: relative;
        z-index: 999999; /* Maximum z-index to ensure hamburger is above all content */
        /* Adjust hamburger positioning */
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin: 10px 0;
        /* Position relative to parent for menu positioning */
        position: relative;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        position: fixed;
        /* Position at bottom of hamburger toggle */
        top: 60px; /* Header height + hamburger position */
        right: -250px; /* Start off-screen, increased width */
        background-color: var(--header-color); /* Use theme color instead of hardcoded green */
        width: auto; /* Increased width for better usability */
        /* height: calc(100vh - 60px); /* Full height minus header height */
        box-shadow: -2px 0 10px rgba(0,0,0,0.3);
        z-index: 999999; /* Maximum z-index to ensure menu is above all content */
        transition: right 0.3s ease;
        padding: 0; /* Remove padding since we're positioning below header */
        isolation: isolate;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .nav-menu.active {
        display: flex;
        right: 0; /* Slide in from right */
    }
    .nav-menu li {
        margin: 0;
        text-align: right;
        padding: 0;
        width: 100%;
    }
    .nav-menu li a {
        display: block;
        padding: 15px 20px; /* Increased padding for better touch targets */
        color: white;
        text-decoration: none;
        font-weight: bold;
        font-size: 14px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        transition: background-color 0.2s ease;
    }
    .nav-menu li:last-child a {
        border-bottom: none;
    }
    .nav-menu li a:hover {
        background-color: rgba(255,255,255,0.1);
        text-decoration: none;
    }
    .header-container {
        flex-wrap: wrap;
        position: relative;
        overflow: visible;
        height: 60px; /* Explicit height */
        align-items: center;
    }
    /* Removed duplicate .main-nav definition - keeping only the main one */
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
    
    /* Mobile menu overlay to ensure it appears above all content */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 999998; /* Slightly lower than menu */
        isolation: isolate;
        overflow: hidden;
    }
    
    body.menu-open .mobile-menu-overlay {
        display: block;
    }
    
    /* Search form mobile styles - keep inline */
    .search-form {
        margin: 8px auto;
        padding: 8px;
    }
    .search-form .search-row {
        gap: 8px;
    }
    .search-form label {
        display: none;
    }
    .search-form input[type="text"] {
        min-width: unset;
        padding: 8px 10px;
    }
    .search-form input[type="submit"] {
        padding: 8px 8px;
    }
}

/* Table Styles - Consistent across all devices - FORCED UPDATE */
table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 15px 0 0 0 !important;
    border-radius: 5px 5px 0 0 !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-size: 0.9em !important;
}

th, td {
    padding: 10px !important;
    text-align: left !important;
    border-bottom: 1px solid #ddd !important;
    vertical-align: top !important;
    word-wrap: break-word !important;
    font-size: 0.9em !important;
}

th {
    background-color: var(--primary-color) !important;
    color: white !important;
    font-weight: bold !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

tr:hover {
    background-color: #f5f5f5 !important;
}

/* Action buttons in table - Consistent sizing */
td form {
    margin: 0 !important;
    display: inline !important;
}

td input[type="submit"] {
    padding: 6px 10px !important;
    margin: 2px !important;
    border: none !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    font-size: 0.8em !important;
    min-width: 50px !important;
}

td a {
    display: inline-block !important;
    padding: 6px 10px !important;
    margin: 2px !important;
    background-color: #007bff !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 3px !important;
    font-size: 0.8em !important;
    min-width: 50px !important;
    text-align: center !important;
}

td a:hover {
    background-color: #0056b3 !important;
}

/* Pagination */
.pagination {
    text-align: center;
    margin: 20px 0 15px 0;
    padding: 15px 0;
    border-top: 1px solid var(--primary-color);
    background-color: #f8f9fa;
    border-radius: 0 0 5px 5px;
}

.pagination a, .pagination strong {
    display: inline-block;
    padding: 10px 14px;
    margin: 0 3px;
    text-decoration: none;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.pagination a {
    background-color: #fff;
    color: var(--secondary-color);
}

.pagination a:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(34, 139, 34, 0.3);
}

.pagination strong {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    box-shadow: 0 1px 2px rgba(34, 139, 34, 0.4);
}

.pagination::before {
    content: "Pages: ";
    font-weight: bold;
    color: var(--secondary-color);
    margin-right: 10px;
}

/* Table Summary - Consistent across all devices */
.table-summary {
    text-align: center;
    padding: 12px 0;
    border-top: 1px solid #ddd;
    background-color: #f8f9fa;
    color: #666;
    font-weight: bold;
    font-size: 0.9em;
}

/* Akhan List Container - Proper width constraints */
.akhan-list {
    background-color: #ffffff;
    margin: 15px 0;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
    position: relative;
    overflow: visible;
    /* Ensure no horizontal overflow */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.akhan-list h2 {
    margin-top: 0;
    color: var(--secondary-color);
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 8px;
    margin-bottom: 15px;
    word-wrap: break-word;
    font-size: 1.3em;
}

/* Admin navigation */
nav {
    margin: 15px 0;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    display: inline-block;
    margin-right: 15px;
}

nav ul li a {
    display: inline-block;
    padding: 8px 12px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
}

nav ul li a:hover {
    background-color: #1B6B1B;
}

/* Mobile responsiveness for admin content - FIXED LAYOUT WITHOUT OVERFLOW */
@media (max-width: 767px) {
    /* Keep table styling consistent with desktop - NO OVERFLOW */
    table {
        font-size: 0.9em !important; /* Same as desktop */
        width: 100% !important;
        table-layout: auto !important;
        display: table !important;
    }
    
    th, td {
        padding: 10px !important; /* Same as desktop */
        font-size: 0.9em !important;
        word-wrap: break-word !important;
        white-space: normal !important;
    }
    
    /* Container should not have overflow issues */
    .akhan-list {
        overflow: visible !important;
        margin: 8px 0 !important;
        padding: 10px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .akhan-form, .search-section {
        margin: 8px 0 !important;
        padding: 10px !important;
    }
    
    .akhan-form textarea {
        min-height: 50px !important;
    }
    
    /* Stack action buttons on mobile for better usability */
    td a, td input[type="submit"] {
        padding: 6px 10px !important; /* Same as desktop */
        font-size: 0.8em !important; /* Same as desktop */
        margin: 2px !important; /* Same as desktop */
        min-width: 50px !important; /* Same as desktop */
        display: block !important;
        margin-bottom: 3px !important;
        width: auto !important;
    }
    
    /* Force pagination to be same as desktop */
    .pagination {
        margin: 20px 0 15px 0 !important; /* Same as desktop */
        padding: 15px 0 !important; /* Same as desktop */
    }
    
    .pagination a, .pagination strong {
        padding: 10px 14px !important; /* Same as desktop */
        margin: 0 3px !important; /* Same as desktop */
        font-size: 0.9em !important; /* Same as desktop */
    }
    
    .pagination::before {
        font-weight: bold !important;
        color: var(--secondary-color) !important;
        margin-right: 10px !important;
        display: inline !important; /* Force inline display */
    }
}

/* Admin Sidebar Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background-color: #f5f5f5;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.admin-sidebar {
    width: 200px;
    min-width: 200px;
    flex-shrink: 0;
    background-color: #1a1a1a; /* Dark background color */
    color: white;
    padding: 0;
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: visible; /* Changed from auto to visible to ensure toggle button is not clipped */
    z-index: 1000;
    box-shadow: 1px 0 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative; /* Add relative positioning to contain absolute children */
}

/* Collapsed sidebar styles */
.admin-sidebar.collapsed {
    width: 60px;
    min-width: 60px;
}

.sidebar-heading {
    background-color: var(--primary-color);
    margin: 0;
    padding: 15px;
    font-size: 1.1em;
    text-align: center;
    border-bottom: 1px solid #ffffff;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Adjust heading when sidebar is collapsed */
.admin-sidebar.collapsed .sidebar-heading {
    padding: 15px 5px;
    font-size: 1em;
    display: flex;
    justify-content: center;
    align-items: center;
}

.admin-sidebar.collapsed .sidebar-heading span {
    display: none;
}

.admin-sidebar.collapsed .sidebar-heading i {
    margin-right: 0;
    font-size: 1.2em;
}

/* Toggle button styles */
.sidebar-toggle {
    position: absolute;
    top: 55px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: all 0.3s ease;
    overflow: visible; /* Ensure button content is not clipped */
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.sidebar-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.5);
}

.sidebar-nav {
    padding: 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    border-bottom: 1px solid #1B6B1B;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-size: 0.9em;
    position: relative;
}

.sidebar-nav a:hover {
    background-color: #1B6B1B;
}

.sidebar-nav a.active {
    background-color: var(--primary-color);
    border-left: 3px solid #ffffff;
}

/* Icon styles */
.sidebar-nav a i {
    margin-right: 12px;
    font-size: 1.1em;
    width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

/* Hide text when sidebar is collapsed */
.admin-sidebar.collapsed .sidebar-nav a span {
    display: none;
}

/* Center icons when sidebar is collapsed */
.admin-sidebar.collapsed .sidebar-nav a {
    justify-content: center;
    padding: 16px 5px;
}

.admin-sidebar.collapsed .sidebar-nav a i {
    margin-right: 0;
    font-size: 1.3em;
}

/* Add hover effect for icons */
.sidebar-nav a:hover i {
    transform: scale(1.2);
}

/* Adjust sidebar heading when collapsed */
.admin-sidebar.collapsed .sidebar-heading {
    padding: 15px 5px;
    font-size: 1em;
}

.admin-sidebar.collapsed .sidebar-heading span {
    display: none;
}

.admin-sidebar.collapsed .sidebar-heading i {
    margin-right: 0;
    font-size: 1.2em;
}

.admin-main {
    flex: 1;
    margin-left: 0;
    padding: 20px;
    background-color: #f5f5f5;
    min-height: 100vh;
    width: calc(100% - 200px);
    max-width: calc(100% - 200px);
    box-sizing: border-box;
    position: relative;
    overflow-y: auto;
    max-height: 100vh;
    border-left: 2px solid var(--secondary-color);
    transition: all 0.3s ease;
}

/* Adjust main content when sidebar is collapsed */
.admin-sidebar.collapsed + .admin-main {
    width: calc(100% - 60px);
    max-width: calc(100% - 60px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1002;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: #1B6B1B;
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Button Styles - Changed to dark color */
.btn-primary {
    background-color: #412121 !important;
    color: white !important;
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 1em !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.btn-primary:hover {
    background-color: #2d1717 !important;
}

.btn-secondary {
    background-color: #412121 !important;
    color: white !important;
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 1em !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.btn-secondary:hover {
    background-color: #2d1717 !important;
}

/* Action buttons in tables */
.akhan-list td a, .akhan-list td input[type="submit"] {
    display: inline-block !important;
    padding: 6px 12px !important;
    font-size: 0.9em !important;
    margin: 2px !important;
    text-decoration: none !important;
    border: 1px solid #ccc !important;
    border-radius: 3px !important;
    background: #412121 !important;
    color: white !important;
    cursor: pointer !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.akhan-list td input[type="submit"] {
    background-color: #412121 !important;
    color: white !important;
    border-color: #412121 !important;
}

.akhan-list td a.edit-btn {
    background-color: #412121 !important;
    color: white !important;
    border-color: #412121 !important;
}

/* Form submit buttons */
.form-actions input[type="submit"] {
    background-color: #412121 !important;
    color: white !important;
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 1em !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.form-actions input[type="submit"]:hover {
    background-color: #2d1717 !important;
}

/* Responsive styles */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .admin-main {
        width: 100%;
        max-width: 100%;
        padding: 15px;
        border-left: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .admin-sidebar {
        display: none;
    }
    
    .admin-sidebar.mobile-open {
        display: block;
    }
    
    /* Hide toggle button on mobile */
    .sidebar-toggle-btn {
        display: none;
    }
}

/* ADMIN LAYOUT TEST - This file should force new styles - COMPACT VERSION */

body.admin-body {
    font-family: Arial, sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #f5f5f5 !important;
    font-size: 14px !important;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    background-color: #f5f5f5;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.admin-sidebar {
    width: 200px;
    min-width: 200px;
    flex-shrink: 0;
    background-color: #1a1a1a; /* Dark background color */
    color: white;
    padding: 0;
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 1px 0 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Collapsed sidebar styles */
.admin-sidebar.collapsed {
    width: 60px;
    min-width: 60px;
}

.sidebar-heading {
    background-color: var(--primary-color);
    margin: 0;
    padding: 15px;
    font-size: 1.1em;
    text-align: center;
    border-bottom: 1px solid #ffffff;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Adjust heading when sidebar is collapsed */
.admin-sidebar.collapsed .sidebar-heading {
    padding: 15px 5px;
    font-size: 1em;
    display: flex;
    justify-content: center;
    align-items: center;
}

.admin-sidebar.collapsed .sidebar-heading span {
    display: none;
}

.admin-sidebar.collapsed .sidebar-heading i {
    margin-right: 0;
    font-size: 1.2em;
}

/* Toggle button styles */
.sidebar-toggle {
    position: absolute;
    top: 15px;
    right: -12px;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.sidebar-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.5);
}

.sidebar-nav {
    padding: 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    border-bottom: 1px solid #1B6B1B;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-size: 0.9em;
    position: relative;
}

.sidebar-nav a:hover {
    background-color: #1B6B1B;
}

.sidebar-nav a.active {
    background-color: var(--primary-color);
    border-left: 3px solid #ffffff;
}

/* Icon styles */
.sidebar-nav a i {
    margin-right: 12px;
    font-size: 1.1em;
    width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

/* Hide text when sidebar is collapsed */
.admin-sidebar.collapsed .sidebar-nav a span {
    display: none;
}

/* Center icons when sidebar is collapsed */
.admin-sidebar.collapsed .sidebar-nav a {
    justify-content: center;
    padding: 16px 5px;
}

.admin-sidebar.collapsed .sidebar-nav a i {
    margin-right: 0;
    font-size: 1.3em;
}

/* Add hover effect for icons */
.sidebar-nav a:hover i {
    transform: scale(1.2);
}

/* Adjust sidebar heading when collapsed */
.admin-sidebar.collapsed .sidebar-heading {
    padding: 15px 5px;
    font-size: 1em;
}

.admin-sidebar.collapsed .sidebar-heading span {
    display: none;
}

.admin-sidebar.collapsed .sidebar-heading i {
    margin-right: 0;
    font-size: 1.2em;
}

.admin-main {
    flex: 1;
    margin-left: 0;
    padding: 20px;
    background-color: #f5f5f5;
    min-height: 100vh;
    width: calc(100% - 200px);
    max-width: calc(100% - 200px);
    box-sizing: border-box;
    position: relative;
    overflow-y: auto;
    max-height: 100vh;
    border-left: 2px solid var(--secondary-color);
    transition: all 0.3s ease;
}

/* Adjust main content when sidebar is collapsed */
.admin-sidebar.collapsed + .admin-main {
    width: calc(100% - 60px);
    max-width: calc(100% - 60px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1002;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: #1B6B1B;
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Button Styles - Changed to dark color */
.btn-primary {
    background-color: #412121 !important;
    color: white !important;
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 1em !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.btn-primary:hover {
    background-color: #2d1717 !important;
}

.btn-secondary {
    background-color: #412121 !important;
    color: white !important;
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 1em !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.btn-secondary:hover {
    background-color: #2d1717 !important;
}

/* Action buttons in tables */
.akhan-list td a, .akhan-list td input[type="submit"] {
    display: inline-block !important;
    padding: 6px 12px !important;
    font-size: 0.9em !important;
    margin: 2px !important;
    text-decoration: none !important;
    border: 1px solid #ccc !important;
    border-radius: 3px !important;
    background: #412121 !important;
    color: white !important;
    cursor: pointer !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.akhan-list td input[type="submit"] {
    background-color: #412121 !important;
    color: white !important;
    border-color: #412121 !important;
}

.akhan-list td a.edit-btn {
    background-color: #412121 !important;
    color: white !important;
    border-color: #412121 !important;
}

/* Form submit buttons */
.form-actions input[type="submit"] {
    background-color: #412121 !important;
    color: white !important;
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 1em !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.form-actions input[type="submit"]:hover {
    background-color: #2d1717 !important;
}

/* Responsive styles */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .admin-main {
        width: 100%;
        max-width: 100%;
        padding: 15px;
        border-left: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .admin-sidebar {
        display: none;
    }
    
    .admin-sidebar.mobile-open {
        display: block;
    }
    
    /* Hide toggle button on mobile */
    .sidebar-toggle-btn {
        display: none;
    }
}
