/* EvoMotors Premium Stylesheet */
:root {
    --primary-yellow: #f5c518;
    --primary-yellow-hover: #dfb10f;
    --bg-dark: #0a0a0c;
    --bg-card: #141418;
    --bg-input: #1b1b22;
    --text-light: #f3f4f6;
    --text-muted: #9ca3af;
    --border-color: #2e2e38;
    --accent-red: #ef4444;
    --accent-green: #10b981;
    --font-outfit: 'Outfit', sans-serif;
    --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.5);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-outfit);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header Styles */
.main-header {
    background-color: rgba(10, 10, 12, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    cursor: pointer;
}

.logo-evo {
    color: var(--text-light);
}

.logo-motors {
    color: var(--primary-yellow);
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-yellow);
    background-color: rgba(245, 197, 24, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    font-family: var(--font-outfit);
    font-weight: 600;
    padding: 0.6rem 1.3rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-yellow);
    color: #000;
}

.btn-primary:hover {
    background-color: var(--primary-yellow-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-yellow);
}

.btn-dark {
    background-color: #2e2e38;
    color: var(--text-light);
}

.btn-dark:hover {
    background-color: #3f3f4d;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* User Profile in Header */
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(245, 197, 24, 0.2);
}

#user-display-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-yellow);
}

.btn-logout {
    background: none;
    border: none;
    color: var(--accent-red);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.btn-logout:hover {
    transform: scale(1.1);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: linear-gradient(rgba(10, 10, 12, 0.8), rgba(10, 10, 12, 0.9)), url('https://images.unsplash.com/photo-1617814076367-b759c7d7e738?q=80&w=1200&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    border-bottom: 2px solid var(--primary-yellow);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 1.5rem;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(245, 197, 24, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge i {
    color: var(--primary-yellow);
}

/* Main Content Layout */
.main-content {
    max-width: 1300px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-yellow);
    border-radius: 2px;
}

.search-bar-container {
    position: relative;
    width: 300px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

#search-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    border-radius: 8px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    font-family: var(--font-outfit);
    outline: none;
    transition: var(--transition-smooth);
}

#search-input:focus {
    border-color: var(--primary-yellow);
    box-shadow: 0 0 10px rgba(245, 197, 24, 0.15);
}

/* Catalog Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* Product Card */
.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-yellow);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.product-image-wrapper {
    position: relative;
    height: 200px;
    width: 100%;
    background-color: #000;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.card-badges-left {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 0.4rem;
    z-index: 5;
}

.category-tag {
    background-color: rgba(0, 0, 0, 0.75);
    border: 1px solid var(--primary-yellow);
    color: var(--primary-yellow);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.product-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-yellow);
}

/* Modals Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    padding: 2rem;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-premium);
}

.modal-overlay.open .modal-card {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: var(--accent-red);
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Form Styles */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 8px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: #fff;
    font-family: var(--font-outfit);
    outline: none;
    transition: var(--transition-smooth);
}

.input-wrapper input:focus {
    border-color: var(--primary-yellow);
}

.error-message {
    color: var(--accent-red);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

/* Admin Panel Special Modal style */
.admin-card {
    max-width: 950px;
    width: 95%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-header-admin {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.modal-header-admin h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.text-yellow {
    color: var(--primary-yellow);
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
}

.tab-btn {
    background-color: var(--bg-input);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-outfit);
    font-weight: 600;
    transition: var(--transition-smooth);
}

.tab-btn.active {
    background-color: var(--primary-yellow);
    color: #000;
    border-color: var(--primary-yellow);
}

.admin-tab-content {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Layouts inside Admin Tabs */
.inventory-layout, .users-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .inventory-layout, .users-layout {
        grid-template-columns: 1fr;
    }
}

.inventory-form-container, .user-form-container {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 1.2rem;
    border-radius: 10px;
}

.inventory-form-container h4, .user-form-container h4, .inventory-list-container h4, .user-list-container h4 {
    margin-bottom: 1rem;
    border-left: 3px solid var(--primary-yellow);
    padding-left: 0.5rem;
    font-size: 1.1rem;
}

#product-form, #user-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#product-form input[type="text"],
#product-form input[type="number"],
#product-form textarea,
#product-form select,
#user-form input[type="text"],
#user-form input[type="password"],
#user-form select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #fff;
    font-family: var(--font-outfit);
    outline: none;
    transition: var(--transition-smooth);
}

#product-form input:focus, #product-form textarea:focus, #product-form select:focus,
#user-form input:focus, #user-form select:focus {
    border-color: var(--primary-yellow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .form-row-3 {
        grid-template-columns: 1fr;
    }
}

/* Image Upload Options UI */
.image-upload-options {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.2rem;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #2e2e38;
    color: var(--text-light);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color);
}

.file-upload-label:hover {
    background-color: #3f3f4d;
    border-color: var(--primary-yellow);
}

#prod-image-file {
    display: none;
}

.upload-separator {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.url-option {
    flex-grow: 1;
}

.form-help {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.2rem;
    display: block;
}

/* Image Preview */
.image-preview {
    position: relative;
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#remove-preview-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#remove-preview-btn:hover {
    background-color: var(--accent-red);
}

.form-actions-row {
    display: flex;
    gap: 0.5rem;
}

/* Tables Styling */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.admin-table th, .admin-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background-color: var(--bg-input);
    color: var(--text-muted);
    font-weight: 600;
}

.admin-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.admin-table img {
    width: 45px;
    height: 35px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Table Button Actions */
.btn-action {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem;
    margin-right: 0.4rem;
    transition: var(--transition-smooth);
}

.btn-edit {
    color: var(--primary-yellow);
}

.btn-edit:hover {
    color: var(--primary-yellow-hover);
    transform: scale(1.15);
}

.btn-delete {
    color: var(--accent-red);
}

.btn-delete:hover {
    color: #ef4444e0;
    transform: scale(1.15);
}

/* Footer Styling */
.main-footer {
    background-color: var(--bg-dark);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 5rem;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-container p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--primary-yellow);
}

/* Vehicle Fields Box */
.vehicle-fields-box {
    background-color: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--primary-yellow);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 0.5rem;
}

/* Utility classes */
.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-bar-container {
        width: 100%;
    }
}

/* Vehicle specs tags inside card */
.card-badges-right {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 0.4rem;
    z-index: 5;
}

.tuning-badge, .speed-badge {
    background-color: rgba(245, 197, 24, 0.9);
    color: #000;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.speed-badge {
    background-color: rgba(0, 0, 0, 0.75);
    color: var(--primary-yellow);
    border: 1px solid var(--primary-yellow);
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

.vehicle-specs {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 0.6rem;
}

.dealer-price-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.saving-tag {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mods-info {
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.4rem;
}

.mods-title {
    color: var(--primary-yellow);
    font-weight: 600;
    display: block;
    margin-bottom: 0.1rem;
}

.mods-text {
    color: var(--text-light);
    font-style: italic;
}

/* Sold product styles */
.product-card.sold {
    opacity: 0.65;
}

.sold-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    background-color: var(--accent-red);
    color: #fff;
    padding: 0.5rem 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    border: 3px double #fff;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
    z-index: 6;
    letter-spacing: 2px;
}

/* Private Area / Chat Tab */
.chat-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .chat-layout {
        grid-template-columns: 1fr;
    }
}

.chat-box-container {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 1.2rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    height: 400px;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.chat-msg {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
}

.chat-msg-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
}

.chat-msg-user {
    font-weight: 600;
    color: var(--primary-yellow);
}

.chat-msg-time {
    color: var(--text-muted);
}

.chat-msg-text {
    word-break: break-word;
    color: var(--text-light);
}

.chat-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

#chat-input {
    flex-grow: 1;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #fff;
    font-family: var(--font-outfit);
    outline: none;
}

#chat-input:focus {
    border-color: var(--primary-yellow);
}

.sales-layout-container {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 1.2rem;
    border-radius: 10px;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.sales-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.sales-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.sales-item.sold {
    border-color: rgba(239, 68, 68, 0.4);
}

.sales-item-name {
    font-weight: 600;
}

.sales-item-status {
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

.sales-status-active {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.sales-status-sold {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.btn-toggle-sold {
    font-family: var(--font-outfit);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-toggle-sold.sell-btn {
    background-color: var(--accent-red);
    color: #fff;
}

.btn-toggle-sold.sell-btn:hover {
    background-color: #ef4444e0;
}

.btn-toggle-sold.reactivate-btn {
    background-color: #333;
    color: #fff;
}

.btn-toggle-sold.reactivate-btn:hover {
    background-color: #444;
}

/* ── Chat self & system message styles ──────────────────── */
.chat-msg-system {
    background-color: rgba(245, 197, 24, 0.05) !important;
    border-color: rgba(245, 197, 24, 0.15) !important;
}
.chat-msg-system .chat-msg-user {
    color: var(--text-muted) !important;
    font-style: italic;
}
.chat-msg-self {
    background-color: rgba(245, 197, 24, 0.08) !important;
    border-color: rgba(245, 197, 24, 0.3) !important;
    margin-left: auto;
    max-width: 85%;
}
.chat-msg-self .chat-msg-user {
    color: var(--primary-yellow) !important;
}

/* ── Admin table: toggle-sold mini button ───────────────── */
.btn-toggle-sold-admin {
    font-family: var(--font-outfit);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}
.btn-toggle-sold-admin.sell-btn {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.btn-toggle-sold-admin.sell-btn:hover {
    background-color: var(--accent-red);
    color: #fff;
}
.btn-toggle-sold-admin.reactivate-btn {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.btn-toggle-sold-admin.reactivate-btn:hover {
    background-color: var(--accent-green);
    color: #000;
}

/* ── Admin table action cell ────────────────────────────── */
.action-cell {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Status column ──────────────────────────────────────── */
.admin-table th:nth-child(5),
.admin-table td:nth-child(5) {
    min-width: 90px;
}

/* ═══════════════════════════════════════════════════════════
   EVENTOS — Public Section
═══════════════════════════════════════════════════════════ */
.events-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.3rem;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 2rem;
    padding: 0.5rem 0 2rem;
}

/* ── Event Card ──────────────────────────────────────────── */
.event-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}
.event-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-yellow);
    box-shadow: 0 20px 40px rgba(245, 197, 24, 0.12);
}

.event-image-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}
.event-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.event-card:hover .event-image {
    transform: scale(1.04);
}

.event-date-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.92), transparent);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 1.2rem 1rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.event-date-badge i {
    color: var(--primary-yellow);
}

.event-info {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.event-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background-color: rgba(245, 197, 24, 0.12);
    color: var(--primary-yellow);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    border: 1px solid rgba(245, 197, 24, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    width: fit-content;
}

.event-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-light);
    line-height: 1.3;
}

.event-location {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.event-location i {
    color: var(--primary-yellow);
}

.event-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── Prizes Podium ───────────────────────────────────────── */
.event-prizes {
    margin-top: 0.5rem;
    background: rgba(245, 197, 24, 0.04);
    border: 1px solid rgba(245, 197, 24, 0.15);
    border-radius: 12px;
    padding: 1rem;
}

.prizes-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-yellow);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prize-podium {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.prize-podium-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}
.prize-podium-item:hover {
    background: rgba(255,255,255,0.04);
}

.prize-pos-1 { border-color: rgba(255, 215, 0, 0.3); background: rgba(255, 215, 0, 0.06); }
.prize-pos-2 { border-color: rgba(192, 192, 192, 0.25); background: rgba(192, 192, 192, 0.05); }
.prize-pos-3 { border-color: rgba(205, 127, 50, 0.25); background: rgba(205, 127, 50, 0.05); }

.prize-pos-icon {
    font-size: 1.5rem;
    min-width: 2rem;
    text-align: center;
}

.prize-details {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
}

.prize-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prize-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-light);
}
.prize-pos-1 .prize-value { color: #FFD700; }
.prize-pos-2 .prize-value { color: #C0C0C0; }
.prize-pos-3 .prize-value { color: #CD7F32; }

/* Extra prizes (4th+) */
.prize-extra-list {
    margin-top: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border-color);
}
.prize-extra-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}
.prize-extra-pos { color: var(--text-muted); font-weight: 600; }
.prize-extra-val { color: var(--text-light); }

/* ── Events empty state ──────────────────────────────────── */
.events-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}
.events-empty i {
    font-size: 3rem;
    color: var(--primary-yellow);
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ── Nav Events link highlight ───────────────────────────── */
.nav-link-events {
    position: relative;
}
.nav-link-events::after {
    content: "NUEVO";
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary-yellow);
    color: #000;
    font-size: 0.5rem;
    font-weight: 800;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
}
.nav-link-events.active::after {
    background: var(--text-light);
    color: #000;
}

/* ═══════════════════════════════════════════════════════════
   EVENTOS — Admin Panel
═══════════════════════════════════════════════════════════ */
.admin-events-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 4px;
}

.admin-event-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.7rem;
    transition: var(--transition-smooth);
}
.admin-event-item:hover {
    border-color: var(--primary-yellow);
}
.admin-event-item img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.admin-event-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.admin-event-info strong {
    font-size: 0.88rem;
    color: var(--text-light);
}
.admin-event-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.admin-event-actions {
    display: flex;
    gap: 0.4rem;
}

/* ── Prize input rows in form ────────────────────────────── */
.prizes-section {
    background: rgba(245, 197, 24, 0.04);
    border: 1px solid rgba(245, 197, 24, 0.15);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 0.5rem;
}
.prizes-section h5 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-yellow);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
#prizes-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.prize-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
}
.prize-row-icon {
    font-size: 1.2rem;
    min-width: 1.8rem;
    text-align: center;
}
.prize-row-inputs {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    flex-wrap: wrap;
}
.prize-label-input,
.prize-value-input {
    flex: 1;
    min-width: 120px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    color: var(--text-light);
    font-family: var(--font-outfit);
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.2s;
}
.prize-label-input:focus,
.prize-value-input:focus {
    border-color: var(--primary-yellow);
}
.prize-remove-btn {
    background: transparent;
    border: none;
    color: var(--accent-red);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.2rem 0.3rem;
    border-radius: 4px;
    transition: background 0.2s;
}
.prize-remove-btn:hover {
    background: rgba(239, 68, 68, 0.15);
}

.btn-add-prize {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: 1px dashed rgba(245, 197, 24, 0.4);
    color: var(--primary-yellow);
    font-family: var(--font-outfit);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
    justify-content: center;
}
.btn-add-prize:hover {
    background: rgba(245, 197, 24, 0.08);
    border-color: var(--primary-yellow);
}

/* ── Responsive events ───────────────────────────────────── */
@media (max-width: 700px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
    .prize-row-inputs {
        flex-direction: column;
    }
}
