/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    gap: 0.5rem;
    flex-shrink: 0;
}

.nav-logo i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    min-width: fit-content;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-link i {
    font-size: 1rem;
    min-width: 16px;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 2rem;
    text-align: center;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.dashboard-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

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

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.dashboard-card:nth-child(1) .card-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dashboard-card:nth-child(2) .card-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.dashboard-card:nth-child(3) .card-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.dashboard-card:nth-child(4) .card-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.dashboard-card:nth-child(5) .card-icon {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.dashboard-card:nth-child(6) .card-icon {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.dashboard-card:nth-child(7) .card-icon {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.card-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.card-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
}

/* Form Styles */
.invoice-form {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title i {
    color: #667eea;
}

.form-subsection-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
    margin: 1.5rem 0 1rem 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Full width for IRN field */
.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[readonly] {
    background-color: #f8fafc;
    color: #64748b;
}

/* Input with button layout */
.input-with-button {
    display: flex;
    gap: 0.25rem;
    align-items: stretch;
}

.input-with-button input {
    flex: 1;
    border-radius: 8px 0 0 8px;
}

.input-with-button .btn:first-of-type {
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.input-with-button .btn:last-of-type {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

.input-with-button .btn {
    white-space: nowrap;
    padding: 0.75rem 0.75rem;
    font-size: 0.875rem;
    min-width: auto;
}

.input-with-button .btn:hover {
    border-left: 1px solid #667eea;
}

/* Autocomplete styles */
.autocomplete-container {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #f8fafc;
}

.autocomplete-code {
    font-weight: 600;
    color: #1a202c;
    font-size: 0.875rem;
}

.autocomplete-description {
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    line-height: 1.3;
}

/* Service Code Description display */
.hsn-description {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #64748b;
    display: none;
}

/* Product Description display */
.product-description {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f0fdf4;
    border: 1px solid #22c55e;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #166534;
    display: none;
}

/* Category textarea styling */
textarea[id*="product-category"] {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.5;
}

.tax-description {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #0369a1;
    display: none;
}

.tax-description.show {
    display: block;
}

/* Optional Fields */
.optional-field-group {
    margin-bottom: 1rem;
}

.optional-field {
    margin-top: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.optional-field .form-group {
    margin-bottom: 1rem;
}

.optional-field .form-group:last-child {
    margin-bottom: 0;
}

/* Invoice Lines */
.invoice-line {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e2e8f0;
}

/* Payment Means Items */
.payment-means-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e2e8f0;
}

.payment-means-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.payment-means-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.remove-payment-means-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.remove-payment-means-btn:hover {
    background: #dc2626;
}

/* Billing Reference Items */
.billing-reference-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e2e8f0;
}

.billing-reference-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.billing-reference-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.remove-billing-reference-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.remove-billing-reference-btn:hover {
    background: #dc2626;
}

/* Dispatch Document Items */
.dispatch-document-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e2e8f0;
}

.dispatch-document-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dispatch-document-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.remove-dispatch-document-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.remove-dispatch-document-btn:hover {
    background: #dc2626;
}

/* Document Reference Items */
.document-reference-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e2e8f0;
}

.document-reference-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.document-reference-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.remove-document-reference-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.remove-document-reference-btn:hover {
    background: #dc2626;
}

/* Allowance Charge Items */
.allowance-charge-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e2e8f0;
}

.allowance-charge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.allowance-charge-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.remove-allowance-charge-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.remove-allowance-charge-btn:hover {
    background: #dc2626;
}

.line-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-line-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.remove-line-btn:hover {
    background: #dc2626;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(67, 233, 123, 0.4);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    font-weight: 500;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Invoices List */
.invoices-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.invoices-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.invoices-filters input,
.invoices-filters select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 150px;
}

.invoices-filters input[type="date"] {
    min-width: 140px;
}

.invoices-filters select {
    background-color: white;
}

.invoices-list {
    display: grid;
    gap: 1rem;
}

.invoice-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.invoice-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.invoice-irn {
    font-weight: 600;
    color: #1a202c;
    font-size: 1.1rem;
}

.invoice-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-paid {
    background: #d1fae5;
    color: #065f46;
}

.status-canceled {
    background: #fee2e2;
    color: #991b1b;
}

.invoice-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

/* Settings */
.settings-container {
    max-width: 600px;
    margin: 0 auto;
}

.settings-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.settings-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1.5rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.loading-spinner i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 1rem;
}

/* Notification */
.notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 2000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #10b981;
}

.notification.error {
    background: #ef4444;
}

.notification.warning {
    background: #f59e0b;
}

.notification.info {
    background: #3b82f6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 0.5rem;
        justify-content: center;
        width: 100%;
    }

    .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        flex: 1;
        justify-content: center;
        min-width: auto;
    }

    .container {
        padding: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .invoices-filters {
        flex-direction: column;
    }

    .invoices-filters input,
    .invoices-filters select {
        min-width: auto;
    }

    .invoice-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .invoice-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.5rem;
    }

    .nav-menu {
        gap: 0.25rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .nav-logo span {
        display: none;
    }

    .nav-link span {
        display: none;
    }

    .dashboard-card {
        padding: 1.5rem;
    }

    .invoice-form {
        padding: 1rem;
    }

    .form-section {
        padding-bottom: 1.5rem;
    }
}

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

.section.active {
    animation: fadeIn 0.5s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    margin: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-modal {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close-modal:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
}

/* Invoice Details Grid */
.invoice-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.detail-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.detail-section.full-width {
    grid-column: 1 / -1;
}

.detail-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: #64748b;
    min-width: 120px;
}

.detail-value {
    font-weight: 600;
    color: #1a202c;
    text-align: right;
    word-break: break-word;
}

/* Invoice Lines Table */
.invoice-lines-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.invoice-lines-table table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-lines-table th {
    background: #667eea;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.invoice-lines-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.invoice-lines-table tr:last-child td {
    border-bottom: none;
}

.invoice-lines-table tr:nth-child(even) {
    background: #f8fafc;
}

/* Received Invoices Specific Styles */
.invoice-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.invoice-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.invoice-item .invoice-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.invoice-item .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-block;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-paid {
    background: #d1fae5;
    color: #065f46;
}

.status-canceled {
    background: #fee2e2;
    color: #991b1b;
}

.status-transmitted {
    background: #dbeafe;
    color: #1e40af;
}

.status-new-entry {
    background: #8b5cf6;
    color: white;
}

.status-delivered {
    background: #10b981;
    color: white;
}

.status-not-delivered {
    background: #f59e0b;
    color: white;
}

.status-not-transmitted {
    background: #6b7280;
    color: white;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
        width: 95%;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .invoice-details-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .detail-value {
        text-align: left;
    }
}

/* VAT Reports Styles */
.vat-report-form {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.vat-report-form .form-section {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.vat-report-form .form-section:last-child {
    border-bottom: none;
}

.vat-report-form .form-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1.5rem;
}

.vat-report-form .form-section-title i {
    color: #667eea;
    font-size: 1.1rem;
}

.vat-report-form .form-subsection-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4b5563;
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.vat-report-form .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.vat-report-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vat-report-form .form-group.full-width {
    grid-column: 1 / -1;
}

.vat-report-form .form-group label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.vat-report-form .form-group input,
.vat-report-form .form-group select,
.vat-report-form .form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: white;
}

.vat-report-form .form-group input:focus,
.vat-report-form .form-group select:focus,
.vat-report-form .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Input with button layout for VAT report form */
.vat-report-form .input-with-button {
    display: flex;
    gap: 0.25rem;
    align-items: stretch;
}

.vat-report-form .input-with-button input {
    flex: 1;
    border-radius: 8px 0 0 8px;
}

.vat-report-form .input-with-button .btn {
    border-radius: 0 8px 8px 0;
    border-left: none;
    white-space: nowrap;
    padding: 0.75rem 0.75rem;
    font-size: 0.875rem;
    min-width: auto;
}

.vat-report-form .input-with-button .btn:hover {
    border-left: 1px solid #667eea;
}

.vat-report-form .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 2rem;
    background: #f9fafb;
}



/* Responsive VAT Reports */
@media (max-width: 768px) {
    .vat-report-form .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .vat-report-form .form-section {
        padding: 1.5rem;
    }
    
    .vat-report-form .form-actions {
        flex-direction: column;
        padding: 1.5rem;
    }
    
    .results-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .summary-card {
        padding: 1rem;
    }
    
    .summary-card p {
        font-size: 1.25rem;
    }
    
    .report-details {
        padding: 1.5rem;
    }
    
    .results-table {
        font-size: 0.75rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .results-summary {
        grid-template-columns: 1fr;
    }
    
    .results-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
} 

/* Two-column grid for VAT Item Details */
.vat-item-details .form-grid {
	grid-template-columns: repeat(2, minmax(250px, 1fr));
}

@media (max-width: 768px) {
	.vat-item-details .form-grid {
		grid-template-columns: 1fr;
	}
} 