/* Custom styles for Payment System */

/* Left Sidebar Navigation Layout */
.layout-wrapper {
    display: flex;
    min-height: calc(100vh - 76px); /* Subtract header height */
}

.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: 76px;
    background-color: #1565c0 !important;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.sidebar {
    position: fixed;
    top: 76px; /* Height of top header */
    left: 0;
    width: 280px;
    height: calc(100vh - 76px);
    background-color: #fff !important;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    z-index: 1020;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-content {
    padding: 1.5rem 0;
}

.sidebar .nav-link {
    color: #333 !important;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.sidebar .nav-link:hover {
    background-color: rgba(66, 165, 245, 0.1);
    border-left-color: #42a5f5;
}

.sidebar .nav-link.active {
    background-color: #42a5f5 !important;
    color: white !important;
    font-weight: 600;
    border-left-color: #1565c0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.sidebar .nav-link.active i {
    opacity: 1;
}

.main-content {
    flex: 1;
    margin-left: 280px; /* Width of sidebar */
    margin-top: 76px; /* Height of top header */
    min-height: calc(100vh - 76px);
    padding: 0;
}

/* Mobile responsiveness */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .layout-wrapper {
        position: relative;
    }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1019;
    display: none;
}

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

/* Adjust body padding for fixed header */
body {
    padding-top: 0;
}

/* Invoice Summary Sidebar */
.summary-sidebar {
    background-color: rgba(0, 0, 0, 0.03);
    border-left: 3px solid #FBBF24;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.25rem;
    height: 100%;
    transition: all 0.3s ease;
}

.summary-sidebar h5 {
    color: #0d47a1; /* Dark blue for headers */
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.summary-sidebar .d-flex {
    padding: 0.4rem 0;
}

.summary-sidebar .d-flex.fw-bold {
    font-size: 1.1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

/* Enhanced Form Field Styling */
.form-group, .mb-3 {
    margin-bottom: 1.5rem !important;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #0d47a1; /* Dark blue for labels - stands out on white backgrounds */
}

.form-control, .form-select {
    padding: 0.625rem 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(251, 191, 36, 0.25);
}

.form-section {
    background-color: #ffffff; /* Solid white for form sections */
    border-radius: 8px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    color: #333; /* Dark text on white background */
}

.form-section h4 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    color: #1565c0; /* Dark blue heading */
    font-weight: 700;
}

.form-section h4::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #FBBF24;
}

/* Enhanced Section Dividers for Invoice Forms */
.invoice-divider {
    margin: 2rem 0;
    position: relative;
    height: 1px;
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.8) 0%, rgba(251, 191, 36, 0.2) 100%);
}

.invoice-divider::before {
    content: attr(data-content);
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background-color: white;
    padding-right: 1rem;
    font-weight: 600;
    color: #333;
}

.invoice-section {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.invoice-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.invoice-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

.invoice-section h4::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #FBBF24;
}

/* Custom scrollbar for Webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Main theme overrides */
body {
    background-color: #42a5f5; /* Light blue background as requested */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.footer {
    margin-top: auto;
    background-color: #1565c0; /* Dark blue footer */
    color: white;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main content area styling - Enhanced visibility */
.main-content .container-fluid {
    background-color: #ffffff; /* Solid white background for maximum contrast */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 20px;
    padding: 25px;
    color: #212529; /* Dark text for readability on white background */
    min-height: calc(100vh - 140px); /* Ensure full height coverage */
}

/* Ensure all text in main content is dark and readable */
.main-content h1, .main-content h2, .main-content h3, 
.main-content h4, .main-content h5, .main-content h6,
.main-content p, .main-content span, .main-content div {
    color: #212529 !important;
}

/* Special handling for dashboard cards to maintain their styling */
.dashboard-card h1, .dashboard-card h2, .dashboard-card h3,
.dashboard-card h4, .dashboard-card h5, .dashboard-card h6,
.dashboard-card p, .dashboard-card span, .dashboard-card div {
    color: inherit !important; /* Let dashboard cards keep their original colors */
}

/* Form improvements */
.form-floating > .form-control,
.form-floating > .form-select {
    height: calc(3.5rem + 2px);
    line-height: 1.25;
}

.form-floating > label {
    padding: 1rem 0.75rem;
}

/* Fix for form-floating labels on dark backgrounds */
.form-floating > .form-control.bg-dark ~ label,
.form-floating > .form-select.bg-dark ~ label {
    color: rgba(232, 236, 230, 0.9); /* Improved contrast for better readability */
    background-color: transparent;
    z-index: 2;
    font-weight: 500;
    letter-spacing: 0.01rem;
}

/* Required field indicator styling */
.form-floating > label[for$="*"]::after {
    content: " *";
    color: #FBBF24;
    font-weight: bold;
}

/* Status indicator colors */
select.form-select option[value="PENDING"],
select.form-select option[value="NOT_SENT"] {
    color: #ffc107 !important;
}

select.form-select option[value="CONFIRMED"],
select.form-select option[value="SENT"],
select.form-select option[value="RECEIVED"] {
    color: #28a745 !important;
}

select.form-select option[value="CANCELLED"] {
    color: #dc3545 !important;
}

/* Improved form field readability across all themes */
input.form-control, 
select.form-control, 
textarea.form-control,
.form-select {
    color: #000 !important;
    background-color: #fff !important;
    font-weight: 500;
}

/* Dark theme form fields */
input.form-control.bg-dark,
select.form-control.bg-dark,
textarea.form-control.bg-dark,
.form-select.bg-dark {
    color: #E8ECE6 !important;
    background-color: rgba(33, 37, 41, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Focus state for dark inputs */
input.form-control.bg-dark:focus,
select.form-control.bg-dark:focus,
textarea.form-control.bg-dark:focus,
.form-select.bg-dark:focus {
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 0 0.15rem rgba(251, 191, 36, 0.25), inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Date field enhancements */
input[type="date"].form-control.bg-dark::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.7;
}

/* Consistent form grid layout */
.row.g-3 > [class^="col-"] {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Improved collapsible sections */
.collapsible-header {
    cursor: pointer;
    padding: 0.75rem 0;
    transition: color 0.2s ease;
}

.collapsible-header:hover {
    color: #FBBF24;
}

.collapsible-header .fas {
    transition: transform 0.3s ease;
}

.collapsible-header.collapsed .fas {
    transform: rotate(-90deg);
}

/* Button styling improvements */
.btn-safari-primary {
    background-color: #FBBF24;
    border-color: #FBBF24;
    color: #2A3C2E;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-safari-primary:hover, 
.btn-safari-primary:focus {
    background-color: #F59E0B;
    border-color: #F59E0B;
    color: #2A3C2E;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-outline-secondary {
    border-color: rgba(232, 236, 230, 0.3);
    color: #E8ECE6;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background-color: rgba(232, 236, 230, 0.1);
    border-color: rgba(232, 236, 230, 0.5);
    color: #E8ECE6;
}

/* Form field icon styling */
.form-icon {
    opacity: 0.6;
    transition: opacity 0.2s ease;
    z-index: 3;
    pointer-events: none;
}

.form-floating:hover .form-icon {
    opacity: 0.8;
}

.form-floating:focus-within .form-icon {
    opacity: 1;
    color: #FBBF24 !important;
}

/* Commission entry table styles */
#commission-entries input {
    background-color: rgba(33, 37, 41, 0.95) !important;
    color: #E8ECE6 !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

#commission-entries input:focus {
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 0 0.15rem rgba(251, 191, 36, 0.25);
}

.commission-fare-amount,
.commission-rate,
.commission-amount {
    font-weight: 500;
}

/* Placeholder text color */
input::placeholder,
textarea::placeholder {
    color: #6c757d !important;
    opacity: 0.7;
}

/* WebKit browsers */
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    color: #6c757d !important;
    opacity: 0.7;
}

/* Firefox 19+ */
input::-moz-placeholder,
textarea::-moz-placeholder {
    color: #6c757d !important;
    opacity: 0.7;
}

/* IE 10+ */
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    color: #6c757d !important;
    opacity: 0.7;
}

/* Navbar customization */
.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Navbar styling for light blue theme */
.navbar-dark {
    background-color: #1565c0 !important; /* Dark blue navbar */
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

/* Sidebar styling for light blue theme */
.sidebar {
    background-color: #fff !important;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

.sidebar .nav-link {
    color: #333 !important;
}

.sidebar .nav-link:hover {
    background-color: rgba(66, 165, 245, 0.1);
}

.sidebar .nav-link.active {
    background-color: #42a5f5 !important;
    color: white !important;
    font-weight: 600;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

/* Card enhancements */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: #fff; /* White card background for contrast with blue */
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
}

.card-header {
    font-weight: 600;
    background-color: #1565c0; /* Darker blue header */
    color: white; /* White text for better contrast */
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

/* Modal dialog enhancements */
.modal-header {
    background-color: #1565c0;
    color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-header .close {
    color: white;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    opacity: 0.8;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-title {
    font-weight: 600;
    color: white;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

/* Button improvements */
.btn {
    font-weight: 500;
}

/* Primary button styling */
.btn-primary {
    background-color: #1565c0 !important; /* Dark blue to match navbar */
    border-color: #1565c0 !important;
    color: white !important;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #0d47a1 !important; /* Darker blue on hover */
    border-color: #0d47a1 !important;
}

/* Success button styling */
.btn-success {
    background-color: #2e7d32 !important; /* Dark green */
    border-color: #2e7d32 !important;
}

.btn-success:hover, .btn-success:focus {
    background-color: #1b5e20 !important; /* Darker green on hover */
    border-color: #1b5e20 !important;
}

/* Create invoice button - special styling */
.btn-create-invoice {
    background-color: #f5b700 !important; /* Amber color */
    border-color: #f5b700 !important;
    color: #333 !important;
    font-weight: 600;
}

.btn-create-invoice:hover, .btn-create-invoice:focus {
    background-color: #e6a800 !important; /* Darker amber on hover */
    border-color: #e6a800 !important;
}

/* Table styling - Enhanced visibility */
.table thead th {
    background-color: #1565c0 !important; /* Dark blue header for better contrast */
    color: #ffffff !important; /* White text on dark blue */
    font-weight: 600;
    border-bottom-width: 1px;
    text-shadow: none;
}

.table tbody td {
    color: #212529 !important; /* Dark text for light backgrounds */
    font-weight: 500;
    background-color: #ffffff !important; /* White background for table cells */
}

.table tbody tr {
    background-color: #ffffff !important; /* White row background */
}

.table-striped tbody tr:nth-of-type(odd) td {
    background-color: #f8f9fa !important; /* Very light gray stripe for alternating rows */
}

/* Client names and links in tables - ensure high contrast */
.table tbody td a, 
.table tbody td .client-name,
.table a {
    color: #1565c0 !important; /* Dark blue links on white background */
    font-weight: 600;
    text-decoration: none;
    text-shadow: none;
}

.table tbody td a:hover,
.table a:hover {
    color: #0d47a1 !important; /* Darker blue on hover */
    text-decoration: underline;
}

/* Fix for any colored text that might have poor visibility */
[style*="color: green"],
[style*="color:#00ff00"],
[style*="color: #00ff00"],
[style*="color:green"],
.text-success {
    color: #2e7d32 !important; /* Dark green instead of bright green */
    font-weight: 600 !important;
    text-shadow: none !important;
    background-color: transparent !important;
}

/* Status badges with better contrast */
.badge-success {
    background-color: #2e7d32 !important;
    color: #ffffff !important;
}

.badge-warning {
    background-color: #f57c00 !important;
    color: #ffffff !important;
}

.badge-danger {
    background-color: #d32f2f !important;
    color: #ffffff !important;
}

.badge-info {
    background-color: #1976d2 !important;
    color: #ffffff !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(66, 165, 245, 0.05); /* Very light blue stripe */
}

/* Card styling */
.card {
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background-color: #ffffff; /* Ensure white background */
    color: #212529; /* Dark text for readability */
}

.card-header {
    background-color: #1565c0; /* Dark blue header */
    color: white;
    font-weight: 600;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.card-body {
    padding: 1.5rem;
}

.btn-action {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Status badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.6em;
}

/* Dashboard cards */
.stat-card {
    border-radius: 0.5rem;
    border: none;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.3s ease;
}

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

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.7;
}

/* Dashboard styles */
.dashboard-card {
    border-radius: 0.75rem;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dashboard-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.dashboard-card .number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dashboard-card .amount {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.dashboard-card .days {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 0.75rem;
}

.dashboard-card .progress {
    height: 6px;
    margin-bottom: 1rem;
    background-color: rgba(255, 255, 255, 0.2);
}

.dashboard-card .card-link {
    margin-top: auto;
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
}

.dashboard-card .card-link:hover {
    text-decoration: underline;
}

/* Unpaid clients list */
.unpaid-clients-list {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.unpaid-clients-list small {
    display: block;
    margin-bottom: 0.5rem;
}

.unpaid-clients-list ul {
    margin-bottom: 0;
}

.unpaid-clients-list li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0.4rem;
    margin-bottom: 0.4rem;
}

.unpaid-clients-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Table improvements */
.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table thead th {
    font-weight: 600;
    border-top: none;
    background-color: #f5b700; /* Amber/orange header */
    color: #222;
    padding: 12px 8px;
}

.table-hover tbody tr:hover {
    background-color: rgba(66, 165, 245, 0.1); /* Light blue hover */
}

/* Improve text visibility in tables with dark backgrounds */
.table-dark, .bg-dark .table, .bg-primary .table, .bg-secondary .table {
    color: white !important;
}

.table-dark a, .bg-dark .table a, .bg-primary .table a, .bg-secondary .table a {
    color: white !important;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

/* Fix specific issue with green text in dark tables */
.table .text-success, .table .badge-success, .bg-dark .text-success, .bg-primary .text-success {
    color: #ffffff !important;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    background-color: rgba(46, 125, 50, 0.7);
    padding: 2px 5px;
    border-radius: 3px;
}

/* Make client names stand out in tables */
.table .client-name, .table .client-link {
    font-weight: 700 !important;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
    color: #ffffff !important;
}

/* Payment specific styles */
.payment-method-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

/* Dark client profile styles */
.dark-client-profile {
    background-color: #0f172a;
    color: #f8fafc;
    min-height: 100vh;
}

.dark-client-profile h1, .dark-client-profile h2, .dark-client-profile h3 {
    color: #ffffff;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.dark-client-profile .text-muted {
    color: #cbd5e1 !important;
}

.dark-client-card {
    background-color: #1e293b;
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dark-client-card .card-header {
    background-color: #1e293b;
    border-bottom: 1px solid #334155;
    color: #ffffff;
}

.dark-client-card a {
    color: #60a5fa !important;
    text-decoration: none;
}

.dark-client-card a:hover {
    text-decoration: underline;
}

.avatar-placeholder {
    width: 50px; 
    height: 50px;
    font-size: 20px;
    font-weight: 600;
}

.client-info-card {
    background-color: #6366f1;
}

/* Invoice specific styles */

/* Dropdown menu styles */
.dropdown-menu {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    background-color: #ffffff !important;
}

/* Enhanced dropdown text visibility */
.dropdown-menu .dropdown-item {
    font-weight: 500;
    color: #212529 !important;
    background-color: transparent !important;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background-color: #f8f9fa !important;
    color: #1565c0 !important;
}

/* Fix for dark dropdown menus */
.dropdown-menu-dark {
    background-color: #343a40 !important;
}

.dropdown-menu-dark .dropdown-item {
    color: #ffffff !important;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.dropdown-menu-dark .dropdown-item:hover,
.dropdown-menu-dark .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Navbar dropdown specific fixes */
.navbar .dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar .dropdown-menu .dropdown-item {
    color: #212529 !important;
    padding: 0.5rem 1rem;
}

.navbar .dropdown-menu .dropdown-item:hover {
    background-color: #e9ecef !important;
    color: #1565c0 !important;
}

/* Safari invoice dashboard improvements */
.safari-invoice-dashboard .badge-pending {
    background-color: #FBBC04;
    color: #212529;
    font-weight: 600;
}

.safari-invoice-dashboard .badge-paid {
    background-color: #34A853;
    color: white;
    font-weight: 600;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.safari-invoice-dashboard .badge-draft {
    background-color: #dadce0;
    color: #212529;
    font-weight: 600;
}

.safari-invoice-dashboard .badge-canceled {
    background-color: #EA4335;
    color: white;
    font-weight: 600;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.safari-invoice-dashboard .client-name {
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

.safari-invoice-dashboard table td a:not(.btn) {
    color: white !important;
    text-decoration: none;
    font-weight: 500;
}

.safari-invoice-dashboard table td a:hover:not(.btn) {
    text-decoration: underline;
}
.invoice-header {
    border-bottom: 2px solid var(--bs-gray-200);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.invoice-total {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Copy tooltip */
.copy-tooltip {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--bs-success);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 1050;
    animation: fade-out 2s ease-in-out;
}

@keyframes fade-out {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

/* Print styles */
@media print {
    body {
        background-color: white !important;
    }
    
    .navbar, .footer, .btn, .no-print {
        display: none !important;
    }
    
    .container, .container-fluid {
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .card {
        border: none;
        box-shadow: none;
    }
    
    .card-header {
        background-color: white !important;
        color: black !important;
    }
    
    .table {
        width: 100% !important;
    }
    
    .table td, .table th {
        background-color: white !important;
        color: black !important;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
    }
    
    .btn-group {
        display: flex;
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        flex: 1 0 auto;
        margin-bottom: 0.25rem;
    }
}

/* Gold invoice tabs styling for all themes (global) */
.nav-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    gap: 3px;
}

.nav-tabs .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all 0.25s ease;
    border-bottom: 0;
    padding: 0.7rem 1.25rem;
    position: relative;
    border-radius: 6px 6px 0 0;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
}

.nav-tabs .nav-link.active {
    color: #000000 !important;
    background-color: #FBBF24 !important;  /* Soft Gold color */
    border-color: #FBBF24 !important;
    font-weight: 600;
    box-shadow: 0 -2px 8px rgba(251, 191, 36, 0.3), 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 5;
    transform: translateY(1px);
}

.nav-tabs .nav-link.active i {
    opacity: 1;
    color: #000000 !important;
}

.nav-tabs .nav-link:hover:not(.active) {
    background-color: rgba(251, 191, 36, 0.9) !important;  /* Lighter Gold on hover */
    border-color: rgba(251, 191, 36, 0.5) !important;
    color: #000000 !important;
}

/* Improve readability of tabs on dark background */
.card-header.bg-dark .nav-tabs .nav-link {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: transparent;
    border-radius: 4px 4px 0 0;
    margin-right: 2px;
    padding: 0.6rem 1rem;
}
