/* МУРАВЕЙ — экраны «Мои заказы», «Заработки», «Уведомления» (owner: dashboard, docs/CONTRACT.md §7.4).
   Таблицы и переключатели берутся из app.css и common.css (.dash-tab, .segmented, .toggle-row, .card). */

/* ===== Мои заказы ===== */
.dash-switch { margin-bottom: 12px; }
/* Все вкладки видны сразу: четыре вкладки заказчика не помещаются в одну строку на 390 px и уже */
.dashboard-view .dash-tabs { flex-wrap: wrap; overflow-x: visible; }
.dash-earnings {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 14px;
}
.dash-earnings svg { width: 16px !important; height: 16px !important; }

/* Завершённый заказ без отзыва: карточка и кнопка «Оставить отзыв» */
.dash-reviewable { margin-bottom: 8px; }
.dash-review {
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.dash-review svg { width: 16px !important; height: 16px !important; }

/* Доступный заказ: карточка и полоса «Открыть и принять» единым блоком */
.dash-available { margin-bottom: 8px; }
.dash-available .order-card {
  margin-bottom: 0;
  border-bottom-left-radius: 0; border-bottom-right-radius: 0;
}
.dash-avail-hint {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-height: 40px; padding: 10px 14px;
  background: rgba(255, 214, 64, 0.1);
  border: 1px solid rgba(255, 214, 64, 0.12); border-top: none;
  border-radius: 0 0 14px 14px;
  font-family: inherit; font-size: 12px; font-weight: 700; color: var(--yellow);
  text-align: left; cursor: pointer;
  transition: background 0.2s;
}
.dash-avail-hint:hover { background: rgba(255, 214, 64, 0.18); }
.dash-avail-city {
  display: inline-flex; align-items: center; gap: 4px; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-muted); font-weight: 600;
}
.dash-avail-action { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.dash-avail-city svg { width: 12px !important; height: 12px !important; }
.dash-avail-action svg { width: 14px !important; height: 14px !important; }

/* ===== Заработки ===== */
.earn-totals {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 14px;
}
.earn-totals > .card + .card { margin-top: 0; }
.earn-total { padding: 14px; }
.earn-total:last-child { grid-column: 1 / -1; }
.earn-total-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
}
.earn-total-value {
  margin-top: 6px;
  font-size: 20px; font-weight: 900; letter-spacing: -0.01em;
  color: #fff; font-variant-numeric: tabular-nums;
}
.earn-total.is-accent {
  background: linear-gradient(120deg, rgba(255, 214, 64, 0.2), rgba(255, 214, 64, 0.06));
  border-color: rgba(255, 214, 64, 0.4);
}
.earn-total.is-accent .earn-total-value { color: var(--yellow); }

.earn-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.earn-item {
  padding: 14px;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  transition: opacity 0.2s;
}
.earn-item.is-busy { opacity: 0.7; }
.earn-head { margin-bottom: 12px; }
.earn-service {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700; color: var(--text);
}
.earn-service svg { width: 14px !important; height: 14px !important; color: var(--yellow); }
.earn-meta { margin-top: 3px; font-size: 12px; color: var(--text-muted); }

.earn-controls {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px; align-items: end;
}
.earn-amount-box { position: relative; display: block; }
.earn-amount { padding-right: 36px; font-variant-numeric: tabular-nums; }
.earn-currency {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 15px; font-weight: 700; color: var(--text-muted);
  pointer-events: none;
}
@media (max-width: 374px) {
  .earn-controls { grid-template-columns: minmax(0, 1fr); }
}

/* ===== Уведомления ===== */
.notif-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 4px 12px;
}
.notif-summary { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.notif-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.notif-item {
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  width: 100%; padding: 12px 14px;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft); border-radius: 14px;
  font-family: inherit; text-align: left; color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, opacity 0.2s;
}
.notif-item:hover { border-color: rgba(255, 214, 64, 0.3); }
.notif-item.is-unread {
  background: rgba(255, 214, 64, 0.06);
  border-color: rgba(255, 214, 64, 0.3);
}
.notif-item.busy { opacity: 0.7; cursor: progress; }
.notif-icon {
  flex-shrink: 0; width: 34px; height: 39px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(165deg, #FFDE5A 0%, #F0BB10 100%);
  clip-path: var(--hex-clip);
}
.notif-icon svg { width: 16px !important; height: 16px !important; color: var(--ink); }
.notif-item:not(.is-unread) .notif-icon { opacity: 0.55; }
.notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-title { font-size: 14px; font-weight: 800; color: #fff; overflow-wrap: anywhere; }
.notif-item:not(.is-unread) .notif-title { font-weight: 600; color: var(--text); }
.notif-text { font-size: 12px; line-height: 1.4; color: rgba(245, 247, 250, 0.8); overflow-wrap: anywhere; }
.notif-time { margin-top: 2px; font-size: 11px; color: var(--text-muted); }
.notif-dot {
  flex-shrink: 0; width: 8px; height: 8px; margin-top: 6px;
  background: var(--yellow); border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 214, 64, 0.2);
}

.toggle-stack { display: flex; flex-direction: column; gap: 8px; }
.toggle-row.is-disabled { opacity: 0.55; cursor: not-allowed; }
.toggle-stack + .info-block { margin-top: 12px; }
