:root {
    --color-bg: #0c1118;
    --color-surface: rgba(17, 22, 29, 0.92);
    --color-surface-soft: rgba(12, 18, 26, 0.75);
    --color-border: #1f2b3a;
    --color-border-soft: rgba(31, 43, 58, 0.65);
    --color-text: #e5eef7;
    --color-text-soft: rgba(229, 238, 247, 0.72);
    --color-muted: #9fb0c3;
    --color-accent: #22d3ee;
    --color-accent-dark: rgba(34, 211, 238, 0.2);
    --color-accent-soft: rgba(34, 211, 238, 0.18);
    --color-taskbar: #0d131b;
    --color-window: rgba(10, 15, 23, 0.95);
    --color-window-header: rgba(11, 18, 26, 0.92);
    --color-error: rgba(224, 70, 70, 0.85);
    --color-danger: #e04646;
    --statusbar-height: 46px;
    --taskbar-height: 64px;
    font-size: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", "Segoe UI", sans-serif;
    color: var(--color-text);
    user-select: none;
}

body {
    min-height: 100vh;
    background: #0C1118;
    display: flex;
    overflow: visible;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

.desktop-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 100vh;
}

.statusbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--statusbar-height);
    background: var(--color-taskbar);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.status-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--color-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 12px var(--color-accent);
    animation: statusPulse 1.8s infinite;
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-input {
    min-width: 200px;
    padding: 6px 14px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: #0b1117;
    color: var(--color-accent);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    overflow: hidden;
    white-space: nowrap;
}

.desktop {
    position: relative;
    flex: 1;
    padding: calc(var(--statusbar-height) + 32px) 24px calc(var(--taskbar-height) + 48px);
    background: var(--color-bg);
}

.desktop-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    width: 100%;
    padding: 0 24px;
    pointer-events: none; /* CRITICAL: Allow clicks to pass through to desktop icons below */
}

.desktop-title h1 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 80px;
    font-weight: 600;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: #2FA1BD;
    text-shadow: 0 0 6px rgba(47, 161, 189, 0.25);
    opacity: 0.85;
    margin: 0;
}

@keyframes titleGlow {
    0% {
        filter: drop-shadow(0 0 20px rgba(34, 211, 238, 0.2));
    }
    100% {
        filter: drop-shadow(0 0 30px rgba(34, 211, 238, 0.4));
    }
}

.desktop-apps {
    position: absolute;
    bottom: calc(var(--taskbar-height) + 24px);
    left: 24px;
    right: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 80px);
    grid-template-rows: repeat(3, 1fr);
    grid-auto-flow: column;
    gap: 32px;
    align-items: start;
}

.desktop-apps .desktop-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--color-muted);
    transition: color 0.2s ease;
    position: relative; /* Positioning context */
    pointer-events: auto; /* Ensure clicks are captured */
}

.desktop-apps .desktop-app-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: #22d3ee;
    transition: color 0.2s ease;
    transform-origin: center center; /* Fix hitbox alignment */
    pointer-events: none; /* Click events auf parent .desktop-app */
}

/* Pulsing animation for unread notifications */
.desktop-app-icon.has-unread {
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 0 var(--pulse-color, rgba(255, 107, 53, 0)));
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
        filter: drop-shadow(0 0 12px var(--pulse-color, rgba(255, 107, 53, 0.8)));
    }
}

.desktop-apps .desktop-app-icon svg {
    width: 48px;
    height: 48px;
    color: inherit;
    stroke: #22D3EE;
    pointer-events: none; /* Fix hitbox - SVG should not capture clicks */
}

.desktop-apps .desktop-app-label {
    font-size: 0.9rem;
    color: var(--color-muted);
    text-align: center;
    pointer-events: none; /* Fix hitbox - label should not capture clicks */
}

.desktop-apps .desktop-app:hover,
.desktop-apps .desktop-app:focus-visible {
    color: var(--color-text);
}

.desktop-apps .desktop-app:hover .desktop-app-icon,
.desktop-apps .desktop-app:focus-visible .desktop-app-icon {
    color: #22d3ee;
}

.taskbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--taskbar-height);
    background: var(--color-taskbar);
    border-top: 1px solid var(--color-border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    z-index: 980;
    gap: 18px;
}

.task-section {
    display: flex;
    align-items: center;
    gap: 18px;
}

.task-left .taskbar-apps {
    display: flex;
    align-items: center;
    gap: 12px;
}

.taskbar-apps .taskbar-app {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: #0c1218;
    color: var(--color-text-soft);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: color 0.2s ease, border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}

.taskbar-apps .taskbar-app:hover {
    color: var(--color-text);
    border-color: var(--color-accent);
    background: #111a24;
}

.taskbar-apps .taskbar-app.active {
    color: var(--color-text);
    border-color: var(--color-accent);
    background: #132130;
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.18);
}

.system-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: #0c1218;
    color: var(--color-text-soft);
    cursor: pointer;
    transition: color 0.2s ease, border 0.2s ease;
}

.system-initials {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--color-accent);
    color: #001821;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
}

.system-label {
    font-weight: 600;
    color: var(--color-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.8px;
}

.task-label {
    font-size: 0.95rem;
    color: inherit;
    pointer-events: none;
}

.system-logo:hover,
.task-btn:hover {
    color: var(--color-text);
    border-color: var(--color-accent);
}

.task-btn {
    height: 44px;
    min-width: 44px;
    padding: 0 16px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #0c1218;
    color: var(--color-text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.system-logo,
.task-btn {
    appearance: none;
    -webkit-appearance: none;
    background-clip: padding-box;
}

.system-logo:focus-visible,
.task-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.system-logo:hover .system-label {
    color: var(--color-text);
}

.task-btn.logout {
    width: 44px;
    padding: 0;
    font-size: 1.2rem;
    color: var(--color-danger);
    border-color: rgba(224, 70, 70, 0.45);
    background: rgba(18, 24, 32, 0.8);
}

.task-btn.logout:hover {
    box-shadow: 0 10px 26px rgba(224, 70, 70, 0.2);
}

.agents-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: #0c1218;
    color: var(--color-text-soft);
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.agents-display:hover {
    border-color: var(--color-accent);
    color: var(--color-text);
}

.agents-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: #0b1117;
    color: var(--color-text-soft);
    font-size: 0.95rem;
}

.user-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
}

.clock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.clock #clockDate {
    color: var(--color-muted);
    font-size: 0.8rem;
}

.taskbar-apps .taskbar-app {
    cursor: pointer;
}

@media (max-width: 1024px) {
    :root {
        --statusbar-height: 44px;
        --taskbar-height: 60px;
    }

    .desktop {
        padding: calc(var(--statusbar-height) + 24px) 16px calc(var(--taskbar-height) + 36px);
    }

    .desktop-apps {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 20px;
    }

    .taskbar {
        padding: 0 14px;
    }

    .status-info {
        font-size: 0.78rem;
    }

    .status-input {
        min-width: 160px;
        font-size: 0.75rem;
    }
}

@media (max-width: 640px) {
    :root {
        font-size: 14px;
    }

    .statusbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        height: auto;
        padding: 10px 14px;
    }

    .desktop {
        padding-top: 120px;
    }

    .taskbar {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
    }

    .task-section {
        gap: 12px;
    }

    .clock {
        align-items: center;
    }
}

/* Desktop Windows - Free-floating Native Style */
.desktop-window {
    pointer-events: all;
    transition: box-shadow 0.3s ease;
}

.desktop-window .window-iframe {
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(4, 10, 18, 0.3);
    transition: box-shadow 0.3s ease;
}

.desktop-window.active-window .window-iframe {
    box-shadow:
        0 8px 20px rgba(4, 10, 18, 0.35),
        0 0 8px rgba(18,214,255,0.02);
}.desktop-window .window-drag-handle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 100;
    cursor: grab;
    user-select: none;
    background: transparent;
    pointer-events: none;
}

.desktop-window .window-drag-handle:active {
    cursor: grabbing !important;
}

/* Resize Handles */
.resize-handle {
    position: absolute;
    z-index: 200;
    pointer-events: all;
}

/* Edge handles */
.resize-n {
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    cursor: ns-resize;
}

.resize-s {
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    cursor: ns-resize;
}

.resize-e {
    right: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: ew-resize;
}

.resize-w {
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: ew-resize;
}

/* Corner handles */
.resize-ne {
    top: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: nesw-resize;
}

.resize-nw {
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
}

.resize-se {
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
}

.resize-sw {
    bottom: 0;
    left: 0;
    width: 16px;
    height: 16px;
    cursor: nesw-resize;
}

@keyframes windowFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Context Menu */
.window-context-menu {
    animation: contextMenuFadeIn 0.15s ease;
}

@keyframes contextMenuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.context-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    color: #e5e7eb;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.context-menu-item:hover {
    background: rgba(18,214,255,0.15);
    color: var(--color-accent);
}

.context-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 6px 0;
}

/* Desktop App Context Menu */
.desktop-context-menu {
    position: fixed;
    background: rgba(17, 24, 39, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    z-index: 99999;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    min-width: 220px;
    font-family: 'Inter', sans-serif;
    animation: contextMenuFadeIn 0.15s ease;
}

.desktop-context-menu .context-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 10px;
}

.desktop-context-menu .context-menu-item:hover {
    background: rgba(18, 214, 255, 0.15);
    color: var(--color-accent);
    transform: translateX(2px);
}

/* Notification */
@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes notificationSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* Responsive Design */
@media (max-width: 1400px) {
    .top-bar {
        max-width: calc(100% - 60px);
        padding: 0.8rem 1.5rem;
        gap: 1.5rem;
    }
    
    .standard-command {
        width: 240px;
        font-size: 0.75rem;
    }
}

@media (max-width: 1024px) {
    .top-bar {
        max-width: calc(100% - 40px);
        padding: 0.7rem 1.2rem;
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .standard-command {
        width: 100%;
        max-width: 300px;
    }
    
    .desktop-window {
        max-width: calc(100vw - 40px) !important;
        max-height: calc(100vh - 160px) !important;
    }
}

@media (max-width: 768px) {
    :root {
        font-size: 14px;
    }
    
    .top-bar {
        width: calc(100% - 20px);
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .system-status {
        font-size: 0.8rem;
        letter-spacing: 0.15rem;
    }
    
    .taskbar {
        height: 70px;
        padding: 0 12px;
    }
    
    .taskbar-apps {
        gap: 8px;
    }
    
    .taskbar-app-icon {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
    
    .desktop-window {
        min-width: 300px !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100vh - 120px) !important;
    }
}

@media (max-width: 480px) {
    .top-bar {
        top: 10px;
        width: calc(100% - 10px);
        padding: 0.5rem 0.8rem;
        gap: 0.8rem;
    }
    
    .standard-command {
        display: none;
    }
    
    .taskbar {
        height: 60px;
        padding: 0 8px;
    }
    
    .taskbar-app-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    
    .desktop-window {
        min-width: 280px !important;
        border-radius: 12px !important;
    }
}

/* 📢 Broadcast Overlay Styles */
.broadcast-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    z-index: 100000; /* CRITICAL: Must be above all windows (window z-index starts at 10000) */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.broadcast-overlay.show {
    opacity: 1;
}

.broadcast-content {
    background: var(--color-window);
    border: 2px solid var(--color-accent);
    border-radius: 12px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(18, 214, 255, 0.3);
    animation: broadcastSlideIn 0.4s ease-out;
}

@keyframes broadcastSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.broadcast-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.broadcast-icon {
    font-size: 3rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 0 var(--pulse-color, rgba(255, 107, 53, 0)));
    }
    50% { 
        transform: scale(1.1);
        filter: drop-shadow(0 0 15px var(--pulse-color, rgba(255, 107, 53, 0.9)));
    }
}

.broadcast-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.broadcast-from {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.broadcast-message {
    font-size: 1.2rem;
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(18, 214, 255, 0.05);
    border-left: 3px solid var(--color-accent);
    border-radius: 4px;
}

.broadcast-footer {
    font-size: 0.85rem;
    color: var(--color-text-soft);
    text-align: center;
    font-style: italic;
}

/* 🚨 Alarm Overlay Styles (KRITISCH - BLOCKIERT ALLES!) */
.alarm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: all; /* BLOCKIERT ALLE KLICKS! */
    cursor: not-allowed;
}

.alarm-overlay.show {
    opacity: 1;
}

.alarm-content {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.95), rgba(80, 0, 0, 0.95));
    border: 3px solid #ff0000;
    border-radius: 16px;
    padding: 60px;
    max-width: 700px;
    width: 90%;
    box-shadow: 0 0 100px rgba(255, 0, 0, 0.6), 0 0 200px rgba(255, 0, 0, 0.3);
    animation: alarmPulse 1s ease-in-out infinite, alarmSlideIn 0.5s ease-out;
    text-align: center;
}

@keyframes alarmPulse {
    0%, 100% { 
        box-shadow: 0 0 100px rgba(255, 0, 0, 0.6), 0 0 200px rgba(255, 0, 0, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 150px rgba(255, 0, 0, 0.8), 0 0 250px rgba(255, 0, 0, 0.5);
        transform: scale(1.02);
    }
}

@keyframes alarmSlideIn {
    from {
        transform: translateY(-100px) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.alarm-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: alarmShake 0.5s ease-in-out infinite;
}

@keyframes alarmShake {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.alarm-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
}

.alarm-from {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 0, 0, 0.5);
}

.alarm-message {
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 4px solid #ff0000;
    border-radius: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.alarm-countdown {
    font-family: 'JetBrains Mono', monospace;
    font-size: 4rem;
    font-weight: 700;
    color: #ff0000;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #ff0000;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% { transform: scale(1); border-color: #ff0000; }
    50% { transform: scale(1.1); border-color: #ff6666; }
}

/* Context Menu Styles */
.window-context-menu,
.taskbar-context-menu {
    position: fixed;
    background: var(--color-taskbar);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border-soft, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    padding: 8px;
    z-index: 99999;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    min-width: 220px;
    font-family: 'Inter', sans-serif;
}

.context-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: var(--color-text, #e5e7eb);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.context-menu-item:hover {
    background: rgba(18, 214, 255, 0.15);
    color: var(--color-accent);
    transform: translateX(2px);
}

.context-menu-item:active {
    transform: scale(0.98);
}

.context-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 6px 0;
}

/* Context Menu Animation */
@keyframes contextMenuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Notification Styles */
.window-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(17, 24, 39, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 24px;
    z-index: 99999;
    font-family: 'Inter', sans-serif;
    color: #e5e7eb;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 350px;
    font-size: 0.95rem;
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes notificationSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* Pinned App Indicator */
.taskbar-app.pinned-app {
    position: relative;
}

.taskbar-app.pinned-app::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-accent-soft);
}

/* ====================================
   TASKBAR FLYOUT POPUPS
   Admin-style popups for taskbar items
   ==================================== */

.taskbar-flyout {
    position: fixed;
    bottom: calc(var(--taskbar-height) + 10px);
    background: linear-gradient(180deg, #0f141b, #0b1117);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    z-index: 100000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    max-width: 400px;
    min-width: 320px;
}

.taskbar-flyout.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.taskbar-flyout-arrow {
    position: absolute;
    bottom: -8px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #0f141b, #0b1117);
    border-right: 1px solid rgba(34, 211, 238, 0.3);
    border-bottom: 1px solid rgba(34, 211, 238, 0.3);
    transform: rotate(45deg);
}

/* Online Agents Flyout */
.online-agents-flyout {
    right: 200px;
    background: #0c1118;
    border: 1px solid #1f2b3a;
    border-radius: 12px;
}

.online-agents-flyout .taskbar-flyout-arrow {
    right: 60px;
    background: #0c1118;
    border-right: 1px solid #1f2b3a;
    border-bottom: 1px solid #1f2b3a;
}

.flyout-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px;
    border-bottom: none;
}

.flyout-title-wrap {
    display: inline-block;
    position: relative;
    padding-bottom: 8px;
    line-height: 1;
}

.flyout-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #e6eef7;
    letter-spacing: 0.2px;
    white-space: nowrap;
    display: inline-block;
}

.flyout-title-wrap::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 2px;
    height: 4px;
    width: calc(100% + 18px);
    border-radius: 6px;
    background: linear-gradient(90deg, #06b6d4, #22d3ee);
    box-shadow: 0 6px 18px rgba(34,211,238,.04) inset;
}

.online-agents-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 14px 14px 14px;
}

.user-rect {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 140px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.03);
    background: linear-gradient(180deg, rgba(255,255,255,0.01), transparent);
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
    transition: all 0.2s ease;
}

.user-rect:hover {
    background: linear-gradient(180deg, rgba(6,182,212,0.05), rgba(6,182,212,0.02));
    border-color: rgba(6,182,212,0.2);
}

.user-id {
    min-width: 34px;
    height: 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(6,182,212,.12);
    color: #22d3ee;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.user-name {
    font-weight: 700;
    color: #e6eef7;
    font-size: 0.95rem;
}

.user-role {
    color: #9fb0c3;
    font-size: 0.9rem;
}

.online-dot {
    margin-left: auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(180deg, #06b6d4, #22d3ee);
    box-shadow: 0 0 12px rgba(34,211,238,.6), 0 0 4px rgba(34,211,238,.35);
}

.empty-state {
    color: #9fb0c3;
    padding: 12px 8px;
    border-radius: 8px;
    border: 1px dashed rgba(255,255,255,.02);
    background: linear-gradient(180deg, rgba(255,255,255,.01), transparent);
    text-align: center;
}

.online-agent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    background: transparent;
    transition: background 0.2s ease;
    border: 1px solid transparent;
}

.online-agent-item:hover {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.15);
}

.online-agent-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #001821;
    flex-shrink: 0;
    font-size: 1rem;
    border: 1px solid rgba(34, 211, 238, 0.3);
}

.online-agent-info {
    flex: 1;
    min-width: 0;
}

.online-agent-name {
    font-weight: 600;
    color: #e5eef7;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.online-agent-role {
    font-size: 0.8rem;
    color: #9fb0c3;
    text-transform: capitalize;
    margin-top: 2px;
}

.online-agent-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22d3ee;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

/* Scrollbar for agents list */
.online-agents-list::-webkit-scrollbar {
    width: 8px;
}

.online-agents-list::-webkit-scrollbar-track {
    background: #0e141b;
    border-radius: 8px;
}

.online-agents-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #06b6d4, #22d3ee);
    border-radius: 8px;
}

.online-agents-list::-webkit-scrollbar-thumb:hover {
    background: #22d3ee;
}

/* Calendar Flyout */
.calendar-flyout {
    right: 20px; /* Position near clock */
}

.calendar-flyout .taskbar-flyout-arrow {
    right: 80px;
}

.calendar-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-md);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.calendar-nav-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border-soft);
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav-btn:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #000;
}

.calendar-month-year {
    font-weight: 600;
    font-size: var(--font-size-lg);
    color: var(--color-text);
    text-align: center;
    flex: 1;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: var(--space-md);
}

.calendar-day-header {
    text-align: center;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-muted);
    padding: var(--space-sm);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-soft);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--color-surface-soft);
}

.calendar-day:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.calendar-day.today {
    background: var(--color-accent);
    color: #000;
    font-weight: 700;
}

.calendar-day.other-month {
    color: var(--color-muted);
    opacity: 0.5;
}

.calendar-day.selected {
    background: var(--color-accent-soft);
    border: 2px solid var(--color-accent);
    color: var(--color-text);
}

.calendar-footer {
    padding-top: var(--space-md);
    margin-top: 0;
    border-top: 1px solid var(--color-border-soft);
    display: flex;
    justify-content: center;
    align-items: center;
}

.calendar-selected-date {
    font-size: var(--font-size-sm);
    color: var(--color-muted);
    text-align: center;
}

