/* ==========================================================================
   Retail Sponsor – Brand Portal & Signup Styles
   ========================================================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --rsp-indigo: #059669;
    --rsp-indigo-light: #34d399;
    --rsp-cyan: #f97316;
    --rsp-green: #10b981;
    --rsp-red: #ef4444;
    --rsp-bg: #f8fafc;
    --rsp-card: #ffffff;
    --rsp-text: #0f172a;
    --rsp-muted: #94a3b8;
    --rsp-border: #e5e7eb;
    --rsp-font: 'DM Sans', -apple-system, sans-serif;
    --rsp-mono: 'Space Mono', monospace;
}

body.rsp-brand-signup-page,
body.rsp-brand-portal-page {
    margin: 0 !important;
    padding: 0 !important;
}
body.rsp-brand-signup-page_DUPLICATE,
body.rsp-brand-portal-page {
    font-family: var(--rsp-font);
    -webkit-font-smoothing: antialiased;
    color: var(--rsp-text);
    background: var(--rsp-bg);
    margin: 0;
}

/* ================================================================== */
/*  SIGNUP PAGE                                                        */
/* ================================================================== */

.rsp-signup-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Left brand panel */
.rsp-signup-brand {
    width: 45%;
    background: #07070e;
    color: #fff;
    padding: 48px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.rsp-signup-brand::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(5,150,105,0.15) 0%, transparent 70%);
    filter: blur(60px);
}
.rsp-signup-brand__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
}
.rsp-signup-brand__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--rsp-indigo), var(--rsp-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
}
.rsp-signup-brand__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}
.rsp-signup-brand__content h1 {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}
.rsp-signup-brand__content p {
    font-size: 16px;
    color: rgba(255,255,255,0.5);
    line-height: 1.65;
    margin-bottom: 40px;
}
.rsp-signup-brand__stats {
    display: flex;
    gap: 32px;
}
.rsp-signup-brand__stats div {
    text-align: center;
}
.rsp-signup-brand__stats strong {
    display: block;
    font-size: 28px;
    font-weight: 800;
    font-family: var(--rsp-mono);
}
.rsp-signup-brand__stats span {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-top: 4px;
}

/* Right form panel */
.rsp-signup-form-panel {
    width: 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}
.rsp-signup-form-inner {
    width: 100%;
    max-width: 480px;
}
.rsp-signup-form-inner h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}
.rsp-signup-sub {
    color: var(--rsp-muted);
    font-size: 14px;
    margin-bottom: 32px;
}

/* Steps */
.rsp-steps {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
}
.rsp-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--rsp-muted);
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(0,0,0,0.03);
    transition: all 0.3s;
}
.rsp-step--active {
    background: rgba(5,150,105,0.1);
    color: var(--rsp-indigo);
}
.rsp-step--done {
    background: rgba(16,185,129,0.1);
    color: var(--rsp-green);
}
.rsp-step span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: currentColor;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}

/* Form fields */
.rsp-field {
    margin-bottom: 18px;
}
.rsp-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--rsp-text);
    margin-bottom: 6px;
}
.rsp-field input,
.rsp-field select {
    width: 100%;
    font-family: var(--rsp-font);
    font-size: 14px;
    padding: 10px 14px;
    border: 1px solid var(--rsp-border);
    border-radius: 8px;
    background: #fff;
    color: var(--rsp-text);
    transition: border-color 0.2s;
}
.rsp-field input:focus,
.rsp-field select:focus {
    outline: none;
    border-color: var(--rsp-indigo);
    box-shadow: 0 0 0 3px rgba(5,150,105,0.1);
}
.rsp-field-row {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}
.rsp-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rsp-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}
.rsp-terms {
    margin-bottom: 20px;
}
.rsp-terms label {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.rsp-terms a {
    color: var(--rsp-indigo);
}

/* Error */
.rsp-signup-error {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    color: var(--rsp-red);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
}

.rsp-signup-login {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--rsp-muted);
}
.rsp-signup-login a {
    color: var(--rsp-indigo);
    text-decoration: none;
    font-weight: 600;
}

/* ================================================================== */
/*  BUTTONS (shared)                                                   */
/* ================================================================== */

.rsp-btn {
    display: inline-block;
    font-family: var(--rsp-font);
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 14px;
    padding: 11px 28px;
}
.rsp-btn:hover { transform: translateY(-1px); }
.rsp-btn--primary {
    background: linear-gradient(135deg, var(--rsp-indigo), var(--rsp-indigo-light));
    color: #fff;
    box-shadow: 0 2px 12px rgba(5,150,105,0.3);
}
.rsp-btn--ghost {
    background: #fff;
    color: var(--rsp-text);
    border: 1px solid var(--rsp-border);
}
.rsp-btn--full {
    width: 100%;
    text-align: center;
}

/* ================================================================== */
/*  PORTAL DASHBOARD                                                   */
/* ================================================================== */

.rsp-login-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-size: 16px;
}
.rsp-login-notice a { color: var(--rsp-indigo); }

/* Top bar */
.rsp-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 64px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--rsp-border);
}
.rsp-topbar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--rsp-text);
    font-weight: 700;
    font-size: 18px;
}
.rsp-topbar__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--rsp-indigo), var(--rsp-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
}
.rsp-topbar__right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.rsp-topbar__badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(5,150,105,0.1);
    color: var(--rsp-indigo);
    padding: 4px 12px;
    border-radius: 6px;
}
.rsp-topbar__user {
    font-size: 14px;
    font-weight: 500;
    color: var(--rsp-muted);
}
.rsp-topbar__logout {
    font-size: 13px;
    color: var(--rsp-muted);
    text-decoration: none;
}

/* Layout */
.rsp-portal-wrap {
    display: flex;
    padding-top: 64px;
}

/* Sidebar */
.rsp-portal-sidebar {
    width: 220px;
    min-height: calc(100vh - 64px);
    background: var(--rsp-card);
    border-right: 1px solid var(--rsp-border);
    padding: 24px 0;
    position: fixed;
    top: 64px;
    left: 0;
}
.rsp-sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    border-right: 3px solid transparent;
    transition: all 0.2s;
}
.rsp-sidebar__link:hover {
    color: var(--rsp-indigo);
    background: rgba(5,150,105,0.03);
}
.rsp-sidebar__link--active {
    color: var(--rsp-indigo);
    background: rgba(5,150,105,0.06);
    border-right-color: var(--rsp-indigo);
}
.rsp-sidebar__ico {
    font-size: 16px;
    opacity: 0.7;
}

/* Main */
.rsp-portal-main {
    margin-left: 220px;
    flex: 1;
    padding: 32px 40px;
    min-height: calc(100vh - 64px);
}

.rsp-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}
.rsp-portal-header h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
}
.rsp-portal-header p {
    font-size: 14px;
    color: var(--rsp-muted);
    margin-top: 4px;
}
.rsp-portal-sub {
    color: var(--rsp-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

/* KPIs */
.rsp-portal-kpis {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}
.rsp-portal-kpi {
    background: var(--rsp-card);
    border: 1px solid var(--rsp-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.rsp-portal-kpi__label {
    font-size: 12px;
    color: var(--rsp-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.rsp-portal-kpi__value {
    font-size: 24px;
    font-weight: 800;
    font-family: var(--rsp-mono);
    letter-spacing: -0.02em;
    margin-top: 6px;
}

/* Card */
.rsp-portal-card {
    background: var(--rsp-card);
    border: 1px solid var(--rsp-border);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}
.rsp-portal-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
}

.rsp-loading {
    color: var(--rsp-muted);
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* Campaign rows in portal */
.rsp-portal-campaign-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}
.rsp-portal-campaign-row:last-child { border-bottom: none; }
.rsp-portal-campaign-row__name {
    font-weight: 600;
    font-size: 14px;
}
.rsp-portal-campaign-row__meta {
    font-size: 12px;
    color: var(--rsp-muted);
    margin-top: 3px;
}
.rsp-portal-campaign-row__right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.rsp-portal-campaign-row__stat {
    text-align: right;
}
.rsp-portal-campaign-row__stat-val {
    font-family: var(--rsp-mono);
    font-weight: 700;
    font-size: 13px;
}
.rsp-portal-campaign-row__stat-label {
    font-size: 10px;
    color: var(--rsp-muted);
    text-transform: uppercase;
}

/* Status badges */
.rsp-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
}
.rsp-status__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.rsp-status--live { color: var(--rsp-green); background: rgba(16,185,129,0.08); }
.rsp-status--live .rsp-status__dot { background: var(--rsp-green); }
.rsp-status--scheduled { color: var(--rsp-indigo); background: rgba(5,150,105,0.08); }
.rsp-status--scheduled .rsp-status__dot { background: var(--rsp-indigo); }
.rsp-status--paused { color: var(--rsp-muted); background: rgba(148,163,184,0.1); }
.rsp-status--paused .rsp-status__dot { background: var(--rsp-muted); }

/* Action buttons */
.rsp-action-btn {
    font-family: var(--rsp-font);
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--rsp-border);
    background: #fff;
    color: var(--rsp-text);
    cursor: pointer;
    transition: all 0.2s;
}
.rsp-action-btn:hover {
    border-color: var(--rsp-indigo);
    color: var(--rsp-indigo);
}

/* Bid rows */
.rsp-portal-bid-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}
.rsp-portal-bid-row:last-child { border-bottom: none; }

/* Settings info */
.rsp-settings-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px 20px;
    font-size: 14px;
}
.rsp-settings-grid dt {
    color: var(--rsp-muted);
    font-weight: 500;
}
.rsp-settings-grid dd {
    font-weight: 600;
}

/* ================================================================== */
/*  RESPONSIVE                                                         */
/* ================================================================== */

@media (max-width: 1024px) {
    .rsp-signup-wrapper { flex-direction: column; }
    .rsp-signup-brand { width: 100%; padding: 32px; }
    .rsp-signup-form-panel { width: 100%; }
    .rsp-portal-sidebar { display: none; }
    .rsp-portal-main { margin-left: 0; }
    .rsp-portal-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
    .rsp-portal-kpis { grid-template-columns: repeat(2, 1fr); }
    .rsp-portal-main { padding: 20px 16px; }
    .rsp-signup-brand__stats { flex-direction: column; gap: 16px; }
    .rsp-steps { flex-direction: column; }
}
