/* ==========================================================================
   KidsClub Stripe Connect — Styles
   ========================================================================== */

/* ── Base wrapper ─────────────────────────────────────────────────────────── */
.ksc-stripe-connect-wrapper,
.ksc-earnings-wrapper {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px 32px;
    margin: 24px 0;
    max-width: 680px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.ksc-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.ksc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .3px;
}

.ksc-badge--success {
    background: #dcfce7;
    color: #166534;
}

.ksc-badge--warning {
    background: #fef3c7;
    color: #92400e;
}

.ksc-badge__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.ksc-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .9rem;
    margin: 12px 0;
}

.ksc-alert--success {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    color: #15803d;
}

.ksc-alert--warning {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

/* ── Info table ──────────────────────────────────────────────────────────── */
.ksc-info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: .9rem;
}

.ksc-info-table th,
.ksc-info-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f3f4f6;
    text-align: left;
}

.ksc-info-table th {
    color: #6b7280;
    font-weight: 600;
    width: 160px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.ksc-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.ksc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity .2s, transform .15s;
}

.ksc-btn:hover { opacity: .88; transform: translateY(-1px); text-decoration: none; }

.ksc-btn--primary,
.ksc-btn--primary:link,
.ksc-btn--primary:visited { background: #635bff; color: #fff !important; }
.ksc-btn--secondary { background: #f3f4f6; color: #374151; }
.ksc-btn--danger    { background: #ef4444; color: #fff !important; }

/* Connect with Stripe button */
.ksc-connect-with-stripe {
    display: inline-block;
    margin: 16px 0 8px;
    transition: transform .15s;
}

.ksc-connect-with-stripe:hover { transform: translateY(-2px); }
.ksc-connect-with-stripe img   { height: 44px; }

/* ── Help text ───────────────────────────────────────────────────────────── */
.ksc-help-text {
    font-size: .82rem;
    color: #6b7280;
    margin-top: 8px;
}

/* ── Stats grid ──────────────────────────────────────────────────────────── */
.ksc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.ksc-stat-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ksc-stat-card--highlight { background: #eef2ff; border-color: #c7d2fe; }
.ksc-stat-card--muted     { background: #f3f4f6; }

.ksc-stat-label {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6b7280;
}

.ksc-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

/* ── Transaction table ───────────────────────────────────────────────────── */
.ksc-table-wrapper { overflow-x: auto; margin-top: 16px; }

.ksc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.ksc-table th,
.ksc-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.ksc-table th {
    background: #f9fafb;
    font-weight: 700;
    color: #374151;
}

.ksc-table tr:hover td { background: #fafafa; }

.ksc-net    { font-weight: 700; color: #166534; }
.ksc-muted  { color: #9ca3af; }
.ksc-yes    { color: #16a34a; }
.ksc-no     { color: #dc2626; }
.ksc-highlight { color: #6366f1; font-weight: 700; }
.ksc-empty  { color: #6b7280; font-style: italic; }

/* ── Status pills ────────────────────────────────────────────────────────── */
.ksc-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}

.ksc-status--completed { background: #dcfce7; color: #166534; }
.ksc-status--pending   { background: #fef3c7; color: #92400e; }
.ksc-status--failed    { background: #fee2e2; color: #991b1b; }
.ksc-status--refunded  { background: #e0e7ff; color: #3730a3; }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.ksc-pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    font-size: .875rem;
    color: #374151;
}

.ksc-page-btn {
    padding: 6px 14px;
    background: #f3f4f6;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    transition: background .2s;
}

.ksc-page-btn:hover { background: #e5e7eb; text-decoration: none; }

/* ── Admin styles ────────────────────────────────────────────────────────── */
.ksc-admin-wrap h1        { margin-bottom: 20px; }
.ksc-admin-stats          { max-width: 900px; }
.ksc-setup-guide          { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 20px 24px; max-width: 700px; margin-bottom: 24px; }
.ksc-setup-guide h3       { margin: 0 0 10px; font-size: 1rem; color: #1e40af; }
.ksc-setup-guide ol       { margin: 0; padding-left: 20px; color: #1e3a8a; font-size: .9rem; line-height: 1.8; }

.ksc-form-table input.regular-text { max-width: 380px; }
.ksc-security-note  { color: #d97706; }

.ksc-filter-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; }
.ksc-filter-form select, .ksc-filter-form input[type="date"] { height: 32px; border-radius: 4px; border: 1px solid #ccc; padding: 0 8px; }

.ksc-tablenav { margin-top: 16px; }
.ksc-vendor-table td, .ksc-commission-table td { vertical-align: middle; }
.ksc-action-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ksc-small-link  { font-size: .8rem; color: #6b7280; }
.ksc-success     { color: #16a34a !important; }

/* Toggle switch */
.ksc-toggle { position: relative; display: inline-block; width: 46px; height: 24px; }
.ksc-toggle input { opacity: 0; width: 0; height: 0; }
.ksc-toggle__slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #d1d5db; border-radius: 24px;
    transition: .3s;
}
.ksc-toggle__slider::before {
    content: ''; position: absolute;
    width: 18px; height: 18px;
    left: 3px; bottom: 3px;
    background: #fff; border-radius: 50%;
    transition: .3s;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.ksc-toggle input:checked + .ksc-toggle__slider { background: #635bff; }
.ksc-toggle input:checked + .ksc-toggle__slider::before { transform: translateX(22px); }
