/* ==================== RESET & BASE STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --surface-dark: rgba(20, 20, 30, 0.6);
    --surface-light: rgba(255, 255, 255, 0.1);

    /* Sidebar Specific */
    --sidebar-width: 280px;
    --sidebar-bg: rgba(255, 255, 255, 0.95);
    --sidebar-bg-dark: rgba(15, 23, 42, 0.85);
    /* Darker glass for better contrast */

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;

    /* Border Radius */
    --radius-md: 12px;
    --radius-lg: 20px;
}

body {
    font-family: 'Prompt', 'Inter', sans-serif;
    min-height: 100vh;
    background: #0f172a;
    /* Dark Slate 900 */
    color: #f8fafc;
    /* Slate 50 */
    overflow: hidden;
}

/* ==================== BACKGROUND ANIMATION (DISABLED) ==================== */
.background {
    display: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: #667eea;
    top: -10%;
    left: -10%;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #f093fb;
    top: 40%;
    right: -5%;
    animation-delay: 5s;
}

.orb-3 {
    width: 450px;
    height: 450px;
    background: #4facfe;
    bottom: -10%;
    left: 30%;
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-20px, 30px);
    }
}

/* ==================== APP LAYOUT ==================== */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* ==================== APP LAYOUT ==================== */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* ==================== MAIN CONTENT ==================== */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    width: 100vw;
}

/* Top Bar */
.top-bar {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacing-lg);
    background: rgba(15, 23, 42, 0.8);
    /* Dark Glass */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(247, 243, 243, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    /* White text */
    letter-spacing: -0.025em;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.time-badge {
    padding: 6px 12px;
    background: #f1f5f9;
    /* Slate 100 */
    border-radius: 20px;
    font-size: 0.9rem;
    font-family: 'Prompt', monospace;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.btn-icon-only {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.btn-icon-only:hover {
    background: #e2e8f0;
    color: #334155;
    transform: scale(1.05);
}

.btn-icon-only:active {
    transform: scale(0.95);
}

/* User Profile Small (Header) */
/* User Profile Small (Header) */
.user-profile-small {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    /* Dark Glass */
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 10px;
}

.user-profile-small:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.user-name-small {
    font-size: 0.9rem;
    font-weight: 500;
    color: #f8fafc;
    /* White Text */
}

.avatar-small {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
}




/* Sidebar Menu */



/* Sidebar Footer removed */

.user-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ==================== MAIN CONTENT AREA ==================== */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Top Bar */
.top-bar {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacing-lg);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.time-badge {
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    font-family: 'Prompt', monospace;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-icon-only {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* For badge positioning */
}

.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    background-color: #ef4444;
    /* Red-500 */
    border-radius: 50%;
    border: 2px solid #0f172a;
    /* Match header background */
    display: none;
    z-index: 10;
}

.btn-icon-only:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Content Area */
.content-area {
    flex: 1;
    padding: var(--spacing-lg);
    overflow-y: auto;
    position: relative;
}

#program-view {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==================== DASHBOARD GRID (Legacy adapted) ==================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: 20px;
}

.program-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.program-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-icon-large {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.card-desc {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 15px;
    line-height: 1.4;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.welcome-banner {
    background: rgba(255, 255, 255, 0.05);
    /* Dark Glass */
    border-radius: var(--radius-md);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.welcome-text h1 {
    color: #f8fafc;
    /* White Title */
    margin-bottom: 8px;
}

.welcome-text p {
    color: #cbd5e1;
    /* Slate 300 Description */
}

.run-all-btn {
    background: var(--primary-gradient);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s;
}

.run-all-btn:hover {
    transform: translateY(-2px);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 10px 20px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .sidebar-menu,
    .sidebar-footer {
        display: none;
        /* Hide standard menu on mobile for now, or implement hamburger */
    }

    .logo-icon.mobile-only {
        display: flex;
    }

    .main-wrapper {
        height: calc(100vh - 70px);
    }
}

/* ==================== CARD REDESIGN (Custom Cards Style) ==================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    padding-bottom: 50px;
}

.custom-card {
    position: relative;
    height: 360px;
    /* Taller card */
    background-color: #0f172a;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Push content to bottom */
}

.custom-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

/* Background Image/Gradient Layer */
.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
    z-index: 0;
}

/* Overlay gradient for readability */
/* Overlay removed for clean orange theme */
.card-overlay {
    background: none;
    display: none;
}

.custom-card:hover .card-bg {
    transform: scale(1.1);
}

/* Content Positioning */
.card-content {
    position: relative;
    z-index: 2;
    padding: 25px;
    width: 100%;
}

.card-title-main {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: #1e3a8a;
    /* Dark Blue Text */
    margin-bottom: 2rem;
    max-width: 90%;
}

/* Bottom Row (Badges/Icons) */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    margin-top: auto;
}

.footer-icon-badge {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.5);
    /* Semi-transparent white */
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e3a8a;
    /* Dark Blue Icon */
    font-size: 1.1rem;
    transition: background 0.3s;
}

.custom-card:hover .footer-icon-badge {
    background: var(--primary-gradient);
}

.footer-stats {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #334155;
    /* Dark Slate stats */
    font-weight: 500;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Specific Card Themes (Simulating Images with Gradients) */

/* Specific Card Themes (User Reference: Pale Blue) */

/* Unified Theme: "Soft Lavender/Blue" - Applied to all cards */
/* Unified Theme: "Warm Sunset/Peach" */
/* Specific Card Themes (User Request: Premium Midnight/Non-White) */

/* Unified Theme: "Image Card Dark" */
.card-bg-cctv,
.card-bg-printer,
.card-bg-computer,
.card-bg-repair {
    /* Placeholder Gradients (Replace URL with your images) */
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Gradients acting as Image Placeholders - User can replace url() */
.card-bg-cctv {
    background-image: url('images/logo_GM CCTV .png'), linear-gradient(135deg, #e8eaee, #e8eaee);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.card-bg-printer {
    background-image: url('images/logo_GM printer.png'), linear-gradient(135deg, #e8eaee, #e8eaee);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.card-bg-computer {
    background-image: url('images/logo_GM computer.png'), linear-gradient(135deg, #e8eaee, #e8eaee);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.card-bg-repair {
    background-image: url('images/logo_GM repair.png'), linear-gradient(135deg, #e8eaee, #e8eaee);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Dark Overlay for Text Readability */
.card-bg-cctv::before,
.card-bg-printer::before,
.card-bg-computer::before,
.card-bg-repair::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(33, 39, 53, 0.95) 0%, rgba(15, 23, 42, 0.6) 60%, rgba(15, 23, 42, 0.4) 100%);
    z-index: 0;
}

/* Hover Effects */
.custom-card:hover .card-bg-cctv,
.custom-card:hover .card-bg-printer,
.custom-card:hover .card-bg-computer,
.custom-card:hover .card-bg-repair {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

.custom-card:hover .card-bg-cctv::before,
.custom-card:hover .card-bg-printer::before,
.custom-card:hover .card-bg-computer::before,
.custom-card:hover .card-bg-repair::before {
    background: linear-gradient(to top, rgba(216, 218, 223, 0.9) 0%, rgba(15, 23, 42, 0.5) 100%);
}

/* Typography Refinements */
.card-title-main {
    position: relative;
    z-index: 2;
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.025em;
    margin-top: auto;
    /* Push to bottom */
}

/* Hanging Icon Style */
.footer-icon-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 60px;
    /* Larger Hanging Icon */
    height: 60px;
    border-radius: 16px;
    /* Squircle */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    /* Large Icon */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    z-index: 2;
    transition: all 0.3s ease;
}

.custom-card:hover .footer-icon-badge {
    transform: scale(1.1) rotate(5deg);
    background: rgba(238, 236, 236, 0.2);
    border-color: rgba(236, 230, 230, 0.5);
}

.footer-stats {
    position: relative;
    z-index: 2;
    color: #cbd5e1;
    /* Slate 300 */
    font-weight: 500;
}




/* Status dots */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 5px #10b981;
}

.status-dot.offline {
    background-color: #ef4444;
    box-shadow: 0 0 5px #ef4444;
}

/* Admin Status Badge (Top Bar) */
.admin-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: #94a3b8;
    /* Default Slate (Offline) */
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.admin-status-badge.online {
    color: #10b981;
    /* Green (Online) */
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.15);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.admin-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    box-shadow: 0 0 8px currentColor;
    transition: all 0.3s;
}

.admin-status-badge.online .admin-dot {
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Repair Badge (Card) */
.card-notification-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    left: auto;
    background: #ef4444;
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #0f172a;
    /* Match background to cut out */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 10;
    animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    60% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

/* Lock Icon Overlay for Restricted Cards */
.card-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.card-lock-overlay:hover {
    background: rgba(15, 23, 42, 0.9);
}

.card-lock-icon {
    font-size: 4rem;
    color: #94a3b8;
    margin-bottom: 15px;
    animation: lockPulse 2s infinite ease-in-out;
}

.card-lock-text {
    color: #cbd5e1;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
}

.card-lock-subtext {
    color: #64748b;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 5px;
}

@keyframes lockPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}


/* ==================== CHAT WIDGET ==================== */
.chat-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-fab:hover {
    transform: scale(1.05) translateY(-5px);
}

.chat-fab span {
    font-weight: 600;
    font-size: 0.95rem;
}

.chat-window {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 350px;
    height: 450px;
    background: #0f172a;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

.chat-window.open {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}

.chat-header {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.chat-header h4 {
    margin: 0;
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-input-area {
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 10px;
    border-radius: 0 0 20px 20px;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.custom-card:hover .footer-icon-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: rgba(236, 230, 230, 0.5);
}

.chat-send-btn {
    background: #3b82f6;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-send-btn:hover {
    background: #2563eb;
}

/* Message Bubbles */
.msg {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.msg.self {
    flex-direction: row-reverse;
}

.msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.msg-content {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
}

.msg.other .msg-content {
    background: #334155;
    color: #f1f5f9;
    border-bottom-left-radius: 4px;
}

.msg.self .msg-content {
    background: #3b82f6;
    color: white;
    border-bottom-right-radius: 4px;
}

.msg-role {
    font-size: 0.7rem;
    opacity: 0.5;
    gap: 8px;
}

.chat-inbox-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-inbox-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chat-inbox-item.unread {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
}

.inbox-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.inbox-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.inbox-name {
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
}

.inbox-msg {
    font-size: 0.8rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-badge {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.chat-back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px;
    margin-right: 10px;
}

/* Chat Notification Dot on FAB */
.chat-fab .notification-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #0f172a;
    display: none;
}

/* ==================== SERVER STATUS INDICATORS ==================== */
.server-status-indicator {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 10;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    padding: 8px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.server-status-indicator .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #6b7280;
    /* Gray - Loading */
    box-shadow: 0 0 8px currentColor;
    animation: pulse-loading 1.5s infinite;
}

.server-status-indicator.online .status-dot {
    background-color: #10b981;
    /* Green - Online */
    box-shadow: 0 0 12px #10b981;
    animation: pulse-online 2s infinite;
}

.server-status-indicator.offline .status-dot {
    background-color: #ef4444;
    /* Red - Offline */
    box-shadow: 0 0 12px #ef4444;
    animation: none;
}

@keyframes pulse-online {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes pulse-loading {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* ==================== SWEETALERT2 CUSTOM THEME ==================== */
/* Modern, Beautiful SweetAlert2 Styling */

.swal2-popup {
    font-family: 'Prompt', 'Inter', sans-serif !important;
    border-radius: 20px !important;
    padding: 2rem !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Title Styling */
.swal2-title {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-bottom: 1rem !important;
    line-height: 1.3 !important;
}

/* Content Text */
.swal2-html-container {
    font-size: 1rem !important;
    color: #64748b !important;
    line-height: 1.6 !important;
    margin: 1rem 0 !important;
}

/* Icon Styling */
.swal2-icon {
    margin: 1.5rem auto 1rem auto !important;
    border-width: 3px !important;
}

.swal2-icon.swal2-success {
    border-color: #10b981 !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #10b981 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.swal2-icon.swal2-error {
    border-color: #ef4444 !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #ef4444 !important;
}

.swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

.swal2-icon.swal2-info {
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
}

.swal2-icon.swal2-question {
    border-color: #8b5cf6 !important;
    color: #8b5cf6 !important;
}

/* Button Styling */
.swal2-actions {
    gap: 12px !important;
    margin-top: 1.5rem !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 32px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.3s ease !important;
}

.swal2-confirm:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5) !important;
}

.swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3) !important;
}

.swal2-cancel {
    background: #e2e8f0 !important;
    color: #475569 !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 32px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.swal2-cancel:hover {
    background: #cbd5e1 !important;
    transform: translateY(-2px) !important;
}

.swal2-deny {
    background: #ef4444 !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 32px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4) !important;
    transition: all 0.3s ease !important;
}

.swal2-deny:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5) !important;
}

/* Input Fields */
.swal2-input,
.swal2-textarea {
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
}

.swal2-input:focus,
.swal2-textarea:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    outline: none !important;
}

/* Close Button */
.swal2-close {
    font-size: 2rem !important;
    color: #94a3b8 !important;
    transition: all 0.2s ease !important;
}

.swal2-close:hover {
    color: #475569 !important;
    transform: rotate(90deg) !important;
}

/* Dark Theme Support */
.swal2-popup.dark-theme-popup {
    background: #1e293b !important;
    color: #f8fafc !important;
}

.swal2-popup.dark-theme-popup .swal2-title {
    color: #f8fafc !important;
}

.swal2-popup.dark-theme-popup .swal2-html-container {
    color: #cbd5e1 !important;
}

.swal2-popup.dark-theme-popup .swal2-input,
.swal2-popup.dark-theme-popup .swal2-textarea {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

/* Animation */
.swal2-show {
    animation: swal2-show 0.3s !important;
}

.swal2-hide {
    animation: swal2-hide 0.2s !important;
}

@keyframes swal2-show {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }

    45% {
        transform: scale(1.05);
        opacity: 1;
    }

    80% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes swal2-hide {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.5);
        opacity: 0;
    }
}


/* ==================== STATUS TEXT ==================== */
.status-text {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 4px;
}