/* ═══════════════════════════════════════════════════════════════════════════
   cheiron-additions.css
   Stiluri suplimentare pentru: dashboard utilizator, notificări, admin îmbunătățit.
   Adaugă <link rel="stylesheet" href="css/cheiron-additions.css"> în <head>.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Variabile globale ────────────────────────────────────────────────────── */
:root {
  --ch-green:       #0E4D08;
  --ch-green-light: #EAF3EA;
  --ch-green-mid:   #2d5a2d;
  --ch-text:        #1a2e1a;
  --ch-text-muted:  #4a6a4a;
  --ch-text-faint:  #7a9a7a;
  --ch-border:      #ddeedd;
  --ch-radius:      10px;
  --ch-shadow:      0 2px 12px rgba(0,0,0,.07);
}

/* ══════════════════════════════════════════════════════════════════════════
   STATUS BADGES
   ══════════════════════════════════════════════════════════════════════════ */
.dash-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
  white-space: nowrap;
}
.status-ok      { background: #d4f0d4; color: #1a5c1a; }
.status-pending { background: #fff3cd; color: #856404; }
.status-no      { background: #ffe0e0; color: #8b1a1a; }
.status-done    { background: #d0e8ff; color: #0a4480; }

/* ══════════════════════════════════════════════════════════════════════════
   DASHBOARD — HEADER
   ══════════════════════════════════════════════════════════════════════════ */
.dash-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0 0;
  flex-wrap: wrap;
}
.dash-header-text { flex: 1; min-width: 160px; }

.dash-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ch-green);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: Georgia, serif;
}

/* ══════════════════════════════════════════════════════════════════════════
   TABS
   ══════════════════════════════════════════════════════════════════════════ */
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--ch-border);
  flex-wrap: wrap;
}

.dash-tab {
  padding: 8px 16px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ch-text-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dash-tab:hover { color: var(--ch-green); }
.dash-tab.active {
  color: var(--ch-green);
  border-bottom-color: var(--ch-green);
  font-weight: 600;
}

.pending-count {
  background: var(--ch-green);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* ══════════════════════════════════════════════════════════════════════════
   ANIMAL CARDS (dashboard grid)
   ══════════════════════════════════════════════════════════════════════════ */
.dash-animals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.dash-card {
  background: #fff;
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-radius);
  overflow: hidden;
  box-shadow: var(--ch-shadow);
  transition: transform .15s, box-shadow .15s;
}
.dash-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
}

.dash-card-img {
  height: 160px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ch-green-light);
}
.dash-card-img .dash-badge {
  position: absolute;
  top: 8px;
  right: 8px;
}

.dash-card-body {
  padding: 14px;
}
.dash-card-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--ch-text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-card-meta {
  font-size: 12px;
  color: var(--ch-text-muted);
  margin-bottom: 2px;
}
.dash-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.dash-reject-note {
  font-size: 12px;
  color: #8b1a1a;
  background: #fff5f5;
  border-left: 3px solid #e53e3e;
  padding: 6px 8px;
  border-radius: 4px;
  margin-top: 8px;
  line-height: 1.4;
}

.dash-btn-delete {
  background: none;
  border: 1px solid #e53e3e;
  color: #e53e3e !important;
}
.dash-btn-delete:hover {
  background: #fff5f5;
}

/* ══════════════════════════════════════════════════════════════════════════
   DASHBOARD LIST (cereri, povești)
   ══════════════════════════════════════════════════════════════════════════ */
.dash-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-radius);
  overflow: hidden;
  background: #fff;
}
.dash-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ch-border);
  transition: background .1s;
}
.dash-list-item:last-child { border-bottom: none; }
.dash-list-item:hover { background: #f7fbf7; }

.dash-list-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ch-green-light);
  border-radius: 50%;
}
.dash-list-body { flex: 1; min-width: 0; }
.dash-list-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--ch-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-list-meta { font-size: 12px; color: var(--ch-text-faint); margin-top: 2px; }
.dash-list-preview {
  font-size: 12px;
  color: var(--ch-text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* ══════════════════════════════════════════════════════════════════════════
   PROFIL
   ══════════════════════════════════════════════════════════════════════════ */
.dash-profile-wrap {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.dash-profile-form { display: flex; flex-direction: column; gap: 0; }
.dash-form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}
.dash-form-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ch-text-muted);
}
.dash-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--ch-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--ch-text);
  background: #fff;
  transition: border-color .15s;
  box-sizing: border-box;
}
.dash-input:focus {
  outline: none;
  border-color: var(--ch-green);
  box-shadow: 0 0 0 3px rgba(14,77,8,.08);
}
.dash-profile-danger {
  padding: 16px;
  border: 1px solid #ffd0d0;
  border-radius: var(--ch-radius);
  background: #fff8f8;
}

/* ══════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════════════════ */
.dash-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--ch-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.dash-empty p { font-size: 15px; margin: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   LOADING SPINNER
   ══════════════════════════════════════════════════════════════════════════ */
.dash-loading {
  text-align: center;
  padding: 40px;
  color: var(--ch-text-faint);
  font-size: 14px;
}
.dash-loading::before {
  content: '';
  display: block;
  width: 28px;
  height: 28px;
  border: 3px solid var(--ch-border);
  border-top-color: var(--ch-green);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════════════════
   ADMIN — PENDING CARDS
   ══════════════════════════════════════════════════════════════════════════ */
.pending-card {
  background: #fff;
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-radius);
  overflow: hidden;
  box-shadow: var(--ch-shadow);
  display: flex;
  flex-direction: column;
}
.pending-card-img {
  height: 180px;
  background: var(--ch-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  overflow: hidden;
}
.pending-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pending-card-body { padding: 14px; flex: 1; }
.pending-card-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--ch-text);
}
.pending-card-meta { font-size: 12px; color: var(--ch-text-muted); line-height: 1.6; }
.pending-card-actions {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--ch-border);
  background: #fafcfa;
}

/* ══════════════════════════════════════════════════════════════════════════
   ADMIN — USERS TABLE
   ══════════════════════════════════════════════════════════════════════════ */
.users-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.users-table thead th {
  background: var(--ch-green-light);
  color: var(--ch-green-mid);
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--ch-border);
}
.users-table thead th:first-child { border-radius: 8px 0 0 0; }
.users-table thead th:last-child  { border-radius: 0 8px 0 0; }
.users-table tbody tr {
  border-bottom: 1px solid #f0f4f0;
  transition: background .1s;
}
.users-table tbody tr:hover { background: #f7fbf7; }
.users-table td { padding: 10px 14px; vertical-align: middle; }

.ut-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ut-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ch-green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ut-name { font-weight: 600; color: var(--ch-text); }
.ut-email { font-size: 11px; color: var(--ch-text-faint); }

.ut-badge-admin { color: #0a4480; background: #d0e8ff; }
.ut-badge-ban   { color: #8b1a1a; background: #ffe0e0; }

/* Tabel search bar */
.admin-table-search {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.admin-table-search input {
  padding: 8px 12px;
  border: 1px solid var(--ch-border);
  border-radius: 8px;
  font-size: 13px;
  width: 240px;
}
.admin-table-search input:focus {
  outline: none;
  border-color: var(--ch-green);
}

/* ══════════════════════════════════════════════════════════════════════════
   ADMIN — TOAST NOTIFICATION
   ══════════════════════════════════════════════════════════════════════════ */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1a2e1a;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  z-index: 9999;
  animation: toastIn .2s ease;
  max-width: 320px;
  line-height: 1.4;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   BUTTON OVERRIDES (mici, cu variante)
   ══════════════════════════════════════════════════════════════════════════ */
.btn-sm {
  padding: 5px 12px !important;
  font-size: 12px !important;
}
.btn-outline {
  background: #fff;
  border: 1px solid var(--ch-green);
  color: var(--ch-green);
}
.btn-outline:hover {
  background: var(--ch-green-light);
}
.btn-danger {
  background: #e53e3e;
  color: #fff;
  border: none;
}
.btn-danger:hover { background: #c53030; }

/* ══════════════════════════════════════════════════════════════════════════
   ADMIN STAT CARDS (counters la top)
   ══════════════════════════════════════════════════════════════════════════ */
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.admin-stat-card {
  background: #fff;
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-radius);
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--ch-shadow);
}
.admin-stat-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--ch-green);
  font-family: Georgia, serif;
  line-height: 1;
}
.admin-stat-label {
  font-size: 12px;
  color: var(--ch-text-muted);
  margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .dash-animals-grid {
    grid-template-columns: 1fr;
  }
  .dash-tab {
    padding: 8px 10px;
    font-size: 13px;
  }
  .dash-header {
    gap: 10px;
  }
  .dash-header .btn {
    width: 100%;
    text-align: center;
  }
  .admin-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .users-table { font-size: 12px; }
  .users-table td, .users-table th { padding: 8px 10px; }
}
