/* ============================================================
   INVOICE FORM STYLES
   Complex multi-section form layout
   ============================================================ */

.invoice-form-container {
    max-width: 960px;
}

.form-section {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title svg { width: 16px; height: 16px; }

/* Line Items Table */
.line-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.line-items-table th {
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.line-items-table td {
    padding: 0.5rem 0.4rem;
    vertical-align: top;
}

.line-items-table .form-control {
    padding: 0.5rem 0.65rem;
    font-size: 0.88rem;
}

.line-items-table .col-num { width: 40px; text-align: center; }
.line-items-table .col-service { min-width: 180px; }
.line-items-table .col-desc { min-width: 160px; }
.line-items-table .col-sac { width: 90px; }
.line-items-table .col-qty { width: 75px; }
.line-items-table .col-rate { width: 110px; }
.line-items-table .col-amount { width: 110px; }
.line-items-table .col-action { width: 40px; text-align: center; }

.line-item-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.35rem;
}

.remove-item-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    margin-top: 0.35rem;
}

.remove-item-btn:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

.add-item-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px dashed rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    color: var(--accent);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition-base);
}

.add-item-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent);
}

/* Totals Section */
.invoice-totals {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.totals-table {
    width: 320px;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.92rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.totals-row .label { font-weight: 500; }
.totals-row .value { font-weight: 600; font-family: 'SF Mono', 'Fira Code', monospace; }

.totals-row.grand-total {
    border-top: 2px solid var(--accent);
    border-bottom: none;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.totals-row.grand-total .value {
    color: var(--accent-hover);
    font-weight: 800;
}

/* Amount in Words */
.amount-words {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Invoice number display */
.invoice-number-display {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-hover);
    letter-spacing: 0.02em;
}
