/**
 * ComptaFlow Admin Styles
 * Version 1.0.2
 */

/* Status badges */
.status-active { 
    color: #00a32a; 
    font-weight: bold; 
}
.status-inactive { 
    color: #d63638; 
}

/* Badges génériques */
.badge {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    color: white;
    background: #666;
}

/* Account selector */
.account-result:hover {
    background: #f0f0f1 !important;
}

/* Payroll inputs */
.cfp-payroll-input {
    width: 120px;
}

/* Journal filters */
.cfp-journal-filters {
    background: white;
    padding: 15px;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Postbox styling */
.cfp-postbox {
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 20px 0;
    padding: 20px;
}

/* Alert boxes */
.cfp-alert-warning {
    background: #fff3cd;
    border-left: 4px solid #856404;
    padding: 15px;
    margin: 15px 0;
}

.cfp-alert-error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 15px;
    margin: 15px 0;
}

.cfp-alert-success {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 15px;
    margin: 15px 0;
}

.cfp-alert-info {
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    padding: 15px;
    margin: 15px 0;
}

/* Badge colors by source */
.badge-sale { background: #00a32a; }
.badge-expense { background: #d63638; }
.badge-payment { background: #0073aa; }
.badge-vat { background: #f56e28; }

/* Account selector interactions */
.account-result:hover { background: #f0f0f1; }
.account-quick-select:hover { opacity: 0.8; }

/* ========================================
   Bank Reconciliation Screen
   ======================================== */
.reco-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr 1fr; 
    gap: 16px; 
}
.reco-column .postbox { 
    min-height: 440px; 
}
.bank-line-item { 
    padding: 8px; 
    border-bottom: 1px solid #eee; 
    cursor: pointer; 
}
.bank-line-item.selected { 
    background: #e0f2fe; 
}
.balance-item { 
    padding: 8px; 
    border-bottom: 1px solid #f1f1f1; 
}
.balance-item .meta { 
    font-size: 12px; 
    color: #666; 
}
.sticky-footer { 
    position: sticky; 
    bottom: 0; 
    background: #fff; 
    padding: 10px; 
    border-top: 1px solid #ddd; 
}
#cfp-validate-selected[disabled] { 
    opacity: .5; 
    cursor: not-allowed; 
}
.mini { 
    font-size: 12px; 
    color: #666; 
}
.tag { 
    display: inline-block; 
    padding: 2px 6px; 
    border-radius: 4px; 
    background: #eef; 
    font-size: 11px; 
    margin-left: 6px;
}
.right { 
    text-align: right; 
}
.balance-item.suggested { 
    background: #dcfce7 !important; 
    border-left: 4px solid #22c55e; 
}

/* ========================================
   Manual Journal Entry Screen (OD)
   ======================================== */
#od-lines-table input[type="text"],
#od-lines-table input[type="number"] {
    padding: 6px;
}
.remove-line {
    font-size: 20px;
    color: #d63638;
    padding: 0;
    line-height: 1;
}

/* ========================================
   Invoice Lines Table
   ======================================== */
#cfp-invoice-lines {
    table-layout: fixed;
    width: 100%;
}
#cfp-invoice-lines th,
#cfp-invoice-lines td {
    overflow: hidden;
    word-wrap: break-word;
}
#cfp-invoice-lines .cfp-line-row td {
    vertical-align: middle;
    padding: 8px 6px;
}
#cfp-invoice-lines .cfp-line-row input,
#cfp-invoice-lines .cfp-line-row select {
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    height: 32px;
}
#cfp-invoice-lines .cfp-line-row input[type="number"] {
    text-align: right;
    -moz-appearance: textfield;
}
#cfp-invoice-lines .cfp-line-row input[type="number"]::-webkit-inner-spin-button,
#cfp-invoice-lines .cfp-line-row input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}
.cfp-remove-line {
    color: #d63638;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
    padding: 4px 8px;
    line-height: 1;
}
.cfp-remove-line:hover {
    color: #a00;
}
.cfp-line-total {
    font-weight: bold;
    white-space: nowrap;
}
.cfp-totals-row td {
    border-top: 1px solid #ddd;
    padding: 8px 6px;
}

/* Badge colors for invoices */
.badge-draft { background: #999; }
.badge-pending { background: #f08c00; }
.badge-paid { background: #00875a; }
.badge-overdue { background: #e03131; }
.badge-cancelled { background: #666; }