/**
 * Dokan Marketplace Extensions - Frontend Styles
 * Style: "Original" (Clean, Card-Based Rows, Vibrant Accents)
 *
 * @package DokanMarketplaceExtensions
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --dme-primary: #7c3aed;
    --dme-primary-hover: #6d28d9;
    --dme-secondary: #0f172a;
    --dme-success: #10b981;
    --dme-warning: #f59e0b;
    --dme-danger: #ef4444;
    --dme-light: #f8fafc;
    --dme-dark: #1e293b;
    --dme-border: #e2e8f0;
    --dme-text: #334155;
    --dme-text-muted: #64748b;
    --dme-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --dme-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --dme-radius: 12px;
    --dme-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* ==========================================================================
   Global & Common
   ========================================================================== */
.dme-listings-wrapper,
.dme-dashboard-content {
    font-family: var(--dme-font);
    color: var(--dme-text);
}

body .dokan-dashboard-content .dme-dashboard-content {
    background: #f8fafc !important;
    /* Light background for the dashboard area */
    padding: 20px !important;
    border-radius: var(--dme-radius) !important;
    min-height: 500px !important;
}

/* Header */
.dme-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dme-page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dme-dark);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.dme-page-title .dashicons {
    color: var(--dme-primary);
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.dme-page-subtitle {
    margin: 5px 0 0 36px;
    color: var(--dme-text-muted);
    font-size: 14px;
}

/* Buttons */
.dme-button-primary {
    background: var(--dme-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.dme-button-primary:hover {
    background: var(--dme-primary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.dme-button-secondary {
    background: #f1f5f9;
    color: var(--dme-dark);
    border: 1px solid var(--dme-border);
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.dme-button-secondary:hover {
    background: #e2e8f0;
    color: var(--dme-dark);
    border-color: #cbd5e1;
}

.dme-button-lg {
    padding: 12px 28px;
    font-size: 15px;
}

/* ==========================================================================
   Dashboard Stats Cards (Image 1 Style)
   ========================================================================== */
.dme-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.dme-stat-card {
    background: #fff;
    padding: 20px;
    border-radius: var(--dme-radius);
    box-shadow: var(--dme-shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--dme-border);
}

.dme-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
}

/* Specific colors matching the image vibe */
.dme-stat-total .dme-stat-icon {
    background: #6366f1;
}

/* Indigo */
.dme-stat-published .dme-stat-icon {
    background: #10b981;
}

/* Green */
.dme-stat-pending .dme-stat-icon {
    background: #f59e0b;
}

/* Amber */
.dme-stat-draft .dme-stat-icon {
    background: #64748b;
}

/* Slate */

.dme-stat-info {
    display: flex;
    flex-direction: column;
}

.dme-stat-number {
    font-size: 24px;
    font-weight: 800;
    color: var(--dme-dark);
    line-height: 1;
    margin-bottom: 4px;
}

.dme-stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--dme-text-muted);
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Filter Tabs (Pill Style)
   ========================================================================== */
.dme-filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--dme-border);
    padding-bottom: 15px;
}

.dme-tab {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--dme-text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.dme-tab:hover {
    color: var(--dme-primary);
    background: #f1f5f9;
}

.dme-tab.active {
    color: var(--dme-primary);
    background: #f3e8ff;
    /* Light purple bg for active tab */
    border-bottom: 2px solid var(--dme-primary);
    /* Optional underline for emphasis, matching Image 1 usually has underline OR pill */
    /* Let's go with just text color and border bottom like Image 1 typically shows, or full pill */
    /* Reverting to underline style based strictly on "Original" looking more like tabs */
    background: transparent;
    border-radius: 0;
    margin-bottom: -17px;
    /* Pull down to overlap border */
    padding-bottom: 15px;
    border-color: var(--dme-primary);
}


/* ==========================================================================
   Table as "Row Cards"
   ========================================================================== */
.dme-listings-table-wrap {
    overflow-x: auto;
}

.dme-table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
    /* Gap between rows */
}

/* Header slightly faded */
.dme-table-modern thead th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--dme-text-muted);
    padding: 0 20px 8px 20px;
    text-align: left;
    border: none;
    letter-spacing: 0.5px;
}

/* Rows as Cards - Styled via TD */
.dme-table-modern tbody td {
    background: #fff;
    padding: 20px;
    border-top: 1px solid var(--dme-border);
    border-bottom: 1px solid var(--dme-border);
    vertical-align: middle;
}

.dme-table-modern tbody td:first-child {
    border-left: 1px solid var(--dme-border);
    border-top-left-radius: var(--dme-radius);
    border-bottom-left-radius: var(--dme-radius);
}

.dme-table-modern tbody td:last-child {
    border-right: 1px solid var(--dme-border);
    border-top-right-radius: var(--dme-radius);
    border-bottom-right-radius: var(--dme-radius);
}

/* Content within Rows */
.dme-table-image {
    width: 50px;
    height: 50px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dme-text-muted);
    overflow: hidden;
}

.dme-table-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dme-item-title {
    font-weight: 700;
    color: var(--dme-dark);
    font-size: 15px;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
}

.dme-item-meta {
    font-size: 12px;
    color: var(--dme-text-muted);
    display: flex;
    gap: 10px;
}

/* Status Pills */
.dme-status {
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.dme-status-publish {
    background: #d1fae5;
    color: #059669;
}

.dme-status-pending {
    background: #fef3c7;
    color: #d97706;
}

.dme-status-draft {
    background: #f1f5f9;
    color: #cbd5e1;
}

/* Muted gray for draft */
.dme-status-filled {
    background: #e2e8f0;
    color: #475569;
}

/* Applications/Requests Pill */
.dme-applications-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    /* Light blue */
    color: #3b82f6;
    padding: 6px 14px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s;
}

.dme-applications-count:hover {
    background: #dbeafe;
}

/* Badge Type */
.dme-badge-type {
    background: #f3f4f6;
    color: var(--dme-dark);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
}

/* ==========================================================================
   Modern Submission Forms
   ========================================================================== */
.dme-form-modern {
    background: #fff;
    padding: 0;
    border-radius: var(--dme-radius);
}

.dme-form-section {
    padding: 30px;
    border-bottom: 1px solid var(--dme-border);
}

.dme-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
    /* Add some space before footer */
}

.dme-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dme-dark);
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dme-section-icon {
    font-size: 20px;
    background: #f1f5f9;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--dme-primary);
}

.dme-section-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.dme-form-row {
    margin-bottom: 20px;
}

.dme-form-row:last-child {
    margin-bottom: 0;
}

.dme-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dme-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dme-dark);
    margin-bottom: 8px;
}

.dme-label .required {
    color: var(--dme-danger);
    margin-left: 2px;
}

.dme-input,
.dme-select,
.dme-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: var(--dme-dark);
    background: #fff;
    transition: all 0.2s;
    outline: none;
}

.dme-input:focus,
.dme-select:focus,
.dme-textarea:focus {
    border-color: var(--dme-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.dme-input-lg {
    padding: 14px 18px;
    font-size: 16px;
}

/* Polished Information Indicator */
.dme-info-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #e2e8f0;
    color: #64748b;
    border-radius: 50%;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    margin-left: 8px;
    cursor: help;
    transition: all 0.2s;
    vertical-align: middle;
    margin-top: -2px;
}

.dme-info-indicator:hover {
    background: var(--dme-primary);
    color: #fff;
}

/* Toggle Switch */
.dme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.dme-toggle input {
    display: none;
}

.dme-toggle-slider {
    position: relative;
    width: 44px;
    height: 22px;
    background: #cbd5e1;
    border-radius: 100px;
    transition: all 0.3s;
}

.dme-toggle-slider::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dme-toggle input:checked+.dme-toggle-slider {
    background: #22c55e;
}

.dme-toggle input:checked+.dme-toggle-slider::after {
    left: 24px;
}

/* Modern Horizontal Listing Card */
.dme-card-horizontal {
    display: flex;
    background: #fff;
    border-radius: 4px;
    padding: 15px 0;
    margin-bottom: 5px;
    gap: 20px;
    transition: all 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.dme-card-horizontal:hover {
    background: #fafafa;
}

.dme-card-image {
    width: 150px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #f8fafc;
}

.dme-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dme-card-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dme-card-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dme-card-badges {
    display: flex;
    gap: 8px;
    color: #64748b;
}

.dme-card-badges .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.dme-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.dme-card-title a {
    color: inherit;
    text-decoration: none;
}

.dme-title-sep {
    margin: 0 5px;
    color: #94a3b8;
}

.dme-card-price {
    color: #475569;
}

.dme-card-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #64748b;
}

.dme-meta-indicator {
    width: 12px;
    height: 12px;
    display: inline-block;
    border-radius: 2px;
}

.dme-meta-badge {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    color: #475569;
    text-transform: lowercase;
}

.dme-card-excerpt {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin-top: 4px;
}

.dme-read-more {
    color: #64748b;
    text-decoration: underline;
}

.dme-card-author-side {
    width: 50px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.dme-author-round {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Filters UI Refinement */
.dme-filters-wrapper {
    background: #fff;
    padding: 15px 0;
    border-bottom: 2px solid #f1f5f9;
    margin-bottom: 20px;
}

.dme-filters-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.dme-filters-form {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Consolidated with .dme-filter-group select/input below */

.dme-filter-submit {
    background: #f1f5f9;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
}

.dme-view-toggle {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 6px;
    gap: 4px;
}

.dme-view-btn {
    border: none;
    background: none;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
}

.dme-view-btn.active {
    background: #fff;
    color: var(--dme-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dme-image-preview {
    padding: 40px;
}

.dme-image-placeholder .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    opacity: 0.5;
}

.dme-image-placeholder span {
    font-weight: 500;
    font-size: 14px;
}

/* File Upload (Applications) */
.dme-file-row {
    margin: 15px 0;
}

.dme-file-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #f1f5f9;
    border: 1px solid var(--dme-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--dme-text);
    transition: all 0.2s;
}

.dme-file-label:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.dme-file-label .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: var(--dme-text-muted);
}

.dme-file-input {
    display: none;
}

.dme-file-name {
    margin-top: 5px;
    font-size: 12px;
    color: var(--dme-primary);
    font-weight: 600;
}

.dme-form-footer {
    padding: 30px;
    background: #f8fafc;
    border-top: 1px solid var(--dme-border);
    display: flex;
    gap: 12px;
    border-bottom-left-radius: var(--dme-radius);
    border-bottom-right-radius: var(--dme-radius);
}

/* Actions */
.dme-action-buttons {
    display: flex;
    gap: 8px;
}

.dme-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: transparent;
    color: var(--dme-text-muted);
    transition: all 0.2s;
    text-decoration: none;
}

.dme-action-btn:hover {
    background: #f1f5f9;
    color: var(--dme-primary);
}

.dme-action-delete:hover {
    background: #fee2e2;
    color: var(--dme-danger);
}

/* ==========================================================================
   Frontend Listings (Upwork Style + Author)
   ========================================================================== */
/* ... Grid container from previous step ... */
.dme-listings-container {
    display: grid;
    gap: 24px;
    margin-top: 20px;
}

.dme-listings-container[data-columns="1"] {
    grid-template-columns: 1fr;
}

.dme-listings-container[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.dme-listings-container[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.dme-listings-container[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.dme-listings-container[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

.dme-listings-container[data-columns="6"] {
    grid-template-columns: repeat(6, 1fr);
}

.dme-card-upwork {
    background: #fff;
    border: 1px solid var(--dme-border);
    border-radius: 12px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* List View Side-by-Side */
.dme-listings-container.dme-view-list .dme-card-upwork {
    flex-direction: row;
    align-items: stretch;
    min-height: 200px;
}

.dme-card-image-box {
    width: 240px;
    height: auto;
    background: #f8fafc;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    border-right: 1px solid var(--dme-border);
}

.dme-card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dme-listings-container.dme-view-list .dme-card-content-wrap {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.dme-listings-container.dme-view-list .dme-card-header {
    margin-bottom: 12px;
}

.dme-listings-container.dme-view-list .dme-card-excerpt {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--dme-text-muted);
}

.dme-listings-container.dme-view-list .dme-card-footer {
    width: 200px;
    background: #fcfcfc;
    border-top: none;
    border-left: 1px solid var(--dme-border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .dme-listings-container.dme-view-list .dme-card-upwork {
        flex-direction: column;
    }

    .dme-card-image-box {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--dme-border);
    }

    .dme-listings-container.dme-view-list .dme-card-footer {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--dme-border);
        flex-direction: row;
    }
}

/* Vendor Entries / Applicants Redesign */
.dme-vendor-entries-wrap {
    margin-top: 30px;
}

.dme-entries-header {
    margin-bottom: 25px;
    border-bottom: 2px solid var(--dme-primary);
    padding-bottom: 15px;
}

.dme-entries-header h3 {
    margin: 0 0 5px;
    font-size: 22px;
}

.dme-entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
}

.dme-entry-card {
    background: #fff;
    border: 1px solid var(--dme-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dme-entry-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.dme-entry-card-header {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

.dme-applicant-main {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dme-applicant-avatar img {
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dme-applicant-name {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
}

.dme-applicant-name a {
    color: var(--dme-dark);
    text-decoration: none;
}

.dme-entry-meta-top {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--dme-text-muted);
}

.dme-meta-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dme-entry-badge {
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 700;
}

.dme-badge-opportunity {
    background: #dcfce7;
    color: #166534;
}

.dme-badge-service {
    background: #fee2e2;
    color: #991b1b;
}

.dme-badge-job {
    background: #e0f2fe;
    color: #075985;
}

.dme-entry-card-content {
    padding: 20px;
    flex: 1;
}

.dme-context-row {
    margin-bottom: 15px;
    font-size: 13px;
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: 6px;
}

.dme-context-label {
    color: var(--dme-text-muted);
    font-weight: 600;
    margin-right: 5px;
}

.dme-context-link {
    color: var(--dme-primary);
    font-weight: 700;
    text-decoration: none;
}

.dme-message-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
}

.dme-message-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--dme-text);
}

.dme-entry-card-footer {
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.dme-contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 15px;
}

.dme-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.dme-contact-item span {
    color: var(--dme-text-muted);
    font-size: 16px;
}

.dme-contact-item a {
    color: var(--dme-text);
    text-decoration: none;
}

.dme-entry-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dme-button-sm {
    padding: 6px 14px;
    font-size: 12px;
}

/* Dashboard Scrolling Fix Scoping */
.dme-dashboard-wrapper {
    height: calc(100vh - 200px);
    overflow-y: auto !important;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--dme-border);
    border-radius: 8px;
}

@media (max-width: 768px) {
    .dme-entries-grid {
        grid-template-columns: 1fr;
    }
}

.dme-card-upwork:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

/* Remove Accent Bar for 'Clean' look, or keep? User liked "Original" which might not have it. 
   I'll make it subtle or just top border */
.dme-card-top-accent {
    height: 0;
    /* Removing visible bar based on typical "clean" feedback, unless requested */
    /* Or keeping 4px solid primary if they liked "bold" */
    height: 3px;
    background: var(--dme-primary);
}

.dme-card-content-wrap {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dme-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.dme-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.4;
}

.dme-card-title a {
    color: var(--dme-dark);
    text-decoration: none;
}

.dme-card-title a:hover {
    color: var(--dme-primary);
    text-decoration: underline;
}

.dme-card-meta-line {
    font-size: 13px;
    color: var(--dme-text-muted);
    display: flex;
    gap: 8px;
}

.dme-card-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    margin-left: 15px;
}

.dme-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Author Profile */
.dme-card-author {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    text-decoration: none;
}

.dme-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
}

.dme-author-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--dme-text);
    transition: color 0.1s;
}

.dme-card-author:hover .dme-author-name {
    color: var(--dme-primary);
    text-decoration: underline;
}

.dme-card-types {
    margin-bottom: 12px;
}

.dme-badge-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    background: #f1f5f9;
    color: var(--dme-text-muted);
}

.dme-badge-service {
    background: #ecfdf5;
    color: #047857;
}

.dme-badge-outline {
    background: transparent;
    border: 1px solid var(--dme-border);
    color: var(--dme-text-muted);
}

.dme-card-excerpt {
    font-size: 14px;
    color: var(--dme-text);
    line-height: 1.5;
    margin-bottom: 15px;
    flex: 1;
}

.dme-card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--dme-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fcfcfc;
}

.dme-card-price {
    font-weight: 700;
    color: var(--dme-dark);
}

.dme-btn-view {
    color: var(--dme-primary);
    background: #f5f3ff;
    padding: 8px 16px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.dme-btn-view:hover {
    background: var(--dme-primary);
    color: #fff;
}

@media (max-width: 768px) {
    .dme-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dme-table-modern {
        display: block;
    }

    .dme-table-modern thead {
        display: none;
    }

    .dme-table-modern tbody td {
        display: block;
        border: none;
        padding: 10px 20px;
    }

    .dme-table-modern tbody td:first-child {
        border-top: 1px solid var(--dme-border);
        padding-top: 20px;
    }

    .dme-table-modern tbody td:last-child {
        border-bottom: 1px solid var(--dme-border);
        padding-bottom: 20px;
    }
}

/* ==========================================================================
   Upwork-Inspired Listings (Horizontal Cards with Author)
   Theme-Agnostic Design - Inherits fonts/colors from theme
   ========================================================================== */

/* Main Container */
.dme-upwork-listings {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: inherit;
}

/* Upwork-Style Horizontal Card */
.dme-upwork-card {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
    position: relative;
}

.dme-upwork-card:hover {
    border-color: #14a800;
    box-shadow: 0 4px 20px rgba(20, 168, 0, 0.12);
    transform: translateY(-2px);
}

/* Thumbnail Section */
.dme-upwork-card-image {
    width: 160px;
    min-height: 140px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.dme-upwork-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dme-upwork-card:hover .dme-upwork-card-image img {
    transform: scale(1.05);
}

.dme-upwork-card-image .dme-no-image {
    font-size: 40px;
    color: #ccc;
}

/* Main Content Section */
.dme-upwork-card-content {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

/* Category Badge */
.dme-upwork-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.dme-upwork-category-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #14a800;
}

.dme-upwork-category-dot.type-opportunity {
    background: #7c3aed;
}

.dme-upwork-category-dot.type-service {
    background: #14a800;
}

.dme-upwork-category-dot.type-job {
    background: #0077b5;
}

.dme-upwork-category-text {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #5e6d55;
}

/* Title Row */
.dme-upwork-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}

.dme-upwork-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: inherit;
}

.dme-upwork-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.dme-upwork-title a:hover {
    color: #14a800;
}

.dme-upwork-price {
    font-size: 16px;
    font-weight: 700;
    color: #14a800;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Meta Info */
.dme-upwork-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #5e6d55;
}

.dme-upwork-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dme-upwork-meta-item i,
.dme-upwork-meta-item .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Description Excerpt */
.dme-upwork-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #5e6d55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.dme-upwork-excerpt a {
    color: #14a800;
    font-weight: 500;
    text-decoration: none;
    margin-left: 4px;
}

.dme-upwork-excerpt a:hover {
    text-decoration: underline;
}

/* Author Section (Right Side) */
.dme-upwork-card-author {
    width: 120px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #fafafa;
    border-left: 1px solid #e0e0e0;
    flex-shrink: 0;
    text-decoration: none;
    transition: background 0.2s;
}

.dme-upwork-card-author:hover {
    background: #f0f0f0;
}

.dme-upwork-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 8px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dme-upwork-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dme-upwork-author-name {
    font-size: 12px;
    font-weight: 600;
    color: #001e00;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dme-upwork-author-role {
    font-size: 10px;
    color: #5e6d55;
    margin-top: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dme-upwork-card {
        flex-direction: column;
    }

    .dme-upwork-card-image {
        width: 100%;
        height: 180px;
    }

    .dme-upwork-card-author {
        width: 100%;
        flex-direction: row;
        padding: 12px 20px;
        gap: 12px;
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }

    .dme-upwork-author-avatar {
        margin-bottom: 0;
        width: 36px;
        height: 36px;
    }

    .dme-upwork-card-author>div {
        text-align: left;
    }
}

/* ==========================================================================
   Store Section Styles
   ========================================================================== */
.dme-store-section {
    margin: 30px 0;
    padding: 0;
}

.dme-store-section-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--dme-primary, #7c3aed);
}

.dme-store-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: var(--dme-dark, #0f172a);
}

.dme-store-section-title i {
    color: var(--dme-primary, #7c3aed);
}

.dme-store-section-content {
    margin-top: 20px;
}

/* ==========================================================================
   Enhanced Filter Styles
   ========================================================================== */
.dme-filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 24px;
    align-items: flex-end;
}

.dme-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 150px;
}

.dme-filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #5e6d55;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dme-filter-group select,
.dme-filter-group input,
.dme-filter-select,
.dme-filter-input {
    box-sizing: border-box !important;
    padding: 0 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 42px !important;
    line-height: normal;
    color: #475569;
    width: 100%;
}

.dme-filter-group select:focus,
.dme-filter-group input:focus {
    outline: none;
    border-color: #14a800;
    box-shadow: 0 0 0 3px rgba(20, 168, 0, 0.1);
}

.dme-search-input-wrap .dashicons-search {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.dme-search-input-wrap .dme-filter-input {
    padding-left: 40px !important;
}

.dme-filter-submit {
    padding: 10px 24px;
    background: #14a800;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.dme-filter-submit:hover {
    background: #108a00;
}

.dme-filter-reset {
    padding: 10px 16px;
    background: transparent;
    color: #5e6d55;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.dme-filter-reset:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

/* Search Input Enhancement */
.dme-search-input-wrap {
    position: relative;
    flex: 2;
    min-width: 200px;
}

.dme-search-input-wrap input {
    width: 100%;
    padding-left: 40px;
}

.dme-search-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
}

/* Results Count */
.dme-results-count {
    font-size: 14px;
    color: #5e6d55;
    margin-bottom: 16px;
}

.dme-results-count strong {
    color: #001e00;
}

/* ==========================================================================
   Grid/List View Toggle System
   ========================================================================== */

/* View Toggle Buttons */
.dme-view-toggle {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    gap: 4px;
    flex-shrink: 0;
}

.dme-view-btn {
    border: none;
    background: transparent;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.dme-view-btn:hover {
    color: #64748b;
    background: rgba(255, 255, 255, 0.5);
}

.dme-view-btn.active {
    background: #fff;
    color: var(--dme-primary, #7c3aed);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.dme-view-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Grid View - Default 3 Columns */
.dme-listings-container.dme-view-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.dme-listings-container.dme-view-grid .dme-upwork-card {
    flex-direction: column;
}

.dme-listings-container.dme-view-grid .dme-upwork-card-image {
    width: 100%;
    height: 160px;
    min-height: 160px;
}

.dme-listings-container.dme-view-grid .dme-upwork-card-author {
    width: 100%;
    flex-direction: row;
    padding: 12px 16px;
    border-left: none;
    border-top: 1px solid #e0e0e0;
}

.dme-listings-container.dme-view-grid .dme-upwork-author-avatar {
    margin-bottom: 0;
    margin-right: 10px;
    width: 36px;
    height: 36px;
}

/* List View - Single Column Horizontal Cards */
.dme-listings-container.dme-view-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dme-listings-container.dme-view-list .dme-upwork-card {
    flex-direction: row;
}

.dme-listings-container.dme-view-list .dme-upwork-card-image {
    width: 160px;
    min-height: 140px;
    height: auto;
}

.dme-listings-container.dme-view-list .dme-upwork-card-author {
    width: 120px;
    flex-direction: column;
    border-left: 1px solid #e0e0e0;
    border-top: none;
}

/* Clickable Card Link Wrapper */
.dme-upwork-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.dme-upwork-card-link:hover,
.dme-upwork-card-link:focus {
    text-decoration: none;
    color: inherit;
}

.dme-upwork-card-link .dme-upwork-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dme-upwork-card-link:hover .dme-upwork-card {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: var(--dme-primary, #7c3aed);
}

/* Filters Bar Layout */
.dme-filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 24px;
}

/* Responsive Grid/List Views */
@media (max-width: 1024px) {
    .dme-listings-container.dme-view-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dme-listings-container.dme-view-grid {
        grid-template-columns: 1fr;
    }

    .dme-listings-container.dme-view-list .dme-upwork-card {
        flex-direction: column;
    }

    .dme-listings-container.dme-view-list .dme-upwork-card-image {
        width: 100%;
        height: 180px;
    }

    .dme-listings-container.dme-view-list .dme-upwork-card-author {
        width: 100%;
        flex-direction: row;
        border-left: none;
        border-top: 1px solid #e0e0e0;
        padding: 12px 16px;
        gap: 12px;
    }

    .dme-view-toggle {
        order: -1;
        width: 100%;
        justify-content: center;
    }
}