/* ============================================================
   SECTIONS.CSS v5.3 — Content cards for all five sections
   Blocks: 6 (Month Tracking), 9/10 (Task Statuses), 11 (Cash stats), 13 (Containment)
   ============================================================ */

/* ============================================================
   BOOKING CARDS (Block 13: Containment optimizations)
   ============================================================ */
.booking-card {
  margin: 0 12px 7px;
  padding: 13px 13px 11px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 13px;
  background: var(--white);
  cursor: pointer;
  transition: border-color .15s, transform .1s;
  will-change: transform;
}
.booking-card.unpaid   { border-left-color: var(--unpaid); }
.booking-card.paid     { border-left-color: var(--paid); }
.booking-card.pending  { border-left-color: var(--pending); }
.booking-card.partial  { border-left-color: var(--partial); }
.booking-card.checkedout{ border-left-color: var(--grey); }
.booking-card:active { transform: scale(.99); }

.bc-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 6px;
}
.bc-name {
  font-family: "Fraunces", serif;
  font-size: 16px; font-weight: 500; color: var(--ink); line-height: 1.2;
}
.bc-status {
  font-size: 10.5px; font-weight: 700;
  padding: 3px 8px; border-radius: 20px;
  letter-spacing: .02em;
}
.bc-status.unpaid   { background: var(--unpaid-bg);  color: var(--unpaid-brd); }
.bc-status.paid     { background: var(--paid-bg);    color: var(--paid-brd); }
.bc-status.pending  { background: var(--pending-bg); color: var(--pending-brd); }
.bc-status.partial  { background: var(--partial-bg); color: var(--partial-brd); }
.bc-status.checkedout{ background: var(--grey-bg);   color: var(--grey-brd); }

.bc-apt { font-size: 12px; color: #5a7a76; margin-bottom: 8px; font-weight: 500; }
.bc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bc-info {
  font-size: 11.5px; color: #5a7a76;
  display: flex; align-items: center; gap: 3px;
}
.bc-info svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.bc-balance { font-family: "Fraunces", serif; font-size: 14px; font-weight: 600; margin-left: auto; }
.bc-balance.has-debt { color: var(--unpaid); }
.bc-balance.no-debt  { color: var(--paid-brd); }

/* ── FAB (floating action button for bookings) ── */
#fab {
  position: absolute; bottom: 16px; right: 16px; z-index: 15;
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--deep);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(1,43,39,.3);
  cursor: pointer; border: none;
  transition: transform .15s var(--spring);
}
#fab:active { transform: scale(.92); }
#fab svg {
  width: 22px; height: 22px;
  stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round;
}

/* ============================================================
   CLIENT CARDS
   ============================================================ */
.client-card {
  margin: 0 12px 7px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--white);
  cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  transition: border-color .15s;
  will-change: transform;
}
.client-card:active { background: var(--mist); }

.cl-avatar {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--mist);
  display: flex; align-items: center; justify-content: center;
  font-family: "Fraunces", serif;
  font-size: 16px; font-weight: 600; color: var(--deep);
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.cl-name  { font-size: 14.5px; font-weight: 500; color: var(--ink); margin-bottom: 2px; }
.cl-info  { font-size: 11.5px; color: var(--sage); }
.cl-warn  {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--partial-bg); color: var(--partial-brd);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  margin-left: auto; flex-shrink: 0;
}

/* ============================================================
   TASK CARDS
   ============================================================ */
.task-card {
  margin: 0 12px 7px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--white);
  cursor: pointer;
  display: flex; align-items: flex-start; gap: 11px;
  will-change: transform;
}
.task-check {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  flex-shrink: 0; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; cursor: pointer;
}
.task-check.done { background: var(--mid); border-color: var(--mid); }
.task-check svg  {
  width: 11px; height: 11px;
  stroke: #fff; fill: none; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
}

.task-title { font-size: 13.5px; font-weight: 500; color: var(--ink); margin-bottom: 4px; line-height: 1.3; }
.task-title.done { text-decoration: line-through; color: var(--sage); }
.task-meta { font-size: 11px; color: #5a7a76; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── BLOCK 9/10: Task Accurate Status Badges ── */
.task-status-badge {
  font-size: 9.5px; font-weight: 700; padding: 1px 6px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.02em;
}
.task-st-wait     { background: var(--partial-bg); color: var(--partial-brd); }
.task-st-progress { background: var(--pending-bg); color: var(--pending-brd); }
.task-st-done     { background: var(--paid-bg);    color: var(--paid-brd); }

.task-prio {
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  margin-left: auto; flex-shrink: 0; letter-spacing: .02em;
}
.task-prio.high { background: var(--unpaid-bg);  color: var(--unpaid-brd); }
.task-prio.med  { background: var(--partial-bg); color: var(--partial-brd); }
.task-prio.low  { background: var(--paid-bg);    color: var(--paid-brd); }

/* ============================================================
   CASH / TRANSACTIONS SYSTEM
   ============================================================ */
.cash-stats {
  margin: 12px;
  background: var(--deep);
  border-radius: 16px;
  display: grid; grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid rgba(74,140,135,.2);
}
.stat-item { padding: 14px 14px 12px; }
.stat-item:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.07); }
.stat-item:nth-child(odd)  { border-right:  1px solid rgba(255,255,255,.07); }

.stat-label {
  font-size: 9.5px; color: rgba(255,255,255,.38);
  letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 5px; font-weight: 600;
}
.stat-val {
  font-family: "Fraunces", serif;
  font-size: 17px; font-weight: 500; color: #fff; line-height: 1.2;
}

/* ── BLOCK 11 FIX: Secure color variables from Telegram dark override overrides ── */
.stat-val.red  { color: #FCA5A5 !important; }
.stat-val.grn  { color: #86EFAC !important; }

.stat-change   { font-size: 10px; margin-top: 3px; font-weight: 500; }
.stat-change.up{ color: rgba(134,239,172,.65); }
.stat-change.dn{ color: rgba(252,165,165,.65); }

.tx-card {
  margin: 0 12px 7px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  display: flex; align-items: center; gap: 11px;
  will-change: transform;
}
.tx-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tx-icon svg { width: 17px; height: 17px; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tx-income .tx-icon { background: var(--paid-bg); }
.tx-income .tx-icon svg { stroke: var(--paid-brd); }
.tx-expense .tx-icon { background: var(--unpaid-bg); }
.tx-expense .tx-icon svg { stroke: var(--unpaid-brd); }

.tx-main { flex: 1; min-width: 0; }
.tx-name { font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-meta { font-size: 11px; color: #5a7a76; }
.tx-amount { font-family: "Fraunces", serif; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.tx-income .tx-amount  { color: var(--paid-brd); }
.tx-expense .tx-amount { color: var(--unpaid); }

/* ============================================================
   SECTIONS.CSS v4 additions & Block 6 Month Tracker Animation
   ============================================================ */

/* ── BLOCK 6: Pulse Animation Layer for Current Active Month Segment ── */
@keyframes pulse-strip-glow {
  0%   { opacity: 0.45; }
  50%  { opacity: 1.0; }
  100% { opacity: 0.45; }
}

/* Today badges on booking cards */
.today-badge {
  display: inline-block; margin-bottom: 6px;
  padding: 3px 9px; border-radius: 7px;
  font-size: 11px; font-weight: 700;
  background: var(--paid-bg); color: var(--paid-brd);
}
.today-badge.co { background: var(--partial-bg); color: var(--partial-brd); }

/* Overdue task card */
.task-card.overdue { border-color: rgba(220,38,38,.25); background: rgba(254,226,226,.1); }

/* Section label reuse */
.section-label {
  padding: 6px 14px 5px;
  font-size: 10px; font-weight: 700; color: var(--sage);
  letter-spacing: .1em; text-transform: uppercase;
  background: var(--paper); border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}