/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --bg-dark: #1e293b;
    --bg-darker: #0f172a;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 70px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-size: 100%;
    zoom: 1;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1rem;
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-box {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    position: relative;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    margin-bottom: 25px;
    color: var(--text-primary);
    font-size: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.forgot-password-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.auth-switch {
    margin-top: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Alert Messages */
.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    display: none;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.alert.show {
    display: block;
}

.alert.success {
    background: var(--success-color);
    color: white;
}

.alert.error {
    background: var(--danger-color);
    color: white;
}

.alert.info {
    background: var(--primary-color);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-darker);
    color: white;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
    zoom: 1;
    transform: scale(1);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 70px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.sidebar-logo i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.sidebar-header h2 {
    font-size: 1.3rem;
    white-space: nowrap;
    overflow: hidden;
    margin: 0;
    font-weight: 600;
}

.sidebar.collapsed .sidebar-header h2 {
    display: none;
}

.sidebar.collapsed .sidebar-logo {
    justify-content: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    display: none;
}

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

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    position: relative;
    border-radius: 0 8px 8px 0;
    margin: 2px 0;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 0;
    background: var(--primary-color);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 2px 2px 0;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    padding-left: 24px;
}

.nav-item:hover::before {
    transform: translateY(-50%) scaleY(1);
    height: 60%;
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: white;
    border-left-color: var(--primary-color);
    font-weight: 500;
}

.nav-item.active::before {
    transform: translateY(-50%) scaleY(1);
    height: 70%;
}

.nav-item i {
    width: 24px;
    min-width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.nav-item:hover i {
    transform: scale(1.1);
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 14px;
    border-radius: 8px;
    margin: 4px 8px;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.sidebar.collapsed .nav-item i {
    margin-right: 0;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-avatar {
    flex-shrink: 0;
}

.user-avatar i {
    font-size: 2rem;
    margin-right: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    margin-left: 12px;
    flex: 1;
    min-width: 0;
}

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

.user-role {
    font-size: 0.75rem;
    color: var(--text-light);
    opacity: 0.8;
}

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

.sidebar.collapsed .user-avatar {
    margin: 0 auto;
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    font-size: 0.95rem;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.2);
}

.btn-logout:active {
    transform: translateY(0);
}

.sidebar.collapsed .btn-logout {
    padding: 12px;
}

.sidebar.collapsed .btn-logout span {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    contain: layout;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Top Bar */
.top-bar {
    height: var(--topbar-height);
    background: white;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-primary);
    cursor: pointer;
    display: none;
    padding: 5px;
}

.page-title {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    color: var(--text-primary);
    font-weight: 500;
}

/* Tab Container */
.tab-container {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.tab-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-header:hover {
    box-shadow: var(--shadow-lg);
}

.tab-header.active {
    background: var(--primary-color);
    color: white;
}

.tab-header i {
    font-size: 0.9rem;
}

.tab-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.tab-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.tab-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    min-height: 400px;
}

.tab-content h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.tab-content p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* Bottom Navigation Bar (Mobile Only) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    height: calc(65px + env(safe-area-inset-bottom));
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    min-height: 48px;
    position: relative;
    gap: 4px;
}

.bottom-nav-item i {
    font-size: 1.3rem;
    transition: transform 0.2s ease;
}

.bottom-nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

.bottom-nav-item:hover,
.bottom-nav-item:active {
    color: var(--primary-color);
}

.bottom-nav-item:hover i {
    transform: translateY(-2px);
}

.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 3px 3px;
}

.bottom-nav-more {
    position: relative;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Hide sidebar on mobile - use bottom nav instead */
    .sidebar {
        transform: translateX(-100%);
        z-index: 1002;
        width: 280px;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    /* Sidebar overlay */
    .sidebar-overlay {
        z-index: 1001;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    /* Bottom Navigation */
    .bottom-nav {
        display: flex;
    }

    /* Adjust main content for bottom nav */
    .main-content {
        margin-left: 0;
        padding-bottom: calc(65px + env(safe-area-inset-bottom));
    }

    /* Top bar adjustments */
    .menu-toggle {
        display: block;
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
    }

    .sidebar-toggle {
        display: block;
        min-width: 44px;
        min-height: 44px;
    }

    .top-bar {
        padding: 0 12px;
        height: 60px;
    }

    .page-title {
        font-size: 1.2rem;
    }

    /* Tab container adjustments */
    .tab-container {
        padding: 15px;
        padding-bottom: calc(15px + 65px + env(safe-area-inset-bottom));
    }

    .tab-content {
        padding: 20px;
        position: relative;
        z-index: 1;
    }

    /* Hide user menu on mobile */
    .top-bar-right .user-menu {
        display: none;
    }

    .auth-box {
        padding: 30px 20px;
    }
}

/* Tablet styles (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Sidebar on tablet - default to collapsed/icons-only */
    .sidebar {
        z-index: 1000;
        transform: none;
        height: 100vh;
        bottom: 0;
        width: var(--sidebar-collapsed-width);
    }
    
    .sidebar-overlay {
        display: none;
    }
    
    /* Show toggle button on tablet */
    .sidebar-toggle {
        display: block;
        min-width: 40px;
        min-height: 40px;
    }
    
    /* Expand sidebar on hover or when not collapsed */
    .sidebar:not(.collapsed) {
        width: var(--sidebar-width);
    }
    
    .sidebar:not(.collapsed) .sidebar-header h2 {
        display: block;
    }
    
    .sidebar:not(.collapsed) .nav-item span {
        display: inline;
    }
    
    .sidebar:not(.collapsed) .user-details {
        display: flex;
    }
    
    .sidebar:not(.collapsed) .btn-logout span {
        display: inline;
    }
    
    .sidebar:not(.collapsed) .sidebar-logo {
        justify-content: flex-start;
    }
    
    /* Main content adjustments */
    .main-content {
        margin-left: var(--sidebar-collapsed-width);
        transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .sidebar:not(.collapsed) ~ .main-content,
    .sidebar:hover ~ .main-content {
        margin-left: var(--sidebar-width);
    }
    
    /* Ensure tab-content doesn't interfere with sidebar */
    .tab-content {
        position: relative;
        z-index: 1;
    }
    
    /* Better spacing for tablet */
    .top-bar {
        padding: 0 24px;
    }
    
    .tab-container {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        max-width: 320px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .alert {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    /* Smaller bottom nav items on very small screens */
    .bottom-nav-item span {
        font-size: 0.65rem;
    }
    
    .bottom-nav-item i {
        font-size: 1.2rem;
    }
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
    contain: layout;
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Dark Mode Styles */
body.dark-mode {
    --bg-color: #0f172a;
    --bg-dark: #1e293b;
    --bg-darker: #0a0f1a;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-light: #94a3b8;
    --border-color: #334155;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

body.dark-mode .auth-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

body.dark-mode .auth-box {
    background: var(--bg-dark);
    color: var(--text-primary);
}

body.dark-mode .card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
}

body.dark-mode .top-bar {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
}

body.dark-mode .tab-content {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
}

body.dark-mode .tab-header {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .tab-header.active {
    background: var(--primary-color);
    color: white;
}

body.dark-mode .form-group input {
    background: var(--bg-darker);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .form-group input:focus {
    border-color: var(--primary-color);
}

body.dark-mode .theme-toggle {
    background: var(--bg-dark);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .bottom-nav {
    background: var(--bg-dark);
    border-top-color: var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .bottom-nav-item {
    color: var(--text-secondary);
}

body.dark-mode .bottom-nav-item:hover,
body.dark-mode .bottom-nav-item:active {
    color: var(--primary-color);
}

body.dark-mode .bottom-nav-item.active {
    color: var(--primary-color);
}

/* Profile and Activity Log Styles */
.profile-form {
    max-width: 600px;
}

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

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

.activity-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: auto;
    contain: layout;
}

.activity-table th,
.activity-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.activity-table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-primary);
}

body.dark-mode .activity-table th {
    background: var(--bg-dark);
}

.activity-table tr:hover {
    background: var(--bg-color);
}

body.dark-mode .activity-table tr:hover {
    background: var(--bg-dark);
}

.activity-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.activity-badge.login {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.activity-badge.logout {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.activity-badge.profile_updated {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.activity-badge.password_changed {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.activity-badge.user_registered {
    background: rgba(139, 92, 246, 0.1);
    color: var(--secondary-color);
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--text-primary);
}

/* Small button variant */
.btn-sm {
    padding: 6px 12px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    width: auto !important;
}

.btn-sm i {
    font-size: 0.85rem;
}

/* Customers page specific styles */
.search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.status-select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.status-select:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.customers-filters {
    background: var(--bg-color);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.customers-filters .btn {
    font-size: 1rem;
}

.customers-filters .search-input {
    font-size: 1rem;
}

.customers-filters .status-select {
    font-size: 1rem;
}

body.dark-mode .customers-filters {
    background: var(--bg-dark);
    border-color: var(--border-color);
}

body.dark-mode .search-input {
    background: var(--bg-dark);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.dark-mode .search-input:focus {
    border-color: var(--primary-color);
    background: var(--bg-darker);
}

body.dark-mode .status-select {
    background: var(--bg-dark);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.dark-mode .status-select:focus {
    border-color: var(--primary-color);
    background: var(--bg-darker);
}

/* Column Selector Modal */
.column-selector-modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.column-selector-modal[style*="display: flex"],
.column-selector-modal.show {
    display: flex !important;
}

.column-modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

body.dark-mode .column-modal-content {
    background: var(--bg-dark);
    color: var(--text-primary);
}

body.dark-mode .column-modal-content h3 {
    color: var(--text-primary);
}

body.dark-mode #closeColumnModal {
    color: var(--text-secondary);
}

body.dark-mode #closeColumnModal:hover {
    color: var(--text-primary);
}

/* Column checkbox styling */
#columnCheckboxes label {
    font-size: 0.9rem;
    color: var(--text-primary);
    user-select: none;
}

#columnCheckboxes input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

#columnCheckboxes div {
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

#columnCheckboxes div:hover {
    background: var(--bg-color);
}

body.dark-mode #columnCheckboxes div:hover {
    background: var(--bg-darker);
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Profile Management Styles */
.account-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.overview-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.overview-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.overview-item div {
    display: flex;
    flex-direction: column;
}

.overview-item strong {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.overview-item span {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.preferences-section {
    margin-top: 15px;
}

.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

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

.preference-item strong {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.preference-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

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

.theme-option {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-option:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.theme-option.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.account-actions {
    margin-top: 15px;
}

.action-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

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

.action-item.danger {
    border-left: 3px solid var(--danger-color);
}

.action-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.action-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

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

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

body.dark-mode .overview-item {
    background: var(--bg-dark);
    border-color: var(--border-color);
}

body.dark-mode .theme-option {
    background: var(--bg-dark);
    border-color: var(--border-color);
}

body.dark-mode .action-item.danger {
    border-left-color: var(--danger-color);
}

/* Customers Table Container */
#customersTableContainer {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    contain: layout style;
}

#customersTableContainer > div[style*="overflow-x"] {
    max-width: 100%;
    contain: layout style;
    isolation: isolate;
}

/* Customers Table Styles */
.activity-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.activity-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

body.dark-mode .activity-badge.success {
    background: rgba(16, 185, 129, 0.2);
}

body.dark-mode .activity-badge.warning {
    background: rgba(245, 158, 11, 0.2);
}

/* Loading and Error States */
.loading-content {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.loading-content i {
    font-size: 2rem;
    margin-bottom: 15px;
    animation: spin 1s linear infinite;
}

.error-content {
    text-align: center;
    padding: 40px 20px;
    color: var(--danger-color);
}

.error-content i {
    font-size: 2rem;
    margin-bottom: 15px;
}

body.dark-mode .loading-content {
    color: var(--text-light);
}

body.dark-mode .error-content {
    color: var(--danger-color);
}

