/* ============================================
   GUARANTIFY - SACCO Guarantor Matching System
   Custom Styles
   ============================================ */

:root {
    --primary: #1e3a5f;
    --primary-light: #2c5282;
    --secondary: #6c757d;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
    --body-bg: #f4f6f9;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

body {
    background-color: var(--body-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== NAVIGATION ===== */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.risk-bar {
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* ===== CARDS ===== */
.card {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow);
}

/* ===== AUTH PAGES ===== */
.auth-page {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 2rem;
}

/* ===== SIGNUP STEPS ===== */
.signup-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.step.active .step-number,
.step.completed .step-number {
    background: var(--primary);
    color: white;
}

.step-label {
    font-size: 0.75rem;
    margin-top: 4px;
    color: #6c757d;
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step-line {
    width: 60px;
    height: 2px;
    background: #e9ecef;
    margin: 0 8px;
    margin-bottom: 16px;
}

/* ===== LANDING PAGE ===== */
.landing-page {
    background: white;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    min-height: 100vh;
    color: white;
}

.hero-content {
    padding-top: 60px;
    padding-bottom: 60px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.hero-card {
    animation: slideIn 0.8s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-icon {
    position: absolute;
    left: -30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

.timeline-content h6 {
    color: var(--primary);
}

/* ===== FEATURES ===== */
.features-section {
    background: var(--body-bg);
}

.feature-card {
    background: white;
    border-radius: var(--border-radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto;
}

/* ===== PRICING ===== */
.pricing-section {
    background: var(--body-bg);
}

.pricing-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: transform 0.2s ease;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
    border: 2px solid var(--primary);
}

.popular-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.pricing-header {
    text-align: center;
    margin-bottom: 24px;
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin-bottom: 24px;
}

.pricing-features li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

/* ===== REQUEST CARDS (BLURRED) ===== */
.request-card {
    position: relative;
    overflow: hidden;
}

.risk-indicator {
    height: 4px;
    width: 100%;
}

.blurred-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #adb5bd;
    filter: blur(2px);
}

.blurred-text {
    color: #adb5bd;
    filter: blur(3px);
    user-select: none;
}

.risk-badge-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
}

.loan-amount {
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
}

.amount-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amount-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

/* ===== PLAN OPTIONS ===== */
.plan-option {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-option:hover,
.plan-option.selected {
    border-color: var(--primary);
    background: #f8f9ff;
}

.plan-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary);
}

/* ===== RISK GAUGE ===== */
.risk-gauge {
    padding: 20px;
}

.risk-value {
    font-size: 4rem;
    font-weight: bold;
    line-height: 1;
}

.risk-label {
    font-size: 1rem;
    color: #6c757d;
    margin-top: 8px;
}

.risk-scale-bar {
    height: 8px;
    background: linear-gradient(to right, #28a745, #ffc107, #dc3545);
    border-radius: 4px;
    position: relative;
}

.risk-scale-fill {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    border-radius: 0 4px 4px 0;
}

/* ===== REQUEST DETAIL ===== */
.requester-profile {
    background: #f8f9fa;
    border-radius: 12px;
}

.requester-avatar-large {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
}

.risk-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 4px solid;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.risk-number {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
}

.risk-text {
    font-size: 0.65rem;
    text-transform: uppercase;
}

.detail-item {
    padding: 12px 0;
}

.detail-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
}

/* ===== MATCH CARDS ===== */
.match-card {
    transition: transform 0.2s ease;
}

.match-card:hover {
    transform: translateY(-2px);
}

.match-score {
    text-align: center;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.score-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary);
}

.score-label {
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
}

/* ===== NOTIFICATIONS ===== */
.notification-item {
    padding: 16px 20px;
    border-left: 3px solid transparent;
    transition: background 0.2s ease;
}

.notification-item.unread {
    background: #f0f7ff;
    border-left-color: var(--primary);
}

.notification-item.read {
    background: white;
}

.notification-item:hover {
    background: #e9ecef;
}

.icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* ===== PROFILE ===== */
.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
}

.risk-index-display {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.risk-number-large {
    font-size: 3rem;
    font-weight: bold;
    line-height: 1;
}

/* ===== STATS ===== */
.stat-card {
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    margin: 0 auto 12px;
}

/* ===== PLAN CARDS ===== */
.plan-card {
    position: relative;
    overflow: hidden;
}

.current-plan-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: bold;
    border-bottom-left-radius: 8px;
}

.plan-price .amount {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.plan-price .period {
    color: #6c757d;
}

/* ===== CREDIT STATS ===== */
.credit-stat {
    transition: transform 0.2s ease;
}

.credit-stat:hover {
    transform: scale(1.05);
}

.credit-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary);
}

.credit-label {
    color: #6c757d;
}

/* ===== RISK COMPARE ===== */
.risk-compare-item {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.risk-compare-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
}

.risk-compare-value {
    font-size: 2.5rem;
    font-weight: bold;
}

.risk-compare-text {
    font-size: 0.85rem;
    color: #6c757d;
}

/* ===== UNLOCK MODAL ===== */
.unlock-icon {
    width: 80px;
    height: 80px;
    background: #e7f1ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.unlock-details {
    border: none;
}

/* ===== ADMIN ===== */
.admin-sidebar {
    min-height: 100vh;
    background: var(--primary);
    color: white;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    border-radius: 0;
    transition: all 0.2s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-sidebar .nav-link i {
    width: 24px;
}

.admin-content {
    background: var(--body-bg);
    min-height: 100vh;
}

/* ===== BADGES ===== */
.badge-success { background: #28a745 !important; }
.badge-info { background: #17a2b8 !important; }
.badge-warning { background: #ffc107 !important; color: #000 !important; }
.badge-danger { background: #dc3545 !important; }
.badge-dark { background: #343a40 !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .auth-card {
        padding: 24px;
    }

    .hero-content {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .risk-value {
        font-size: 3rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
