.cftb-wrap {
    max-width: 1380px;
}
.cftb-hero {
    background: linear-gradient(135deg, #f4f0ec, #ffffff);
    border: 1px solid #d7d1ca;
    border-left: 7px solid #478a5a;
    border-radius: 16px;
    padding: 24px 28px;
    margin: 18px 0 22px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    box-shadow: 0 8px 26px rgba(28, 54, 38, .08);
}
.cftb-hero h1 {
    margin: 0 0 6px;
    color: #1c3527;
    font-size: 30px;
    font-weight: 800;
}
.cftb-hero p {
    margin: 0;
    color: #44514a;
    font-size: 15px;
}
.cftb-hero-badge {
    background: #478a5a;
    color: #fff;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 800;
    white-space: nowrap;
}
.cftb-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.cftb-card {
    display: block;
    text-decoration: none;
    background: #fff;
    border: 1px solid #d7d1ca;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,.05);
    color: #1d2327;
}
.cftb-card:hover {
    border-color: #478a5a;
    transform: translateY(-1px);
}
.cftb-card span {
    display: block;
    text-transform: uppercase;
    color: #5e6b62;
    font-size: 12px;
    letter-spacing: .05em;
    font-weight: 800;
}
.cftb-card strong {
    display: block;
    color: #478a5a;
    font-size: 29px;
    line-height: 1.25;
    margin: 6px 0;
}
.cftb-card em {
    color: #48534d;
    font-style: normal;
}
.cftb-grid {
    display: grid;
    grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.cftb-panel {
    background: #fff;
    border: 1px solid #dcd7d0;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,.04);
}
.cftb-panel h2 {
    margin-top: 0;
    color: #203629;
}
.cftb-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
}
.cftb-panel-head h2 {
    margin: 0;
}
.cftb-form label,
.cftb-filter label,
.cftb-status-form label {
    display: block;
    font-weight: 700;
    color: #22352a;
    margin-bottom: 12px;
}
.cftb-form input,
.cftb-form select,
.cftb-form textarea,
.cftb-filter select,
.cftb-status-form select {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 5px;
    border-radius: 8px;
    border-color: #cfc8c0;
}
.cftb-form textarea {
    resize: vertical;
}
.cftb-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.cftb-filter,
.cftb-report-filter .cftb-row {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;
}
.cftb-filter select,
.cftb-report-filter label {
    min-width: 180px;
}
.cftb-table th {
    background: #f4f0ec;
    color: #1c3527;
    font-weight: 800;
}
.cftb-table td,
.cftb-table th {
    vertical-align: top;
}
.cftb-pill {
    display: inline-block;
    background: #eef6f0;
    color: #2d6841;
    border: 1px solid #cfe4d4;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 800;
}
.cftb-danger-link {
    color: #a50000 !important;
    border-color: #d6b4b4 !important;
}
.cftb-totals {
    background: #f4f0ec;
    border-radius: 10px;
    padding: 9px 12px;
    color: #22352a;
}
.cftb-create-invoice {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}
.cftb-invoice-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.cftb-invoice-meta div,
.cftb-billto {
    background: #f9f7f4;
    border: 1px solid #e4dfd8;
    border-radius: 10px;
    padding: 12px;
}
.cftb-billto {
    margin-bottom: 16px;
}
.cftb-status-form {
    display: flex;
    gap: 10px;
    align-items: end;
    margin-top: 16px;
}
.cftb-status-form label {
    min-width: 220px;
    margin: 0;
}
@media (max-width: 1100px) {
    .cftb-cards,
    .cftb-grid,
    .cftb-invoice-meta {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 760px) {
    .cftb-cards,
    .cftb-grid,
    .cftb-row,
    .cftb-invoice-meta {
        grid-template-columns: 1fr;
    }
    .cftb-hero,
    .cftb-panel-head,
    .cftb-status-form {
        display: block;
    }
    .cftb-hero-badge {
        display: inline-block;
        margin-top: 12px;
    }
}
.cftb-table {
    width: 100%;
    border-collapse: collapse;
}
.cftb-table td,
.cftb-table th {
    padding: 9px 10px;
    border-bottom: 1px solid #ece7e0;
}
.cftb-portal .button,
.cftb-wrap .button {
    display: inline-block;
    border: 1px solid #c9c2ba;
    border-radius: 7px;
    padding: 7px 12px;
    text-decoration: none;
    background: #fff;
    color: #1c3527;
    cursor: pointer;
}
.cftb-portal .button-primary,
.cftb-wrap .button-primary {
    background: #478a5a;
    color: #fff;
    border-color: #478a5a;
}
.cftb-portal h2,
.cftb-portal h3 {
    color: #203629;
}
