/* ===== VARIABLES ===== */
:root {
    --primary-light-blue: #7fc8f8;
    --primary-blue: #45a3e5;
    --secondary-light-green: #a8e6cf;
    --secondary-green: #78c2ad;
    --accent-yellow: #fdfd96;
    --dark-text: #333333;
    --light-text: #666666;
    --lightest-text: #999999;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --light-grey: #e9ecef;
    --medium-grey: #dee2e6;
    --border-color: #ced4da;
    --error-color: #dc3545;
    --success-color: #28a745;
    --warning-color: #ffc107;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    
    --border-radius: 4px;
    --transition-speed: 0.3s;
}
/* Spinner animation for processing state */
.spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 5px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Disabled button styling */
button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}
<!-- Add this style section to your head or styles.css file -->

    .document-options-container {
        background-color: #f9f9f9;
        border-radius: 8px;
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .document-options-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }
    
    .document-type-selector,
    .payment-status-selector,
    .email-selector {
        padding: 15px;
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        transition: all 0.3s ease;
    }
    
    .document-type-selector:hover,
    .payment-status-selector:hover,
    .email-selector:hover {
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .document-type-selector h3,
    .payment-status-selector h3,
    .email-selector h3 {
        margin-top: 0;
        margin-bottom: 15px;
        font-size: 18px;
        color: #333;
    }
    
    .info-text {
        margin-top: 10px;
        font-size: 13px;
        color: #666;
    }
    
    /* Toggle Buttons for Document Type */
    .toggle-buttons {
        display: flex;
        width: 100%;
        border-radius: 5px;
        overflow: hidden;
        border: 1px solid #ddd;
    }
    
    .toggle-button {
        flex: 1;
        text-align: center;
        padding: 12px 5px;
        cursor: pointer;
        background-color: #f5f5f5;
        transition: all 0.3s ease;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .toggle-button input[type="radio"] {
        position: absolute;
        opacity: 0;
    }
    
    .toggle-button-icon {
        font-size: 24px;
        margin-bottom: 6px;
    }
    
    .toggle-button-text {
        font-size: 14px;
        font-weight: 600;
    }
    
    .toggle-button.active {
        background-color: #007bff;
        color: white;
    }
    
    .toggle-button:first-child {
        border-right: 1px solid #ddd;
    }
    
    /* Toggle Switch for Payment Status and Email */
    .toggle-switch-container {
        display: flex;
        justify-content: center;
        padding: 10px 0;
    }
    
    .toggle-switch {
        position: relative;
        display: inline-block;
        width: 140px;
        height: 34px;
    }
    
    .toggle-switch-checkbox {
        opacity: 0;
        width: 0;
        height: 0;
    }
    
    .toggle-switch-slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #f5f5f5;
        border: 1px solid #ddd;
        transition: .4s;
        border-radius: 34px;
    }
    
    .toggle-switch-slider:before {
        position: absolute;
        content: "";
        height: 26px;
        width: 26px;
        left: 4px;
        bottom: 3px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    
    .toggle-switch-checkbox:checked + .toggle-switch-slider {
        background-color: #28a745;
    }
    
    .toggle-switch-checkbox:checked + .toggle-switch-slider:before {
        transform: translateX(104px);
    }
    
    .toggle-switch-labels {
        position: absolute;
        top: 8px;
        left: 0;
        width: 100%;
        display: flex;
        justify-content: space-between;
        font-size: 14px;
        font-weight: 600;
    }
    
    .toggle-switch-labels::before {
        content: attr(data-off);
        position: absolute;
        left: 40px;
        color: #555;
        transition: .4s;
    }
    
    .toggle-switch-labels::after {
        content: attr(data-on);
        position: absolute;
        right: 40px;
        color: white;
        opacity: 0;
        transition: .4s;
    }
    
    .toggle-switch-checkbox:checked ~ .toggle-switch-labels::before {
        opacity: 0;
    }
    
    .toggle-switch-checkbox:checked ~ .toggle-switch-labels::after {
        opacity: 1;
    }
    
    /* Disabled state styling */
    .disabled {
        opacity: 0.5;
        pointer-events: none;
    }
    
    /* Alert styling for email validation */
    .alert-validation {
        color: #dc3545;
    }

.radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}
.radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.radio-group input[type="radio"] {
    margin-right: 8px;
}

/* Critical menu fix - add these rules at the end of your CSS */
@media (max-width: 992px) {
    /* Override conflicting styles */
    .dropdown-menu {
        display: none !important;
    }
    
    /* Allow JS to control visibility */
    .dropdown-menu[style*="display: block"] {
        display: block !important;
    }
    
    /* Ensure mobile styles are applied */
    .main-nav.active {
        right: 0 !important;
    }
    
    /* Fix submenu styles */
    .dropdown-menu {
        background: rgba(0, 0, 0, 0.15) !important;
        border: none !important;
        box-shadow: none !important;
        position: static !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .dropdown-menu li a {
        padding-left: 30px !important;
        font-size: 0.9em;
    }
    
    /* Make dropdown carets more visible */
    .dropdown-toggle .caret {
        float: right;
        margin-top: 8px;
    }
}

/* Ensure desktop styles are clean */
@media (min-width: 993px) {
    .dropdown-menu {
        display: none;
    }
    
    .dropdown.open .dropdown-menu {
        display: block;
    }
}
/* Mobile menu fixes */
@media (max-width: 992px) {
    .header-container {
        position: relative;
    }
    
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
    }
    
    .mobile-menu-toggle .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        background-color: var(--white);
        transition: all 0.3s ease-in-out;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -300px;
        height: 100vh;
        width: 250px;
        background: var(--primary-blue);
        padding-top: 70px;
        transition: right 0.3s ease-in-out;
        z-index: 1000;
        overflow-y: auto;
        box-shadow: none;
    }
    
    .main-nav.active {
        right: 0;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    }
    
    .main-nav ul {
        display: block;
        padding: 0;
    }
    
    .main-nav ul li {
        display: block;
        width: 100%;
        margin: 0;
    }
    
    .main-nav ul li a {
        padding: 15px;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Automatically show all dropdown menus in mobile mode when menu is active */
    .main-nav.active .dropdown-menu {
        position: static;
        display: block;
        width: 100%;
        background: rgba(0, 0, 0, 0.1);
        border: none;
        box-shadow: none;
        padding: 0;
    }
    
    .dropdown-menu li a {
        padding-left: 25px;
    }
    
    /* When screen is resized back to desktop, reset menu */
    @media (min-width: 993px) {
        .mobile-menu-toggle {
            display: none;
        }
        
        .main-nav {
            position: static;
            height: auto;
            padding-top: 0;
            width: auto;
            background: none;
            overflow: visible;
        }
        
        .main-nav ul {
            display: flex;
        }
        
        .dropdown-menu {
            display: none;
        }
        
        .dropdown.open .dropdown-menu {
            display: block;
        }
    }
}
/* Mobile menu with single-click expanded submenus */
@media (max-width: 992px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background-color: var(--primary-blue);
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }
    
    .main-nav.active {
        right: 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-nav ul li {
        width: 100%;
    }
    
    .main-nav a {
        display: block;
        padding: 15px 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* New styles for auto-expanded dropdowns on mobile */
    .mobile-open .dropdown-menu {
        display: block;
        position: static;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        box-shadow: none;
        padding: 0;
        width: 100%;
        margin-top: 0;
    }
    
    .dropdown-menu li a {
        padding-left: 25px;
        color: rgba(255, 255, 255, 0.85);
    }
    
    /* Style dropdown toggles differently in mobile */
    .mobile-open .dropdown-toggle .caret {
        transform: rotate(180deg);
    }
    
    .dropdown-toggle {
        position: relative;
    }
    
    .dropdown-toggle .caret {
        transition: transform 0.3s;
    }
    
    /* Hamburger menu animation */
    .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Make dropdown toggles non-interactive in mobile */
    .mobile-open .dropdown-toggle {
        pointer-events: none;
    }
}

/* Keep desktop behavior normal */
@media (min-width: 993px) {
    .dropdown-menu {
        display: none;
    }
    
    .dropdown.open .dropdown-menu {
        display: block;
    }
    
    /* Override any hover styles */
    .dropdown:hover .dropdown-menu {
        display: none;
    }
}
/* Logo styling */
.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--white);
}

.logo img {
    max-height: 40px;
    width: auto;
}

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
}

.mobile-menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--white);
    transition: all 0.3s;
}

/* Fixed dropdown behavior - no hover, only click */
.dropdown-menu {
    display: none;
}

.dropdown.open .dropdown-menu {
    display: block;
}

/* Override any hover styles */
.dropdown:hover .dropdown-menu {
    display: none;
}

/* Footer logo */
.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo img {
    margin-bottom: 15px;
    max-width: 150px;
    height: auto;
}

.footer-logo h2 {
    margin-top: 0;
}

/* Alert dismiss button */
.alert {
    position: relative;
}

.alert-dismiss {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
}

.alert-dismiss:hover {
    opacity: 1;
}

/* Field error styling */
.field-error {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 4px;
}

input.error, select.error, textarea.error {
    border-color: var(--error-color);
}

/* Mobile styles */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background-color: var(--primary-blue);
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }
    
    .main-nav.active {
        right: 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-nav ul li {
        width: 100%;
    }
    
    .main-nav a {
        display: block;
        padding: 15px 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .dropdown-menu {
        position: static;
        background: rgba(0, 0, 0, 0.1);
        border: none;
        box-shadow: none;
        padding: 0;
        width: 100%;
        margin-top: 0;
    }
    
    .dropdown-menu a {
        padding-left: 25px;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Footer responsive styles */
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
    }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 992px) {
    .cards-container {
        grid-template-columns: 1fr 1fr;
    }
}

/* Small mobile styles */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .dashboard-tiles {
        grid-template-columns: 1fr;
    }
    
    .filter-form .form-row {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Invoice List Styles */
.filter-section {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-form .form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
}

.invoice-table {
    table-layout: fixed;
}

.invoice-table th:nth-child(1) { width: 14%; } /* Invoice # */
.invoice-table th:nth-child(2) { width: 16%; } /* Client */
.invoice-table th:nth-child(3) { width: 12%; } /* Company */
.invoice-table th:nth-child(4) { width: 10%; } /* Date */
.invoice-table th:nth-child(5) { width: 10%; } /* Due Date */
.invoice-table th:nth-child(6) { width: 10%; } /* Total */
.invoice-table th:nth-child(7) { width: 10%; } /* Status */
.invoice-table th:nth-child(8) { width: 18%; } /* Actions */

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.status-paid {
    background-color: #d4edda;
    color: #155724;
}

.status-unpaid {
    background-color: #fff3cd;
    color: #856404;
}

.overdue-row .status-badge {
    background-color: #f8d7da;
    color: #721c24;
}

.paid-row {
    background-color: rgba(212, 237, 218, 0.1);
}

.overdue-row {
    background-color: rgba(248, 215, 218, 0.1);
}

.invoice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.invoice-action-form {
    margin: 0;
}

.invoice-action-form .btn-sm {
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .invoice-table {
        table-layout: auto;
    }
    
    .invoice-actions {
        flex-direction: column;
    }
    
    .filter-form .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-form .form-group {
        margin-bottom: 0.5rem;
    }
}
/* Additional styles for client and product management */
.filter-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    flex-grow: 1;
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    white-space: nowrap;
    font-weight: 500;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.table-container {
    overflow-x: auto;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background-color: var(--light-grey);
    padding: 0.8rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
}

.data-table td {
    padding: 0.8rem;
    border-bottom: 1px solid var(--light-grey);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background-color: var(--off-white);
}

.empty-state {
    padding: 3rem;
    text-align: center;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.empty-state p {
    margin-bottom: 1.5rem;
    color: var(--light-text);
}

/* Form Improvements */
.standard-form .form-group label {
    font-weight: 500;
    color: var(--light-text);
    margin-bottom: 0.3rem;
}

.standard-form input[type="text"],
.standard-form input[type="email"],
.standard-form input[type="tel"],
.standard-form input[type="number"],
.standard-form select,
.standard-form textarea {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 100%;
    background-color: var(--white);
}

.standard-form input:focus,
.standard-form select:focus,
.standard-form textarea:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(69, 163, 229, 0.1);
}

.standard-form .form-section h2 {
    color: var(--primary-blue);
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--light-grey);
}

/* Make buttons in tables smaller */
.data-table .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Align amount values right */
.amount {
    text-align: right;
}

/* Additional styles for portfolio management */
.form-container {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
}

.standard-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.action-bar {
    margin: 1.5rem 0;
    display: flex;
    justify-content: flex-end;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.company-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.company-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.company-card-header {
    background: linear-gradient(to right, var(--primary-light-blue), var(--secondary-light-green));
    color: var(--dark-text);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.company-card-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.company-card-actions {
    display: flex;
    gap: 0.5rem;
}

.company-card-body {
    padding: 1.5rem;
}

.company-info-group {
    margin-bottom: 1.2rem;
}

.company-info-group h3 {
    font-size: 1rem;
    color: var(--light-text);
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--light-grey);
    padding-bottom: 0.3rem;
}

.company-info-group p {
    margin: 0.3rem 0;
}

.inline-form {
    display: inline;
}

/* Second row of dashboard tiles */
.dashboard-tiles.second-row {
    margin-top: 1.5rem;
}
/* Add these styles to your existing styles.css file */
.error-container {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 3rem 2rem;
    text-align: center;
    max-width: 600px;
    margin: 3rem auto;
}

.error-code {
    font-size: 5rem;
    font-weight: bold;
    color: var(--primary-light-blue);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.error-container h1 {
    font-size: 2rem;
    color: var(--dark-text);
    margin-bottom: 1.5rem;
}

.error-message {
    color: var(--light-text);
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}
/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--dark-text);
    background-color: var(--off-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--primary-light-blue);
}

ul {
    list-style: none;
}

input,
textarea,
select,
button {
    font-family: inherit;
    font-size: 1rem;
}

input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    flex: 1;
}

/* ===== HEADER STYLES ===== */
.site-header {
    background: linear-gradient(135deg, var(--primary-light-blue), var(--primary-blue));
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    position: relative;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo a {
    color: var(--white);
    text-decoration: none;
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
    padding: 0;
}

.main-nav ul {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.main-nav a {
    color: var(--white);
    padding: 0.5rem;
    font-weight: 500;
}

.main-nav a:hover {
    border-bottom: 2px solid var(--white);
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.dropdown-toggle .caret {
    margin-left: 5px;
    font-size: 0.8rem;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    min-width: 180px;
    z-index: 100;
    display: none;
    padding: 0.5rem 0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    color: var(--dark-text);
    padding: 0.5rem 1rem;
    display: block;
    border-bottom: none;
}

.dropdown-menu li a:hover {
    background-color: var(--light-grey);
    color: var(--primary-blue);
    border-bottom: none;
}

/* ===== FOOTER STYLES ===== */
.site-footer {
    background: linear-gradient(135deg, var(--secondary-light-green), var(--secondary-green));
    color: var(--dark-text);
    margin-top: 3rem;
    padding: 2rem 0 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-logo p {
    color: var(--light-text);
}

.footer-links h3,
.footer-contact h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--dark-text);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-contact p {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: var(--dark-text);
}

.footer-legal a:hover {
    color: var(--white);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    font-weight: 500;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-light-blue);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--secondary-green);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--secondary-light-green);
    color: var(--dark-text);
}

.btn-success {
    background-color: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: var(--error-color);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* ===== AUTH PAGES ===== */
.auth-container {
    background-color: var(--white);
    max-width: 500px;
    margin: 3rem auto;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--primary-blue);
}

.auth-container.signup {
    max-width: 600px;
}

.auth-container .logo {
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-container .logo h1 {
    color: var(--primary-blue);
    font-size: 1.8rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--light-text);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border var(--transition-speed);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-blue);
}

.form-links {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.form-note {
    font-size: 0.85rem;
    color: var(--lightest-text);
    margin-top: -0.5rem;
}

/* ===== ALERTS ===== */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

/* ===== DASHBOARD ===== */
.dashboard-header {
    margin: 2rem 0;
}

.dashboard-header h1 {
    font-size: 2rem;
    color: var(--dark-text);
}

.dashboard-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-tile {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 2rem;
    transition: all var(--transition-speed);
    text-decoration: none;
    color: var(--dark-text);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-left: 4px solid transparent;
}

.dashboard-tile:first-child {
    border-left-color: var(--primary-blue);
}

.dashboard-tile:nth-child(2) {
    border-left-color: var(--secondary-green);
}

.dashboard-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.dashboard-tile .tile-icon {
    font-size: 2.5rem;
}

.dashboard-tile h2 {
    font-size: 1.3rem;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.dashboard-tile p {
    color: var(--light-text);
    font-size: 0.9rem;
    margin: 0;
}

.dashboard-welcome {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-top: 2rem;
}

.dashboard-welcome h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
}

.page-header h1 {
    font-size: 1.8rem;
    color: var(--dark-text);
}

/* ===== INVOICE FORM ===== */
.invoice-form-container {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

.invoice-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    border-bottom: 1px solid var(--light-grey);
    padding-bottom: 1.5rem;
}

.form-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.form-section h2 {
    font-size: 1.3rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group-large {
    grid-column: span 2;
}

.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.invoice-items-table th {
    background-color: var(--light-grey);
    padding: 0.8rem;
    text-align: left;
    font-weight: 500;
}

.invoice-items-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--light-grey);
}

.invoice-items-table input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.invoice-items-table tbody tr:last-child td {
    border-bottom: none;
}

.invoice-totals {
    margin-left: auto;
    width: 350px;
    margin-top: 1rem;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.totals-label {
    font-weight: 500;
}

.totals-value input {
    width: 150px;
    text-align: right;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.total-row {
    border-top: 2px solid var(--light-grey);
    font-weight: bold;
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

/* ===== INVOICES LIST ===== */
.invoices-container {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
}

.no-invoices {
    text-align: center;
    padding: 3rem 1rem;
}

.no-invoices p {
    margin-bottom: 1.5rem;
    color: var(--light-text);
}

.invoice-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.search-box {
    display: flex;
    max-width: 300px;
}

.search-box input {
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    flex-grow: 1;
}

.search-box button {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 0 1rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
}

.filter-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-select select {
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.invoice-table-container {
    overflow-x: auto;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-table th {
    background-color: var(--light-grey);
    padding: 0.8rem;
    text-align: left;
}

.invoice-table td {
    padding: 0.8rem;
    border-bottom: 1px solid var(--light-grey);
}

.invoice-table tbody tr:hover {
    background-color: var(--off-white);
}

.amount {
    text-align: right;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-issued {
    background-color: var(--light-grey);
    color: var(--dark-text);
}

.status-paid {
    background-color: var(--success-color);
    color: white;
}

.status-overdue {
    background-color: var(--error-color);
    color: white;
}

.actions {
    white-space: nowrap;
}

.btn-view {
    background-color: var(--primary-light-blue);
    color: var(--white);
}

.btn-edit {
    background-color: var(--warning-color);
    color: var(--dark-text);
}

.btn-download {
    background-color: var(--secondary-green);
    color: var(--white);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .main-nav ul {
        gap: 0.8rem;
    }
    
    .auth-container {
        margin: 2rem 1rem;
    }
    
    .dashboard-tiles {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-group-large {
        grid-column: 1;
    }
    
    .invoice-totals {
        width: 100%;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .invoice-filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        justify-content: center;
    }
}