:root {
    --color-primary: #fff;

    --color-secondary: #222222ff;
    --color-comp: #2851cbff;
    --font-primary: sans-serif;
    --color-headerhover: #7f7f7fff;
    --accent: #10b981;
    --warning: #f59e0b;
    --warning-bg: #fff7ed;
    --text: #111827;
    --muted: #6b7280;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    border: none;
    text-decoration: none;
    text-transform: capitalize;
    transition: all .2s linear;
    font-family: 'Poppins', sans-serif;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: 7rem;
    font-size: 62.5%;
}

body {
    background: whitesmoke;
    overflow-x: hidden;
}

.profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
}

.profile span {
    font-size: 1rem;
    font-weight: 500;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: #fff;
    border-right: 1px solid #ddd;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    margin-top: 8rem;
}

.sidebar h2 {
    margin-bottom: 2rem;
    font-size: 1.4rem;
    font-weight: bold;
    color: #111;
    text-align: center;
}

.sidebar a {
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: var(--color-comp);
    font-size: 1rem;
    border-radius: 0.5rem;
    transition: all ease-in-out .6s;
    position: relative;
}

.sidebar a .unread-badge {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.sidebar a:hover,
.sidebar a.active {
    background: var(--color-comp);
    color: #fff;
    transform: translateX(1rem);
}

/* Main area */
.main {
    margin-left: 24rem;
    margin-top: 8rem;
    flex: 1;
    padding: 1rem;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s ease-in-out;
}

.content {
    display: none;
    background: #f7f7f7;
    padding: 1rem;
    animation: slideIn 0.4s ease-in-out;
}

.content.active {
    display: block;
}

.content h1 {
    font-size: 2rem;
    margin: 1rem 0;
}

.content p {
    font-size: 1.6rem;
    line-height: 1.6;
}

.main.slide-in {
    transform: translateX(0);
}

.main.slide-out {
    transform: translateX(100%);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.content .action-bar {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 1.2rem 0;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.4s ease-in-out;
}

.alert {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.alert a {
    color: #0073e6;
    font-weight: 500;
    text-decoration: none;
}

.badge {
    padding: 0.4rem 1rem;
    border-radius: 1rem;
    font-weight: 600;
    color: #fff;
    font-size: 1.3rem;
}

.badge.new-order {
    background: #28a745;
    /* green */
}

.badge.low-stock {
    background: #ffc107;
    /* yellow */
    color: #333;
}

.badge.payout {
    background: #17a2b8;
    /* teal/blue */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.overview-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    padding: 1rem;
}

.metric-card {
    background: #fff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.metric-card h3 {
    font-size: 1.4rem;
    color: #666;
    margin-bottom: 1rem;
    font-weight: 500;
}

.metric-value {
    font-size: 2.4rem;
    font-weight: 700;
    color: #222;
}

.trend {
    font-size: 1.2rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.trend.up {
    color: #28a745;
    /* green for positive */
}

.trend.down {
    color: #dc3545;
    /* red for negative */
}

.orders-module {
    margin: 3rem 0;
}

.orders-module h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #222;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.orders-table th,
.orders-table td {
    text-align: left;
    padding: 1.2rem;
    font-size: 1.4rem;
    border-bottom: 1px solid #eee;
}

.orders-table th {
    background: #f9f9f9;
    color: #555;
    font-weight: 600;
}

.orders-table tr:hover {
    background: #fafafa;
}

.badge {
    padding: 0.4rem 1rem;
    border-radius: 1.2rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.badge.new {
    background: #28a7451a;
    color: #28a745;
}

.badge.processing {
    background: #ffc1071a;
    color: #ffc107;
}

.badge.shipped {
    background: #6c757d1a;
    color: #6c757d;
}

.btn-view {
    background: var(--color-comp);
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.btn-view:hover {
    background: #1e3c99;
}

.product-performance {
    margin: 3rem 0;
}

.product-performance h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #222;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.products-table th,
.products-table td {
    padding: 1.2rem;
    text-align: left;
    font-size: 1.4rem;
    border-bottom: 1px solid #eee;
}

.products-table th {
    background: #f9f9f9;
    font-weight: 600;
    color: #555;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-info img {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    object-fit: cover;
}

.stock {
    font-weight: 600;
}

.stock.low {
    color: #ff9800;
}

.stock.normal {
    color: #28a745;
}

.stock.critical {
    color: #e53935;
}

.chart-toggle {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--color-comp);
    cursor: pointer;
}

.chart-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    opacity: 0;
}

.chart-panel.active {
    max-height: 200px;
    opacity: 1;
    margin-top: 1rem;
}

/* Earnings & Payouts */
.payouts-module {
    background: #fff;
    padding: 2rem;
    border-radius: 1rem;
    margin-top: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.payouts-module h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: #222;
}

.payouts-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.available-balance {
    flex: 1;
    min-width: 250px;
}

.available-balance p {
    font-size: 1.4rem;
    color: #666;
}

.available-balance h1 {
    font-size: 3rem;
    margin: 1rem 0;
    color: #2e7d32;
    /* green accent */
}

.cta-btn {
    background: #2e7d32;
    color: #fff;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.6rem;
    cursor: pointer;
    font-size: 1.4rem;
    transition: background 0.3s;
}

.cta-btn:hover {
    background: #256427;
}

.payout-history {
    flex: 1;
    min-width: 250px;
}

.payout-history h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.payout-history ul {
    list-style: none;
    padding: 0;
}

.payout-history li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    font-size: 1.4rem;
    display: flex;
    justify-content: space-between;
}

/* Order Alert Banner */
.order-alert {
    background: #e65100;
    /* burnt orange */
    color: #fff;
    padding: 1rem 2rem;
    font-size: 1.4rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0.4rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.order-alert span {
    flex: 1;
}

.order-alert button {
    background: #fff;
    color: #e65100;
    border: none;
    padding: 0.6rem 1.2rem;
    font-size: 1.2rem;
    border-radius: 0.4rem;
    cursor: pointer;
    margin-right: 1rem;
    transition: background 0.3s;
}

.order-alert button:hover {
    background: #ffe0b2;
}

.close-alert {
    cursor: pointer;
    font-size: 1.6rem;
    font-weight: bold;
    margin-left: 0.5rem;
    max-width: 2rem;
}

.orders-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.orders-search input {
    padding: 0.8rem 1.2rem;
    border: 1px solid #ccc;
    border-radius: 0.6rem;
    width: 260px;
}

.orders-search label {
    font-size: 2rem;
    padding-left: 1rem;
    color: var(--color-comp);
    cursor: pointer;
}

.orders-filters {
    display: flex;
    gap: 1rem;
}

.orders-filters .filter-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 0.6rem;
    cursor: pointer;
    background: #f0f0f0;
    transition: background 0.2s ease;
}

.orders-filters .filter-btn.active {
    background: #ff9800;
    /* Highlighted color for active filter */
    color: white;
}

.orders-sort select {
    padding: 0.6rem;
    border-radius: 0.6rem;
    border: 1px solid #ccc;
}

/* Orders Table Section */
.orders-table {
    background: #fff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    /* mobile friendly */
}

.orders-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.4rem;
    color: #333;
}

/* Table Header */
.orders-table thead {
    background: #f5f5f5;
}

.orders-table th {
    text-align: left;
    padding: 1.2rem;
    font-weight: 600;
    color: #444;
    border-bottom: 2px solid #eaeaea;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Table Rows */
.orders-table td {
    padding: 1.2rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.orders-table tr:hover {
    background: #fafafa;
    transition: background 0.2s ease-in-out;
}

/* Status Badges */
.status {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    font-size: 1.2rem;
    font-weight: 500;
    border-radius: 0.6rem;
    text-transform: capitalize;
}

.status.new {
    background: #4caf50;
    color: white;
}

.status.transit {
    background: #2196f3;
    color: white;
}

.status.completed {
    background: #9c27b0;
    color: white;
}

.status.canceled {
    background: #f44336;
    color: white;
}

/* Action Button */
.view-btn {
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 0.6rem;
    cursor: pointer;
    background: #2851cb;
    color: white;
    transition: background 0.2s ease-in-out;
}

.view-btn:hover {
    background: #1e3d99;
}

.view-btn {
    background-color: var(--color-comp);
    width: 9rem;
    height: 3rem;
    border-radius: 5px;
    color: var(--color-primary);
}

.order-details-panel {
    display: none;
    margin-top: 2rem;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: opacity .18s ease, transform .18s ease;
    transform: translateY(-8px);
    opacity: 0;
}

.order-details-panel.open {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.order-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-panel {
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
}

.order-items ul {
    list-style: none;
    padding: 0;
}

.order-items li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.order-items img {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    border-radius: 0.5rem;
}

.order-costs .total {
    font-weight: bold;
    color: green;
}

.order-actions {
    margin-top: 1.5rem;
}

.order-actions .btn {
    margin-right: 1rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
}

.btn.primary {
    background: #007bff;
    color: #fff;
}

.btn.secondary {
    background: #6c757d;
    color: #fff;
}

.btn.update {
    background: #ffc107;
    color: #000;
}


footer {
    background: #111827;
    color: #f3f4f6;
    padding: 60px 20px 30px;
    text-align: center;
    opacity: 1;
    transition: all 0.8s ease;
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: left;
}

.footer-logo h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #f9fafb;
}

.footer-logo p {
    font-size: 0.95rem;
    color: #d1d5db;
}

.footer-links h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
    color: #f3f4f6;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 8px;
}

.footer-links ul li a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: #f3f4f6;
}

.social-icons {
    margin-top: 15px;
}

.social-icons a {
    display: inline-block;
    margin-right: 10px;
    color: #9ca3af;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #f3f4f6;
}

.footer-bottom {
    margin-top: 40px;
    border-top: 1px solid #374151;
    padding-top: 15px;
    font-size: 0.85rem;
    color: #9ca3af;
    text-align: center;
}

.page-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0;
}

/* Title */
.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

/* CTA */
.primary-cta {
    background: var(--accent);
    color: #fff;
    border: 0;
    padding: .55rem .9rem;
    border-radius: .5rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.08);
    transition: transform .12s ease, box-shadow .12s;
}

.primary-cta:focus {
    outline: 3px solid rgba(16, 185, 129, 0.18);
}

.primary-cta:hover {
    transform: translateY(-2px);
}

/* Inventory banner base (hidden by default via data-visible attr) */
.inventory-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: .6rem;
    border-left: 4px solid var(--warning);
    background: var(--warning-bg);
    padding: .6rem 1rem;
    box-shadow: 0 6px 18px rgba(18, 18, 18, 0.03);
    margin-bottom: 1rem;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform-origin: top center;
    transition: max-height .28s cubic-bezier(.2, .9, .2, 1), opacity .18s ease, padding .2s ease;
}

/* When visible */
.inventory-banner[data-visible="true"] {
    max-height: 200px;
    /* large enough to show content */
    opacity: 1;
    padding: .6rem 1rem;
}

/* Banner pieces */
.banner-left {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.banner-icon {
    font-size: 1.15rem;
}

.banner-text {
    font-weight: 500;
    color: #78350f;
}

/* Actions */
.banner-actions {
    display: flex;
    gap: .6rem;
    align-items: center;
}

.banner-link {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: .45rem .7rem;
    border-radius: .45rem;
    cursor: pointer;
    font-weight: 600;
}

.banner-link:focus {
    outline: 3px solid rgba(0, 0, 0, 0.06);
}

.banner-close {
    background: transparent;
    border: 0;
    padding: .2rem .5rem;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    color: var(--muted);
}

.banner-close:focus {
    outline: 3px solid rgba(0, 0, 0, 0.06);
}

/* Modal overlay */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.2s ease;
}

/* Show modal when active */
.modal.active {
    display: flex;
    opacity: 1;
}

/* Modal box */
.modal-content {
    background: #fff;
    width: 90%;
    max-width: 500px;
    border-radius: 0.8rem;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    animation: scaleIn 0.25s ease;
}

/* Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

/* Close button */
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #555;
}

/* Form elements */
.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-content label {
    font-size: 0.9rem;
    font-weight: 600;
}

.modal-content input,
.modal-content textarea {
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    font-size: 0.95rem;
}

.modal-content textarea {
    resize: vertical;
}

/* Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
}

.primary-cta {
    background: var(--accent, #10b981);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
}

.primary-cta:hover {
    opacity: 0.9;
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}


#specsContainer {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.spec-row {
    display: flex;
    gap: 0.5rem;
}

.spec-row input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 0.4rem;
}

.remove-spec {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 0.4rem;
    padding: 0.4rem 0.7rem;
    cursor: pointer;
}

.search-filters {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.search-bar {
    display: flex;
    gap: 0.8rem;
}

.search-bar input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1.4rem;
}

.search-btn {
    padding: 0.8rem 1.2rem;
    background: var(--accent-color, #10b981);
    /* emerald default */
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    cursor: pointer;
}

.status-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.filter-tab {
    padding: 0.6rem 1.2rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 1.3rem;
}

.filter-tab.active {
    background: var(--accent-color, #10b981);
    color: white;
    border: none;
}

.filter-tab.warning {
    background: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
    font-weight: 500;
}

.sort-by {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.3rem;
}

.product-table-wrapper {
    overflow-x: auto;
    margin-top: 1.5rem;
}

.product-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.4rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.product-table th,
.product-table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.product-table th {
    background: #f9fafb;
    font-weight: 600;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-info img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 500;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-draft {
    background: #e5e7eb;
    color: #374151;
}

.status-low {
    background: #fef3c7;
    color: #92400e;
}

.stock-low {
    color: #b91c1c;
    font-weight: bold;
}

.action-icons {
    display: flex;
    gap: 0.8rem;
    cursor: pointer;
}

.action-icons .btn {
    font-size: 1.6rem;
    background: var(--accent);
    border: 2px solid var(--accent);
    color: var(--color-primary);
    transition: color 0.2s ease;
    cursor: pointer;
}

.action-icons .delete-btn {
    background: red;
    border: 2px solid red;
}

.quick-edit-panel {
    position: fixed;
    top: 0;
    right: -400px;
    opacity: 0;
    pointer-events: none;
    width: 350px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 6px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    padding: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
    overflow-y: auto;
}

.quick-edit-panel.view {
    right: 0;
    opacity: 1;
    pointer-events: all;
}

.quick-edit-panel::-webkit-scrollbar {
    width: 6px;
}

.quick-edit-panel::-webkit-scrollbar-track {
    background: transparent;
}

.quick-edit-panel::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 600;
}

.panel-header button {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #555;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    padding: 0.6rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1.4rem;
}

.form-group.error input {
    border-color: #ff4444;
}

.error-message {
    color: #ff4444;
    font-size: 1.2rem;
    margin-top: 0.4rem;
}

.form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h4 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 1rem;
}

/* --- Specs --- */
.specs-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.spec-row {
    display: grid;
    grid-template-columns: 1fr 1fr 40px;
    gap: 0.8rem;
    align-items: center;
}

.spec-row input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1.3rem;
}

.spec-row input:focus {
    border-color: var(--color-comp);
    box-shadow: 0 0 0 2px rgba(40, 81, 203, 0.1);
}

.remove-spec {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.remove-spec:hover {
    background: #ff1111;
}

/* --- Colors --- */
.colors-container {
    margin-bottom: 1.5rem;
}

.color-input-group {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
    align-items: center;
}

.color-input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1.3rem;
}

.color-preview {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.color-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.color-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 1.2rem;
}

.color-chip .color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.color-chip .remove-color {
    border: none;
    background: none;
    font-size: 1.6rem;
    color: #666;
    cursor: pointer;
    padding: 0 0.2rem;
}

/* --- Images --- */
.images-section {
    margin-bottom: 1.5rem;
}

.image-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.image-upload-area:hover {
    border-color: var(--color-comp);
    background-color: rgba(40, 81, 203, 0.02);
}

.upload-icon {
    font-size: 3rem;
    color: #666;
    margin-bottom: 1rem;
}

.upload-text {
    color: #666;
    font-size: 1.3rem;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 68, 68, 0.9);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.remove-image:hover {
    background: #ff4444;
}

/* Existing uploaded images wrapper and removed state */
.existing-image {
    position: relative;
}

.existing-image.removed {
    opacity: 0.55;
    filter: grayscale(80%);
    box-shadow: inset 0 0 0 3px rgba(220, 38, 38, 0.06);
}

.existing-image .remove-image {
    background: rgba(255, 68, 68, 0.9);
}

.existing-image.removed .remove-image {
    background: #ffd6d6;
    color: #800;
    transform: scale(1.02);
}

/* --- Buttons --- */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.action-btn {
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.2s;
}

.save-btn {
    background: var(--color-comp);
    color: white;
    border: none;
}

.save-btn:hover {
    background: #1e3d99;
    transform: translateY(-2px);
}

.cancel-btn {
    background: white;
    color: #666;
    border: 1px solid #ddd;
}

.cancel-btn:hover {
    background: #f5f5f5;
}

/* --- Loading --- */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--color-comp);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.spec-item {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    align-items: center;
}

.spec-item input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.removeSpecBtn {
    background: #e74c3c;
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    padding: 4px 8px;
}

.removeSpecBtn:hover {
    background: #c0392b;
}

#addSpecBtn,
#clearImagesBtn {
    background: #2851cb;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

#addSpecBtn,
#clearImagesBtn:hover {
    background: #1f3ea6;
}

.quick-edit-panel {
    pointer-events: auto;
}

.close-btn {
    cursor: pointer;
    z-index: 10;
}

.save-btn {
    background: var(--accent-color, #10b981);
    border: none;
    color: white;
    font-size: 1.4rem;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

/* ===============================================
   💬 CHAT EMPTY & FALLBACK STATES
   =============================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #777;
    font-size: 0.95rem;
    padding: 2rem 1rem;
    background: #fafafa;
    border-radius: 10px;
    border: 1px dashed #ccc;
    margin: 1rem;
    animation: fadeIn 0.4s ease-in-out;
}

.empty-state::before {
    content: "💬";
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* For different message types */
.empty-state[data-type="user"]::before {
    content: "⚠️";
}

.empty-state[data-type="conversations"]::before {
    content: "💬";
}

.empty-state[data-type="messages"]::before {
    content: "📭";
}

.empty-state[data-type="error"]::before {
    content: "🚫";
}

/* ===============================================
   🔄 LOADING STATE
   =============================================== */

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    gap: 8px;
}

.loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}


.messages-layout {
    display: flex;
    height: calc(100vh - 60px);
    background: #fafafa;
    overflow: hidden;
}

/* Left Panel: Conversation List */
.conversation-list {
    width: 30rem;
    border-right: 1px solid #ddd;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
}

.conversation {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.conversation:hover {
    background: #f9f9f9;
}

.conversation.active {
    background: #eef8f4;
    border-left: 4px solid var(--accent-color, #10b981);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color, #10b981);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.conversation-info h4 {
    margin: 0;
    font-size: 1rem;
}

.conversation-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.time {
    margin-left: auto;
    font-size: 0.75rem;
    color: #999;
}

/* Right Panel: Chat */
.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    position: relative;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f9f9f9;
}

.chat-header .back-btn {
    display: none;
    font-size: 1.2rem;
    cursor: pointer;
    background: none;
    border: none;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.message {
    max-width: 70%;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    position: relative;
    font-size: 0.9rem;
}

.message.sent {
    background: var(--accent-color, #10b981);
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 0;
}

.message.received {
    background: #f0f0f0;
    color: #333;
    margin-right: auto;
    border-bottom-left-radius: 0;
}

.message .time {
    display: block;
    font-size: 0.7rem;
    margin-top: 0.3rem;
    text-align: right;
    color: #666;
}

.chat-input {
    padding: 0.8rem;
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid #ddd;
}

.chat-input input {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 2rem;
    padding: 0.6rem 1rem;
    outline: none;
}

.chat-input .send-btn {
    margin-left: 0.5rem;
    background: var(--accent-color, #10b981);
    border: none;
    color: #fff;
    border-radius: 20px;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
}

/* Sidebar unread indicator */
a[data-target="messages"] {
    position: relative;
}

.unread-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: red;
    color: #fff;
    font-size: 0.7rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Left panel search */
.conversation-search {
    padding: 0.8rem;
    border-bottom: 1px solid #ddd;
}

.conversation-search input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 2rem;
    border: 1px solid #ccc;
    outline: none;
}

/* Flash animation for new messages */
@keyframes flash {
    0% {
        background-color: #eef8f4;
    }

    50% {
        background-color: #fff;
    }

    100% {
        background-color: #eef8f4;
    }
}

.conversation.flash {
    animation: flash 1s ease-in-out 1;
}

/* Chat context panel */
.chat-context {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #ddd;
    background: #f9f9f9;
}

.chat-context .context-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

.chat-context .context-name,
.chat-context .context-id {
    font-size: 0.85rem;
    color: #555;
}

/* Smooth message animation */
.message {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.message.show {
    opacity: 1;
    transform: translateY(0);
}

.earnings-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.earnings-card .earnings-main .label {
    display: block;
    font-size: 1rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.earnings-card .earnings-main .amount {
    font-size: 2.5rem;
    color: #bfa037;
    /* metallic gold accent */
    font-weight: bold;
}

.earnings-card .payout-summary {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #777;
}

.payout-history table {
    width: 100%;
    border-collapse: collapse;
}

.payout-history th,
.payout-history td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.payout-history th {
    background: #f9f9f9;
    font-weight: bold;
}

/* CTA Button */
.payout-btn {
    margin: 1rem 0;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    background: #bfa037;
    /* accent gold */
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payout-btn:hover {
    box-shadow: 0 0 10px #bfa037, 0 0 20px #bfa037;
    animation: pulse 1.2s infinite;
}

.payout-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    animation: none;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Payout Method */
.payout-method {
    margin: 0.75rem 0;
    font-size: 0.9rem;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payout-method a {
    font-size: 0.85rem;
    color: #bfa037;
    text-decoration: none;
}

.payout-method span {
    margin-right: 4px;
}

/* Transaction History Controls */
.history-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.history-controls input,
.history-controls select {
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    outline: none;
}

/* Status badges */
.status-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #fff;
}

.status-Completed {
    background: green;
}

.status-Pending {
    background: orange;
}

.status-Failed {
    background: red;
}

.accordion-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    padding: 1rem 1.5rem;
    background: #f9f9f9;
    cursor: pointer;
    font-weight: bold;
}

.accordion-header.danger {
    background: #ffe6e6;
    color: #d32f2f;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.5rem;
}

.accordion-item.active .accordion-content {
    padding: 1rem 1.5rem;
    max-height: 1000px;
    /* enough for content */
}

.save-btn,
.danger-btn {
    margin-top: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.save-btn {
    background: #bfa037;
    color: #fff;
}

.danger-btn {
    background: #d32f2f;
    color: #fff;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
}

input:checked+.slider {
    background-color: #bfa037;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* Hidden helper class */
.hidden {
    display: none;
}

/* Accordion Item */
.accordion-item {
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Accordion Header */
.accordion-header {
    padding: 1rem 1.5rem;
    background-color: #f4f4f4;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: #eaeaea;
}

/* Accordion Content */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 1.5rem;
}

.accordion-item.active .accordion-content {
    padding: 1rem 1.5rem;
    max-height: 800px;
    /* enough to fit all content */
}

/* Sections */
.section {
    margin-bottom: 1.5rem;
}

.section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

/* Inputs */
.section input,
.section textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-bottom: 0.7rem;
    font-size: 0.95rem;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.section input:focus,
.section textarea:focus {
    border-color: #bfa037;
    box-shadow: 0 0 5px rgba(191, 160, 55, 0.3);
}

/* Buttons */
.save-btn {
    padding: 0.6rem 1.2rem;
    background-color: #bfa037;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.2s ease;
}

.save-btn:hover {
    background-color: #a98c2d;
    transform: translateY(-1px);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
}

input:checked+.slider {
    background-color: #bfa037;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* Hidden helper class */
.hidden {
    display: none;
}

/* Email Edit Link */
#currentEmail a {
    color: #bfa037;
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: 5px;
}

#currentEmail a:hover {
    text-decoration: underline;
}

/* Accordion Item (all sections) */
.accordion-item {
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Accordion Header */
.accordion-header {
    padding: 1rem 1.5rem;
    background-color: #f4f4f4;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: #eaeaea;
}

.accordion-header.danger {
    background-color: #ffe6e6;
    color: #d32f2f;
}

/* Accordion Content */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 1.5rem;
}

.accordion-item.active .accordion-content {
    padding: 1rem 1.5rem;
    max-height: 1000px;
    /* enough for content */
}

/* Inputs & Textareas */
.accordion-content input,
.accordion-content textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-bottom: 0.7rem;
    font-size: 0.95rem;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.accordion-content input:focus,
.accordion-content textarea:focus {
    border-color: #bfa037;
    box-shadow: 0 0 5px rgba(191, 160, 55, 0.3);
}

/* Buttons */
.save-btn,
.danger-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.2s ease;
}

.save-btn {
    background-color: #bfa037;
    color: #fff;
}

.save-btn:hover {
    background-color: #a98c2d;
    transform: translateY(-1px);
}

.danger-btn {
    background-color: #d32f2f;
    color: #fff;
}

.danger-btn:hover {
    background-color: #b22222;
    transform: translateY(-1px);
}

/* Upload Area */
.upload-area {
    padding: 0.75rem;
    border: 2px dashed #ccc;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.upload-area:hover {
    border-color: #bfa037;
    background-color: #f9f9f9;
}

.upload-area p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #555;
}

/* Notification Preferences Items */
.notif-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
}

.notif-item:last-child {
    border-bottom: none;
}

/* Pickup Options */
.pickup-options label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
}

input:checked+.slider {
    background-color: #bfa037;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.sidebar-toggle {
    display: none;
}

/* 🌤 Empty State Styles */
.empty-row td {
    text-align: center;
    padding: 40px 0;
    background: #fafafa;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #777;
    gap: 10px;
}

.empty-state img {
    width: 100px;
    opacity: 0.6;
}

.empty-state p {
    font-size: 15px;
    color: #555;
    margin: 0;
}

/* 💬 Status Badges */
.status-badge {
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-failed,
.status-error {
    background-color: #f8d7da;
    color: #721c24;
}

/* 🧾 Disabled Button */
button.disabled,
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Accommodation section reuse styles */
#listings .modal-content {
    max-width: 600px;
}

#listings .checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 6px;
    margin-bottom: 12px;
}

#listings .preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

#listings .preview img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
}

#listings .btn-clear {
    background: #f2f2f2;
    border: none;
    padding: 5px 10px;
    color: #333;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 8px;
}

#listings .btn-clear:hover {
    background: #ddd;
}

#listings .page-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#listings .modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

#listings video {
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-top: 8px;
}

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ccc;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch::after {
    content: "×";
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    font-size: 12px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    cursor: pointer;
    display: none;
}

.color-swatch:hover::after {
    display: block;
}

.color-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Max-width 960px */
@media screen and (max-width: 960px) {
    .sidebar {
        width: 200px;
    }

    .main {
        margin-left: 200px;
    }

    .overview-metrics {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .orders-table,
    .products-table {
        font-size: 0.9rem;
    }

    .action-bar .alert {
        font-size: 0.9rem;
    }

    .product-info img {
        width: 50px;
        height: 50px;
    }
}

@media screen and (max-width: 820px) {
    html {
        font-size: 55%;
    }

    .sidebar {
        position: fixed;
        left: -250px;
        top: 0;
        width: 250px;
        height: 100%;
        padding-top: 60px;
        transition: left 0.3s ease-in-out;
        z-index: 1000;
    }

    .sidebar.open {
        left: 0;
    }

    .main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
        position: relative;
        z-index: 1100;
        color: var(--color-comp);
        border: none;
        font-size: 1.8rem;
        padding: 0.5rem 0.8rem;
        border-radius: 6px;
        cursor: pointer;
    }

    .messages-layout {
        flex-direction: column;
    }

    .conversation-list,
    .chat-panel {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        transition: transform 0.3s ease-in-out;
    }

    .conversation-list {
        background: #f9f9f9;
        z-index: 100;
        transform: translateX(0);
    }

    .conversation-list.hidden {
        transform: translateX(-100%);
    }

    .chat-panel {
        background: #fff;
        z-index: 90;
        transform: translateX(100%);
    }

    .chat-panel.active {
        transform: translateX(0);
    }

    .chat-header .back-btn {
        display: inline-block;
    }
}

/* ================================
   UNREAD BADGE FOR MESSAGES TAB
   ================================ */

.sidebar a {
    position: relative;
}

.sidebar a .unread-badge {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    animation: pulse-badge 1.5s infinite;
}

@keyframes pulse-badge {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% { 
        box-shadow: 0 0 0 5px rgba(239, 68, 68, 0);
    }
}

@media screen and (max-width: 460px) {

    html {
        font-size: 45%;
    }
}

@media screen and (max-width: 360px) {

    html {
        font-size: 40%;
    }
}