/* ============================================================
   RTC MEMBER PORTAL - MAIN STYLESHEET
   ============================================================ */

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #7c8af0;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-soft: #f1f5f9;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --info: #0ea5e9;
    --info-bg: #f0f9ff;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --max-width: 1280px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 { font-family: 'Poppins', sans-serif; font-weight: 700; line-height: 1.3; color: var(--text); }

.app-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.main-content { flex: 1; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 32px 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 32px 24px; }

/* ====== FLASH ====== */
.flash {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}
.flash-success { background: var(--success-bg); color: #065f46; border: 1px solid #a7f3d0; }
.flash-error { background: var(--danger-bg); color: #991b1b; border: 1px solid #fecaca; }
.flash-warning { background: var(--warning-bg); color: #92400e; border: 1px solid #fde68a; }
.flash-info { background: var(--info-bg); color: #0c4a6e; border: 1px solid #bae6fd; }

/* ====== FOOTER ====== */
.footer {
    background: #1e293b;
    color: #fff;
    padding: 24px 0;
    margin-top: 60px;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
}
.footer a { color: #fff; }
.footer a:hover { text-decoration: underline; }

/* ====== BUTTONS ====== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    font-family: inherit;
}
.btn:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn-gradient {
    background: var(--gradient);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
.btn-gradient:hover { background: var(--gradient); box-shadow: 0 6px 18px rgba(102, 126, 234, 0.4); }

/* ====== HERO ====== */
.hero {
    background: var(--gradient);
    color: #fff;
    border-radius: 24px;
    padding: 64px 48px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { font-size: 42px; font-weight: 800; margin-bottom: 16px; line-height: 1.15; color: #fff; }
.hero p { font-size: 17px; opacity: 0.92; margin-bottom: 28px; max-width: 600px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-hero-primary { background: #fff; color: var(--primary); padding: 14px 28px; border-radius: 10px; font-weight: 600; font-size: 15px; text-decoration: none; transition: all 0.15s; }
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.15); color: var(--primary); }
.btn-hero-secondary { background: rgba(255,255,255,0.15); color: #fff; padding: 14px 28px; border-radius: 10px; font-weight: 600; font-size: 15px; border: 1.5px solid rgba(255,255,255,0.4); text-decoration: none; transition: all 0.15s; }
.btn-hero-secondary:hover { background: rgba(255,255,255,0.25); color: #fff; }

/* ====== STATS / FEATURES ====== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.feature-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.feature-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5f7ff, #ede4f7);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { color: var(--text-soft); font-size: 14px; }

/* ====== PRICING ====== */
.pricing-section { margin-bottom: 48px; }
.pricing-section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex; align-items: center; gap: 8px;
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.plan-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: all 0.2s;
    position: relative;
}
.plan-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.plan-card.popular { border-color: var(--primary); border-width: 2px; }
.plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient);
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.plan-name { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.plan-price {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin: 12px 0;
}
.plan-price small { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.plan-description { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; min-height: 40px; }
.plan-cta {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--bg-soft);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.15s;
}
.plan-cta:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.plan-card.popular .plan-cta { background: var(--gradient); color: #fff; border: none; }
.plan-card.popular .plan-cta:hover { box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); }

/* ====== FORM ====== */
.form-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    max-width: 540px;
    margin: 0 auto;
}
.form-header { text-align: center; margin-bottom: 28px; }
.form-header h1 { font-size: 26px; margin-bottom: 6px; }
.form-header p { color: var(--text-muted); font-size: 14px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: all 0.15s;
    color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-footer { text-align: center; margin-top: 20px; color: var(--text-muted); font-size: 14px; }
.form-footer a { color: var(--primary); font-weight: 500; }

/* ====== DASHBOARD ====== */
.dashboard-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.dashboard-card h2 { font-size: 18px; margin-bottom: 16px; }

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.portal-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    display: block;
}
.portal-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--primary); color: var(--text); }
.portal-icon { font-size: 36px; margin-bottom: 12px; }
.portal-card h3 { font-size: 16px; margin-bottom: 6px; }
.portal-card p { font-size: 13px; color: var(--text-muted); }
.portal-card.disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

/* ====== EMPTY STATE ====== */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.empty-state p { font-size: 14px; max-width: 400px; margin: 0 auto; }

/* ====== TEXT HELPERS ====== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-sm { font-size: 13px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 22px; }
.text-2xl { font-size: 28px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
