:root {
    --gasbee-yellow: #FFD700;
    --gasbee-orange: #FFA500;
    --gasbee-dark-orange: #FF8C00;
    --gasbee-red: #DC143C;
    --gasbee-black: #000000;
    --gasbee-white: #FFFFFF;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

/* Modern Header */
.modern-header {
    background: var(--gasbee-white);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gasbee-orange);
    text-decoration: none;
}

.time-date-container {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
    display: flex;
    justify-content: start;
    align-items: center;
    gap: 2rem;
}

.welcome-message {
    font-size: 1rem !important;
    color: var(--gasbee-black);
    font-weight: 500;
    white-space: nowrap;
}

.user-name {
    color: var(--gasbee-orange);
    font-weight: bold;
}

.user-role {
    color: var(--gasbee-dark-orange);
    font-weight: 600;
    font-size: 0.9rem;
}

.time-date-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    white-space: nowrap;
}

.current-time {
    font-size: 1rem !important;
    font-weight: bold;
    color: var(--gasbee-orange);
}

.current-date {
    font-size: 1rem !important;
    color: #6c757d;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-icon, .profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--gasbee-black);
}

.notification-icon:hover, .profile-icon:hover {
    background: var(--gasbee-yellow);
    transform: scale(1.1);
}

.profile-dropdown {
    position: relative;
}

.profile-dropdown .dropdown-menu {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 200px;
}

.profile-dropdown .dropdown-item {
    padding: 0.75rem 1.5rem;
    color: var(--gasbee-black);
    transition: all 0.3s ease;
    border-radius: 0;
}

.profile-dropdown .dropdown-item:hover {
    background: var(--gasbee-yellow);
    color: var(--gasbee-black);
}

.profile-dropdown .dropdown-item i {
    width: 20px;
    text-align: center;
}


/* Modern Sidebar */
.modern-sidebar {
    background: var(--gasbee-orange);
    min-height: calc(100vh - 80px);
    width: 250px;
    position: fixed;
    left: 0;
    top: 80px;
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-nav {
    padding: 2rem 0;
}

.sidebar-nav .nav-link {
    color: var(--gasbee-white);
    padding: 1rem 2rem;
    margin: 0.25rem 1rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 500;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.sidebar-nav .nav-link.active {
    background: var(--gasbee-yellow);
    color: var(--gasbee-black);
    font-weight: bold;
}

.sidebar-nav .nav-link i {
    margin-right: 0.75rem;
    width: 20px;
}

.sidebar-actions {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    padding: 0 1rem;
}

.sidebar-btn {
    width: 100%;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border: none;
    border-radius: 15px;
    background: var(--gasbee-yellow);
    color: var(--gasbee-black);
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.sidebar-btn:hover {
    background: var(--gasbee-white);
    transform: translateY(-2px);
    color: var(--gasbee-black);
}

/* Logout button removed - now in profile dropdown */

/* Notification Dropdown */
.notification-dropdown {
    position: relative;
}

.notification-icon {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* Globally hide notification bell/dropdown across system */
.notification-dropdown { display: none !important; }

.notification-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--gasbee-red);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid var(--gasbee-black);
}

.notification-menu {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 0;
    margin-top: 0.5rem;
    min-width: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.notification-menu .dropdown-header {
    background: var(--gasbee-yellow);
    color: var(--gasbee-black);
    padding: 1rem;
    border-radius: 15px 15px 0 0;
    font-weight: bold;
}

.notification-menu .dropdown-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.notification-menu .dropdown-item:hover {
    background: var(--gasbee-yellow);
    color: var(--gasbee-black);
}

.notification-menu .dropdown-item.unread {
    background: rgba(255, 165, 0, 0.1);
    border-left: 4px solid var(--gasbee-orange);
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.notification-icon-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.notification-icon-small.alert {
    background: var(--gasbee-red);
    color: white;
}

.notification-icon-small.warning {
    background: var(--gasbee-orange);
    color: white;
}

.notification-icon-small.info {
    background: var(--gasbee-yellow);
    color: var(--gasbee-black);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: var(--gasbee-black);
}

.notification-message {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.7rem;
    color: #999;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

/* Modern Cards */
.modern-card {
    background: var(--gasbee-white);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0,0,0,0.12);
}

.section-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--gasbee-black);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.view-all-link {
    color: var(--gasbee-orange);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.view-all-link:hover {
    color: var(--gasbee-dark-orange);
}

/* Modern Buttons */
.btn-modern {
    background: linear-gradient(135deg, var(--gasbee-orange) 0%, var(--gasbee-dark-orange) 100%);
    border: none;
    color: var(--gasbee-white);
    border-radius: 15px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Compact size modifier for smaller buttons */
.btn-modern.btn-compact {
    padding: 0.4rem 0.9rem;
    border-radius: 10px;
    font-size: 0.9rem;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 165, 0, 0.4);
    color: var(--gasbee-white);
}

.btn-modern.secondary {
    background: var(--gasbee-yellow);
    color: var(--gasbee-black);
}

.btn-modern.secondary:hover {
    background: var(--gasbee-white);
    color: var(--gasbee-black);
}

.btn-modern.danger {
    background: var(--gasbee-red);
    color: var(--gasbee-white);
}

.btn-modern.danger:hover {
    background: #c82333;
    color: var(--gasbee-white);
}

/* Modern Tables */
.modern-table {
    background: var(--gasbee-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
}

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

.modern-table th {
    background: var(--gasbee-orange);
    color: var(--gasbee-white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.modern-table td {
    padding: 1rem;
    border-bottom: 1px solid #f8f9fa;
}

.modern-table tr:hover {
    background: #f8f9fa;
}

/* Modern Forms */
.modern-form {
    background: var(--gasbee-white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gasbee-black);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--gasbee-orange);
    box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .modern-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        margin-top: -20px;
        height: 100%;
    }
    
    .main-content { margin-left: 0; }
    
    /* Compact header info on mobile */
    .time-date-container {
        display: flex;
        flex-direction: column;
        align-items: center; /* center align */
        gap: 0.25rem;
        margin: 0; /* remove side margins from desktop */
        width: auto;
        max-width: 100%;
        text-align: center; /* center text */
    }
    .welcome-message { display: none !important; }
    .time-date-group { display: none !important; }

    .header-actions { gap: 0.5rem; }

    /* Header compact spacing and wrap */
    .modern-header { 
        padding: 0.5rem 1rem; 
        flex-wrap: wrap; 
        align-items: flex-start; 
        position: relative;
        height: auto !important;
        min-height: 60px;
    }
    .header-left .brand-logo { 
        font-size: 1.25rem; 
        white-space: nowrap; 
        overflow: hidden; 
        text-overflow: ellipsis; 
        margin-left: 0.5rem; 
        max-width: 70vw; 
    }

    /* First row: brand left, profile right; second row: welcome full-width */
    .modern-header .header-left { 
        order: 1; 
        flex: 1 1 auto; 
        align-self: flex-start;
    }
    .modern-header .header-actions { 
        order: 1; 
        margin-left: auto; 
        position: absolute;
        top: 0.5rem;
        right: 1rem;
        z-index: 10;
    }
    .modern-header .time-date-container { 
        order: 2; 
        flex: 0 0 100%; 
        width: 100%; 
        margin: 0.25rem 0 0 0; 
    }

    .notification-icon, .profile-icon { width: 36px; height: 36px; }
    .hamburger-menu { width: 36px; height: 36px; }
    
    /* Mobile profile dropdown user info */
    .user-info-mobile {
        padding: 8px 0;
        text-align: center;
    }
    .user-name-mobile {
        font-size: 14px;
        font-weight: 600;
        color: var(--gasbee-black);
        margin-bottom: 2px;
    }
    .user-role-mobile {
        font-size: 12px;
        color: var(--gasbee-orange);
        font-weight: 500;
    }
}

/* Sidebar toggle states (shared across roles) */
body.sidebar-hidden .modern-sidebar {
    transform: translateX(-260px);
}

.modern-header + .main-content,
.modern-header + .pos-container {
    margin-left: 250px;
}

body.sidebar-hidden .main-content,
body.sidebar-hidden .pos-container {
    margin-left: 0 !important;
}

/* Ensure sidebar shows when explicitly opened (all breakpoints) */
body.sidebar-open .modern-sidebar {
    transform: translateX(0) !important;
}

.hamburger-menu {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--gasbee-black);
    border: none;
    font-size: 1.1rem;
    margin-right: 0.75rem;
}
.hamburger-menu:hover {
    background: var(--gasbee-yellow);
    transform: scale(1.05);
}

/* Hide hamburger menu on desktop/PC mode */
@media (min-width: 768px) {
    .hamburger-menu {
        display: none !important;
    }
}

/* Align brand and hamburger */
.header-left {
    display: flex;
    align-items: center;
}

/* Chart Container Styles */
.chart-container {
    height: 300px;
    position: relative;
    width: 100%;
}

.chart-container canvas {
    max-height: 300px !important;
    height: 300px !important;
}

/* Password Toggle Styles */
.password-toggle-container {
    position: relative;
    display: block;
    width: 100%;
}

.password-toggle-container .form-control {
    padding-right: 50px;
    width: 100%;
}

.password-toggle-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #495057;
    cursor: pointer;
    padding: 8px 10px;
    font-size: 14px;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn:hover {
    background: var(--gasbee-orange);
    color: white;
    border-color: var(--gasbee-orange);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.password-toggle-btn:focus {
    outline: none;
    background: var(--gasbee-orange);
    color: white;
    border-color: var(--gasbee-orange);
    box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.25);
}

/* For input groups with icons */
.input-group .password-toggle-container {
    flex: 1;
}

.input-group .password-toggle-btn {
    right: 12px;
}

.input-group .password-toggle-container .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Ensure proper spacing for different input types */
.form-control:focus + .password-toggle-btn,
.password-toggle-container:focus-within .password-toggle-btn {
    border-color: var(--gasbee-orange);
}

/* Dark theme compatibility */
.dark-theme .password-toggle-btn {
    background: rgba(0, 0, 0, 0.8);
    border-color: #495057;
    color: #fff;
}

.dark-theme .password-toggle-btn:hover {
    background: var(--gasbee-orange);
    color: white;
}

/* For login page specific styling */
.login-container .password-toggle-btn {
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #495057;
}

.login-container .password-toggle-btn:hover {
    background: var(--gasbee-yellow);
    color: var(--gasbee-black);
    border-color: var(--gasbee-yellow);
}

/* Ensure proper alignment for all input types */
.form-control {
    box-sizing: border-box;
}

.password-toggle-container .form-control:focus {
    border-color: var(--gasbee-orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 165, 0, 0.25);
}
