/* === GorevBul Design System === */
:root {
    --primary: #5B21B6;
    --primary-mid: #7C3AED;
    --primary-light: #A78BFA;
    --secondary: #0EA5E9;
    --accent: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --dark: #0F172A;
    --dark-mid: #1E293B;
    --dark-soft: #334155;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-700: #334155;
    --gray-900: #0F172A;
    --gradient-1: linear-gradient(135deg, #5B21B6 0%, #7C3AED 50%, #A855F7 100%);
    --gradient-2: linear-gradient(135deg, #0EA5E9 0%, #6366F1 100%);
    --gradient-3: linear-gradient(135deg, #10B981 0%, #0EA5E9 100%);
    --gradient-dark: linear-gradient(135deg, #0F172A 0%, #1E293B 60%, #312E81 100%);
    --gradient-warm: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 32px rgba(91,33,182,0.12), 0 4px 8px rgba(0,0,0,0.06);
    --shadow-xl: 0 24px 64px rgba(91,33,182,0.15), 0 8px 16px rgba(0,0,0,0.08);
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #F0F4FF;
    color: var(--gray-900);
    line-height: 1.65;
}

/* === NAVBAR === */
.bg-gradient-primary { background: var(--gradient-1) !important; }

.navbar {
    padding: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.navbar .container { padding-top: 0; padding-bottom: 0; }

.navbar-brand {
    font-size: 1.45rem !important;
    font-weight: 800;
    letter-spacing: -0.5px;
    padding: 1rem 0;
}

.navbar .nav-link {
    font-weight: 500;
    font-size: 0.88rem;
    padding: 1.1rem 0.9rem !important;
    transition: color 0.2s;
    white-space: nowrap;
}

.navbar .nav-link:hover { color: rgba(255,255,255,0.85) !important; }

/* Mega / Dropdown menu */
.navbar .dropdown-menu {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    padding: 0.75rem;
    min-width: 220px;
    animation: dropDown 0.18s ease;
}

.navbar .dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar .dropdown-item:hover {
    background: rgba(91,33,182,0.07);
    color: var(--primary);
}

.navbar .dropdown-divider { margin: 0.5rem 0; }

/* Mega menu wide */
.mega-menu {
    width: 560px;
    padding: 1.25rem;
}

.mega-menu .mega-col-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-400);
    padding: 0 0.5rem 0.5rem;
    margin-bottom: 0.25rem;
}

.mega-menu .mega-cat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
}

@keyframes dropDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.avatar-sm {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; color: white;
    flex-shrink: 0;
}

/* === HERO === */
.hero-section {
    background: var(--gradient-1);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M50 50v-8h-4v8h-8v4h8v8h4v-8h8v-4h-8zm0-42V0h-4v8h-8v4h8v8h4V12h8V8h-8zM8 50v-8H4v8H0v4h4v8h4v-8h8v-4H8zM8 8V0H4v8H0v4h4v8h4V12h8V8H8z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-section .container { position: relative; z-index: 1; }

.hero-section h1 {
    font-size: 3.8rem; font-weight: 800;
    letter-spacing: -1.5px; line-height: 1.08;
}

.hero-section p.lead { font-size: 1.2rem; opacity: 0.88; }

.hero-stats { display: flex; gap: 2.5rem; margin-top: 2.5rem; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat .stat-number { font-size: 2.2rem; font-weight: 800; color: white; }
.hero-stat .stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.65); text-transform: uppercase; letter-spacing: 0.5px; }

.carousel-item .hero-section { min-height: 520px; display: flex; align-items: center; }
.carousel-indicators button { width: 10px; height: 10px; border-radius: 50%; }

.btn-hero {
    padding: 0.9rem 2.5rem;
    font-weight: 700; font-size: 1rem;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    border: 2px solid transparent;
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* === BUTTONS === */
.btn-primary-custom {
    background: var(--gradient-1);
    color: white; border: none;
    padding: 0.6rem 1.6rem;
    border-radius: var(--radius-sm); font-weight: 600;
    transition: all 0.25s cubic-bezier(.4,0,.2,1);
    letter-spacing: 0.1px;
}
.btn-primary-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(91,33,182,0.35);
    color: white;
}

/* === SECTIONS === */
.section-title {
    font-size: 2.1rem; font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}
.section-subtitle { color: var(--gray-500); font-size: 1.05rem; margin-bottom: 2.5rem; }

/* === CATEGORY CARDS === */
.category-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.25s cubic-bezier(.4,0,.2,1);
    border: 1.5px solid var(--gray-200);
    cursor: pointer; text-decoration: none; color: inherit; display: block;
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
    color: inherit;
}
.category-icon {
    width: 64px; height: 64px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; margin: 0 auto 1rem;
    background: linear-gradient(135deg, rgba(91,33,182,0.08) 0%, rgba(168,85,247,0.12) 100%);
    color: var(--primary-mid);
    transition: transform 0.25s;
}
.category-card:hover .category-icon { transform: scale(1.1) rotate(-5deg); }
.category-card h6 { font-weight: 700; margin-bottom: 0.2rem; font-size: 0.92rem; }
.category-card small { color: var(--gray-400); font-size: 0.78rem; }

/* === TASK CARDS === */
.task-card {
    background: white;
    border-radius: var(--radius);
    border: 1.5px solid var(--gray-200);
    transition: all 0.25s cubic-bezier(.4,0,.2,1);
    overflow: hidden; height: 100%;
}
.task-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.task-card .card-body { padding: 1.5rem; }
.task-card .task-reward { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.task-category {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 20px; font-size: 0.72rem; font-weight: 600;
    background: rgba(91,33,182,0.08); color: var(--primary-mid);
}
.task-meta {
    display: flex; gap: 1rem;
    color: var(--gray-400); font-size: 0.82rem;
    margin-top: 1rem; padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
    flex-wrap: wrap;
}
.task-card .card-title { font-weight: 700; font-size: 1.05rem; color: var(--gray-900); margin-bottom: 0.5rem; }
.task-card .card-text {
    color: var(--gray-500); font-size: 0.875rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* === BADGES === */
.badge-status {
    padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.2px;
}
.badge-active    { background: rgba(16,185,129,0.1);  color: #059669; }
.badge-completed { background: rgba(91,33,182,0.1);   color: var(--primary-mid); }
.badge-pending   { background: rgba(245,158,11,0.12); color: #D97706; }
.badge-rejected  { background: rgba(239,68,68,0.1);   color: #DC2626; }
.badge-cancelled { background: rgba(100,116,139,0.1); color: var(--gray-500); }

/* === FEATURES === */
.features-section { padding: 5rem 0; background: white; }
.feature-card { text-align: center; padding: 2.5rem 2rem; border-radius: var(--radius); transition: all 0.25s; }
.feature-card:hover { background: var(--gray-50); transform: translateY(-4px); }
.feature-icon {
    width: 72px; height: 72px; border-radius: 22px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.9rem; margin: 0 auto 1.5rem; transition: all 0.3s;
}
.feature-card:hover .feature-icon { transform: scale(1.12) rotate(6deg); }
.feature-card h5 { font-weight: 700; margin-bottom: 0.75rem; }
.feature-card p { color: var(--gray-500); font-size: 0.9rem; line-height: 1.7; }

/* === STATS SECTION === */
.stats-section { background: var(--gradient-dark); padding: 5rem 0; color: white; position: relative; overflow: hidden; }
.stats-section::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(91,33,182,0.3) 0%, transparent 60%),
                radial-gradient(circle at 80% 50%, rgba(14,165,233,0.2) 0%, transparent 60%);
}
.stats-section .container { position: relative; }
.stat-box { text-align: center; }
.stat-box .display-4 { font-weight: 800; letter-spacing: -1px; }
.stat-box p { opacity: 0.7; font-size: 1rem; margin-top: 0.25rem; }

/* === DASHBOARD CARDS === */
.dashboard-card {
    background: white;
    border-radius: var(--radius);
    border: 1.5px solid var(--gray-200);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}
.dashboard-card:hover { box-shadow: var(--shadow); }
.dashboard-card .card-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.dashboard-card h3 { font-weight: 800; font-size: 1.9rem; margin: 0.5rem 0 0.2rem; letter-spacing: -0.5px; }
.dashboard-card p { color: var(--gray-500); margin: 0; font-size: 0.88rem; }

/* === PAGE HEADER === */
.page-header {
    background: var(--gradient-dark);
    padding: 2.5rem 0;
    color: white;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 70% 50%, rgba(91,33,182,0.4) 0%, transparent 70%);
}
.page-header .container { position: relative; }
.page-header h2 { font-weight: 800; margin-bottom: 0.4rem; font-size: 1.8rem; letter-spacing: -0.5px; }
.page-header .breadcrumb-item a { color: rgba(255,255,255,0.6); text-decoration: none; }
.page-header .breadcrumb-item.active { color: rgba(255,255,255,0.9); }

/* === AUTH === */
.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 3rem 2.5rem;
    max-width: 460px;
    margin: 3rem auto;
    border: 1px solid var(--gray-100);
}
.auth-card h3 { font-weight: 800; text-align: center; margin-bottom: 0.25rem; letter-spacing: -0.5px; }
.auth-card .auth-subtitle { text-align: center; color: var(--gray-500); margin-bottom: 2rem; font-size: 0.9rem; }

/* === FORMS === */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--gray-200);
    padding: 0.7rem 1rem;
    transition: all 0.2s;
    background: var(--gray-50);
    font-size: 0.9rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-mid);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
    background: white;
}
.form-label { font-weight: 600; color: var(--gray-700); font-size: 0.85rem; margin-bottom: 0.4rem; }

/* === TABLES === */
.table-custom { border-radius: var(--radius); overflow: hidden; }
.table-custom thead { background: var(--gray-50); border-bottom: 2px solid var(--gray-200); }
.table-custom thead th {
    font-weight: 700; font-size: 0.75rem;
    color: var(--gray-500); text-transform: uppercase;
    letter-spacing: 0.8px; border: none; padding: 0.9rem 1rem;
}
.table-custom tbody td { padding: 0.9rem 1rem; vertical-align: middle; border-color: var(--gray-100); }
.table-custom tbody tr:hover { background: var(--gray-50); }

/* === ADMIN SIDEBAR === */
.sidebar-admin {
    background: white;
    border-radius: var(--radius);
    border: 1.5px solid var(--gray-200);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.sidebar-admin .nav-link {
    padding: 0.85rem 1.25rem; color: var(--gray-700); font-weight: 600;
    border-left: 3px solid transparent; transition: all 0.2s;
    font-size: 0.88rem;
}
.sidebar-admin .nav-link:hover,
.sidebar-admin .nav-link.active {
    background: rgba(91,33,182,0.06); color: var(--primary-mid); border-left-color: var(--primary-mid);
}
.sidebar-admin .nav-link i { width: 20px; }

/* === FOOTER === */
.footer-section { background: var(--gray-900); color: white; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a {
    color: rgba(255,255,255,0.5); text-decoration: none; transition: color 0.2s;
    font-size: 0.88rem;
}
.footer-links a:hover { color: white; }
.footer-links li { color: rgba(255,255,255,0.5); font-size: 0.88rem; }
.social-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: rgba(255,255,255,0.08); display: flex; align-items: center;
    justify-content: center; color: rgba(255,255,255,0.7);
    text-decoration: none; transition: all 0.25s; font-size: 0.9rem;
}
.social-icon:hover { background: var(--primary-mid); color: white; transform: translateY(-2px); }

/* === MISC === */
.empty-state { text-align: center; padding: 3rem; color: var(--gray-400); }
.empty-state i { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.25; display: block; }
.empty-state h5 { font-weight: 700; color: var(--gray-500); }

.task-detail-sidebar {
    background: white; border-radius: var(--radius);
    border: 1.5px solid var(--gray-200); padding: 1.5rem;
    position: sticky; top: 80px;
    box-shadow: var(--shadow-sm);
}

/* === PROFILE PAGE === */
.profile-hero {
    background: var(--gradient-dark);
    padding: 3rem 0 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}
.profile-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(91,33,182,0.5) 0%, transparent 70%),
                radial-gradient(circle at 75% 20%, rgba(14,165,233,0.3) 0%, transparent 60%);
}
.profile-hero .container { position: relative; }

.profile-avatar-ring {
    width: 110px; height: 110px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.8rem; font-weight: 800; color: white;
    border: 4px solid rgba(255,255,255,0.3);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.profile-stat-pill {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    text-align: center;
    backdrop-filter: blur(8px);
    min-width: 90px;
}
.profile-stat-pill .psp-value { font-size: 1.4rem; font-weight: 800; color: white; line-height: 1.2; }
.profile-stat-pill .psp-label { font-size: 0.72rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 0.2rem; }

.profile-tabs-bar {
    background: white;
    border-bottom: 2px solid var(--gray-200);
    padding: 0 1.5rem;
}
.profile-tabs-bar .nav-link {
    padding: 1rem 1.25rem;
    font-weight: 600; font-size: 0.88rem;
    color: var(--gray-500);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    border-radius: 0;
}
.profile-tabs-bar .nav-link.active,
.profile-tabs-bar .nav-link:hover { color: var(--primary-mid); border-bottom-color: var(--primary-mid); }

.achievement-badge {
    background: linear-gradient(135deg, rgba(245,158,11,0.1) 0%, rgba(239,68,68,0.08) 100%);
    border: 1.5px solid rgba(245,158,11,0.25);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
}
.achievement-badge:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.achievement-badge i { font-size: 1.8rem; color: var(--warning); }
.achievement-badge h6 { font-size: 0.82rem; font-weight: 700; margin: 0.5rem 0 0.2rem; color: var(--gray-700); }
.achievement-badge p { font-size: 0.72rem; color: var(--gray-400); margin: 0; }

.star-rating { color: #F59E0B; letter-spacing: 1px; font-size: 0.9rem; }
.star-empty  { color: var(--gray-300); }

/* === LEADERBOARD === */
.podium-1 { background: linear-gradient(135deg, #FFF7ED 0%, #FEF3C7 100%); border: 2px solid #FCD34D; }
.podium-2 { background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%); border: 1.5px solid #CBD5E1; }
.podium-3 { background: linear-gradient(135deg, #FFF7F5 0%, #FEF2ED 100%); border: 1.5px solid #FCA9A9; }

/* === ANIMATIONS === */
.animate-fade-in { animation: fadeInUp 0.5s ease both; }

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

.card-hover-lift { transition: all 0.25s cubic-bezier(.4,0,.2,1); }
.card-hover-lift:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.progress-custom { height: 8px; border-radius: 4px; background: var(--gray-100); }
.progress-custom .progress-bar { border-radius: 4px; background: var(--gradient-1); }

/* === TASK DETAIL COMMENTS FIX === */
.task-content-area { min-height: 200px; }
.comment-bubble {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: background 0.15s;
}
.comment-bubble:hover { background: var(--gray-100); }

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .mega-menu { width: 100%; }
}
@media (max-width: 768px) {
    .hero-section h1 { font-size: 2.4rem; }
    .hero-stats { gap: 1.5rem; }
    .hero-section { padding: 3.5rem 0; }
    .auth-card { padding: 2rem 1.5rem; margin: 1.5rem auto; }
    .profile-hero { padding: 2rem 0 0; }
    .profile-avatar-ring { width: 80px; height: 80px; font-size: 2rem; }
    .task-detail-sidebar { position: static; }
}

/* === GLASS EFFECT === */
.glass-card {
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--radius);
}

/* === NOTIFICATION BELL === */
.notif-badge {
    position: absolute; top: 4px; right: 4px;
    width: 10px; height: 10px;
    background: #EF4444; border-radius: 50%;
    border: 2px solid transparent;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* === STATIC PAGES === */
.static-page-content {
    max-width: 820px; margin: 0 auto;
    background: white; border-radius: var(--radius);
    padding: 2.5rem 3rem;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--gray-200);
}
.static-page-content h2 { font-weight: 800; color: var(--gray-900); margin-top: 2rem; margin-bottom: 1rem; font-size: 1.4rem; }
.static-page-content h2:first-child { margin-top: 0; }
.static-page-content p, .static-page-content li { color: var(--gray-500); line-height: 1.8; }

@media (max-width: 640px) {
    .static-page-content { padding: 1.5rem; }
}
