/* Modern Alerts Container */
.modern-alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

/* Alert Box */
.modern-alert {
    background: #FFFFFF;
    min-width: 320px;
    max-width: 400px;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    opacity: 0;
    pointer-events: auto;
    border-left: 5px solid transparent;
}

.modern-alert.show {
    transform: translateX(0);
    opacity: 1;
}

.modern-alert.hide {
    transform: translateX(120%);
    opacity: 0;
}

/* Alert Types */
.modern-alert.success { border-left-color: #4CAF50; }
.modern-alert.error { border-left-color: #F44336; }
.modern-alert.warning { border-left-color: #FF9800; }
.modern-alert.info { border-left-color: #2196F3; }

/* Icons */
.modern-alert-icon {
    font-size: 24px;
    margin-top: 2px;
}

.modern-alert.success .modern-alert-icon { color: #4CAF50; }
.modern-alert.error .modern-alert-icon { color: #F44336; }
.modern-alert.warning .modern-alert-icon { color: #FF9800; }
.modern-alert.info .modern-alert-icon { color: #2196F3; }

/* Content */
.modern-alert-content {
    flex: 1;
}

.modern-alert-title {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    margin-bottom: 4px;
}

.modern-alert-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* Close Button */
.modern-alert-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modern-alert-close:hover {
    color: #333;
}

.modern-alert-close i {
    font-size: 18px;
}

/* ===========================
   MATERIAL LOGOUT DIALOG
   =========================== */
.material-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}

.material-dialog-overlay.active {
    opacity: 1;
    visibility: visible;
}

.material-dialog {
    background: #FFFFFF;
    width: 90%;
    max-width: 400px;
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 24px 38px rgba(0,0,0,0.14), 0 9px 46px rgba(0,0,0,0.12), 0 11px 15px rgba(0,0,0,0.2);
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.material-dialog-overlay.active .material-dialog {
    transform: scale(1);
    opacity: 1;
}

.material-dialog-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
    text-align: center;
}

.material-dialog-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #FFEBEE;
    color: #C62828;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.material-dialog-icon i {
    font-size: 24px;
}

.material-dialog-title {
    font-size: 24px;
    font-weight: 400;
    color: #1C1B1F;
}

.material-dialog-body {
    color: #49454F;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 24px;
    text-align: center;
}

.material-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.material-btn {
    border: none;
    background: none;
    padding: 10px 24px;
    border-radius: 100px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.material-btn.cancel {
    color: #C62828;
}

.material-btn.cancel:hover {
    background-color: #FFEBEE;
}

.material-btn.confirm {
    background-color: #C62828;
    color: #FFFFFF;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.material-btn.confirm:hover {
    background-color: #B71C1C;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* ===========================
   FULL SCREEN LOADER (Improved)
   =========================== */
.full-screen-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FFFFFF;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.full-screen-loader.active {
    opacity: 1;
    visibility: visible;
}

/* Spinner Animation */
.loader-spinner {
    width: 80px;
    height: 80px;
    position: relative;
    margin-bottom: 30px;
}

.loader-spinner::before,
.loader-spinner::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: #C62828; /* Primary Red */
}

.loader-spinner::before {
    z-index: 100;
    animation: spin 1s infinite;
}

.loader-spinner::after {
    border: 4px solid #FFEBEE; /* Light Red */
}

/* Inner pulsing dot */
.loader-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    background: #C62828;
    border-radius: 50%;
    animation: pulse 1.5s infinite ease-in-out;
}

/* Text Styling */
.loader-text {
    font-family: 'Poppins', sans-serif;
    color: #3E2723; /* Dark Brown */
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    animation: fadeInText 2s ease-in-out infinite alternate;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
}

@keyframes fadeInText {
    from { opacity: 0.6; }
    to { opacity: 1; }
}
