/* ============================================================
   SCHEDMATE — OVERVIEW.CSS (FINAL • CLEAN • STABLE)
   - Fixes Upcoming Bookings alignment
   - Removes price underline bug
   - Light + Dark safe
============================================================ */

/* ============================================================
   OVERVIEW SCOPE
============================================================ */
#view-overview {
  width: 100%;
}

/* ============================================================
   KPI GRID
============================================================ */
#view-overview .sm-grid-kpis {
  margin-bottom: 20px;
}

#view-overview .sm-metric.success { color: var(--sm-success); }
#view-overview .sm-metric.warning { color: var(--sm-warning); }
#view-overview .sm-metric.danger  { color: var(--sm-danger); }

/* ============================================================
   PANELS
============================================================ */
#view-overview .sm-panel {
  border-radius: 18px;
  overflow: hidden;
}

/* ============================================================
   UPCOMING BOOKINGS (FINAL FIX)
============================================================ */

#view-overview .upcoming-bookings table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* HEADER + ROWS = SAME GRID */
#view-overview .upcoming-bookings thead tr,
#view-overview .upcoming-bookings tbody tr {
  display: grid;
  grid-template-columns:
    160px    /* When */
    1.2fr    /* Client */
    1.6fr    /* Service */
    120px    /* Status */
    110px;   /* Price */
  align-items: center;
}

/* HEADER */
#view-overview .upcoming-bookings thead th {
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 800;
  color: var(--sm-muted);
  text-align: left;
  border-bottom: 1px solid var(--sm-border);
}

/* ROWS */
#view-overview .upcoming-bookings tbody tr {
  position: relative;
}

/* SINGLE CLEAN DIVIDER (ROW ONLY) */
#view-overview .upcoming-bookings tbody tr::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 1px;
  background: var(--sm-border);
}

#view-overview .upcoming-bookings tbody tr:last-child::after {
  display: none;
}

/* CELLS */
#view-overview .upcoming-bookings tbody td {
  padding: 14px 14px;
  font-size: 13px;
  vertical-align: middle;
  border: none !important; /* 🔥 removes price underline bug */
}

/* PRICE COLUMN */
#view-overview .upcoming-bookings thead th:last-child,
#view-overview .upcoming-bookings tbody td:last-child {
  text-align: right;
  font-weight: 800;
  white-space: nowrap;
}

/* HOVER */
#view-overview .upcoming-bookings tbody tr:hover td {
  background: rgba(91, 92, 255, 0.06);
}

/* ============================================================
   STATUS PILL
============================================================ */
#view-overview .sm-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.6);
  text-transform: capitalize;
}

#view-overview .sm-pill-pending {
  background: rgba(245,158,11,.15);
  color: var(--sm-warning);
  border-color: rgba(245,158,11,.25);
}

/* ============================================================
   RECENT ACTIVITY (STABLE FLEX)
============================================================ */

#view-overview .activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#view-overview .activity-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15,23,42,.03);
}

#view-overview .activity-row:hover {
  background: rgba(91,92,255,.06);
}

#view-overview .activity-date {
  width: 80px;
  font-weight: 800;
  white-space: nowrap;
  color: var(--sm-primary);
}

#view-overview .activity-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#view-overview .activity-badge {
  width: fit-content;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}

#view-overview .activity-text {
  font-size: 14px;
  font-weight: 800;
}

/* ============================================================
   LEADS BY SOURCE (MINI REPORT)
============================================================ */

#view-overview .sm-overview-sources,
#view-overview .sm-overview-stages,
#view-overview .sm-overview-conv-source {
  margin-top: 18px;
}

#view-overview .sm-sources-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
}

#view-overview .sm-source-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15,23,42,.03);
}

#view-overview .sm-source-left {
  min-width: 170px;
}

#view-overview .sm-source-name {
  font-weight: 900;
  font-size: 13px;
}

#view-overview .sm-source-meta {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
  color: var(--sm-muted);
}

#view-overview .sm-source-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(91,92,255,.10);
  overflow: hidden;
}

#view-overview .sm-source-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--sm-primary);
  opacity: .9;
}

/* ============================================================
   DARK MODE
============================================================ */
html.dark #view-overview .upcoming-bookings thead th,
[data-theme="dark"] #view-overview .upcoming-bookings thead th {
  color: rgba(226,232,240,.75);
}

html.dark #view-overview .upcoming-bookings tbody td,
[data-theme="dark"] #view-overview .upcoming-bookings tbody td {
  color: rgba(226,232,240,.95);
}

html.dark #view-overview .upcoming-bookings tbody tr:hover td,
[data-theme="dark"] #view-overview .upcoming-bookings tbody tr:hover td {
  background: rgba(255,255,255,.06);
}

html.dark #view-overview .activity-row,
[data-theme="dark"] #view-overview .activity-row {
  background: rgba(255,255,255,.05);
}

html.dark #view-overview .activity-row:hover,
[data-theme="dark"] #view-overview .activity-row:hover {
  background: rgba(255,255,255,.10);
}

html.dark #view-overview .sm-source-row,
[data-theme="dark"] #view-overview .sm-source-row {
  background: rgba(255,255,255,.05);
}

html.dark #view-overview .sm-source-meta,
[data-theme="dark"] #view-overview .sm-source-meta {
  color: rgba(226,232,240,.75);
}
/* ============================================================
   OVERVIEW — UPCOMING BOOKINGS
   FIX DOUBLE UNDERLINE (PRICE COLUMN)
============================================================ */

/* Kill ANY line coming from the price cell */
#view-overview .upcoming-bookings tbody td:last-child {
  border-bottom: none !important;
  box-shadow: none !important;
  background-image: none !important;
}

/* Ensure ONLY the row separator exists */
#view-overview .upcoming-bookings tbody tr::after {
  height: 1px;
  background: var(--sm-border);
  opacity: 1;
}
/* ============================================================
   OVERVIEW — UPCOMING BOOKINGS (PREMIUM POLISH)
============================================================ */

/* Container */
#view-overview .upcoming-bookings {
  padding-bottom: 6px;
}

/* Kill table feel */
#view-overview .upcoming-bookings table {
  border-collapse: separate;
  border-spacing: 0;
}

/* Header */
#view-overview .upcoming-bookings thead th {
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--sm-muted);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 10px;
}

/* ROW → agenda-style */
#view-overview .upcoming-bookings tbody tr {
  display: grid;
  grid-template-columns:
    90px    /* date */
    1.6fr   /* service */
    1fr     /* client */
    90px;   /* price */
  align-items: center;
  padding: 10px 0;
  position: relative;
}

/* Soft divider */
#view-overview .upcoming-bookings tbody tr::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(255,255,255,.06);
}

#view-overview .upcoming-bookings tbody tr:last-child::after {
  display: none;
}

/* CELLS */
#view-overview .upcoming-bookings tbody td {
  padding: 0;
  border: none !important;
  font-size: 13px;
}

/* WHEN */
#view-overview .upcoming-bookings tbody td:first-child {
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
}

/* SERVICE (primary) */
#view-overview .upcoming-bookings tbody td:nth-child(3) {
  font-weight: 800;
  color: #fff;
}

/* CLIENT (secondary) */
#view-overview .upcoming-bookings tbody td:nth-child(2) {
  font-size: 12px;
  color: rgba(226,232,240,.65);
}

/* PRICE */
#view-overview .upcoming-bookings tbody td:last-child {
  text-align: right;
  font-weight: 900;
  white-space: nowrap;
}

/* Hover = lift */
#view-overview .upcoming-bookings tbody tr:hover {
  background: rgba(255,255,255,.04);
}

/* Scrollbar polish */
#view-overview .upcoming-bookings::-webkit-scrollbar {
  height: 6px;
}
#view-overview .upcoming-bookings::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.25);
  border-radius: 999px;
}


/* Conversion widget */
#view-overview .sm-conv-metrics{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding: 0 16px 16px;
}
#view-overview .sm-conv-metrics .sm-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 800;
}
#view-overview .sm-conv-metrics .sm-pill b{
  font-weight: 900;
}
