:root {
    --sidebar-width: 240px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.sidebar-link.active {
    background-color: rgb(239 246 255);
    color: rgb(29 78 216);
    font-weight: 600;
}

.sidebar-link.active svg {
    color: rgb(29 78 216);
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.fade-in {
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

table tbody tr:hover {
    background-color: rgb(249 250 251);
}

/* ===== Mobile responsive sidebar ===== */
.sidebar-toggle {
    display: none;
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 767px) {
    aside {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 50;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    }

    aside.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: white;
        border: 1px solid rgb(229 231 235);
        border-radius: 8px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .sidebar-toggle:hover {
        background: rgb(249 250 251);
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 40;
    }

    .sidebar-backdrop.show {
        display: block;
    }

    /* Tables scroll horizontally on mobile */
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Modals scroll on mobile */
    .modal-scroll {
        max-height: 90vh;
        overflow-y: auto;
    }
}
