:root {
    --primary-color: #6C3CE1;
    --primary-dark: #5A2DCF;
    --primary-light: #8B5CF6;
    --secondary-color: #F59E0B;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --info-color: #3B82F6;
    --dark-color: #1F2937;
    --gray-color: #6B7280;
    --light-bg: #F3F4F6;
    --gradient-primary: linear-gradient(135deg, #6C3CE1 0%, #8B5CF6 100%);
    --gradient-hero: linear-gradient(135deg, #1F2937 0%, #6C3CE1 50%, #8B5CF6 100%);
}

* {
    font-family: 'Sarabun', sans-serif;
}

body {
    background-color: #f8f9fa;
    padding-top: 76px;
}

.main-content {
    min-height: 60vh;
}

.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-gradient-hero {
    background: var(--gradient-hero) !important;
}

.btn-primary {
    background: var(--gradient-primary) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(108, 60, 225, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 60, 225, 0.4);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 25px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.card-header {
    border-radius: 16px 16px 0 0 !important;
    border-bottom: none;
}

.hero-section {
    background: var(--gradient-hero);
    padding: 100px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(245, 158, 11, 0.08);
    border-radius: 50%;
}

.verified-badge {
    color: #3B82F6;
    font-size: 1.1em;
    vertical-align: middle;
}

.badge-level {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-level.bronze { background: #CD7F32; color: white; }
.badge-level.silver { background: #C0C0C0; color: #333; }
.badge-level.gold { background: #FFD700; color: #333; }
.badge-level.platinum { background: #E5E4E2; color: #333; }
.badge-level.diamond { background: linear-gradient(135deg, #B9F2FF, #00BFFF); color: #333; }

.friend-card {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.friend-card .card-img-top {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.friend-card .card-body {
    padding: 0.75rem;
}

.friend-card .card-body h6 {
    font-size: 0.85rem;
}

.friend-card .card-body small,
.friend-card .card-body .badge-level {
    font-size: 0.7rem;
}

.friend-card .rating-stars {
    font-size: 0.75rem;
}

.friend-card .card-body .text-primary.fw-bold {
    font-size: 0.8rem;
}

.friend-card .card-body .btn {
    font-size: 0.75rem;
    padding: 4px 12px;
}

.friend-card .friend-status {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.friend-card .friend-status.online {
    background: #10B981;
}

.friend-card .friend-status.offline {
    background: #9CA3AF;
}

.friend-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    margin-top: -50px;
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 15px;
    background: var(--gradient-primary);
    color: white;
}

.stat-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.stat-card .stat-number {
    font-size: 2em;
    font-weight: 700;
    color: var(--primary-color);
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 15px;
}

.search-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.1);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.form-control, .form-select {
    border-radius: 10px;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 60, 225, 0.15);
}

.btn {
    border-radius: 10px;
    padding: 10px 24px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-sm {
    padding: 6px 16px;
}

.btn-lg {
    padding: 14px 32px;
}

.rating-stars {
    color: #F59E0B;
}

.profile-header {
    background: var(--gradient-hero);
    padding: 60px 0 80px;
    color: white;
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--light-bg);
}

.auth-card {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0,0,0,0.1);
}

.auth-card .auth-sidebar {
    background: var(--gradient-hero);
    padding: 60px 30px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-card .auth-form {
    padding: 40px;
}

.table-custom th {
    background: var(--gradient-primary) !important;
    color: white !important;
    font-weight: 500;
}

.pagination .page-link {
    border-radius: 8px;
    margin: 0 3px;
    color: var(--primary-color);
    border: 1px solid #E5E7EB;
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
}

.modal-content {
    border-radius: 16px;
    border: none;
}

.toast-container {
    z-index: 9999;
}

.dropdown-menu {
    border-radius: 12px;
    border: none;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.notification-dropdown {
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
}

.admin-sidebar {
    background: var(--dark-color);
    min-height: 100vh;
    padding-top: 20px;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
    border-radius: 10px;
    margin: 2px 10px;
    transition: all 0.3s;
}

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

.admin-sidebar .nav-link.active {
    background: var(--gradient-primary);
    color: white;
}

.gallery-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.gallery-img:hover {
    transform: scale(1.05);
}

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

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

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    .hero-section h1 {
        font-size: 1.8rem;
    }
    .search-section {
        margin-top: -30px;
        padding: 20px;
    }
    .auth-card .auth-sidebar {
        display: none;
    }
    .profile-header {
        padding: 40px 0 60px;
    }
    .stat-card .stat-number {
        font-size: 1.5em;
    }
    .friend-avatar {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 66px;
    }
    .container {
        padding: 0 15px;
    }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4em;
    color: #D1D5DB;
    margin-bottom: 20px;
}

.progress-level {
    height: 10px;
    border-radius: 5px;
    background: #E5E7EB;
}

.progress-level .progress-bar {
    background: var(--gradient-primary);
    border-radius: 5px;
}

/* ========== PREMIUM HERO SLIDER ========== */
.hero-slider {
    height: calc(100vh - 76px);
    min-height: 500px;
    max-height: 750px;
}

.hero-slider .carousel-item {
    height: calc(100vh - 76px);
    min-height: 500px;
    max-height: 750px;
    position: relative;
    overflow: hidden;
}

.hero-slider .slide-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slider .slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-slider .carousel-caption {
    position: absolute;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    left: 10%;
    right: 10%;
    text-align: center;
}

.hero-slider .carousel-caption h1 {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.15);
    margin-bottom: 1rem;
}

.hero-slider .carousel-caption p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    text-shadow: 0 1px 10px rgba(0,0,0,0.1);
}

.hero-slider .carousel-caption .btn {
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.hero-slider .carousel-caption .btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
}

.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.15);
    font-size: 20px;
    opacity: 0;
    transition: all 0.4s;
}
.hero-slider:hover .carousel-control-prev,
.hero-slider:hover .carousel-control-next {
    opacity: 1;
}
.hero-slider .carousel-control-prev { left: 20px; }
.hero-slider .carousel-control-next { right: 20px; }

.hero-slider .carousel-indicators {
    bottom: 30px;
    gap: 8px;
}
.hero-slider .carousel-indicators button {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    border: none;
    background: rgba(255,255,255,0.4);
    transition: all 0.3s;
}
.hero-slider .carousel-indicators button.active {
    width: 60px;
    background: #fff;
}

/* Slide themes */
.slide-travel { background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 40%, #6C3CE1 100%); }
.slide-earn { background: linear-gradient(135deg, #0F172A 0%, #4C1D95 40%, #6C3CE1 100%); }
.slide-safe { background: linear-gradient(135deg, #0F172A 0%, #065F46 40%, #10B981 100%); }

.slide-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image: radial-gradient(circle at 25% 25%, white 1px, transparent 1px);
    background-size: 40px 40px;
}

.slide-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}
.slide-glow-1 { width: 500px; height: 500px; top: -100px; right: -100px; background: #8B5CF6; }
.slide-glow-2 { width: 400px; height: 400px; bottom: -80px; left: -80px; background: #F59E0B; }

/* ========== FLOATING SEARCH ========== */
.floating-search {
    margin-top: -50px;
    position: relative;
    z-index: 10;
    padding: 0 15px;
}

.floating-search .search-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    border: 1px solid rgba(255,255,255,0.5);
}

.floating-search .search-card .form-control,
.floating-search .search-card .form-select {
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 12px 16px;
    background: white;
    transition: all 0.3s;
}

.floating-search .search-card .form-control:focus,
.floating-search .search-card .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(108,60,225,0.1);
}

.floating-search .search-card .btn {
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
}

/* ========== STATS CARDS ========== */
.stat-card-modern {
    background: white;
    border-radius: 20px;
    padding: 32px 20px;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
}

.stat-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stat-card-modern:nth-child(1)::before { background: var(--gradient-primary); }
.stat-card-modern:nth-child(2)::before { background: linear-gradient(90deg, #10B981, #34D399); }
.stat-card-modern:nth-child(3)::before { background: linear-gradient(90deg, #3B82F6, #60A5FA); }
.stat-card-modern:nth-child(4)::before { background: linear-gradient(90deg, #F59E0B, #FBBF24); }

.stat-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.stat-card-modern .stat-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
}

.stat-card-modern .stat-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-card-modern .stat-label {
    font-size: 0.85rem;
    color: var(--gray-color);
    font-weight: 500;
}

/* ========== HOW IT WORKS ========== */
.step-card {
    background: white;
    border-radius: 20px;
    padding: 40px 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 20px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.4s;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.step-card .step-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    margin: 0 auto 20px;
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(108,60,225,0.25);
}

.step-card .step-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
}

.step-card h5 { font-size: 1.05rem; font-weight: 700; }
.step-card p { font-size: 0.88rem; color: var(--gray-color); margin: 0; }

.step-connector {
    display: none;
}
@media (min-width: 768px) {
    .step-connector {
        display: block;
        position: absolute;
        top: 52px;
        right: -30px;
        width: 60px;
        height: 2px;
        background: linear-gradient(90deg, var(--primary-color), transparent);
    }
}

/* ========== FEATURE CARDS ========== */
.feature-card-premium {
    background: white;
    border-radius: 20px;
    padding: 36px 24px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.4s;
    box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}

.feature-card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    border-color: rgba(108,60,225,0.1);
}

.feature-card-premium .feature-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
}

/* ========== SERVICE TYPE CARDS ========== */
.service-type-card {
    background: white;
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.service-type-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(108,60,225,0.12);
    border-color: var(--primary-color);
}

.service-type-card i {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 8px;
    transition: all 0.3s;
}

.service-type-card:hover i {
    transform: scale(1.15);
}

.service-type-card h6 {
    font-size: 0.85rem;
    font-weight: 600;
}

/* ========== CTA SECTION ========== */
.cta-premium {
    background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 40%, #6C3CE1 100%);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: radial-gradient(circle at 50% 50%, white 1px, transparent 1px);
    background-size: 30px 30px;
}

.cta-premium .btn {
    border-radius: 50px;
    padding: 14px 40px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .hero-slider { height: calc(100vh - 66px); min-height: 400px; max-height: 500px; }
    .hero-slider .carousel-item { height: calc(100vh - 66px); min-height: 400px; max-height: 500px; }
    .hero-slider .carousel-caption h1 { font-size: 1.8rem; }
    .hero-slider .carousel-caption p { font-size: 0.95rem; }
    .hero-slider .carousel-caption .btn { padding: 10px 24px; font-size: 0.9rem; }
    .hero-slider .carousel-control-prev,
    .hero-slider .carousel-control-next { display: none; }
    .floating-search .search-card { padding: 16px; }
    .stat-card-modern { padding: 24px 16px; }
    .stat-card-modern .stat-number { font-size: 1.5rem; }
    .cta-premium { padding: 40px 20px; border-radius: 16px; }
}

/* ========== ADMIN PANEL ULTRA MODERN ========== */
:root {
    --admin-sidebar: #0f1535;
    --admin-sidebar-hover: #1a2355;
    --admin-card: #ffffff;
    --admin-bg: #f0f2f8;
    --admin-primary: #6C3CE1;
    --admin-success: #10B981;
    --admin-warning: #F59E0B;
    --admin-danger: #EF4444;
    --admin-info: #3B82F6;
    --admin-text: #1F2937;
    --admin-text-light: #6B7280;
    --admin-border: #E5E7EB;
}

.admin-wrapper {
    display: flex;
    min-height: calc(100vh - 76px);
    background: var(--admin-bg);
    position: relative;
}

.admin-footer {
    background: #0a1628;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 16px 0;
    margin-left: 270px;
    transition: margin-left 0.3s ease;
}
@media (max-width: 991px) {
    .admin-footer {
        margin-left: 0 !important;
    }
}

.admin-mobile-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--admin-primary);
    color: #fff;
    border: none;
    font-size: 20px;
    box-shadow: 0 4px 20px rgba(108, 60, 225, 0.4);
    z-index: 1060;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.admin-mobile-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(108, 60, 225, 0.5);
}
.admin-mobile-toggle:active {
    transform: scale(0.95);
}

@media (max-width: 991px) {
    .admin-mobile-toggle {
        display: flex !important;
    }
}

/* SIDEBAR */
.admin-sidebar {
    width: 270px;
    background: var(--admin-sidebar);
    position: fixed;
    top: 76px;
    left: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

.admin-sidebar::-webkit-scrollbar {
    width: 4px;
}
.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.admin-sidebar .sidebar-brand {
    padding: 20px 20px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}

.admin-sidebar .sidebar-brand h5 {
    color: #fff;
    font-weight: 700;
    margin: 0;
}

.sidebar-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}
.sidebar-close-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

@media (max-width: 991px) {
    .sidebar-close-btn {
        display: block;
    }
}

.admin-sidebar .sidebar-brand small {
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.admin-sidebar .sidebar-section {
    padding: 15px 20px 5px;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
    font-weight: 600;
}

.admin-sidebar .nav-item {
    margin: 2px 10px;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.55) !important;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.admin-sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.admin-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9) !important;
    transform: translateX(3px);
}

.admin-sidebar .nav-link.active {
    background: var(--admin-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(108, 60, 225, 0.4);
}

.admin-sidebar .nav-link .badge {
    margin-left: auto;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* MAIN CONTENT AREA */
.admin-content {
    flex: 1;
    margin-left: 270px;
    padding: 25px 30px;
    min-height: calc(100vh - 76px);
}

.admin-content .page-header {
    margin-bottom: 25px;
}

.admin-content .page-header h4 {
    font-weight: 700;
    color: var(--admin-text);
    margin: 0;
}

.admin-content .page-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 5px 0 0;
    font-size: 13px;
}

.admin-content .page-header .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #9CA3AF;
}

/* STAT CARDS MODERN */
.admin-stat-card {
    background: var(--admin-card);
    border-radius: 16px;
    padding: 22px 24px;
    border: 1px solid var(--admin-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.admin-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.admin-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.admin-stat-card .stat-icon.primary { background: rgba(108,60,225,0.12); color: var(--admin-primary); }
.admin-stat-card .stat-icon.success { background: rgba(16,185,129,0.12); color: var(--admin-success); }
.admin-stat-card .stat-icon.warning { background: rgba(245,158,11,0.12); color: var(--admin-warning); }
.admin-stat-card .stat-icon.danger { background: rgba(239,68,68,0.12); color: var(--admin-danger); }
.admin-stat-card .stat-icon.info { background: rgba(59,130,246,0.12); color: var(--admin-info); }

.admin-stat-card .stat-number {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 4px;
}

.admin-stat-card .stat-label {
    font-size: 13px;
    color: var(--admin-text-light);
    font-weight: 500;
}

.admin-stat-card .stat-change {
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.admin-stat-card .stat-change.up { color: var(--admin-success); }
.admin-stat-card .stat-change.down { color: var(--admin-danger); }

.admin-stat-card .stat-bg-icon {
    position: absolute;
    right: -5px;
    bottom: -5px;
    font-size: 60px;
    opacity: 0.04;
    color: var(--admin-text);
}

/* CARDS MODERN */
.admin-card {
    background: var(--admin-card);
    border-radius: 16px;
    border: 1px solid var(--admin-border);
    overflow: hidden;
    transition: all 0.3s ease;
}

.admin-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.admin-card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--admin-border);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card .card-header h6 {
    font-weight: 700;
    margin: 0;
    font-size: 15px;
}

.admin-card .card-body {
    padding: 24px;
}

/* TABLES MODERN */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table thead th {
    background: #F9FAFB;
    color: var(--admin-text-light);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 2px solid var(--admin-border);
    white-space: nowrap;
}

.admin-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #F3F4F6;
    font-size: 14px;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: #FAFBFF;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table .user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-table .user-cell img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.admin-table .user-cell .user-info {
    line-height: 1.3;
}

.admin-table .user-cell .user-info .name {
    font-weight: 600;
    font-size: 14px;
}

.admin-table .user-cell .user-info .email {
    font-size: 12px;
    color: var(--admin-text-light);
}

/* BADGES MODERN */
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.admin-badge-success { background: #D1FAE5; color: #065F46; }
.admin-badge-warning { background: #FEF3C7; color: #92400E; }
.admin-badge-danger { background: #FEE2E2; color: #991B1B; }
.admin-badge-info { background: #DBEAFE; color: #1E40AF; }
.admin-badge-secondary { background: #F3F4F6; color: #4B5563; }
.admin-badge-primary { background: #EDE9FE; color: #5B21B6; }

/* BUTTON MODERN */
.admin-btn {
    padding: 8px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    border: none;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.admin-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

.admin-btn-primary { background: var(--admin-primary); color: #fff; }
.admin-btn-success { background: var(--admin-success); color: #fff; }
.admin-btn-warning { background: var(--admin-warning); color: #fff; }
.admin-btn-danger { background: var(--admin-danger); color: #fff; }
.admin-btn-info { background: var(--admin-info); color: #fff; }
.admin-btn-outline { background: transparent; border: 2px solid var(--admin-border); color: var(--admin-text); }
.admin-btn-outline:hover { border-color: var(--admin-primary); color: var(--admin-primary); }

.admin-btn-sm { padding: 5px 12px; font-size: 12px; }
.admin-btn-lg { padding: 12px 28px; font-size: 15px; }

/* FORM MODERN */
.admin-form-control {
    border-radius: 10px;
    padding: 10px 16px;
    border: 2px solid var(--admin-border);
    font-size: 14px;
    transition: all 0.25s;
    width: 100%;
    background: #fff;
}

.admin-form-control:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(108,60,225,0.1);
    outline: none;
}

.admin-form-select {
    border-radius: 10px;
    padding: 10px 16px;
    border: 2px solid var(--admin-border);
    font-size: 14px;
    background: #fff;
    transition: all 0.25s;
    cursor: pointer;
}

/* SEARCH BAR */
.admin-search {
    position: relative;
}

.admin-search input {
    padding-left: 40px;
    border-radius: 10px;
    border: 2px solid var(--admin-border);
    padding: 10px 16px 10px 40px;
    width: 280px;
    font-size: 14px;
    transition: all 0.3s;
    background: #fff;
}

.admin-search input:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(108,60,225,0.1);
    outline: none;
    width: 320px;
}

.admin-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--admin-text-light);
}

/* TOGGLE SWITCH MODERN */
.admin-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.admin-toggle input { opacity: 0; width: 0; height: 0; }

.admin-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #D1D5DB;
    transition: 0.3s;
    border-radius: 24px;
}

.admin-toggle .slider:before {
    content: "";
    position: absolute;
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

.admin-toggle input:checked + .slider { background: var(--admin-primary); }
.admin-toggle input:checked + .slider:before { transform: translateX(20px); }

/* KYC VERIFICATION CARDS */
.kyc-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--admin-border);
    overflow: hidden;
    transition: all 0.3s;
}

.kyc-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.kyc-card .kyc-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--admin-border);
}

.kyc-card .kyc-body {
    padding: 20px;
}

.kyc-card .kyc-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.kyc-card .kyc-images img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.kyc-card .kyc-images img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.kyc-card .kyc-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

/* CHAT */
.chat-sidebar {
    width: 320px;
    background: #fff;
    border-right: 1px solid var(--admin-border);
    height: 600px;
    overflow-y: auto;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #F9FAFB;
}

.chat-msg {
    max-width: 70%;
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}

.chat-msg.sent {
    background: var(--admin-primary);
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
    animation: msgIn 0.2s ease-out;
}

.chat-msg.received {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-bottom-left-radius: 4px;
    animation: msgIn 0.2s ease-out;
}

.chat-msg a img:hover {
    opacity: 0.9;
    transform: scale(1.02);
    transition: all 0.2s;
}

.chat-input-area .btn-outline-secondary {
    padding: 6px 10px;
    font-size: 14px;
}

#uploadPreview {
    border-bottom: 1px solid var(--admin-border);
    background: #FAFBFF;
}

#locationBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.chat-msg .msg-time {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 5px;
    display: block;
}

.chat-input-area {
    padding: 15px 20px;
    background: #fff;
    border-top: 1px solid var(--admin-border);
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    border-radius: 10px;
    border: 2px solid var(--admin-border);
    padding: 10px 16px;
    font-size: 14px;
}

.chat-input-area input:focus {
    border-color: var(--admin-primary);
    outline: none;
}

/* RESPONSIVE ADMIN */
@media (max-width: 991px) {
    .admin-wrapper {
        position: relative;
        overflow-x: hidden;
    }
    .admin-sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 1050;
        box-shadow: 4px 0 30px rgba(0,0,0,0.3);
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.6);
        z-index: 1049;
        backdrop-filter: blur(4px);
    }
    .sidebar-overlay.open {
        display: block !important;
    }
    .admin-content {
        margin-left: 0 !important;
        padding: 15px 12px;
        width: 100%;
    }
    .admin-content .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }
    .admin-search input {
        width: 160px;
    }
    .admin-search input:focus {
        width: 200px;
    }
    .kyc-card .kyc-images {
        grid-template-columns: 1fr;
    }
    .chat-sidebar {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #E5E7EB;
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 12px !important;
    }
    .admin-stat-card {
        padding: 15px 16px !important;
    }
    .admin-stat-card .stat-number {
        font-size: 20px;
    }
    .admin-table thead th,
    .admin-table tbody td {
        padding: 8px 10px;
        font-size: 12px;
    }
    .admin-table .user-cell img {
        width: 28px;
        height: 28px;
    }
    .admin-card .card-header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .admin-card .card-body {
        padding: 16px;
    }
    .sidebar-brand h5 {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .admin-sidebar {
        width: 260px;
    }
    .admin-content {
        padding: 10px !important;
    }
    .admin-table {
        font-size: 12px;
    }
    .admin-table thead th,
    .admin-table tbody td {
        padding: 6px 8px;
        font-size: 11px;
        white-space: normal;
    }
    .admin-stat-card .stat-number {
        font-size: 18px;
    }
    .admin-search input {
        width: 130px;
        font-size: 13px;
    }
    .admin-search input:focus {
        width: 160px;
    }
    .row.g-4 > [class*="col-"] {
        padding: 0 6px;
    }
    .row.g-3 > [class*="col-"] {
        padding: 0 6px;
    }
}

/* TIMELINE */
.admin-timeline {
    position: relative;
    padding-left: 30px;
}

.admin-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--admin-border);
}

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

.admin-timeline .timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--admin-primary);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--admin-primary);
}

.admin-timeline .timeline-item .time {
    font-size: 12px;
    color: var(--admin-text-light);
    margin-bottom: 2px;
}

/* Chat: Context Menu */
.context-menu {
    position: fixed;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 9999;
    min-width: 160px;
    padding: 4px;
}
.context-menu-item {
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
}
.context-menu-item:hover {
    background: #F3F4F6;
}
.context-menu-item.text-danger:hover {
    background: #FEF2F2;
}

/* Chat: Reply Preview (shown after new message, text-muted) */
.reply-preview {
    border-top: 1px solid rgba(255,255,255,0.25);
    padding-top: 4px;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.3;
}
.chat-msg.sent .reply-preview {
    color: rgba(255,255,255,0.65) !important;
}
.chat-msg.received .reply-preview {
    border-top-color: #D1D5DB;
    color: #6B7280 !important;
}

/* Chat: Edited badge */
.edited-badge {
    font-size: 9px;
    opacity: 0.5;
    font-style: italic;
}

/* Chat: Edit input */
.edit-input-wrap {
    padding: 2px 0;
}
.edit-input-wrap .edit-input {
    font-size: 14px;
    border: 2px solid #3B82F6;
    border-radius: 8px;
    padding: 6px 10px;
}

/* Swipe indicator */
.msg-wrapper {
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}
.msg-wrapper.swiping {
    transition: transform 0.1s;
}

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

/* Chat: Search Results */
.search-group-header {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s;
    color: var(--admin-primary);
}
.search-group-header:hover {
    background: #EFF6FF;
}
.search-result-item {
    padding: 6px 12px 6px 28px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 13px;
    transition: background 0.15s;
    border-left: 2px solid transparent;
}
.search-result-item:hover {
    background: #F9FAFB;
    border-left-color: var(--admin-primary);
}
.search-result-item mark {
    background: #FEF08A;
    border-radius: 2px;
    padding: 0 2px;
}

/* CHART PLACEHOLDER */
.chart-placeholder {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    border-radius: 12px;
    color: #D1D5DB;
    font-size: 14px;
}
