/* =====================================================================
   TripMate - dashboard panels shared by all four roles.
   Layout chrome (.dash, sidebar, stat cards) lives in layout.css.
   ===================================================================== */

.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sp-5); align-items: start; }

/* ---- Compact list used across dashboard panels -------------------- */
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--line-200);
}
.mini-list li:last-child { border-bottom: 0; }
.mini-list li:first-child { padding-top: 0; }
.mini-list a { color: var(--navy-900); }
.mini-list a:hover { color: var(--tm-link); }
.mini-list .fw-600 { display: block; }
.mini-list span.text-xs { display: block; }

/* ---- Profile completion meter ------------------------------------- */
.completion { display: flex; align-items: center; gap: var(--sp-3); }
.completion__ring {
  --pct: 0;
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--teal-600) calc(var(--pct) * 1%), var(--surface-3) 0);
  display: grid; place-items: center;
}
.completion__ring span {
  width: 48px; height: 48px; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; font-size: var(--fs-sm); font-weight: 700; color: var(--navy-900);
}

/* ---- Checklist for profile / verification steps ------------------- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) 0; font-size: var(--fs-sm); color: var(--ink-700);
}
.checklist li::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--line-300);
}
.checklist li.is-done { color: var(--ink-500); }
.checklist li.is-done::before {
  border-color: var(--success-600); background: var(--success-600)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M4.6 9.4 1.2 6l1.1-1.1 2.3 2.2 5-5L10.8 3z'/%3E%3C/svg%3E") center/9px no-repeat;
}

/* ---- Availability calendar editor --------------------------------- */
.avail-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.avail-day {
  aspect-ratio: 1; border: 1px solid var(--line-300); border-radius: var(--r-sm);
  background: var(--surface); cursor: pointer; font-size: var(--fs-xs); font-weight: 600;
  color: var(--ink-700); display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), border-color var(--transition);
  min-height: 36px;
}
.avail-day:hover { border-color: var(--teal-600); }
.avail-day[data-status="available"] { background: var(--success-100); border-color: #A7E3BC; color: var(--success-600); }
.avail-day[data-status="booked"]    { background: var(--danger-100);  border-color: #F7BDBD; color: var(--danger-600); cursor: not-allowed; }
.avail-day[data-status="blocked"]   { background: var(--line-200);    color: var(--ink-400); }
.avail-legend { display: flex; gap: var(--sp-4); flex-wrap: wrap; font-size: var(--fs-xs); margin-top: var(--sp-3); color: var(--ink-500); }

/* ---- Simple bar chart for analytics ------------------------------- */
.bars { display: flex; align-items: flex-end; gap: var(--sp-2); height: 140px; }
.bars__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: var(--sp-2); height: 100%; }
.bars__bar { width: 100%; background: var(--teal-600); border-radius: var(--r-sm) var(--r-sm) 0 0; min-height: 3px; }
.bars__label { font-size: var(--fs-xs); color: var(--ink-500); }

@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Admin list-table action buttons ------------------------------ */
/* Keeps the row of Edit / Pause / Image / Remove buttons aligned, evenly
   spaced, and wrapping neatly instead of crowding against each other. */
.table-actions {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  justify-content: flex-end; align-items: center;
}
.table-actions .btn { white-space: nowrap; }
/* A solid red button repeated down every row of a moderation table reads as
   an alarm and drowns the row it belongs to. Inside a table the destructive
   action is outlined and only fills on hover, when it is actually being
   aimed at. Solid --danger buttons elsewhere (modals, forms) are untouched. */
.table-actions .btn--danger {
  background: var(--surface); color: var(--danger-600); border-color: var(--line-300);
}
.table-actions .btn--danger:hover:not(:disabled) {
  background: var(--danger-600); color: #fff; border-color: var(--danger-600);
}
@media (max-width: 720px) {
  .table--cards .table-actions { justify-content: flex-end; width: 100%; }
}

/* Rows with four actions (guides, agencies, packages) line up as an even
   2-up block instead of wrapping raggedly. Right-aligned within the cell,
   buttons stretched to equal width so both rows align. */
.table-actions--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(76px, 1fr));
  gap: var(--sp-2);
  width: min(100%, 220px);
  margin-left: auto;
  justify-content: flex-end;
}
.table-actions--grid .btn { width: 100%; }
@media (max-width: 720px) {
  .table--cards .table-actions--grid { width: 100%; }
}

/* ---- Thumbnails in list tables ------------------------------------ */
.thumb {
  width: 52px; height: 40px; object-fit: cover; border-radius: var(--r-sm);
  border: 1px solid var(--line-200); background: var(--surface-3);
  flex-shrink: 0; display: block;
}
.thumb--round { width: 40px; height: 40px; border-radius: 50%; }

/* ---- "Items need attention" list with per-row View buttons -------- */
.attention__title { display: block; margin-bottom: var(--sp-2); }
.attention__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.attention__item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
}
.attention__item + .attention__item { padding-top: var(--sp-2); border-top: 1px solid rgba(0, 0, 0, .08); }
.attention__item .btn { flex-shrink: 0; }

/* ---- Image manager modal ------------------------------------------ */
.img-manager { display: flex; flex-direction: column; gap: var(--sp-3); }
.img-manager__preview {
  border: 1px solid var(--line-200); border-radius: var(--r-md); overflow: hidden;
  background: var(--surface-3); display: grid; place-items: center; min-height: 150px;
}
.img-manager__preview img {
  display: block; width: 100%; max-height: 260px; object-fit: cover;
}
.img-manager__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
