/* Premium Invoice Stylesheet (Clorio Layout) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;500&display=swap');

:root {
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --text-light: #8c8c8c;
    --border-color: #e2e8f0;
    --border-color-dark: #cbd5e1;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-table-header: #f8fafc;
    --primary-color: #C62430; /* Aero D2C Labs Crimson Red */
    
    /* Layout constants */
    --a4-width: 210mm;
    --a4-height: 297mm;
}

/* Base resets & layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    color: var(--text-main);
    background-color: var(--bg-page);
    line-height: 1.4;
    font-size: 13px;
    font-weight: 300; /* Strict Font Weight 300 globally */
    height: 100vh;
    overflow: hidden;
}

/* Parent navigation wrapper */
.main-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Left Navigation Rail */
.navigation-rail {
    width: 72px;
    height: 100%;
    background-color: #0f172a; /* Slate 900 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    flex-shrink: 0;
    border-right: 1px solid #1e293b;
    z-index: 100;
}

.nav-logo {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    align-items: center;
    flex-grow: 1;
    margin-top: 20px;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    gap: 4px;
    transition: all 0.2s ease;
}

.nav-link svg {
    stroke: #94a3b8;
    transition: stroke 0.2s ease;
}

.nav-link:hover {
    color: #f8fafc;
    background-color: #1e293b;
}

.nav-link:hover svg {
    stroke: #f8fafc;
}

.nav-link.active {
    color: #ffffff;
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(198, 36, 48, 0.2);
}

.nav-link.active svg {
    stroke: #ffffff;
}

.nav-link.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.nav-link.disabled:hover {
    background-color: transparent;
    color: #94a3b8;
}

.nav-link.disabled:hover svg {
    stroke: #94a3b8;
}

.nav-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #1e293b;
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #334155;
}

/* Split screen app container */
.app-container {
    display: flex;
    flex: 1;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Input Control Panel */
.sidebar {
    width: 380px;
    height: 100vh;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px dotted var(--border-color-dark);
}

.sidebar-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px dotted var(--border-color);
}

.sidebar-section-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.form-group-row .form-group {
    margin-bottom: 0;
}

label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 300;
    color: var(--text-main);
    background-color: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
}

textarea {
    resize: vertical;
    min-height: 60px;
}

/* Button styling */
button, .btn {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    line-height: 1;
}

.btn-primary {
    background-color: #0f172a; /* Slate 900 */
    color: #ffffff;
    border: 1px solid #0f172a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background-color: #1e293b; /* Slate 800 */
    border-color: #1e293b;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: #ffffff;
    color: #334155; /* Slate 700 */
    border: 1px solid #cbd5e1; /* Slate 300 */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background-color: #f8fafc; /* Slate 50 */
    color: #0f172a; /* Slate 900 */
    border-color: #94a3b8; /* Slate 400 */
}

.btn-secondary:active {
    background-color: #f1f5f9;
}

/* Checkbox toggle styling */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Dynamic Items Editor elements */
.item-editor-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background-color: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    position: relative;
}

.item-editor-inputs {
    display: grid;
    grid-template-columns: 1fr 1.2fr auto;
    gap: 8px;
    align-items: flex-end;
}

.btn-remove-item {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--border-color-dark);
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove-item:hover {
    background-color: #fef2f2;
    border-color: var(--primary-color);
}

.btn-add-item {
    width: 100%;
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px dashed var(--border-color-dark);
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.btn-add-item:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: #fef2f2;
}

/* Live Preview Pane wrapper */
.preview-pane {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
}



/* Page / Sheet container for screen preview */
.invoice-page {
    width: var(--a4-width);
    min-height: var(--a4-height);
    background-color: var(--bg-card);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.04);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 45px 55px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Invoice Header */
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.invoice-title-area {
    display: flex;
    flex-direction: column;
}

.invoice-title {
    font-size: 40px;
    font-weight: 500;
    color: var(--text-main);
    letter-spacing: -1px;
    line-height: 1.0;
}

.invoice-number {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 6px;
}

.company-logo-area {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.company-logo {
    height: 50px;
    display: block;
}

/* Divider styling */
.divider {
    border-bottom: 2px dotted var(--border-color-dark);
    width: 100%;
    margin-bottom: 24px;
}

/* Metadata Block */
.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.dates-block {
    display: flex;
    gap: 32px;
}

.meta-label {
    font-size: 13px;
    font-weight: 300;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.meta-val-large {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.meta-val {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
}

/* Addresses Section */
.address-section {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    margin-bottom: 28px;
}

.address-block {
    display: flex;
    flex-direction: column;
}

.address-label {
    font-size: 13px;
    font-weight: 300;
    color: var(--text-light);
    margin-bottom: 6px;
}

.address-details {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.addr-name {
    font-size: 14px;
    font-weight: 500;
}

.addr-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    font-weight: 300;
}

.addr-contact {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 300;
}

.addr-tax {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 300;
}

.addr-tax span {
    color: var(--text-main);
    font-weight: 500;
}

/* Table Area */
.table-area {
    flex-grow: 1;
    margin-bottom: 24px;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
}

/* Table header rounded background */
.items-table thead th {
    background-color: var(--bg-table-header);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    padding: 10px 16px;
    text-align: left;
    border: none;
}

.items-table thead th:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.items-table thead th:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.items-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    font-size: 13px;
    font-weight: 300;
}

.items-table td .item-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.4;
    font-weight: 300;
    white-space: pre-wrap;
}

.items-table td.center-align {
    text-align: center;
}

.items-table td.right-align, 
.items-table th.right-align {
    text-align: right;
}

.items-table td strong {
    color: var(--text-main);
    font-weight: 500;
}

.items-table td .item-title {
    font-weight: 500;
    color: var(--text-main);
}

/* Total Amount Row */
.total-amount-row {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.total-amount-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.total-amount-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

/* Breakdowns list */
.breakdown-list {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    padding: 0 16px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    width: 250px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 300;
}

.breakdown-item span:last-child {
    font-weight: 500;
    color: var(--text-main);
}

/* Footer Grid Block (3 Columns) */
.footer-grid-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 12px;
}

.payment-method-block {
    display: flex;
    flex-direction: column;
}

.payment-method-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 8px;
}

.payment-method-details {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    font-weight: 300;
}

.payment-method-details span {
    font-weight: 500;
    color: var(--text-main);
}

.payment-terms-block {
    display: flex;
    flex-direction: column;
}

.payment-terms-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 8px;
}

.payment-terms-details {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    font-weight: 300;
}

.signature-block-area {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.signature-container {
    height: 44px;
    margin-bottom: 4px;
    opacity: 0.9;
}

.signature-name-row {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 2px;
}

.signature-note {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 300;
}

/* Footer Section 3: Thank You Note */
.footer-thank-you {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
    margin-top: 16px;
    margin-bottom: 8px;
    font-weight: 300;
}




/* SPA View Switching */
.app-view {
    display: none;
    flex: 1;
    height: 100vh;
    overflow: hidden;
}

.app-view.active {
    display: flex;
}

/* Settings Container Layout */
.settings-container {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 40px 60px;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.settings-card {
    width: 100%;
    max-width: 900px;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-header {
    padding-bottom: 16px;
    border-bottom: 2px dotted var(--border-color-dark);
}

.settings-title {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-main);
}

.settings-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.settings-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-section-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* Upload elements styling */
.upload-group {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--bg-page);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 8px;
}

.upload-preview {
    width: 80px;
    height: 48px;
    border: 1px dashed var(--border-color-dark);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-card);
    overflow: hidden;
}

.upload-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.btn-upload-container {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.btn-upload-container input[type="file"] {
    position: absolute;
    font-size: 100px;
    right: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

/* Success notification toast */
.toast-success {
    position: fixed;
    top: 24px;
    right: 24px;
    background-color: #0f172a;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 4px solid #10b981; /* green indicator */
}

.toast-success.show {
    transform: translateY(0);
    opacity: 1;
}

/* Invoices Dashboard Layout */
.invoices-list-container {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 40px 60px;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.invoices-list-card {
    width: 100%;
    max-width: none;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.invoices-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.invoices-table th {
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    padding: 12px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.invoices-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 300;
}

.invoices-table tr:hover td {
    background-color: var(--bg-page);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    background-color: var(--bg-card);
    border-radius: 8px;
}

.empty-state-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin-top: 16px;
}

.empty-state-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 300;
}

.action-btn-group {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Clients Dashboard Layout */
.clients-container {
    flex: 1;
    height: 100vh;
    overflow: hidden;
    padding: 40px 60px;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.clients-card {
    width: 100%;
    max-width: none;
    height: 100%;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.clients-layout {
    display: flex;
    width: 100%;
    gap: 32px;
    flex: 1;
    min-height: 0;
    margin-top: 16px;
}

.clients-sidebar {
    width: 260px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 16px;
    overflow-y: auto;
    flex-shrink: 0;
}

.clients-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    padding-right: 8px;
}

.client-nav-item {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.client-nav-item:hover {
    background-color: var(--bg-page);
}

.client-nav-item.active {
    background-color: #f1f5f9;
    color: var(--primary-color);
}

.client-nav-meta {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 300;
}

.client-detail-header {
    border-bottom: 2px dotted var(--border-color-dark);
    padding-bottom: 16px;
}

.client-detail-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.client-detail-meta {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 8px;
}

.client-summary-row {
    display: flex;
    gap: 24px;
}

.client-summary-card {
    flex: 1;
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.client-summary-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.client-summary-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

/* Leads Dashboard Layout */
.leads-container {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 40px 60px;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.leads-card {
    width: 100%;
    max-width: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Leads Modal Overlay */
.lead-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.4); /* Slate 900 with opacity */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.lead-modal-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 680px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lead-modal-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lead-modal-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.lead-modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

/* Stage status badges & selectors */
.stage-selector {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

.stage-selector.stage-new {
    background-color: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.stage-selector.stage-contacted {
    background-color: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.stage-selector.stage-requirements {
    background-color: #f3e8ff;
    color: #6b21a8;
    border-color: #e9d5ff;
}

.stage-selector.stage-quotation {
    background-color: #fef9c3;
    color: #854d0e;
    border-color: #fef08a;
}

.stage-selector.stage-negotiations {
    background-color: #ffedd5;
    color: #c2410c;
    border-color: #fed7aa;
}

.stage-selector.stage-won {
    background-color: #dcfce7;
    color: #15803d;
    border-color: #bbf7d0;
}

.stage-selector.stage-lost {
    background-color: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}
 
/* Invoice status badges & selectors */
.status-selector {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    background-color: #ffffff;
}
 
.status-selector.status-draft {
    background-color: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}
 
.status-selector.status-sent {
    background-color: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
 
.status-selector.status-paid {
    background-color: #dcfce7;
    color: #15803d;
    border-color: #bbf7d0;
}
 
.status-selector.status-canceled {
    background-color: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

/* Controls Bar (Search & Filter) styling */
.controls-bar,
.dashboard-header-row {
    display: flex;
    gap: 16px;
    align-items: center;
    width: 100%;
    margin-top: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.controls-bar .search-input-wrapper,
.dashboard-header-row .search-input-wrapper {
    flex: 1;
    min-width: 240px;
}

.controls-bar input,
.dashboard-header-row input {
    margin-bottom: 0;
}

.controls-bar select,
.dashboard-header-row select {
    margin-bottom: 0;
    width: auto;
    min-width: 180px;
}

/* Pagination Footer styling */
.pagination-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 300;
}

.pagination-btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn {
    background-color: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
}

.pagination-btn:hover {
    background-color: var(--bg-page);
    border-color: var(--border-color-dark);
}

.pagination-btn.active {
    background-color: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.pagination-arrow-btn {
    padding: 0 10px;
    width: auto;
    font-size: 13px;
    font-weight: 500;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #ffffff;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-arrow-btn:hover:not(.disabled) {
    background-color: var(--bg-page);
    border-color: var(--border-color-dark);
}

.pagination-arrow-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Print Overrides */
@media print {
    body {
        background-color: #ffffff;
        padding: 0;
        margin: 0;
        display: block;
    }

    .main-wrapper {
        display: block;
        height: auto;
        overflow: visible;
    }

    .navigation-rail,
    #viewSettings,
    #viewInvoicesList,
    #viewClientsList,
    #viewLeadsList {
        display: none !important;
    }

    .app-container {
        display: block;
        height: auto;
        overflow: visible;
    }

    .sidebar {
        display: none !important;
    }



    .preview-pane {
        padding: 0;
        margin: 0;
        overflow: visible;
        display: block;
        height: auto;
    }

    .invoice-page {
        width: 100%;
        min-height: 100%;
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
        background: transparent;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    tr {
        page-break-inside: avoid;
    }

    .footer-grid-row,
    .footer-thank-you {
        page-break-inside: avoid;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
