/* Replanta Affiliates — Dashboard styles */

:root {
    --raff-dark: #1E2F23;
    --raff-mint: #93F1C9;
    --raff-teal: #41999F;
    --raff-gold: #F7D450;
    --raff-gray: #f5f5f5;
    --raff-border: #e0e0e0;
    --raff-radius: 8px;
}

/* Layout */
.raff-dashboard { max-width: 960px; margin: 0 auto; font-family: system-ui, -apple-system, sans-serif; color: var(--raff-dark); }
.raff-dash-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.raff-dash-header h2 { margin: 0; font-size: 1.5rem; }

/* Tabs */
.raff-dash-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--raff-border); margin-bottom: 24px; }
.raff-tab { padding: 10px 20px; text-decoration: none; color: #666; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.raff-tab:hover { color: var(--raff-teal); }
.raff-tab--active { color: var(--raff-teal); border-bottom-color: var(--raff-teal); }

/* KPIs */
.raff-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }
.raff-kpi { background: #fff; border: 1px solid var(--raff-border); border-radius: var(--raff-radius); padding: 20px; text-align: center; }
.raff-kpi__value { display: block; font-size: 1.8rem; font-weight: 700; color: var(--raff-teal); }
.raff-kpi__label { display: block; font-size: .85rem; color: #888; margin-top: 4px; }

/* Badges */
.raff-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: .75rem; font-weight: 600; text-transform: uppercase; }
.raff-badge--pending { background: #fff3cd; color: #856404; }
.raff-badge--approved, .raff-badge--active { background: #d4edda; color: #155724; }
.raff-badge--confirmed { background: #cce5ff; color: #004085; }
.raff-badge--paid { background: #d1ecf1; color: #0c5460; }
.raff-badge--suspended, .raff-badge--rejected { background: #f8d7da; color: #721c24; }
.raff-badge--requested { background: #e2e3e5; color: #383d41; }

/* Sections */
.raff-section { margin-bottom: 32px; }
.raff-section h3 { font-size: 1.1rem; margin-bottom: 12px; }

/* Ref URL */
.raff-ref-url { display: flex; gap: 8px; }
.raff-ref-url input { flex: 1; padding: 8px 12px; border: 1px solid var(--raff-border); border-radius: var(--raff-radius); font-size: .9rem; background: var(--raff-gray); }

/* Coupon */
.raff-coupon__code { font-size: 1.5rem; padding: 8px 16px; background: var(--raff-dark); color: var(--raff-mint); border-radius: var(--raff-radius); }
.raff-coupon__note { margin-top: 8px; font-size: .85rem; color: #666; }

/* Tables */
.raff-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.raff-table th { background: var(--raff-dark); color: #fff; padding: 10px 12px; text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; }
.raff-table td { padding: 10px 12px; border-bottom: 1px solid var(--raff-border); }
.raff-table tbody tr:hover { background: rgba(147,241,201,.08); }

/* Buttons */
.raff-btn { display: inline-block; padding: 10px 24px; border: none; border-radius: var(--raff-radius); font-size: .9rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: all .2s; }
.raff-btn--primary { background: var(--raff-teal); color: #fff; }
.raff-btn--primary:hover { background: #357f84; }
.raff-btn--sm { padding: 6px 14px; font-size: .8rem; background: var(--raff-gray); color: var(--raff-dark); }
.raff-btn--sm:hover { background: var(--raff-border); }

/* Forms */
.raff-form { max-width: 500px; }
.raff-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.raff-field { margin-bottom: 16px; }
.raff-field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.raff-field input, .raff-field select, .raff-field textarea { width: 100%; padding: 8px 12px; border: 1px solid var(--raff-border); border-radius: var(--raff-radius); font-size: .9rem; }
.raff-field--readonly input { background: var(--raff-gray); color: #888; }

/* Notices */
.raff-notice { padding: 12px 16px; border-radius: var(--raff-radius); margin-bottom: 20px; }
.raff-notice--success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.raff-notice--error { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }

/* Empty state */
.raff-empty { color: #999; font-style: italic; }

/* Login */
.raff-login-wrap { max-width: 400px; margin: 40px auto; text-align: center; }
.raff-login-wrap h2 { margin-bottom: 8px; }
.raff-login-wrap p { color: #666; margin-bottom: 20px; }

/* Responsive */
@media (max-width: 600px) {
    .raff-kpis { grid-template-columns: 1fr 1fr; }
    .raff-dash-tabs { overflow-x: auto; }
    .raff-table { font-size: .8rem; }
    .raff-form-grid { grid-template-columns: 1fr; }
}
