:root {
    --transition-speed: 0.3s;
}

/* Smooth scrolling for the whole app */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar for Chrome/Safari */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Body & Typography refinements */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---  SIDEBAR & DRAWER --- */
.drawer-side .menu {
    padding-top: 2rem;
}

/* Sidebar Hover & Active states */
.drawer-side .menu li a {
    margin-bottom: 0.25rem;
    transition: all var(--transition-speed) ease;
}

.drawer-side .menu li a:hover {
    background-color: oklch(var(--p) / 0.1); /* Subtle primary tint */
    padding-left: 1.5rem;
}

.drawer-side .menu li a.active {
    background-color: oklch(var(--p));
    color: oklch(var(--pc));
    font-weight: 600;
}

/* Sidebar Brand Header shadow */
.drawer-side .border-b {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
}
/* --- TABLES & DATA --- */
.table-container {
    max-height: 70vh;
    overflow-y: auto;
}

/* Sticky Header for long lists */
.table thead tr {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: oklch(var(--b2));
}

/* Row Hover effect for better data tracking */
.table tbody tr:hover {
    background-color: oklch(var(--b2) / 0.5) !important;
    cursor: default;
}

/* Status Badge sizing */
.badge {
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    font-weight: 700;
}

/* --- DASHBOARD & STATS --- */
.stats {
    transition: transform var(--transition-speed) ease;
}

.stats:hover {
    transform: translateY(-3px);
}

/* Icon backgrounds in stats */
.stat-figure {
    opacity: 0.8;
    padding: 0.5rem;
    border-radius: 12px;
}

/* --- FORMS & MODALS --- */
.modal-box {
    border-top: 5px solid oklch(var(--p)); /* Color accent on top of modals */
}

.form-control .label-text {
    font-weight: 600;
    color: oklch(var(--bc) / 0.7);
}

.input:focus, .select:focus, .textarea:focus {
    outline: 2px solid oklch(var(--p) / 0.3);
}

/* Form input group spacing */
.grid-cols-1 > .form-control {
    margin-bottom: 0.5rem;
}

/* --- TOASTS & ALERTS --- */
#toast-container {
    pointer-events: none; /* Allows clicking through the container */
}

.alert {
    animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto; /* Re-enable clicks for the alert itself */
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}