/* ProWer OS window manager - shared by pw-admin and pw-company; keep both copies identical. */
.wm-canvas { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform: translate(-50%, -50%); transform-origin: center;
    display: flex; flex-direction: column; overflow: hidden; }
.wm-desktop { position: relative; z-index: 0; flex: 1; min-height: 0; overflow: hidden; }
.wm-busy, .wm-busy * { cursor: grabbing !important; }
.wm-busy iframe, .wm-busy .wm-body { pointer-events: none; }

/* Icons */
.wm-icons { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.wm-icon-item { position: absolute; pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 104px; padding: 8px 4px;
    border-radius: 12px; border: 1px solid transparent; text-align: center; touch-action: none; transition: left .14s ease, top .14s ease; }
.wm-icon-item:hover { background: rgba(255, 255, 255, .07); }
.wm-icon-item.selected, .wm-icon-item:focus-visible { outline: none; background: rgba(var(--pw-gold-rgb, 245, 197, 24), .22); border-color: rgba(var(--pw-gold-rgb, 245, 197, 24), .5); }
.wm-icon-item.dragging { z-index: 2; opacity: .85; transition: none; background: rgba(var(--pw-gold-rgb, 245, 197, 24), .18); }
.wm-icon-item > span { font-size: 13px; line-height: 1.2; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); overflow-wrap: anywhere; }

/* Windows */
.wm-window { position: absolute; display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; background: var(--wm-window, var(--pw-bg-2, #0c0e14));
    border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 18px 60px rgba(0, 0, 0, .55); }
.wm-window.focused { box-shadow: 0 26px 90px rgba(0, 0, 0, .65), 0 0 0 1px rgba(var(--pw-gold-rgb, 245, 197, 24), .28); }
.wm-window.max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; border: 0; }
.wm-window.min { display: none; }
.wm-window.opening { animation: wm-in .2s ease; }
@keyframes wm-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.wm-bar { display: flex; align-items: center; gap: 10px; height: 40px; padding-left: 10px; flex: none; touch-action: none;
    background: var(--pw-panel, #11141c); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.wm-window:not(.focused) .wm-bar { background: var(--pw-bg-2, #0c0e14); }
.wm-window:not(.focused) .wm-title { opacity: .6; }
.wm-lead, .wm-tools { display: flex; align-items: center; gap: 4px; }
.wm-lead:empty, .wm-tools:empty { display: none; }
.wm-icon { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 8px; flex: none; font-size: 10px; font-weight: 900;
    color: var(--pw-bg-2, #0c0e14); background: var(--wm-accent, var(--pw-gold, #f5c518)); }
.wm-icon svg { width: 15px; height: 15px; }
.wm-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-buttons { display: flex; height: 100%; flex: none; }
.wm-btn { display: grid; place-items: center; width: 46px; height: 100%; color: rgba(241, 243, 247, .6); }
.wm-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wm-btn:hover { color: var(--pw-text, #eef0f5); background: rgba(255, 255, 255, .08); }
.wm-btn.close:hover { background: var(--pw-red, #ff4d5e); color: var(--pw-text, #eef0f5); }
.wm-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.wm-rs { position: absolute; z-index: 3; touch-action: none; }
.wm-rs-n, .wm-rs-s { left: 10px; right: 10px; height: 6px; cursor: ns-resize; }
.wm-rs-e, .wm-rs-w { top: 10px; bottom: 10px; width: 6px; cursor: ew-resize; }
.wm-rs-n { top: 0; } .wm-rs-s { bottom: 0; } .wm-rs-e { right: 0; } .wm-rs-w { left: 0; }
.wm-rs-ne, .wm-rs-nw, .wm-rs-se, .wm-rs-sw { width: 12px; height: 12px; }
.wm-rs-ne { top: 0; right: 0; cursor: nesw-resize; } .wm-rs-sw { bottom: 0; left: 0; cursor: nesw-resize; }
.wm-rs-nw { top: 0; left: 0; cursor: nwse-resize; } .wm-rs-se { bottom: 0; right: 0; cursor: nwse-resize; }
.wm-window.max .wm-rs { display: none; }

/* Taskbar buttons */
.wm-tasks { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1; overflow: hidden; }
.wm-task { position: relative; display: flex; align-items: center; gap: 8px; height: 40px; min-width: 0; max-width: 240px; flex: 0 1 auto; padding: 0 14px;
    border-radius: 8px; font-weight: 600; color: rgba(241, 243, 247, .62); }
.wm-task-icon { display: grid; place-items: center; width: 22px; height: 22px; flex: none; }
.wm-task-icon svg { width: 18px; height: 18px; }
.wm-task-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-task:hover { background: rgba(255, 255, 255, .07); color: var(--pw-text, #eef0f5); }
.wm-task::after { content: ''; position: absolute; left: 36%; right: 36%; bottom: 2px; height: 3px; border-radius: 8px; background: rgba(255, 255, 255, .35); }
.wm-task.active { color: var(--pw-text, #eef0f5); background: rgba(255, 255, 255, .1); }
.wm-task.active::after { left: 26%; right: 26%; background: var(--wm-accent, var(--pw-gold, #f5c518)); }
.wm-task.min { opacity: .8; }

/* Context menu */
.wm-menu { position: absolute; z-index: 2147483000; min-width: 230px; padding: 6px; border-radius: 12px; background: rgba(16, 19, 27, .97);
    border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 14px 40px rgba(0, 0, 0, .55); }
.wm-menu-item { display: block; width: 100%; padding: 9px 12px; border-radius: 8px; text-align: left; }
.wm-menu-item:hover { background: rgba(255, 255, 255, .08); }

/* Quick launch */
.wm-hint { position: absolute; right: 18px; bottom: 12px; z-index: 0; font-size: 12px; color: rgba(241, 243, 247, .5); pointer-events: none; }
.wm-launcher { position: absolute; left: 50%; top: 16%; z-index: 2147483001; width: 560px; transform: translateX(-50%); overflow: hidden; border-radius: 12px;
    background: rgba(16, 19, 27, .98); border: 1px solid rgba(var(--pw-gold-rgb, 245, 197, 24), .4); box-shadow: 0 30px 90px rgba(0, 0, 0, .7); }
.wm-launcher-input { display: block; width: 100%; height: 56px; padding: 0 20px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .1); border-radius: 0; outline: none;
    font-size: 18px; color: var(--pw-text, #eef0f5); background: transparent; }
.wm-launcher-list { max-height: 420px; overflow-y: auto; padding: 6px; }
.wm-launcher-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border-radius: 8px; text-align: left; font-size: 15px; color: var(--pw-text, #eef0f5); }
.wm-launcher-item > :first-child { flex: none; width: 34px; height: 34px; }
.wm-launcher-item svg { width: 100%; height: 100%; }
.wm-launcher-item:hover, .wm-launcher-item.active { background: rgba(var(--pw-gold-rgb, 245, 197, 24), .18); }
.wm-launcher-empty { padding: 18px; text-align: center; color: rgba(241, 243, 247, .55); }
