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

.dark ::-webkit-scrollbar-thumb { background: #374151; }
.dark ::-webkit-scrollbar-thumb:hover { background: #4b5563; }

/* ── Transitions ───────────────────────────────────────────────────────────── */
* { transition-property: color, background-color, border-color, box-shadow; transition-duration: 150ms; transition-timing-function: ease; }
a, button { transition-duration: 100ms; }

/* ── Line clamp ────────────────────────────────────────────────────────────── */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Checkbox custom style ─────────────────────────────────────────────────── */
input[type="checkbox"] {
  accent-color: #2563eb;
  cursor: pointer;
}

/* ── Focus ring override ───────────────────────────────────────────────────── */
*:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* ── Table improvements ────────────────────────────────────────────────────── */
table { border-collapse: collapse; }

/* ── Form autofill fix ─────────────────────────────────────────────────────── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px white inset;
  transition: background-color 5000s ease-in-out 0s;
}
.dark input:-webkit-autofill,
.dark input:-webkit-autofill:hover,
.dark input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #1f2937 inset;
  -webkit-text-fill-color: #f9fafb;
}

/* ── Smooth page transitions ───────────────────────────────────────────────── */
main {
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Alpine cloak ──────────────────────────────────────────────────────────── */
[x-cloak] { display: none !important; }
