/* style.css - Combined styles from home.html and existing styles */

/* === GLOBAL RESET & BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background: #f5f7fa;
    color: #1a1a1a;
    min-height: 100vh;
    -webkit-tap-highlight-color: rgba(34, 197, 94, 0.2);
}

/* === TYPOGRAPHY CONSISTENCY === */
h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

p {
    font-family: inherit;
    margin: 0;
}

button, input, select, textarea {
    font-family: inherit;
}

/* === HOME PAGE STYLES === */
.mockup-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

/* === NAVIGATION === */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    padding: 16px 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.logo {
    font-size: 35px;
    font-weight: 800;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.2s;
    padding: 8px 16px;
    border-radius: 6px;
    min-width: 80px;
    text-align: center;
}

.nav-links a:hover,
.nav-links a:active,
.nav-links a:focus,
.nav-links a.active {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.language-selector select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    cursor: pointer;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1000;
    position: relative;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}
/* === BUTTONS === */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #22c55e;
    color: white;
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus {
    background: #16a34a;
}

.btn-secondary {
    background: transparent;
    color: #22c55e;
    border: 2px solid #22c55e;
}

.btn-secondary:hover,
.btn-secondary:active,
.btn-secondary:focus {
    background: #22c55e;
    color: white;
}

.btn-danger {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
    border: none;
}

.btn-danger:hover,
.btn-danger:active,
.btn-danger:focus {
    background: linear-gradient(45deg, #c82333, #a71e2a);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(135deg, #1e3a2a 0%, #22c55e 100%);
    color: white;
    padding: 80px 40px;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* === STATS SECTION === */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    padding: 40px;
    max-width: 1200px;
    margin: -40px auto 20px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: #22c55e;
    margin-bottom: 8px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* === MARKET OVERVIEW === */
.market-overview {
    padding: 20px 40px 20px;
    max-width: none;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #1a1a1a;
}

.price-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.price-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.price-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.price-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    align-items: center;
}

.price-value {
    font-size: 28px;
    font-weight: 700;
    color: #22c55e;
}

.price-change {
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.price-change.up {
    background: #dcfce7;
    color: #16a34a;
}

.price-change.down {
    background: #fee2e2;
    color: #dc2626;
}

.form-group {
    margin-bottom: 20px;
}
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}
input[type="text"], input[type="email"], input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="number"]:focus {
    outline: none;
    border-color: #c2fb34;
    box-shadow: 0 0 0 3px rgba(194, 251, 52, 0.2);
}
button {
    background: linear-gradient(45deg, #c2fb34, #8bc34a);
    color: #222;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(194, 251, 52, 0.3);
}
button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px #F59E0B;
    color: white;
}
button:active {
    transform: translateY(0);
}
.user-actions {
    display: flex;
    gap: 10px;
}
.user-actions button {
    padding: 8px 15px;
    font-size: 14px;
    margin: 0;
}
.btn-edit {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}
.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}
.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.loading {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* === ORDERS PAGE === */
.page-header {
    background: white;
    padding: 30px 40px;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 36px;
    margin-bottom: 8px;
}

.page-header p {
    color: #666;
}

.filters-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin: 0 40px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 0;
}

.filter-group select,
.filter-group input {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.orders-container {
    padding: 0 40px 40px;
}

.orders-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    margin: 0;
    padding: 0;
}

/* When orders-grid contains a data-table, remove grid layout */
.orders-grid:has(.data-table) {
    display: block;
}

/* === ENHANCED ORDER LIST STYLES === */
.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 4px;
}

.orders-title h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}

.orders-count {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    margin-left: 12px;
}

.orders-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-filters {
    display: flex;
    gap: 20px;
    align-items: end;
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.filter-group select {
    min-width: 140px;
}

.no-orders {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.no-orders-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-orders h3 {
    margin-bottom: 8px;
    color: #333;
    font-size: 20px;
}

.no-orders p {
    color: #666;
    margin-bottom: 24px;
    font-size: 16px;
}

.order-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    margin-bottom: 16px;
}

.order-card:hover,
.order-card:active {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.order-card.active {
    border-left-color: #22c55e;
}

.order-card.completed {
    border-left-color: #3b82f6;
}

.order-card.cancelled {
    border-left-color: #ef4444;
    opacity: 0.8;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.order-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.order-id {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-number {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.order-type-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}

.order-status-container {
    display: flex;
    align-items: center;
}

.order-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-1 {
    background: #dcfce7;
    color: #166534;
}

.status-1 .status-dot {
    background: #22c55e;
}

.status-2 {
    background: #dbeafe;
    color: #1e40af;
}

.status-2 .status-dot {
    background: #3b82f6;
}

.status-3 {
    background: #fee2e2;
    color: #991b1b;
}

.status-3 .status-dot {
    background: #ef4444;
}

.order-card-body {
    padding: 20px 24px;
}

.order-primary-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 20px;
}

.product-info {
    flex: 1;
}

.product-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.quantity-price {
    display: flex;
    gap: 16px;
    color: #666;
    font-size: 14px;
}

.quantity {
    font-weight: 600;
}

.price-per-unit {
    color: #22c55e;
    font-weight: 600;
}

.total-value {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.total-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.total-amount {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.order-secondary-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-value {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}

.order-remark .info-value {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #e2e8f0;
    font-style: italic;
}

.order-card-footer {
    padding: 16px 24px 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.order-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-icon {
    font-size: 16px;
}

.btn-outline {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.btn-outline:hover {
    background: linear-gradient(45deg, #6b7280, #4b5563);
    color: white;
    border-color: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.2);
}

.btn-edit:hover {
    background: linear-gradient(45deg, #f59e0b, #d97706);
    color: white;
    border-color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* View Details Button - Blue Theme */
.btn-view {
    background: white;
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.btn-view:hover {
    background: linear-gradient(45deg, #3b82f6, #2563eb);
    color: white;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Edit Button - Orange Theme */
.btn-edit {
    background: white;
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

/* === MARKET PAGE === */
.market-tabs {
    display: flex;
    gap: 8px;
    padding: 0 40px;
    margin-bottom: 24px;
}

.tab-btn {
    padding: 12px 24px;
    background: white;
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.2s;
}

.tab-btn.active {
    background: white;
    color: #22c55e;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

.chart-container {
    background: white;
    padding: 30px;
    margin: 0 40px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.market-data {
    padding: 0 40px 40px;
}

.data-table {
    background: white;
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: visible;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    -webkit-overflow-scrolling: touch;
    width: 100%;
    position: relative;
    margin: 0;
}

/* Ensure data-table inside market-overview aligns properly */
.market-overview .data-table {
    margin-top: 0;
}

.data-table::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

@media (max-width: 1024px) {
    .data-table::after {
        opacity: 1; /* Show scroll hint on smaller screens */
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.data-table table {
    table-layout: fixed;
    width: 100%;
}

thead {
    background: #f9fafb;
}

th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #666;
    font-size: 14px;
    word-wrap: break-word;
}

td {
    padding: 16px;
    border-top: 1px solid #f0f0f0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

tbody tr:hover,
tbody tr:active {
    background: #f9fafb;
}

/* === PRODUCTS PAGE === */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    margin-bottom: 24px;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 0 40px 40px;
}

.category-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.category-image {
    height: 180px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.category-content {
    padding: 20px;
}

.category-content h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.category-content p {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

.category-stats {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #999;
}

/* === SERVICES PAGE === */
.services-intro {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 40px;
}

.services-intro h1 {
    font-size: 42px;
    margin-bottom: 16px;
}

.services-intro p {
    font-size: 18px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    padding: 0 40px 40px;
}

.service-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.service-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #16a34a;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 12px;
}

.service-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-features {
    list-style: none;
    margin-bottom: 20px;
}

.service-features li {
    padding: 8px 0;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-features li:before {
    content: "✓";
    color: #22c55e;
    font-weight: 700;
}

/* === ENHANCED RESPONSIVE DESIGN === */

/* Tablet/iPad optimizations (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Marketplace container for tablets */
    .marketplace-container {
        padding: 15px;
        gap: 1.5rem;
    }

    .filters-sidebar {
        flex: 0 0 280px;
        padding: 1.25rem;
    }

    /* Data table improvements for iPad */
    .data-table {
        font-size: 14px;
    }

    .data-table th {
        font-size: 13px;
        padding: 12px 10px;
    }

    .data-table td {
        font-size: 13px;
        padding: 12px 10px;
    }

    /* Better table layout on tablet */
    .data-table table {
        width: 100%;
    }

    /* Search and sort bar for tablets */
    .search-sort-bar {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .search-container {
        flex: 1 1 300px;
        min-width: 250px;
    }

    .sort-container {
        flex: 0 1 auto;
    }

    .results-count {
        flex: 1 1 100%;
        text-align: center;
        margin-top: 0.5rem;
    }

    /* Marketplace orders container spacing */
    .marketplace-orders-container {
        margin-bottom: 1.5rem;
    }

    /* Filter groups spacing */
    .filter-group {
        margin-bottom: 1.25rem;
    }

    /* Modal improvements for tablet */
    .modal-content {
        width: 85%;
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 20px;
        position: relative;
        justify-content: center;
    }

    .mobile-menu-toggle {
        display: flex !important;
        order: 1;
    }

    .nav-links {
        display: none !important;
        flex-direction: column;
        gap: 12px;
        align-items: center;
        width: 100%;
        order: 3;
        background: white;
        padding: 20px 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        border-radius: 8px;
        margin-top: 10px;
    }

    .nav-links.mobile-menu-open {
        display: flex !important;
    }

    .nav-actions {
        width: auto;
        justify-content: center;
        gap: 8px;
        order: 1;
        margin: 0;
        display: flex;
        align-items: center;
    }

    .logo {
        order: 0;
        margin: 0 auto 8px auto;
        justify-content: center;
        width: 100%;
    }
    
    .hero {
        padding: 60px 20px;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
        padding: 20px;
        margin: -20px auto 20px;
    }
    
    .market-overview,
    .orders-container,
    .market-data {
        padding: 0 20px 20px;
    }
    
    .page-header {
        padding: 20px;
    }
    
    .filters-section {
        margin: 0 20px 20px;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .order-card {
        grid-template-columns: 1fr;
        gap: 16px;
        text-align: center;
    }
    
    .products-header {
        flex-direction: column;
        gap: 16px;
        padding: 0 20px;
    }
    
    .search-bar {
        max-width: none;
    }
    
    .categories-grid,
    .services-grid {
        padding: 0 20px 20px;
        grid-template-columns: 1fr;
    }
    
    .services-intro {
        padding: 40px 20px;
    }
    
    .chart-container {
        margin: 0 20px 20px;
        padding: 20px;
    }
    
    .market-tabs {
        padding: 0 20px;
        flex-wrap: wrap;
    }

    /* Marketplace mobile responsive styles */
    .marketplace-container {
        flex-direction: column;
        gap: 1.5rem;
        padding: 10px;
    }

    .filters-sidebar {
        flex: none;
        width: 100%;
        position: static !important;
        order: 1;
        margin-bottom: 1.5rem;
        top: auto !important;
        height: auto;
    }

    .marketplace-content {
        flex: none;
        width: 100%;
        order: 2;
        margin-top: 0;
        clear: both;
    }

    /* Footer mobile responsive styles */
    .dashboard-footer {
        padding: 20px 16px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .footer-links a {
        padding: 12px 16px;
        width: 100%;
        text-align: center;
        font-size: 15px;
    }

    .footer-info {
        font-size: 13px;
    }

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

    .search-container {
        max-width: none;
        width: 100%;
    }

    .sort-container {
        justify-content: center;
    }

    .results-count {
        text-align: center;
        margin-top: 0.5rem;
    }

    .marketplace-orders-container {
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .data-table {
        font-size: 14px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }

    .data-table th {
        font-size: 12px;
    }

    .data-table td {
        font-size: 13px;
    }

    /* Mobile table adjustments */
    .data-table table {
        min-width: 800px; /* Ensure horizontal scroll on very small screens */
    }

    /* Modal adjustments for mobile */
    .modal-content {
        width: 95%;
        margin: 10px;
        max-height: 90vh;
    }

    .modal-body {
        padding: 16px;
    }

    /* Order detail modal mobile adjustments */
    #orderDetailModal .modal-content {
        max-width: none;
        width: 95%;
    }

    /* Filters sidebar mobile improvements */
    .filters-sidebar {
        padding: 1rem;
    }

    .filter-group {
        margin-bottom: 1rem;
    }

    .filter-options {
        gap: 0.75rem;
    }

    .checkbox-option {
        padding: 0.5rem;
        border-radius: 6px;
        border: 1px solid #e5e7eb;
        transition: background-color 0.2s;
    }

    .checkbox-option:hover {
        background-color: #f9fafb;
    }

    /* Hero section mobile adjustments */
    .marketplace-hero {
        padding: 40px 20px;
    }

    .marketplace-hero h1 {
        font-size: 28px;
        margin-bottom: 16px;
    }

    .marketplace-hero p {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Mobile-specific data table improvements */
    .data-table {
        border-radius: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table::-webkit-scrollbar {
        height: 8px;
    }

    .data-table::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .data-table::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
    }

    /* Improve table readability on mobile */
    @media (max-width: 480px) {
        .data-table th,
        .data-table td {
            padding: 6px 4px;
            font-size: 11px;
        }

        .data-table th {
            font-size: 10px;
            font-weight: 700;
        }

        .marketplace-hero h1 {
            font-size: 24px;
        }

        .marketplace-hero p {
            font-size: 14px;
        }

        .filters-sidebar {
            padding: 0.75rem;
        }

        .filter-label {
            font-size: 0.8rem;
        }

        .checkbox-option {
            font-size: 0.8rem;
            padding: 0.4rem;
        }
    }

    /* Mobile Touch Interactions - Add active states for touch devices */
    button:active,
    .btn:active,
    .header-btn:active {
        opacity: 0.8;
        transform: scale(0.98);
    }

    .mobile-menu-toggle:active {
        opacity: 0.7;
        transform: scale(0.95);
    }

    .data-table tr:active {
        background: rgba(34, 197, 94, 0.05);
    }

    input:focus,
    select:focus,
    textarea:focus {
        outline: 2px solid #22c55e;
        outline-offset: 2px;
    }

    /* Better touch targets for mobile */
    a,
    button,
    input,
    select,
    textarea {
        min-height: 44px;
        -webkit-touch-callout: none;
    }

    /* Legacy responsive adjustments */
    .inline-form {
        flex-direction: column;
    }
    .inline-form .form-group {
        width: 100%;
    }
    .users-grid {
        grid-template-columns: 1fr;
    }
    
    /* Dashboard responsive adjustments */
    .dashboard-header {
        padding: 12px 20px;
        flex-wrap: wrap;
        position: relative;
    }
    
    .dashboard-header .mobile-menu-toggle {
        display: flex !important;
        order: 2;
    }
    
    .dashboard-header .logo {
        order: 0;
    }
    
    .user-actions {
        flex-direction: row;
        gap: 8px;
        align-items: center;
        order: 1;
        margin-left: auto;
    }
    
    .header-buttons {
        gap: 8px;
    }
    
    .header-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .header-btn i {
        width: 14px;
        height: 14px;
    }
    
    .dashboard-nav {
        padding: 0;
        border-bottom: none;
        background: transparent;
    }
    
    .dashboard-nav .nav-links {
        display: none !important;
        flex-direction: column;
        gap: 0;
        width: calc(100% - 40px);
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin: 12px 20px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        position: relative;
        z-index: 100;
    }
    
    .dashboard-nav .nav-links.mobile-menu-open {
        display: flex !important;
    }
    
    .dashboard-nav .nav-link {
        padding: 16px 20px;
        font-size: 14px;
        border-radius: 0;
        border-bottom: 1px solid #f3f4f6;
        margin: 0;
        justify-content: flex-start;
    }
    
    .dashboard-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .dashboard-nav .nav-link:hover,
    .dashboard-nav .nav-link.active {
        background-color: #f0fdf4;
    }
    
    .dashboard-main {
        padding: 20px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dashboard-card {
        min-height: auto;
    }
    
    .order-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .quick-action-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .chart-container {
        height: 200px;
    }
}

/* === DASHBOARD STYLES === */

/* Dashboard Container */
.dashboard-container {
    min-height: 100vh;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
}

/* Dashboard Header */
.dashboard-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.dashboard-header .logo {
    font-size: 35px;
    font-weight: 800;
    color: #22c55e;
    display: flex;
    align-items: center;
}

.dashboard-header .logo img {
    height: 44px;
    width: 44px;
    margin-right: 5px;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    color: #374151;
}

.user-dropdown {
    position: relative;
}

.user-menu-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #6b7280;
}

.user-menu-btn:hover {
    background-color: #f3f4f6;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1001;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.2s;
}

.user-dropdown-menu a:hover {
    background-color: #f9fafb;
}

.user-dropdown-menu hr {
    margin: 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}

/* Header Buttons */
.header-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.header-btn i {
    width: 14px;
    height: 14px;
}

.profile-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.profile-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

.logout-btn {
    background: #dc2626;
    color: white;
}

.logout-btn:hover {
    background: #b91c1c;
}

/* Dashboard Navigation */
.dashboard-nav {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 40px;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: #22c55e;
    background-color: #f0fdf4;
}

.nav-link i {
    width: 18px;
    height: 18px;
}

/* Main Content */
.dashboard-main {
    flex: 1;
    padding: 32px 40px;
}

.welcome-section {
    margin-bottom: 32px;
}

.welcome-section h1 {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.dashboard-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.card-header i {
    color: #6b7280;
    width: 20px;
    height: 20px;
}

.card-content {
    padding: 20px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-actions {
    margin-top: auto;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Order Summary Card */
.order-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background-color: #f9fafb;
    border-radius: 8px;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #22c55e;
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.co2-summary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
}

.co2-label {
    display: block;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.co2-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

/* Watchlist Card */
.watchlist-items {
    margin-bottom: 20px;
}

.watchlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.watchlist-item:last-child {
    border-bottom: none;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-name {
    font-weight: 600;
    color: #111827;
}

.price-range {
    font-size: 14px;
    color: #22c55e;
    font-weight: 500;
}

.location {
    font-size: 12px;
    color: #6b7280;
}

.item-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #6b7280;
}

.btn-icon:hover {
    background-color: #f3f4f6;
}

/* Notifications Card */
.notification-items {
    margin-bottom: 20px;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.success {
    background-color: #dcfce7;
    color: #16a34a;
}

.notification-icon.warning {
    background-color: #fef3c7;
    color: #d97706;
}

.notification-icon i {
    width: 16px;
    height: 16px;
}

.notification-content {
    flex: 1;
}

.notification-text {
    display: block;
    color: #374151;
    margin-bottom: 8px;
}

.notification-actions {
    display: flex;
    gap: 12px;
}

.btn-link {
    background: none;
    border: none;
    color: #22c55e;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover {
    color: #16a34a;
}

/* CO2 Tracker Card */
.co2-contribution {
    text-align: center;
    margin-bottom: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 8px;
}

.contribution-label {
    display: block;
    font-size: 14px;
    color: #374151;
    margin-bottom: 4px;
}

.contribution-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #22c55e;
}

.chart-container {
    height: 250px;
    margin-bottom: 20px;
    position: relative;
}

/* Quick Actions Card */
.quick-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: #374151;
}

.quick-action-btn:hover {
    background: #f3f4f6;
    border-color: #22c55e;
    transform: translateY(-1px);
}

.quick-action-btn i {
    width: 24px;
    height: 24px;
    color: #22c55e;
}

.quick-action-btn span {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

/* Footer */
.dashboard-footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 24px 40px;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    padding: 8px;
    border-radius: 4px;
    display: inline-block;
}

.footer-links a:hover,
.footer-links a:active,
.footer-links a:focus {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.footer-info {
    color: #9ca3af;
    font-size: 14px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: #f3f4f6;
}

.modal-body {
    padding: 24px;
}

/* Product Info Renderer Styles for Modal */
.modal-body .product-info {
    margin-bottom: 20px;
}

.modal-body .product-category-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.modal-body .product-overview {
    margin-bottom: 24px;
}

.modal-body .product-overview h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.modal-body .overview-content {
    color: #4b5563;
    line-height: 1.6;
}

.modal-body .product-details-section {
    margin-bottom: 24px;
}

.modal-body .product-details-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.modal-body .product-overview-text {
    margin: 16px 0;
    padding: 12px 0;
}

.modal-body .product-overview-text p {
    color: #4b5563;
    line-height: 1.7;
    margin: 0;
    font-size: 0.9375rem;
}

.modal-body .product-key-facts {
    margin-bottom: 24px;
    background-color: #f9fafb;
    padding: 16px;
    border-radius: 8px;
}

.modal-body .product-key-facts h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.modal-body .product-key-facts-content {
    background-color: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    margin-top: 12px;
}

.modal-body .key-facts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-body .key-facts-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
}

.modal-body .key-facts-list li:last-child {
    border-bottom: none;
}

.modal-body .key-facts-list strong {
    color: #1f2937;
    font-weight: 600;
}

.modal-body .product-modal-image {
    margin: 12px 0 16px 0;
    text-align: center;
}

.modal-body .product-modal-image img {
    max-width: 200px;
    max-height: 150px;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.estimation-result {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

.estimation-result h4 {
    font-size: 16px;
    font-weight: 600;
    color: #166534;
    margin-bottom: 12px;
}

.co2-estimate {
    font-size: 28px;
    font-weight: 700;
    color: #22c55e;
}

/* Button Variants */
.btn-outline {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* === LOGIN PAGE STYLES === */
.auth-container {
    min-height: 100vh;
    background: #f5f7fa;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container > div {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.auth-container h1 {
    color: #1f2937;
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.auth-links p {
    margin: 0.5rem 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.auth-links a {
    color: #22c55e;
    text-decoration: none;
    font-weight: 500;
}

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

/* Login Modal and Error Styles */
.modal-links {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.modal-links p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.modal-links a {
    color: #22c55e;
    text-decoration: none;
    font-weight: 500;
}

.modal-links a:hover {
    text-decoration: underline;
}

.error-message {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

/* Login page error and success messages - hide by default */
.auth-container .error,
.auth-container .success {
    display: none;
}

/* === REGISTER PAGE STYLES === */
.register-container {
    min-height: 100vh;
    background: #f5f7fa;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.register-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

.register-header .logo {
    font-size: 2rem;
    font-weight: 700;
    color: #22c55e;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.register-header h1 {
    color: #1f2937;
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.register-header p {
    color: #6b7280;
    font-size: 1rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

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

.form-group label {
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    width: 16px;
    height: 16px;
    color: #22c55e;
}

.form-group input {
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #1f2937;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input::placeholder {
    color: #9ca3af;
}

.form-group input:focus {
    outline: none;
    border-color: #22c55e;
    background: white;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-group input:hover {
    border-color: #9ca3af;
    background: white;
}

.register-container .btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.register-container .btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.3);
}

.register-container .btn:active:not(:disabled) {
    transform: translateY(0);
}

.register-container .btn:disabled {
    background: #374151;
    cursor: not-allowed;
    opacity: 0.6;
}

.register-container .error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.875rem;
    border-radius: 8px;
    font-size: 0.875rem;
    display: none;
}

.register-container .success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 0.875rem;
    border-radius: 8px;
    font-size: 0.875rem;
    display: none;
}

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

.auth-links p {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.auth-links a {
    color: #22c55e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-links a:hover {
    color: #16a34a;
}

/* Register Page Mobile Responsive */
@media (max-width: 640px) {
    .register-container {
        padding: 1rem;
    }
    
    .register-card {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .register-header h1 {
        font-size: 1.5rem;
    }
    
    .register-header .logo {
        font-size: 1.5rem;
    }
}

/* === PROFILE PAGE STYLES === */
.profile-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.user-info h1 {
    margin: 0;
    color: #1f2937;
    font-weight: 600;
}

.user-info p {
    margin: 5px 0;
    color: #6b7280;
}

.logout-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

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

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    color: #6b7280;
    font-weight: 500;
}

.tab-btn.active {
    border-bottom-color: #22c55e;
    color: #22c55e;
}

.tab-btn:hover:not(.active) {
    color: #16a34a;
}

.tab-content {
    display: none;
}

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

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.form-group input {
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    background: #f9fafb;
    color: #1f2937;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #22c55e;
    background: white;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-group input:hover {
    border-color: #9ca3af;
    background: white;
}

.profile-container .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-container .btn-primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.profile-container .btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.3);
}

.profile-container .btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.profile-container .btn-success:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.3);
}

.profile-container .btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.profile-container .error {
    color: #dc2626;
    background: #fef2f2;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-bottom: 15px;
    display: none;
    font-size: 0.875rem;
}

.profile-container .success {
    color: #16a34a;
    background: #f0fdf4;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
    margin-bottom: 15px;
    display: none;
    font-size: 0.875rem;
}

.info-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.info-card:hover {
    border-color: #22c55e;
    box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.1);
}

.info-card h4 {
    margin: 0 0 8px 0;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-card p {
    margin: 0;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 500;
}

/* Profile Page Mobile Responsive */
@media (max-width: 768px) {
    .profile-container {
        margin: 10px;
        padding: 20px;
    }
    
    .profile-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .form-row {
        flex-direction: column;
        grid-template-columns: 1fr !important;
    }

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

    #createOrderForm .form-row {
        grid-template-columns: 1fr !important;
    }

    #localMarketFields {
        padding: 16px;
    }

    #localMarketFields .form-row {
        grid-template-columns: 1fr !important;
    }

    #localMarketFields::before {
        font-size: 14px;
        margin-bottom: 12px;
    }

    #globalOriginFields,
    #globalDestinationFields {
        grid-template-columns: 1fr !important;
    }

    .profile-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .info-display {
        grid-template-columns: 1fr;
    }
}

/* Navigation Button Styles */
.nav-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-btn-primary {
    background: #22c55e;
    color: white;
}

.nav-btn-primary:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.nav-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.nav-btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

/* Logout Button - Red Gradient Theme (matches dashboard) */
.nav-btn-logout {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
}

.nav-btn-logout:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

@media (max-width: 768px) {
    .dashboard-header {
        padding: 12px 20px;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .dashboard-header .logo {
        font-size: 26px;
        order: 0;
        margin: 0 auto;
        justify-content: center;
        width: 100%;
    }

    .dashboard-header .logo img {
        height: 31px !important;
        width: 31px !important;
    }

    .dashboard-header .language-selector {
        order: 2;
        margin: 0 !important;
    }

    .user-actions {
        gap: 8px;
        order: 1;
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    .header-buttons {
        flex-direction: row !important;
        width: auto !important;
        gap: 8px !important;
    }

    .user-info {
        text-align: center;
        padding: 8px;
        background: #f3f4f6;
        border-radius: 6px;
        margin-bottom: 8px;
    }

    .header-buttons {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

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

    .nav-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* === PRODUCT SEARCH AUTOCOMPLETE STYLES === */
.search-container {
    position: relative;
    width: 100%;
}

.search-container input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
}

.search-container input[type="text"]:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e8ed;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.15s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.active {
    background-color: #f8f9fa;
}

.suggestion-item strong {
    color: #1a1a1a;
    font-weight: 600;
}

.suggestion-item small {
    color: #666;
    font-size: 12px;
    line-height: 1.3;
}

/* Ensure suggestions appear above other form elements */
.form-group {
    position: relative;
    z-index: 1;
}

.form-group:has(.search-container) {
    z-index: 10;
}

/* Loading state for search input */
.search-container input[type="text"].loading {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23666' d='M10 3.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM2 10a8 8 0 1116 0 8 8 0 01-16 0z'/%3E%3Cpath fill='%23666' d='M10 5a5 5 0 00-5 5h1.5a3.5 3.5 0 117 0H15a5 5 0 00-5-5z'%3E%3CanimateTransform attributeName='transform' attributeType='XML' dur='1s' from='0 10 10' repeatCount='indefinite' to='360 10 10' type='rotate'/%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    background-size: 16px 16px;
    padding-right: 40px;
}

/* Auto-selected field styling */
select.auto-selected {
    background-color: #f0f8ff !important;
    background-image: linear-gradient(45deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    border-left: 3px solid #4CAF50;
    position: relative;
}

select.auto-selected::after {
    content: '🤖';
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.7;
}

/* Tooltip for auto-selected fields */
.auto-selected-tooltip {
    position: absolute;
    top: -25px;
    right: 0;
    background: #4CAF50;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0.9;
    pointer-events: none;
}

.auto-selected-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #4CAF50;
}

/* Animations for notification messages */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* MARKETPLACE PAGE STYLES */
.marketplace-header {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.marketplace-header .navbar {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.marketplace-header .logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.marketplace-header .nav-links {
    display: flex;
    gap: 2rem;
}

.marketplace-header .nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.marketplace-header .nav-links a:hover,
.marketplace-header .nav-links a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

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

.marketplace-hero {
    background: linear-gradient(135deg, #1e3a2a 0%, #22c55e 100%);
    color: white;
    padding: 80px 40px;
    text-align: center;
}

/* Match home hero style for marketplace hero */
@media (max-width: 900px) {
    .marketplace-hero {
        padding: 60px 20px;
    }
    .marketplace-hero h1 {
        font-size: 32px;
    }
    .marketplace-hero p {
        font-size: 20px;
    }
}

.marketplace-hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 800;
}

.marketplace-hero p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
    /* Remove max-width and centering for home style */
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.marketplace-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    padding: 40px;
    max-width: 1200px;
    margin: -40px auto 40px;
}

.marketplace-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    gap: 2rem;
}

.filters-sidebar {
    flex: 0 0 300px;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 2rem;
}

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

.filters-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #111827;
}

.btn-link {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

.btn-link:hover {
    color: #22c55e;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

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

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

.filter-select:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

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

.price-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
}

.price-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.apply-filters-btn {
    width: 100%;
    margin-top: 1rem;
}

.marketplace-content {
    flex: 1;
}

.marketplace-orders-container {
    width: 100%;
    margin-bottom: 2rem;
}

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

.search-container {
    display: flex;
    flex: 1;
    max-width: 400px;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.search-btn {
    padding: 0.75rem 1rem;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 1rem;
}

.search-btn:hover {
    background: #16a34a;
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-container label {
    font-size: 0.9rem;
    color: #6b7280;
}

.sort-select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
}

.results-count {
    color: #6b7280;
    font-size: 0.9rem;
}

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

.order-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem 0.5rem;
}

.order-type {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.order-type.buy {
    background: #dbeafe;
    color: #1d4ed8;
}

.order-type.sell {
    background: #fee2e2;
    color: #dc2626;
}

.order-date {
    font-size: 0.8rem;
    color: #6b7280;
}

.order-content {
    padding: 0 1.25rem 1.25rem;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

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

.detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.detail-item .label {
    color: #6b7280;
}

.detail-item .value {
    font-weight: 500;
    color: #111827;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.trader-info {
    flex: 1;
}

.company {
    display: block;
    font-weight: 500;
    color: #111827;
    font-size: 0.9rem;
}

.rating {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.contact-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Price teaser for marketplace (anonymous users) */
.price-teaser {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    flex: 1;
}

.price-lock {
    font-size: 1.2rem;
}

.price-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #92400e;
}

/* Loading state */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #22c55e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-state p {
    color: #6b7280;
    font-size: 1rem;
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

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

.empty-state h3 {
    font-size: 1.5rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Error state */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.error-state h3 {
    font-size: 1.5rem;
    color: #dc2626;
    margin-bottom: 0.5rem;
}

.error-state p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.page-btn:hover:not(:disabled) {
    background: #f9fafb;
}

.page-btn.active {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

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

/* === ROLES EDITING STYLES === */
.roles-section {
    padding: 24px;
}

.roles-container {
    margin-bottom: 24px;
}

.segment-group {
    margin-bottom: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.segment-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.segment-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.segment-subtitle {
    font-size: 14px;
    color: #6b7280;
    font-style: italic;
}

.subsegments-list {
    padding: 20px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.role-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
}

.role-item:hover {
    background: #f1f5f9;
    border-color: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.role-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #22c55e;
    cursor: pointer;
    align-self: flex-start;
    margin-top: 2px;
}

.role-label {
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
}

.role-description {
    font-size: 14px;
    color: #6b7280;
    font-style: italic;
}

.no-roles {
    padding: 20px 24px;
    text-align: center;
    color: #9ca3af;
    font-style: italic;
}

.roles-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.btn-save-roles {
    background: #22c55e;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-save-roles:hover {
    background: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-save-roles:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loading-roles {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.roles-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: none;
}

.roles-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: none;
}

/* === ADDRESS MANAGEMENT STYLES === */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    margin: 50px auto;
}

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

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    font-size: 24px;
    line-height: 1;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: #f3f4f6;
}

.modal-body {
    padding: 24px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin: 20px 0;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.empty-state p {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
}

/* Addresses Section */
.addresses-section {
    margin-bottom: 32px;
}

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

.section-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.addresses-container {
    min-height: 200px;
}

.addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 16px;
}

/* Address Cards */
.address-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.address-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.address-type-badge {
    background: #22c55e;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.address-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit {
    color: #f59e0b;
}

.btn-edit:hover {
    background-color: #fef3c7;
    color: #d97706;
}

.btn-delete {
    color: #ef4444;
}

.btn-delete:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

.address-content {
    padding: 20px;
}

.address-details {
    margin-bottom: 16px;
}

.address-line {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.4;
}

.location-line {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.postal-code {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.business-info {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
}

.business-info div {
    margin-bottom: 4px;
}

.business-info div:last-child {
    margin-bottom: 0;
}

/* Form Sections */
.form-section {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.form-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row:last-child {
    margin-bottom: 0;
}

/* Local Market Fields Styling */
#localMarketFields {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

#localMarketFields::before {
    content: "📍 Local Location Details";
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
    font-size: 15px;
    grid-column: 1 / -1;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;

#localMarketFields .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#localMarketFields .form-group label {
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

#localMarketFields .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    transition: border-color 0.2s;
}

#localMarketFields .form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

/* Required Field Indicator */
.required {
    color: #ef4444;
    font-weight: 600;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-style: italic;
}

/* Error and Success Messages */
.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Responsive Design for Addresses */
@media (max-width: 768px) {
    .addresses-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

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

    .modal-content {
        width: 95%;
        margin: 20px;
        max-height: 95vh;
    }

    .address-header {
        padding: 12px 16px;
    }

    .address-content {
        padding: 16px;
    }

    .form-section {
        padding: 16px;
    }

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

    .btn {
        width: 100%;
    }
}

/* Addresses Table Styles */
.addresses-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow-x: auto;
    border: 1px solid #e5e7eb;
}

.addresses-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.addresses-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
}

.addresses-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.addresses-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.addresses-table tbody tr:hover,
tbody tr:active {
    background: #f9fafb;
}

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

/* Table Cell Styles */
.address-type-cell {
    min-width: 120px;
}

.address-cell {
    min-width: 200px;
    max-width: 300px;
    word-wrap: break-word;
}

.location-cell {
    min-width: 180px;
    max-width: 250px;
    word-wrap: break-word;
}

.business-cell {
    min-width: 150px;
    max-width: 200px;
    font-size: 13px;
    color: #6b7280;
}

.business-cell br {
    margin-bottom: 4px;
}

.actions-cell {
    min-width: 120px;
    text-align: center;
}

/* Table Button Styles */
.actions-cell .btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    margin: 0 2px;
    transition: all 0.2s;
}

.actions-cell .btn-edit {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #f59e0b;
}

.actions-cell .btn-edit:hover {
    background: #fde68a;
    color: #b45309;
    transform: translateY(-1px);
}

.actions-cell .btn-delete {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #ef4444;
}

.actions-cell .btn-delete:hover {
    background: #fecaca;
    color: #b91c1c;
    transform: translateY(-1px);
}

/* Responsive Table Styles */
@media (max-width: 1024px) {
    .addresses-table-container {
        font-size: 13px;
    }

    .addresses-table th,
    .addresses-table td {
        padding: 12px 8px;
    }

    .address-cell,
    .location-cell {
        max-width: 200px;
    }

    .actions-cell .btn-icon {
        padding: 4px 8px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .addresses-table-container {
        border-radius: 8px;
    }

    .addresses-table {
        font-size: 12px;
        min-width: 600px; /* Ensure table doesn't get too cramped */
    }

    .addresses-table th,
    .addresses-table td {
        padding: 8px 6px;
    }

    .address-cell,
    .location-cell,
    .business-cell {
        max-width: 150px;
    }

    .actions-cell {
        min-width: 100px;
    }

    .actions-cell .btn-icon {
        padding: 4px 6px;
        font-size: 11px;
        margin: 0 1px;
    }
}


#localMarketFields .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

#localMarketFields .form-row:last-child {
    margin-bottom: 0;
}
