.tl-finance-module,
.tl-finance-standalone {
    background: #ffffff;
    border: 1px solid #dce2e5;
    border-radius: 8px;
    box-sizing: border-box;
    color: #353535;
    margin: 0 0 22px;
    padding: 22px;
    width: 100%;
}

.tl-finance-module *,
.tl-finance-standalone * { box-sizing: border-box; letter-spacing: 0; }
.tl-finance-module button,
.tl-finance-module input,
.tl-finance-module select,
.tl-finance-module textarea,
.tl-finance-standalone button,
.tl-finance-standalone input,
.tl-finance-standalone select,
.tl-finance-standalone textarea { font: inherit; }
.tl-finance-module button,
.tl-finance-standalone button { cursor: pointer; }
.tl-finance-module button:disabled,
.tl-finance-standalone button:disabled { cursor: wait; opacity: .62; }
.tl-finance-module :focus-visible,
.tl-finance-standalone :focus-visible { outline: 3px solid #66a7aa; outline-offset: 2px; }

.tl-finance-header,
.tl-finance-panel-heading { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; }
.tl-finance-header { border-bottom: 1px solid #dce2e5; margin-bottom: 18px; padding-bottom: 18px; }
.tl-finance-header h2,
.tl-finance-panel h3 { color: #284b63; margin: 0 0 4px; }
.tl-finance-header h2 { font-size: 22px; line-height: 1.2; }
.tl-finance-panel h3 { font-size: 16px; line-height: 1.3; }
.tl-finance-eyebrow { color: #3c6e71; font-size: 11px; font-weight: 800; letter-spacing: .08em; margin: 0 0 5px; text-transform: uppercase; }
.tl-finance-muted { color: #66727a; font-size: 13px; margin: 0; }
.tl-finance-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.tl-finance-button,
.tl-finance-icon { align-items: center; border: 1px solid transparent; border-radius: 6px; display: inline-flex; gap: 7px; justify-content: center; min-height: 38px; padding: 0 12px; }
.tl-finance-button-primary { background: #3c6e71; border-color: #3c6e71; color: #ffffff; }
.tl-finance-button-primary:hover { background: #315f62; }
.tl-finance-button-secondary,
.tl-finance-icon { background: #ffffff; border-color: #dce2e5; color: #284b63; }
.tl-finance-button-secondary:hover,
.tl-finance-icon:hover { border-color: #3c6e71; color: #3c6e71; }
.tl-finance-icon { height: 38px; padding: 0; width: 38px; }
.tl-finance-banner { align-items: flex-start; border: 1px solid; border-radius: 6px; display: flex; gap: 9px; margin-bottom: 18px; padding: 11px 13px; }
.tl-finance-banner-warning { background: #fff7e8; border-color: #eed5a8; color: #714d14; }
.tl-finance-stats { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.tl-finance-stat { background: #f5f7f8; border: 1px solid #dce2e5; border-radius: 6px; min-height: 105px; padding: 15px; }
.tl-finance-stat span,
.tl-finance-stat small { color: #66727a; display: block; font-size: 12px; }
.tl-finance-stat strong { color: #284b63; display: block; font-size: 22px; margin: 8px 0 3px; text-transform: capitalize; }
.tl-finance-columns { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; }
.tl-finance-panel { border-top: 1px solid #dce2e5; min-width: 0; padding: 17px 0 0; }
.tl-finance-module > .tl-finance-panel { border-top: 0; padding-top: 0; }
.tl-finance-panel-heading { margin-bottom: 13px; }
.tl-finance-status { background: #eef1f2; border-radius: 999px; color: #66727a; display: inline-block; font-size: 11px; font-weight: 700; padding: 4px 8px; text-transform: capitalize; white-space: nowrap; }
.tl-finance-status.is-good { background: #e7f3ed; color: #247a54; }
.tl-finance-status.is-warning { background: #fff1d7; color: #8a5c0f; }
.tl-finance-definitions { display: grid; gap: 0; margin: 0; }
.tl-finance-definitions > div { align-items: baseline; border-bottom: 1px solid #eef1f2; display: flex; gap: 12px; justify-content: space-between; padding: 8px 0; }
.tl-finance-definitions > div:last-child { border-bottom: 0; }
.tl-finance-definitions dt { color: #66727a; font-size: 13px; }
.tl-finance-definitions dd { color: #284b63; font-size: 13px; font-weight: 700; margin: 0; text-align: right; }
.tl-finance-list { border-top: 1px solid #eef1f2; }
.tl-finance-row,
.tl-finance-compact-row { align-items: center; border: 0; border-bottom: 1px solid #eef1f2; display: flex; gap: 10px; min-height: 58px; padding: 9px 0; width: 100%; }
.tl-finance-row { background: #ffffff; color: #353535; text-align: left; }
.tl-finance-row:hover { background: #f5f7f8; }
.tl-finance-row-icon { align-items: center; background: #eaf2f2; border-radius: 6px; color: #3c6e71; display: inline-flex; height: 32px; justify-content: center; width: 32px; }
.tl-finance-row-main,
.tl-finance-compact-row > span:first-child { display: grid; gap: 3px; min-width: 0; }
.tl-finance-row-main strong,
.tl-finance-compact-row strong { color: #284b63; font-size: 13px; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; white-space: nowrap; }
.tl-finance-row-main small,
.tl-finance-compact-row small { color: #66727a; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-finance-row-amount { color: #247a54; font-size: 13px; font-weight: 700; margin-left: auto; white-space: nowrap; }
.tl-finance-row-amount.is-negative { color: #b23737; }
.tl-finance-compact-row { justify-content: space-between; }
.tl-finance-empty,
.tl-finance-loading { align-items: center; color: #66727a; display: flex; gap: 9px; justify-content: center; min-height: 74px; text-align: center; }
.tl-finance-empty.is-error { color: #b23737; flex-wrap: wrap; }
.tl-finance-receipt { background: #f5f7f8; border: 1px solid #dce2e5; border-radius: 6px; display: grid; gap: 5px; margin-top: 15px; padding: 12px; }
.tl-finance-receipt span { color: #66727a; font-size: 13px; }
.tl-finance-dialog { border: 0; border-radius: 8px; box-shadow: 0 12px 38px rgba(40,75,99,.22); max-width: 520px; padding: 0; width: calc(100% - 32px); }
.tl-finance-dialog::backdrop { background: rgba(40,75,99,.38); }
.tl-finance-dialog-form { margin: 0; }
.tl-finance-dialog-header { align-items: center; border-bottom: 1px solid #dce2e5; display: flex; justify-content: space-between; padding: 16px 18px; }
.tl-finance-dialog-header h3 { color: #284b63; font-size: 18px; margin: 0; }
.tl-finance-dialog-body { padding: 18px; }
.tl-finance-dialog-actions { border-top: 1px solid #dce2e5; display: flex; gap: 8px; justify-content: flex-end; padding: 13px 18px; }
.tl-finance-field { display: grid; gap: 6px; margin-bottom: 13px; }
.tl-finance-field > span { color: #284b63; font-size: 13px; font-weight: 700; }
.tl-finance-field small { color: #66727a; font-weight: 400; }
.tl-finance-field input,
.tl-finance-field select,
.tl-finance-field textarea { background: #ffffff; border: 1px solid #bcc8cc; border-radius: 6px; color: #353535; min-height: 40px; padding: 8px 10px; width: 100%; }
.tl-finance-field textarea { min-height: 76px; resize: vertical; }
.tl-finance-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #284b63 50%), linear-gradient(135deg, #284b63 50%, transparent 50%); background-position: calc(100% - 15px) calc(50% - 2px), calc(100% - 10px) calc(50% - 2px); background-repeat: no-repeat; background-size: 5px 5px, 5px 5px; padding-right: 34px; }
.tl-finance-form-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tl-finance-dialog-note { color: #66727a; font-size: 13px; margin: 8px 0 0; }

@media (max-width: 700px) {
    .tl-finance-module,
    .tl-finance-standalone { border-left: 0; border-radius: 0; border-right: 0; padding: 16px; }
    .tl-finance-header,
    .tl-finance-panel-heading { display: grid; }
    .tl-finance-actions { justify-content: flex-start; }
    .tl-finance-stats,
    .tl-finance-columns,
    .tl-finance-form-grid { grid-template-columns: 1fr; }
    .tl-finance-row { flex-wrap: wrap; }
    .tl-finance-row-main { flex: 1 1 calc(100% - 44px); }
    .tl-finance-row-amount { margin-left: 42px; }
    .tl-finance-row > .tl-finance-status { margin-left: 42px; }
    .tl-finance-compact-row { align-items: flex-start; gap: 8px; }
}
