* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: linear-gradient(180deg, #6366f1 0%, #8b5cf6 30%, #a855f7 60%, #9333ea 100%);
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-toggle {
    position: absolute;
    top: 20px;
    right: -20px;
    background: #6a5acd;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
}

.sidebar-toggle:hover {
    background: #5a4acb;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.sidebar-toggle svg {
    fill: #ffffff;
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-toggle {
    right: -20px;
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-header {
    padding: 20px 10px;
}

.sidebar.collapsed .sidebar-header h2 {
    font-size: 16px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.sidebar-logo {
    max-width: 100%;
    max-height: 50px;
    object-fit: contain;
    display: block;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

.sidebar-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-icon {
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-text {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
}

.sidebar.collapsed .sidebar-item {
    padding: 12px;
    justify-content: center;
}

.sidebar.collapsed .sidebar-item:hover {
    transform: translateX(0);
}

.sidebar-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sidebar-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--item-color, #60a5fa);
    border-radius: 0 2px 2px 0;
}

.sidebar-item[data-color="#3b82f6"].active::before { background: #3b82f6; }
.sidebar-item[data-color="#10b981"].active::before { background: #10b981; }
.sidebar-item[data-color="#f59e0b"].active::before { background: #f59e0b; }
.sidebar-item[data-color="#8b5cf6"].active::before { background: #8b5cf6; }
.sidebar-item[data-color="#ec4899"].active::before { background: #ec4899; }
.sidebar-item[data-color="#06b6d4"].active::before { background: #06b6d4; }
.sidebar-item[data-color="#6366f1"].active::before { background: #6366f1; }
.sidebar-item[data-color="#14b8a6"].active::before { background: #14b8a6; }
.sidebar-item[data-color="#f97316"].active::before { background: #f97316; }

.sidebar-item.active .sidebar-icon {
    transform: scale(1.1);
}

.sidebar-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.sidebar-text {
    font-size: 15px;
    font-weight: 500;
}

.layout-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 250px;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed + .layout-main {
    margin-left: 70px;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 100;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0; /* Allow flex item to shrink */
    max-width: calc(50% - 200px); /* Prevent left section from taking too much space */
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: white;
    height: 100%;
}

.logo-icon {
    font-size: 24px;
}

.logo-image {
    height: 100%;
    max-height: 60px;
    max-width: 250px;
    object-fit: contain;
    width: auto;
}

.logo-fallback {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form {
    flex: 1;
    max-width: 400px;
    min-width: 200px; /* Ensure search bar has minimum width */
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
}

.search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    background: white;
}

.search-input::placeholder {
    color: #6b7280;
}

.header-clock {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none; /* Allow clicks to pass through to elements behind */
    width: auto;
    max-width: 320px; /* Prevent clock from being too wide */
    margin: 0 auto; /* Center the clock */
    padding: 0 15px; /* Add horizontal padding for spacing */
}

.digital-clock {
    text-align: center;
    color: white;
    padding: 10px 20px;
    border-radius: 15px;
    background: linear-gradient(45deg, #ff006e, #8338ec, #3a86ff, #06ffa5, #ffbe0b, #fb5607, #ff006e);
    background-size: 300% 300%;
    animation: rainbowGradient 4s ease infinite;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37), inset 0 0 20px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.digital-clock::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite;
    transform: rotate(45deg);
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes rainbowGradient {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

.clock-time {
    font-size: 24px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.clock-hours,
.clock-minutes,
.clock-seconds {
    display: inline-block;
    text-shadow: 0 0 15px currentColor, 0 0 30px currentColor, 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 6px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.clock-seconds {
    animation: secondsGlow 1s ease-in-out infinite, pulseScale 1s ease-in-out infinite;
    color: #ff006e;
}

@keyframes secondsGlow {
    0%, 100% { 
        text-shadow: 0 0 15px #ff006e, 0 0 30px #ff006e, 0 0 45px #ff006e;
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 25px #ff006e, 0 0 50px #ff006e, 0 0 75px #ff006e;
        transform: scale(1.05);
    }
}

@keyframes pulseScale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.clock-ampm {
    font-size: 16px;
    font-weight: 700;
    margin-left: 6px;
    background: linear-gradient(45deg, #ffbe0b, #fb5607);
    padding: 2px 8px;
    border-radius: 8px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: ampmGlow 2s ease-in-out infinite alternate;
}

@keyframes ampmGlow {
    0% { 
        box-shadow: 0 0 10px rgba(255, 190, 11, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.2);
        transform: scale(1);
    }
    100% { 
        box-shadow: 0 0 20px rgba(251, 86, 7, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.3);
        transform: scale(1.05);
    }
}

.clock-date {
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
    margin-top: 5px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    animation: dateGlow 3s ease-in-out infinite alternate;
}

@keyframes dateGlow {
    0% { 
        background: rgba(255, 255, 255, 0.15);
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    }
    100% { 
        background: rgba(255, 255, 255, 0.25);
        text-shadow: 0 0 15px rgba(255, 255, 255, 1);
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: flex-end;
    min-width: 0; /* Allow flex item to shrink */
    position: relative;
    z-index: 20; /* Ensure it's above the clock */
    max-width: calc(50% - 200px); /* Prevent right section from taking too much space */
    padding-left: 20px; /* Add spacing after clock */
}

.header-button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.header-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.header-icon-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
    color: white;
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.header-icon-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.settings-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.settings-button:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.user-menu {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: background 0.3s;
}

.user-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-arrow {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.9);
    margin-left: 5px;
    transition: transform 0.3s;
}

.user-menu.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1e40af;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-info {
    text-align: left;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.user-role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 10000;
    pointer-events: none;
}

.user-menu.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f9fafb;
}

.dropdown-icon {
    font-size: 16px;
}

.layout-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Dashboard Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 28px;
    color: #333;
}

.store-badge {
    background: #1e40af;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1e40af;
}

/* New Dashboard Styles */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 30px;
    max-width: 100%;
}

/* Responsive clock positioning for all stores */
@media (max-width: 1400px) {
    .header-clock {
        max-width: 300px;
        padding: 0 10px;
    }
    
    .digital-clock {
        min-width: 260px;
        padding: 7px 18px;
    }
    
    .header-left {
        gap: 20px;
        max-width: calc(50% - 180px);
        padding-right: 15px;
    }
    
    .header-right {
        max-width: calc(50% - 180px);
        padding-left: 15px;
    }
    
    .search-form {
        max-width: 320px;
    }
}

@media (max-width: 1200px) {
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-clock {
        max-width: 280px;
        padding: 0 8px;
    }
    
    .digital-clock {
        min-width: 240px;
        padding: 6px 15px;
    }
    
    .header-left {
        gap: 15px;
        max-width: calc(50% - 160px);
        padding-right: 10px;
    }
    
    .header-right {
        max-width: calc(50% - 160px);
        padding-left: 10px;
    }
    
    .search-form {
        max-width: 250px;
    }
}

@media (max-width: 992px) {
    .header-clock {
        max-width: 280px;
    }
    
    .digital-clock {
        min-width: 240px;
        padding: 6px 15px;
    }
    
    .clock-time {
        font-size: 16px;
    }
    
    .clock-date {
        font-size: 10px;
    }
    
    .header-left {
        gap: 10px;
    }
    
    .search-form {
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .header-clock {
        max-width: 260px;
    }
    
    .digital-clock {
        min-width: 240px;
        padding: 6px 12px;
    }
    
    .clock-time {
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .clock-hours,
    .clock-minutes,
    .clock-seconds {
        padding: 1px 3px;
    }
    
    .clock-ampm {
        font-size: 11px;
        padding: 1px 4px;
    }
    
    .clock-date {
        font-size: 10px;
    }
    
    .header-left {
        gap: 8px;
    }
    
    .search-form {
        max-width: 180px;
    }
}

@media (max-width: 600px) {
    .header-clock {
        display: none;
    }
}

.dashboard-stats-grid .stat-card {
    background: white;
    border-radius: 10px;
    padding: 18px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid;
    min-height: 85px;
    max-width: 100%;
}

.dashboard-stats-grid .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dashboard-stats-grid .stat-card.sales-card {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.dashboard-stats-grid .stat-card.expenses-card {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.dashboard-stats-grid .stat-card.profit-card {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.dashboard-stats-grid .stat-card.profit-card.loss {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.dashboard-stats-grid .stat-card.customers-card {
    border-left-color: #8b5cf6;
    background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
}

.dashboard-stats-grid .stat-icon {
    font-size: 28px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    flex-shrink: 0;
}

.dashboard-stats-grid .stat-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.dashboard-stats-grid .stat-label {
    font-size: 10px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
    line-height: 1.2;
}

.dashboard-stats-grid .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.dashboard-stats-grid .stat-card.sales-card .stat-value {
    color: #059669;
}

.dashboard-stats-grid .stat-card.expenses-card .stat-value {
    color: #dc2626;
}

.dashboard-stats-grid .stat-card.profit-card.profit .stat-value {
    color: #2563eb;
}

.dashboard-stats-grid .stat-card.profit-card.loss .stat-value {
    color: #d97706;
}

.dashboard-stats-grid .stat-card.customers-card .stat-value {
    color: #7c3aed;
}

/* Chart Section */
.dashboard-chart-section {
    margin-bottom: 30px;
    max-width: 100%;
}

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.chart-header h2 {
    font-size: 20px;
    color: #1f2937;
    margin: 0;
    font-weight: 600;
}

.chart-period-selector {
    display: flex;
    gap: 10px;
}

.period-btn {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.period-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.period-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.chart-wrapper {
    position: relative;
    height: 350px;
    width: 100%;
}

/* Recent Activities */
.dashboard-activities-section {
    margin-bottom: 30px;
    max-width: 100%;
}

.activities-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

.activities-container h2 {
    font-size: 20px;
    color: #1f2937;
    margin: 0 0 20px 0;
    font-weight: 600;
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid;
    transition: all 0.2s;
}

.activity-item:hover {
    background: #f3f4f6;
    transform: translateX(5px);
}

.activity-item.order {
    border-left-color: #10b981;
}

.activity-item.expense {
    border-left-color: #ef4444;
}

.activity-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.activity-title strong {
    font-size: 15px;
    color: #1f2937;
    font-weight: 600;
}

.activity-reference {
    font-size: 13px;
    color: #6b7280;
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
}

.activity-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #9ca3af;
    flex-wrap: wrap;
}

.activity-user {
    font-weight: 500;
}

.activity-date {
    color: #9ca3af;
}

.activity-amount {
    font-size: 18px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.activity-amount.positive {
    color: #059669;
    background: #d1fae5;
}

.activity-amount.negative {
    color: #dc2626;
    background: #fee2e2;
}

@media (max-width: 768px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chart-wrapper {
        height: 300px;
    }
    
    .activity-item {
        flex-wrap: wrap;
    }
    
    .activity-amount {
        width: 100%;
        text-align: right;
    }
}

.dashboard-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.dashboard-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
}

.low-stock-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.low-stock-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fef3c7;
    border-radius: 5px;
}

.product-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.stock-info {
    font-size: 14px;
    color: #666;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th {
    text-align: left;
    padding: 12px;
    background: #f3f4f6;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.orders-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-in_progress {
    background: #dbeafe;
    color: #1e40af;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* POS Styles */
.pos-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 100px);
}

.pos-main {
    flex: 1;
    background: white;
    border-radius: 10px;
    padding: 20px;
    overflow-y: auto;
}

.pos-header {
    margin-bottom: 20px;
}

.category-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 10px 20px;
    background: #f3f4f6;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.category-tab:hover {
    background: #e5e7eb;
}

.category-tab.active {
    background: #1e40af;
    color: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f3f4f6;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fbbf24;
    color: #78350f;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    min-height: 40px;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 15px;
}

.add-to-cart-button {
    width: 100%;
    padding: 10px;
    background: #1e40af;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background 0.3s;
}

.add-to-cart-button:hover:not(:disabled) {
    background: #1e3a8a;
}

.add-to-cart-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.order-summary {
    width: 400px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.order-header h2 {
    font-size: 20px;
    color: #333;
}

.expand-button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
}

.order-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.order-number {
    font-size: 14px;
    color: #666;
}

.order-number span {
    font-weight: 600;
    color: #333;
}

.order-items-count {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.order-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.empty-cart {
    text-align: center;
    padding: 40px;
    color: #999;
}

.order-item {
    display: flex;
    gap: 10px;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
}

.item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.item-details {
    flex: 1;
}

.item-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.item-price {
    font-size: 14px;
    font-weight: 600;
    color: #1e40af;
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

.quantity-input {
    width: 50px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}

.remove-button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
}

.payment-methods {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.payment-method {
    flex: 1;
    padding: 10px;
    background: #f3f4f6;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-method:hover {
    background: #e5e7eb;
}

.payment-method.active {
    background: #1e40af;
    color: white;
}

.order-totals {
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.total-final {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #e5e7eb;
}

.order-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cancel-button {
    padding: 12px;
    background: #fee2e2;
    color: #991b1b;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.phone-input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.confirm-button {
    padding: 12px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.confirm-button:hover {
    background: #059669;
}

/* Page Styles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    color: #333;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-add {
    padding: 10px 20px;
    background: #1e40af;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    white-space: nowrap;
}

.btn-add:hover {
    background: #1e3a8a;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.stock-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
}

.stock-status.in-stock {
    background: #d1fae5;
    color: #065f46;
}

.stock-status.low-stock {
    background: #fef3c7;
    color: #92400e;
}

.stock-status.out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

.product-actions {
    margin-top: 10px;
}

.btn-edit {
    padding: 6px 12px;
    background: #1e40af;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.btn-edit:hover {
    background: #1e3a8a;
}

@media (max-width: 1024px) {
    .layout-main {
        margin-left: 0;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .pos-container {
        flex-direction: column;
        height: auto;
    }
    
    .order-summary {
        width: 100%;
        max-height: none;
    }
}

/* Sales Page Styles */
.sales-page {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.sales-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.sales-page .page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.date-range-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.date-input {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    color: #334155;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.date-input:hover {
    border-color: #3b82f6;
}

.date-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.date-separator {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.sales-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.sales-stats .stat-card {
    background: white;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
    border: 1px solid #f1f5f9;
}

.sales-stats .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.sales-stats .stat-card.revenue-card {
    border-left: 4px solid #3b82f6;
}

.sales-stats .stat-card.orders-card {
    border-left: 4px solid #10b981;
}

.sales-stats .stat-card.avg-card {
    border-left: 4px solid #f59e0b;
}

.stat-icon {
    font-size: 48px;
    line-height: 1;
    opacity: 0.9;
}

.stat-content {
    flex: 1;
}

.sales-stats .stat-label {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sales-stats .stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.sales-stats .revenue-card .stat-value {
    color: #3b82f6;
}

.sales-stats .orders-card .stat-value {
    color: #10b981;
}

.sales-stats .avg-card .stat-value {
    color: #f59e0b;
}

.sales-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

.sales-table {
    width: 100%;
    border-collapse: collapse;
}

.sales-table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.sales-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.sales-table tbody tr {
    transition: all 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.sales-table tbody tr:hover {
    background: #f8fafc;
}

.sales-table tbody tr:last-child {
    border-bottom: none;
}

.sales-table td {
    padding: 18px 20px;
    font-size: 14px;
    color: #334155;
}

.order-number-cell {
    font-weight: 600;
}

.order-number-cell strong {
    color: #1e293b;
    font-size: 15px;
}

.items-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.payment-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-badge.payment-cash {
    background: #dbeafe;
    color: #1e40af;
}

.payment-badge.payment-qr {
    background: #fef3c7;
    color: #92400e;
}

.payment-badge.payment-wallet {
    background: #e9d5ff;
    color: #6b21a8;
}

.payment-badge.payment-card {
    background: #cffafe;
    color: #0e7490;
}

.total-cell {
    font-weight: 700;
    color: #1e293b;
    font-size: 15px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.empty-icon {
    font-size: 64px;
    opacity: 0.3;
}

.empty-state-content p {
    color: #94a3b8;
    font-size: 16px;
    margin: 0;
}

/* Action Buttons */
.actions-cell {
    padding: 12px 20px !important;
}

.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.action-btn {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.action-icon {
    font-size: 16px;
    line-height: 1;
}

.edit-btn {
    border-color: #3b82f6;
    color: #3b82f6;
}

.edit-btn:hover {
    background: #3b82f6;
    color: white;
}

.print-btn {
    border-color: #64748b;
    color: #64748b;
}

.print-btn:hover {
    background: #64748b;
    color: white;
}

.return-btn {
    border-color: #f59e0b;
    color: #f59e0b;
}

.return-btn:hover {
    background: #f59e0b;
    color: white;
}

.return-btn.disabled,
.return-btn:disabled {
    border-color: #d1d5db;
    color: #9ca3af;
    background-color: transparent;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

.return-btn.disabled:hover,
.return-btn:disabled:hover {
    background-color: transparent;
    color: #9ca3af;
    border-color: #d1d5db;
}

.delete-btn {
    border-color: #ef4444;
    color: #ef4444;
}

.delete-btn:hover {
    background: #ef4444;
    color: white;
}

/* Return Order Styling */
.return-order {
    background: #fef2f2;
}

.return-order:hover {
    background: #fee2e2;
}

.return-badge {
    display: inline-block;
    background: #dc2626;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.return-total {
    color: #dc2626;
}

@media (max-width: 768px) {
    .sales-page {
        padding: 20px;
    }
    
    .sales-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .sales-stats .stat-card {
        padding: 20px;
    }
    
    .sales-stats .stat-value {
        font-size: 28px;
    }
    
    .date-range-selector {
        flex-direction: column;
        width: 100%;
    }
    
    .date-separator {
        display: none;
    }
    
    .sales-table {
        font-size: 12px;
    }
    
    .sales-table th,
    .sales-table td {
        padding: 12px 8px;
    }
    
    .action-buttons {
        gap: 4px;
    }
    
    .action-btn {
        width: 32px;
        height: 32px;
        padding: 6px;
    }
    
    .action-icon {
        font-size: 14px;
    }
}

/* Settings Page Styles */
.settings-page {
    max-width: 900px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 5px;
}

.page-subtitle {
    color: #666;
    font-size: 14px;
}

.settings-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.required {
    color: #ef4444;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.image-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
    display: inline-block;
}

.image-preview img {
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
    border-radius: 4px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f3f4f6;
    color: #333;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .settings-container {
        padding: 20px;
    }
}

/* Users Page Styles */
.users-page {
    max-width: 100%;
}

.users-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.users-page .page-header h1 {
    font-size: 28px;
    color: #333;
    margin: 0;
}

.users-table-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table thead {
    background: #f9fafb;
}

.users-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    border-bottom: 2px solid #e5e7eb;
}

.users-table tbody tr {
    transition: background 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.users-table tbody tr:hover {
    background: #f9fafb;
}

.users-table td {
    padding: 15px;
    font-size: 14px;
    color: #374151;
}

.user-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-small {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.role-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 12px;
}

.store-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.store-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #f3e8ff;
    color: #6b21a8;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.no-store {
    color: #9ca3af;
    font-size: 12px;
    font-style: italic;
    font-size: 12px;
    font-weight: 600;
}

.user-form-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.user-form {
    max-width: 100%;
}

.stores-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: #f3f4f6;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 14px;
    color: #374151;
}

.checkbox-label small {
    color: #6b7280;
}

/* Permission Management Styles */
.permissions-manager {
    margin-top: 20px;
}

.permissions-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}

.permission-tab {
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: -2px;
}

.permission-tab:hover {
    color: #667eea;
    background: #f3f4f6;
    border-radius: 8px 8px 0 0;
}

.permission-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
    border-radius: 8px 8px 0 0;
}

.role-permissions-panel {
    margin-top: 20px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.role-permissions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.role-permissions-title {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.permission-category {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.category-title {
    font-size: 18px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-icon {
    font-size: 20px;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.permission-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.permission-checkbox:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.permission-checkbox input[type="checkbox"]:checked ~ .checkbox-custom {
    background: #667eea;
    border-color: #667eea;
}

.permission-checkbox input[type="checkbox"]:checked ~ .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-wrapper {
    position: relative;
    flex-shrink: 0;
}

.permission-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    cursor: pointer;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    background: white;
    display: block;
    transition: all 0.2s;
    position: relative;
}

.permission-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.permission-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.4;
}

.permission-desc {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 2px;
}

.permission-actions {
    display: flex;
    gap: 12px;
}

.check-all-btn,
.uncheck-all-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.check-all-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.check-all-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

.uncheck-all-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.uncheck-all-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
}

.btn-icon {
    font-size: 16px;
    font-weight: bold;
}

.check-all-btn {
    background: #10b981;
}

.check-all-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.uncheck-all-btn {
    background: #ef4444;
}

.uncheck-all-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.section-description {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .permissions-grid {
        grid-template-columns: 1fr;
    }
    
    .permissions-tabs {
        flex-wrap: wrap;
    }
    
    .stores-checkbox-group {
        grid-template-columns: 1fr;
    }
}

/* Customers Page Styles */
.customers-page {
    max-width: 100%;
}

.customers-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.customers-table-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.customers-table {
    width: 100%;
    border-collapse: collapse;
}

.customers-table thead {
    background: #f9fafb;
}

.customers-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    border-bottom: 2px solid #e5e7eb;
}

.customers-table tbody tr {
    transition: background 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.customers-table tbody tr:hover {
    background: #f9fafb;
}

.customers-table td {
    padding: 15px;
    font-size: 14px;
    color: #374151;
}

.customer-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.customer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.email-link {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s;
}

.email-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.phone-link {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.phone-link:hover {
    color: #059669;
    text-decoration: underline;
}

.address-text {
    color: #6b7280;
    max-width: 300px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-field {
    color: #9ca3af;
    font-style: italic;
}

.customers-page .empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.empty-state-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-content h3 {
    font-size: 20px;
    color: #374151;
    margin-bottom: 10px;
}

.empty-state-content p {
    color: #6b7280;
    margin-bottom: 20px;
}

.customers-page .add-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.customers-page .add-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.customers-page .add-button span {
    font-size: 18px;
    font-weight: bold;
}

.customers-page .search-input {
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    width: 300px;
    transition: all 0.2s;
}

.customers-page .search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

@media (max-width: 768px) {
    .customers-page .header-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .customers-page .search-input {
        width: 100%;
    }
    
    .customers-table-container {
        padding: 10px;
    }
    
    .customers-table {
        font-size: 12px;
    }
    
    .customers-table th,
    .customers-table td {
        padding: 10px 8px;
    }
    
    .address-text {
        max-width: 150px;
    }
}

/* Expenses Page Styles */
.expenses-page {
    max-width: 100%;
}

.filters-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filters-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.date-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.date-separator {
    padding: 0 5px;
    color: #6b7280;
    align-self: center;
}

.category-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

.filter-button {
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.reset-button {
    padding: 8px 20px;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.reset-button:hover {
    background: #e5e7eb;
}

.expenses-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.expenses-table-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.expenses-table {
    width: 100%;
    border-collapse: collapse;
}

.expenses-table thead {
    background: #f9fafb;
}

.expenses-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    border-bottom: 2px solid #e5e7eb;
}

.expenses-table tbody tr {
    transition: background 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.expenses-table tbody tr:hover {
    background: #f9fafb;
}

.expenses-table td {
    padding: 15px;
    font-size: 14px;
    color: #374151;
}

.category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.description-cell {
    max-width: 300px;
}

.notes-text {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
    font-style: italic;
}

.amount-cell {
    font-weight: 600;
    color: #dc2626;
}

.expenses-page .empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.expenses-page .add-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.expenses-page .add-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
}

.expenses-page .add-button span {
    font-size: 18px;
    font-weight: bold;
}

@media (max-width: 768px) {
    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .expenses-table-container {
        padding: 10px;
    }
    
    .expenses-table {
        font-size: 12px;
    }
    
    .expenses-table th,
    .expenses-table td {
        padding: 10px 8px;
    }
    
    .description-cell {
        max-width: 150px;
    }
}

/* Expense Form Styles */
.expense-form-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.expense-form {
    max-width: 100%;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.back-button:hover {
    background: #e5e7eb;
}

.expenses-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.expenses-page .page-header h1 {
    font-size: 28px;
    color: #333;
    margin: 0;
}

/* Store Management Styles */
.store-page {
    max-width: 100%;
}

.store-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.store-page .page-header h1 {
    font-size: 28px;
    color: #333;
    margin: 0;
}

.current-store-section,
.available-stores-section {
    margin-bottom: 40px;
}

.current-store-section h2,
.available-stores-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.store-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.store-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.store-card.active {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.store-card.inactive {
    opacity: 0.7;
    background: #f9fafb;
}

.store-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.store-card-header h3 {
    font-size: 18px;
    color: #333;
    margin: 0;
    font-weight: 600;
}

.store-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.store-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.store-badge.active-badge {
    background: #d1fae5;
    color: #065f46;
}

.store-badge.inactive-badge {
    background: #fee2e2;
    color: #991b1b;
}

.store-badge.current-badge {
    background: #dbeafe;
    color: #1e40af;
}

.store-card-body {
    margin-bottom: 15px;
}

.store-card-body p {
    margin: 8px 0;
    font-size: 14px;
    color: #6b7280;
}

.store-card-body strong {
    color: #374151;
    font-weight: 600;
}

.store-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.store-card-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.store-card-actions .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-info {
    background: #06b6d4;
    color: white;
}

.btn-info:hover {
    background: #0891b2;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

/* Store Form Styles */
.store-form-page {
    max-width: 100%;
}

.store-form-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.store-form-page .page-header h1 {
    font-size: 28px;
    color: #333;
    margin: 0;
}

.form-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.store-form {
    max-width: 800px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.section-description {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.required {
    color: #ef4444;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6b7280;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.user-checkbox {
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.user-checkbox:hover {
    background: #f9fafb;
    border-color: #3b82f6;
}

.user-checkbox input[type="checkbox"]:checked + .user-info {
    color: #3b82f6;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-weight: 600;
    font-size: 15px;
}

.user-email {
    font-size: 13px;
    color: #6b7280;
}

.user-role {
    font-size: 12px;
    color: #9ca3af;
}

.users-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.form-actions .btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

@media (max-width: 768px) {
    .stores-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .store-page .page-header,
    .store-form-page .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .store-card-actions {
        flex-direction: column;
    }
    
    .store-card-actions .btn {
        width: 100%;
    }
}

