/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    background: none;
}

.btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #545b62;
    border-color: #545b62;
}

.btn-outline {
    border-color: #007bff;
    color: #007bff;
    background-color: transparent;
}

.btn-outline:hover:not(:disabled) {
    background-color: #007bff;
    color: white;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #c82333;
    border-color: #c82333;
}

.btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Header */
.header {
    background-color: white;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
    cursor: pointer;
    text-decoration: none;
}

.header-nav {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    border-radius: 0.375rem;
    color: #6c757d;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.nav-btn:hover,
.nav-btn.active {
    background-color: #e9ecef;
    color: #007bff;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6c757d;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
}

/* Mobile styles */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .mobile-nav {
        display: flex;
    }

    .nav-btn {
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
    }
}

/* Footer */
.footer {
    background-color: #343a40;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #007bff;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: #495057;
    border-radius: 50%;
    font-size: 1.25rem;
}

.social-links a:hover {
    background-color: #007bff;
}

.footer-bottom {
    border-top: 1px solid #495057;
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
    color: #adb5bd;
}

/* Home Page */
.home-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: 1rem;
    margin: 2rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.stat i {
    font-size: 1.25rem;
}

.cta-button {
    background-color: white;
    color: #007bff;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.15s ease-in-out;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 1rem;
        margin: 1rem 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Quick Categories */
.quick-categories {
    margin: 3rem 0;
}

.quick-categories h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-card.active {
    background-color: rgba(74, 144, 226, 0.1);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

/* Clear Filters Button */
.clear-filters-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.clear-filters-btn {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-filters-btn:hover {
    background-color: #ff5252;
    transform: scale(1.05);
}

.category-card i {
    font-size: 2rem;
    color: #007bff;
}

.category-card span {
    font-weight: 500;
    text-align: center;
}

/* Search and Filter */
.search-section {
    margin: 3rem 0;
    position: relative;
}

.search-filter {
    position: relative;
    padding: 2rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(59, 130, 246, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 20px 45px rgba(79, 114, 255, 0.12);
    overflow: hidden;
}

.search-filter::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.2), transparent 55%);
    opacity: 0.65;
}

.search-bar {
    position: relative;
    display: flex;
    gap: 1.25rem;
    align-items: stretch;
    flex-wrap: wrap;
    z-index: 1;
}

.search-input-container {
    flex: 1;
    position: relative;
    min-width: 240px;
}

.search-actions {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.search-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    border-radius: 0.75rem;
    color: white;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.search-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(79, 70, 229, 0.35);
    filter: brightness(1.04);
}

.search-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.24);
}

.search-submit-btn i {
    font-size: 1rem;
}

.search-submit-btn span {
    font-size: 0.95rem;
}

.search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(79, 70, 229, 0.7);
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    display: none;
}

.search-input {
    width: 100%;
    padding: 0.9rem 1.1rem;
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 0.85rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
    z-index: 1;
}

.search-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.search-input::placeholder {
    color: rgba(79, 70, 229, 0.5);
}

.clear-search-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(79, 70, 229, 0.08);
    border: none;
    color: #4f46e5;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
    z-index: 2;
}

.clear-search-btn:hover {
    color: white;
    background-color: #4f46e5;
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.3);
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-top: none;
    border-radius: 0 0 0.85rem 0.85rem;
    box-shadow: 0 20px 36px rgba(79, 70, 229, 0.18);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.suggestions-header {
    padding: 0.5rem 1rem;
    background-color: rgba(99, 102, 241, 0.08);
    border-bottom: 1px solid rgba(99, 102, 241, 0.12);
    font-size: 0.875rem;
    font-weight: 500;
    color: #4f46e5;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    color: #4338ca;
}

.suggestion-item:hover {
    background-color: rgba(99, 102, 241, 0.08);
}

.suggestion-item i {
    color: #6366f1;
    font-size: 0.875rem;
}

/* Chat Modal */
.chat-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 1rem;
}

.chat-modal {
    background: #ffffff;
    width: min(420px, 100%);
    max-height: min(80vh, 640px);
    border-radius: 1.25rem;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(59, 130, 246, 0.08));
}

.chat-participant {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
}

.chat-meta h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #1e1b4b;
    font-weight: 700;
}

.chat-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #4338ca;
    background: rgba(79, 70, 229, 0.15);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    margin-top: 0.35rem;
}

.chat-close-btn {
    background: none;
    border: none;
    color: #312e81;
    font-size: 1.15rem;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}

.chat-close-btn:hover {
    color: #1e1b4b;
    transform: rotate(90deg);
}

.chat-product-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.5rem;
    background: rgba(99, 102, 241, 0.07);
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
}

.chat-product-title {
    font-weight: 600;
    color: #312e81;
    line-height: 1.4;
}

.chat-product-price {
    font-weight: 700;
    color: #4338ca;
}

.chat-transaction-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
    background: #ffffff;
}

.chat-template-btn {
    border: 1px solid rgba(79, 70, 229, 0.25);
    background: rgba(99, 102, 241, 0.08);
    color: #3730a3;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.chat-template-btn:hover {
    background: rgba(79, 70, 229, 0.18);
    border-color: rgba(79, 70, 229, 0.45);
}

.chat-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 1.25rem 0.75rem;
    background: #ffffff;
}

.chat-confirm-checkbox {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #334155;
    margin-bottom: 0.15rem;
}

.chat-confirm-checkbox input {
    margin-top: 0.1rem;
}

.chat-confirm-btn {
    border: none;
    border-radius: 0.6rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    color: #ffffff;
}

.chat-confirm-btn.buyer {
    background: #0284c7;
}

.chat-confirm-btn.seller {
    background: #16a34a;
}

.chat-confirm-btn.issue {
    background: #dc2626;
}

.chat-confirm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.chat-safe-meetup-card {
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    padding: 0.65rem 1.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.04);
}

.chat-safe-meetup-card h4 {
    margin: 0 0 0.45rem;
    font-size: 0.82rem;
    color: #312e81;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.chat-safe-meetup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chat-message-list {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-empty-state {
    text-align: center;
    color: #4338ca;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.chat-empty-state i {
    font-size: 1.5rem;
}

.chat-message {
    max-width: 78%;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.chat-message.self {
    align-self: flex-end;
}

.chat-message.other {
    align-self: flex-start;
}

.chat-message-body {
    padding: 0.65rem 0.9rem;
    border-radius: 0.85rem;
    font-size: 0.95rem;
    line-height: 1.4;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.chat-message.self .chat-message-body {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    border-bottom-right-radius: 0.3rem;
}

.chat-message.other .chat-message-body {
    background: #ffffff;
    color: #1e1b4b;
    border-bottom-left-radius: 0.3rem;
}

.chat-message-time {
    font-size: 0.75rem;
    color: #64748b;
    padding: 0 0.2rem;
}

.chat-input-bar {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    background: #ffffff;
}

.chat-input {
    flex: 1;
    resize: none;
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 0.85rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: #ffffff;
}

.chat-send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #4338ca);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.chat-send-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.chat-send-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(79, 70, 229, 0.3);
    filter: brightness(1.03);
}

@media (max-width: 520px) {
    .chat-modal {
        width: 100%;
        border-radius: 1rem;
        max-height: 85vh;
    }

    .chat-message {
        max-width: 88%;
    }
}

/* Dashboard Messages */
.messages-tab {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.messages-search-bar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 0.75rem;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.messages-search-bar i {
    color: #4f46e5;
}

.messages-search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.95rem;
    background: transparent;
}

.message-thread-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-thread {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
    align-items: center;
}

.message-thread-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4338ca;
    font-size: 1.5rem;
}

.message-thread-content h4 {
    margin: 0;
    font-size: 1rem;
    color: #1f2937;
}

.message-thread-product {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #4338ca;
    font-weight: 600;
}

.message-thread-snippet {
    margin: 0;
    font-size: 0.9rem;
    color: #4b5563;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.message-thread-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.45rem;
    font-size: 0.75rem;
    color: #3730a3;
    font-weight: 600;
    background: rgba(79, 70, 229, 0.14);
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
}

.listing-status-chip {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    z-index: 3;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: 999px;
    padding: 4px 12px;
    border: 1px solid transparent;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.listing-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0.5rem 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: currentColor;
}

.status-dot.pulse {
    animation: availabilityPulse 1.5s ease-in-out infinite;
}

.listing-status-available .status-dot,
.listing-status-active .status-dot {
    background: #16a34a;
}

.listing-status-pending .status-dot {
    background: #d97706;
}

.listing-status-sold .status-dot {
    background: #dc2626;
}

.listing-status-active {
    background: rgba(22, 163, 74, 0.14);
    color: #166534;
    border: 1px solid rgba(22, 163, 74, 0.28);
}

.listing-status-available {
    background: rgba(22, 163, 74, 0.14);
    color: #166534;
    border: 1px solid rgba(22, 163, 74, 0.28);
}

.listing-status-pending {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.32);
}

.listing-status-sold {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.deal-timeline-card {
    margin-top: 1rem;
    border: 1px solid rgba(79, 70, 229, 0.15);
    background: #ffffff;
    border-radius: 0.9rem;
    padding: 0.9rem 1rem;
}

.deal-timeline-card h3 {
    margin-bottom: 0.75rem;
}

.deal-timeline-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.deal-timeline-item {
    position: relative;
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding-bottom: 0.6rem;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.deal-timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 24px;
    width: 2px;
    height: calc(100% - 8px);
    background: rgba(148, 163, 184, 0.45);
    transition: background-color 0.25s ease;
}

.deal-timeline-item.completed:not(:last-child)::after {
    background: rgba(22, 163, 74, 0.75);
}

.deal-timeline-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #94a3b8;
    color: #64748b;
    background: #ffffff;
    font-size: 0.72rem;
    margin-top: 0.1rem;
    transition: all 0.25s ease;
}

.deal-timeline-item.completed .deal-timeline-dot {
    color: #ffffff;
    border-color: #16a34a;
    background: #16a34a;
}

.deal-timeline-content h4 {
    margin: 0;
    font-size: 0.92rem;
    color: #1f2937;
}

.deal-timeline-content p {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: #6b7280;
}

.dashboard-timeline-mini {
    margin-top: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.dashboard-timeline-mini span {
    font-size: 0.76rem;
    color: #6b7280;
}

.dashboard-timeline-mini span.done {
    color: #166534;
    font-weight: 600;
}

.message-thread-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
}

.message-thread-time {
    font-size: 0.8rem;
    color: #6b7280;
}

@media (max-width: 640px) {
    .message-thread {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .message-thread-meta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.35rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 0.75rem;
    color: #3730a3;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.filter-toggle:hover,
.filter-toggle.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(79, 70, 229, 0.18));
    border-color: rgba(79, 70, 229, 0.45);
    color: #1f1c76;
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.2);
}

.filter-panel {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    font-size: 0.875rem;
    color: #495057;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-range input {
    flex: 1;
}

.filter-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.clear-filters-btn {
    background-color: transparent;
    border: 1px solid #6c757d;
    color: #6c757d;
}

.apply-filters-btn {
    background-color: #007bff;
    border: 1px solid #007bff;
    color: white;
}

@media (max-width: 768px) {
    .search-filter {
        padding: 1.5rem;
    }

    .search-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .search-actions {
        width: 100%;
        flex-direction: column;
    }

    .search-submit-btn,
    .filter-toggle {
        width: 100%;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        grid-column: 1;
    }

    .featured-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Product Grid */
.products-section,
.featured-section {
    margin: 3rem 0;
}

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

.featured-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.featured-header h2 {
    margin: 0;
}

.featured-hint {
    font-size: 0.95rem;
    color: #4f46e5;
    font-weight: 600;
    background: rgba(79, 70, 229, 0.12);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
}

.product-count {
    color: #6c757d;
    font-size: 0.875rem;
}

.product-grid,
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.condition-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.condition-new,
.condition-like-new { background-color: #059669; color: #ecfdf5; }
.condition-good { background-color: #2563eb; color: #eff6ff; }
.condition-fair { background-color: #d97706; color: #fffbeb; }

.sold-ribbon {
    position: absolute;
    top: 14px;
    right: -38px;
    width: 140px;
    text-align: center;
    background: #dc2626;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    transform: rotate(45deg);
    z-index: 4;
    padding: 0.22rem 0;
    box-shadow: 0 6px 16px rgba(127, 29, 29, 0.35);
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 0.5rem;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.product-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #6c757d;
}

.product-footer span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.search-suggestions-help {
    max-width: 400px;
    margin: 1rem auto 0;
    text-align: left;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
}

.search-suggestions-help p {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

.search-suggestions-help ul {
    margin: 0;
    padding-left: 1.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.search-suggestions-help li {
    margin-bottom: 0.25rem;
}

/* Empty Marketplace - New Launch */
.empty-marketplace {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 1rem;
    padding: 3rem 2rem;
    margin: 2rem 0;
    text-align: center;
}

.empty-content {
    max-width: 600px;
    margin: 0 auto;
}

.empty-marketplace .empty-icon {
    font-size: 5rem;
    color: #007bff;
    margin-bottom: 1.5rem;
    opacity: 1;
}

.empty-marketplace h3 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.empty-marketplace p {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1.125rem;
    line-height: 1.6;
}

.empty-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.getting-started-tips {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.getting-started-tips h4 {
    color: #007bff;
    margin-bottom: 1rem;
    text-align: center;
}

.getting-started-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.getting-started-tips li {
    padding: 0.5rem 0;
    color: #495057;
    border-bottom: 1px solid #f8f9fa;
}

.getting-started-tips li:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .empty-marketplace {
        padding: 2rem 1rem;
        margin: 1rem 0;
    }
    
    .empty-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .empty-actions .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .product-grid,
    .featured-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Product Detail Page */
.product-detail-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    color: #6c757d;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.back-btn:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f1f5f9;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.image-nav {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
}

.image-nav button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
}

.image-nav button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.thumbnail-strip {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
}

.thumbnail-strip img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s ease-in-out;
}

.thumbnail-strip img.active,
.thumbnail-strip img:hover {
    opacity: 1;
}

.product-info-detail {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.product-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.product-price-large {
    font-size: 2rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 1rem;
}

.product-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.category-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: #495057;
}

.product-description,
.product-details {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
}

.detail-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
}

.seller-info {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
}

.safety-tips-card {
    border: 1px solid #fbbf24;
    background: #fffbeb;
    border-radius: 0.9rem;
    padding: 1rem;
}

.safety-tips-card h3 {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #92400e;
    margin-bottom: 0.8rem;
}

.safety-tips-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
}

.safety-tip-row {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    color: #78350f;
    margin: 0;
}

.safety-tip-row p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
}

.safety-tip-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex: 0 0 40px;
}

.safety-tip-icon.tip-blue { background: #dbeafe; color: #1d4ed8; }
.safety-tip-icon.tip-indigo { background: #e0e7ff; color: #4338ca; }
.safety-tip-icon.tip-green { background: #dcfce7; color: #15803d; }
.safety-tip-icon.tip-amber { background: #fef3c7; color: #b45309; }
.safety-tip-icon.tip-red { background: #fee2e2; color: #b91c1c; }
.safety-tip-icon.tip-rose { background: #ffe4e6; color: #be123c; }
.safety-tip-icon.tip-slate { background: #e2e8f0; color: #334155; }

.seller-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
}

.seller-avatar {
    font-size: 3rem;
    color: #6c757d;
}

.seller-details h4 {
    margin-bottom: 0.25rem;
}

.seller-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #ffc107;
    font-size: 0.875rem;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-actions-priority {
    margin-top: 0.25rem;
}

.product-actions .btn {
    justify-content: center;
    padding: 1rem;
    font-size: 1rem;
}

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    cursor: pointer;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: -3rem;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .product-detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }

    .main-image {
        height: 300px;
    }

    .product-actions .btn {
        padding: 0.75rem;
    }
}

@media (min-width: 900px) {
    .safety-tips-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.sold-items-title {
    margin-top: 1.35rem;
}

.sold-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.sold-item-card {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.9rem;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.sold-item-image-wrap {
    position: relative;
    height: 160px;
}

.sold-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sold-item-banner {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    background: rgba(220, 38, 38, 0.95);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.sold-item-body {
    padding: 0.9rem;
}

.sold-item-meta {
    margin: 0.15rem 0;
    color: #4b5563;
    font-size: 0.83rem;
}

.sold-item-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

@keyframes availabilityPulse {
    0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4); }
    70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* Error State */
.error-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.error-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #dc3545;
}

/* Policy Pages */
.policy-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 1rem;
}

.policy-container {
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    padding: 1.5rem;
}

.policy-lead {
    color: #475569;
    margin-bottom: 1.1rem;
}

.policy-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.policy-card {
    border: 1px solid #dbeafe;
    border-radius: 0.7rem;
    padding: 0.9rem;
    background: #f8fbff;
}

.policy-step-number {
    font-size: 0.75rem;
    color: #1d4ed8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.policy-section {
    margin-top: 1rem;
}

.policy-section h2 {
    font-size: 1.2rem;
    margin-bottom: 0.55rem;
}

.policy-list {
    padding-left: 1.15rem;
}

.policy-list li {
    margin-bottom: 0.45rem;
    color: #334155;
}

.policy-ack {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}

.policy-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

/* Sell Page */
.sell-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.sell-container {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #dee2e6;
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #6c757d;
}

.sell-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-section h3 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.section-description {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

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

.form-group label {
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

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

.price-input {
    position: relative;
    display: flex;
    align-items: center;
}

.currency {
    position: absolute;
    left: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

.price-input input {
    padding-left: 2rem;
}

/* Image Upload */
.image-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.uploaded-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.uploaded-image {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 0.5rem;
    overflow: hidden;
}

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

.remove-image {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.main-image-badge {
    position: absolute;
    bottom: 0.25rem;
    left: 0.25rem;
    background-color: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
}

.image-upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.image-upload-btn:hover {
    background-color: #e9ecef;
}

.image-upload-btn i {
    font-size: 2rem;
    color: #007bff;
}

.safety-tips {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 0.375rem;
    padding: 1rem;
}

.safety-tips h4 {
    color: #0c5460;
    margin-bottom: 0.5rem;
}

.safety-tips ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #0c5460;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.auth-required {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.auth-required i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #007bff;
}

@media (max-width: 768px) {
    .sell-container {
        padding: 1rem;
    }

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

    .uploaded-images {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .uploaded-image {
        width: 100px;
        height: 100px;
    }

    .form-actions {
        flex-direction: column;
    }
}

/* Profile Page */
.profile-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.welcome-section {
    background-color: white;
    padding: 4rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.welcome-icon {
    font-size: 4rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.profile-container {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid #dee2e6;
}

.tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.tab.active {
    background-color: #007bff;
    color: white;
}

.tab-content {
    padding: 2rem;
}

/* Profile View */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #dee2e6;
}

.profile-avatar {
    font-size: 4rem;
    color: #007bff;
}

.profile-info {
    flex: 1;
}

.profile-info h2 {
    margin-bottom: 0.25rem;
}

.profile-info p {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.profile-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.profile-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
}

.stat-card i {
    font-size: 2rem;
    color: #007bff;
    margin-bottom: 0.5rem;
}

.stat-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.stat-card p {
    color: #6c757d;
    margin: 0;
}

.profile-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #dee2e6;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
}

.danger-zone {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 0.375rem;
    padding: 1rem;
}

.danger-zone h3 {
    color: #721c24;
    margin-bottom: 0.5rem;
}

/* Profile Form */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* User Listings */
.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.listing-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.15s ease-in-out;
}

.listing-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.listing-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.listing-info {
    padding: 1rem;
}

.listing-info h4 {
    margin-bottom: 0.5rem;
}

.listing-price {
    color: #007bff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.listing-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

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

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-meta {
        align-items: center;
    }

    .listings-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .listings-grid {
        grid-template-columns: 1fr;
    }

    .tab-content {
        padding: 1rem;
    }
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* Admin Panel */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 1rem;
}

.admin-content {
    background-color: white;
    border-radius: 0.5rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.admin-header h2 {
    margin: 0;
    color: #495057;
}

.close-admin {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
}

.admin-section {
    padding: 1.5rem;
    border-bottom: 1px solid #f8f9fa;
}

.admin-section:last-child {
    border-bottom: none;
}

.admin-section h3 {
    color: #007bff;
    margin-bottom: 0.5rem;
}

.admin-section p {
    color: #6c757d;
    margin-bottom: 1rem;
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.status-label {
    font-weight: 500;
    color: #495057;
}

.status-value {
    font-weight: 600;
}

.status-value.demo {
    color: #ffc107;
}

.status-value.production {
    color: #28a745;
}

.admin-tips {
    background-color: #e7f3ff;
    border: 1px solid #b3d7ff;
    border-radius: 0.375rem;
    padding: 1.5rem;
    margin: 1.5rem;
}

.admin-tips h4 {
    color: #0056b3;
    margin-bottom: 1rem;
}

.admin-tips ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #495057;
}

.admin-tips li {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .admin-modal {
        padding: 0.5rem;
    }
    
    .admin-content {
        max-height: 95vh;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive breakpoints */
@media (max-width: 576px) {
    .container {
        padding: 0 0.5rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/* ========================================
   Authentication Modal Styles
   ======================================== */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.auth-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.auth-modal-close:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.auth-modal-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
}

.auth-modal-header h2 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.auth-modal-header p {
    color: #718096;
    font-size: 0.95rem;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #718096;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.auth-tab:hover {
    color: #4a90e2;
}

.auth-tab.active {
    color: #4a90e2;
    border-bottom-color: #4a90e2;
}

.auth-error {
    margin: 1rem 2rem 0;
    padding: 0.75rem 1rem;
    background: #fee;
    border-left: 4px solid #f44;
    border-radius: 4px;
    color: #c33;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.auth-form {
    padding: 1.5rem 2rem 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2d3748;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.user-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.user-type-option {
    cursor: pointer;
}

.user-type-option input[type="radio"] {
    display: none;
}

.user-type-content {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s;
}

.user-type-content i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    color: #718096;
}

.user-type-option input:checked + .user-type-content {
    border-color: #4a90e2;
    background: #e6f3ff;
}

.user-type-option input:checked + .user-type-content i {
    color: #4a90e2;
}

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

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.auth-footer p {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

.auth-footer a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-demo-hint {
    padding: 0 2rem 2rem;
    text-align: center;
}

.auth-demo-hint p {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.85rem;
    color: #718096;
    margin: 0;
}

/* ========================================
   User Menu Dropdown
   ======================================== */
.user-menu-container {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-menu-btn .fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.user-menu-container:hover .fa-chevron-down {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    padding: 0.5rem;
    z-index: 100;
    animation: dropdownSlideIn 0.2s ease;
}

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

.user-dropdown-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
}

.user-dropdown-header p {
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.user-dropdown-header small {
    color: #718096;
    font-size: 0.85rem;
}

.user-dropdown button {
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #2d3748;
    font-size: 0.95rem;
}

.user-dropdown button:hover {
    background: #f7fafc;
}

.user-dropdown button.logout-btn {
    color: #e53e3e;
}

.user-dropdown button.logout-btn:hover {
    background: #fff5f5;
}

.user-dropdown hr {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid #e2e8f0;
}

/* ========================================
   Dashboard Styles
   ======================================== */
.dashboard-page,
.admin-dashboard {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-header,
.admin-header {
    margin-bottom: 2rem;
}

.dashboard-header h1,
.admin-header h1 {
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-header p,
.admin-header p {
    color: #718096;
    font-size: 1.1rem;
}

.dashboard-tabs,
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
    overflow-x: auto;
}

.dashboard-tabs .tab,
.admin-tabs .tab {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #718096;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    margin-bottom: -2px;
}

.dashboard-tabs .tab:hover,
.admin-tabs .tab:hover {
    color: #4a90e2;
}

.dashboard-tabs .tab.active,
.admin-tabs .tab.active {
    color: #4a90e2;
    border-bottom-color: #4a90e2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

.recent-activity {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.recent-activity h3 {
    margin-bottom: 1rem;
    color: #2d3748;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item,
.purchase-item,
.sale-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    transition: all 0.2s;
}

.activity-item:hover,
.purchase-item:hover,
.sale-item:hover {
    background: #e6f3ff;
}

.activity-icon,
.purchase-icon,
.sale-icon {
    width: 40px;
    height: 40px;
    background: #e6f3ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a90e2;
    flex-shrink: 0;
}

.activity-content,
.purchase-details,
.sale-details {
    flex: 1;
}

.activity-content p,
.purchase-details h4,
.sale-details h4 {
    color: #2d3748;
    margin: 0;
}

.activity-time,
.purchase-date,
.sale-date {
    color: #718096;
    font-size: 0.85rem;
}

.purchase-price,
.sale-price {
    color: #4a90e2;
    font-weight: 600;
    font-size: 1.1rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.suspended {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.favorite-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.favorite-icon {
    width: 60px;
    height: 60px;
    background: #fff5f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #e91e63;
    font-size: 1.5rem;
}

.favorite-card h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.favorite-date {
    color: #718096;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 1rem;
}

.total-spent,
.total-earned {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

.total-spent .amount,
.total-earned .amount {
    font-size: 2rem;
    font-weight: 700;
    color: #4a90e2;
}

.total-earned .amount.success {
    color: #48bb78;
}

/* ========================================
   Admin Dashboard Styles
   ======================================== */
.users-header,
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.users-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-input {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    min-width: 250px;
}

.search-input:focus {
    outline: none;
    border-color: #4a90e2;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
}

.users-table {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
}

.users-table table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th {
    background: #f7fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
}

.users-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-cell i {
    font-size: 1.5rem;
    color: #718096;
}

.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
}

.role-badge.user {
    background: #e6f3ff;
    color: #4a90e2;
}

.role-badge.seller {
    background: #fff3e0;
    color: #ff9800;
}

.role-badge.admin {
    background: #fce4ec;
    color: #e91e63;
}

.activity-summary {
    display: flex;
    gap: 1rem;
}

.activity-summary span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #718096;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.85rem;
}

.btn-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

.btn-warning:hover {
    background: #ffe69c;
}

.btn-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.btn-success:hover {
    background: #c3e6cb;
}

.btn-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.btn-info:hover {
    background: #bee5eb;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.admin-product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.2s;
}

.admin-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.admin-product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.admin-product-card .product-info {
    padding: 1rem;
}

.admin-product-card h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.admin-product-card .product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #4a90e2;
    margin-bottom: 0.5rem;
}

.admin-product-card .product-seller {
    color: #718096;
    font-size: 0.9rem;
}

.admin-product-card .product-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.admin-product-card .product-meta span {
    padding: 0.25rem 0.5rem;
    background: #f7fafc;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #718096;
}

.admin-product-card .product-actions {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
}

.unauthorized,
.auth-required,
.loading,
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.unauthorized i,
.auth-required i,
.loading i,
.empty-state i {
    font-size: 4rem;
    color: #cbd5e0;
    margin-bottom: 1rem;
}

.unauthorized h2,
.auth-required h2 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.unauthorized p,
.auth-required p,
.empty-state p {
    color: #718096;
    margin-bottom: 1.5rem;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .dashboard-page,
    .admin-dashboard {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-tabs,
    .admin-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .users-table {
        overflow-x: auto;
    }

    .users-table table {
        min-width: 800px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .user-dropdown {
        right: auto;
        left: 0;
    }

    .auth-modal {
        margin: 1rem;
    }
}

/* Loading spinner animation */
.fa-spinner.fa-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   Enhanced Header User Menu Styles
   ======================================== */
.user-menu-btn {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem !important;
    background: white !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    transition: all 0.2s;
    cursor: pointer;
}

.user-menu-btn:hover {
    border-color: #4a90e2 !important;
    background: #f7fafc !important;
}

.user-menu-btn.active {
    border-color: #4a90e2 !important;
    background: #e6f3ff !important;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.user-info-compact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
}

.user-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #48bb78;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #48bb78;
    animation: pulse 2s infinite;
}

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

.fa-chevron-down {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
    color: #718096;
}

.fa-chevron-down.rotated {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    padding: 0.75rem;
    z-index: 100;
    animation: dropdownSlideIn 0.2s ease;
    border: 1px solid #e2e8f0;
}

.user-dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* Image preview enhancements */
.uploaded-image {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #f7fafc;
    transition: all 0.2s;
}

.uploaded-image:hover {
    border-color: #4a90e2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.uploaded-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.remove-image {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.95);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}

.remove-image:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.main-image-badge {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: rgba(74, 144, 226, 0.95);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.image-upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.2s;
    color: #718096;
}

.image-upload-btn:hover {
    border-color: #4a90e2;
    background: #e6f3ff;
    color: #4a90e2;
}

.image-upload-btn i {
    font-size: 2rem;
}

.uploaded-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
    .user-menu-btn {
        padding: 0.5rem !important;
    }
    
    .user-info-compact {
        display: none;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .user-dropdown {
        right: -1rem;
        left: auto;
        min-width: 260px;
    }
    
    .login-btn span {
        display: none;
    }
    
    .login-btn {
        padding: 0.75rem 1rem !important;
    }
}

/* Sell page enhancements */
.sell-page {
    min-height: calc(100vh - 200px);
}

.sell-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #718096;
    font-size: 1.1rem;
}

.sell-form {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.section-description {
    color: #718096;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

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

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .sell-container {
        padding: 1rem;
    }
    
    .sell-form {
        padding: 1.5rem;
    }
}

.price-input {
    position: relative;
    display: flex;
    align-items: center;
}

.price-input .currency {
    position: absolute;
    left: 1rem;
    color: #718096;
    font-weight: 600;
    pointer-events: none;
}

.price-input input {
    padding-left: 2.5rem !important;
}

.safety-tips {
    background: #fffbf0;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.safety-tips h4 {
    color: #92400e;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.safety-tips ul {
    list-style: none;
    padding: 0;
}

.safety-tips li {
    color: #78350f;
    padding: 0.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.safety-tips li:before {
    content: "✓";
    color: #f59e0b;
    font-weight: bold;
    flex-shrink: 0;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.form-actions button {
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
}

@media (max-width: 640px) {
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .form-actions button {
        width: 100%;
    }
}
