/* ==========================================================
   Venue Dekho — Admin panel styles
   Brand tokens live in theme.css (loaded first).
   ========================================================== */

:root { --vd-sidebar-w: 248px; }

body {
  font-family: var(--vd-font-body);
  background: var(--vd-bg);
  color: var(--vd-ink);
  font-size: .95rem;
}

/* ---------- Top bar ---------- */
.vd-topbar {
  background: var(--vd-ink);
  min-height: 58px;
}
.vd-topbar .navbar-brand,
.vd-topbar .navbar-brand:hover { color: #fff; }
.vd-topbar .vd-logo { height: 34px; width: auto; }

/* ---------- Layout ---------- */
.vd-layout { display: flex; min-height: calc(100vh - 58px); }
.vd-main   { flex: 1; min-width: 0; }

.vd-sidebar {
  width: var(--vd-sidebar-w);
  flex: 0 0 var(--vd-sidebar-w);
  background: var(--vd-surface);
  border-right: 1px solid var(--vd-line);
}
@media (min-width: 992px) {
  .vd-sidebar { position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto; }
}

/* Bootstrap sets `.offcanvas-lg .offcanvas-body { display: flex }` above the lg
   breakpoint (it is built for horizontal navbars). Left alone, that lays the
   account-status block and the nav out side by side and overflows the sidebar. */
.vd-sidebar .offcanvas-body {
  display: block;
  flex-grow: 1;
  min-width: 0;
}

.vd-nav { padding: .75rem 0; }
.vd-nav .nav-link {
  color: var(--vd-body);
  padding: .55rem 1.1rem;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  border-left: 3px solid transparent;
}
.vd-nav .nav-link i { width: 1.1rem; text-align: center; }
.vd-nav .nav-link:hover { background: var(--vd-brand-tint); color: var(--vd-brand); }
.vd-nav .nav-link.active {
  background: var(--vd-brand-soft);
  color: var(--vd-brand-dark);
  border-left-color: var(--vd-brand);
  font-weight: 600;
}
.vd-nav .nav-link.disabled { color: #b9b1b6; cursor: default; }
.vd-nav-heading {
  padding: 1rem 1.1rem .35rem;
  font-size: .68rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--vd-muted);
  font-weight: 700;
}

.vd-footer { border-top: 1px solid var(--vd-line); background: var(--vd-surface); }

/* ---------- Stat cards ---------- */
.vd-stat-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  margin-bottom: .65rem;
}
.vd-stat-value { font-size: 1.65rem; font-weight: 700; line-height: 1.1; }
.vd-stat-label { font-size: .8rem; color: var(--vd-muted); }

/* ---------- Tables ---------- */
.vd-thumb {
  width: 40px; height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--vd-line);
  flex: 0 0 40px;
}
.vd-thumb-lg {
  width: 62px; height: 46px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--vd-line);
  flex: 0 0 62px;
}
.table > :not(caption) > * > * { padding: .7rem .75rem; }
.card { border-radius: var(--vd-radius); }

/* ---------- Gallery manager ---------- */
.vd-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .75rem; }
.vd-gallery-item { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--vd-line); }
.vd-gallery-item img { width: 100%; height: 92px; object-fit: cover; display: block; }
.vd-gallery-item .vd-gallery-actions {
  position: absolute; top: 4px; right: 4px; display: flex; gap: 3px;
}
.vd-gallery-item .btn { --bs-btn-padding-y: .1rem; --bs-btn-padding-x: .35rem; font-size: .72rem; }

/* ---------- Login ---------- */
.vd-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, #2a1017 0%, #7d1735 55%, var(--vd-brand) 130%);
  padding: 1.5rem;
}
.vd-login-wrap  { width: 100%; max-width: 415px; }
.vd-login-card  { border-radius: 16px; }
.vd-login-card .vd-logo { height: 52px; width: auto; }

/* ---------- Lead status pills ---------- */
.vd-pill { font-size: .72rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px; }
.vd-pill-new       { background: var(--vd-brand-soft); color: var(--vd-brand-darker); }
.vd-pill-contacted { background: #e7f1fd; color: #1c5fa8; }
.vd-pill-qualified { background: #fdf3e0; color: #97650f; }
.vd-pill-converted { background: #e4f6ee; color: #14764f; }
.vd-pill-closed    { background: #eeeaec; color: #6c6167; }

/* ---------- Vendor credential hand-off ---------- */
.vd-cred-card{border-left:4px solid var(--vd-success) !important}
.vd-cred-box{
  background:var(--vd-bg);
  border:1px dashed var(--vd-line);
  border-radius:10px;
  padding:.9rem 1rem;
  display:grid;
  gap:.45rem;
}
.vd-cred-box > div{display:flex;flex-wrap:wrap;gap:.5rem;align-items:baseline;font-size:.88rem}
.vd-cred-box span{
  min-width:150px;font-size:.68rem;letter-spacing:.1em;text-transform:uppercase;color:var(--vd-muted);
}
.vd-cred-box code{color:var(--vd-ink);background:#fff;padding:.15rem .45rem;border-radius:5px;border:1px solid var(--vd-line)}

/* ---------- Owner replies inside the review queue ---------- */
.vd-reply-review{
  border-left:3px solid var(--vd-warning, #d08700);
  background:#fffaf0;
  border-radius:0 8px 8px 0;
  padding:.7rem .9rem;
  margin-bottom:.5rem;
}
.vd-reply-live    {border-left-color:#1f9d6b;background:#f1faf6}
.vd-reply-rejected{border-left-color:#e82f5d;background:#fdf2f5}

/* ---------- Multi-select venue types ---------- */
.vd-typepick{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
  gap:.45rem;
  border:1px solid var(--vd-line);
  border-radius:10px;
  padding:.7rem;
  background:#fff;
  max-height:220px;
  overflow-y:auto;
}
.vd-typepick-opt{
  display:flex;align-items:center;gap:.5rem;
  padding:.4rem .6rem;border-radius:8px;
  border:1px solid transparent;
  font-size:.86rem;cursor:pointer;
  transition:background .15s ease,border-color .15s ease;
}
.vd-typepick-opt:hover{background:var(--vd-brand-tint)}
.vd-typepick-opt input{
  width:16px;height:16px;flex:0 0 auto;accent-color:var(--vd-brand);cursor:pointer;
}
.vd-typepick-opt:has(input:checked){
  background:var(--vd-brand-tint);
  border-color:var(--vd-brand);
  font-weight:500;
}
.vd-typepick-opt[hidden]{display:none}
.vd-typepick-empty{
  grid-column:1/-1;color:var(--vd-muted);font-size:.84rem;padding:.4rem .6rem;
}

/* Lead release controls */
.vd-assign{
  background:#fff;border:1px solid var(--vd-line);
  border-left:3px solid var(--vd-brand);
  border-radius:0 10px 10px 0;padding:.85rem 1rem;
}

/* Vendor: gallery placeholder on an unsaved listing */
.vd-gallery-soon{
  border:1px dashed #d8d2d5;border-radius:12px;padding:1.6rem 1.2rem;
  text-align:center;background:#fbfafb;
}
.vd-gallery-soon i{font-size:1.8rem;color:#c9a9b4;display:block;margin-bottom:.5rem}

/* Vendor dashboard: performance + upgrade panel */
.vd-perf-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:.75rem;margin-bottom:1rem}
.vd-perf-stat{background:#f8f7f8;border-radius:12px;padding:.85rem .7rem;text-align:center}
.vd-perf-stat strong{display:block;font-family:var(--vd-font-display,inherit);font-size:1.6rem;line-height:1.1;color:#2f2f35}
.vd-perf-stat span{font-size:.74rem;color:#8a8a90}
.vd-perf-stat.is-locked strong{color:var(--vd-brand,#b4123f)}
.vd-perf-stat.is-locked i{font-size:.8rem}
.vd-perf-locked{display:flex;gap:.7rem;align-items:flex-start;padding:.85rem 1rem;margin-bottom:1rem;
  background:var(--vd-brand-tint,#fdf2f5);border:1px solid #f3d3dd;border-radius:12px}
.vd-perf-locked > i{color:var(--vd-brand,#b4123f);font-size:1.1rem;margin-top:.15rem}
.vd-perf-locked strong{display:block;font-size:.95rem}
.vd-perf-locked span{font-size:.82rem;color:#6c6c72}
.vd-perf-next{display:flex;gap:1rem;align-items:center;justify-content:space-between;flex-wrap:wrap;
  padding:1rem 1.15rem;border:1px solid var(--vd-line,#ece7e9);border-radius:12px;background:#fff}
.vd-perf-next-label{font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:#9a9aa0;margin:0}
.vd-perf-next-name{font-family:var(--vd-font-display,inherit);font-size:1.15rem;margin:.1rem 0 .25rem}
.vd-perf-next-line{font-size:.85rem;color:#5d5d63;margin:0;max-width:34rem}
@media (max-width:767.98px){
  .vd-perf-grid{grid-template-columns:repeat(2,1fr)}
  .vd-perf-next{flex-direction:column;align-items:stretch}
}

/* ---- Category field profiles (Phase 18) -------------------------------
   The per-category question set on the listing editor. Matches the type
   picker above, so the two read as one control surface. */
.vd-field-group + .vd-field-group{
  margin-top:1.5rem;padding-top:1.25rem;border-top:1px solid var(--vd-line,#e9ecef);
}
.vd-field-group-title{
  font-size:.82rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  color:var(--vd-muted);margin:0 0 .25rem;
}
.vd-checkgrid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:.4rem;
}
.vd-checkchip{
  display:flex;align-items:center;gap:.5rem;
  padding:.4rem .6rem;border-radius:8px;
  border:1px solid var(--vd-line,#e9ecef);background:#fff;
  font-size:.84rem;cursor:pointer;
  transition:background .15s ease,border-color .15s ease;
}
.vd-checkchip:hover{background:var(--vd-brand-tint)}
.vd-checkchip input{
  width:15px;height:15px;flex:0 0 auto;accent-color:var(--vd-brand);cursor:pointer;
}
.vd-checkchip:has(input:checked){
  background:var(--vd-brand-tint);border-color:var(--vd-brand);font-weight:500;
}

/* A note the admin attached when passing an enquiry to the vendor. */
.vd-lead-note{
  background:var(--vd-brand-tint,#fdf2f5);
  border-left:3px solid var(--vd-brand,#d81b60);
  border-radius:6px;padding:.4rem .6rem;
  font-size:.78rem;color:var(--vd-ink,#222);
}

/* Vendors a lead has been released to. Each row removable on its own, because
   pulling the whole lead back when you only meant one vendor loses the rest. */
.vd-assignees{
  display:flex;flex-direction:column;gap:.4rem;
  border:1px solid var(--vd-line,#e3e6ea);border-radius:8px;padding:.5rem;
  background:#fff;
}
.vd-assignee{
  display:flex;align-items:flex-start;justify-content:space-between;
  gap:.5rem;padding:.35rem .5rem;border-radius:6px;
  background:var(--vd-brand-tint,#fdf2f5);font-size:.84rem;
}
.vd-assignee form{margin:0}

/* Per-photo section selector in the gallery manager. Sits under the thumbnail
   rather than in the hover actions, because it is a two-step control and a
   hover menu that disappears mid-choice is maddening. */
.vd-gallery-group{margin:.35rem 0 0}
.vd-gallery-group select{font-size:.78rem;padding:.2rem 1.4rem .2rem .4rem}

/* ---- Halls and lawns inside one listing (Phase 40) --------------------
   One bordered block per space: its fields on top, its photographs and the
   remove button underneath, so a venue with nine halls still reads as nine
   things and not as one long form. */
.vd-space-row{
  border:1px solid var(--vd-line);border-radius:12px;
  padding:.85rem .9rem;margin-bottom:.75rem;background:#fff;
}
.vd-space-foot{
  display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;
  margin-top:.7rem;padding-top:.65rem;border-top:1px solid var(--vd-line);
}
.vd-space-thumbs{display:flex;align-items:center;gap:.3rem;flex-wrap:wrap}
.vd-space-thumbs img{
  width:44px;height:34px;object-fit:cover;border-radius:5px;
  border:1px solid var(--vd-line);display:block;
}
/* The add form is the one thing on this card that is not an existing row, so
   it is tinted rather than bordered like them. */
.vd-space-add{
  background:var(--vd-brand-tint,#fdf2f5);border-radius:12px;
  padding:.85rem .9rem;margin:0;
}


/* ---- audience tiles on the plan-reminders page -------------------------- */
.vd-seg{
  display:flex; flex-direction:column; gap:.15rem; height:100%;
  border:1px solid var(--vd-line,#e4e7ea); border-radius:9px;
  padding:.65rem .8rem; text-decoration:none; color:#3d444b; background:#fff;
  transition:border-color .16s ease,box-shadow .16s ease;
}
.vd-seg:hover{border-color:var(--vd-brand,#b4123f)}
.vd-seg.is-on{
  border-color:var(--vd-brand,#b4123f); box-shadow:0 0 0 2px rgba(180,18,63,.12);
  background:#fffafb;
}
.vd-seg-n{font-size:1.4rem; font-weight:800; line-height:1.1}
.vd-seg.is-on .vd-seg-n{color:var(--vd-brand,#b4123f)}
.vd-seg-l{font-size:.78rem; color:#6b7480; font-weight:600; line-height:1.3}

/* ======================================================================
   Availability calendar (Phase 39)
   A month of buttons. Every cell is a real submit button, so the grid is
   usable with the keyboard and without JavaScript; the script only saves
   in the background.
   ====================================================================== */
.vd-cal-head {
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: .9rem;
}
.vd-cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .35rem;
}
.vd-cal-dow {
  text-align: center; font-size: .7rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: #8c8c8c;
  padding-bottom: .2rem;
}
.vd-cal-pad { aspect-ratio: 1; }
.vd-cal-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #e6e6e6; border-radius: 10px;
  background: #fff; color: #333;
  font-size: .9rem; font-weight: 500;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.vd-cal-day:hover:not(:disabled) { border-color: #999; }
.vd-cal-day.is-today { box-shadow: inset 0 0 0 2px rgba(232,47,93,.35); }
/* Booked and blocked read differently to the vendor and identically to a
   couple, who is only ever told "taken". */
.vd-cal-day.is-booked  { background: #fde8ee; border-color: #f5bccd; color: #a8163a; }
.vd-cal-day.is-blocked { background: #eceaea; border-color: #d6d2d3; color: #6b6467; text-decoration: line-through; }
.vd-cal-day.is-past    { opacity: .35; cursor: not-allowed; }

.vd-cal-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  margin-top: 1rem; font-size: .82rem; color: #666;
}
.vd-cal-key {
  display: inline-block; width: 13px; height: 13px; border-radius: 4px;
  border: 1px solid #e6e6e6; vertical-align: -2px; margin-right: .35rem;
}
.vd-cal-key.is-booked  { background: #fde8ee; border-color: #f5bccd; }
.vd-cal-key.is-blocked { background: #eceaea; border-color: #d6d2d3; }

@media (max-width: 575.98px) {
  .vd-cal { gap: .25rem; }
  .vd-cal-day { border-radius: 8px; font-size: .82rem; }
}

/* ======================================================================
   Room inventory calendar (Phase 42)

   The availability calendar above answers one question per date: is this
   property open. This one answers how FULL it is, which is a fraction and
   therefore three colours rather than two states.

   Green / amber / red is the one colour scheme a hotelier already reads
   without a legend — but the legend is there anyway, and every cell also
   carries the number of rooms still free as text, because colour alone is
   not an accessible way to tell somebody a room is gone.
   ====================================================================== */
.vd-cal-rooms .vd-cal-day {
  flex-direction: column; gap: 0; line-height: 1.1;
  text-decoration: none;
}
.vd-cal-rooms .vd-cal-day small {
  font-size: .62rem; font-weight: 600; opacity: .75;
}
.vd-cal-day.is-open    { background: #e8f7ee; border-color: #b6e3c7; color: #1b6b3a; }
.vd-cal-day.is-limited { background: #fff6e2; border-color: #f3d79a; color: #8a5a06; }
.vd-cal-day.is-full    { background: #fdeaea; border-color: #f2bcbc; color: #a32020; }
.vd-cal-day.is-editing { box-shadow: 0 0 0 2px var(--vd-brand, #e82f5d); }

.vd-cal-key.is-open    { background: #e8f7ee; border-color: #b6e3c7; }
.vd-cal-key.is-limited { background: #fff6e2; border-color: #f3d79a; }
.vd-cal-key.is-full    { background: #fdeaea; border-color: #f2bcbc; }
.vd-cal-key.is-free    { background: #fff; border-color: #e6e6e6; }

/* "4 left" beside each room-type input, tinted the same three ways. */
.vd-room-left.is-open    { background: #e8f7ee; border-color: #b6e3c7; color: #1b6b3a; }
.vd-room-left.is-limited { background: #fff6e2; border-color: #f3d79a; color: #8a5a06; }
.vd-room-left.is-full    { background: #fdeaea; border-color: #f2bcbc; color: #a32020; }

/* The amenity ticks on a room type. A plain wrapped list of checkboxes, kept
   dense so twelve of them do not push the Save button off the card. */
.vd-room-amen {
  display: flex; flex-wrap: wrap; gap: .3rem .5rem;
}
.vd-room-amen-item {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .55rem;
  border: 1px solid #e6e6e6; border-radius: 999px;
  font-size: .78rem; cursor: pointer; background: #fff;
}
.vd-room-amen-item:hover { border-color: #bbb; }
.vd-room-amen-item input { margin: 0; }
.vd-room-amen-item:has(input:checked) {
  background: var(--vd-brand-tint, #fdf4f7);
  border-color: var(--vd-brand, #e82f5d);
}
