/* Role-based navigation security CSS */
/* This CSS hides navigation items by default until role is determined */

/* Hide all navigation items initially except Delivery Challan (safest default) */
.sidemenu .links a:not([href*="passes.html"]) {
    display: none !important;
}

/* Show Delivery Challan link by default (accessible to all roles) */
.sidemenu .links a[href*="passes.html"] {
    display: block !important;
}

/* Admin role - show all items (will be set by JavaScript) */
.role-admin .sidemenu .links a {
    display: block !important;
}

/* Gatepass operator role - show delivery challan, orders, and invoices */
.role-gatepass-operator .sidemenu .links a:not([href*="passes.html"]):not([href*="orders.html"]):not([href*="invoices.html"]) {
    display: none !important;
}

.role-gatepass-operator .sidemenu .links a[href*="passes.html"],
.role-gatepass-operator .sidemenu .links a[href*="orders.html"],
.role-gatepass-operator .sidemenu .links a[href*="invoices.html"] {
    display: block !important;
}

/* Gatepass operator - hide edit and delete controls across pages */
.role-gatepass-operator .edit-btn,
.role-gatepass-operator .delete-btn,
.role-gatepass-operator button[title*="Edit"],
.role-gatepass-operator button[title*="Delete"] {
    display: none !important;
}

/* Login verification overlay - only shown during actual login process */
.role-verifying::before {
    content: "Verifying permissions...";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 8px;
    z-index: 9999;
}

/* Hide sensitive content only during verification */
.role-verifying .dashboard-header,
.role-verifying .kpi-grid,
.role-verifying .orders-table-container {
    display: none !important;
}
