/* PR366 — Owner Desktop BI Dashboard Styles
 * Scope: .pr366- prefix
 * Desktop-first flexbox layout
 */

/* ─── Wrapper ─────────────────────────────────────────────────────── */
.pr366-dash-wrap {
  width: 100%;
  background: #f5f5f7;
  padding: 16px;
  box-sizing: border-box;
  font-family: 'Barlow', sans-serif;
}

/* ─── KPI Bar ─────────────────────────────────────────────────────── */
.pr366-kpi-bar {
  display: flex;
  flex-direction: row;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
  overflow: hidden;
}

.pr366-kpi-tile {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  padding: 18px 20px;
  border-right: 1px solid #e8e8ec;
}

.pr366-kpi-tile:last-child {
  border-right: none;
}

.pr366-kpi-num {
  color: #1A1A2E;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 4px;
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
}

.pr366-kpi-label {
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pr366-kpi-trend-up {
  color: #16a34a;
  font-size: 18px;
}

.pr366-kpi-trend-down {
  color: #dc2626;
  font-size: 18px;
}

/* ─── Body Row (Left + Right columns) ────────────────────────────── */
.pr366-body-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
}

.pr366-left-col {
  flex: 0 0 60%;
  width: 60%;
  box-sizing: border-box;
  padding-right: 16px;
}

.pr366-right-col {
  flex: 0 0 40%;
  width: 40%;
  box-sizing: border-box;
  padding-left: 0;
}

/* ─── Panel card ──────────────────────────────────────────────────── */
.pr366-panel {
  background: #ffffff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

.pr366-panel-title {
  color: #1A1A2E;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid #e8e8ec;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.pr366-panel-footer {
  margin-top: 12px;
  text-align: right;
}

/* ─── Project Table ───────────────────────────────────────────────── */
.pr366-project-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pr366-project-table thead tr {
  border-bottom: 1px solid #e8e8ec;
}

.pr366-project-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 8px 8px 0;
}

.pr366-project-row td {
  padding: 10px 8px 10px 0;
  vertical-align: middle;
  border-bottom: 1px solid #f0f0f3;
  color: #1A1A2E;
}

.pr366-project-row:last-child td {
  border-bottom: none;
}

.pr366-project-row:hover td {
  background: #f8f8fb;
}

/* ─── Status chips ────────────────────────────────────────────────── */
.pr366-status-chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.pr366-chip-green {
  background: #dcfce7;
  color: #16a34a;
}

.pr366-chip-orange {
  background: #fff7ed;
  color: #d97706;
}

.pr366-chip-red {
  background: #fee2e2;
  color: #dc2626;
}

/* ─── Alert list ──────────────────────────────────────────────────── */
.pr366-alert-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pr366-alert-item {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f3;
  font-size: 13px;
}

.pr366-alert-item:last-child {
  border-bottom: none;
}

.pr366-alert-link {
  color: #1A1A2E;
  text-decoration: none;
  font-weight: 500;
}

.pr366-alert-link:hover {
  color: #FF6B00;
  text-decoration: underline;
}

.pr366-empty-state {
  color: #9ca3af;
  font-size: 13px;
  padding: 12px 0;
}

/* ─── View all link ───────────────────────────────────────────────── */
.pr366-view-all-link {
  color: #FF6B00;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.pr366-view-all-link:hover {
  text-decoration: underline;
}

/* ─── Quick Actions ───────────────────────────────────────────────── */
.pr366-action-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
}

.pr366-action-btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid #FF6B00;
  background: #FF6B00;
  color: #ffffff;
  font-family: 'Barlow', sans-serif;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.pr366-action-btn:hover {
  background: #e55a00;
  border-color: #e55a00;
}

.pr366-action-btn.pr366-action-btn-secondary {
  background: #ffffff;
  color: #FF6B00;
  border-color: #FF6B00;
}

.pr366-action-btn.pr366-action-btn-secondary:hover {
  background: #fff4ed;
}

/* ─── TRai insight bar ────────────────────────────────────────────── */
.pr366-trai-bar {
  background: #fff8f2;
  border-left: 4px solid #FF6B00;
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 13px;
  color: #374151;
  margin-top: 4px;
}

.pr366-trai-label {
  font-weight: 700;
  color: #FF6B00;
}

/* ─── Responsive fallback (narrow desktop) ────────────────────────── */
@media (max-width: 900px) {
  .pr366-body-row {
    flex-direction: column;
  }
  .pr366-left-col,
  .pr366-right-col {
    flex: none;
    width: 100%;
    padding-right: 0;
    padding-left: 0;
  }
  .pr366-kpi-bar {
    flex-wrap: wrap;
  }
  .pr366-kpi-tile {
    flex: 0 0 50%;
    border-right: none;
    border-bottom: 1px solid #e8e8ec;
  }
  .pr366-kpi-tile:nth-child(odd) {
    border-right: 1px solid #e8e8ec;
  }
}
