/* Ventshop Finance — temă albastru tehnic */
:root {
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --sidebar-bg: #0f1d33;
  --sidebar-text: #dbe4f0;
  --sidebar-muted: #8da3bf;
  --sidebar-width: 250px;
  --surface: #fff;
  --surface-warm: #f8fafc;
  --bg: #eef2f7;
  --border: #d9e2ec;
  --border-light: #e7edf4;
  --text: #1e2a3a;
  --text-muted: #6b7c91;
  --success: #16a34a;
  --success-soft: #e4f5ea;
  --warning: #d97706;
  --warning-soft: #fdf1dc;
  --danger: #dc2626;
  --danger-soft: #fdeaea;
  --radius: 12px;
  --radius-xs: 6px;
  --shadow-lg: 0 8px 28px rgba(30, 35, 42, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.btn-primary { background: var(--primary); border: none; font-weight: 600; }
.btn-primary:hover { background: var(--primary-dark); }
.form-control, .form-select { border-radius: var(--radius-xs); border-color: var(--border); }
.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}
#login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  background: linear-gradient(145deg, #0a1322 0%, #11203a 40%, #1d3357 100%);
}
.login-wrap { width: 100%; max-width: 400px; }
.login-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.login-header {
  text-align: center; padding: 2rem 1.5rem 1rem;
  background: var(--surface-warm); border-bottom: 1px solid var(--border-light);
}
.login-icon {
  width: 56px; height: 56px; margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.5rem;
}
.login-card form { padding: 0 1.5rem 1.5rem; }
#app { display: flex; min-height: 100vh; }
.app-sidebar {
  width: var(--sidebar-width); background: var(--sidebar-bg); color: var(--sidebar-text);
  position: fixed; top: 0; left: 0; bottom: 0; display: flex; flex-direction: column; z-index: 100;
}
.sidebar-brand {
  padding: 1.25rem 1rem; font-weight: 700; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 0.6rem; font-size: 1rem;
}
.sidebar-brand i { color: var(--primary-light); font-size: 1.3rem; }
.sidebar-nav { padding: 0.75rem; flex: 1; }
.sidebar-link {
  display: flex; align-items: center; gap: 0.65rem; width: 100%; border: none; background: none;
  color: var(--sidebar-text); padding: 0.65rem 0.85rem; border-radius: var(--radius-xs);
  font-size: 0.875rem; font-weight: 500; cursor: pointer; margin-bottom: 2px;
}
.sidebar-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-link.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff;
}
.sidebar-footer { padding: 1rem; border-top: 1px solid rgba(255,255,255,0.06); }
.sidebar-user { font-size: 0.78rem; color: var(--sidebar-muted); margin-bottom: 0.5rem; }
.sidebar-user strong { display: block; color: #f8fafc; font-size: 0.88rem; }
.main-content {
  margin-left: var(--sidebar-width); flex: 1; padding: 1.25rem 1.5rem 2rem; min-width: 0;
}
.page-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 1.25rem;
}
.page-header h1 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  background: var(--surface); border-radius: var(--radius); padding: 1rem 1.1rem;
  border: 1px solid var(--border-light); box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.stat-card .lbl { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
.stat-card .val { font-size: 1.25rem; font-weight: 700; margin-top: 0.15rem; }
.stat-card .sub { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.2rem; }
.stat-card.positive .val { color: var(--success); }
.stat-card.negative .val { color: var(--danger); }
.stat-card.warning .val { color: var(--warning); }
.panel-card {
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border-light);
  margin-bottom: 1rem; overflow: hidden;
}
.panel-header {
  padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  background: var(--surface-warm);
}
.panel-header h5 { margin: 0; font-size: 0.95rem; font-weight: 600; }
.panel-body { padding: 1rem 1.1rem; }
.table-card {
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border-light);
  overflow: hidden;
}
.table-card .table { margin: 0; font-size: 0.875rem; }
.table-card thead th {
  background: var(--surface-warm); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border);
}
.table-card tbody tr:hover { background: var(--primary-soft); }
.badge-paid { background: var(--success-soft); color: var(--success); }
.badge-due { background: var(--warning-soft); color: var(--warning); }
.badge-overdue { background: var(--danger-soft); color: var(--danger); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
#toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; min-width: 260px; }
.empty-state { text-align: center; padding: 2rem 1rem; color: var(--text-muted); }
.panel-header h5 i.text-primary { color: var(--primary) !important; }
.row.g-3 { --bs-gutter-x: 0.85rem; }
@media (max-width: 768px) {
  .app-sidebar { width: 100%; position: relative; }
  .main-content { margin-left: 0; }
  #app { flex-direction: column; }
}
