/* HidroFlow — componente adăugate peste style.css (auth, cont, proiecte, flash) */

/* ---- User menu (navbar autentificat) ---- */
.usermenu { position: relative; }
.usermenu > summary {
  list-style: none;
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: var(--white);
  font-weight: 600; font-size: .9rem; color: var(--ink-800);
  transition: border-color .15s, box-shadow .15s;
}
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu > summary:hover { border-color: var(--red-300); box-shadow: var(--shadow-sm); }
.usermenu-avatar {
  width: 30px; height: 30px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
  color: #fff; font-size: .78rem; font-weight: 700;
}
.usermenu-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu-panel {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 250px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 60;
}
.usermenu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--slate-100); margin-bottom: 6px; }
.usermenu-fullname { font-weight: 700; color: var(--ink-900); }
.usermenu-email { font-size: .82rem; color: var(--slate-500); }
.usermenu-panel a,
.usermenu-panel button {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-700); font-size: .9rem; font-weight: 500;
  background: none; border: none; text-align: left; cursor: pointer;
  font-family: var(--font);
}
.usermenu-panel a svg,
.usermenu-panel button svg { width: 18px; height: 18px; color: var(--slate-500); flex: none; }
.usermenu-panel a:hover,
.usermenu-panel button:hover { background: var(--red-50); color: var(--red-700); }
.usermenu-panel a:hover svg,
.usermenu-panel button:hover svg { color: var(--red-600); }
.usermenu-panel form { margin: 4px 0 0; border-top: 1px solid var(--slate-100); padding-top: 4px; }

/* ---- Flash messages ---- */
.flash {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 0;
  padding: 13px 16px;
  border-radius: var(--radius);
  font-size: .92rem; font-weight: 500;
}
.flash svg { width: 20px; height: 20px; flex: none; }
.flash-ok   { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-ok svg { color: var(--green); }
.flash-err  { background: var(--red-50); color: var(--red-800); border: 1px solid var(--red-100); }
.flash-err svg { color: var(--red-600); }
.flash-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.flash-warn svg { color: var(--amber); }
.linklike {
  background: none; border: none; padding: 0; cursor: pointer;
  color: inherit; font: inherit; font-weight: 700; text-decoration: underline;
}

/* ---- Field errors ---- */
.field-error { color: var(--red-600); font-size: .82rem; margin-top: 5px; font-weight: 500; }
.field-input.has-error input,
.field-input.has-error select { border-color: var(--red-500); box-shadow: 0 0 0 4px rgba(220,47,52,.12); }

/* ---- Dashboard (cont / proiecte) ---- */
.dash { padding: 40px 0 64px; }
.dash-head { margin-bottom: 26px; }
.dash-head h1 { font-size: 1.9rem; font-weight: 800; color: var(--ink-900); letter-spacing: -.02em; }
.dash-head p { color: var(--slate-500); margin-top: 6px; }
.dash-grid { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.dash-side .panel { margin-bottom: 16px; }
.dash-nav { display: flex; flex-direction: column; gap: 2px; }
.dash-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  color: var(--ink-700); font-weight: 600; font-size: .92rem;
}
.dash-nav a svg { width: 18px; height: 18px; color: var(--slate-400); }
.dash-nav a:hover { background: var(--slate-50); }
.dash-nav a.active { background: var(--red-50); color: var(--red-700); }
.dash-nav a.active svg { color: var(--red-600); }

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

/* ---- Project & calculation cards ---- */
.item-list { display: flex; flex-direction: column; gap: 12px; }
.item-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.item-row:hover { border-color: var(--red-200, var(--red-100)); box-shadow: var(--shadow-sm); }
.item-ic {
  width: 44px; height: 44px; flex: none; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red-50); color: var(--red-600);
}
.item-ic svg { width: 22px; height: 22px; }
.item-body { flex: 1; min-width: 0; }
.item-body h4 { font-size: 1rem; font-weight: 700; color: var(--ink-900); }
.item-body p { font-size: .85rem; color: var(--slate-500); margin-top: 3px; }
.item-meta { font-size: .8rem; color: var(--slate-400); white-space: nowrap; }
.item-actions { display: flex; gap: 8px; align-items: center; }

.empty-state {
  text-align: center; padding: 56px 24px;
  border: 2px dashed var(--slate-200); border-radius: var(--radius-lg);
  color: var(--slate-500);
}
.empty-state svg { width: 46px; height: 46px; color: var(--slate-300); margin-bottom: 14px; }
.empty-state h3 { color: var(--ink-800); font-weight: 700; margin-bottom: 6px; }

.btn-danger { background: var(--red-600); color: #fff; }
.btn-danger:hover { background: var(--red-700); }
.btn-icon { padding: 8px; }
.btn-icon svg { width: 18px; height: 18px; margin: 0; }
