/* ================= BASE ================= */
html, body {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fb;
}

/* ================= LAYOUT ================= */
.container-fluid {
    min-height: 100vh;
}

.row {
    margin: 0;
}

/* ================= SIDEBAR ================= */
#sidebar {
    width: 240px;
    background: #2d3748;
    color: #fff;
    min-height: 100vh;
    transition: all 0.3s ease;
}

#sidebar.active {
    margin-left: -240px;
}

.sidebar a {
    display: block;
    color: #cbd5e0;
    padding: 12px 20px;
    text-decoration: none;
    transition: 0.2s;
}

.sidebar a:hover,
.sidebar a.active {
    background: #0d6efd;
    color: #fff;
    border-radius: 5px;
}

/* ================= TOPBAR ================= */
.topbar {
    background: #fff;
    padding: 15px;
    height: 60px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ================= CARDS ================= */
.card {
    border-radius: 12px;
    border: none;
}

/* ================= BUTTON ================= */
.btn-primary {
    background: #667eea;
    border: none;
}

.btn-primary:hover {
    background: #5a67d8;
}

.btn-danger:hover {
    transform: scale(1.05);
    transition: 0.2s;
}

/* ================= TABLE ================= */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    table-layout: fixed;
}

.table th,
.table td {
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
}

/* ================= LOADER ================= */
.ajax-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(3px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ddd;
    border-top: 5px solid #0d6efd;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ================= MODAL ================= */
.modal-content {
    border-radius: 12px;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.7);
}

/* FIXED ANIMATION */
.modal.fade .modal-dialog {
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}


/* ================= MOBILE ================= */
@media(max-width:768px){

    #sidebar {
        position: fixed;
        height: 100%;
        z-index: 999;
        left: 0;
    }

    table {
        font-size: 12px;
    }
}