/* ── Base ─────────────────────────────────────────────────────────────────── */
.vvaff-portal {
    max-width: 920px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
}

/* ── Auth card ────────────────────────────────────────────────────────────── */
.vvaff-auth {
    background: #fff;
    border-radius: 20px;
    padding: 48px 44px 44px;
    max-width: 460px;
    margin: 48px auto;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0,0,0,.08);
}

.vvaff-auth h2 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}

.vvaff-auth p {
    margin: 0 0 20px;
    color: #64748b;
    font-size: 15px;
}

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.vvaff-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 28px;
    gap: 4px;
}

.vvaff-tab {
    flex: 1;
    background: none !important;
    border: none !important;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b !important;
    cursor: pointer;
    border-radius: 9px;
    transition: color .2s;
    box-shadow: none !important;
    outline: none !important;
}

.vvaff-tab:hover,
.vvaff-tab:focus { color: #0f172a !important; background: none !important; box-shadow: none !important; }

.vvaff-tab--active,
.vvaff-tab--active:focus,
.vvaff-tab--active:hover {
    background: #fff !important;
    color: #1a56db !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.10) !important;
}

/* ── Form elements ────────────────────────────────────────────────────────── */
.vvaff-input {
    display: block !important;
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    margin-bottom: 12px !important;
    box-sizing: border-box !important;
    transition: border-color .2s, box-shadow .2s !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

.vvaff-input:focus {
    outline: none !important;
    border-color: #1a56db !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(26,86,219,.12) !important;
}

textarea.vvaff-input { resize: vertical; }

.vvaff-form-msg {
    min-height: 20px;
    font-size: 14px;
    margin: 8px 0 0;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.vvaff-btn {
    display: inline-block;
    background: linear-gradient(135deg, #1a56db 0%, #1e40af 100%);
    color: #fff;
    border: none;
    padding: 13px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .2s, transform .1s;
    letter-spacing: .2px;
}

.vvaff-btn:hover { opacity: .9; color: #fff; transform: translateY(-1px); }
.vvaff-btn:active { transform: translateY(0); }

.vvaff-btn--outline {
    background: transparent;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    font-weight: 600;
    font-size: 14px;
    padding: 9px 18px;
}

.vvaff-btn--outline:hover {
    background: #f8fafc;
    color: #374151;
    opacity: 1;
    transform: none;
}

/* ── Notice ───────────────────────────────────────────────────────────────── */
.vvaff-notice {
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border-left: 4px solid #1a56db;
    border-radius: 10px;
    padding: 18px 22px;
    margin: 20px 0;
    font-size: 15px;
    color: #1e3a5f;
}

.vvaff-notice--error {
    background: #fff5f5;
    border-left-color: #e53e3e;
    color: #742a2a;
}

/* ── Dashboard header ─────────────────────────────────────────────────────── */
.vvaff-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.vvaff-header h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.5px;
}

.vvaff-header p {
    margin: 4px 0 0;
    font-size: 14px;
    color: #94a3b8;
}

/* ── Stats grid ───────────────────────────────────────────────────────────── */
.vvaff-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 36px;
}

.vvaff-stat {
    background: #fff;
    border-radius: 14px;
    padding: 20px 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
}

.vvaff-stat::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1a56db, #6366f1);
    border-radius: 14px 14px 0 0;
}

.vvaff-stat__label {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: 600;
    margin-bottom: 10px;
}

.vvaff-stat__value {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.5px;
}

/* ── Section heading ──────────────────────────────────────────────────────── */
.vvaff-section-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 32px 0 6px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.vvaff-section-title span {
    font-size: 13px;
    font-weight: 400;
    color: #94a3b8;
}

/* ── Product groups ───────────────────────────────────────────────────────── */
.vvaff-product-group {
    background: #fff;
    border-radius: 16px;
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border: 1px solid #f1f5f9;
}

.vvaff-product-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8faff 0%, #f1f5f9 100%);
    padding: 14px 20px;
    border-bottom: 1px solid #e8edf5;
}

.vvaff-product-group__title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.vvaff-product-group__commission {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #ea580c);
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: .2px;
    box-shadow: 0 2px 8px rgba(249,115,22,.35);
}

.vvaff-product-group .vvaff-links {
    padding: 16px 20px;
    gap: 10px;
    margin-bottom: 0;
}

/* ── Referral links ───────────────────────────────────────────────────────── */
.vvaff-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
}

.vvaff-link-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vvaff-link-label {
    font-size: 13px;
    color: #475569;
    min-width: 210px;
    flex-shrink: 0;
    font-weight: 500;
}

.vvaff-link-input {
    flex: 1 !important;
    min-width: 180px !important;
    padding: 9px 13px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    background: #f8fafc !important;
    color: #475569 !important;
    font-family: 'SF Mono', 'Fira Code', monospace !important;
    box-shadow: none !important;
    outline: none !important;
}

.vvaff-copy-btn {
    background: #0f172a;
    color: #fff;
    border: none;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}

.vvaff-copy-btn:hover { background: #1e293b; }

/* ── Conversions table ────────────────────────────────────────────────────── */
.vvaff-table-wrap {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border: 1px solid #f1f5f9;
    margin-top: 8px;
}

.vvaff-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.vvaff-table th {
    background: linear-gradient(135deg, #f8faff 0%, #f1f5f9 100%);
    padding: 13px 18px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: #94a3b8;
    border-bottom: 1px solid #e8edf5;
}

.vvaff-table td {
    padding: 13px 18px;
    border-bottom: 1px solid #f8fafc;
    color: #334155;
}

.vvaff-table tr:last-child td { border-bottom: none; }
.vvaff-table tr:hover td { background: #fafbff; }

.vvaff-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.vvaff-badge--pending  { background: #fef9c3; color: #854d0e; }
.vvaff-badge--approved { background: #dcfce7; color: #166534; }
.vvaff-badge--paid     { background: #f1f5f9; color: #64748b; }

/* ── Three columns ────────────────────────────────────────────────────────── */
.vvaff-three-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.vvaff-mini-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border: 1px solid #f1f5f9;
}

.vvaff-mini-card__title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: #94a3b8;
    margin-bottom: 14px;
}

.vvaff-mini-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vvaff-mini-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f8fafc;
}

.vvaff-mini-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.vvaff-mini-list__date {
    color: #94a3b8;
    font-size: 12px;
    flex-shrink: 0;
    min-width: 70px;
}

.vvaff-mini-list__label {
    color: #334155;
    font-weight: 500;
    flex: 1;
}

.vvaff-mini-list__amount {
    color: #0f172a;
    font-weight: 700;
    margin-left: auto;
}

.vvaff-empty {
    color: #cbd5e1;
    font-size: 13px;
    text-align: center;
    padding: 16px 0;
    margin: 0;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .vvaff-stats { grid-template-columns: repeat(2, 1fr); }
    .vvaff-stat__value { font-size: 20px; }
    .vvaff-auth { padding: 32px 24px; }
    .vvaff-three-cols { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .vvaff-stats { grid-template-columns: 1fr 1fr; }
    .vvaff-link-label { min-width: 100%; }
    .vvaff-link-input { min-width: 0; }
    .vvaff-header h2 { font-size: 20px; }
}
