@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&family=DM+Sans:wght@400;500;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================
   1. CORE PALETTE & VARIABLES
   ========================================== */
:root {
    /* OS & Layout (Made significantly darker for depth) */
    --os-bg: #0a0c12; 
    --os-taskbar: #0f1219;
    --os-taskbar-border: #1e2330;
    
    /* Standard Windows (Slightly lighter to pop off the background) */
    --win-bg: #21252f;
    --win-header: #15181e;
    --win-border: #383e4c;
    --detail-bg: #181b22;
    
    /* Lists & Sidebars */
    --sidebar-bg: #191c22;
    --sidebar-border: #282c34;
    --sidebar-hover: #22252d;
    --sidebar-active: rgba(74, 158, 255, 0.08);
    --row-bg: #1e2128;
    --row-hover: #252830;
    --row-border: #282c34;
    --row-active: #252a35;
    --input-bg: #15171c;

    /* Typography */
    --text: #d4d8e0;
    --text-dim: #7e8594;
    --text-faint: #4e5564;

    /* Primary Colors & Highlights */
    --accent: #4a9eff;
    --accent-dim: rgba(74, 158, 255, 0.1);
    --accent-hover: #3b82f6;

    --green: #4ecb71;
    --green-dim: rgba(78, 203, 113, 0.1);
    --green-hover: #3ba85a;

    --yellow: #f0c040;
    --yellow-dim: rgba(240, 192, 64, 0.1);

    --red: #ef5555;
    --red-dim: rgba(239, 85, 85, 0.1);
    --red-hover: #ff3333;

    --orange: #f0883e;
    --orange-dim: rgba(240, 136, 62, 0.1);

    --purple: #a87cff;
    --purple-dim: rgba(168, 124, 255, 0.1);

    --cyan: #22d3ee;
    --cyan-dim: rgba(34, 211, 238, 0.1);

    --pink: #f06292;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; background: var(--os-bg); color: var(--text); height: 100vh; overflow: hidden; user-select: none; }

/* ==========================================
   2. OS DESKTOP, TASKBAR & START MENU
   ========================================== */
/* Desktop Background */
#os-desktop {
    height: 100vh; display: flex; flex-direction: column;
    background: radial-gradient(ellipse at 20% 20%, var(--glow-1, rgba(74, 158, 255, 0.06)) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 80%, var(--glow-2, rgba(168, 124, 255, 0.05)) 0%, transparent 60%), 
                var(--os-bg);
    transition: background 1s ease;
}

/* --- TIER THEMES --- */
/* Tier 1 - HelpDesk (Standard Blue) */
body.tier-1 {
    --accent: #4a9eff;
    --accent-dim: rgba(74, 158, 255, 0.1);
    --accent-hover: #3b82f6;
    --glow-1: rgba(74, 158, 255, 0.06);
    --glow-2: rgba(168, 124, 255, 0.05);
}

/* Tier 2 - Desktop Support (Purple) */
body.tier-2 {
    --accent: #a87cff;
    --accent-dim: rgba(168, 124, 255, 0.1);
    --accent-hover: #9059ff;
    --glow-1: rgba(168, 124, 255, 0.08);
    --glow-2: rgba(240, 192, 64, 0.05);
}

/* Tier 3 - SysAdmin (Critical Red) */
body.tier-3 {
    --accent: #ef5555;
    --accent-dim: rgba(239, 85, 85, 0.1);
    --accent-hover: #ff3333;
    --glow-1: rgba(239, 85, 85, 0.08);
    --glow-2: rgba(240, 98, 146, 0.05);
    --win-header: #1f1515; /* Gives windows a slight red tint */
}

/* Desktop Icons */
#desktop-icons { position: absolute; top: 16px; left: 16px; display: flex; flex-direction: column; gap: 4px; z-index: 1; flex-wrap: wrap; max-height: calc(100vh - 70px); align-content: flex-start; }
.desk-icon { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 8px; border-radius: 6px; cursor: pointer; transition: background 0.15s; width: 72px; text-align: center; }
.desk-icon:hover { background: rgba(255, 255, 255, 0.06); }
.desk-icon-img { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.desk-icon span { font-size: 9px; color: var(--text-dim); line-height: 1.2; word-break: break-word; }

/* Taskbar */
#taskbar { position: absolute; bottom: 0; left: 0; right: 0; height: 44px; background: var(--os-taskbar); border-top: 1px solid var(--os-taskbar-border); display: flex; align-items: center; padding: 0 8px; z-index: 100; }
.tb-start { display: flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 6px; cursor: pointer; transition: background 0.15s; margin-right: 6px; }
.tb-start:hover { background: rgba(255, 255, 255, 0.06); }
.tb-start-icon { width: 22px; height: 22px; border-radius: 5px; background: linear-gradient(135deg, var(--accent), var(--purple)); display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; font-weight: 700; }
.tb-start span { font-size: 11px; font-weight: 500; color: var(--text-dim); }
.tb-div { width: 1px; height: 24px; background: var(--os-taskbar-border); margin: 0 4px; }
.tb-app { display: flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 6px; font-size: 10px; color: var(--text-dim); cursor: pointer; transition: all 0.12s; position: relative; }
.tb-app:hover { background: rgba(255, 255, 255, 0.05); }
.tb-app.active { background: var(--accent-dim); color: var(--accent); }
.tb-app.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 14px; height: 2px; background: var(--accent); border-radius: 1px; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.tb-tray { font-size: 13px; color: var(--text-faint); cursor: pointer; }
.tb-clock { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-dim); }

/* Start Menu */
#start-menu { position: absolute; bottom: 48px; left: 4px; width: 280px; background: var(--win-bg); border: 1px solid var(--win-border); border-radius: 10px; box-shadow: 0 8px 40px rgba(0,0,0,0.5); z-index: 25; display: none; overflow: hidden; animation: slideUp 0.15s ease-out; }
#start-menu.open { display: block; }
.sm-header { padding: 14px 16px; border-bottom: 1px solid var(--row-border); display: flex; align-items: center; gap: 10px; }
.sm-avatar { width: 36px; height: 36px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--purple)); display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff; font-weight: 700; }
.sm-user { font-size: 12px; font-weight: 600; }
.sm-role { font-size: 10px; color: var(--text-faint); }
.sm-section { padding: 6px 0; }
.sm-label { font-family: 'JetBrains Mono', monospace; font-size: 8px; color: var(--text-faint); letter-spacing: 1.5px; text-transform: uppercase; padding: 6px 16px 4px; }
.sm-item { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 12px; color: var(--text-dim); cursor: pointer; transition: all 0.1s; }
.sm-item:hover { background: var(--sidebar-hover); color: var(--text); }
.sm-item .sm-icon { width: 22px; text-align: center; font-size: 14px; }
.sm-divider { height: 1px; background: var(--row-border); margin: 4px 12px; }
.sm-item.danger { color: var(--red); }
.sm-item.danger:hover { background: var(--red-dim); }

/* ==========================================
   3. UNIVERSAL WINDOW SYSTEM
   ========================================== */
/* Shared Window States - Applies to ALL windows dynamically */
div[id$="-window"], #sticky-note, #lofi-widget, .rud-window { 
    transition: opacity 0.2s, transform 0.2s; 
}
div[id$="-window"].hidden, #sticky-note.hidden, #lofi-widget.hidden, .rud-window.hidden { 
    opacity: 0; 
    pointer-events: none; 
    transform: scale(0.95); 
}
/* Standard Window Chrome */
.win-titlebar { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; height: 36px; min-height: 36px; background: var(--win-header); border-bottom: 1px solid var(--win-border); }
.win-titlebar-left { display: flex; align-items: center; gap: 10px; }
.win-dots { display: flex; gap: 6px; }
.win-dot { width: 10px; height: 10px; border-radius: 50%; border: none; cursor: pointer; }
.win-dot.red { background: #ff5f57; } .win-dot.yellow { background: #febc2e; } .win-dot.green { background: #28c840; }
.win-title { font-size: 11px; font-weight: 500; color: var(--text-dim); }
.win-title b { color: var(--accent); font-weight: 600; }
.win-body { flex: 1; display: flex; overflow: hidden; background: var(--win-bg); }

/* App Window Colors / Tints */
#chat-window { border-color: #382e4a !important; background: #211d29 !important; }
#chat-window .win-titlebar { background: #18151e !important; border-bottom-color: #382e4a !important; }
#chat-window .win-body, #chat-history { background: #211d29 !important; }

#ad-window { border-color: #2b3b4f !important; background: #1c242e !important; }
#ad-window .win-titlebar { background: #151a22 !important; border-bottom-color: #2b3b4f !important; }
#ad-window .win-body { background: #1c242e !important; }

#training-window { border-color: #293f3a !important; background: #1b2624 !important; }
#training-window .win-titlebar { background: #131d1b !important; border-bottom-color: #293f3a !important; }
#training-window .win-body { background: #1b2624 !important; }

#remote-window { border-color: #402b2b !important; background: #261d1d !important; }
#remote-window .win-titlebar { background: #1c1515 !important; border-bottom-color: #402b2b !important; }
#remote-window .win-body { background: #261d1d !important; }

/* ==========================================
   4. MEGACORP HELPDESK (Main App)
   ========================================== */
#app-window { position: absolute; top: 30px; left: 100px; width: 1000px; height: 650px; min-width: 600px; min-height: 400px; display: flex; flex-direction: column; border: 1px solid var(--win-border); border-radius: 10px; overflow: hidden; box-shadow: 0 12px 48px rgba(0,0,0,0.4); z-index: 10; background: var(--win-bg); }

/* Top Navigation Tabs */
.win-tabs { display: flex; align-items: center; background: var(--win-header); border-bottom: 1px solid var(--win-border); padding: 0 12px; gap: 2px; height: 32px; min-height: 32px; }
.win-tab { padding: 5px 14px; font-size: 10px; font-weight: 500; color: var(--text-faint); cursor: pointer; border-radius: 5px 5px 0 0; transition: all 0.15s; position: relative; }
.win-tab:hover { color: var(--text-dim); background: rgba(255, 255, 255, 0.03); }
.win-tab.active { color: var(--accent); background: var(--win-bg); }
.win-tab.active::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; }

/* Top Stats */
.win-stats { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.ws-item { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--text-faint); font-family: 'JetBrains Mono', monospace; }
.ws-item .ws-val { font-weight: 600; }
.ws-item.good .ws-val { color: var(--green); } .ws-item.warn .ws-val { color: var(--yellow); } .ws-item.bad .ws-val { color: var(--red); }

/* Sidebar (Queues) */
#sidebar { width: 180px; min-width: 180px; background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-border); display: flex; flex-direction: column; overflow-y: auto; }
.sb-section-label { font-family: 'JetBrains Mono', monospace; font-size: 8px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-faint); padding: 12px 12px 4px; }
.sb-item { display: flex; align-items: center; gap: 7px; padding: 6px 12px; font-size: 11px; color: var(--text-dim); cursor: pointer; transition: all 0.12s; border-left: 2px solid transparent; }
.sb-item:hover { background: var(--sidebar-hover); color: var(--text); }
.sb-item.active { background: var(--sidebar-active); color: var(--accent); border-left-color: var(--accent); }
.sb-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.sb-count { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 600; background: var(--row-border); padding: 1px 5px; border-radius: 8px; color: var(--text-faint); }
.sb-count.hot { background: var(--red-dim); color: var(--red); }

/* Shift Progress */
.sb-shift-box { margin-top: auto; padding: 10px 12px; border-top: 1px solid var(--sidebar-border); }
.sb-shift-label { font-size: 8px; color: var(--text-faint); font-family: 'JetBrains Mono', monospace; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.sb-shift-bar { height: 5px; background: var(--input-bg); border-radius: 3px; overflow: hidden; }
.sb-shift-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s; }
.sb-shift-text { font-size: 9px; color: var(--text-faint); margin-top: 3px; font-family: 'JetBrains Mono', monospace; }

/* Main Content Area */
#main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; }
#tab-tickets { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
#tab-kb { display: none; flex: 1; overflow-y: auto; padding: 16px; }
#tab-tickets.hidden { display: none; }
#tab-kb.visible { display: block; }

/* Ticket List */
.list-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid var(--row-border); background: var(--win-bg); }
.list-header-left { display: flex; align-items: center; gap: 10px; }
.lh-title { font-size: 12px; font-weight: 600; }
.lh-count { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--text-faint); background: var(--input-bg); padding: 2px 7px; border-radius: 8px; }
.lh-sort { font-size: 9px; color: var(--text-faint); font-family: 'JetBrains Mono', monospace; padding: 3px 8px; border-radius: 4px; background: var(--input-bg); border: 1px solid var(--row-border); cursor: pointer; }
#ticket-list-area { flex: 1; overflow-y: auto; }
#ticket-list-area::-webkit-scrollbar, .dp-thread::-webkit-scrollbar { width: 4px; }
#ticket-list-area::-webkit-scrollbar-thumb, .dp-thread::-webkit-scrollbar-thumb { background: var(--win-border); border-radius: 2px; }

/* Ticket Rows */
.t-row { display: grid; grid-template-columns: 34px 1fr 80px 70px 70px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--row-border); cursor: pointer; transition: background 0.12s; gap: 6px; }
.t-row:hover { background: var(--row-hover); }
.t-row.active { background: var(--row-active); border-left: 2px solid var(--accent); }
.t-row.resolved { opacity: 0.4; }
.t-avatar { width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: #fff; flex-shrink: 0; }
.t-main { min-width: 0; }
.t-subject { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 1px; }
.t-meta { font-size: 9px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Ticket Meta Statuses */
.t-priority { font-family: 'JetBrains Mono', monospace; font-size: 8px; font-weight: 600; padding: 2px 6px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.4px; text-align: center; width: fit-content; justify-self: center; }
.p-low { background: var(--green-dim); color: var(--green); } .p-med { background: var(--yellow-dim); color: var(--yellow); } .p-high { background: var(--orange-dim); color: var(--orange); }
.p-critical { background: var(--red-dim); color: var(--red); animation: critP 2s infinite; }
@keyframes critP { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

.t-status { font-size: 9px; color: var(--text-faint); font-family: 'JetBrains Mono', monospace; text-align: right; }
.t-status.s-new { color: var(--cyan); } .t-status.s-open { color: var(--text); } .t-status.s-in-progress { color: var(--yellow); }
.t-status.s-updated { color: var(--orange); font-weight: bold; animation: pulseStatus 2s infinite; }
.t-status.s-resolved { color: var(--green); }

.t-meta-age { transition: color 0.3s; font-family: 'JetBrains Mono', monospace; }
.t-meta-age.age-warn { color: var(--yellow); font-weight: bold; }
.t-meta-age.age-breach { color: var(--red); font-weight: bold; animation: pulseStatus 1s infinite; }
@keyframes pulseStatus { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Ticket Detail Panel (Chat Thread) */
#detail-panel { display: none; position: absolute; inset: 0; background: var(--detail-bg); flex-direction: column; z-index: 5; }
#detail-panel.active { display: flex; }
.dp-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--row-border); background: var(--win-bg); }
.dp-back { background: var(--input-bg); border: 1px solid var(--row-border); color: var(--text-dim); padding: 4px 9px; border-radius: 4px; font-size: 10px; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.12s; }
.dp-back:hover { background: var(--row-hover); color: var(--text); }
.dp-title { font-size: 12px; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-thread { flex: 1; overflow-y: auto; padding: 16px; }

.msg { display: flex; gap: 10px; margin-bottom: 16px; max-width: 85%; }
.msg.from-user { margin-right: auto; } .msg.from-you { margin-left: auto; flex-direction: row-reverse; }
.msg-avatar { width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; color: #fff; flex-shrink: 0; margin-top: 2px; }
.msg-body { min-width: 0; }
.msg-name { font-size: 9px; font-weight: 600; font-family: 'JetBrains Mono', monospace; margin-bottom: 3px; letter-spacing: 0.3px; }
.msg.from-user .msg-name { color: var(--orange); } .msg.from-you .msg-name { color: var(--accent); text-align: right; }
.msg-bubble { padding: 10px 14px; border-radius: 10px; font-size: 12.5px; line-height: 1.55; }
.msg.from-user .msg-bubble { background: var(--row-bg); border: 1px solid var(--row-border); border-bottom-left-radius: 3px; }
.msg.from-you .msg-bubble { background: var(--accent-dim); border: 1px solid rgba(74, 158, 255, 0.2); border-bottom-right-radius: 3px; }
/* Typing Indicator Animation */
.typing-indicator { display: flex; gap: 4px; padding: 4px 8px; align-items: center; height: 16px; }
.typing-dot { width: 6px; height: 6px; background: var(--text-dim); border-radius: 50%; animation: typingBounce 1.4s infinite ease-in-out both; }
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typingBounce { 
    0%, 80%, 100% { transform: scale(0); opacity: 0.5; } 
    40% { transform: scale(1); opacity: 1; } 
}
.dp-responses { padding: 12px 16px; border-top: 1px solid var(--row-border); background: var(--win-bg); }
.dp-responses h4 { font-family: 'JetBrains Mono', monospace; font-size: 8px; color: var(--text-faint); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 6px; }
.resp-grid { display: flex; flex-direction: column; gap: 4px; }
.resp-btn { display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; background: var(--input-bg); border: 1px solid var(--row-border); border-radius: 6px; cursor: pointer; transition: all 0.12s; text-align: left; color: var(--text); font-size: 11.5px; line-height: 1.45; font-family: 'DM Sans', sans-serif; }
.resp-btn:hover { border-color: var(--accent); background: var(--row-hover); }
.resp-tag { flex-shrink: 0; font-family: 'JetBrains Mono', monospace; font-size: 8px; font-weight: 600; padding: 2px 6px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 1px; }
.rt-helpful { background: var(--green-dim); color: var(--green); }
.rt-corporate { background: var(--yellow-dim); color: var(--yellow); }
.rt-unhinged { background: var(--purple-dim); color: var(--purple); }
.rt-remote { background: var(--cyan-dim); color: var(--cyan); }

/* Knowledge Base View */
.kb-header { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.kb-card { background: var(--input-bg); border: 1px solid var(--row-border); border-radius: 8px; padding: 14px 16px; margin-bottom: 8px; cursor: pointer; transition: all 0.12s; }
.kb-card:hover { border-color: var(--accent); background: var(--row-hover); }
.kb-card h4 { font-size: 12px; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.kb-card p { font-size: 11px; color: var(--text-faint); line-height: 1.5; }
.kb-tag { font-family: 'JetBrains Mono', monospace; font-size: 8px; font-weight: 600; padding: 2px 6px; border-radius: 3px; }
.kb-expand { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--row-border); font-size: 11px; line-height: 1.6; color: var(--text-dim); }
.kb-card.open .kb-expand { display: block; }

/* ==========================================
   5. OTHER LOCAL APPS (Chat, Training, AD)
   ========================================== */

/* MegaChat */
.chat-msg { margin-bottom: 14px; animation: slideUp 0.2s ease-out; }
.chat-header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.chat-author { font-size: 11px; font-weight: 600; color: var(--cyan); font-family: 'JetBrains Mono', monospace; }
.chat-time { font-size: 9px; color: var(--text-faint); }
.chat-text { font-size: 12px; color: var(--text); line-height: 1.4; background: var(--row-bg); padding: 10px 12px; border-radius: 0 8px 8px 8px; border: 1px solid var(--row-border); width: fit-content; max-width: 90%; }
.chat-msg.mention .chat-text { border-color: var(--orange); background: var(--orange-dim); }

/* Training Portal */
.training-card { background: var(--input-bg); border: 1px solid var(--row-border); border-radius: 8px; padding: 16px; margin-bottom: 12px; cursor: pointer; transition: all 0.15s; }
.training-card:hover { border-color: var(--accent); background: var(--row-hover); }
.training-card h4 { color: var(--accent); font-size: 14px; margin-bottom: 6px; font-family: 'JetBrains Mono', monospace; }
.training-card p { font-size: 12px; color: var(--text-dim); line-height: 1.4; }
.training-card.completed { border-color: var(--green); opacity: 0.6; pointer-events: none; }
.training-card.completed h4 { color: var(--green); }
.quiz-question { font-size: 14px; font-weight: 600; margin-bottom: 20px; line-height: 1.5; color: var(--text); }
.quiz-option { display: block; width: 100%; text-align: left; background: var(--row-bg); border: 1px solid var(--row-border); padding: 14px 16px; border-radius: 8px; margin-bottom: 10px; color: var(--text); cursor: pointer; font-size: 13px; transition: background 0.1s, border-color 0.1s; }
.quiz-option:hover { background: var(--row-hover); border-color: var(--accent); }
.quiz-option.correct { background: var(--green-dim); border-color: var(--green); color: var(--green); }
.quiz-option.wrong { background: var(--red-dim); border-color: var(--red); color: var(--red); }

/* AD Manager & SysAdmin Apps */
.sys-input { background: var(--input-bg); border: 1px solid var(--row-border); color: var(--text); padding: 10px 12px; border-radius: 6px; font-family: 'DM Sans', sans-serif; font-size: 12px; outline: none; transition: border-color 0.2s; }
.sys-input:focus { border-color: var(--accent); }
.sys-btn { background: var(--accent); color: #fff; border: none; padding: 12px; border-radius: 6px; font-weight: bold; cursor: pointer; transition: background 0.2s; font-family: 'DM Sans', sans-serif; margin-top: 10px; font-size: 12px; }
.sys-btn:hover { background: var(--accent-hover); }

/* Sticky Note Checklist */
#sticky-note { position: absolute; top: 80px; right: 50px; width: 220px; min-height: 200px; background: #fef08a; color: #374151; font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif; padding: 15px; box-shadow: 2px 8px 20px rgba(0,0,0,0.4); z-index: 100; transform: rotate(2deg); }
.task-item { display: flex; align-items: center; gap: 8px; transition: opacity 0.3s; }
.task-check { width: 16px; height: 16px; border: 2px solid #78716c; border-radius: 4px; display: inline-block; flex-shrink: 0; transition: all 0.2s; }
.task-item.done .task-check { background: var(--green); border-color: var(--green); position: relative; }
.task-item.done .task-check::after { content: '✓'; color: white; font-size: 12px; position: absolute; top: -2px; left: 2px; font-weight: bold; }
.task-item.done span { text-decoration: line-through; color: #a8a29e; }
#sticky-complete-btn { margin-top: 20px; width: 100%; padding: 8px; background: var(--green); color: white; border: 1px solid var(--green-hover); border-radius: 4px; font-weight: bold; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: transform 0.1s; }
#sticky-complete-btn:hover { transform: scale(1.02); background: var(--green-hover); }

/* ==========================================
   6. REMOTE DESKTOP & MINIGAMES
   ========================================== */
#remote-window { position: absolute; top: 60px; left: 250px; width: 800px; height: 550px; min-width: 500px; min-height: 400px; display: flex; flex-direction: column; border: 1px solid var(--win-border); border-radius: 10px; overflow: hidden; box-shadow: 0 16px 50px rgba(0,0,0,0.6); z-index: 150; background: var(--win-bg); }
#remote-window .win-titlebar { cursor: grab; }
#remote-window .win-titlebar:active { cursor: grabbing; }
#remote-window.minimized { opacity: 0; pointer-events: none; transform: translateY(200px) scale(0.5); }

/* Remote Actions & Hints */
.end-session-btn { background: var(--red); color: #fff; border: none; padding: 4px 10px; border-radius: 4px; font-size: 10px; font-family: 'JetBrains Mono', monospace; font-weight: 600; cursor: pointer; transition: background 0.1s; }
.end-session-btn:hover { background: var(--red-hover); }
.kb-hint-btn { background: var(--input-bg); color: var(--cyan); border: 1px solid var(--win-border); padding: 4px 10px; border-radius: 4px; font-size: 10px; font-family: 'JetBrains Mono', monospace; font-weight: 600; cursor: pointer; margin-right: 8px; transition: all 0.15s; }
.kb-hint-btn:hover { background: var(--row-hover); border-color: var(--cyan); }
#remote-notes-dropdown { position: absolute; top: 44px; right: 12px; width: 260px; background: var(--sidebar-bg); border: 1px solid var(--win-border); border-radius: 6px; padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.6); z-index: 200; transition: opacity 0.2s, transform 0.2s; transform-origin: top right; }
#remote-notes-dropdown.hidden { opacity: 0; transform: scale(0.95); pointer-events: none; }

/* Minigame End Screens */
.mg-end-screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,0.85); z-index: 100; text-align: center; }
.mg-end-screen h2 { font-size: 2em; margin-bottom: 10px; font-family: 'JetBrains Mono', monospace; }
.mg-end-screen p { color: #fff; font-size: 14px; }
.mg-stars { font-size: 30px; letter-spacing: 5px; margin-bottom: 15px; }

/* 6A. Popup Minigame */
.mg-bar { display: flex; gap: 20px; justify-content: center; margin-bottom: 10px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-dim); }
.mg-bar .v { font-weight: 600; color: var(--cyan); }

/* Make the arena invisible and perfectly span the safe area */
#popup-arena { 
    position: absolute; 
    top: 50px; 
    bottom: 40px; 
    left: 0; 
    right: 0; 
    z-index: 5; 
    overflow: hidden; 
}
.popup-win { position: absolute; background: #eaeaea; border: 2px solid #aaa; border-radius: 4px; min-width: 120px; box-shadow: 3px 4px 10px rgba(0,0,0,0.5); animation: popIn 0.18s ease-out; z-index: 1; }
@keyframes popIn { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pw-bar { background: linear-gradient(180deg, #d8d8d8, #bbb); padding: 2px 6px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #999; border-radius: 2px 2px 0 0; }
.pw-bar span { font-size: 8px; font-weight: 600; color: #333; max-width: 85px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-x { width: 13px; height: 13px; background: var(--red); border: none; border-radius: 50%; color: #fff; font-size: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 700; transition: transform 0.1s; }
.pw-x:hover { transform: scale(1.2); background: var(--red-hover); }
.pw-body { padding: 6px; font-size: 9px; color: #444; line-height: 1.3; }
.pw-body .trick-btn { display: inline-block; margin-top: 3px; padding: 2px 8px; background: var(--green); color: #fff; border: 1px solid var(--green-hover); border-radius: 3px; font-size: 8px; cursor: pointer; }

/* 6B. Settings / Fake Desktop Minigame */
.fake-desktop { width: 100%; min-height: 100%; position: relative; overflow: hidden; transition: transform 0.4s; }
.fd-wallpaper { position: absolute; inset: 0; background: linear-gradient(135deg, #2d5aa0, #1a3d6d, #0d2847); }
.fd-wallpaper.admin-bg { background: repeating-linear-gradient(-45deg, #3a0e0e, #3a0e0e 20px, #240505 20px, #240505 40px) !important; }
.fd-icons { position: absolute; top: 20px; left: 20px; display: flex; flex-direction: column; gap: 8px; }
.fd-icon { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 10px; border-radius: 5px; width: 64px; text-align: center; }
.fd-icon-img { width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: rgba(255, 255, 255, 0.1); }
.fd-icon span { font-size: 9px; color: #ccc; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.fd-scroll-wrapper { flex: 1; overflow: auto; position: relative; background: #000; }
.fd-taskbar { position: absolute; bottom: 0; left: 0; width: 100%; height: 40px; background: #111; border-top: 1px solid #333; display: flex; align-items: center; padding: 0 10px; z-index: 25; }
.fd-tb-start { display: flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 5px; cursor: pointer; transition: background 0.12s; }
.fd-tb-start:hover { background: rgba(255, 255, 255, 0.08); }
.fd-tb-start-icon { width: 20px; height: 20px; border-radius: 4px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; }
.fd-tb-start span { font-size: 10px; color: #aaa; }
.fd-tb-right { margin-left: auto; font-size: 10px; color: #666; font-family: 'JetBrains Mono', monospace; }
.fd-timer { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.7); padding: 6px 16px; border-radius: 20px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--cyan); z-index: 10; display: flex; align-items: center; gap: 8px; }

/* Fake Desktop Start Menu & Login */
#fd-login-screen { transition: opacity 0.2s; backdrop-filter: blur(4px); }
#fd-login-screen.hidden { opacity: 0; pointer-events: none; display: flex !important; }
.fd-user-card { display: flex; flex-direction: column; align-items: center; gap: 12px; cursor: pointer; padding: 20px; border-radius: 12px; transition: background 0.15s; border: 1px solid transparent; }
.fd-user-card:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); }
.fd-user-avatar { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; font-weight: bold; box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
.fd-user-name { color: #fff; font-size: 13px; font-family: 'DM Sans', sans-serif; font-weight: 500; }
#fd-start-menu { position: absolute; bottom: 40px; left: 0; width: 180px; background: #1e1e1e; border: 1px solid #444; border-radius: 0 8px 8px 0; display: flex; flex-direction: column; z-index: 20; box-shadow: 2px -2px 15px rgba(0,0,0,0.5); }
#fd-start-menu.hidden { display: none; }
.fd-sm-header { padding: 12px; border-bottom: 1px solid #333; background: #161616; border-radius: 0 8px 0 0; }
.fd-sm-item { padding: 8px 12px; font-size: 11px; color: #aaa; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.fd-sm-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.fd-sm-item.danger:hover { background: var(--red-dim); color: var(--red); }
.fd-sm-divider { height: 1px; background: #333; margin: 4px 0; }

/* Fake Desktop Settings Panel */
#fd-settings { display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 520px; max-width: 90%; background: #1e1e1e; border: 1px solid #444; border-radius: 10px; box-shadow: 0 8px 40px rgba(0,0,0,0.6); z-index: 5; overflow: hidden; }
#fd-settings.open { display: block; }
.fds-titlebar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #161616; border-bottom: 1px solid #333; }
.fds-titlebar span { font-size: 11px; color: #aaa; }
.fds-titlebar button { background: var(--red); border: none; width: 12px; height: 12px; border-radius: 50%; cursor: pointer; }
.fds-body { display: flex; min-height: 280px; }
.fds-nav { width: 140px; background: #181818; border-right: 1px solid #333; padding: 8px 0; }
.fds-nav-item { padding: 7px 14px; font-size: 11px; color: #888; cursor: pointer; transition: all 0.1s; border-left: 2px solid transparent; }
.fds-nav-item:hover { color: #ccc; background: rgba(255, 255, 255, 0.03); }
.fds-nav-item.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-dim); }
.fds-panel { flex: 1; padding: 16px; overflow-y: auto; }
.fds-panel h3 { font-size: 13px; color: #eee; margin-bottom: 12px; }
.fds-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #2a2a2a; }
.fds-row:last-child { border-bottom: none; }
.fds-row label { font-size: 11px; color: #aaa; }
.fds-row select, .fds-row input[type=range] { background: #111; color: #eee; border: 1px solid #444; border-radius: 4px; padding: 4px 8px; font-size: 11px; font-family: 'JetBrains Mono', monospace; cursor: pointer; }
.fds-row select { min-width: 130px; }
.fds-toggle { width: 36px; height: 20px; background: #444; border-radius: 10px; position: relative; cursor: pointer; transition: background 0.2s; }
.fds-toggle.on { background: var(--accent); }
.fds-toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: left 0.2s; }
.fds-toggle.on::after { left: 18px; }

/* Custom Dropdowns (Fix for CSS Transform select bugs) */
.custom-select { position: relative; min-width: 140px; background: #111; color: #eee; border: 1px solid #444; border-radius: 4px; font-size: 11px; font-family: 'JetBrains Mono', monospace; cursor: pointer; user-select: none; }
.custom-select.locked { opacity: 0.5; cursor: not-allowed; }
.cs-selected { padding: 5px 8px; display: flex; justify-content: space-between; }
.cs-options { display: none; position: absolute; top: 100%; left: -1px; right: -1px; background: #111; border: 1px solid #444; border-radius: 0 0 4px 4px; z-index: 100; max-height: 120px; overflow-y: auto; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.custom-select.open .cs-options { display: block; }
.cs-opt { padding: 6px 8px; transition: background 0.1s; border-bottom: 1px solid #222; }
.cs-opt:last-child { border-bottom: none; }
.cs-opt:hover { background: var(--accent); color: #fff; }

/* 6C. VLAN Switch Minigame */
.switch-chassis { background: linear-gradient(180deg, #333, #1a1a1a); padding: 15px 20px; border-radius: 6px; border: 2px solid #444; border-bottom: 4px solid #111; display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; box-shadow: inset 0 5px 15px rgba(0,0,0,0.5); }
.switch-port { width: 34px; height: 34px; background: #0a0a0a; border: 2px solid #222; border-top-color: #000; border-radius: 4px; cursor: pointer; position: relative; transition: all 0.1s; }
.switch-port:hover { border-color: var(--text-faint); }
.switch-port.selected { border-color: var(--cyan); box-shadow: 0 0 10px rgba(34,211,238,0.5); }
.switch-port::before { content: ''; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); width: 8px; height: 4px; border-radius: 2px; background: #222; }
.switch-port.up::before { background: var(--green); box-shadow: 0 0 6px var(--green); }
.switch-port.down::before { background: var(--red); opacity: 0.5; }
.switch-port::after { content: attr(data-port); position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%); font-size: 8px; color: #666; font-family: 'JetBrains Mono', monospace; }

.port-details-panel { background: var(--input-bg); border: 1px solid var(--row-border); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.port-detail-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.port-detail-row .lbl { color: var(--text-faint); font-family: 'JetBrains Mono', monospace; font-size: 10px; text-transform: uppercase; }
.port-detail-row .val { color: var(--text); font-weight: 500; }
.port-vlan-select { background: var(--win-bg); color: var(--text); border: 1px solid var(--win-border); padding: 6px 10px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 11px; outline: none; cursor: pointer; }

.vlan-panel { background: var(--win-bg); border: 1px solid var(--win-border); border-radius: 10px; width: min(680px, 92vw); overflow: hidden; box-shadow: 0 12px 48px rgba(0,0,0,0.4); }
.vlan-header { background: var(--win-header); padding: 12px 18px; border-bottom: 1px solid var(--win-border); display: flex; align-items: center; justify-content: space-between; }
.vlan-header h3 { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600; color: var(--cyan); }
.vlan-timer { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-faint); } .vlan-timer .v { color: var(--cyan); font-weight: 600; }
.vlan-body { padding: 16px; }
.vlan-scenario { background: var(--input-bg); border: 1px solid var(--row-border); border-radius: 7px; padding: 12px 14px; margin-bottom: 14px; font-size: 12px; line-height: 1.6; }
.vlan-scenario strong { color: var(--orange); }
.vlan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vlan-device { background: var(--input-bg); border: 1px solid var(--row-border); border-radius: 7px; padding: 12px 14px; }
.vlan-device h4 { font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.vd-tag { font-size: 7px; padding: 2px 5px; border-radius: 3px; font-weight: 600; }
.vlan-info-row { display: flex; justify-content: space-between; font-size: 11px; padding: 3px 0; border-bottom: 1px solid var(--row-border); }
.vlan-info-row:last-child { border-bottom: none; }
.vlan-info-row .lbl { color: var(--text-faint); }
.vlan-info-row .val { color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 10px; }
.port-config { margin-top: 6px; }
.port-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--row-border); }
.port-row:last-child { border-bottom: none; }
.port-label { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--text-dim); width: 48px; flex-shrink: 0; }
.vlan-checks { display: flex; gap: 3px; flex-wrap: wrap; }
.vlan-check { font-family: 'JetBrains Mono', monospace; font-size: 8px; padding: 2px 6px; border-radius: 3px; cursor: pointer; border: 1px solid var(--row-border); background: var(--win-bg); color: var(--text-faint); transition: all 0.12s; font-weight: 500; }
.vlan-check:hover { border-color: var(--text-faint); }
.vlan-check.active { background: var(--cyan-dim); border-color: var(--cyan); color: var(--cyan); }
.vlan-actions { padding: 12px 18px; border-top: 1px solid var(--win-border); display: flex; justify-content: flex-end; gap: 8px; }
.vlan-actions button { padding: 7px 18px; border-radius: 5px; font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600; cursor: pointer; transition: all 0.12s; }
.vlan-submit { background: var(--cyan); color: var(--os-bg); border: none; }
.vlan-submit:hover { background: #3de0f5; }

/* 6D. Phishing Minigame */
.phish-email-box { background: #fff; border: 1px solid #d1d5db; border-radius: 6px; padding: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.phish-header { border-bottom: 1px solid #e5e7eb; padding-bottom: 15px; margin-bottom: 15px; font-size: 13px; line-height: 1.6; }
.phish-header strong { color: #374151; display: inline-block; width: 60px; }
.phish-body { font-size: 13px; line-height: 1.5; color: #1f2937; }
.phish-btn { background: var(--red); color: #fff; border: none; padding: 8px 16px; border-radius: 4px; font-weight: 600; cursor: pointer; transition: background 0.15s; font-family: 'DM Sans', sans-serif; }
.phish-btn:hover { background: var(--red-hover); }
.p-flag { cursor: pointer; transition: all 0.2s; border-radius: 3px; padding: 0 2px; }
.p-flag:hover { background: var(--red-dim); }
.p-flag.found { background: rgba(239, 85, 85, 0.2); border: 1px dashed var(--red); cursor: default; }

/* 6E. Speed Test Minigame */
.st-btn { padding: 12px 40px; border-radius: 30px; border: none; background: var(--cyan); color: #000; font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: bold; cursor: pointer; transition: all 0.2s; box-shadow: 0 0 15px rgba(34,211,238,0.3); }
.st-btn:hover:not(:disabled) { transform: scale(1.05); background: #fff; box-shadow: 0 0 20px rgba(255,255,255,0.6); }
.st-btn:disabled { background: #444; color: #777; cursor: not-allowed; box-shadow: none; transform: scale(0.98); }
.st-proc-row { display: flex; justify-content: space-between; align-items: center; padding: 10px; border-bottom: 1px solid #333; font-size: 11px; font-family: 'JetBrains Mono', monospace; transition: background 0.1s; }
.st-proc-row:hover { background: rgba(255, 255, 255, 0.03); }
.st-proc-row:last-child { border-bottom: none; }
.st-proc-name { color: var(--text); width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-proc-bw { color: var(--orange); font-weight: 600; margin-right: auto; padding-left: 10px; }
.st-proc-kill { background: var(--red); color: #fff; border: none; padding: 4px 8px; border-radius: 4px; font-size: 9px; cursor: pointer; font-weight: bold; text-transform: uppercase; }
.st-proc-kill:hover { background: var(--red-hover); }

/* 6F. Terminal Defusal Minigame */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.term-cursor { display: inline-block; width: 8px; background: #0f0; margin-left: 2px; }
.term-error { color: var(--red) !important; background: rgba(255,0,0,0.2); }

/* Global Infection Event */
body.infected { animation: screenJitter 0.5s infinite; filter: sepia(0.8) hue-rotate(-50deg) saturate(200%); font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif !important; }
body.infected #app-window { transform: rotate(-1deg); box-shadow: 0 0 50px rgba(255,0,0,0.5); border-color: var(--red); }
body.infected .win-title { color: var(--red); text-transform: uppercase; letter-spacing: 3px; content: "HELP DESK COMPROMISED"; }
body.infected .sb-item { transform: skewX(2deg); margin-bottom: 2px; background: rgba(255,0,0,0.1); }
body.infected .t-row { border-color: var(--red); }
body.infected .t-avatar { animation: spinAvatar 3s linear infinite; }
@keyframes screenJitter { 0% { transform: translate(1px, 1px) } 25% { transform: translate(-1px, -2px) } 50% { transform: translate(-2px, 1px) } 75% { transform: translate(2px, -1px) } 100% { transform: translate(1px, 2px) } }
@keyframes spinAvatar { 100% { transform: rotate(360deg); } }

/* 6G. Literal Bugs Minigame */
.literal-bug { position: absolute; font-size: 24px; transition: all 0.5s ease-in-out; pointer-events: none; z-index: 10; }
.giant-spider { position: absolute; font-size: 180px; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 50; text-shadow: 0 10px 30px rgba(0,0,0,0.8); pointer-events: none; }
.giant-spider.active { transform: translate(-50%, -50%) scale(1); }
.spider-web { position: absolute; font-size: 800px; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: 0; transition: opacity 0.5s ease-out; z-index: 40; color: rgba(255, 255, 255, 0.4); pointer-events: none; }
.spider-web.active { opacity: 1; }

/* ==========================================
   7. FULLSCREEN OVERLAYS (Boot, Event, End)
   ========================================== */

/* Start / Boot Screen */
#start-screen { position: fixed; inset: 0; z-index: 9999; background: var(--os-bg); display: flex; justify-content: center; align-items: center; }
.boot-box { max-width: 460px; width: 90%; text-align: center; }
.boot-mega { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--text-faint); letter-spacing: 3px; text-transform: uppercase; margin-bottom: 6px; }
.boot-title { font-family: 'IBM Plex Mono', monospace; font-size: 2em; font-weight: 600; margin-bottom: 4px; }
.boot-title span { color: var(--accent); }
.boot-sub { color: var(--text-dim); font-size: 0.9em; margin-bottom: 24px; }
.orient-card { background: var(--win-bg); border: 1px solid var(--win-border); border-radius: 10px; padding: 20px; text-align: left; margin-bottom: 18px; }
.orient-card h3 { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--accent); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--win-border); }
.oi { display: flex; gap: 10px; margin-bottom: 10px; font-size: 12px; line-height: 1.5; }
.oi-icon { width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; border: 1px solid var(--win-border); }
.oi strong { color: var(--text); }
.oi p { color: var(--text-dim); margin: 0; }
#clock-in-btn { width: 100%; padding: 13px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; letter-spacing: 1px; cursor: pointer; transition: all 0.15s; text-transform: uppercase; }
#clock-in-btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(74, 158, 255, 0.25); }

/* Random Events Overlay */
#event-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.5); display: none; justify-content: center; align-items: center; backdrop-filter: blur(4px); }
#event-overlay.active { display: flex; }
.ev-card { background: var(--win-bg); border: 1px solid var(--win-border); border-radius: 10px; max-width: 380px; width: 90%; overflow: hidden; animation: popIn 0.2s ease-out; }
.ev-head { padding: 12px 16px; border-bottom: 1px solid var(--row-border); display: flex; align-items: center; gap: 8px; }
.ev-icon { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.ev-head h3 { font-size: 12px; font-weight: 600; }
.ev-source { font-size: 9px; color: var(--text-faint); font-family: 'JetBrains Mono', monospace; }
.ev-body { padding: 14px 16px; font-size: 12px; line-height: 1.6; color: var(--text-dim); }
.ev-btns { padding: 8px 16px 12px; display: flex; gap: 6px; }
.ev-btns button { flex: 1; padding: 7px; border: 1px solid var(--row-border); border-radius: 5px; background: var(--input-bg); color: var(--text); font-size: 11px; font-weight: 500; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.12s; }
.ev-btns button:hover { border-color: var(--accent); background: var(--row-hover); }

/* Game Over / Shift Complete Overlay */
#go-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.8); display: none; justify-content: center; align-items: center; backdrop-filter: blur(8px); }
#go-overlay.active { display: flex; }
.go-card { background: var(--win-bg); border: 1px solid var(--win-border); border-radius: 12px; max-width: 420px; width: 90%; padding: 32px; text-align: center; }
.go-card h2 { font-family: 'IBM Plex Mono', monospace; font-size: 1.4em; margin-bottom: 6px; }
.go-card .go-sub { color: var(--text-dim); font-size: 12px; margin-bottom: 20px; line-height: 1.6; }
.go-stats { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
.go-s { background: var(--input-bg); border: 1px solid var(--row-border); border-radius: 7px; padding: 8px 14px; text-align: center; }
.go-s .go-n { font-family: 'JetBrains Mono', monospace; font-size: 1.2em; font-weight: 600; }
.go-s .go-l { font-size: 8px; color: var(--text-faint); margin-top: 2px; }
#go-btn { padding: 10px 28px; background: var(--accent); color: #fff; border: none; border-radius: 6px; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600; cursor: pointer; transition: background 0.15s; }
#go-btn:hover { background: var(--accent-hover); }

/* --- INTERACTIVE DESKTOP ICONS --- */
/* Notepad Window */
#notepad-window { border-color: #3a3520; }
#notepad-window .win-titlebar { background: #1c1a12; border-bottom-color: #3a3520; }

/* Explorer Window */
#explorer-window { border-color: #2b3040; }
#explorer-window .win-titlebar { background: #13161e; border-bottom-color: #2b3040; }
.explorer-item { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:6px; cursor:pointer; font-size:11px; color:var(--text-dim); transition:background .12s; }
.explorer-item:hover { background:rgba(255,255,255,0.04); color:var(--text); }
.explorer-item .ex-icon { font-size:16px; width:22px; text-align:center; }
.explorer-item .ex-size { margin-left:auto; font-size:9px; color:var(--text-faint); font-family:'JetBrains Mono',monospace; }

/* Lofi Player */
@keyframes spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
#lofi-widget.paused #lofi-disc { animation-play-state: paused; }
#lofi-widget.hidden { opacity: 0; pointer-events: none; transform: scale(0.95); }

/* ==========================================
   TRAY POPUP & WIDGETS
   ========================================== */

/* The actual hide/show animation logic */
#tray-popup { transition: opacity 0.2s, transform 0.2s; transform-origin: bottom right; }
#tray-popup.hidden { opacity: 0; pointer-events: none; transform: scale(0.95); }

/* Formatting for the injected Javascript HTML */
.tray-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 11px; 
    padding: 5px 0; 
    border-bottom: 1px solid var(--row-border); 
}
.tray-row:last-child { border-bottom: none; }

.tray-label { 
    color: var(--text-faint); 
    font-family: 'JetBrains Mono', monospace; 
    font-size: 9px; 
    text-transform: uppercase; 
}
.tray-val { 
    color: var(--text); 
    font-weight: 500; 
    font-family: 'JetBrains Mono', monospace; 
}

/* Progress bars for Volume and WiFi signal */
.tray-bar { 
    height: 4px; 
    background: var(--row-border); 
    border-radius: 2px; 
    margin-top: 8px; 
    margin-bottom: 8px; 
    overflow: hidden; 
}
.tray-bar-fill { 
    height: 100%; 
    border-radius: 2px; 
    transition: width 0.3s, background-color 0.3s; 
}

/* Lock Screen */
#lock-overlay { cursor:pointer; user-select:none; }

/* --- ALIEN TICKETS --- */
/* Fallbacks to Webdings or standard symbols if Wingdings isn't installed on the OS */
.alien-text { 
    font-family: "Wingdings", "Webdings", sans-serif !important; 
    letter-spacing: 2px; 
    font-size: 1.2em;
}

/* --- MEGAQUOTE APP --- */
#quote-window { border-color: #4a3e2a !important; background: #262218 !important; }
#quote-window .win-titlebar { background: #1c1810 !important; border-bottom-color: #4a3e2a !important; }
#quote-window .win-body { background: #1f1b13 !important; }

.quote-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--row-border); font-size: 12px; }
.quote-row:last-child { border-bottom: none; }
.quote-input { width: 60px; background: var(--input-bg); border: 1px solid var(--row-border); color: var(--text); padding: 4px; border-radius: 4px; text-align: center; font-family: 'JetBrains Mono', monospace; }
.quote-totals { background: rgba(0,0,0,0.3); padding: 15px; border-radius: 8px; border: 1px solid var(--row-border); margin-top: 15px; }
.quote-total-row { display: flex; justify-content: space-between; font-family: 'JetBrains Mono', monospace; font-size: 14px; margin-bottom: 5px; }

/* --- ALIEN DESKTOP ANIMATIONS --- */
@keyframes alienPulse {
    0% { filter: hue-rotate(0deg) saturate(200%) invert(0); transform: skewX(-2deg) scale(1); }
    100% { filter: hue-rotate(90deg) saturate(400%) invert(0.2); transform: skewX(2deg) scale(1.05); }
}
.alien-os-override {
    font-family: "Wingdings", "Webdings", sans-serif !important;
}
.alien-os-override * {
    font-family: "Wingdings", "Webdings", sans-serif !important;
}
@keyframes panicShake {
    0% { transform: translateX(0); border-color: var(--red); }
    25% { transform: translateX(-2px); }
    50% { transform: translateX(2px); background: var(--red-dim); }
    75% { transform: translateX(-2px); }
    100% { transform: translateX(0); border-color: var(--row-border); }
}

.ticket-row.sla-warning {
    animation: panicShake 0.5s infinite;
}