
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

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

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

/* Accessible focus outlines */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Navbar Styling */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Dropdown visibility and animation */
.dropdown-menu {
    z-index: 1050;
    will-change: transform, opacity;
    transform-origin: top right;
    transition: opacity 160ms ease, transform 160ms ease;
    opacity: 0;
    transform: translateY(-6px);
}
.dropdown-menu.show {
    opacity: 1;
    transform: translateY(0);
}

/* Card Styling */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* Button Styling */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Invoice button */
.btn-invoice {
    background: linear-gradient(135deg, #0d6efd 0%, #3b82f6 100%);
    border: none;
    color: #fff;
}
.btn-invoice:hover {
    filter: brightness(1.05);
    box-shadow: 0 8px 16px rgba(13, 110, 253, 0.25);
}
.btn-invoice:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Form Styling */
.form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 12px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Alert Styling */
.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
}

/* Badge Styling */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* Table Styling */
.table {
    background: white;
    border-radius: 10px;
}

.table thead th {
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

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

/* DataTables enhancements */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 6px 10px;
    margin-left: 8px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    border: 1px solid #e0e0e0 !important;
    margin: 0 2px !important;
    padding: 4px 10px !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--light-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: #fff !important;
    border-color: transparent !important;
}
.dataTables_wrapper .dataTables_info {
    color: #666;
}
.table td, .table th {
    vertical-align: middle;
}
.table th.text-end, .table td.text-end {
    text-align: right !important;
}
.table .text-nowrap {
    white-space: nowrap;
}

/* Dashboard Stats Card */
.stats-card {
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
}

/* Sidebar Styling */
.sidebar {
    min-height: 100vh;
    background: white;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar .nav-link {
    color: #666;
    padding: 12px 20px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: #f8f9fa;
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .card {
        margin-bottom: 20px;
    }
    
    .stats-card {
        margin-bottom: 15px;
    }
}

/* Chat Message Styling */
.message {
    display: flex;
    margin-bottom: 15px;
    animation: slideIn 0.3s ease;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.message-content {
    background: white;
    padding: 10px 15px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 70%;
}
/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Utility Classes */
.text-primary-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}
