/* ========== styles.css ========== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary:      #2f5ea8;
  --primary-dark: #254a84;
  --accent:       #5478FF;
  --danger:       #ff4d4f;
  --danger-dark:  #d9363e;   
  --warning:      #ff8a00;
  --success:      #2e7d32;
  --bg:           #f4f6fb;
  --border:       #dde5f7;
  --card-bg:      #ffffff;
  --text:         #1a2540;
  --muted:        #888;
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}

/* =========================
   Layout
========================= */

.page-container {
  display: flex;
  min-height: 100vh;
}

.left-section {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

/* =========================
   Listings Grid
========================= */

.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 300px);
  gap: 20px;
  margin: 20px;
  justify-content: center;
}

.listing-card {
  position: relative;
  width: 300px;
  height: 260px;
  background: white;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid #ddd;
}

.listing-card:hover {
  box-shadow: 0 0 10px rgba(0,0,0,.15);
}

.listing-image {
  width: 300px;
  height: 200px;
  object-fit: cover;
}

.card-footer {
  height: 40px;
  padding: 4px 8px;
}

.card-title {
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-top: 10px;
}

.vehicle-type {
  color: #666;
}

.price {
  font-weight: bold;
  font-size: 16px;
  color: var(--accent);
}

/* =========================
   Details Panel
========================= */

.details-panel {
  width: 340px;
  min-width: 400px;
  max-width: 340px;
  height: 100vh;
  overflow-y: auto;
  padding: 10px;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  background: linear-gradient(to bottom, #5478FF 0%, #EAF0FF 100%);
  border: 6px solid #ff8a00;
  border-radius: 6px;
  box-shadow: -4px 0 14px rgba(0,0,0,0.10); 
}

.empty-state {
  color: #888;
  text-align: center;
  margin-top: 50px;
}

.pagination {
  margin-top: 25px;
  text-align: center;
}

/* =========================
   Tabs
========================= */

.panel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  cursor: pointer;
  background: #eee;
  font-weight: bold;
  border-radius: 6px;
}

.tab-btn.active {
  background: #d9363e;
  color: white;
  border-radius: 6px;
}

.role-badge {
  padding: 2px 8px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  color: var(--primary);
  background-color: #e0e8ff;
}

/* =========================
   Card Action Buttons
========================= */

.add-vehicle-btn {
  position: absolute;
  top: 8px;
  right: 74px;
  width: 60px;
  z-index: 5;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
}

.add-vehicle-btn:hover {
  background-color: var(--primary-dark);
}

.listing-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 60px;
  height: 26px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  z-index: 10;
  color: white;
  background-color: var(--danger);
}

.listing-delete-btn:hover {
  background-color: var(--danger-dark);
  color: white;
}

/* =========================
   Pagination Buttons
========================= */

#prevPage, #nextPage {
  background-color: var(--warning);
  color: white;
  width: 40px;
  border: none;
  text-align: center;
  border-radius: 6px;
  padding: 2px;
  margin: 6px;
}

#prevPage:hover, #nextPage:hover {
  cursor: pointer;
}

#pageInfo {
  font-size: 12px;
  color: #888;
}

/* =========================
   My Vehicles (Extension Panel)
========================= */

.ext-title {
  background-color: var(--primary);
  color: white;
  text-align: center;
  padding: 6px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.vehicle-item {
  border-bottom: 1px solid #ddd;
  padding-bottom: 6px;
  margin-bottom: 10px;
  border-radius: 6px;
  background-color: #f5f7fb;
}

.vehicle-top {
  display: flex;
  gap: 10px;
}

.vehicle-thumb {
  width: 100px;
  height: 100px;
  object-fit: cover;
  padding: 5px;
}

.vehicle-info {
  flex: 1;
  padding: 10px;
}

.vehicle-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 6px;
}

.vehicle-actions {
  margin-top: 6px;
  display: flex;
  padding: 0 8px;
}

.vehicle-actions button {
  flex: 1;
  padding: 2px;
  cursor: pointer;
  color: white;
  border: none;
  border-radius: 6px;
}

.edit-btn   { background: var(--accent);}
.delete-btn { background-color: var(--danger); margin: 0 6px; height: 24px; }

/* =========================
   Vehicle Toolbar
========================= */

.vehicle-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.vehicle-toolbar button {
  flex: 1;
  border: none;
  color: white;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
}

.delete-all-btn { background: var(--danger); }

/* =========================
   Properties / Post Form
========================= */

.property-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: white;
  padding: 10px;
  border-radius: 6px;
}

.property-form label {
  font-weight: 500;
  font-size: 13px;
}

.property-form input,
.property-form textarea,
.property-form select {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.property-form textarea {
  resize: vertical;
  min-height: 80px;
}

.textarea-wrapper {
  position: relative;
  width: 100%;
}

.textarea-wrapper textarea {
  width: 100%;
  padding-bottom: 32px;
  box-sizing: border-box;
}

.select-post-btn {
  background: var(--danger);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.select-post-btn:hover { background: var(--danger-dark); }

.generate-ai-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
}

.generate-ai-btn:hover { background-color: var(--primary-dark); }

label {
  color: var(--primary-dark);
}

/* =========================
   Description / AI Tab Row
========================= */

.desc-tab-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  margin-bottom: 4px;
  position: relative;
}

.desc-tab-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

#aiTabLabel {
  width: 150px;
  text-align: center;
}

.desc-tab {
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: black;
  background-color: white;
  padding: 5px 12px;
  user-select: none;
  border-radius: 6px;
  border: 1px solid black;
}

.desc-tab.active-tab {
  color: white;
  background-color: var(--primary-dark);
  border: 1px solid var(--primary-dark);
  padding: 5px 12px;
}

/* =========================
   Emoji Picker
========================= */

.emoji-toggle-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 16px;
  cursor: pointer;
  z-index: 1;
}

.emoji-picker {
  position: absolute;
  bottom: 36px;
  right: 0;
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  width: 220px;
  z-index: 999;
}

.emoji-item {
  font-size: 20px;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
}

.emoji-item:hover { background: #f0f0f0; }

/* =========================
   Analytics
========================= */

#analytics-body {
  background: white;
  color: black;
}

#analytics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

#analytics-header h2 {
  color: var(--primary);
  margin: 0;
  font-size: 16px;
}

#activity-section h2 {
  color: var(--primary);
  font-size: 16px;
  margin: 0 0 12px 0;
}

thead {
  background-color: #f0f4ff;
  color: black;
  border-bottom: 2px solid #dde5f7;
}

.activity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  text-align: left;
  background: white;
}

.activity-table th {
  background: #f0f4ff;
  font-size: 15px;
  font-weight: 700;
  padding: 10px;
  border-bottom: 2px solid var(--border);
}

.activity-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.activity-table tr:hover td { background: #fafbfe; }

/* =========================
   Saved-Listings: Banner & Nav
========================= */

.left-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(to right, #2f5ea8, #5478FF);
  padding: 13px 16px;
  border-radius: 0;
  margin: 0;
}

.left-banner img { width: 34px; height: 34px; border-radius: 8px; }

.left-banner .banner-title {
  font-size: 2em;
  font-weight: 700;
  color: white;
  letter-spacing: 0.4px;
}

.left-nav {
  display: flex;
  justify-content: flex-start;
  background: linear-gradient(to right, #2f5ea8, #5478FF);
  padding-top: 10px;
  padding-left: 10px;
  border-bottom: 2px solid var(--border);
}

.left-nav-btn {
  flex: 0 0 auto;
  padding: 6px 10px;
  margin: 6px 6px 6px 0;
  border-radius: 6px;
  width: 110px;
  font-size: 14px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.left-nav-btn:hover  { background: var(--primary-dark); }
.left-nav-btn.active { color: white; background: var(--accent); }

.left-page { display: none; flex: 1; overflow-y: auto; }
.left-page.active { display: flex; flex-direction: column; }

.coming-soon {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  padding: 40px;
  background: white;
}

.coming-soon span { font-size: 40px; }

.page-content {
  padding: 50px 150px;
  background: white;
  border-radius: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* =========================
   Modal (Saved-Listings)
========================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-overlay.hidden { display: none; }

.modal-box {
  background: white;
  border-radius: 10px;
  padding: 28px 28px 22px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px 0;
}

.modal-text {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 20px 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-actions button {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

#modalOkBtn          { background: var(--primary); color: white; }
#modalOkBtn:hover    { background: var(--primary-dark); }
#modalCancelBtn      { background: #e0e0e0; color: #333; }
#modalCancelBtn:hover { background: #d0d0d0; }

/* =========================
   Help / Support Form
========================= */

.help-intro h2 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 8px;
}

.help-intro p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 560px;
}

.help-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 560px;
}

.help-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-top: 14px;
}

.help-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  resize: vertical;
}

.help-file-input {
  font-size: 12px;
}

.help-attachments-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.help-submit-btn {
  margin-top: 18px;
  align-self: flex-start;
  padding: 10px 22px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* CONFLICT: .primary is a very generic class name — rename recommended */
.primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
}

.primary:hover { background: #0056b3; }

/* =========================
   Popup (popup.html)
========================= */

.popup-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #2f5ea8, #5478FF);
  padding: 14px 16px;
  justify-content: space-between;
}

.popup-banner img { width: 32px; height: 32px; border-radius: 7px; }

.popup-banner .banner-title {
  font-size: 20px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.4px;
}

#scan          { background: var(--danger); color: white; }
#scan:hover    { background: var(--danger-dark); }
#scan:disabled { background: #b0bcd8; cursor: not-allowed; }

/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #ccc;
  border-radius: 20px;
  transition: 0.3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px; width: 14px;
  left: 3px; bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .slider { background: var(--danger); }
input:checked + .slider:before { transform: translateX(18px); }

.btn-save         { background: var(--primary); color: white; }
.btn-save:hover   { background: var(--primary-dark); }

.modal-msg         { font-size: 11px; margin-top: 4px; min-height: 14px; }
.modal-msg.error   { color: #e53935; }
.modal-msg.success { color: #2e7d32; }

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 20px;
  min-height: 100vh;
}

.login-box {
  background: white;
  padding: 36px 32px 28px;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  width: 340px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* CONFLICT: was global h2 — scoped to login (note 7) */
.login-box h2 {
  color: #1a2540;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.subtitle {
  color: #888;
  font-size: 13px;
  margin-bottom: 24px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.login-logo img { width: 36px; height: 36px; border-radius: 8px; }

.login-logo span {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.3px;
}

/* CONFLICT: was global label override — scoped to login-box (note 4) */
.login-box label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #444;
  margin-bottom: 5px;
  margin-top: 14px;
}

/* CONFLICT: was global input selector — scoped to login-box (note 8) */
.login-box input[type="email"],
.login-box input[type="password"],
.login-box input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dde5f7;
  border-radius: 7px;
  font-size: 14px;
  color: #222;
  outline: none;
  transition: border 0.2s;
  background: #f8faff;
}

.login-box input:focus {
  border-color: var(--accent);
  background: white;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input { padding-right: 38px; }

.togglePassword {
  position: absolute;
  right: 10px;
  font-size: 16px;
  cursor: pointer;
  display: none;
  color: #888;
  user-select: none;
}

.login-btn {
  margin-top: 24px;
  width: 100%;
  padding: 11px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.3px;
}

.login-btn:hover    { background: var(--primary-dark); }
.login-btn:disabled { background: #b0bcd8; cursor: not-allowed; }

.form-feedback-msg {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  min-height: 18px;
  text-align: center;
}

.detail-gallery-main {
  position: relative;
  width: 400px;
  max-width: 100%;
  height: 230px;
  border-radius: 8px;
  overflow: hidden;
  background: #eee;
}

.detail-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.gallery-arrow:hover { background: rgba(0,0,0,0.7); }
.gallery-arrow-left  { left: 8px; }
.gallery-arrow-right { right: 8px; }

.gallery-expand-btn {
  position: absolute;
  top: 8px;
  right: 40px;
  background: rgba(0,0,0,0.45);
  color: white;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.gallery-expand-btn:hover { background: rgba(0,0,0,0.7); }
.gallery-expand-btn:disabled,
.gallery-delete-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.gallery-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.45);
  color: white;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.gallery-delete-btn:hover { background: var(--danger); }

.gallery-counter {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.55);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}

/* =========================
   Image Lightbox
========================= */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.lightbox-overlay.hidden { display: none; }

.lightbox-image {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-delete {
  position: absolute;
  top: 18px;
  right: 76px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lightbox-delete:hover { background: var(--danger); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: white;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 12px;
}

/* =========================
   Detail Panel: Two-Column Inline Fields
   (label and input share one line; two field-inline units per row)
========================= */

.field-row {
  display: flex;
  gap: 10px;
}

.field-row-single .field-inline { flex: 1; }

.field-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.field-inline label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.field-inline > input,
.field-inline > select {
  flex: 1;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  box-sizing: border-box;
}

.field-static {
  flex: 1;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  background: #f4f6fb;
  color: #555;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-link {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  background: white;
}

.field-link:hover { text-decoration: underline; }

.price-input-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: white;
}

.price-input-wrap span {
  padding: 5px 2px 5px 6px;
  font-size: 12px;
  color: #555;
}

.price-input-wrap input {
  border: none;
  flex: 1;
  min-width: 0;
  padding: 5px 6px 5px 2px;
  font-size: 12px;
  box-sizing: border-box;
}

.price-input-wrap input:focus,
.field-inline > input:focus,
.field-inline > select:focus {
  outline: none;
  border-color: var(--accent);
}

/* =========================
   Schedule Auto Post
========================= */

/* ── Nav button: wider than the fixed 110px so the full label fits ── */
#schedNavBtn { width: auto; padding: 6px 14px; }

/* ── The tab itself ── */
.left-page.sched-page { background: var(--card-bg); }

.sched-page-inner {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
}

/* ── Toolbar ── */
.sched-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.1);
  font-size: 12px;
}

.sched-count {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  min-width: 140px;
}
.sched-count-hidden {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.sched-field {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  white-space: nowrap;
}
.sched-field-label { font-weight: 700; color: #555; }
.sched-to          { color: var(--muted); font-weight: 600; }

.sched-field input[type="time"],
.sched-field input[type="number"] {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 5px;
  font-size: 12px;
  font-family: inherit;
  color: var(--text);
}
.sched-field input[type="number"] { width: 56px; }

/* ── Language pills ── */
.sched-lang {
  padding: 3px 9px;
  border-radius: 12px;
  border: 1px solid var(--text);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.sched-lang.active { background: var(--text); color: #fff; }

/* ── Toggles ── */
.sched-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.sched-toggle.on { background: #eef3ff; border-color: #c7d8ff; }
.sched-toggle-label { font-weight: 700; color: #555; }
.sched-toggle.on .sched-toggle-label { color: var(--primary); }

.sched-switch { position: relative; width: 30px; height: 16px; display: inline-block; }
.sched-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.sched-knob {
  position: absolute; inset: 0;
  background: #c9cfdd;
  border-radius: 16px;
  transition: background 0.2s;
}
.sched-knob::before {
  content: "";
  position: absolute;
  width: 12px; height: 12px;
  left: 2px; top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.sched-switch input:checked + .sched-knob { background: var(--success); }
.sched-switch input:checked + .sched-knob::before { transform: translateX(14px); }

/* ── Platforms dropdown ── */
.sched-dropdown-wrap { position: relative; display: inline-block; }
.sched-dropdown-btn {
  padding: 6px 11px;
  background: #e0e8ff;
  color: var(--primary);
  border: 1px solid #c7d8ff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

#schedUserBtn {
  width: 140px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-align: left;
}
#schedUserBtn .sched-btn-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#schedUserBtn .sched-btn-caret { flex-shrink: 0; }

#schedPlatformsBtn { width: 120px; }
.sched-dropdown-menu {
  display: none;
  position: absolute;
  top: 32px; left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 60;
  padding: 8px 12px;
  min-width: 180px;
}
.sched-dropdown-menu hr { border: 0; border-top: 1px solid #eee; margin: 5px 0; }
.sched-dropdown-menu.wide { min-width: 260px; max-height: 280px; overflow-y: auto; }
.sched-menu-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 5px 0;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.sched-menu-row.head { font-weight: 700; }
.sched-menu-row:hover { background: #f4f7ff; }

.sched-user-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sched-role {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.sched-role.owner  { background: #e0e8ff; color: var(--primary); }
.sched-role.member { background: #e8f5e9; color: var(--success); }

/* ── Save / cancel ── */
.sched-save-btn {
  margin-left: auto;
  padding: 6px 16px;
  background: var(--primary-dark);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.sched-save-btn:hover:not(:disabled) { background: #1c3a69; }
.sched-save-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.sched-save-btn.dirty {
  background: var(--warning);
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.18);
}

.sched-cancel-btn {
  padding: 6px 12px;
  background: #fee2e2;
  color: #e53935;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* ── Table ── */
.sched-table-wrap {
  overflow-x: auto;
}

.sched-table {
  width: 100%;
  min-width: 1270px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
}

.sched-table thead th {
  background: #eef2fb;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.sched-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #eef1f7;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

/* Column widths — 1270px total, so 17 columns fit a 1300px window */
.sched-table .c-check  { width: 30px;  text-align: center; }
.sched-table .c-no     { width: 34px;  color: var(--muted); }
.sched-table .c-title  { width: 158px; }
.sched-table .c-img    { width: 46px; }
.sched-table .c-type   { width: 74px; }
.sched-table .c-year   { width: 46px; }
.sched-table .c-price  { width: 76px; font-weight: 700; color: var(--success); }
.sched-table .c-make   { width: 74px; }
.sched-table .c-model  { width: 74px; }
.sched-table .c-cat    { width: 80px; }
.sched-table .c-miles  { width: 72px; }
.sched-table .c-fuel   { width: 70px; }
.sched-table .c-cond   { width: 76px; }
.sched-table .c-ext    { width: 70px; }
.sched-table .c-int    { width: 70px; }
.sched-table .c-desc   { width: 112px; color: #666; }
.sched-table .c-status { width: 108px; }

.sched-table .c-title a { color: var(--primary); text-decoration: underline; }
.sched-table .c-title a:hover { color: var(--accent); }

.sched-thumb {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  background: #eef1f7;
}
.sched-thumb.empty { border: 1px dashed var(--border); }

/* ── Row status colours ── */
.sched-row { cursor: pointer; transition: background 0.12s ease; }
.sched-row.status-pending { background: #fff;     }
.sched-row.status-posted  { background: #eaf7ec;  }
.sched-row.status-posting { background: #fff7e6;  }
.sched-row.status-failed  { background: #fdecec;  }

/* Hover — the row under the cursor stays highlighted until the pointer
   moves to another row. A left accent bar makes it unmistakable even on
   the tinted status rows. */
.sched-row.status-pending:hover { background: #e4ecff; }
.sched-row.status-posted:hover  { background: #d2ecd8; }
.sched-row.status-posting:hover { background: #ffedcc; }
.sched-row.status-failed:hover  { background: #fbdada; }

.sched-row td:first-child { box-shadow: inset 3px 0 0 transparent; }
.sched-row:hover td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

.sched-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}
.sched-badge.pending { background: #e0e8ff; color: var(--primary); }
.sched-badge.posted  { background: #cdecd2; color: var(--success); }
.sched-badge.posting { background: #ffe8c2; color: #b35c00; }
.sched-badge.failed  { background: #fbd5d5; color: var(--danger-dark); }

.sched-when {
  display: block;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Filler rows: keep the table 10 rows tall on short/empty pages ── */
.sched-filler td {
  padding: 4px 6px;
  border-bottom: 1px solid #eef1f7;
  background: #fff;
}
.sched-filler-inner { height: 34px; }       /* same as .sched-thumb */
.sched-empty-msg {
  line-height: 34px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ── Sortable headings ── */
.sched-table th.sortable { cursor: pointer; user-select: none; }
.sched-table th.sortable:hover { background: #dde5f7; }
.sched-table th .sort-ind {
  margin-left: 4px;
  font-size: 9px;
  color: #b0b8c9;
}
.sched-table th.sorted .sort-ind { color: var(--primary); font-size: 10px; }

/* ── Bottom bar: Save + pagination, pinned to the bottom ── */
.sched-bottom-bar {
  margin-top: auto;
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
}

.sched-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 14px 0;
}
.sched-footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sched-forecast { font-size: 11px; color: #555;         font-weight: 600; }
.sched-tz-note  { font-size: 11px; color: var(--muted); font-weight: 600; }

/* ── Pagination: matches Saved Listings and Activity ── */
.sched-pagination { margin-top: 4px; padding-bottom: 6px; text-align: center; }

#schedPrev, #schedNext {
  background-color: var(--warning);
  color: white;
  width: 40px;
  border: none;
  text-align: center;
  border-radius: 6px;
  padding: 2px;
  margin: 6px;
}
#schedPrev:hover, #schedNext:hover { cursor: pointer; }
#schedPrev:disabled, #schedNext:disabled { opacity: 0.4; cursor: not-allowed; }

#schedPageInfo { font-size: 12px; color: #888; }

/* =========================
   Marketplace Acquisition
   (sl-acq-*.js pages + popup card)
========================= */

.left-nav-btn[data-page^="acq"] { width: auto; padding: 6px 14px; }
.left-nav-sep { width: 1px; margin: 10px 8px 10px 2px; background: rgba(255,255,255,0.35); }

#modalText { white-space: pre-line; }

.page-content.acq-page { padding: 28px 32px 40px; gap: 18px; background: var(--bg); }
.acq-page h2 { font-size: 22px; margin-bottom: 4px; }
.acq-page h3 { font-size: 15px; margin: 4px 0 10px; }
.acq-muted { color: #6b7590; font-size: 12px; }
.acq-error { color: var(--danger-dark); }

.acq-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.acq-head-tight { align-items: center; margin-bottom: 8px; }
.acq-head-actions { display: flex; gap: 8px; align-items: center; }

.acq-btn, #pfSave {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 14px; border: 1px solid var(--primary); border-radius: 6px;
  background: var(--primary); color: #fff; font-size: 13px; cursor: pointer;
  text-decoration: none; white-space: nowrap; font-family: inherit;
}
.acq-btn:hover , #pfSave:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.acq-btn:disabled { opacity: .5; cursor: not-allowed; }
.acq-btn-ghost { background: #fff; color: var(--primary); }
.acq-btn-ghost:hover { background: #eef3fd; color: var(--primary-dark); }
.acq-btn-ghost.active { background: var(--primary); color: #fff; }
.acq-btn-danger { background: #fff; color: var(--danger-dark); border-color: #f3b8ba; }
.acq-btn-danger:hover { background: #fff1f1; border-color: var(--danger); color: var(--danger-dark); }
.acq-btn:focus-visible, .acq-chip:focus-visible, .acq-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.acq-link { background: none; border: none; color: var(--primary); text-decoration: underline; cursor: pointer; font-size: 13px; }

.acq-mode { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid; }
.acq-mode-live  { color: var(--success); border-color: #a9d3ab; background: #eef8ee; }
.acq-mode-local { color: #8a5a00; border-color: #f0d08a; background: #fff8e6; }

.acq-scan-status { font-size: 13px; color: #4a5470; min-height: 18px; display: flex; gap: 12px; align-items: center; }
.acq-scan-status.running { background: #eef3fd; border: 1px solid var(--border); padding: 8px 12px; border-radius: 6px; }
.acq-scan-status.warn { background: #fff8e6; border: 1px solid #f0d08a; color: #6b4600; padding: 8px 12px; border-radius: 6px; }

/* Stats strip */
.acq-stats { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.acq-stats > div { padding: 14px 18px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.acq-stats > div:first-child { border-left: none; }
.acq-stats strong { font-size: 24px; color: var(--text); }
.acq-stats span { font-size: 12px; color: #6b7590; }

/* Status chips */
.acq-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.acq-chip {
  display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px;
  border: 1px solid var(--border); border-radius: 999px; background: #fff;
  font-size: 12px; cursor: pointer; color: var(--text); font-family: inherit;
}
.acq-chip span { color: #6b7590; font-size: 11px; }
.acq-chip.active { background: var(--text); border-color: var(--text); color: #fff; }
.acq-chip.active span { color: #c6cde0; }

/* Filters */
.acq-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acq-filters input, .acq-filters select, .acq-actions select {
  padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: #fff; font-family: inherit; color: var(--text);
}
.acq-filters input[type=search] { min-width: 230px; }
.acq-filters input[type=number] { width: 110px; }
.acq-check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }

/* Table */
.acq-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.acq-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.acq-table th { text-align: left; font-weight: 600; font-size: 12px; color: #6b7590; padding: 10px 12px; border-bottom: 1px solid var(--border); background: #fafbfe; white-space: nowrap; }
.acq-table td { padding: 10px 12px; border-bottom: 1px solid #eef1f8; vertical-align: middle; }
.acq-table tbody tr:last-child td { border-bottom: none; }
.acq-table tbody tr { cursor: pointer; }
.acq-prof-table tbody tr, .acq-scan-table tbody tr { cursor: default; }
.acq-table tbody tr:hover td { background: #f7f9fe; }
.acq-table tbody tr.selected td { background: #eaf0fd; }
.acq-row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.acq-row-actions .acq-btn { padding: 5px 10px; font-size: 12px; }

.acq-veh { display: flex; gap: 10px; align-items: center; min-width: 220px; }
.acq-veh img, .acq-veh-noimg { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; background: #e8ecf5; flex: 0 0 auto; }
.acq-veh-title { font-weight: 600; }
.acq-pos { color: var(--success); font-weight: 600; }
.acq-neg { color: var(--danger-dark); font-weight: 600; }
.acq-drop { color: var(--success); font-size: 11px; font-style: normal; }

/* Score tile — the one strong visual in this module */
.acq-score {
  width: 44px; height: 44px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; color: #fff;
}
.acq-score-lg { width: 64px; height: 64px; font-size: 24px; border-radius: 8px; flex: 0 0 auto; }
.acq-score-high { background: #1f7a3a; }
.acq-score-good { background: var(--primary); }
.acq-score-mid  { background: #c98a00; }
.acq-score-low  { background: #8b93a7; }
.acq-score-none { background: #fff; color: #8b93a7; border: 1px dashed #b9c1d6; }

.acq-status { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: #eef1f8; color: #4a5470; white-space: nowrap; }
.acq-status-new { background: #e7efff; color: var(--primary-dark); font-weight: 600; }
.acq-status-saved { background: #f1eafd; color: #5b3aa3; }
.acq-status-contacted, .acq-status-negotiating, .acq-status-appointment { background: #fff3dc; color: #7a5200; }
.acq-status-purchased { background: #e3f4e4; color: var(--success); font-weight: 600; }
.acq-status-passed { background: #f2f2f2; color: #888; }

.acq-empty { background: #fff; border: 1px dashed #c6cfe6; border-radius: 8px; padding: 40px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.acq-empty p { color: #6b7590; max-width: 420px; }

/* Detail drawer */
.acq-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 460px; max-width: 100vw;
  background: #fff; border-left: 1px solid var(--border); box-shadow: -8px 0 24px rgba(26,37,64,0.12);
  overflow-y: auto; transform: translateX(100%); transition: transform .2s ease, visibility .2s; z-index: 900;
  padding: 0 22px 30px; visibility: hidden;
}
.acq-drawer.open { transform: translateX(0); visibility: visible; }
@media (prefers-reduced-motion: reduce) { .acq-drawer { transition: none; } }
.acq-drawer-head { position: relative; margin: 0 -22px 14px; }
.acq-drawer-img { width: 100%; height: 220px; object-fit: cover; display: block; background: #e8ecf5; }
.acq-drawer-title { display: flex; gap: 14px; align-items: center; padding: 16px 22px 0; }
.acq-drawer-title h3 { font-size: 17px; margin: 0 0 2px; }
.acq-x { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(255,255,255,0.92); font-size: 20px; cursor: pointer; z-index: 1; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.acq-x:hover { color: #f0f0f0; background: var(--danger-dark); }

.acq-money { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; }
.acq-money > div { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--border); }
.acq-money > div:first-child { border-left: none; }
.acq-money span { font-size: 11px; color: #6b7590; }
.acq-money strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.acq-money em { font-size: 11px; color: #6b7590; font-style: normal; }
.acq-summary { line-height: 1.55; margin-bottom: 12px; }
.acq-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.acq-actions .acq-btn { flex: 1; }
.acq-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.acq-quick .acq-btn { padding: 5px 10px; font-size: 12px; }

.acq-sec { border-top: 1px solid var(--border); padding: 10px 0; }
.acq-sec summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.acq-sec > *:not(summary) { margin-top: 8px; }
.acq-audit, .acq-specs { list-style: none; }
.acq-audit li, .acq-specs li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dotted #e1e6f2; }
.acq-audit li.acq-audit-line { color: #4a5470; font-size: 12px; display: block; }
.acq-audit li.acq-audit-total { border-bottom: none; font-size: 14px; }
.acq-specs span { color: #6b7590; }
.acq-specs b { text-align: right; font-weight: 600; word-break: break-all; }
.acq-conf { margin-top: 6px; }
.acq-desc { white-space: pre-wrap; background: #fafbfe; border: 1px solid var(--border); border-radius: 6px; padding: 10px; font-size: 12px; line-height: 1.5; max-height: 220px; overflow-y: auto; }
.acq-val-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.acq-val-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #6b7590; }
.acq-val-grid input, .acq-sec textarea { padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; font-family: inherit; width: 100%; }
.acq-note { padding: 8px 0; border-bottom: 1px dotted #e1e6f2; display: flex; flex-direction: column; gap: 3px; }
.acq-sec textarea { margin: 6px 0; resize: vertical; }

/* Forms (profiles + settings) */
.acq-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px; }
.acq-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #4a5470; font-weight: 600; }
.acq-form label small { font-weight: normal; color: #8b93a7; }
.acq-form input:not([type=checkbox]), .acq-form textarea, .acq-form select {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; font-family: inherit; font-weight: normal; color: var(--text); background: #fff;
}
.acq-form input:focus, .acq-form textarea:focus, .acq-filters input:focus, .acq-filters select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.acq-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
.acq-span2 { grid-column: span 2; }
.acq-form .acq-check-row { flex-direction: row; align-items: center; gap: 8px; font-weight: normal; margin: 6px 0 10px; }

.acq-note-small { margin: 4px 0 14px; font-weight: normal; }

.acq-settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.acq-settings-grid .acq-form > label { margin-bottom: 10px; }
.acq-times { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.acq-time { display: flex; gap: 8px; align-items: center; }
.acq-time .acq-btn { padding: 5px 10px; font-size: 12px; }
.acq-th-table { border-collapse: collapse; width: 100%; margin-bottom: 14px; }
.acq-th-table th { text-align: left; font-size: 12px; color: #6b7590; font-weight: 600; padding: 4px 6px; }
.acq-th-table td { padding: 3px 6px; }
.acq-th-table .acq-score { width: 32px; height: 28px; font-size: 13px; }
.acq-th-table input { width: 90px; }
.acq-save-bar { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }

@media (max-width: 1200px) {
  .acq-settings-grid { grid-template-columns: 1fr 1fr; }
  .acq-stats { grid-template-columns: repeat(2, 1fr); }
  .acq-stats > div:nth-child(3) { border-left: none; }
  .acq-stats > div:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 800px) {
  .acq-settings-grid, .acq-form-grid { grid-template-columns: 1fr; }
  .acq-span2 { grid-column: auto; }
  .page-content.acq-page { padding: 18px 14px; }
}

/* =========================
   Marketplace Acquisition — tables, selection, modal
   (added with the profile modal + row selection update)
========================= */

/* Sortable headers */
.acq-th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.acq-th-sort:hover { background: #eef3fd; }
.acq-sort-arrow { display: inline-block; width: 10px; margin-left: 4px; font-size: 9px; color: #b9c1d6; }
.acq-sort-arrow.on { color: var(--primary); }

/* Checkbox + number columns */
.acq-cb { width: 18px; height: 18px; cursor: pointer; accent-color: #2f5ea8; margin: 0; vertical-align: middle; }
.acq-num { color: #6b7590; font-size: 12px; text-align: center; }
.acq-table tbody tr.selected td { background: #eaf0fd; }

/* Row delete + bulk delete, matching the Saved Listings buttons */
.acq-del-btn {
  padding: 5px 12px; border: none; border-radius: 6px; cursor: pointer;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--danger); font-family: inherit;
}
.acq-del-btn:hover { background: var(--danger-dark); }
.acq-bulk-del {
  padding: 6px 14px; background: #fee2e2; color: #e53935; border: 1px solid #fca5a5;
  border-radius: 6px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.acq-bulk-del:hover:not(:disabled) { background: #fdd; }
.acq-bulk-del:disabled { opacity: .5; cursor: not-allowed; }

/* Ten rows tall, so the pager sits in the same place on every page */
.acq-table-wrap.acq-fixed-rows { min-height: 700px; position: relative; }
.acq-table-wrap.acq-fixed-rows.acq-rows-sm { min-height: 600px; }
.acq-empty-line { padding: 24px; color: #6b7590; font-size: 13px; }

/* Pagination, same look as the Saved Listings pager */
.acq-pagination { margin-top: 14px; }
.acq-pagination button {
  background-color: var(--warning); color: #fff; width: 40px; border: none;
  text-align: center; border-radius: 6px; padding: 2px; margin: 6px; cursor: pointer; font-family: inherit;
}
.acq-pagination button:disabled { opacity: .45; cursor: not-allowed; }
.acq-page-info { font-size: 12px; color: #888; }

/* Search-profile modal */
.acq-modal-box { max-width: 640px; width: 94%; position: relative; padding: 24px 24px 18px; }
.acq-modal-x {
  position: absolute; top: 10px; right: 12px; width: 28px; height: 28px; line-height: 1;
  border: none; background: transparent; font-size: 22px; color: var(--danger); cursor: pointer; border-radius: 6px;
}
.acq-modal-x:hover { color: #f0f0f0; background: var(--danger-dark); }
.acq-modal-body { max-height: 70vh; overflow-y: auto; margin-bottom: 8px; padding-right: 4px; }

.acq-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.acq-grid4 > label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #4a5470; font-weight: 600; }
.acq-grid4 input, .acq-grid4 select {
  padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px;
  font-family: inherit; font-weight: normal; color: var(--text); background: #fff; width: 100%; box-sizing: border-box;
}
.acq-grid4 input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.acq-span2 { grid-column: span 2; }
.acq-span4 { grid-column: span 4; }
.acq-check-cell span { display: flex; align-items: center; gap: 6px; font-weight: normal; font-size: 13px; height: 33px; }
.acq-check-cell input { width: auto; }

@media (max-width: 760px) {
  .acq-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acq-span4 { grid-column: span 2; }
}

/* Keyword boxes: one line by default, drag the corner to see more */
.acq-kw-box {
  width: 100%; box-sizing: border-box; padding: 7px 9px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; font-family: inherit; font-weight: normal;
  color: var(--text); background: #fff; resize: vertical; min-height: 33px; line-height: 1.4;
}
.acq-kw-box:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.acq-grid4 > label > small { font-weight: normal; color: #8b93a7; font-size: 11px; }
.acq-scan-table .acq-del-btn { padding: 4px 10px; }

/* =========================
   Shared look (2.4.0)
   Brings the original pages in line with the acquisition pages:
   same palette, weights, radii and control sizing. Colours and type
   only — no layout, no behaviour.
========================= */

/* ── Sell Mode / Buy Mode buttons (js/mode.js) ── */
.mode-tabs { display: flex; gap: 8px; margin-left: 14px; }
.mode-tab {
  padding: 6px 14px; border: 1px solid rgba(255,255,255,0.7); border-radius: 6px;
  background: rgba(255,255,255,0.12); color: #fff; font-family: inherit;
  font-size: 12px; cursor: pointer; white-space: nowrap; min-width: 92px;
}
.mode-tab:hover { background: rgba(255,255,255,0.28); }
.mode-tab.on, .mode-tab.on:hover { background: #2e7d32; border: 1px solid #fff;color: #fff; }
/* Popup: own line, directly under the title */
.mode-tabs-popup { flex-basis: 100%; margin-left:42px; justify-content: flex-start; }
.mode-tabs-popup .mode-tab { flex: 0 0 auto; width: 72px; min-width: 0; padding: 3px; }
.popup-banner { flex-wrap: wrap; }

/* ── Cards ── */
.auto-section, .limit-section, .inline-panel, .listing-card, .login-box,
.del-confirm-box, .inline-modal-box, .ai-section {
  border: 1px solid var(--border); border-radius: 8px; box-shadow: none;
}
.card-title, .auto-label, .limit-label, .help-label, .detail-label, .ext-title { font-weight: 600; }

#pageInfo, .coming-soon { color: #6b7590; font-size: 12px; }

/* ── Buttons ── */
.set-limit-btn, .btn-save, .btn-cancel-modal, .add-vehicle-btn,
.listing-delete-btn, .delete-btn, .edit-btn, .generate-ai-btn, .auto-post-btn,
.auto-post-tiktok-btn, .help-submit-btn, #logoutBtn, .delete-all-btn,
.emoji-toggle-btn, .account-menu-btn {
  font-family: inherit; font-weight: 500; border-radius: 6px; letter-spacing: 0;
}
.btn-save, .help-submit-btn { background: var(--primary); color: #fff; }
.btn-save:hover, .help-submit-btn:hover { background: var(--primary-dark); }

/* ── Tabs ── */
.tab-btn { background: #fff; color: var(--primary); border: 1px solid var(--border); border-radius: 6px; font-weight: 600; font-size: 13px; }
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Inputs ── */
.popup-body input, .popup-body select, .popup-body textarea,
.inline-panel input, .form-group input, .form-group select, .form-row input,
.help-textarea, .sched-page input, .sched-page select, .details-panel input,
.details-panel select, .details-panel textarea {
  font-family: inherit; font-size: 13px; border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); background: #fff;
}
.popup-body input:focus, .popup-body select:focus, .popup-body textarea:focus,
.help-textarea:focus, .details-panel input:focus, .details-panel textarea:focus,
.details-panel select:focus, .form-group input:focus {
  outline: 2px solid var(--accent); outline-offset: -1px;
}

/* ── Tables ── */
.activity-table th, .sched-table th, #analytics-header th {
  background: #fafbfe; color: #6b7590; font-size: 12px; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.activity-table td, .sched-table td { font-size: 13px; border-bottom: 1px solid #eef1f8; color: var(--text); }
.activity-table, .sched-table { font-size: 13px; }

/* ── Listing cards ── */
.card-title { font-size: 14px; color: var(--text); }
.listing-card:hover { border-color: #c6cfe6; }

/* ── Modal ── */
.modal-box { border: 1px solid var(--border); box-shadow: 0 8px 32px rgba(26,37,64,0.14); }
.modal-title { font-weight: 600; }
.modal-actions button { font-family: inherit; font-weight: 600; }

/* ── Right details panel: flat card instead of gradient + orange frame ── */
.details-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 0 14px 14px;
}
.ext-title { font-size: 14px; letter-spacing: 0; text-transform: none; }
.empty-state { color: #6b7590; font-size: 13px; }
.vehicle-item { border-bottom: 1px solid #eef1f8; }

/* ── Popup header: title and account on one row, modes underneath ── */
.popup-banner { gap: 6px; }
.popup-banner .banner-title { font-size: 17px; white-space: nowrap; }
.popup-banner img { width: 30px; height: 30px; }

/* ── Toggles in the brand colour ── */
input:checked + .slider { background-color: var(--primary); }

.help-intro, .sched-hint, .coming-soon { color: #6b7590; }

/* =========================
   Layout polish (2.4.0)
========================= */

/* Centred "Loading…" on the acquisition pages, like Saved Listings */
.acq-loading {
  text-align: center;
  margin-top: 50px;
  color: #6b7590;
  font-size: 13px;
}

/* Empty status lines shouldn't add a gap, so every acquisition page has
   the same distance between its heading and the first card. */
.acq-scan-status:empty, .acq-page > .modal-msg:empty { display: none; }

/* Details panel: divider line, and the tabs lined up with the nav row */
.details-panel { border-left: 2px solid #b9c9ee; }
.details-panel .ext-title {
  height: 58px;
  background: linear-gradient(to right, #2f5ea8, #5478FF);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 -14px;            /* cancel the panel padding so it spans the top */
  border-radius: 0;
}
.details-panel .panel-tabs {
  height: 52px;               /* same height as the left nav row */
  align-items: center;
  margin: 0 -14px 14px;
  padding: 0 14px;
  background: #fff;
  border-bottom: 2px solid var(--border);
}

/* Help page: centred column */
#page-help .page-content, .help-form, .help-intro {
  margin-left: auto;
  margin-right: auto;
}
.help-form, .help-intro { max-width: 560px; width: 100%; }
#page-help .page-content { text-align: center; }
#page-help .help-form { text-align: left; }
.acq-head .acq-scan-status { margin-top: 6px; }

body.trial-over #sellTools,
body.trial-over #buyTools,
body.trial-over .mob-tabbar,
body.trial-over .left-nav-btn:not(#signOutBtn) { display: none !important; }
#trialOverPage { padding: 60px 20px; text-align: center; color: #4a5470; }
#trialOverPage h2 { font-size: 20px; margin-bottom: 8px; color: var(--text); }
#trialOverPage p { font-size: 14px; color: #6b7590; }

/* Trial over: pages are hidden, but the menu bar stays so Sign Out is always reachable */
body.trial-over .left-page,
body.trial-over .details-panel { display: none !important; }
/* ===== Password eye icon (same look everywhere) ===== */
.password-wrapper input { padding-right: 44px; }
.togglePassword.zj-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  padding: 7px;
  box-sizing: border-box;
  border-radius: 6px;
  color: #8a94ad;
  cursor: pointer;
  line-height: 0;
  font-size: 0;
  margin: 0 !important;
}
.togglePassword.zj-eye:hover { color: var(--primary, #2f5ea8); background: #eef2fc; }
.togglePassword.zj-eye svg { width: 18px; height: 18px; display: block; }

/* ── "Hello, <name>" under the main heading ── */
.banner-title-wrap { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.banner-greeting { font-size: 12px; color: rgba(255, 255, 255, 0.8); margin-top: 2px; line-height: 1.2; }
.banner-greeting:empty { display: none; }
.banner-greeting a {
  color: #fff; font-weight: 600; text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.6); cursor: pointer;
}
.banner-greeting a:hover { border-bottom-style: solid; }
body.trial-over .banner-greeting a { pointer-events: none; border-bottom: none; }