/* =========================================================================
 *  owner-tabs.css
 *  Phase 4 — ownership wallet styles. Reuses existing tokens (--gray-N00,
 *  --green, --red, --font-mono, --font-display) so dark/light themes follow
 *  automatically.
 * ========================================================================= */

/* ── Admin tray (visible only to admins; populated from /admin/lobie-clients) ─ */
.admin-tray {
    background: var(--gray-900);
    border: 1px solid var(--gray-700);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.admin-tray-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.admin-tray-row label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    margin-right: 4px;
}
.admin-tray-row select {
    flex: 1 1 240px;
    padding: 8px 10px;
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 8px;
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 12px;
    outline: none;
}
.admin-tray-row select:focus {
    border-color: var(--gray-500);
}
.admin-tray-row select:disabled {
    opacity: 0.6;
}
.admin-tray-row button {
    padding: 8px 14px;
    background: var(--white);
    border: 1px solid var(--white);
    color: var(--black);
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
}
.admin-tray-row button:hover { opacity: 0.85; }
.admin-tray-row button.muted {
    background: transparent;
    color: var(--gray-400);
    border-color: var(--gray-700);
}
.admin-tray-hint {
    margin-top: 6px;
    font-size: 10px;
    color: var(--gray-500);
    font-family: var(--font-mono);
    letter-spacing: 0.4px;
    transition: color 120ms ease;
}
.admin-tray-hint.error   { color: #ef4444; font-weight: 600; }
.admin-tray-hint.success { color: #16a34a; font-weight: 600; }

/* Phase 5.6 — admin-only inline banner editor on each property card.
   Pencil button overlays the banner top-left; clicking it toggles
   .banner-editing on the card, which hides banner/map-pin/pencil
   and shows the inline form occupying the same space. */
.property-banner-edit-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 13px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    z-index: 4;
    backdrop-filter: blur(6px);
    transition: background 120ms ease, transform 120ms ease;
}
.property-banner-edit-btn:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.06);
}
.property-banner-edit-form {
    display: none;
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 10px 12px;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(10px);
    border-radius: 12px 12px 0 0;
    z-index: 5;
    flex-direction: column;
    gap: 8px;
    min-height: 96px;
}
.property-card.banner-editing .property-banner,
.property-card.banner-editing .property-map-pin,
.property-card.banner-editing .property-banner-edit-btn { display: none; }
.property-card.banner-editing .property-banner-edit-form { display: flex; }

.property-banner-edit-form input[type="url"] {
    width: 100%;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 11px;
    outline: none;
    box-sizing: border-box;
}
.property-banner-edit-form input[type="url"]:focus {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
}
.property-banner-edit-source {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}
.property-banner-edit-source.override { color: #fbbf24; }
.property-banner-edit-source.lobie_pms { color: #34d399; }
.property-banner-edit-source.none      { color: rgba(255, 255, 255, 0.45); }
.property-banner-edit-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.property-banner-edit-actions button {
    padding: 5px 10px;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 120ms ease;
    border: 1px solid transparent;
}
.property-banner-edit-actions button.save {
    background: #fff;
    color: #000;
    border-color: #fff;
}
.property-banner-edit-actions button.save:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.property-banner-edit-actions button.remove {
    background: transparent;
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.5);
}
.property-banner-edit-actions button.remove.hidden { display: none; }
.property-banner-edit-actions button.cancel {
    margin-left: auto;
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    border-color: rgba(255, 255, 255, 0.2);
    width: 28px;
    height: 24px;
    padding: 0;
    font-size: 14px;
    line-height: 22px;
}
.property-banner-edit-hint {
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    min-height: 12px;
}
.property-banner-edit-hint.error   { color: #fca5a5; font-weight: 600; }
.property-banner-edit-hint.success { color: #86efac; font-weight: 600; }

/* The form has the same dark-glass treatment in light mode — it's
   anchored over the banner area which itself can be a photo or a
   colored gradient. Forcing white-on-light would hurt contrast. */

/* ── Pill above the tabs: "Patrimônio na rede: R$ 487.230" ─────────────── */
.ownership-pill {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.06) 0%, rgba(34, 197, 94, 0.02) 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    font-family: var(--font-mono);
    flex-wrap: wrap;
}
.ownership-pill-label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}
.ownership-pill-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
    flex: 1;
}
.ownership-pill-hint {
    font-size: 11px;
    color: var(--gray-500);
}

/* ── Section headers inside Imóveis / Cotas tabs ───────────────────────── */
.ownership-section-header {
    margin-bottom: 16px;
}
.ownership-section-header h3 {
    font-size: 14px;
    color: var(--gray-300);
    font-weight: 700;
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
}
.ownership-section-hint {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.5;
    margin: 0 0 12px 0;
}
.ownership-loading {
    text-align: center;
    color: var(--gray-600);
    font-size: 13px;
    font-family: var(--font-mono);
    padding: 24px 0;
}

/* ── Property cards (Imóveis) ──────────────────────────────────────────── */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}
.property-card {
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    border-radius: 16px;
    padding: 0 0 16px;          /* banner is full-bleed on top */
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 1px 2px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}
.property-card > .property-card-header,
.property-card > .property-attestation,
.property-card > .property-metrics,
.property-card > .property-credit,
.property-card > .property-sparkline,
.property-card > .property-card-actions {
    margin-left: 18px;
    margin-right: 18px;
}
.property-card > .property-card-header { margin-top: 14px; }

/* Banner — image when available, stylized gradient otherwise. */
.property-banner {
    height: 96px;
    background-size: cover;
    background-position: center;
    background-color: var(--gray-800);
    border-bottom: 1px solid var(--gray-800);
    position: relative;
}
.property-banner.stylized {
    display: flex;
    align-items: center;
    justify-content: center;
}
.property-banner-initials {
    font-family: var(--font-display);
    font-weight: 800;
    color: rgba(255, 255, 255, 0.92);
    font-size: 28px;
    letter-spacing: 1px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}
html[data-theme="light"] .property-banner {
    border-bottom-color: #ececec;
    background-color: #ececec;
}
html[data-theme="light"] .property-banner-initials {
    color: rgba(255, 255, 255, 0.95);
}

/* Map pin overlay — top-right of banner, links to Google Maps. */
.property-map-pin {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: rgba(255, 255, 255, 0.92);
    border-radius: 100%;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2;
}
.property-map-pin:hover {
    transform: scale(1.08);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
}
.property-card::before {
    /* Top accent line — subtle structural border that adds craft. */
    content: "";
    position: absolute;
    top: 0; left: 16px; right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}
.property-card:hover {
    border-color: var(--gray-700);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 4px 14px rgba(0, 0, 0, 0.45);
    transform: translateY(-1px);
}
/* Tokenized — green accent strip on left edge */
.property-card.tokenized {
    border-left: 3px solid var(--green);
}
/* Virtual cards (operational, not yet tokenized) — warm amber accent strip. */
.property-card.virtual {
    border-left: 3px solid rgba(217, 119, 6, 0.55);
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.03) 0%, var(--gray-900) 80%);
}
.property-card.virtual:hover {
    border-color: var(--gray-700);
    border-left-color: rgba(217, 119, 6, 0.75);
}

/* Light theme overrides — paper-like cards with crisp borders */
html[data-theme="light"] .property-card {
    background: #ffffff;
    border-color: #e5e5e5;
    box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 1px 3px rgba(0, 0, 0, 0.04);
}
html[data-theme="light"] .property-card::before {
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.04), transparent);
}
html[data-theme="light"] .property-card:hover {
    border-color: #d4d4d4;
    box-shadow: 0 2px 0 rgba(0,0,0,0.02), 0 6px 18px rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .property-card.tokenized { border-left-color: #16a34a; }
html[data-theme="light"] .property-card.virtual {
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.04) 0%, #ffffff 80%);
    border-left-color: #d97706;
}
.property-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}
.property-card-header strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.2px;
    line-height: 1.3;
}
.property-card-header small {
    font-size: 11px;
    color: var(--gray-500);
    font-family: var(--font-mono);
}
.property-token-badge {
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--gray-400);
    background: var(--gray-800);
    padding: 3px 8px;
    border-radius: 100px;
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 0.4px;
}
.property-token-badge.participation {
    background: rgba(217, 119, 6, 0.12);
    border: 1px solid rgba(217, 119, 6, 0.3);
    color: #fbbf24;
}
.property-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.property-metric {
    padding: 10px 12px;
    background: var(--black);
    border-radius: 10px;
    border: 1px solid var(--gray-800);
}
html[data-theme="light"] .property-metric {
    background: #fafafa;
    border-color: #ececec;
}
.property-metric-label {
    font-size: 9px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}
.property-metric-value {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    margin-top: 2px;
}
.property-metric-value.muted {
    color: var(--gray-400);
}
.property-attestation {
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--gray-500);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.property-attestation .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gray-600);
}
.property-attestation.attested .dot {
    background: var(--green);
}
.property-attestation.attested {
    color: var(--green);
}
.property-attestation.virtual {
    color: #fbbf24;
}
.property-attestation.virtual .dot {
    background: #fbbf24;
    animation: pulse-warm 2.5s ease-in-out infinite;
}
@keyframes pulse-warm {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}
.property-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.property-card-actions a,
.property-card-actions button {
    flex: 1;
    min-width: 80px;
    padding: 8px 10px;
    border: 1px solid var(--gray-800);
    border-radius: 8px;
    background: transparent;
    color: var(--gray-300);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.property-card-actions a:hover,
.property-card-actions button:hover:not(:disabled) {
    border-color: var(--gray-600);
    color: var(--white);
}
.property-card-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* Primary action — the "Tokenizar minha unidade" CTA on virtual cards. */
.property-action-primary {
    flex: 1 0 100% !important;
    background: rgba(217, 119, 6, 0.15) !important;
    border-color: rgba(217, 119, 6, 0.4) !important;
    color: #fbbf24 !important;
    font-weight: 700 !important;
    padding: 10px 12px !important;
    font-size: 12px !important;
    letter-spacing: 0.3px;
}
.property-action-primary:hover:not(:disabled) {
    background: rgba(217, 119, 6, 0.25) !important;
    border-color: rgba(217, 119, 6, 0.6) !important;
}
.property-action-hint {
    flex: 1 0 100%;
    text-align: center;
    font-size: 10px;
    color: var(--gray-500);
    font-family: var(--font-mono);
    margin-top: 2px;
    letter-spacing: 0.3px;
    transition: color 120ms ease;
}
.property-action-hint.error {
    color: #ef4444;
    font-weight: 600;
}
.property-action-hint.success {
    color: #16a34a;
    font-weight: 600;
}

/* Credit availability — emphasis row between metrics and sparkline. */
.property-credit {
    margin: 8px 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.10) 0%, rgba(34, 197, 94, 0.04) 100%);
    border: 1px solid rgba(34, 197, 94, 0.25);
}
.property-credit-label {
    font-size: 9px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    margin-bottom: 2px;
}
.property-credit-amount {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--green);
    letter-spacing: -0.3px;
}
.property-credit-hint {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gray-500);
    margin-top: 2px;
    letter-spacing: 0.3px;
}
html[data-theme="light"] .property-credit {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.08) 0%, rgba(22, 163, 74, 0.02) 100%);
    border-color: rgba(22, 163, 74, 0.20);
}
html[data-theme="light"] .property-credit-amount {
    color: #16a34a;
}

/* Sparkline — 12 monthly bars under the card metrics. */
.property-sparkline {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 28px;
    margin-bottom: 12px;
    padding: 0 2px;
}
.property-sparkline-bar {
    flex: 1;
    background: var(--green);
    opacity: 0.4;
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    transition: opacity 0.15s;
}
.property-sparkline-bar.recent {
    opacity: 0.9;
}

/* ── BTR rows (Cotas) ──────────────────────────────────────────────────── */
.btr-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.btr-row {
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    border-radius: 14px;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 1.4fr 1fr auto;
    gap: 12px;
    align-items: center;
    transition: border-color 0.18s ease;
}
.btr-row:hover {
    border-color: var(--gray-700);
}
.btr-info strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.3px;
    margin-bottom: 3px;
}
.btr-info .muted {
    font-size: 11px;
    color: var(--gray-500);
    font-family: var(--font-mono);
}
.btr-pending {
    text-align: right;
}
.btr-pending-label {
    font-size: 10px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}
.btr-pending-value {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    margin-top: 2px;
}
.btr-pending-value.has-pending {
    color: var(--green);
}
.btr-row-link {
    color: var(--gray-500);
    font-family: var(--font-mono);
    font-size: 18px;
    text-decoration: none;
    padding: 0 6px;
    transition: color 0.15s;
}
.btr-row-link:hover {
    color: var(--white);
}

/* "Reivindicar todas" CTA */
.ownership-claim-btn {
    margin-top: 8px;
    margin-bottom: 16px;
    padding: 12px 16px;
    font-size: 14px;
    width: auto;
    background: var(--green);
    color: var(--black);
    border-radius: 10px;
    font-weight: 700;
}
.ownership-claim-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    opacity: 0.95;
}
#claimAllBtnAmount {
    font-family: var(--font-mono);
    margin-left: 6px;
    opacity: 0.85;
}
.ownership-claim-status {
    margin-top: 12px;
    font-size: 12px;
    color: var(--gray-500);
    font-family: var(--font-mono);
    min-height: 18px;
}
.ownership-claim-status.success { color: var(--green); }
.ownership-claim-status.error   { color: var(--red); }

/* ── Tablet/mobile adjustments ─────────────────────────────────────────── */
@media (max-width: 540px) {
    .property-grid { grid-template-columns: 1fr; }
    .btr-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .btr-pending { text-align: left; }
    .btr-row-link { display: none; }
    .ownership-pill-value { font-size: 16px; }
}

/* ────────── Phase 6B v1: Antecipação tab ────────── */

.receivables-summary {
    margin-bottom: 16px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(34, 197, 94, 0.04) 100%);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 14px;
}
.receivables-summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.receivables-summary-tile {
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    border-radius: 10px;
    padding: 12px 14px;
}
.receivables-summary-tile.highlight {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.04));
    border-color: rgba(34, 197, 94, 0.4);
}
.receivables-summary-label {
    font-size: 10px;
    color: var(--gray-500);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
}
.receivables-summary-value {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
}
.receivables-summary-tile.highlight .receivables-summary-value {
    color: #22c55e;
}
.receivables-summary-foot {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gray-500);
}
.receivables-summary-disclaimer {
    margin-top: 12px;
    font-size: 11px;
    color: var(--gray-500);
    font-family: var(--font-mono);
    letter-spacing: 0.3px;
}

.receivables-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.receivable-card {
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    border-left: 3px solid #7c3aed;
    border-radius: 12px;
    padding: 14px 16px;
}
.receivable-card.atrasado {
    border-left-color: #f97316;
}
.receivable-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}
.receivable-header strong {
    display: block;
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--white);
}
.receivable-header small {
    display: block;
    margin-top: 2px;
    color: var(--gray-500);
    font-family: var(--font-mono);
    font-size: 11px;
}
.receivable-badge {
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: #c4b5fd;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.receivable-dates {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 14px;
    margin-bottom: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--gray-300);
}
.receivable-dates .muted {
    color: var(--gray-500);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-right: 4px;
}
.receivable-arrow {
    color: var(--gray-600);
}
.receivable-payout {
    margin-left: auto;
    color: #fbbf24;
    font-weight: 600;
}
.receivable-card.atrasado .receivable-payout {
    color: #fb923c;
}
.receivable-amounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}
.receivable-amount {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 8px 10px;
}
.receivable-amount.highlight {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.4);
}
.receivable-amount-label {
    font-size: 9px;
    color: var(--gray-500);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}
.receivable-amount-value {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
}
.receivable-amount-value.muted { color: var(--gray-400); font-weight: 500; }
.receivable-amount.highlight .receivable-amount-value {
    color: #22c55e;
}
.receivable-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Light theme — variables are inverted in light mode (--white = #0a0a0a as
   contrast-text token), so we use literal hex for surface backgrounds to
   match how .property-card light-theme overrides work in this file. */
html[data-theme="light"] .receivables-summary {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.06), rgba(34, 197, 94, 0.03));
    border-color: rgba(124, 58, 237, 0.18);
}
html[data-theme="light"] .receivables-summary-tile {
    background: #ffffff;
    border-color: #e5e5e5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
html[data-theme="light"] .receivables-summary-tile.highlight {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.07), rgba(34, 197, 94, 0.02));
    border-color: rgba(34, 197, 94, 0.3);
}
html[data-theme="light"] .receivables-summary-value { color: #0a0a0a; }
html[data-theme="light"] .receivables-summary-tile.highlight .receivables-summary-value { color: #16a34a; }
html[data-theme="light"] .receivables-summary-label,
html[data-theme="light"] .receivables-summary-foot,
html[data-theme="light"] .receivables-summary-disclaimer { color: #6b7280; }

html[data-theme="light"] .receivable-card {
    background: #ffffff;
    border-color: #e5e5e5;
    border-left-color: #7c3aed;
    box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 1px 3px rgba(0, 0, 0, 0.04);
}
html[data-theme="light"] .receivable-card.atrasado {
    border-left-color: #f97316;
}
html[data-theme="light"] .receivable-header strong { color: #0a0a0a; }
html[data-theme="light"] .receivable-header small { color: #6b7280; }

html[data-theme="light"] .receivable-dates { color: #374151; }
html[data-theme="light"] .receivable-dates .muted { color: #9ca3af; }
html[data-theme="light"] .receivable-arrow { color: #d1d5db; }
html[data-theme="light"] .receivable-payout { color: #d97706; }
html[data-theme="light"] .receivable-card.atrasado .receivable-payout { color: #ea580c; }

html[data-theme="light"] .receivable-amount {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
}
html[data-theme="light"] .receivable-amount.highlight {
    background: rgba(34, 197, 94, 0.06);
    border-color: rgba(34, 197, 94, 0.3);
}
html[data-theme="light"] .receivable-amount-label { color: #6b7280; }
html[data-theme="light"] .receivable-amount-value { color: #0a0a0a; }
html[data-theme="light"] .receivable-amount-value.muted { color: #6b7280; font-weight: 500; }
html[data-theme="light"] .receivable-amount.highlight .receivable-amount-value { color: #16a34a; }

html[data-theme="light"] .receivable-badge {
    color: #6d28d9;
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.25);
}

/* ────── Antecipation requests banner (status of pending/approved reqs) ── */
.antecipations-banner {
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 11px;
}
.antecipations-banner-pill {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--white);
    font-weight: 600;
}
.antecipations-banner-pill.pending  { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.4); color: #fbbf24; }
.antecipations-banner-pill.approved { background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.4); color: #93c5fd; }
.antecipations-banner-pill.disbursed { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.4); color: #6ee7b7; }
.antecipations-banner-pill.failed   { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }

html[data-theme="light"] .antecipations-banner {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.2);
}
html[data-theme="light"] .antecipations-banner-pill { background: #ffffff; border-color: #e5e7eb; color: #374151; }
html[data-theme="light"] .antecipations-banner-pill.pending  { color: #b45309; background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.3); }
html[data-theme="light"] .antecipations-banner-pill.approved { color: #1d4ed8; background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.3); }
html[data-theme="light"] .antecipations-banner-pill.disbursed { color: #047857; background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.3); }

/* ────── Antecipate modal ────── */
.antecipate-modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.antecipate-modal {
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    border-radius: 14px;
    padding: 22px;
    max-width: 480px;
    width: 100%;
    color: var(--white);
}
.antecipate-modal h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 12px;
}
.antecipate-details {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
}
.antecipate-details .row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.antecipate-details .row.highlight {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
}
.antecipate-details .row .label { color: var(--gray-500); }
.antecipate-details .row .value { color: var(--white); }
.antecipate-details .row.highlight .value { color: #22c55e; font-size: 14px; }
.antecipate-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.antecipate-form label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.antecipate-form select,
.antecipate-form input {
    padding: 9px 11px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 13px;
    outline: none;
}
.antecipate-form select:focus,
.antecipate-form input:focus { border-color: rgba(255, 255, 255, 0.4); }
.antecipate-hint {
    min-height: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gray-500);
}
.antecipate-hint.error   { color: #fca5a5; }
.antecipate-hint.success { color: #6ee7b7; }
.antecipate-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 10px;
}
.antecipate-actions button {
    padding: 9px 16px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 120ms ease;
}
.antecipate-actions button.muted {
    background: transparent;
    color: var(--gray-300);
    border-color: rgba(255, 255, 255, 0.18);
}
.antecipate-actions button.primary {
    background: #16a34a;
    color: #fff;
}
.antecipate-actions button.primary:disabled { opacity: 0.5; cursor: not-allowed; }
.antecipate-disclaimer {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gray-500);
    line-height: 1.5;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
}

html[data-theme="light"] .antecipate-modal {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #0a0a0a;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}
html[data-theme="light"] .antecipate-details {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
}
html[data-theme="light"] .antecipate-details .row .value { color: #0a0a0a; }
html[data-theme="light"] .antecipate-details .row.highlight { border-top-color: #e5e7eb; }
html[data-theme="light"] .antecipate-form select,
html[data-theme="light"] .antecipate-form input {
    background: #ffffff;
    border-color: #d1d5db;
    color: #0a0a0a;
}
html[data-theme="light"] .antecipate-form label,
html[data-theme="light"] .antecipate-hint,
html[data-theme="light"] .antecipate-disclaimer { color: #6b7280; }
html[data-theme="light"] .antecipate-actions button.muted {
    color: #374151;
    border-color: #d1d5db;
}
html[data-theme="light"] .antecipate-disclaimer { border-top-color: #e5e7eb; }

