/* Login Page Styles */
.login-page {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.login-card {
    margin-top: -10vh;
}

.login-card .card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background-color: #ffffff;
}

.login-card .card-body {
    padding: 2rem;
}

/* Global Override for Black/Gray/White Theme */
body {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

/* Navigation Bar - Black Theme */
.navbar {
    background-color: #000000 !important;
    border-bottom: 1px solid #333333;
}

.navbar-brand {
    font-weight: bold;
    color: #ffffff !important;
}

.navbar-nav .nav-link {
    color: #ffffff !important;
}

.navbar-nav .nav-link:hover {
    color: #cccccc !important;
}

.dropdown-menu {
    background-color: #2d2d2d;
    border: 1px solid #444444;
}

.dropdown-item {
    color: #ffffff !important;
}

.dropdown-item:hover {
    background-color: #444444 !important;
    color: #ffffff !important;
}

/* Sidebar - Gray Theme */
.sidebar {
    background-color: #2d2d2d !important;
    min-height: calc(100vh - 56px);
    padding: 1rem 0;
    border-right: 1px solid #444444;
}

.sidebar .nav-link {
    color: #cccccc !important;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0.25rem 0.5rem;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: #444444 !important;
    color: #ffffff !important;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
}

/* Main Content Area */
.main-content {
    background-color: #f8f9fa;
    min-height: calc(100vh - 56px);
}

/* Cards - White with Gray Borders */
.card {
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6 !important;
    color: #212529 !important;
}

.card-body {
    background-color: #ffffff !important;
    color: #212529 !important;
}

/* Buttons - Black, Gray, White Theme */
.btn-primary {
    background-color: #000000 !important;
    border-color: #000000 !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: #333333 !important;
    border-color: #333333 !important;
}

.btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

.btn-secondary:hover {
    background-color: #545b62 !important;
    border-color: #545b62 !important;
}

.btn-outline-primary {
    color: #000000 !important;
    border-color: #000000 !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    background-color: #000000 !important;
    border-color: #000000 !important;
    color: #ffffff !important;
}

.btn-outline-secondary {
    color: #6c757d !important;
    border-color: #6c757d !important;
    background-color: transparent !important;
}

.btn-outline-secondary:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

.btn-success {
    background-color: #2d2d2d !important;
    border-color: #2d2d2d !important;
    color: #ffffff !important;
}

.btn-success:hover {
    background-color: #404040 !important;
    border-color: #404040 !important;
}

.btn-outline-success {
    color: #2d2d2d !important;
    border-color: #2d2d2d !important;
}

.btn-outline-success:hover {
    background-color: #2d2d2d !important;
    border-color: #2d2d2d !important;
    color: #ffffff !important;
}

/* Statistics Cards - Black, Gray, White */
.card.bg-primary {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.card.bg-warning {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

.card.bg-success {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
}

.card.bg-info {
    background-color: #404040 !important;
    color: #ffffff !important;
}

/* Tables */
.table {
    background-color: #ffffff !important;
    color: #212529 !important;
}

.table thead th {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #333333 !important;
}

.table tbody tr:hover {
    background-color: #f8f9fa !important;
}

.table-warning {
    background-color: #f8f9fa !important;
}

/* Forms */
.form-control {
    background-color: #ffffff !important;
    border: 1px solid #ced4da !important;
    color: #212529 !important;
}

.form-control:focus {
    border-color: #000000 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25) !important;
}

.form-select {
    background-color: #ffffff !important;
    border: 1px solid #ced4da !important;
    color: #212529 !important;
}

.form-select:focus {
    border-color: #000000 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25) !important;
}

/* Invoice Status Badges */
.badge.bg-primary {
    background-color: #000000 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

.badge.bg-success {
    background-color: #2d2d2d !important;
}

/* Invoice List Styles */
.invoice-status {
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending {
    color: #6c757d !important;
}

.status-completed {
    color: #000000 !important;
}

.status-cancelled {
    color: #dc3545 !important;
}

.table-actions {
    white-space: nowrap;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Form Sections */
.form-section {
    background-color: #f8f9fa !important;
    padding: 1.5rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
}

.form-section h5 {
    margin-bottom: 1rem;
    color: #212529 !important;
}

/* Invoice Items Styles */
.invoice-items-table {
    background-color: #ffffff !important;
}

.invoice-items-table th {
    background-color: #000000 !important;
    color: #ffffff !important;
    font-weight: 600;
}

.item-description textarea {
    min-height: 80px;
}

.add-item-btn {
    border: 2px dashed #6c757d !important;
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    transition: all 0.3s ease;
}

.add-item-btn:hover {
    border-color: #000000 !important;
    background-color: #e9ecef !important;
    color: #000000 !important;
}

/* Modal Customization */
.modal-content {
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
}

.modal-header {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6 !important;
}

.modal-title {
    color: #212529 !important;
}

.modal-body {
    background-color: #ffffff !important;
    color: #212529 !important;
}

.modal-footer {
    background-color: #f8f9fa !important;
    border-top: 1px solid #dee2e6 !important;
}

/* Alert Messages */
.alert {
    border: none !important;
    border-radius: 0.5rem !important;
}

.alert-success {
    background-color: #f8f9fa !important;
    color: #000000 !important;
    border-left: 4px solid #2d2d2d !important;
}

.alert-danger {
    background-color: #f8f9fa !important;
    color: #000000 !important;
    border-left: 4px solid #dc3545 !important;
}

.alert-warning {
    background-color: #f8f9fa !important;
    color: #000000 !important;
    border-left: 4px solid #6c757d !important;
}

.alert-info {
    background-color: #f8f9fa !important;
    color: #000000 !important;
    border-left: 4px solid #404040 !important;
}

/* PDF Styles */
.pdf-preview {
    border: 1px solid #dee2e6 !important;
    border-radius: 0.375rem;
    padding: 1rem;
    background-color: #f8f9fa !important;
}

/* Company Client Section Enhancement */
.company-client-section {
    border-left: 4px solid #000000 !important;
    padding-left: 1rem;
}

.invoice-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
}

.total-amount {
    font-size: 1.25rem;
    font-weight: bold;
    color: #000000 !important;
}

/* Pagination and Navigation */
.page-link {
    color: #000000 !important;
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
}

.page-link:hover {
    color: #ffffff !important;
    background-color: #000000 !important;
    border-color: #000000 !important;
}

.page-item.active .page-link {
    background-color: #000000 !important;
    border-color: #000000 !important;
    color: #ffffff !important;
}

/* Border and Divider Customization */
.border-bottom {
    border-bottom: 1px solid #dee2e6 !important;
}

.border-top {
    border-top: 1px solid #dee2e6 !important;
}

hr {
    border-color: #dee2e6 !important;
    opacity: 1;
}

/* Text Colors */
.text-muted {
    color: #6c757d !important;
}

.text-primary {
    color: #000000 !important;
}

.text-success {
    color: #2d2d2d !important;
}

.text-warning {
    color: #6c757d !important;
}

.text-danger {
    color: #dc3545 !important;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        background-color: #2d2d2d !important;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .btn-group-vertical .btn {
        margin-bottom: 0.25rem;
    }
}

/* Animation Styles */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom Focus States */
.form-control:focus,
.form-select:focus,
.btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25) !important;
}

/* Status Select Styling */
.status-select {
    width: auto !important;
    min-width: 120px;
}

.status-select option {
    background-color: #ffffff !important;
    color: #212529 !important;
}

/* Print Styles */
@media print {
    .sidebar,
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    body {
        background-color: #ffffff !important;
        color: #000000 !important;
    }
}

/* Additional Button Variants */
.btn-outline-info {
    color: #404040 !important;
    border-color: #404040 !important;
}

.btn-outline-info:hover {
    background-color: #404040 !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

.btn-outline-danger {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.btn-outline-danger:hover {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

/* Form Validation States */
.is-invalid {
    border-color: #dc3545 !important;
}

.is-valid {
    border-color: #2d2d2d !important;
}

.invalid-feedback {
    color: #dc3545 !important;
}

.valid-feedback {
    color: #2d2d2d !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f8f9fa;
}

::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2d2d2d;
}