/* Recent Activity with Animated Entries */
.recent-activity {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 7px 25px rgba(0, 0, 0, 0.08);
    animation: fadeIn 1s ease;
}

.activity-list {
    list-style: none;
}

.activity-item {
    display: flex;
    padding: 18px 0;
    border-bottom: 1px solid #eee;
    animation: slideInRight 0.5s ease;
    transition: all 0.3s ease;
}

.activity-item:hover {
    transform: translateX(-5px);
    background: rgba(248, 249, 250, 0.5);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(72, 149, 239, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    color: var(--accent);
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.activity-item:hover .activity-icon {
    background: var(--accent);
    color: white;
    transform: scale(1.1);
}

.activity-details {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.activity-time {
    font-size: 0.85rem;
    color: var(--gray);
    display: flex;
    align-items: center;
}

.activity-time i {
    margin-left: 5px;
    font-size: 0.8rem;
}

.activity-status {
    font-size: 0.85rem;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 500;
    align-self: center;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.status-in {
    background: rgba(76, 201, 240, 0.1);
    color: var(--success);
}

.status-out {
    background: rgba(247, 37, 133, 0.1);
    color: var(--danger);
}

.activity-item:hover .activity-status {
    transform: scale(1.05);
}


/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        z-index: 1000;
    }

    .main-content {
        margin-right: 0;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: 1fr 1fr;
    }

    .action-panel {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-profile {
        margin-top: 15px;
    }
}

@media (max-width: 576px) {
    .stats-container {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 20px;
    }
}



.user-profile:hover .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: #f5f7fa;
}

.dropdown-item i {
    margin-left: 10px;
    color: var(--primary);
    width: 20px;
    text-align: center;
}

.dropdown-item span {
    font-size: 0.9rem;
}

#logoutBtn i {
    color: var(--danger);
}

#logoutBtn:hover {
    background: rgba(247, 37, 133, 0.1);
}

.logo i {
    margin-right: 15px;
    /* instead of margin-left */
}

.nav-item i {
    margin-right: 15px;
}

.user-profile img {
    margin-right: 10px;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .logo span,
.sidebar.collapsed .nav-item span {
    display: none;
}

@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        right: 0;
        top: 0;
        height: 100%;
        z-index: 1000;
    }

    .menu-toggle {
        display: block;
    }

    .main-content {
        padding: 20px;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-group select.input {
    appearance: none;
    /* Remove default styling */
    -webkit-appearance: none;
    -moz-appearance: none;

    background-color: #fff;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    padding: 10px 40px 10px 12px;
    /* Leave space on left for custom arrow */
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    position: relative;
    transition: border-color 0.3s ease;
    width: 100%;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

/* Add custom arrow using ::after on a wrapper */
.input-group select.input:focus {
    border-color: #4361ee;
    border-color: var(--accent);
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(72, 149, 239, 0.2);
    /* Primary color */
    outline: none;
}

.select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    /* make it full width or whatever you want */
}

.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    width: 100%;
    background-color: #fff;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    padding: 10px 40px 10px 12px;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.select-wrapper select:focus {
    border-color: #4361ee;
    outline: none;
}

/* Custom arrow */
.select-wrapper::after {
    content: '\f107';
    /* FontAwesome chevron-down */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    right: 12px;
    /* Arrow on the right */
    pointer-events: none;
    transform: translateY(-50%);
    color: #4361ee;
    font-size: 0.8rem;
    user-select: none;
}

/* Toast container */
#toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    /* Since RTL, toast shows top-left */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Toast message */
.toast {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(37, 117, 252, 0.4);
    font-size: 1rem;
    font-weight: 600;
    animation: slideInFade 0.5s ease forwards;
    cursor: default;
    user-select: none;
    direction: rtl;
    position: relative;
    overflow: hidden;
}

/* Toast variants */
.toast.success {
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    box-shadow: 0 6px 15px rgba(24, 90, 157, 0.5);
}

.toast.error {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    box-shadow: 0 6px 15px rgba(255, 75, 43, 0.5);
}

.toast.info {
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
    box-shadow: 0 6px 15px rgba(109, 213, 237, 0.5);
}

/* Toast icon */
.toast i {
    margin-left: 12px;
    /* RTL: icon on left */
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Slide in + fade animation */
@keyframes slideInFade {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide out + fade animation */
@keyframes slideOutFade {
    0% {
        opacity: 1;
        transform: translateX(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-100%);
    }
}

.clear-btn {
    margin-right: auto;
    background-color: #ff4d4d;
    border: none;
    color: white;
    padding: 4px 12px;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.clear-btn:hover {
    background-color: #e60000;
}