/* Affiliate Dashboard Styles - Extends admin.css */

/* Dashboard Header */
.affiliate-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.affiliate-dashboard-header h1 {
    font-size: 2rem;
    margin: 0;
}

.affiliate-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: white;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

.affiliate-user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.affiliate-user-name {
    font-weight: 600;
}

/* Stats Cards */
.affiliate-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.affiliate-stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.affiliate-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.affiliate-stat-card .stat-icon i {
    width: 24px;
    height: 24px;
}

.affiliate-stat-card .stat-icon.sales {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.affiliate-stat-card .stat-icon.earnings {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.affiliate-stat-card .stat-icon.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.affiliate-stat-card .stat-icon.paid {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.affiliate-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.affiliate-stat-card .stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

/* QR Section */
.affiliate-qr-section {
    background: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 40px;
}

.affiliate-qr-section h2 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.affiliate-qr-section h2 i {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.affiliate-qr-content {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.affiliate-qr-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.affiliate-qr-image {
    width: 180px;
    height: 180px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.affiliate-qr-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.affiliate-qr-info {
    flex: 1;
    min-width: 250px;
}

.affiliate-qr-left .affiliate-promo-code-display {
    margin-bottom: 0;
}

.affiliate-qr-info p {
    color: var(--gray);
    margin-bottom: 16px;
    line-height: 1.6;
}

.affiliate-promo-editor {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.affiliate-promo-editor .label {
    font-weight: 600;
}

.promo-edit-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.promo-edit-row .text-input {
    flex: 1;
    text-transform: uppercase;
}

.promo-code-message {
    margin-top: 6px;
    font-weight: 500;
}

.promo-code-message.success {
    color: #16a34a;
}

.promo-code-message.error {
    color: #dc2626;
}

.promo-code-hint {
    font-size: 0.85rem;
    color: var(--gray);
}

.affiliate-promo-code-display {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(245, 158, 11, 0.1);
    padding: 12px 20px;
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.affiliate-promo-code-display code {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}

.affiliate-qr-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.affiliate-guide {
    margin-top: 30px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 16px 20px;
}

.affiliate-guide summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.affiliate-guide summary::-webkit-details-marker {
    display: none;
}

.affiliate-guide summary::after {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--gray);
    border-bottom: 2px solid var(--gray);
    transform: rotate(-45deg);
    margin-left: 10px;
    transition: transform 0.2s ease;
}

.affiliate-guide[open] summary::after {
    transform: rotate(45deg);
}

.affiliate-guide-body {
    margin-top: 12px;
    color: var(--gray);
    line-height: 1.6;
}

.affiliate-guide-body ul {
    padding-left: 18px;
    margin: 12px 0;
}

.affiliate-guide-body li {
    margin-bottom: 8px;
}

.affiliate-guide-note {
    margin-top: 10px;
    font-weight: 600;
    color: var(--primary);
}

.tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.tour-backdrop {
    display: none;
}

.tour-highlight {
    position: absolute;
    border-radius: 16px;
    border: 2px solid rgba(245, 158, 11, 0.85);
    box-sizing: border-box;
    transition: top 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        left 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        border-radius 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    z-index: 2001;
    will-change: top, left, width, height, border-radius;
}

.tour-focus {
    position: absolute;
    border-radius: 16px;
    background: transparent;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55);
    transition: top 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        left 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        border-radius 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    z-index: 2000;
    will-change: top, left, width, height, border-radius;
    --hole-radius: 120px;
    --hole-center-x: 50%;
    --hole-center-y: 50%;
}

.tour-tooltip {
    position: absolute;
    max-width: 320px;
    width: calc(100vw - 24px);
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: tourSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: grid;
    gap: 12px;
    z-index: 2001;
}

.tour-step-indicator {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(245, 158, 11, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    width: fit-content;
}

.tour-step-title {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--dark);
    line-height: 1.3;
}

.tour-step-body {
    color: var(--gray);
    line-height: 1.6;
    font-size: 0.95rem;
    display: block;
}

.tour-step-body>.emoji {
    float: left;
    margin-right: 10px;
    font-size: 1.3rem;
    line-height: 1;
}

.tour-step-body ul {
    margin: 10px 0;
    padding-left: 0;
    list-style: none;
    clear: both;
}

.tour-step-body li {
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.tour-checkbox {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.85rem;
    color: var(--gray);
    padding: 12px;
    background: var(--surface-muted);
    border-radius: 12px;
    cursor: pointer;
    margin: 4px 0;
}

.tour-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.tour-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.tour-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 12px 16px;
    font-weight: 700;
}

.tour-actions .btn-link {
    flex: 0 0 auto;
    color: var(--gray);
}

.tour-arrow {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .tour-tooltip {
        padding: 16px;
        gap: 10px;
    }

    .tour-step-title {
        font-size: 1rem;
    }

    .tour-step-body {
        font-size: 0.9rem;
    }

    .tour-actions .btn {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
}

.tour-arrow.top {
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
}

.tour-arrow.bottom {
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
}

.tour-arrow.left {
    left: -8px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.tour-arrow.right {
    right: -8px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

@keyframes tourFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes tourSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tables Section */
.affiliate-tables-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.affiliate-table-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.affiliate-table-card h2 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.affiliate-table {
    width: 100%;
    border-collapse: collapse;
}

.affiliate-table th,
.affiliate-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.affiliate-table th {
    font-weight: 600;
    color: var(--gray);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.affiliate-table tr:last-child td {
    border-bottom: none;
}

.affiliate-table .status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.affiliate-table .status-badge.completed {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.affiliate-table .status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.affiliate-table .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.affiliate-table .empty-state i {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.affiliate-table .empty-state p {
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 980px) {
    .affiliate-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .affiliate-dashboard-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .affiliate-user-info {
        justify-content: center;
        flex-direction: column;
        border-radius: 16px;
        padding: 14px;
    }

    .affiliate-qr-content {
        flex-direction: column;
        text-align: center;
    }

    .affiliate-qr-info {
        width: 100%;
    }

    .promo-edit-row {
        flex-direction: column;
        align-items: stretch;
    }

    .promo-edit-row .btn {
        width: 100%;
        justify-content: center;
    }

    /* Transform Table to Cards on Mobile */
    .affiliate-table {
        border: none;
    }

    .affiliate-table thead {
        display: none;
    }

    .affiliate-table,
    .affiliate-table tbody,
    .affiliate-table tr,
    .affiliate-table td {
        display: block;
    }

    .affiliate-table tr {
        background: white;
        border: 1px solid var(--border);
        border-radius: 16px;
        margin-bottom: 16px;
        padding: 12px;
        box-shadow: var(--shadow-sm);
    }

    .affiliate-table td {
        border: none;
        padding: 8px 10px 8px 120px !important;
        position: relative;
        min-height: 36px;
        display: flex;
        align-items: center;
        text-align: left;
    }

    .affiliate-table td:before {
        position: absolute;
        left: 12px;
        width: 100px;
        font-weight: 700;
        font-size: 0.7rem;
        color: var(--gray);
        text-transform: uppercase;
        content: attr(data-label);
    }

    .affiliate-table td:first-child {
        border-bottom: 1px solid var(--border);
        margin-bottom: 8px;
        padding-left: 10px !important;
        background: rgba(245, 158, 11, 0.05);
        border-radius: 8px 8px 0 0;
    }

    .affiliate-table td:first-child:before {
        display: none;
    }
}

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

    .affiliate-stat-card {
        padding: 20px;
    }

    .affiliate-qr-section {
        padding: 20px;
    }

    .affiliate-qr-actions {
        flex-direction: column;
    }

    .affiliate-qr-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .affiliate-login-card {
        padding: 25px 15px;
    }
}

/* Affiliate Landing Page */
.affiliate-landing-body {
    background: radial-gradient(1200px 600px at 10% 0%, rgba(245, 158, 11, 0.15), transparent 60%),
        radial-gradient(900px 500px at 90% 10%, rgba(251, 191, 36, 0.2), transparent 60%),
        #fff8eb;
}

.affiliate-hero {
    padding: 50px 0 40px;
}

.affiliate-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}

.affiliate-hero-copy h1 {
    font-size: clamp(2.2rem, 3.5vw, 3.4rem);
    line-height: 1.1;
    margin: 18px 0 16px;
}

.affiliate-hero-copy p {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 560px;
}

.affiliate-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(245, 158, 11, 0.25);
    font-weight: 600;
    color: #b45309;
}

.affiliate-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.affiliate-cta-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 24px 0 26px;
}

.affiliate-quote {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.affiliate-quote-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    background: rgba(245, 158, 11, 0.1);
    padding: 4px 12px;
    border-radius: 999px;
    display: inline-block;
}

.affiliate-quote i {
    color: var(--primary);
    margin-top: 2px;
}

.affiliate-hero-visual {
    position: relative;
}

.affiliate-peek-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(15, 23, 42, 0.06);
    position: relative;
    z-index: 2;
}

.affiliate-hero-glow {
    position: absolute;
    inset: -30px;
    background: radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.25), transparent 60%);
    filter: blur(40px);
    z-index: 1;
}

.peek-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.peek-user {
    display: flex;
    gap: 12px;
    align-items: center;
}

.peek-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.peek-title {
    font-weight: 700;
}

.peek-subtitle {
    color: var(--gray);
    font-size: 0.85rem;
}

.peek-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
    border-radius: 999px;
    font-weight: 600;
}

.peek-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.peek-stat {
    background: #f8fafc;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.peek-label {
    color: var(--gray);
    font-size: 0.8rem;
}

.peek-value {
    font-size: 1.2rem;
    font-weight: 700;
}

.peek-qr {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

.peek-qr-box {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    background: repeating-linear-gradient(45deg, #e2e8f0, #e2e8f0 6px, #f8fafc 6px, #f8fafc 12px);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.peek-qr-title {
    font-weight: 600;
}

.peek-qr-desc {
    color: var(--gray);
    font-size: 0.85rem;
    margin: 6px 0;
}

.peek-qr-code {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    font-weight: 600;
    font-size: 0.85rem;
}

.peek-graph {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    align-items: end;
    height: 70px;
}

.peek-graph-bar {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.8), rgba(245, 158, 11, 0.2));
    border-radius: 10px;
    height: 100%;
}

.peek-graph-bar:nth-child(2) {
    height: 60%;
}

.peek-graph-bar:nth-child(3) {
    height: 80%;
}

.peek-graph-bar:nth-child(4) {
    height: 45%;
}

.peek-graph-bar:nth-child(5) {
    height: 70%;
}

.affiliate-section {
    padding: 70px 0;
}

.affiliate-section.alt {
    background: rgba(255, 255, 255, 0.7);
    border-top: 1px solid rgba(15, 23, 42, 0.05);
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.affiliate-section-header {
    margin-bottom: 40px;
}

.affiliate-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.affiliate-step-card {
    background: #fff;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow-sm);
}

.affiliate-step-card .step-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.affiliate-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
}

.affiliate-benefit-card {
    background: #fff;
    padding: 22px;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow-sm);
}

.affiliate-benefit-card i {
    color: var(--primary);
    margin-bottom: 12px;
}

.affiliate-form-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.affiliate-form-copy h2 {
    margin-bottom: 15px;
}

.affiliate-form-subtitle {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
}

.affiliate-form-points {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
    color: var(--gray);
    list-style: none;
    padding: 0;
}

.affiliate-form-points li {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 12px;
    align-items: start;
    font-size: 1rem;
    line-height: 1.5;
}

.affiliate-form-points i {
    color: var(--primary);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -1px;
}

.affiliate-form-points i svg {
    width: 18px !important;
    height: 18px !important;
    stroke-width: 2.2px !important;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.affiliate-signup-card {
    background: #fff;
    padding: 28px;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow-md);
    display: grid;
    gap: 14px;
}

.affiliate-signup-card .label {
    font-weight: 600;
    color: var(--dark);
    display: block;
    margin-bottom: 6px;
}

.affiliate-signup-card .text-input {
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 14px 16px;
    font-size: 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    display: block;
    margin: 0;
}

.affiliate-signup-card .form-group {
    margin: 0;
}

.affiliate-signup-card .text-input:focus {
    border-color: rgba(245, 158, 11, 0.65);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.affiliate-dialog {
    display: grid;
    gap: 6px;
}

.affiliate-bubble {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow-sm);
}

.affiliate-bubble.is-you {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.22);
}

.affiliate-bubble-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.06);
    color: var(--dark);
}

.affiliate-bubble.is-you .affiliate-bubble-icon {
    background: rgba(245, 158, 11, 0.2);
    color: #b45309;
}

.affiliate-bubble-icon i {
    width: 18px;
    height: 18px;
}

.affiliate-speaker {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.affiliate-form-note {
    margin-top: 12px;
    color: var(--gray);
    font-size: 0.9rem;
    text-align: center;
}

.affiliate-terms {
    margin-top: 10px;
    border-radius: 16px;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--dark);
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 0;
}

.affiliate-terms-title {
    font-weight: 700;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
}

.affiliate-terms-title::-webkit-details-marker {
    display: none;
}

.affiliate-terms-toggle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(245, 158, 11, 0.35);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.affiliate-terms-toggle::before {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border-right: 2px solid #b45309;
    border-bottom: 2px solid #b45309;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.affiliate-terms[open] .affiliate-terms-toggle::before {
    transform: rotate(-135deg);
}

.affiliate-terms-body {
    padding: 0 16px 14px;
}

.affiliate-terms-body p {
    margin: 0 0 6px;
}

.affiliate-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--dark);
}

.affiliate-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--primary);
}

@media (max-width: 960px) {
    .affiliate-hero-grid {
        grid-template-columns: 1fr;
    }

    .affiliate-form-wrap {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .affiliate-hero {
        padding-top: 20px;
    }

    .affiliate-cta-row .btn {
        width: 100%;
        justify-content: center;
    }

    .peek-stats {
        grid-template-columns: 1fr;
    }

    .peek-qr {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .peek-qr-box {
        margin: 0 auto;
    }

    .affiliate-form-wrap {
        gap: 24px;
    }

    .affiliate-signup-card {
        padding: 20px;
    }

    .affiliate-consent {
        align-items: flex-start;
    }
}

.tour-step-title {
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}