:root {
    --primary-color: #4F46E5;
    --primary-light: #EEF2FF;
    --accent-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --text-color: #1F2937;
    --text-light: #6B7280;
    --background-color: #FFFFFF;
    --section-bg: #F9FAFB;
    --border-radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    --gradient-accent: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --brand-primary: #0d6efd;
    --brand-secondary: #6610f2;
    --brand-accent: #0dcaf0;
    --brand-success: #20c997;
    --text-primary: #1f2937;
    --text-muted: #6b7280;
    --card-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    --card-shadow-hover: 0 16px 40px rgba(15, 23, 42, 0.12);
    --border-radius-lg: 18px;
    --border-radius-md: 14px;
    --background-soft: #f5f7fb;
}

body {
    background-color: var(--background-soft);
    color: var(--text-primary);
}

.navbar {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-lg);
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-right: auto;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand img {
    height: 32px;
    width: auto;
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.navbar-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.navbar-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.navbar-link:hover::before {
    left: 100%;
}

.navbar-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar-link:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

.navbar-link.active {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

main.container {
    padding-top: 6.5rem;
    padding-bottom: 4rem;
}

.page-header {
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, rgba(13,110,253,0.95), rgba(102,16,242,0.9));
    color: #fff;
    overflow: hidden;
}

.page-header .display-6,
.page-header .lead {
    color: #ffffff !important;
}

.search-group .form-control {
    border-radius: 999px 0 0 999px;
    border: none;
    padding-left: 1.25rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
}

.search-group .btn {
    border-radius: 0 999px 999px 0;
    border: none;
    box-shadow: 0 6px 18px rgba(13, 110, 253, 0.25);
}

.filter-section {
    background: #fff;
    border-radius: var(--border-radius-md);
    padding: 1.1rem 1.5rem;
    box-shadow: 0 10px 30px rgba(148, 163, 184, 0.18);
}

.filter-label {
    font-weight: 600;
    color: var(--text-muted);
}

#categoryFilter .btn {
    border-radius: 999px;
    font-weight: 500;
    transition: all 0.2s ease;
}

#categoryFilter .btn:not(.active) {
    border-color: rgba(13, 110, 253, 0.3);
    color: var(--brand-primary);
    background: #f8fbff;
}

#categoryFilter .btn.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.form-select-sm {
    border-radius: 999px;
    padding-left: 1rem;
    border-color: rgba(148, 163, 184, 0.35);
}

.agents-grid {
    min-height: 240px;
}

.agent-card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    transition: all 0.25s ease;
}

.placeholder-card .agent-cover {
    width: 100%;
    height: 180px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(120deg, rgba(226, 232, 240, 0.7), rgba(200, 213, 233, 0.7));
    margin-bottom: 1.5rem;
}

.placeholder-glow .placeholder {
    display: inline-block;
    height: 1rem;
    border-radius: 999px;
}

.placeholder.tag-badge {
    height: 1.6rem;
    border-radius: 12px;
}

.placeholder-card .btn {
    pointer-events: none;
}

.agent-cover img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
}

.agent-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.agent-card .card-body {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.6rem;
}

.agent-category-badge {
    background: rgba(13, 110, 253, 0.12);
    color: var(--brand-primary);
    font-weight: 600;
    border-radius: 30px;
    padding: 0.35rem 0.8rem;
}

.price-badge {
    font-weight: 600;
    border-radius: 30px;
    padding: 0.35rem 0.8rem;
    background: rgba(32, 201, 151, 0.12);
    color: var(--brand-success);
}

.price-badge.paid {
    background: rgba(102, 16, 242, 0.12);
    color: var(--brand-secondary);
}

.agent-title {
    font-size: 1.15rem;
    font-weight: 600;
}

.agent-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
    min-height: 60px;
}

.agent-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag-badge {
    background: #eef2ff;
    color: var(--brand-secondary);
    border-radius: 12px;
    padding: 0.2rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 500;
}

.agent-meta {
    color: var(--text-muted);
}

.agent-meta i {
    color: rgba(13, 110, 253, 0.7);
}

.agent-card .btn {
    border-radius: 12px;
    font-weight: 600;
}

.agent-card .btn-outline-primary {
    border-width: 1.5px;
}

#loadingSpinner {
    display: none;
}

#emptyData {
    color: var(--text-muted);
}

#emptyData i {
    opacity: 0.3;
}

.toast {
    border-radius: var(--border-radius-md);
    border: none;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.2);
}

.toast .toast-header {
    border-bottom: none;
}

.modal-content {
    border-radius: 18px;
    border: none;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.15);
}

.modal-header {
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.modal-footer {
    border-top: 1px solid rgba(226, 232, 240, 0.7);
}

#adminPasswordError {
    font-size: 0.9rem;
    border-radius: 12px;
}

#qrCodeContainer canvas {
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

@media (max-width: 991.98px) {
    main.container {
        padding-top: 5.5rem;
    }

    .filter-section {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .filter-section .ms-auto {
        width: 100%;
        justify-content: flex-start !important;
    }

    .filter-section select {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .page-header {
        text-align: center;
    }

    .page-header .input-group {
        margin-top: 1rem;
    }

    .agent-card .btn {
        font-size: 0.95rem;
    }
}

