/* =========================
   HEADER STYLING
========================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #080c12;
    color: white;
    overflow-x: hidden;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 clamp(16px, 4vw, 40px);
    background: rgba(11, 15, 21, 0.95);
    border-bottom: 1px solid #1f2937;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.dashboard-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dashboard-logo {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 1.5px;
    color: #e5c36d;
    text-decoration: none;
}

.dashboard-user {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #9ca3af;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--branding-accent);
    text-decoration: none;
    flex-shrink: 0;
}

.brand img {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--primary-accent);
}

.brand > span {
    display: flex;
    flex-direction: column;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--text-main);
}

.brand small {
    margin-top: 2px;
    color: var(--branding-accent);
    font-size: 9px;
    letter-spacing: 2px;
}

.listings-back {
    color: #e5c36d;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.listings-back:hover {
    text-decoration: underline;
}

/* Mobile Sidebar Toggle Button */
.mobile-sidebar-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 38px;
    height: 36px;
    padding: 8px;
    background: #0a0a0a;
    border: 1px solid #1f2937;
    border-radius: 8px;
    cursor: pointer;
}

.mobile-sidebar-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #e5c36d;
    border-radius: 2px;
}


/* =========================
   DASHBOARD LAYOUT & SIDEBAR
========================= */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 70px);
    background-color: #080c12;
    position: relative;
}

.dashboard-sidebar {
    width: 240px;
    flex-shrink: 0;
    background-color: #080c12;
    border-right: 1px solid #1f2937;
    padding: 25px 15px;
    transition: transform 0.3s ease;
}

.seller-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid #141414;
    padding-bottom: 20px;
}

.seller-avatar {
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: #000000;
    border: 1px solid #e5c36d;
    color: #e5c36d;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.seller-profile h3 {
    margin: 0 0 4px;
    color: #ffffff;
    font-size: 14px;
}

.seller-profile p {
    margin: 0;
    color: #929daa;
    font-size: 12px;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dashboard-nav a {
    padding: 12px 14px;
    border-radius: 8px;
    color: #d1d5db;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
}

.dashboard-nav a:hover {
    background-color: #0d131b;
    color: #ffffff;
}

.dashboard-nav a.active {
    background-color: #121b26;
    color: #e5c36d;
    border-left: 3px solid #e5c36d;
    font-weight: 600;
}


/* =========================
   PAGE CONTAINER & LAYOUT
========================= */
.my-listings-page {
    flex: 1;
    min-height: calc(100vh - 70px);
    padding: 30px clamp(16px, 3vw, 40px);
    background-color: #080c12;
    color: white;
    min-width: 0;
}

.listings-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    border-bottom: 1px solid #1f2937;
    padding-bottom: 20px;
}

.listings-title h1 {
    margin: 0 0 6px;
    font-size: clamp(22px, 3vw, 26px);
    font-weight: 700;
    color: #ffffff;
}

.listings-title p {
    margin: 0;
    color: #929daa;
    font-size: 13px;
}

/* Header Action Button */
.dashboard-add-button {
    background: #d4b45b;
    color: #080c12;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(212, 180, 91, 0.2);
}

.dashboard-add-button:hover {
    background: #e5c36d;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(212, 180, 91, 0.3);
}


/* =========================
   SUMMARY CARDS
========================= */
.listing-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.listing-summary-card {
    padding: 20px;
    background: #10161e;
    border: 1px solid #222b36;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: border-color 0.2s ease;
}

.listing-summary-card:hover {
    border-color: #2e3a4a;
}

.listing-summary-card span {
    color: #929daa;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.listing-summary-card h2 {
    margin: 8px 0 0;
    font-size: 24px;
    font-weight: 700;
    color: #e5c36d;
}


/* =========================
   SEARCH & CONTROLS
========================= */
.listing-controls {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.listing-controls input,
.listing-controls select {
    box-sizing: border-box;
    padding: 12px 14px;
    color: #f8fafc;
    background: #070b10;
    border: 1px solid #222d3b;
    border-radius: 8px;
    outline: none;
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.listing-controls input {
    flex: 1;
    min-width: 0;
}

.listing-controls input::placeholder {
    color: #525d6b;
}

.listing-controls select {
    width: 180px;
}

.listing-controls input:focus,
.listing-controls select:focus {
    border-color: #d4b45b;
    box-shadow: 0 0 0 3px rgba(212, 180, 91, 0.15);
}


/* =========================
   TABLE & PANEL STYLING
========================= */
.listings-table-panel {
    background: #10161e;
    border: 1px solid #222b36;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.listings-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.listings-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
}

.listings-table th {
    padding: 14px 18px;
    color: #929daa;
    background: #0d131b;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    border-bottom: 1px solid #222b36;
}

.listings-table td {
    padding: 14px 18px;
    border-top: 1px solid #1a222c;
    color: #dce1e7;
    font-size: 13px;
    vertical-align: middle;
}

.listings-table tbody tr {
    transition: background-color 0.15s ease;
}

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

.listing-product {
    display: flex;
    align-items: center;
    gap: 12px;
}

.listing-product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #192231;
    color: #e5c36d;
    font-weight: 700;
    font-size: 12px;
    border: 1px solid #27354a;
}

.listing-product strong,
.listing-product small {
    display: block;
}

.listing-product strong {
    margin-bottom: 2px;
    color: white;
    font-size: 13px;
    font-weight: 600;
}

.listing-product small {
    color: #64748b;
    font-size: 11px;
}


/* =========================
   STATUS BADGES
========================= */
.listing-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.listing-status.in-stock {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.listing-status.out-of-stock {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
}


/* =========================
   ACTION BUTTONS
========================= */
.listing-actions {
    display: flex;
    gap: 8px;
}

.listing-actions button {
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.edit-listing {
    color: #e5c36d;
    background: rgba(229, 195, 109, 0.05);
    border: 1px solid rgba(229, 195, 109, 0.3);
}

.edit-listing:hover {
    background: rgba(229, 195, 109, 0.15);
    border-color: #e5c36d;
}

.delete-listing {
    color: #f87171;
    background: rgba(248, 113, 113, 0.05);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.delete-listing:hover {
    background: rgba(248, 113, 113, 0.15);
    border-color: #f87171;
}

.listings-empty {
    padding: 30px;
    text-align: center;
    color: #929daa;
    font-size: 13px;
}

.listings-message {
    min-height: 20px;
    margin-top: 15px;
    color: #4ade80;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}


/* =========================
   RESPONSIVE DESIGN
========================= */
@media (max-width: 1000px) {
    .listing-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .mobile-sidebar-toggle {
        display: flex;
    }

    .dashboard-sidebar {
        position: fixed;
        top: 70px;
        left: 0;
        bottom: 0;
        width: 260px;
        z-index: 99;
        transform: translateX(-100%);
        background-color: #050505;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.8);
        border-right: 1px solid #1f2937;
    }

    .dashboard-sidebar.open {
        transform: translateX(0);
    }
}

@media (max-width: 650px) {
    .dashboard-user span {
        display: none;
    }

    .dashboard-header {
        padding: 0 14px;
    }

    .my-listings-page {
        padding: 20px 14px;
    }

    .listings-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .dashboard-add-button {
        width: 100%;
        text-align: center;
    }

    .listing-summary {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .listing-controls {
        flex-direction: column;
    }

    .listing-controls select {
        width: 100%;
    }
}