/* ==========================================
   XIANYU MARKETPLACE — DESIGN SYSTEM
   Dark premium theme + CSSBuy green accent
   ========================================== */

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2236;
    --bg-card-hover: #1f2a42;
    --bg-overlay: rgba(0, 0, 0, 0.7);
    --bg-glass: rgba(26, 34, 54, 0.85);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #6CBC2A;
    --accent-dark: #4a9e1a;
    --accent-glow: rgba(108, 188, 42, 0.25);
    --red: #ef4444;
    --red-soft: rgba(239, 68, 68, 0.15);
    --green-soft: rgba(108, 188, 42, 0.12);
    --border: rgba(148, 163, 184, 0.1);
    --border-hover: rgba(148, 163, 184, 0.2);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --transition: 0.2s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================
   HEADER
   ========================================== */
#header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
}

.logo h1 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.accent {
    color: var(--accent);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    transition: border-color var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent);
}

.search-box svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    width: 200px;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn-icon {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.btn-icon:hover {
    border-color: var(--accent);
    background: var(--bg-card);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-secondary:hover {
    border-color: var(--accent);
}

.btn-danger {
    background: var(--red-soft);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* ==========================================
   HERO
   ========================================== */
#hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border);
    padding: 60px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 100%, var(--accent-glow) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.hero-content p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 28px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
#mainContent {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px 60px;
}

.products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.products-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.filter-bar {
    display: flex;
    gap: 10px;
}

.filter-bar select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font);
    cursor: pointer;
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--accent);
}

/* ==========================================
   PRODUCTS GRID
   ========================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

/* ==========================================
   PRODUCT CARD
   ========================================== */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card .card-admin-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: none;
    color: var(--red);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.product-card .card-admin-delete:hover {
    background: var(--red);
    color: #fff;
}

body.admin-mode .product-card .card-admin-delete {
    display: flex;
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.card-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-muted);
}

.card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-prices {
    display: flex;
    gap: 16px;
    align-items: baseline;
}

.price-brl {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
}

.price-cny {
    font-size: 14px;
    color: var(--text-muted);
}

.card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.meta-tag {
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.meta-tag.condition {
    color: var(--accent);
    background: var(--green-soft);
}

.card-verdict {
    background: var(--green-soft);
    border: 1px solid rgba(108, 188, 42, 0.15);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.card-verdict strong {
    color: var(--accent);
}

.card-proscons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.proscons-col h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-weight: 700;
}

.proscons-col.pros h4 {
    color: var(--accent);
}

.proscons-col.cons h4 {
    color: var(--red);
}

.proscons-col ul {
    list-style: none;
    font-size: 12px;
    color: var(--text-secondary);
}

.proscons-col ul li {
    padding: 2px 0;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.proscons-col.pros ul li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 700;
}

.proscons-col.cons ul li::before {
    content: '✗';
    color: var(--red);
    font-weight: 700;
}

.card-footer {
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.card-date {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-cssbuy {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition);
}

.btn-cssbuy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

/* ==========================================
   LOADING / EMPTY STATES
   ========================================== */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 56px;
    display: block;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* ==========================================
   ADMIN PANEL
   ========================================== */
.admin-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.admin-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.admin-header h2,
.admin-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.admin-section {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.admin-section:last-child {
    border-bottom: none;
}

.admin-section h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
}

.admin-section label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
}

.input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.input-row input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: border-color var(--transition);
}

.input-row input:focus {
    border-color: var(--accent);
}

.small-input {
    max-width: 180px;
}

.hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.config-row {
    margin-bottom: 14px;
}

/* Toggle switch */
.toggle-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px !important;
    color: var(--text-primary) !important;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    position: relative;
    transition: all var(--transition);
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition);
}

.toggle-label input[type="checkbox"]:checked+.toggle-slider {
    background: var(--accent);
    border-color: var(--accent);
}

.toggle-label input[type="checkbox"]:checked+.toggle-slider::after {
    left: 23px;
    background: #fff;
}

/* Webhooks list */
.webhooks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.webhook-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.webhook-info {
    flex: 1;
    min-width: 0;
}

.webhook-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.webhook-url {
    font-size: 11px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.webhook-owner {
    font-size: 10px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Users list */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-id {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: monospace;
}

.user-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* User webhook panel */
.user-webhook-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 150;
    animation: slideUp 0.3s ease;
}

.webhook-panel-inner {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 400px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
    text-align: center;
    padding: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h2 {
        font-size: 28px;
    }

    .header-inner {
        padding: 0 16px;
    }

    .search-box input {
        width: 140px;
    }

    .admin-panel {
        width: 95%;
    }

    .webhook-panel-inner {
        width: 320px;
    }

    .card-proscons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .products-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .hero-stats {
        gap: 24px;
    }

    .input-row {
        flex-direction: column;
    }

    .small-input {
        max-width: 100%;
    }
}

/* ==========================================
   SCROLLBAR
   ========================================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 24px;
    font-size: 14px;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}

.toast.success {
    border-color: var(--accent);
}

.toast.error {
    border-color: var(--red);
}

@keyframes toastIn {
    from {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
}

@keyframes toastOut {
    to {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
}

/* ==========================================
   COMPACT CARDS (click to expand modal)
   ========================================== */
.product-card {
    cursor: pointer;
}

.product-card .card-body {
    padding: 14px 16px;
    gap: 8px;
}

.product-card .card-title {
    font-size: 14px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.product-card .card-footer {
    padding: 10px 16px;
}

.card-compact-tag {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================
   PRODUCT DETAIL MODAL
   ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: var(--bg-overlay);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
    padding: 20px;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
    position: relative;
}

.modal-close {
    position: sticky;
    top: 12px;
    float: right;
    margin: 12px 12px 0 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: none;
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--red);
}

.modal-image {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-image.no-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    background: var(--bg-card);
    color: var(--text-muted);
}

.modal-body-inner {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
}

.modal-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.modal-prices {
    display: flex;
    gap: 16px;
    align-items: baseline;
}

.modal-prices .price-brl {
    font-size: 28px;
}

.modal-prices .price-cny {
    font-size: 16px;
}

.modal-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.modal-verdict {
    background: var(--green-soft);
    border: 1px solid rgba(108, 188, 42, 0.2);
    border-radius: var(--radius);
    padding: 14px 18px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-verdict strong {
    color: var(--accent);
}

.modal-proscons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal-proscons .proscons-col ul {
    font-size: 13px;
}

.modal-proscons .proscons-col ul li {
    padding: 3px 0;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-footer .btn-cssbuy {
    padding: 12px 28px;
    font-size: 15px;
}

/* ==========================================
   DISCORD LOGIN
   ========================================== */
.btn-discord {
    background: #5865F2;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
}

.btn-discord:hover {
    background: #4752C4;
    transform: translateY(-1px);
}

.discord-user {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 10px 4px 4px;
}

.discord-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.discord-user span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-icon-sm {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
    transition: color var(--transition);
}

.btn-icon-sm:hover {
    color: var(--red);
}

.admin-section code {
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--accent);
}

/* ==========================================
   ROLES & INDICATED
   ========================================== */
.role-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 10px;
}

.role-badge.admin {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.role-badge.moderator {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.role-badge.curator {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

/* Indicated card glow */
.product-card.indicated {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.1);
}

.product-card.indicated-admin {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.15), 0 0 48px rgba(239, 68, 68, 0.05);
    animation: adminGlow 2s ease-in-out infinite alternate;
}

@keyframes adminGlow {
    from {
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.12);
    }

    to {
        box-shadow: 0 0 32px rgba(239, 68, 68, 0.25), 0 0 64px rgba(239, 68, 68, 0.08);
    }
}

.card-indicated {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #f59e0b;
    font-weight: 600;
    padding: 6px 0 0;
}

.card-indicated img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.modal-indicated {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
}

.modal-indicated img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.modal-indicated span {
    font-size: 13px;
    color: #f59e0b;
    font-weight: 600;
}

/* Modal action buttons */
.modal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-indicate {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-indicate:hover {
    background: rgba(245, 158, 11, 0.25);
}

.btn-indicate.active {
    background: #f59e0b;
    color: #000;
    border-color: #f59e0b;
}

.btn-delete-product {
    background: var(--red-soft);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-delete-product:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Roles list in admin */
.roles-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}

.role-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.role-item-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.role-item-id {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: monospace;
}

.role-item-name {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================
   ADMIN STATS DASHBOARD
   ========================================== */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    transition: all var(--transition);
}

.admin-stat-card:hover {
    border-color: var(--border-hover);
}

.admin-stat-card.online {
    border-color: rgba(34, 197, 94, 0.3);
}

.admin-stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.admin-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.admin-stat-card.online .admin-stat-value {
    color: #22c55e;
}

.admin-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 6px;
}

@media (max-width: 600px) {
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   PROFILE PANEL
   ========================================== */
.profile-panel {
    max-width: 720px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--accent);
}

.profile-info h2 {
    font-size: 20px;
    font-weight: 800;
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}

.profile-tabs .tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    padding: 14px 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.profile-tabs .tab:hover {
    color: var(--text-primary);
}

.profile-tabs .tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.profile-tabs .tab span {
    background: var(--bg-card);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
}

.profile-products {
    padding: 16px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    max-height: 60vh;
    overflow-y: auto;
}

.profile-product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
}

.profile-product-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.profile-product-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.profile-product-card .ppc-body {
    padding: 8px 10px;
}

.profile-product-card .ppc-title {
    font-size: 12px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profile-product-card .ppc-price {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent);
    margin-top: 4px;
}

/* ==========================================
   LIKE / SAVE BUTTONS
   ========================================== */
.card-actions {
    display: flex;
    gap: 6px;
    padding: 6px 0 0;
}

.btn-like,
.btn-save {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-like:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-save:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.btn-like.active {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #ef4444;
}

.btn-save.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #3b82f6;
}

.modal-like-save {
    display: flex;
    gap: 8px;
}

.modal-like-save .btn-like,
.modal-like-save .btn-save {
    padding: 8px 16px;
    font-size: 13px;
}

.curator-link {
    color: #f59e0b;
    cursor: pointer;
    text-decoration: underline;
    transition: opacity var(--transition);
}

.curator-link:hover {
    opacity: 0.8;
}

.profile-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}