/*! * Name: Unique App
  * Version: v1.0
  * Author: Rodrigo Felix.
----------------------
 */
:root, [data-bs-theme=light] {
    --bs-blue: #2563eb;
    --bs-indigo: #4F46E5;
    --bs-purple: #6f42c1;
    --bs-pink: #d63384;
    --bs-red: #E11D48;
    --bs-orange: #fd7e14;
    --bs-yellow: #ffc107;
    --bs-green: #10B981;
    --bs-teal: #20c997;
    --bs-cyan: #0dcaf0;
    --bs-black: #000000;
    --bs-white: #ffffff;
    --bs-primary-50: #eff6ff;
    --bs-primary-100: #dbeafe;
    --bs-primary-200: #bfdbfe;
    --bs-primary-300: #93c5fd;
    --bs-primary-400: #60a5fa;
    --bs-primary-500: #3b82f6;
    --bs-primary-600: #2563eb;
    --bs-primary-700: #1d4ed8;
    --bs-primary-800: #1e40af;
    --bs-primary-900: #1e3a8a;
    --bs-primary-dark: #1e40af;
    --bs-gray: #475569;
    --bs-gray-dark: #1e293b;
    --bs-gray-50: #f8fafc;
    --bs-gray-100: #f1f5f9;
    --bs-gray-200: #e2e8f0;
    --bs-gray-300: #cbd5e1;
    --bs-gray-400: #94a3b8;
    --bs-gray-500: #64748b;
    --bs-gray-600: #475569;
    --bs-gray-700: #334155;
    --bs-gray-800: #1e293b;
    --bs-gray-900: #0f172a;
    --bs-primary: #2563eb;
    --bs-secondary: #475569;
    --bs-success: #10B981;
    --bs-info: #0dcaf0;
    --bs-warning: #ffc107;
    --bs-danger: #E11D48;
    --bs-light: #e2e8f0;
    --bs-dark: #334155;
    --bs-darker: #0f172a;
    --bs-primary-rgb: 37, 99, 235;
    --bs-secondary-rgb: 71, 85, 105;
    --bs-success-rgb: 16, 185, 129;
    --bs-info-rgb: 13, 202, 240;
    --bs-warning-rgb: 255, 193, 7;
    --bs-danger-rgb: 225, 29, 72;
    --bs-light-rgb: 226, 232, 240;
    --bs-dark-rgb: 51, 65, 85;
    --bs-darker-rgb: 15, 23, 42;
    --bs-primary-text-emphasis: #052c65;
    --bs-secondary-text-emphasis: #2b2f32;
    --bs-success-text-emphasis: #0a3622;
    --bs-info-text-emphasis: #055160;
    --bs-warning-text-emphasis: #664d03;
    --bs-danger-text-emphasis: #58151c;
    --bs-light-text-emphasis: #495057;
    --bs-dark-text-emphasis: #495057;
    --bs-primary-bg-subtle: #cfe2ff;
    --bs-secondary-bg-subtle: #e2e3e5;
    --bs-success-bg-subtle: #d1e7dd;
    --bs-info-bg-subtle: #cff4fc;
    --bs-warning-bg-subtle: #fff3cd;
    --bs-danger-bg-subtle: #f8d7da;
    --bs-light-bg-subtle: #fcfcfd;
    --bs-dark-bg-subtle: #ced4da;
    --bs-primary-border-subtle: #9ec5fe;
    --bs-secondary-border-subtle: #c4c8cb;
    --bs-success-border-subtle: #a3cfbb;
    --bs-info-border-subtle: #9eeaf9;
    --bs-warning-border-subtle: #ffe69c;
    --bs-danger-border-subtle: #f1aeb5;
    --bs-light-border-subtle: #e9ecef;
    --bs-dark-border-subtle: #adb5bd;
    --bs-white-rgb: 255, 255, 255;
    --bs-black-rgb: 0, 0, 0;
    --bs-font-sans-serif: "Poppins";
    --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-body-font-size: 1rem;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.5;
    --bs-body-color: #64748b;
    --bs-body-color-rgb: 100, 116, 139;
    --bs-body-bg: #dbeafe;
    --bs-body-bg-rgb: 219, 234, 254;
    --bs-emphasis-color: #000;
    --bs-emphasis-color-rgb: 0, 0, 0;
    --bs-secondary-color: rgba(33, 37, 41, 0.75);
    --bs-secondary-color-rgb: 33, 37, 41;
    --bs-secondary-bg: #e9ecef;
    --bs-secondary-bg-rgb: 233, 236, 239;
    --bs-tertiary-color: rgba(33, 37, 41, 0.5);
    --bs-tertiary-color-rgb: 33, 37, 41;
    --bs-tertiary-bg: #f8f9fa;
    --bs-tertiary-bg-rgb: 248, 249, 250;
    --bs-heading-color: #475569;
    --bs-link-color: #2563eb;
    --bs-link-color-rgb: 37, 99, 235;
    --bs-link-decoration: none;
    --bs-link-hover-color: #1e4fbc;
    --bs-link-hover-color-rgb: 30, 79, 188;
    --bs-code-color: #d63384;
    --bs-highlight-color: #212529;
    --bs-highlight-bg: #fff3cd;
    --bs-border-width: 1px;
    --bs-border-style: solid;
    --bs-border-color: #cbd5e1;
    --bs-border-color-translucent: rgba(51, 65, 85, 0.175);
    --bs-border-radius: 0.375rem;
    --bs-border-radius-sm: 0.25rem;
    --bs-border-radius-lg: 0.5rem;
    --bs-border-radius-xl: 1rem;
    --bs-border-radius-xxl: 2rem;
    --bs-border-radius-2xl: var(--bs-border-radius-xxl);
    --bs-border-radius-pill: 50rem;
    --bs-box-shadow: 0 0 1rem rgba(0, 0, 0, 0.15);
    --bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);
    --bs-focus-ring-width: 0.25rem;
    --bs-focus-ring-opacity: 0.25;
    --bs-focus-ring-color: rgba(13, 110, 253, 0.25);
    --bs-form-valid-color: #198754;
    --bs-form-valid-border-color: #198754;
    --bs-form-invalid-color: #dc3545;
    --bs-form-invalid-border-color: #dc3545
}
/* ==========================================================================
   Public invoice view (invoice/{id}/{hash}) — body.viewinvoice / .inv-view
   The unique theme does not ship Bootstrap 3 / Tailwind (tw-*) utilities,
   so this page is styled with its own scoped classes.
   ========================================================================== */
.inv-view { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; color: #334155; font-size: 15px; }
.inv-view .hide { display: none !important; }
.inv-view__logo { margin-bottom: 24px; }
.inv-view__logo img { max-height: 110px; width: auto; }

.inv-view__topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.inv-view__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.inv-view__inline-form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }

/* status badge (format_invoice_status output) */
.inv-view__status .label { display: inline-block; padding: 5px 12px; border-radius: 6px; font-size: 14px; font-weight: 600; line-height: 1.3; border: 1px solid #cbd5e1; background: #f1f5f9; color: #475569; }
.inv-view__status .invoice-status-1 { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }  /* unpaid */
.inv-view__status .invoice-status-2 { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }  /* paid */
.inv-view__status .invoice-status-3 { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }  /* partially paid */
.inv-view__status .invoice-status-4 { color: #b45309; background: #fffbeb; border-color: #fde68a; }  /* overdue */

/* buttons */
.inv-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 6px; border: 0; font-size: 15px; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none; }
.inv-btn:hover, .inv-btn:focus { text-decoration: none; filter: brightness(.96); }
.inv-btn--light { background: #e2e8f0; color: #334155; }
.inv-btn--light:hover { color: #0f172a; }
.inv-btn--success, .inv-view .invoice-html-pay-now-top-modes > .btn { background: #22c55e; color: #fff; border: 0; border-radius: 6px; padding: 10px 18px; font-weight: 600; }
.inv-btn--success:hover { color: #fff; }
.inv-btn--icon { padding: 6px 8px; background: #f1f5f9; color: #475569; font-size: 13px; }

.inv-view__alert { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 8px; padding: 12px 16px; text-align: center; font-weight: 600; font-size: 14px; margin-bottom: 18px; }

/* card */
.inv-view__card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 44px 56px; }
.inv-view__head { display: flex; justify-content: space-between; gap: 40px; margin-bottom: 36px; }
.inv-view__to { text-align: right; }
.inv-view__number { margin: 0 0 14px; font-size: 24px; font-weight: 600; color: #334155; }
.inv-view__label { font-weight: 600; color: #334155; }
.inv-view__address { font-style: normal; color: #64748b; line-height: 1.55; margin: 0 0 12px; }
.inv-view__address b { color: #0f172a; font-weight: 600; }
.inv-view__meta p { margin: 0; line-height: 1.7; color: #475569; }
.inv-view__meta span { font-weight: 600; color: #0f172a; }

/* items table (get_items_table_data()->table()) */
.inv-view__items { overflow-x: auto; }
.inv-view__items table { width: 100%; border-collapse: collapse; margin: 0; }
.inv-view__items thead th { background: #f1f5f9; border: 1px solid #e2e8f0; padding: 12px 14px; font-weight: 600; color: #334155; text-align: right; white-space: nowrap; }
.inv-view__items thead th:nth-child(1) { text-align: center; width: 50px; }
.inv-view__items thead th:nth-child(2) { text-align: left; }
.inv-view__items tbody td { padding: 14px; vertical-align: top; text-align: right; border: 0; border-bottom: 1px solid #f1f5f9; color: #475569; }
.inv-view__items tbody td:nth-child(1) { text-align: center; color: #64748b; }
.inv-view__items tbody td:nth-child(2) { text-align: left; }
.inv-view__items tbody td:nth-child(2) .bold,
.inv-view__items tbody td:nth-child(2) strong { color: #64748b; font-weight: 600; }
.inv-view__items tbody td:nth-child(2) .item-long-description,
.inv-view__items tbody td:nth-child(2) .tw-text-neutral-500 { display: block; font-size: 14px; color: #475569; }

/* totals */
.inv-view__totals { width: 50%; margin: 28px 0 0 auto; border-collapse: collapse; }
.inv-view__totals td { padding: 14px 20px; border-top: 1px solid #e2e8f0; text-align: right; color: #64748b; }
.inv-view__totals td:first-child { font-weight: 600; color: #334155; }
.inv-view__totals tr.inv-view__due.is-open td { color: #dc2626; font-weight: 600; }
.inv-view__words { text-align: center; margin-top: 16px; font-weight: 600; }
.inv-view__words span { color: #64748b; font-weight: 400; }

/* sections */
.inv-view__section { margin-top: 36px; padding-top: 26px; border-top: 1px solid #e2e8f0; }
.inv-view__section h4 { margin: 0 0 10px; font-size: 16px; font-weight: 600; color: #334155; }
.inv-view__muted { color: #64748b; margin: 0; }
.inv-view__text, .inv-view__mode-desc { color: #475569; font-size: 14px; line-height: 1.6; }
.inv-view__mode-desc { margin-bottom: 14px; }
.inv-view__mode-name { font-weight: 600; margin: 0 0 4px; color: #0f172a; }
.inv-view__file { margin: 0 0 8px; }
.inv-view__payments { width: 100%; border-collapse: collapse; }
.inv-view__payments th { background: #f1f5f9; padding: 10px 12px; text-align: left; font-weight: 600; border: 1px solid #e2e8f0; }
.inv-view__payments td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; }
.inv-view__pay { display: flex; gap: 40px; }
.inv-view__pay-col { flex: 1 1 0; }
.inv-view__pay-col--right { text-align: right; }
.inv-view__amount { margin: 20px 0; }
.inv-view__pay-total { font-size: 18px; font-weight: 600; margin: 0; }

@media (max-width: 767px) {
    .inv-view__card { padding: 24px 18px; }
    .inv-view__head, .inv-view__pay { flex-direction: column; gap: 24px; }
    .inv-view__to, .inv-view__pay-col--right { text-align: left; }
    .inv-view__totals { width: 100%; }
}
