/* Custom utilities beyond Tailwind */
:root {
  --sidebar-w: 260px;
}

/* Smooth sidebar transition */
#sidebar { transition: transform 0.25s ease, width 0.25s ease; }

/* Scrollbar thin */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
.dark ::-webkit-scrollbar-thumb { background: #334155; }

/* Page transition */
.page-enter { animation: fadeIn 0.18s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

/* Toast */
#toast-container { position:fixed; top:1rem; right:1rem; z-index:9999; display:flex; flex-direction:column; gap:.5rem; }
.toast { padding:.75rem 1.25rem; border-radius:.5rem; font-size:.875rem; font-weight:500;
  box-shadow:0 4px 12px rgba(0,0,0,.12); animation: slideIn .2s ease; min-width:220px; max-width:340px; }
@keyframes slideIn { from { opacity:0; transform:translateX(100%); } to { opacity:1; transform:translateX(0); } }
.toast-success { background:#15803d; color:#fff; }
.toast-error   { background:#dc2626; color:#fff; }
.toast-info    { background:#166534; color:#fff; }
.toast-warning { background:#d97706; color:#fff; }

/* Badge */
.badge { display:inline-flex; align-items:center; padding:.15rem .55rem; border-radius:9999px; font-size:.72rem; font-weight:600; letter-spacing:.02em; }

/* Table responsive */
.tbl-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }

/* Form inputs */
.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: #0f172a;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  outline: none;
}
.form-input:focus {
  border-color: #15803d;
  box-shadow: 0 0 0 2px rgba(21, 128, 61, 0.2);
}
.dark .form-input {
  border-color: #475569;
  background-color: #1e293b;
  color: #f8fafc;
}

/* Focus ring */
*:focus-visible { outline:2px solid #16a34a; outline-offset:2px; }

/* Mobile bottom nav */
@media (max-width:767px) {
  #main-content { padding-bottom:4.5rem; }
}

/* Card hover */
.card-hover { transition: box-shadow .18s, transform .18s; }
.card-hover:hover { box-shadow:0 8px 24px rgba(0,0,0,.09); transform:translateY(-2px); }

/* Skeleton */
.skeleton { background: linear-gradient(90deg,#e2e8f0 25%,#f1f5f9 50%,#e2e8f0 75%);
  background-size:200% 100%; animation:shimmer 1.3s infinite; border-radius:.4rem; }
.dark .skeleton { background: linear-gradient(90deg,#1e293b 25%,#334155 50%,#1e293b 75%); background-size:200% 100%; }
@keyframes shimmer { from { background-position:200% 0; } to { background-position:-200% 0; } }
