/* ==============================================
   GoodMood Billing Page — Invoice History
   ============================================== */

.gm-billing-section { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; overflow: hidden; }
.gm-billing-section-header { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 2rem; border-bottom: 1px solid #f3f4f6; flex-wrap: wrap; gap: 1rem; }
.gm-billing-section-header h3 { margin: 0 0 0.25rem; font-size: 1.125rem; font-weight: 600; color: #1e293b; display: flex; align-items: center; gap: 0.5rem; }
.gm-billing-section-header p { margin: 0; font-size: 0.875rem; color: #9ca3af; }

/* Invoice Table */
.gm-invoices-table-wrap { overflow-x: auto; }
.gm-invoices-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.gm-invoices-table thead th { background: #f9fafb; padding: 0.75rem 1rem; text-align: left; font-weight: 600; color: #6b7280; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.gm-invoices-table tbody td { padding: 0.875rem 1rem; border-bottom: 1px solid #f3f4f6; color: #374151; vertical-align: middle; }
.gm-invoices-table tbody tr:last-child td { border-bottom: none; }
.gm-invoices-table tbody tr:hover { background: #f9fafb; }
.gm-inv-number { font-weight: 600; color: #1e293b !important; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.8125rem; white-space: nowrap; }
.gm-inv-amount { font-weight: 600; color: #1e293b !important; white-space: nowrap; }
.gm-inv-detail { word-break: break-word; }
.gm-inv-item { display: block; font-size: 0.8125rem; color: #374151; line-height: 1.5; }
.gm-inv-item-empty { color: #d1d5db; }
.gm-inv-period { display: block; font-size: 0.75rem; color: #9ca3af; margin-top: 2px; }
.gm-inv-actions { display: flex; gap: 0.5rem; align-items: center; white-space: nowrap; width: 1%; }
.gm-inv-actions a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; color: #6b7280; transition: all 0.2s ease; text-decoration: none; }
.gm-inv-actions a:hover { background: #f3f4f6; color: #FFA44E; }
.gm-invoice-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.gm-invoice-status.paid { background: #d1fae5; color: #065f46; }
.gm-invoice-status.open { background: #fef3c7; color: #92400e; }
.gm-invoice-status.draft { background: #e0e7ff; color: #3730a3; }
.gm-invoice-status.void { background: #f3f4f6; color: #6b7280; }
.gm-invoice-status.failed { background: #fef2f2; color: #991b1b; }
.gm-invoices-empty { text-align: center; padding: 3rem 1rem !important; color: #9ca3af; font-size: 0.9375rem; }
.gm-invoices-empty i { margin-right: 0.5rem; color: #d1d5db; }
.gm-inv-platform { white-space: nowrap; }
.gm-inv-platform-badge { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; font-weight: 500; color: #4b5563; background: #f3f4f6; border-radius: 6px; padding: 0.2rem 0.5rem; white-space: nowrap; }



/* Action Links */
.gm-invoice-pdf-link, .gm-invoice-view-link { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; transition: all 0.2s; text-decoration: none; border: none; cursor: pointer; }
.gm-invoice-pdf-link { color: #ef4444; background: #fef2f2; }
.gm-invoice-pdf-link:hover { background: #fee2e2; color: #dc2626; }
.gm-invoice-view-link { color: #3b82f6; background: #eff6ff; }
.gm-invoice-view-link:hover { background: #dbeafe; color: #2563eb; }
/* v2: Odoo PDF button (button element, not anchor) */
button.gm-odoo-pdf { font-size: 0.875rem; }
button.gm-odoo-pdf:disabled { opacity: 0.5; cursor: wait; }

/* Responsive */
@media (max-width: 768px) {
    .gm-billing-section-header { padding: 1rem 1.25rem; }
    .gm-invoices-table thead th, .gm-invoices-table tbody td { padding: 0.625rem 0.75rem; }
    .gm-inv-detail { max-width: 200px; }
}
