.behive-billing-wrap {
    max-width: 1320px;
}

.behive-filterbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 16px 0;
}

.behive-filterbar input,
.behive-filterbar select,
.behive-panel input,
.behive-panel select,
.behive-panel textarea,
.behive-document-form input,
.behive-document-form select,
.behive-document-form textarea,
.behive-billing-calculator input,
.behive-billing-calculator select {
    width: 100%;
    max-width: 100%;
    border-radius: 6px;
}

.behive-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.behive-kpi {
    min-height: 96px;
    padding: 18px;
    border: 1px solid #dcdcde;
    border-left: 5px solid #F5A623;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.04);
}

.behive-kpi span {
    display: block;
    margin-bottom: 8px;
    color: #646970;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.behive-kpi strong {
    display: block;
    color: #1A1A1A;
    font-size: 24px;
    line-height: 1.15;
}

.behive-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}

.behive-panel {
    margin: 16px 0;
    padding: 18px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff;
}

.behive-panel h2 {
    margin: 0 0 14px;
    color: #1A1A1A;
}

.behive-panel label,
.behive-billing-calculator label {
    display: block;
    margin-bottom: 12px;
    color: #1d2327;
    font-weight: 700;
}

.behive-panel label strong {
    display: block;
    margin-bottom: 5px;
}

.behive-two,
.behive-calc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.behive-three,
.behive-four {
    display: grid;
    gap: 12px;
}

.behive-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.behive-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.behive-items-table textarea {
    width: 100%;
    min-width: 220px;
}

.behive-items-table input {
    min-width: 92px;
}

.behive-items-table th:first-child,
.behive-items-table td:first-child {
    width: 42px;
    text-align: center;
}

.behive-line-total {
    white-space: nowrap;
}

.behive-total-box {
    padding: 14px;
    border: 1px solid #ececec;
    border-radius: 8px;
    background: #fafafa;
}

.behive-total-box p {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    padding: 8px 0;
    border-bottom: 1px solid #ececec;
}

.behive-total-box p:last-child {
    border-bottom: 0;
}

.behive-total-box .grand {
    margin-top: 8px;
    padding: 12px;
    border: 0;
    border-radius: 6px;
    background: #1A1A1A;
    color: #fff;
    font-size: 16px;
}

.behive-total-box .grand strong {
    color: #F5A623;
}

.behive-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.behive-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f0f0f1;
    color: #1d2327;
    font-size: 12px;
    font-weight: 800;
}

.behive-status-sent,
.behive-status-accepted,
.behive-payment-paid {
    background: #ecfdf3;
    color: #0a6b37;
}

.behive-status-refused,
.behive-status-void,
.behive-status-overdue {
    background: #fff1f1;
    color: #b42318;
}

.behive-status-invoiced,
.behive-status-paid {
    background: #fff7df;
    color: #8a5b00;
}

.behive-payment-unpaid {
    background: #fff1f1;
    color: #b42318;
}

.behive-payment-partial {
    background: #fff7df;
    color: #8a5b00;
}

.behive-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    font-weight: 700;
}

.behive-inline-check input {
    width: auto;
}

.behive-billing-calculator {
    max-width: 920px;
    padding: 18px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff;
}

.behive-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.behive-services label {
    min-height: 52px;
    padding: 12px;
    border: 1px solid #ececec;
    border-radius: 8px;
    background: #fafafa;
}

.behive-services input {
    width: auto;
    margin-right: 6px;
}

.behive-services small {
    display: block;
    margin-top: 4px;
    color: #646970;
    font-weight: 600;
}

.behive-client-documents table {
    width: 100%;
    border-collapse: collapse;
}

.behive-client-documents th,
.behive-client-documents td {
    padding: 10px;
    border-bottom: 1px solid #ececec;
    text-align: left;
}

.behive-signature-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    background: #f5f5f5;
    font-family: Arial, sans-serif;
}

.behive-signature-card {
    width: min(560px, calc(100% - 32px));
    padding: 28px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

.behive-signature-card h1 {
    margin-top: 0;
}

.behive-signature-card input[type="text"] {
    width: 100%;
    min-height: 42px;
}

.behive-check {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.behive-signature-card button {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: #1A1A1A;
    color: #fff;
    font-weight: 800;
}

.behive-success {
    padding: 12px;
    border-left: 4px solid #46b450;
    background: #f0fff4;
}

@media (max-width: 820px) {
    .behive-form-grid,
    .behive-two,
    .behive-three,
    .behive-four,
    .behive-calc-grid {
        grid-template-columns: 1fr;
    }
}
