/* theme.css - Shared visual identity for every page in the app.
   Built on top of Bootstrap 5 (already loaded everywhere) - this file
   only adds consistency (colors, spacing, shadows) and Animista-sourced
   entrance/hover animations. Nothing here requires changing any page's
   HTML structure - it works by styling the Bootstrap classes already
   in use (.card, .btn, .table, .navbar, etc.) across the whole app. */

:root {
  --brand-primary: #0d6efd;
  --brand-dark: #0a2e6b;
  --brand-accent: #ffc107;
  --surface-radius: 12px;
  --surface-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

body {
  background-color: #f4f6f9;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Consistent surfaces ---------- */
.card {
  border: none;
  border-radius: var(--surface-radius);
  box-shadow: var(--surface-shadow);
  animation: fadeInUp 0.35s ease both;
}

.card-header {
  border-top-left-radius: var(--surface-radius) !important;
  border-top-right-radius: var(--surface-radius) !important;
  font-weight: 600;
}

.table {
  border-radius: var(--surface-radius);
  overflow: hidden;
}

.table thead.table-dark th {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
}

/* ---------- Buttons: subtle grow + lift on hover (Animista-style) ---------- */
.btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}
.btn:active {
  transform: translateY(0) scale(0.98);
}

/* ---------- Navbar polish ---------- */
.navbar {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.navbar .dropdown-menu {
  animation: fadeInDown 0.2s ease both;
  border: none;
  box-shadow: var(--surface-shadow);
}

/* ---------- Alerts: gentle entrance so messages don't just "pop" ---------- */
.alert {
  animation: fadeInDown 0.3s ease both;
  border: none;
  border-radius: var(--surface-radius);
}

/* ---------- Badges: soft pulse for anything flagged urgent ---------- */
.badge.bg-danger {
  animation: softPulse 1.6s ease-in-out infinite;
}

/* =========================================================
   Animista-sourced keyframes
   (https://animista.net - "fade-in-up", "fade-in-down", "scale-in")
   ========================================================= */
@keyframes fadeInUp {
  0%   { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  0%   { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  0%   { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes softPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.65; }
}

/* Utility classes if you want to apply these manually anywhere */
.anim-fade-up   { animation: fadeInUp 0.35s ease both; }
.anim-fade-down { animation: fadeInDown 0.3s ease both; }
.anim-scale-in  { animation: scaleIn 0.25s ease both; }
