:root {
    --primary-color: #41D642;
    --text-dark: #333333;
    --text-light: #6C757D;
    --bg-color: #F1F1F1;
    --card-bg: #FFFFFF;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;
}


body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    height: 100vh;
}
/* Header styling */
.navbar {
    padding: 0.5rem 1rem;
    background-color: var(--card-bg) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #e9ecef;
    height: var(--header-height);
    z-index: 1030;
    transition: background-color 0.3s ease;
}


.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
    padding: 0;
    margin: 0;
}

.navbar-brand:hover {
    text-decoration: none;
    opacity: 0.8;
}

.navbar-brand:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.navbar-logo {
    height: 30px;
    width: auto;
    cursor: pointer;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    transition: background-color 0.2s;
}

.sidebar-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.sidebar-toggle:focus {
    outline: none;
}


/* Logout button styling */
.btn-logout {
    color: var(--text-dark);
    background-color: transparent;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.375rem 1rem;
    transition: all 0.2s;
}

.btn-logout:hover {
    background-color: rgba(0, 0, 0, 0.05);
}


/* Layout container */
.app-container {
    display: flex;
    height: calc(100vh - var(--header-height));
    position: relative;
    overflow: hidden;
}
/* Main content area */
.main-content {
    flex: 1;
    padding: 0.75rem;
    transition: margin-left 0.3s ease;
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
}
.main-content.expanded {
    margin-left: 0;
    width: 100%;
}
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 1rem;
}
/* Alert messages */
.alert {
    border-radius: 0.5rem;
    border: none;
    margin-bottom: 0.75rem;
}

/* Standard card styling */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    background-color: var(--card-bg);
}

.card-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Powered by footer */
.powered-by {
    flex-shrink: 0;
    padding: 0.125rem 0;
    text-align: center;
    height: 1.25rem;
    background-color: var(--bg-color);
    line-height: 1;
}
.powered-by-text {
    font-size: 0.6875rem;
    color: var(--text-light);
    margin-right: 0.25rem;
}

.retailogists-brand {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.6875rem;
}

/* Custom button */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #38c139;
    border-color: #38c139;
}

/* Custom form controls */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(65, 214, 66, 0.25);
}

/* Sidebar styling */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: calc(100vh - var(--header-height));
    width: var(--sidebar-width);
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    z-index: 1020;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Complete hide on collapse */
.sidebar.collapsed {
    transform: translateX(-100%);
}
.sidebar-toggle-container {
    display: flex;
    justify-content: flex-end;
    padding: 0.5rem;
    position: relative;
}


/* Toggle button styling */
.sidebar-toggle-btn {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: background-color 0.2s;
    z-index: 1030;
}

.sidebar-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.sidebar-toggle-btn:focus {
    outline: none;
}

/* Floating toggle button (visible when sidebar is collapsed) */
.floating-toggle {
    position: fixed;
    top: calc(var(--header-height) + 0.5rem);
    left: 0;
    z-index: 1025;
    padding: 0.5rem;
    display: none; /* Hidden by default */
}

/* Show floating toggle when sidebar is collapsed */
.sidebar.collapsed ~ .floating-toggle {
    display: block;
}


/* Dashboard section header */
.sidebar-section {
    padding: 1rem 1rem 0.5rem; /* Reduced padding */
}
.sidebar-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.sidebar.collapsed .sidebar-section-title {
    display: none;
}

/* Dashboard list */
.dashboard-list {
    list-style: none;
    padding: 0 ; /* Reduced padding */
    margin: 0;
}

.dashboard-item {
    margin-bottom: 0.5rem;
}


.dashboard-link {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.75rem; /* Reduced padding */
    border-radius: 0.5rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.dashboard-link:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--text-dark);
    text-decoration: none;
}

.dashboard-link.active {
    background-color: var(--primary-color);
    
}

.dashboard-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1.25rem;
    width: 24px; /* Fixed width for better alignment */
    text-align: center;
}

.sidebar.collapsed .dashboard-text {
    display: none;
}

.sidebar.collapsed .dashboard-icon {
    margin-right: 0;
    width: 100%;
}

.sidebar.collapsed .dashboard-link {
    justify-content: center; /* Center icon when collapsed */
    padding: 0.625rem 0.5rem; /* Adjust padding when collapsed */
}
/* User profile section */
.user-profile {
    margin-top: auto;
    padding: 1rem; /* Reduced padding */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}
.sidebar.collapsed .user-avatar {
    margin-right: 0;
    margin-left: auto;
    margin-right: auto; /* Center avatar when collapsed */
}
.user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--text-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.user-name {
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .user-name {
    display: none;
}

/* Dashboard content */
.dashboard-content {
    flex: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    margin-bottom: 0.125rem;
}

.dashboard-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.empty-state {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.empty-state-icon {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state-text {
    color: var(--text-light);
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.empty-state-subtext {
    color: var(--text-light);
    opacity: 0.7;
}


/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile responsive fixes for header buttons */
@media (max-width: 576px) {
    .btn-logout {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .navbar {
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-logo {
        height: 24px;
    }
    
    .navbar-brand {
        margin-right: 0.5rem;
    }
    
    /* Tighter spacing on mobile */
    .main-content {
        padding: 0.5rem;
    }
    
    .dashboard-content {
        margin-bottom: 0.0625rem;
        border-radius: 0.25rem;
    }
    
    .powered-by {
        padding: 0.0625rem 0;
        height: 1rem;
    }
}

/* Media queries for responsiveness */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    /* Always show floating toggle on mobile */
    .floating-toggle {
        display: block;
    }
    
    /* Hide floating toggle when sidebar is visible */
    .sidebar.mobile-show ~ .floating-toggle {
        display: none;
    }
}
@media (min-width: 993px) {
    .btn-logout {
        display: flex;
        align-items: center;
    }
    
    .btn-logout .bi {
        margin-right: 0.5rem;
    }
}

/* Client Card Styling */
.client-card {
    background-color: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
    position: relative;
}

.client-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 0.75rem;
}

.client-card-content:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.client-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.client-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.client-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.2;
}

.client-menu-arrow {
    color: var(--text-light);
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.client-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    margin-top: 0.25rem;
    overflow: hidden;
}

.client-menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 0.875rem;
}

.client-menu-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
    text-decoration: none;
}

.client-menu-item i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* Client Selection Card */
.client-selection-card {
    background-color: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    padding: 0.75rem 0.5rem;
    margin-bottom: 1rem;
}

.selection-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.client-options {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.client-option {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.5rem;
    border-radius: 0.5rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.client-option:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
    text-decoration: none;
}

.client-option i {
    margin-right: 0.75rem;
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

/* Alternate Row Highlighting */
.client-options.alternate-rows .client-option:nth-child(even) {
    background-color: rgba(65, 214, 66, 0.08);
}

.client-options.alternate-rows .client-option:nth-child(even):hover {
    background-color: rgba(65, 214, 66, 0.15);
}

/* Dashboard Alternate Row Highlighting */
.dashboard-list.alternate-rows .dashboard-item:nth-child(even) .dashboard-link {
    background-color: rgba(65, 214, 66, 0.08);
}

.dashboard-list.alternate-rows .dashboard-item:nth-child(even) .dashboard-link:hover {
    background-color: rgba(65, 214, 66, 0.15);
}

/* Ensure active dashboard link maintains its styling */
.dashboard-list.alternate-rows .dashboard-item:nth-child(even) .dashboard-link.active {
    background-color: var(--primary-color);
}

/* Hide client card when sidebar is collapsed */
.sidebar.collapsed .client-card,
.sidebar.collapsed .client-selection-card {
    display: none;
}