/* F33.W3 — ResourceDashboard premium styles + AI footer overflow fix.
 *
 * Canon: Apple Mail / Outlook / Linear preview pane — внутренний overflow-y: auto
 * + sticky-bottom footer через margin-top: auto в flex-column. Палитра slate/indigo
 * по premium-ui-style.md. Lucide icons (через JS из ResourceDashboard).
 *
 * Замечание: до F33.W3 у `re-dashboard-*` / `re-stat-*` / `re-cta-*` / `re-today-*`
 * НЕ БЫЛО ни одного определения в проекте — компонент работал на браузерных
 * дефолтах. Этот файл создаётся с нуля как F26.W2 missing piece.
 */

/* ─── Root + overflow fix ───────────────────────────────────────────── */

.re-dashboard {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;          /* собственный скролл pane'а */
  min-height: 0;             /* Chromium flex shrink bug fix */
  background: #f8fafc;       /* slate-50 */
  padding: 24px 24px 0;
  gap: 16px;
}

.re-dashboard-loading {
  padding: 48px 16px;
  text-align: center;
  color: #94a3b8;            /* slate-400 */
  font-size: 13px;
}

/* ─── Header ────────────────────────────────────────────────────────── */

.re-dashboard-header {
  flex-shrink: 0;
  margin-bottom: 4px;
}
.re-dashboard-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;            /* slate-900 */
  letter-spacing: -0.01em;
}
.re-dashboard-subtitle {
  margin: 0;
  font-size: 13.5px;
  color: #64748b;            /* slate-500 */
  line-height: 1.5;
}

/* ─── Stats 2×2 grid ────────────────────────────────────────────────── */

.re-dashboard-stats {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.re-stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0; /* slate-200 */
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: box-shadow 150ms ease-out, border-color 150ms ease-out;
}
.re-stat-card:hover {
  border-color: #cbd5e1;     /* slate-300 */
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}
.re-stat-card.is-warn { border-color: #fde68a; background: #fffbeb; }
.re-stat-card.is-warn .re-stat-value { color: #b45309; } /* amber-700 */

.re-stat-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-accent-soft);       /* indigo-50 */
  color: var(--brand-accent-hover);            /* indigo-600 */
}
.re-stat-card:nth-child(2) .re-stat-icon { background: #f1f5f9; color: #475569; } /* slate */
.re-stat-card.is-warn .re-stat-icon { background: #fef3c7; color: #b45309; }      /* amber */
.re-stat-card:nth-child(4) .re-stat-icon { background: #d1fae5; color: #059669; } /* emerald */

.re-stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.re-stat-label {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 2px;
}

/* ─── CTA card (Распределить через AI) ─────────────────────────────── */

.re-dashboard-cta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--brand-accent);  /* вторичная роль — AI-распределение */
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.re-cta-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-accent-soft);
  color: var(--brand-accent-hover);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.re-cta-body { flex: 1; min-width: 0; }
.re-cta-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 2px;
}
.re-cta-text {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.45;
}

/* ─── Sections (Today / Upcoming) ──────────────────────────────────── */

.re-dashboard-section {
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
}
.re-section-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;            /* slate-600 */
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.re-dashboard-empty {
  padding: 16px 0 4px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  font-style: italic;
}

/* Today timeline list */
.re-today-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.re-today-item {
  display: grid;
  grid-template-columns: 120px 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border-left: 3px solid #10b981;  /* emerald — upcoming default */
  font-size: 13px;
  transition: background 120ms ease-out;
}
.re-today-item:hover { background: #f1f5f9; }
.re-today-item.is-past { border-left-color: #cbd5e1; opacity: 0.7; }
.re-today-time {
  font-weight: 600;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
}
.re-today-resource {
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.re-today-guest {
  color: #64748b;
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.re-today-more {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  color: #64748b;
  font-style: italic;
}

/* ─── AI footer — sticky to bottom через flex margin-top:auto ──────── */

.re-dashboard-footer {
  margin-top: auto;          /* sticky-to-bottom в flex-column */
  margin-left: -24px;        /* компенсация padding'a .re-dashboard */
  margin-right: -24px;
  flex-shrink: 0;            /* не сжимается */
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}
.re-dashboard-footer .sc-pristine-btn { flex-shrink: 0; }
.re-dashboard-hint {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.4;
}

/* ─── Mobile ────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .re-dashboard { padding: 16px 16px 0; gap: 12px; }
  .re-dashboard-title { font-size: 18px; }
  .re-dashboard-stats { grid-template-columns: 1fr 1fr; }
  .re-today-item { grid-template-columns: 100px 1fr; }
  .re-today-item .re-today-guest { display: none; }
  .re-dashboard-footer { margin-left: -16px; margin-right: -16px; padding: 12px 16px; }
}
