/* Mobile-first, fără scroll orizontal, Roboto */
:root {
  --bg: #0e0f13;
  --card: #171923;
  --text: #e7e9ee;
  --muted: #a5a9b5;
  --accent: #4b8df8;
  --success: #2bb673;
  --danger: #f05454;
  --border: #232539;
  --radius: 14px;
  --space: 14px;
  --space-lg: 18px;
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
html, body { height: 100%; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", system-ui, -apple-system, Segoe UI, Roboto, Arial, Helvetica, sans-serif;
  line-height: 1.4;
}

.app-header {
  padding: var(--space);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(14,15,19,0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.app-title { margin: 0; font-size: 18px; font-weight: 700; }

.app-content {
  display: grid;
  gap: var(--space-lg);
  padding: var(--space-lg);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: 0 4px 18px rgba(0,0,0,0.2);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
}

.label { font-weight: 500; }

.status {
  margin-left: 10px;
  font-weight: 500;
  color: var(--muted);
}

.toggle {
  position: relative;
  width: 54px;
  height: 30px;
  background: #2a2e43;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: background 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
}
.toggle.on { background: var(--accent); }
.toggle .knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}
.toggle.on .knob { transform: translateX(24px); }

/* Saving state */
.toggle.loading { opacity: 0.6; pointer-events: none; }
.toggle.loading .knob::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.18);
  border-top-color: rgba(0,0,0,0.55);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.list { display: grid; gap: var(--space); }
.item {
  display: grid;
  gap: 6px;
  padding: var(--space);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #151724;
}
.item .meta { color: var(--muted); font-size: 12px; }

.actions { display: flex; gap: var(--space); }
.btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #20253a;
  color: var(--text);
  font-weight: 500;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn.success { background: var(--success); border-color: transparent; color: #fff; }
.btn.danger { background: var(--danger); border-color: transparent; color: #fff; }

.empty { color: var(--muted); text-align: center; padding: 24px 8px; }

.error {
  color: #ff9aa2;
  background: #2b1620;
  border: 1px solid #ff6b81;
  padding: var(--space);
  border-radius: 10px;
}

/* Toasts */
.toast-wrap {
  position: fixed;
  left: 0; right: 0; bottom: 16px;
  display: grid;
  gap: 8px;
  justify-content: center;
  pointer-events: none;
  z-index: 9999;
}
.toast {
  min-width: 220px;
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #20253a;
  color: var(--text);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  pointer-events: auto;
  animation: toast-in 0.18s ease-out;
  text-align: center;
  font-weight: 500;
}
.toast.success { background: var(--success); color: #fff; border-color: transparent; }
.toast.error { background: var(--danger); color: #fff; border-color: transparent; }

@keyframes toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}


/* Status colorat pentru DA / NU */
.state { font-weight: 700; margin-left: 6px; }
.state-yes { color: var(--success); }  /* verde */
.state-no  { color: var(--danger); }   /* roșu */


/* Statistici Clienți - Design îmbunătățit */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  background: linear-gradient(135deg, rgba(75, 141, 248, 0.08) 0%, rgba(75, 141, 248, 0.02) 100%);
  border-radius: 12px;
  border: 1px solid rgba(75, 141, 248, 0.2);
  min-height: 70px;
  transition: all 0.2s ease;
}

.stat-item:hover {
  background: linear-gradient(135deg, rgba(75, 141, 248, 0.12) 0%, rgba(75, 141, 248, 0.04) 100%);
  border-color: rgba(75, 141, 248, 0.3);
  transform: translateY(-2px);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
  opacity: 0.9;
}

.stat-total {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  background: rgba(43, 182, 115, 0.1);
  border: 1px solid rgba(43, 182, 115, 0.2);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
}

.stat-total strong {
  font-size: 18px;
  color: var(--success);
  font-weight: 700;
}

/* Pentru ecrane foarte mici */
@media (max-width: 360px) {
  .stats-grid {
    gap: 10px;
  }

  .stat-item {
    padding: 10px 6px;
    min-height: 65px;
  }

  .stat-value {
    font-size: 24px;
  }

  .stat-label {
    font-size: 10px;
  }
}

/* Pentru ecrane mai mari (tablete) */
@media (min-width: 600px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .stat-item {
    min-height: 80px;
  }
}

/* Loading spinner */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

/* Offline indicator */
.offline-badge {
  position: absolute;
  top: 50%;
  right: var(--space);
  transform: translateY(-50%);
  background: var(--danger);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.offline-status {
  text-align: center;
  padding: 20px;
}

.offline-status h2 {
  margin: 0 0 12px 0;
  color: var(--danger);
}

.offline-status .btn {
  margin-top: 16px;
}

.nav { display:flex; gap:12px; }
.nav a {
  color: #9bbcf7;       /* se potrivește cu tema dark */
  text-decoration: none;
  font-weight: 500;
  opacity: .9;
}
.nav a:hover { opacity: 1; text-decoration: underline; }
.nav .router-link-exact-active { opacity:1; text-decoration:underline; }



