/* ============================================================
   AddiPress Listings — user dashboard. Theme variables with fallbacks.
   ============================================================ */
.apl-dash {
    --d-primary: var(--apl-primary, #4f46e5);
    --d-primary-600: var(--apl-primary-600, #4338ca);
    --d-ink: var(--apl-ink, #0f172a);
    --d-muted: var(--apl-muted, #64748b);
    --d-line: var(--apl-line, #e2e8f0);
    --d-bg: var(--apl-bg, #fff);
    --d-bg2: var(--apl-bg-2, #f8fafc);
    --d-radius: var(--apl-radius, 14px);
    max-width: 960px; margin: 0 auto;
    font-family: var(--apl-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    color: var(--d-ink);
}

.apl-dash__flash { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; }

.apl-dash__head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.apl-dash__avatar { border-radius: 999px; }
.apl-dash__hello { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }

.apl-dash__tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--d-line); margin-bottom: 22px; flex-wrap: wrap; }
.apl-dash__tab { padding: 12px 16px; font-weight: 600; color: var(--d-muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.apl-dash__tab:hover { color: var(--d-ink); }
.apl-dash__tab.is-active { color: var(--d-primary); border-bottom-color: var(--d-primary); }

/* Status filters */
.apl-dash__filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.apl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--d-line); border-radius: 999px; background: var(--d-bg); font-size: 14px; font-weight: 600; color: var(--d-muted); }
.apl-chip.is-active { background: var(--d-primary); border-color: var(--d-primary); color: #fff; }
.apl-chip__n { font-size: 12px; opacity: .8; }

/* Listing list */
.apl-dash__list { display: grid; gap: 12px; }
.apl-dash__item { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center; background: var(--d-bg); border: 1px solid var(--d-line); border-radius: var(--d-radius); padding: 12px; }
.apl-dash__thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; display: block; }
.apl-dash__thumb--ph { background: var(--d-bg2); }
.apl-dash__badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; margin-bottom: 6px; }
.apl-dash__badge--active { background: #dcfce7; color: #16a34a; }
.apl-dash__badge--pending { background: #fef9c3; color: #ca8a04; }
.apl-dash__badge--sold { background: #e0e7ff; color: #4f46e5; }
.apl-dash__badge--expired { background: #fee2e2; color: #dc2626; }
.apl-dash__title { display: block; font-weight: 700; font-size: 16px; color: var(--d-ink); }
.apl-dash__sub { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; font-size: 13px; color: var(--d-muted); }
.apl-dash__price { font-weight: 700; color: var(--d-ink); }
.apl-dash__actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Favorites */
.apl-dash__favgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.apl-favcard { background: var(--d-bg); border: 1px solid var(--d-line); border-radius: var(--d-radius); overflow: hidden; display: block; color: inherit; }
.apl-favcard:hover { box-shadow: 0 12px 30px rgba(15,23,42,.1); }
.apl-favcard__img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.apl-favcard__img--ph { background: var(--d-bg2); }
.apl-favcard__b { padding: 12px; }
.apl-favcard__price { display: block; font-weight: 800; }
.apl-favcard__title { display: block; font-size: 14px; color: var(--d-muted); margin-top: 2px; }

/* Profile */
.apl-dash__form { max-width: 520px; display: grid; gap: 16px; }
.apl-dash__form .apl-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.apl-dash__form input, .apl-dash__form textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--d-line); border-radius: 10px; font-size: 15px; font-family: inherit; }

/* Stats */
.apl-dash__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.apl-stat { background: var(--d-bg); border: 1px solid var(--d-line); border-radius: var(--d-radius); padding: 22px; text-align: center; }
.apl-stat__n { display: block; font-size: 32px; font-weight: 800; letter-spacing: -.02em; color: var(--d-primary); }
.apl-stat__l { display: block; font-size: 13px; color: var(--d-muted); margin-top: 4px; }

.apl-dash__empty { padding: 40px 16px; text-align: center; color: var(--d-muted); }
.apl-dash__gate { text-align: center; padding: 40px; display: grid; gap: 14px; justify-items: center; }

/* Buttons (fallback when the theme has no .apl-btn) */
.apl-dash .apl-btn, .apl-dash__gate .apl-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 16px; border: 1px solid transparent; border-radius: 999px;
    font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; background: var(--d-bg2); color: var(--d-ink);
}
.apl-dash .apl-btn--primary, .apl-dash__gate .apl-btn--primary { background: var(--d-primary); color: #fff; }
.apl-dash .apl-btn--ghost { background: transparent; border-color: var(--d-line); color: var(--d-muted); }
.apl-dash .apl-btn--danger { background: transparent; border-color: #fecaca; color: #dc2626; }
.apl-dash .apl-btn--sm { padding: 7px 12px; font-size: 13px; }

@media (max-width: 640px) {
    .apl-dash__item { grid-template-columns: 72px 1fr; }
    .apl-dash__thumb { width: 72px; height: 72px; }
    .apl-dash__actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Seller tools — bulk actions + vacation mode (Phase 33) */
.apl-vacation{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:12px 16px;margin-bottom:14px;font-size:14px}
.apl-vacation.is-on{background:#fff7ed;border-color:#fed7aa;color:#9a3412;font-weight:600}
.apl-bulkbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#eef2ff;border:1px solid #c7d2fe;border-radius:10px;padding:8px 12px;margin-bottom:12px}
.apl-bulkbar[hidden]{display:none}
.apl-bulkbar__all{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600}
.apl-bulkbar__n{background:#4f46e5;color:#fff;border-radius:999px;padding:1px 9px;font-size:12px;font-weight:800}
.apl-bulkbar__sel{padding:7px 10px;border:1px solid #c7d2fe;border-radius:8px;font-size:13px}
.apl-dash__item{position:relative}
.apl-dash__check{display:flex;align-items:center;padding:0 4px}
.apl-dash__check input{width:18px;height:18px;cursor:pointer}
