/* style.css — MossTool custom styles
   TailwindCSS handles the majority of layout and utility classes.
   This file provides only the pieces Tailwind's CDN build cannot cover. */

/* ── Scrollbar styling ──────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track  { background: #0f172a; }
::-webkit-scrollbar-thumb  { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #6366f1; }

/* ── Sidebar active nav link ────────────────────────────────────────────── */
.nav-link.active {
  background-color: #6366f1;
  color: #ffffff;
}

/* ── Toast container ────────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 260px;
  max-width: 380px;
  padding: 0.875rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  animation: toast-in 0.25s ease forwards;
}

.toast.toast-success { background-color: #16a34a; }
.toast.toast-error   { background-color: #dc2626; }
.toast.toast-info    { background-color: #6366f1; }
.toast.toast-out     { animation: toast-out 0.25s ease forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(1.5rem); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(1.5rem); }
}

/* ── Status badges ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-active  { background: rgba(22,163,74,.18);  color: #4ade80; }
.badge-expired { background: rgba(234,179,8,.15);  color: #facc15; }
.badge-revoked { background: rgba(100,116,139,.2); color: #94a3b8; }
.badge-admin   { background: rgba(99,102,241,.2);  color: #a5b4fc; }
.badge-member  { background: rgba(14,165,233,.15); color: #7dd3fc; }

/* ── Card hover lift ────────────────────────────────────────────────────── */
.card-lift {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

/* ── Table row hover ────────────────────────────────────────────────────── */
.tbl-row {
  transition: background-color 0.12s ease;
}
.tbl-row:hover {
  background-color: rgba(99,102,241,0.07);
}

/* ── Skeleton loader ────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #273349 50%, #1e293b 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.4s infinite;
  border-radius: 0.375rem;
}
@keyframes skeleton-pulse {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Sidebar transition (mobile) ────────────────────────────────────────── */
#sidebar {
  transition: transform 0.25s ease;
}
@media (max-width: 768px) {
  #sidebar.sidebar-hidden {
    transform: translateX(-100%);
  }
}

/* ── Spinner ────────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Days-remaining pill (team page) ───────────────────────────────────── */
.days-safe   { background: rgba(22,163,74,.2);   color: #4ade80; }
.days-warn   { background: rgba(234,88,12,.2);   color: #fb923c; }
.days-danger { background: rgba(220,38,38,.2);   color: #f87171; }
