/* ================================================================
   affiliate.css — SwiftPOS Affiliate Program styles
   SaaS Modern Light Design System
   ================================================================ */

:root {
    --aff-primary:    #0ea5e9;
    --aff-primary-dk: #0284c7;
    --aff-accent:     #0369a1;
    --aff-bg:         #f8fafc;
    --aff-card-bg:   #ffffff;
    --aff-border:     #e2e8f0;
    --aff-text-main:  #0f172a;
    --aff-text-muted: #64748b;
}

/* ── App Body (Light Theme — NO background image) ───────────────── */
body.aff-body {
    background-color: #f8fafc !important;
    background-image: none !important;
    color: #0f172a;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
}

/* Remove any dark overlay pseudo-elements */
body.aff-body::before {
    display: none !important;
}

body.aff-body > * {
    position: relative;
    z-index: 1;
}

/* ── Navbar (Light SaaS Header) ────────────────────────────────── */
.aff-navbar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.aff-navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.aff-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.aff-brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.95rem;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.25);
}
.aff-brand-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: #0f172a;
}
.aff-brand-name span { color: #0ea5e9; }

.aff-brand-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    border: 1px solid #bae6fd;
}
.aff-nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.aff-nav-link {
    color: #475569;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.45rem 0.95rem;
    border-radius: 8px;
    transition: all 0.2s;
}
.aff-nav-link:hover,
.aff-nav-link.active {
    color: #0ea5e9;
    background: #f0f9ff;
}
.aff-nav-link i { margin-right: 6px; }

.aff-nav-btn {
    background: #0ea5e9;
    color: #fff !important;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.2);
}
.aff-nav-btn:hover {
    background: #0284c7;
    transform: translateY(-1px);
}

/* ── Page Wrapper ───────────────────────────────────────────────── */
.aff-page {
    min-height: calc(100vh - 70px);
    padding: 2rem 1.5rem 3rem;
}
.aff-container {
    max-width: 1150px;
    margin: 0 auto;
}

/* ── Cards ──────────────────────────────────────────────────────── */
.aff-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 10px 25px -5px rgba(0, 0, 0, 0.02);
}

/* ── Stat Cards ─────────────────────────────────────────────────── */
.aff-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.aff-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}
.aff-stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 6px;
}
.aff-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}
.aff-stat-icon {
    position: absolute;
    top: 1.1rem;
    right: 1.25rem;
    font-size: 1.5rem;
    color: #0ea5e9;
    opacity: 0.3;
}

/* ── Tables ─────────────────────────────────────────────────────── */
.aff-table { width: 100%; border-collapse: collapse; }
.aff-table th {
    padding: 0.75rem 1rem;
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.aff-table td {
    padding: 0.9rem 1rem;
    font-size: 0.875rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}
.aff-table tr:last-child td { border-bottom: none; }
.aff-table tr:hover td { background: #f8fafc; }

/* ── Badges ─────────────────────────────────────────────────────── */
.aff-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.aff-badge-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.aff-badge-warning { background: #fef9c3; color: #a16207; border: 1px solid #fef08a; }
.aff-badge-danger  { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.aff-badge-info    { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.aff-badge-muted   { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }

/* ── Form Inputs ─────────────────────────────────────────────────── */
.aff-form-group { margin-bottom: 1.1rem; }

.aff-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.aff-input {
    width: 100%;
    padding: 0.65rem 1rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #0f172a;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.aff-input::placeholder { color: #94a3b8; }
.aff-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}
.aff-input.is-error { border-color: #ef4444; }

.aff-input-help {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 4px;
}
.aff-field-error {
    font-size: 0.78rem;
    color: #dc2626;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.aff-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.65rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}
.aff-btn-primary {
    background: #0ea5e9;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.25);
}
.aff-btn-primary:hover {
    background: #0284c7;
    transform: translateY(-1px);
    color: #fff !important;
}
.aff-btn-outline {
    background: #ffffff;
    border: 1px solid #0ea5e9;
    color: #0ea5e9;
}
.aff-btn-outline:hover { background: #f0f9ff; color: #0284c7; }

.aff-btn-danger {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
}
.aff-btn-sm   { padding: 0.4rem 1rem; font-size: 0.8rem; }
.aff-btn-full { width: 100%; }

/* ── Section Title ───────────────────────────────────────────────── */
.aff-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.aff-section-title i { color: #0ea5e9; }

/* ── Page Header ─────────────────────────────────────────────────── */
.aff-page-header   { margin-bottom: 2rem; }
.aff-page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}
.aff-page-sub { font-size: 0.875rem; color: #64748b; }

/* ── Code Display ────────────────────────────────────────────────── */
.aff-code-display {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 0.4rem 0.9rem;
}
.aff-code-text {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0284c7;
    letter-spacing: 2px;
}
.aff-copy-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.aff-copy-btn:hover { color: #0ea5e9; }

/* ── Alerts ──────────────────────────────────────────────────────── */
.aff-alert {
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
}
.aff-alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.aff-alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.aff-alert-info    { background: #f0f9ff; border: 1px solid #bae6fd; color: #075985; }
.aff-alert-warning { background: #fefce8; border: 1px solid #fef08a; color: #854d0e; }

/* ── Empty State ─────────────────────────────────────────────────── */
.aff-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #94a3b8;
}
.aff-empty i { font-size: 2rem; margin-bottom: 0.75rem; display: block; color: #cbd5e1; }

/* ── Footer ──────────────────────────────────────────────────────── */
.aff-footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    margin-top: 3rem;
    background: #ffffff;
}

/* ── Divider ─────────────────────────────────────────────────────── */
.aff-section-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1.25rem 0;
}

/* ── Code Lock Notice ────────────────────────────────────────────── */
.code-lock-notice {
    background: #fefce8;
    border: 1px solid #fef08a;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: #854d0e;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 0.5rem;
}

/* ── Perk Chips ──────────────────────────────────── */
.perks-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}
.perk-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .aff-page       { padding: 1.25rem 1rem 2rem; }
    .aff-stat-value { font-size: 1.4rem; }
}
