/* ==========================================================
   BERACO STUDIO - CLEAN & MODERN THEME
   Smooth Floating Alerts & Prominent Top-Left 3D Logo
   ========================================================== */

/* Top-Left Menu Logo */
.top-menu-logo {
    display: block !important;
}

.top-menu-logo img:hover {
    transform: scale(1.08) rotate(3deg) !important;
}

/* Base Surfaces */
body, html {
    background-color: #0d0a18 !important;
}

#layout-menu {
    background-color: #0a0714 !important;
    border-right: 1px solid rgba(139, 92, 246, 0.15) !important;
}

#layout-sidebar {
    background-color: #110d21 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
}

#layout-list {
    background-color: #141026 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
}

#layout-content {
    background-color: #100c1e !important;
}

.header, .toolbar {
    background-color: #15102a !important;
    border-bottom: 1px solid rgba(139, 92, 246, 0.15) !important;
}

/* Subtle Active & Selected states */
#layout-menu li.selected a,
#layout-menu li a:hover {
    background: rgba(139, 92, 246, 0.18) !important;
    color: #ffffff !important;
    border-left: 3px solid #ff2a85 !important;
}

.treelist li.selected > a {
    background: rgba(139, 92, 246, 0.22) !important;
    color: #ffffff !important;
}

.treelist li a:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

.messagelist tr.selected {
    background: rgba(139, 92, 246, 0.18) !important;
    border-left: 3px solid #00f2fe !important;
}

.messagelist tr:hover {
    background: rgba(255, 255, 255, 0.035) !important;
}

.messagelist tr.unread {
    font-weight: 600 !important;
}

.messagelist tr.unread .subject::before {
    content: "● ";
    color: #ff2a85 !important;
}

/* Clean Badges */
.badge, .unreadcount {
    background: linear-gradient(135deg, #ff2a85, #8b5cf6) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
}

/* Input Fields */
input.form-control:focus, 
textarea.form-control:focus, 
select.form-control:focus {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25) !important;
}

/* ==================== ULTRA SMOOTH ALERTS & NOTIFICATIONS ==================== */
@keyframes slideDownToast {
    0% {
        opacity: 0;
        transform: translateY(-25px) scale(0.95);
    }
    60% {
        transform: translateY(4px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#messagestack {
    position: fixed !important;
    top: 24px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    pointer-events: none !important;
    width: auto !important;
    max-width: 90vw !important;
}

#messagestack > div,
.toast,
.ui-dialog.popupdialog {
    pointer-events: auto !important;
    animation: slideDownToast 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    background: rgba(20, 15, 38, 0.88) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 14px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.55), 0 0 20px rgba(139, 92, 246, 0.25) !important;
    color: #f8fafc !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    padding: 14px 22px !important;
    min-width: 320px !important;
    text-align: center !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Success / Confirmation Alerts */
#messagestack > div.confirmation,
#messagestack > div.notice,
.alert-success {
    border-left: 5px solid #10b981 !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.55), 0 0 20px rgba(16, 185, 129, 0.25) !important;
}

/* Error Alerts */
#messagestack > div.error,
.alert-danger,
.alert-error {
    border-left: 5px solid #ff2a85 !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.55), 0 0 20px rgba(255, 42, 133, 0.3) !important;
}

/* Warning Alerts */
#messagestack > div.warning,
.alert-warning {
    border-left: 5px solid #f59e0b !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.55), 0 0 20px rgba(245, 158, 11, 0.25) !important;
}

/* Information Alerts */
#messagestack > div.information,
.alert-info {
    border-left: 5px solid #00f2fe !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.55), 0 0 20px rgba(0, 242, 254, 0.25) !important;
}

/* UI Dialog / Modal Popups */
.ui-dialog {
    background: rgba(18, 14, 34, 0.94) !important;
    backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    border-radius: 18px !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.65), 0 0 30px rgba(139, 92, 246, 0.3) !important;
    overflow: hidden !important;
}

.ui-dialog .ui-dialog-titlebar {
    background: rgba(26, 20, 50, 0.9) !important;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* Custom Clean Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0d0a18;
}
::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.35);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 42, 133, 0.6);
}
