* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #f5f5f5;
    padding: 20px;
}

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

/* Main Tabs */
.main-tabs {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tabs {
    display: flex;
    gap: 2px;
    background: #f0f0f0;
    padding: 10px 10px 0;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: #e0e0e0;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #d0d0d0;
}

.tab-btn.active {
    background: white;
    color: #4CAF50;
    font-weight: 500;
}

.tab-content {
    padding: 20px;
}

/* Tab Styles */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Sub Tabs (for Client Management) */
.sub-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.sub-tab-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sub-tab-btn:hover {
    background-color: #f0f0f0;
}

.sub-tab-btn.active {
    background-color: #4CAF50;
    color: white;
}

.sub-tab-pane {
    display: none;
}

.sub-tab-pane.active {
    display: block;
}

/* Invoice Section */
.invoice-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Invoice Status Indicator */
.invoice-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid;
}

.status-indicator.unsaved {
    color: #d32f2f;
    background-color: #ffebee;
    border-color: #ffcdd2;
}

.status-indicator.saved {
    color: #388e3c;
    background-color: #e8f5e8;
    border-color: #c8e6c9;
}

.status-indicator.modified {
    color: #f57c00;
    background-color: #fff3e0;
    border-color: #ffcc02;
}

#statusIcon {
    font-size: 12px;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

input, textarea, select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #45a049;
}

.btn-secondary {
    background-color: #666;
}

.btn-secondary:hover {
    background-color: #555;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Client List */
.client-list {
    background: #f8f8f8;
    padding: 15px;
    border-radius: 4px;
    max-height: 400px;
    overflow-y: auto;
}

.client-item {
    background: white;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    position: relative;
}

.client-item h4 {
    margin-bottom: 5px;
    color: #333;
    padding-right: 100px;
}

.client-item p {
    font-size: 14px;
    color: #666;
    margin-bottom: 3px;
}

.client-actions {
    position: absolute;
    right: 10px;
    top: 10px;
    display: flex;
    gap: 5px;
}

.client-actions button {
    padding: 4px 8px;
    font-size: 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.edit-btn {
    background-color: #2196F3;
    color: white;
}

.edit-btn:hover {
    background-color: #1976D2;
}

.delete-btn {
    background-color: #f44336;
    color: white;
}

.delete-btn:hover {
    background-color: #d32f2f;
}

/* Invoice Preview Styles */
.preview-content {
    padding: 20px;
    border: none;
    border-radius: 0;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: white;
    font-family: Arial, sans-serif;
    color: #333;
    line-height: 1.4;
}

.invoice-title {
    text-align: center;
    margin-bottom: 30px;
}

.invoice-title h2 {
    font-size: 28px;
    color: #333;
    margin: 0;
    font-weight: bold;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.company-details h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.company-details p {
    margin-bottom: 5px;
}

.company-details p strong,
.company-details p span:first-child {
    font-weight: bold;
}

.invoice-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.client-details {
    margin-bottom: 30px;
}

.invoice-items table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.invoice-items th,
.invoice-items td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.invoice-items th {
    background-color: #f8f8f8;
}

.total {
    font-weight: bold;
    background-color: #f8f8f8;
}

.bank-details {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .invoice-section {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-direction: column;
        padding: 10px;
    }
    
    .tab-btn {
        border-radius: 4px;
        text-align: left;
    }
    
    .invoice-header {
        flex-direction: column;
    }
    
    .invoice-details {
        text-align: left;
        margin-top: 20px;
    }
}

.settings-panel h2,
.client-management h2,
.invoice-section h2 {
    margin-bottom: 2rem;
    color: #333;
}

h2 {
    margin-bottom: 2rem;
    color: #333;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.items-table th,
.items-table td {
    padding: 0.5rem;
    border: 1px solid #ddd;
    text-align: left;
}

.items-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.items-table input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.items-table .remove-item {
    padding: 0.25rem 0.5rem;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    min-width: 10px; !important
}

.items-table .remove-item:hover {
    background-color: #c82333;
}

.items-table tfoot tr td {
    font-weight: bold;
    background-color: #f8f9fa;
}

#addItem {
    margin-top: 1rem;
}

.invoice-preview {
    background: white;
    padding: 1rem;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 2rem;
    position: relative;
}

/* Hide download button in PDF */
@media print {
    .download-section, .btn, button {
        display: none !important;
    }
    
    .preview-content {
        border: none !important;
        box-shadow: none !important;
        padding: 20px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
        background: white !important;
    }
    
    .invoice-preview {
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }
    
    .invoice-header {
        margin-bottom: 20px !important;
    }
    
    .client-details {
        margin-bottom: 20px !important;
    }
    
    .invoice-items table {
        margin-bottom: 20px !important;
    }
    
    .bank-details {
        margin-top: 20px !important;
    }
}

/* PDF-specific styles */
.pdf-container {
    width: 210mm;
    min-height: 297mm;
    padding: 20mm;
    margin: 0 auto;
    background: white;
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 1.4;
    color: #333;
    box-sizing: border-box;
}

.pdf-container .invoice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    align-items: flex-start;
}

.pdf-container .company-details h1 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: bold;
}

.pdf-container .invoice-details h2 {
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: bold;
    text-align: right;
}

.pdf-container .client-details {
    margin-bottom: 30px;
}

.pdf-container table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.pdf-container th,
.pdf-container td {
    padding: 8px 12px;
    border: 1px solid #333;
    text-align: left;
}

.pdf-container th {
    background-color: #f0f0f0;
    font-weight: bold;
}

.pdf-container .totals-row,
.pdf-container .gst-row,
.pdf-container .total-row {
    background-color: #f8f8f8;
}

.pdf-container .signature-section {
    margin-top: 40px;
}

.pdf-container .invoice-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 10px;
}

.download-section {
    margin-top: 1rem;
    text-align: center;
}

/* Authentication Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
}

.auth-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid #ddd;
}

.auth-tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: all 0.3s ease;
}

.auth-tab-btn.active {
    color: #007bff;
    border-bottom: 2px solid #007bff;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.auth-form input:focus {
    outline: none;
    border-color: #007bff;
}

.auth-form button {
    width: 100%;
    padding: 0.75rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.auth-form button:hover {
    background-color: #0056b3;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #ddd;
}

header h1 {
    margin: 0;
    color: #333;
    font-size: 2rem;
}

.logout-btn {
    padding: 0.5rem 1rem;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.logout-btn:hover {
    background-color: #c82333;
}

/* Button Styles */
button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #4CAF50;
    color: white;
}

button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Tab Buttons */
.tab-btn {
    background-color: #f5f5f5;
    color: #333;
    margin-right: 5px;
    border: 1px solid #ddd;
}

.tab-btn.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* Sub-tab Buttons */
.sub-tab-btn {
    background-color: #f5f5f5;
    color: #333;
    margin-right: 5px;
    border: 1px solid #ddd;
    padding: 8px 16px;
}

.sub-tab-btn.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* Form Buttons */
.form-group button,
.button-group button {
    margin-right: 10px;
    min-width: 120px;
}

/* Reset Button */
button[type="reset"] {
    background-color: #f44336;
}

/* Edit and Delete Buttons */
.edit-btn {
    background-color: #2196F3;
    padding: 6px 12px;
    font-size: 12px;
}

.delete-btn {
    background-color: #f44336;
    padding: 6px 12px;
    font-size: 12px;
}

/* Logout Button */
.logout-btn {
    background-color: #f44336;
    padding: 8px 16px;
    position: absolute;
    right: 20px;
    top: 20px;
}

/* Add Item Button */
#addItemBtn {
    background-color: #2196F3;
    margin-top: 10px;
}

/* Client Actions */
.client-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Button Groups */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Invoice Management Styles */
.invoice-management {
    padding: 20px;
}

.invoice-management h2 {
    margin-bottom: 20px;
    color: #333;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filters input,
.filters select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    flex: 1;
    min-width: 200px;
}

.filters select {
    background-color: white;
    cursor: pointer;
}

.filters input:focus,
.filters select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.invoice-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

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

.invoice-list th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.invoice-list td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    color: #212529;
}

.invoice-list tr:hover {
    background-color: #f8f9fa;
}

.invoice-actions {
    display: flex;
    gap: 8px;
}

.invoice-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.view-invoice {
    background-color: #007bff;
    color: white;
}

.view-invoice:hover {
    background-color: #0056b3;
}

.delete-invoice {
    background-color: #dc3545;
    color: white;
}

.delete-invoice:hover {
    background-color: #c82333;
}

.invoice-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background-color: #ffeeba;
    color: #856404;
}

.status-paid {
    background-color: #d4edda;
    color: #155724;
}

.status-overdue {
    background-color: #f8d7da;
    color: #721c24;
}

.status-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    background-color: white;
    cursor: pointer;
    min-width: 90px;
    font-weight: 500;
}

.status-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Status color coding */
.status-select[data-status="pending"] {
    background-color: #ffeeba;
    color: #856404;
    border-color: #ffeaa7;
}

.status-select[data-status="paid"] {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.status-select[data-status="overdue"] {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.status-select[data-status="cancelled"] {
    background-color: #e2e3e5;
    color: #383d41;
    border-color: #d6d8db;
}

.no-invoices, .error-message, .no-results {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

.error-message {
    color: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filters {
        flex-direction: column;
    }
    
    .filters input {
        width: 100%;
    }
    
    .invoice-list {
        overflow-x: auto;
    }
    
    .invoice-actions {
        flex-direction: column;
    }
}

/* Analytics Consent Banner */
.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #343a40;
    color: white;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.consent-content p {
    margin: 0;
    flex: 1;
    min-width: 300px;
}

.consent-buttons {
    display: flex;
    gap: 10px;
}

.consent-buttons .btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.consent-buttons .btn-primary {
    background-color: #007bff;
    color: white;
}

.consent-buttons .btn-primary:hover {
    background-color: #0056b3;
}

.consent-buttons .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.consent-buttons .btn-secondary:hover {
    background-color: #545b62;
}

@media (max-width: 768px) {
    .consent-content {
        flex-direction: column;
        text-align: center;
    }
    
    .consent-buttons {
        width: 100%;
        justify-content: center;
    }
} 