/* Личный кабинет Runturu */
.dash {
  padding-top: 28px;
  padding-bottom: 64px;
}

.muted { color: var(--muted); }

.dash-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.dash-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--grad);
}
.dash-hero-main { min-width: 0; padding-left: 6px; }
.dash-hero h1 {
  margin: 8px 0 8px;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.7px;
}
.dash-hero .lead { margin: 0; max-width: 640px; }
.dash-quick-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.dash-quick-links .btn { padding: 8px 14px; font-size: 13.5px; }

.dash-user {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfb;
  min-width: 0;
}
.dash-avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #7CB342, #2E7D32 55%, #12351a);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  user-select: none;
}
.dash-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dash-user-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dash-user-text b {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.dash-user-note { color: var(--muted); font-size: 12px; }
.dash-badge {
  display: inline-block;
  width: max-content;
  margin-top: 2px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #E8F5E9;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.dash-badge[hidden] { display: none !important; }
.dash-profile-btn { margin-left: 6px; flex: 0 0 auto; padding: 8px 12px; font-size: 13px; }

.dash-section { margin-top: 34px; }
.dash-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.dash-head h2 {
  margin: 2px 0 0;
  font-size: clamp(20px, 2.6vw, 26px);
  letter-spacing: -0.4px;
}
.dash-head p { margin: 4px 0 0; font-size: 14.5px; }
.dash-head-link { color: var(--accent); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.dash-head-link:hover { text-decoration: underline; }

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.resource-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(20,54,26,.03);
  transition: box-shadow .2s, border-color .2s, transform .2s;
  min-width: 0;
}
.resource-card:hover { box-shadow: var(--shadow); border-color: #d5e6d9; transform: translateY(-1px); }
.resource-card.loading-card,
.resource-card.empty-card,
.resource-card.error-card {
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  min-height: 150px;
}
.resource-card.error-card { color: #b3261e; background: #fff7f6; border-color: #f3d2ce; }
.resource-card.empty-card { background: #fbfcfb; }

.resource-top { display: flex; align-items: flex-start; gap: 12px; }
.resource-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #E8F5E9;
  color: var(--accent);
  font-weight: 800;
  font-size: 16px;
}
.resource-icon svg { width: 22px; height: 22px; }
.resource-title-wrap { min-width: 0; flex: 1; }
.resource-card h3 { margin: 0 0 2px; font-size: 17px; letter-spacing: -0.2px; }
.resource-sub { color: var(--muted); font-size: 12.5px; }
.resource-desc { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.status-pill.ok { background: #E8F5E9; color: #2E7D32; }
.status-pill.warn { background: #FFF4E5; color: #b26a00; }
.status-pill.off { background: #EEF1EF; color: #6b7a70; }
.status-pill.bad { background: #FDECEA; color: #c62828; }

.resource-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 10px;
  margin: 0;
  font-size: 13px;
}
.resource-meta dt { color: var(--muted); }
.resource-meta dd { margin: 0; color: #33443a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.metric {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfb;
}
.metric .n { font-size: 17px; font-weight: 800; line-height: 1.2; }
.metric .l { color: var(--muted); font-size: 11px; margin-top: 1px; }

.resource-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}
.resource-actions .btn { padding: 8px 13px; font-size: 13px; border-radius: 10px; }
.resource-actions .btn-ghost { background: #fff; }

.resource-grid > .admin-note { grid-column: 1 / -1; }
.admin-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: #fbfcfb;
  font-size: 14px;
}

@media (max-width: 980px) {
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .dash-hero { flex-direction: column; padding: 22px 20px; }
  .dash-user { width: 100%; }
  .dash-user-text b { max-width: none; }
  .dash-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media (max-width: 560px) {
  .dash { padding-top: 18px; padding-bottom: 48px; }
  .resource-grid { grid-template-columns: 1fr; }
  .dash-hero { padding: 20px 18px; border-radius: 18px; }
  .dash-user { flex-wrap: wrap; }
  .dash-profile-btn { margin-left: auto; }
  .dash-quick-links .btn { flex: 1 1 auto; }
  .resource-card { padding: 17px; }
}
