/* Lightweight styles; theme/Flatsome controls the main typography and colors. */
.refernix-dashboard {
    margin: 0 0 30px;
}

.refernix-dashboard h2,
.refernix-dashboard h3 {
    margin-top: 0;
}

.refernix-header {
    margin-bottom: 20px;
}

.refernix-header p {
    margin: 5px 0 0;
    opacity: .75;
}

.refernix-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.refernix-card,
.refernix-share-box,
.refernix-products,
.refernix-history {
    border: 1px solid rgba(0,0,0,.10);
    padding: 18px;
    border-radius: 8px;
    background: #fff;
}

.refernix-card {
    border-left: 5px solid rgba(0,0,0,.16);
    min-height: 82px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.refernix-card-referrals {
    background: #eef4ff;
    border-left-color: #4a6cf7;
}

.refernix-card-pending {
    background: #fff5df;
    border-left-color: #e0a21a;
}

.refernix-card-complete {
    background: #e9f7ef;
    border-left-color: #2e9b5b;
}

.refernix-card strong {
    display: block;
    margin-top: 7px;
    font-size: 1.55em;
    line-height: 1.15;
}

.refernix-label {
    display: block;
    font-size: .88em;
    font-weight: 600;
    opacity: .82;
}

.refernix-share-box,
.refernix-products,
.refernix-history {
    margin-bottom: 20px;
}

.refernix-code-row,
.refernix-link-box {
    display: flex;
    gap: 8px;
    align-items: center;
}

.refernix-code-row input,
.refernix-link-box input {
    flex: 1;
    min-width: 0;
}

.refernix-product-row {
    display: grid;
    grid-template-columns: minmax(180px, .8fr) minmax(300px, 1.2fr);
    gap: 15px;
    padding: 15px 0;
    border-top: 1px solid rgba(0,0,0,.08);
}

.refernix-product-row:first-child {
    border-top: 0;
}

.refernix-product-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.refernix-product-info img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin: 0;
}

.refernix-price {
    margin-top: 4px;
}

.refernix-table-wrap {
    overflow-x: auto;
}

.refernix-dashboard table {
    width: 100%;
}

@media (max-width: 700px) {
    .refernix-stats {
        grid-template-columns: 1fr;
    }

    .refernix-product-row {
        grid-template-columns: 1fr;
    }

    .refernix-code-row,
    .refernix-link-box {
        flex-direction: column;
        align-items: stretch;
    }
}

.refernix-status {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 3px;
	font-size: .82em;
	font-weight: 600;
}
.refernix-status-pending { background: #fff3cd; color: #856404; }
.refernix-status-paid { background: #d1e7dd; color: #0f5132; }
.refernix-status-refunded,
.refernix-status-cancelled { background: #f8d7da; color: #842029; }
.refernix-admin-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:18px;max-width:1200px}.refernix-admin-card{padding:20px}.refernix-affiliate-form input{width:100%;max-width:480px}.refernix-admin-card select{max-width:100%;min-width:220px}.refernix-admin-card code{display:inline-block;padding:8px 12px;background:#f0f0f1}
.refernix-admin-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;max-width:1100px;margin-top:20px}.refernix-stat-card{border-top:4px solid #2271b1}.refernix-stat-orange{border-top-color:#dba617}.refernix-stat-green{border-top-color:#00a32a}.refernix-stat-red{border-top-color:#d63638}.refernix-stat-blue{border-top-color:#2271b1}.refernix-short-link-box{margin-top:8px}
@media(max-width:900px){.refernix-admin-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.refernix-admin-stats{grid-template-columns:1fr}}

/* Admin dashboard cards and desktop layout. */
.refernix-admin-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;max-width:1100px;margin-top:20px}
.refernix-stat-card{border:1px solid rgba(0,0,0,.08)!important;border-top-width:4px!important;border-radius:8px;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.refernix-stat-blue{background:#eef4ff!important;border-top-color:#4a6cf7!important}.refernix-stat-orange{background:#fff5df!important;border-top-color:#e0a21a!important}.refernix-stat-green{background:#e9f7ef!important;border-top-color:#2e9b5b!important}.refernix-stat-red{background:#fdecec!important;border-top-color:#d63638!important}
@media(max-width:900px){.refernix-admin-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.refernix-admin-stats{grid-template-columns:1fr}}

/* Checkout coupon box */
.refernix-checkout-coupon-box { margin: 15px 0 20px; padding: 15px 0; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; }
.refernix-coupon-heading { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.refernix-coupon-row { display: flex; gap: 8px; align-items: stretch; }
.refernix-coupon-row input { flex: 1; min-width: 0; margin: 0 !important; height: 42px !important; box-sizing: border-box; }
.refernix-coupon-row button { height: 42px; margin: 0 !important; white-space: nowrap; }
.refernix-checkout-coupon-box #refernix_coupon_message { margin-top: 8px; }
.refernix-checkout-coupon-box #refernix_coupon_message .woocommerce-message,
.refernix-checkout-coupon-box #refernix_coupon_message .woocommerce-error { margin: 0; padding: 8px 12px; }
@media (max-width: 480px) { .refernix-coupon-row { flex-direction: column; } .refernix-coupon-row button { width: 100%; } }

.refernix-checkout-coupon-box .refernix-coupon-success { margin-top: 8px; color: #d63638; font-weight: 600; }
