/* Villas, CRM lite pages of the admin panel. Uses the panel's tokens. */
.vl-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.vl-kpi {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.vl-kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.vl-kpi strong {
  display: block;
  font-size: 24px;
  font-weight: 600;
  margin-top: 2px;
}
.vl-kpi.warn strong {
  color: #b45309;
}
.vl-two {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .vl-two {
    grid-template-columns: 1fr;
  }
}
.vl-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.vl-box > .vl-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.vl-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
}
.vl-row small {
  color: var(--muted);
}
.vl-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.vl-photo {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--brand-100);
  border: 1px solid var(--line);
}
.vl-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vl-photo .vl-flags {
  position: absolute;
  left: 4px;
  bottom: 4px;
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}
.vl-photo .vl-flags i {
  font-style: normal;
  font-size: 10px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 6px;
  padding: 0 5px;
}
.vl-photo .vl-space {
  position: absolute;
  left: 4px;
  top: 4px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  padding: 0 5px;
}
.vl-spaces {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px;
}
.vl-chip {
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 10px;
  background: var(--brand-100);
  color: var(--brand-800);
}
.vl-chip.ok {
  background: #dcfce7;
  color: #166534;
}
.vl-chip.warn {
  background: #fef3c7;
  color: #92400e;
}
.vl-chip.bad {
  background: #fee2e2;
  color: #991b1b;
}
.vl-id-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.vl-id-images img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--brand-50);
  max-height: 340px;
  object-fit: contain;
}
.vl-checks label {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 3px 0;
}
.vl-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.vl-table-inline {
  width: 100%;
  border-collapse: collapse;
}
.vl-table-inline th,
.vl-table-inline td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.vl-table-inline th {
  color: var(--muted);
  font-weight: 500;
}
.vl-msg {
  padding: 8px 10px;
  border-radius: 10px;
  margin-bottom: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.vl-msg.me {
  background: var(--brand-50);
  border-color: var(--brand-200);
}
.vl-msg.internal {
  background: #fffbeb;
  border-color: #fde68a;
}
.vl-msg small {
  color: var(--muted);
  display: block;
}
.vl-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.vl-warn {
  color: #b45309;
  font-size: 13px;
  padding: 4px 0;
}

/* Villa settings: tabs, cards with a short description, two columns of fields, a save bar that stays in view */
.vs-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0;
  margin: 0 0 20px;
  padding: 14px 8px 8px;
  background: #fff;
  border: 1px solid var(--line, #e3e8f0);
  border-radius: 14px;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: thin;
}
.vs-tabs button {
  position: relative;
  flex: 1 0 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 3px 6px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
}
/* the line that joins one step to the next */
.vs-tabs button:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(50% + 19px);
  right: calc(-50% + 19px);
  height: 2px;
  background: var(--line, #e3e8f0);
}
.vs-tabs button.passed:not(:last-child)::after {
  background: var(--brand-300);
}
.vs-tabs button i {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line, #e3e8f0);
  background: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.vs-tabs button:hover {
  color: var(--ink);
}
.vs-tabs button:hover i {
  border-color: var(--brand-300);
}
.vs-tabs button.passed i {
  border-color: var(--brand-300);
  background: var(--brand-100);
  color: var(--brand-700);
}
.vs-tabs button.active {
  color: var(--ink);
  font-weight: 650;
}
.vs-tabs button.active i {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.vs-tabs button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 8px;
}
.vs-pane {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.vs-pane[hidden] {
  display: none;
}
.vs-card {
  background: #fff;
  border: 1px solid var(--line, #e3e8f0);
  border-radius: 14px;
  padding: 20px 24px;
  max-width: 920px;
}
.vs-card header {
  margin-bottom: 16px;
}
.vs-card header strong {
  font-size: 16px;
}
.vs-card header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.vs-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px 28px;
}
.vs-fields .form-field {
  margin: 0;
}
.vs-fields .form-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}
.vs-fields .form-field input[type='number'] {
  width: 100%;
  max-width: 200px;
  height: 38px;
}
.vs-fields .form-field small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.vs-wide {
  grid-column: 1 / -1;
}
.vs-days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.vs-day {
  margin: 0;
}
.vs-day input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.vs-day span {
  display: inline-block;
  min-width: 52px;
  text-align: center;
  padding: 8px 10px;
  border: 1px solid var(--line, #e3e8f0);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}
.vs-day input:checked + span {
  background: #eef2ff;
  border-color: #4f46e5;
  color: #3730a3;
  font-weight: 600;
}
.vs-savebar {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--line, #e3e8f0);
  border-radius: 14px;
  box-shadow: 0 -4px 14px rgba(20, 30, 60, 0.06);
  z-index: 5;
}
.vs-stepnav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.vs-stepnav span {
  min-width: 170px;
  text-align: center;
  color: var(--ink);
  font-size: 13px;
}
.vs-hint {
  flex: 1;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}
.vs-savebar button:disabled {
  opacity: 0.45;
  cursor: default;
}
@media (max-width: 760px) {
  .vs-savebar {
    flex-wrap: wrap;
  }
  .vs-hint {
    display: none;
  }
}

/* Listing review: photo removal and the details editor. */
.vl-photo-box {
  position: relative;
  display: block;
}
.vl-photo-del {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: #00000099;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}
.vl-photo-box:hover .vl-photo-del,
.vl-photo-del:focus-visible {
  opacity: 1;
}
.vl-photo-del:hover {
  background: #b91c1c;
}
.vl-edit .vl-fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px 16px;
  margin: 0 0 16px;
  min-width: 0;
}
.vl-edit legend {
  padding: 0 8px;
  font-weight: 650;
  color: var(--ink);
}
.vl-edit textarea {
  width: 100%;
}
.vl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.vl-fac-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  margin-bottom: 8px;
}
.vl-fac-group > b {
  flex-basis: 100%;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.vl-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}
.vl-bed {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.vl-bed > b {
  min-width: 90px;
}
.vl-stats {
  margin-bottom: 18px;
}
.vl-log {
  align-items: flex-start;
  gap: 16px;
}
.vl-log > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.vl-log > small {
  flex-shrink: 0;
  white-space: nowrap;
}
.vl-payout-tiles {
  padding: 0;
}
.vl-payout-table td small {
  display: block;
  color: var(--muted);
}
/* A button row above a card keeps its distance from the card. */
.vl-bar {
  margin: 0 0 18px;
}
.vl-cur {
  display: inline-flex;
  margin: 0 0 14px;
}
