/* Billing tab (tabcontent4) — admin MoMo subscriptions */

.tabradio4 {
    display: none;
}

:root:has(.tabradio4:checked) .tabcontent4 {
    grid-area: bottom;
    display: block;
    min-height: 0;
    overflow-y: auto;
}

.tabradio4:checked + .tablable4 {
    width: 70px;
    height: 70px;
    color: #ffffff;
    border: 1px solid #274dfe;
    background-color: #274dfe;
    border-radius: 5px;
    margin: 5px;
    padding: 2px;
}

.tablable4 {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #274dfe;
    transition: all 0.2s ease;
    background-color: #ffffff;
    border-radius: 5px;
    margin: 5px;
    padding: 2px;
    cursor: pointer;
    height: 60px;
    width: 60px;
    font-size: 0.75rem;
    text-align: center;
}

body.logged-in.admin-billing .tablable4 {
    display: flex;
}

.tabcontent4 {
    display: none;
    padding: 16px;
    grid-column: 2;
    grid-row: 1/4;
    background-color: #f3f4f6;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
}

.tabcontent4 .billing-wrap {
    max-width: 960px;
    margin: 0 auto;
}

.tabcontent4 .box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tabcontent4 .billing-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.tabcontent4 .billing-subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 16px 0;
}

.tabcontent4 .pricing-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.tabcontent4 .price-chip {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
}

.tabcontent4 #billingDevicesTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tabcontent4 #billingDevicesTable th,
.tabcontent4 #billingDevicesTable td {
    padding: 10px 8px;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
}

.tabcontent4 .status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tabcontent4 .status-pill--active {
    background: #dcfce7;
    color: #166534;
}

.tabcontent4 .status-pill--inactive {
    background: #fee2e2;
    color: #991b1b;
}

.tabcontent4 .billing-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.tabcontent4 .input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tabcontent4 .input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

.tabcontent4 .billing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.tabcontent4 .billing-total {
    font-weight: 700;
    color: #1e293b;
}

.tabcontent4 .billing-msg {
    margin-top: 12px;
    font-size: 0.85rem;
}

.tabcontent4 .billing-msg--error {
    color: #dc2626;
}

.tabcontent4 .billing-msg--success {
    color: #16a34a;
}

.tabcontent4 .billing-msg--info {
    color: #2563eb;
}

.tabcontent4 #billingHistoryTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.tabcontent4 #billingHistoryTable th,
.tabcontent4 #billingHistoryTable td {
    padding: 8px;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
}
