/* VartaPanel - WhatsApp-inspired Design System */

:root {
    /* WhatsApp Colors */
    --wa-green: #25D366;
    --wa-green-dark: #128C7E;
    --wa-green-light: #DCF8C6;
    --wa-teal: #075E54;
    --wa-blue: #34B7F1;
    --wa-gray: #ECE5DD;
    
    /* Extended Color Palette */
    --primary: #25D366;
    --secondary: #128C7E;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    --light: #F8FAFC;
    --dark: #1F2937;
    
    /* Text Colors */
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-light: #D1D5DB;
    
    /* Background Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --bg-chat: #E5DDD5;
    
    /* Border & Shadow */
    --border-color: #E5E7EB;
    --border-radius: 0.75rem;
    --border-radius-lg: 1rem;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 3rem;
    
    /* Typography */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

/* Authentication Page Styles */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--wa-green) 0%, var(--wa-green-dark) 100%);
    display: flex;
    flex-direction: column;
}

/* Auth Card Styling */
.auth-card {
    background-color: #FFFFFF !important;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid #E5E7EB !important;
}

.auth-card .card-body {
    background-color: #FFFFFF !important;
    color: #1F2937 !important;
    padding: 2rem;
}

.auth-card .card-header {
    background-color: #F9FAFB !important;
    border-bottom: 1px solid #E5E7EB !important;
    color: #1F2937 !important;
}

.auth-card .nav-pills .nav-link {
    color: #6B7280 !important;
    background-color: #F3F4F6 !important;
    border: 1px solid #E5E7EB !important;
}

.auth-card .nav-pills .nav-link.active {
    background-color: #25D366 !important;
    color: white !important;
    border-color: #25D366 !important;
}

.auth-card .nav-pills .nav-link:not(.active):hover {
    background-color: #E5E7EB !important;
    color: #1F2937 !important;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    flex: 1;
}

.auth-branding {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    margin: 2rem;
    padding: 3rem;
    animation: fadeInLeft 0.6s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.auth-card {
    animation: fadeInRight 0.6s ease-out;
}

.brand-logo i {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.features-list {
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
}

/* Form Styles - Force Light Theme for Auth Pages */
.form-control-lg {
    border: 2px solid #E5E7EB !important;
    border-radius: var(--border-radius);
    transition: all var(--transition-base);
    font-size: var(--font-size-base);
    padding: 0.75rem 1rem;
    min-height: 50px;
    background-color: #FFFFFF !important;
    color: #1F2937 !important;
}

.form-control-lg:focus {
    border-color: #25D366 !important;
    box-shadow: 0 0 0 0.2rem rgba(37, 211, 102, 0.25) !important;
    background-color: #FFFFFF !important;
    color: #1F2937 !important;
}

.form-control-lg::placeholder {
    color: #9CA3AF !important;
    opacity: 1;
}

/* Form Labels */
.form-label {
    color: #1F2937 !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-label i {
    color: #25D366 !important;
}

/* Form Validation Messages */
.invalid-feedback {
    color: #EF4444 !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    color: #10B981 !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-control.is-invalid {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.25) !important;
}

.form-control.is-valid {
    border-color: #10B981 !important;
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25) !important;
}

/* Language Selector */
.form-select {
    background-color: #FFFFFF !important;
    color: #1F2937 !important;
    border-color: #E5E7EB !important;
}

.form-select:focus {
    border-color: #25D366 !important;
    box-shadow: 0 0 0 0.2rem rgba(37, 211, 102, 0.25) !important;
}

.input-group .form-control-lg {
    border-right: none !important;
}

.input-group .btn {
    border: 2px solid #E5E7EB !important;
    border-left: none !important;
    background-color: #F9FAFB !important;
    color: #6B7280 !important;
}

.input-group .btn:hover {
    background-color: #F3F4F6 !important;
    color: #1F2937 !important;
}

.input-group .form-control-lg:focus + .btn {
    border-color: #25D366 !important;
}

/* Button Styles */
.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all var(--transition-base);
    border: none;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-success {
    background-color: var(--wa-green);
    border-color: var(--wa-green);
    color: white;
}

.btn-success:hover,
.btn-success:focus {
    background-color: var(--wa-green-dark);
    border-color: var(--wa-green-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--wa-green);
    color: var(--wa-green);
}

/* Navigation Pills */
.nav-pills .nav-link {
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all var(--transition-base);
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-pills .nav-link.active {
    background-color: var(--wa-green);
    border-color: var(--wa-green);
}

.nav-pills .nav-link:not(.active) {
    color: var(--text-secondary);
    background-color: var(--bg-tertiary);
}

.nav-pills .nav-link:not(.active):hover {
    background-color: var(--wa-green-light);
    color: var(--wa-green-dark);
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
}

.alert-danger {
    background-color: #FEE2E2;
    color: #991B1B;
}

.alert-success {
    background-color: #D1FAE5;
    color: #065F46;
}

.alert-warning {
    background-color: #FEF3C7;
    color: #92400E;
}

/* Card Styles - Force Light Theme */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    background-color: #FFFFFF !important;
    color: #1F2937 !important;
    border: 1px solid #E5E7EB !important;
}

/* Dashboard Card Headers */
.card-header {
    background-color: #F9FAFB !important;
    border-bottom: 1px solid #E5E7EB !important;
    color: #1F2937 !important;
}

.card-header h5 {
    color: #1F2937 !important;
    font-weight: 600;
}

.card-header .btn-outline-success {
    color: #25D366 !important;
    border-color: #25D366 !important;
    background-color: transparent !important;
}

.card-header .btn-outline-success:hover {
    background-color: #25D366 !important;
    color: white !important;
}

/* Dashboard Card Bodies */
.card-body {
    background-color: #FFFFFF !important;
    color: #1F2937 !important;
}

/* Empty State Styling */
.card .text-center {
    background-color: #FFFFFF !important;
    color: #1F2937 !important;
}

.card .text-center .text-muted {
    color: #6B7280 !important;
}

.card .text-center i.fa-3x {
    color: #9CA3AF !important;
}

.card .text-center .btn-success {
    background-color: #25D366 !important;
    border-color: #25D366 !important;
    color: white !important;
}

/* List Group Items in Cards */
.card .list-group-item {
    background-color: #FFFFFF !important;
    color: #1F2937 !important;
    border-color: #E5E7EB !important;
}

.card .list-group-item:hover {
    background-color: #F9FAFB !important;
    color: #1F2937 !important;
}

.card .list-group-item h6 {
    color: #1F2937 !important;
}

.card .list-group-item p {
    color: #1F2937 !important;
}

.card .list-group-item .text-muted {
    color: #6B7280 !important;
}

.card .list-group-item small {
    color: #6B7280 !important;
}

/* Customer Avatar in Cards */
.customer-avatar {
    background-color: #25D366 !important;
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Status Badges in Cards */
.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pending {
    background-color: #FEF3C7 !important;
    color: #92400E !important;
}

.status-confirmed {
    background-color: #D1FAE5 !important;
    color: #065F46 !important;
}

.status-processing {
    background-color: #DBEAFE !important;
    color: #1E40AF !important;
}

.status-delivered {
    background-color: #D1FAE5 !important;
    color: #065F46 !important;
}

.status-cancelled {
    background-color: #FEE2E2 !important;
    color: #991B1B !important;
}

/* Template Card Specific Styles - Force Light Theme */
/* Shared card style for Templates and Auto Replies (Templates-style UI) */
.template-card,
.auto-reply-card {
    background-color: #FFFFFF !important;
    color: #1F2937 !important;
    border: 1px solid #E5E7EB !important;
}

.template-card .card-header {
    background-color: #F9FAFB !important;
    border-bottom: 1px solid #E5E7EB !important;
    color: #1F2937 !important;
}

.template-card .card-header h6 {
    color: #1F2937 !important;
    font-weight: 600;
}

.template-card .card-body {
    background-color: #FFFFFF !important;
    color: #1F2937 !important;
}

.template-card .card-footer {
    background-color: #F9FAFB !important;
    border-top: 1px solid #E5E7EB !important;
    color: #6B7280 !important;
}

.template-card .message-preview {
    background-color: #F3F4F6 !important;
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    border: 1px solid #E5E7EB !important;
}

.template-card .message-preview p {
    color: #6B7280 !important;
    margin: 0;
}

.template-card small {
    color: #6B7280 !important;
}

/* Override Bootstrap text-muted classes in template cards */
.template-card .text-muted {
    color: #6B7280 !important;
}

/* Ensure all text in template cards is visible */
.template-card * {
    color: inherit !important;
}

.template-card h1, .template-card h2, .template-card h3, 
.template-card h4, .template-card h5, .template-card h6 {
    color: #1F2937 !important;
}

.template-card p {
    color: #1F2937 !important;
}

/* Badge Improvements for Better Visibility */
.template-card .badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

.template-card .badge.bg-primary {
    background-color: #25D366 !important;
    color: white !important;
}

.template-card .badge.bg-secondary {
    background-color: #6B7280 !important;
    color: white !important;
}

.template-card .badge.bg-success {
    background-color: #10B981 !important;
    color: white !important;
}

/* Action Buttons in Template Cards */
.template-card .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius);
}

.template-card .btn-outline-primary {
    color: var(--wa-green);
    border-color: var(--wa-green);
}

.template-card .btn-outline-primary:hover {
    background-color: var(--wa-green);
    color: white;
}

.template-card .btn-outline-danger {
    color: var(--danger);
    border-color: var(--danger);
}

.template-card .btn-outline-danger:hover {
    background-color: var(--danger);
    color: white;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Fix for card body padding consistency */
.card-body {
    padding: var(--spacing-lg);
}

@media (max-width: 576px) {
    .card-body {
        padding: var(--spacing-md);
    }
}

/* Password Strength Indicator */
.password-strength {
    margin-top: var(--spacing-xs);
}

/* Dashboard Styles - prevent black bar at bottom / right (unselectable = viewport/canvas gap) */
/* Force light color scheme so browser dark mode doesn't paint black in gaps (Messages, Catalog, etc.) */
html {
    color-scheme: light;
    height: 100%;
    min-height: 100vh;
    background-color: #F9FAFB !important;
    overflow-x: hidden;
}
/* Cover entire viewport at root so no black shows through from browser canvas */
html::before {
    content: '';
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: #F9FAFB;
    z-index: -2;
    pointer-events: none;
}
body.dashboard-page {
    color-scheme: light;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #F9FAFB !important;
    margin: 0;
    padding: 0;
    position: relative;
}
/* Second layer on body so gap below/right is always light */
body.dashboard-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: #F9FAFB;
    z-index: -1;
    pointer-events: none;
}
/* Wrapper (sidebar + main-content) must fill viewport so no dark gap below */
body.dashboard-page > div.d-flex {
    flex: 1 1 auto;
    min-height: 100vh;
    display: flex;
    background-color: #F9FAFB !important;
}
body.dashboard-page .main-content {
    flex: 1;
    min-height: 100vh;
    background-color: #F9FAFB !important;
}

.navbar-brand {
    font-weight: 700;
    color: white;
}

.navbar-brand i {
    margin-right: var(--spacing-sm);
}

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, var(--wa-green) 0%, var(--wa-green-dark) 100%);
    color: white;
    min-height: 100vh;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
    width: 280px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 769px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 1000;
    }
    
    .main-content {
        margin-left: 280px;
        width: calc(100% - 280px);
    }
}

.sidebar-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
    padding: var(--spacing-md);
    flex: 1;
}

.sidebar-item {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-sm);
    transition: all var(--transition-base);
}

.sidebar-item:hover,
.sidebar-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

.sidebar-item i {
    width: 20px;
    margin-right: var(--spacing-md);
    text-align: center;
}

/* Main Content - Force Light Theme */
.main-content {
    flex: 1;
    padding: var(--spacing-lg);
    overflow-x: auto;
    min-width: 0;
    background-color: #F9FAFB !important;
    color: #1F2937 !important;
}

/* Page Headers - Force Light Theme */
.page-header {
    background-color: #FFFFFF !important;
    color: #1F2937 !important;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid #E5E7EB !important;
}

.page-header h1 {
    color: #1F2937 !important;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.page-header p {
    color: #6B7280 !important;
    margin-bottom: 0;
}

/* Stats Cards */
.stats-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--wa-green);
    transition: all var(--transition-base);
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stats-number {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--wa-green);
    margin-bottom: var(--spacing-sm);
}

.stats-label {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Message Bubbles */
.message-bubble {
    max-width: 70%;
    margin-bottom: var(--spacing-md);
    animation: slideInUp 0.3s ease-out;
}

.message-bubble.incoming {
    background-color: white;
    border-radius: var(--border-radius) var(--border-radius) var(--border-radius) 0.25rem;
    box-shadow: var(--shadow-sm);
}

.message-bubble.outgoing {
    background-color: var(--wa-green-light);
    border-radius: var(--border-radius) var(--border-radius) 0.25rem var(--border-radius);
    margin-left: auto;
}

.message-content {
    padding: var(--spacing-md);
}

.message-time {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    text-align: right;
    margin-top: var(--spacing-xs);
}

/* Customer Cards */
.customer-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    overflow: hidden;
}

.customer-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.customer-header {
    background: linear-gradient(135deg, var(--wa-green), var(--wa-green-dark));
    color: white;
    padding: var(--spacing-lg);
    position: relative;
}

.customer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

/* Order Status */
.status-badge {
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 9999px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pending {
    background-color: #FEF3C7;
    color: #92400E;
}

.status-confirmed {
    background-color: #D1FAE5;
    color: #065F46;
}

.status-processing {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.status-delivered {
    background-color: #D1FAE5;
    color: #065F46;
}

.status-cancelled {
    background-color: #FEE2E2;
    color: #991B1B;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.quick-action-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
}

.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    border-color: var(--wa-green);
}

.quick-action-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--wa-green-light);
    color: var(--wa-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-2xl);
    margin: 0 auto var(--spacing-md);
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-branding {
        display: none;
    }
    
    .main-content {
        padding: var(--spacing-md);
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .form-control-lg {
        font-size: var(--font-size-base);
        padding: 0.625rem 0.875rem;
        min-height: 48px;
    }
    
    .btn {
        min-height: 48px;
        font-size: var(--font-size-base);
    }
    
    /* Mobile sidebar */
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        z-index: 1050;
        transition: left 0.3s ease;
        width: 280px;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* Mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1051;
        background: var(--wa-green);
        color: white;
        border: none;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        box-shadow: var(--shadow-lg);
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: var(--spacing-sm);
    }
    
    .card-body {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .stats-number {
        font-size: var(--font-size-2xl);
    }
}

/* Animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(37, 211, 102, 0.3);
    border-radius: 50%;
    border-top-color: var(--wa-green);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton Loading */
.skeleton {
    animation: pulse 1.5s ease-in-out infinite alternate;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border-color) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Utility Classes */
.text-wa-green {
    color: var(--wa-green) !important;
}

.bg-wa-green {
    background-color: var(--wa-green) !important;
}

.border-wa-green {
    border-color: var(--wa-green) !important;
}

.shadow-wa {
    box-shadow: 0 10px 25px -5px rgba(37, 211, 102, 0.1), 0 4px 6px -2px rgba(37, 211, 102, 0.05);
}

/* Layout Fixes */
.container-fluid {
    max-width: 100%;
    overflow-x: hidden;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-auto, .col-sm, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-auto,
.col-md, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-md-auto,
.col-lg, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-auto,
.col-xl, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-auto {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Print Styles */
@media print {
    .sidebar,
    .navbar,
    .btn,
    .alert {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid var(--border-color) !important;
    }
}

/* Dark Mode Support - Disabled for Template Cards */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #F9FAFB;
        --text-secondary: #D1D5DB;
        --text-muted: #9CA3AF;
        --bg-primary: #1F2937;
        --bg-secondary: #111827;
        --bg-tertiary: #374151;
        --border-color: #4B5563;
    }
    
    .auth-page {
        background: linear-gradient(135deg, var(--wa-teal) 0%, #1F2937 100%);
    }
    
    .card {
        background-color: #FFFFFF !important;
        color: #1F2937 !important;
        border: 1px solid #E5E7EB !important;
    }
    
    .card-header {
        background-color: #F9FAFB !important;
        border-bottom: 1px solid #E5E7EB !important;
        color: #1F2937 !important;
    }
    
    .card-header h5 {
        color: #1F2937 !important;
    }
    
    .card-header .btn-outline-success {
        color: #25D366 !important;
        border-color: #25D366 !important;
        background-color: transparent !important;
    }
    
    .card-body {
        background-color: #FFFFFF !important;
        color: #1F2937 !important;
    }
    
    .card .text-center {
        background-color: #FFFFFF !important;
        color: #1F2937 !important;
    }
    
    .card .text-center .text-muted {
        color: #6B7280 !important;
    }
    
    .card .text-center i.fa-3x {
        color: #9CA3AF !important;
    }
    
    .card .list-group-item {
        background-color: #FFFFFF !important;
        color: #1F2937 !important;
        border-color: #E5E7EB !important;
    }
    
    .card .list-group-item:hover {
        background-color: #F9FAFB !important;
    }
    
    .card .list-group-item h6 {
        color: #1F2937 !important;
    }
    
    .card .list-group-item p {
        color: #1F2937 !important;
    }
    
    .card .list-group-item .text-muted {
        color: #6B7280 !important;
    }
    
    .card .list-group-item small {
        color: #6B7280 !important;
    }
    
    .form-control-lg {
        background-color: #FFFFFF !important;
        color: #1F2937 !important;
        border-color: #E5E7EB !important;
    }
    
    .form-control-lg:focus {
        background-color: #FFFFFF !important;
        color: #1F2937 !important;
        border-color: #25D366 !important;
    }
    
    .form-control-lg::placeholder {
        color: #9CA3AF !important;
    }
    
    .form-label {
        color: #1F2937 !important;
    }
    
    .form-label i {
        color: #25D366 !important;
    }
    
    .input-group .btn {
        background-color: #F9FAFB !important;
        color: #6B7280 !important;
        border-color: #E5E7EB !important;
    }
    
    .auth-card {
        background-color: #FFFFFF !important;
        border-color: #E5E7EB !important;
    }
    
    .auth-card .card-body {
        background-color: #FFFFFF !important;
        color: #1F2937 !important;
    }
    
    .auth-card .card-header {
        background-color: #F9FAFB !important;
        color: #1F2937 !important;
    }
    
    .auth-card .nav-pills .nav-link {
        color: #6B7280 !important;
        background-color: #F3F4F6 !important;
    }
    
    .auth-card .nav-pills .nav-link.active {
        background-color: #25D366 !important;
        color: white !important;
    }
    
    /* Force template cards to stay light even in dark mode */
    .template-card {
        background-color: #FFFFFF !important;
        color: #1F2937 !important;
        border: 1px solid #E5E7EB !important;
    }
    
    .template-card .card-header {
        background-color: #F9FAFB !important;
        color: #1F2937 !important;
        border-bottom: 1px solid #E5E7EB !important;
    }
    
    .template-card .card-body {
        background-color: #FFFFFF !important;
        color: #1F2937 !important;
    }
    
    .template-card .card-footer {
        background-color: #F9FAFB !important;
        color: #6B7280 !important;
        border-top: 1px solid #E5E7EB !important;
    }
    
    .template-card .message-preview {
        background-color: #F3F4F6 !important;
        color: #6B7280 !important;
    }
    
    .template-card .message-preview p {
        color: #6B7280 !important;
    }
    
    .template-card .text-muted {
        color: #6B7280 !important;
    }
    
    .template-card h1, .template-card h2, .template-card h3, 
    .template-card h4, .template-card h5, .template-card h6 {
        color: #1F2937 !important;
    }
    
    .template-card p {
        color: #1F2937 !important;
    }
    
    .template-card small {
        color: #6B7280 !important;
    }
}

/* Orders table alignment */
.orders-table .actions-cell {
    white-space: nowrap;
}

.orders-table .actions-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: visible;
}

.orders-table .actions-cell .form-select {
    min-width: 140px;
    padding-right: 2rem;
    background-color: #fff;
    background-position: right 0.75rem center;
    border: 1px solid #d0d5dd !important;
    box-shadow: none !important;
    outline: none !important;
    appearance: none;
    --bs-form-select-focus-border-color: #d0d5dd;
    --bs-form-select-focus-box-shadow: none;
    --bs-focus-ring-color: transparent;
    border-right-color: #d0d5dd !important;
    border-left-color: #d0d5dd !important;
    border-top-color: #d0d5dd !important;
    border-bottom-color: #d0d5dd !important;
}

.orders-table .actions-cell .form-select.clean-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: none !important;
    background-color: #fff !important;
    box-shadow: none !important;
    outline: none !important;
}

.orders-table .actions-cell .form-select.clean-select::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
}

.orders-table .actions-cell .form-select.clean-select::-webkit-scrollbar-thumb {
    background: transparent !important;
}

.orders-table .actions-cell .btn-group .btn {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}

.orders-table .actions-cell .form-select:focus,
.orders-table .actions-cell .form-select:focus-visible,
.orders-table .actions-cell .form-select::-moz-focus-inner,
.orders-table .actions-cell .form-select::-webkit-focus-inner {
    border-color: #d0d5dd !important;
    box-shadow: none !important;
    outline: none !important;
    border-right-color: #d0d5dd !important;
    border-left-color: #d0d5dd !important;
    border-top-color: #d0d5dd !important;
    border-bottom-color: #d0d5dd !important;
    background-image: none !important;
    -webkit-tap-highlight-color: transparent;
}

.orders-table .actions-cell:focus-within {
    outline: none !important;
    box-shadow: none !important;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States */
*:focus {
    outline: 2px solid var(--wa-green);
    outline-offset: 2px;
}

.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(37, 211, 102, 0.25);
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    .btn-success {
        border: 2px solid var(--wa-green-dark);
    }
    
    .form-control-lg {
        border-width: 3px;
    }
    
    .card {
        border: 2px solid var(--border-color);
    }
}