/* School Finance ERP — Custom Styles */

* { box-sizing: border-box; }

body { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; }

/* Sidebar active link */
.nav-link.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.nav-link.active i { opacity: 1; }

/* Smooth page transitions */
.page { animation: fadeIn 0.18s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge-success  { background: #dcfce7; color: #15803d; }
.badge-warning  { background: #fef9c3; color: #a16207; }
.badge-error    { background: #fee2e2; color: #b91c1c; }
.badge-info     { background: #dbeafe; color: #1d4ed8; }
.badge-gray     { background: #f3f4f6; color: #4b5563; }
.badge-purple   { background: #f3e8ff; color: #7c3aed; }
.badge-orange   { background: #ffedd5; color: #c2410c; }

/* Role badges */
.role-admin      { background: #dbeafe; color: #1d4ed8; }
.role-accountant { background: #d1fae5; color: #065f46; }
.role-staff      { background: #fef3c7; color: #92400e; }

/* Table hover */
tbody tr:hover { background: #f9fafb; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Toast animation */
#toast.show {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

/* Modal */
#modal { transition: opacity 0.15s ease; }
#modal.show { display: flex !important; }

/* Stat card hover */
.stat-card, [class*="stat-card"] { transition: transform 0.15s, box-shadow 0.15s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

/* Form inputs focus ring */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: 6px;
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Mobile: bottom sheet modal */
@media (max-width: 640px) {
  #modal > div {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-height: 92vh;
  }
}
