/* ============================================================
   DASHBOARD.CSS  —  clean rebuild
   All dashboard-specific styles. Supplements widgets.css.
   ============================================================ */


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARED UTILITIES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.muted-sm {
  font-size: 11px;
  color: var(--text-muted);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOP ROW — 4 STAT CARDS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 20px 22px 18px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.stat-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.stat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 11.5px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  line-height: 1.4;
  max-width: 110px;
}

.stat-icon-wrap {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-num {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 10px;
}
.stat-num.stat-dollar { font-size: 26px; }

.stat-lnk {
  font-size: 11px;
  color: var(--rose);
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity 0.15s ease;
  display: inline-block;
}
.stat-lnk:hover { opacity: 0.65; }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LAYOUT ROWS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Middle: wide week-glance + narrower focus card */
.dash-mid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}

/* Bottom: three equal cards */
.dash-bot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

/* Bot-row cards — flex column so card-link pins to bottom (.card handles appearance) */
.dash-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

/* Today's Focus is also flex-column */
.focus-card {
  display: flex;
  flex-direction: column;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   THIS WEEK AT A GLANCE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 6px;
  min-height: 80px; /* keep card visible while JS loads */
}

.week-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.week-head {
  text-align: center;
  margin-bottom: 6px;
}

.week-day-name {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.week-day-num {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* Today highlight */
.week-col.today .week-day-name { color: var(--rose); }
.week-col.today .week-day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blush);
  color: #7a4040;
  font-weight: 600;
  font-size: 10.5px;
  margin: 3px auto 0;
}

/* Event rows */
.week-evt {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 1.5px 0;
}

.week-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(180, 160, 160, 0.5);
  flex-shrink: 0;
}

.week-evt-title {
  font-size: 9px;
  color: var(--text-secondary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-empty {
  font-size: 9.5px;
  color: rgba(156, 151, 147, 0.35);
  text-align: center;
  padding: 2px 0;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TODAY'S FOCUS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.focus-date-lbl {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-bottom: 18px;
}

.focus-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.focus-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.focus-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(190, 168, 168, 0.35);
  border: 1.5px solid rgba(180, 155, 155, 0.5);
  flex-shrink: 0;
  margin-top: 4px;
}

.focus-body {
  flex: 1;
  min-width: 0;
}

.focus-time-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}

.focus-time {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.focus-ttl {
  font-size: 12.5px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.3;
}

.focus-brand {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DELIVERABLES PIPELINE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.pipe-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  margin-bottom: 8px;
}

/* Donut chart */
.pipe-donut-area {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.pipe-donut-svg {
  width: 90px;
  height: 90px;
  /* Rotate so segments start at 12 o'clock */
  transform: rotate(-90deg);
  display: block;
}

.pipe-donut-ctr {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.pipe-total {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1;
}

.pipe-sub {
  font-size: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* Bar list */
.pipe-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.pipe-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pipe-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pipe-lbl {
  font-size: 11px;
  color: var(--text-secondary);
  width: 94px;
  flex-shrink: 0;
  line-height: 1.3;
}

.pipe-track {
  flex: 1;
  height: 5px;
  background: rgba(231, 207, 207, 0.22);
  border-radius: 3px;
  overflow: hidden;
}

.pipe-fill {
  height: 100%;
  border-radius: 3px;
  background: rgba(212, 185, 185, 0.55);
  transition: width 0.4s ease;
}

.pipe-cnt {
  font-size: 11px;
  color: var(--text-muted);
  width: 18px;
  text-align: right;
  flex-shrink: 0;
  font-weight: 500;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   INCOME SNAPSHOT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.month-sel {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid rgba(231, 207, 207, 0.5);
  border-radius: 6px;
  padding: 3px 22px 3px 7px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239c9793' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  transition: border-color 0.15s ease;
}
.month-sel:hover {
  border-color: rgba(217, 180, 180, 0.6);
  color: var(--text-secondary);
}

.income-total-wrap {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(231, 207, 207, 0.22);
}

.income-total-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.income-total {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.1;
}

.income-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  margin-bottom: 4px;
}

.income-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.income-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.income-row-lbl {
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
}

.income-row-val {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  font-family: var(--serif);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   UP NEXT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.up-next-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  margin-bottom: 4px;
}

.un-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.un-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 36px;
  min-width: 36px;
  background: rgba(231, 207, 207, 0.22);
  border-radius: 8px;
  padding: 5px 4px 6px;
  flex-shrink: 0;
}

.un-mon {
  font-size: 7.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--rose);
  font-weight: 600;
  line-height: 1;
}

.un-day {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.1;
  margin-top: 2px;
}

.un-body {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.un-ttl {
  font-size: 12.5px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.un-brand {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.un-pill {
  font-size: 9.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(236, 230, 222, 0.65);
  border-radius: 50px;
  padding: 3px 8px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  align-self: flex-start;
  margin-top: 3px;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 1060px) {
  .dash-mid { grid-template-columns: minmax(0, 1fr) 240px; }
}

@media (max-width: 900px) {
  .dash-mid { grid-template-columns: 1fr; }
  .focus-card { min-height: auto; }
}

@media (max-width: 760px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-bot   { grid-template-columns: 1fr; }
  .dash-card  { min-height: auto; }
}

@media (max-width: 480px) {
  .dash-stats { grid-template-columns: 1fr; }
}
