/* =====================================================
   FLOOR PLAN EDITOR V14 - SCOPED STYLES
   All styles scoped to .fp-editor to avoid conflicts
   ===================================================== */

/* ===== BASE EDITOR ===== */
.fp-editor {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    max-height: calc(100vh - 60px);
    background: #0f172a;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #e2e8f0;
    overflow: hidden;
}

.fp-editor.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    z-index: 9999;
}

/* ===== HEADER ===== */
.fp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    border-bottom: 1px solid #334155;
    gap: 16px;
    position: relative;
    z-index: 100;
}

.fp-header-left, .fp-header-right { display: flex; align-items: center; gap: 10px; }
.fp-header-center { flex: 1; display: flex; justify-content: center; }

.fp-header select {
    padding: 8px 12px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 13px;
    min-width: 150px;
    cursor: pointer;
}

.fp-header select:hover { border-color: #3b82f6; }
.fp-header select:focus { outline: none; border-color: #3b82f6; }

/* ===== FLOOR PLAN STATS (scoped) ===== */
.fp-stats { 
    display: flex; 
    gap: 16px; 
}

.fp-stats .stat { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    font-size: 13px; 
    color: #94a3b8;
    padding: 6px 12px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.fp-stats .stat:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.fp-stats .stat.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

.fp-stats .stat.online.active {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
}

.fp-stats .stat.idle.active {
    background: rgba(234, 179, 8, 0.2);
    border-color: #eab308;
}

.fp-stats .stat.offline.active {
    background: rgba(100, 116, 139, 0.2);
    border-color: #64748b;
}

.fp-stats .stat i { 
    width: 10px; 
    height: 10px; 
    border-radius: 50%; 
}

.fp-stats .stat.online i { 
    background: #22c55e; 
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5); 
}

.fp-stats .stat.idle i { 
    background: #eab308; 
}

.fp-stats .stat.offline i { 
    background: #64748b; 
}

.fp-stats .stat span { 
    font-weight: 600; 
    color: #fff; 
}

/* ===== FILTER BAR ===== */
.fp-filter-bar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), transparent);
    border-bottom: 1px solid #334155;
}

.fp-filter-bar .filter-label {
    font-size: 12px;
    color: #94a3b8;
}

.fp-filter-bar .filter-value {
    font-size: 13px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    background: #3b82f6;
    color: white;
}

.fp-filter-bar .filter-value.online { background: #22c55e; }
.fp-filter-bar .filter-value.idle { background: #eab308; color: #000; }
.fp-filter-bar .filter-value.offline { background: #64748b; }

.fp-filter-bar .filter-clear {
    margin-left: auto;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.fp-filter-bar .filter-clear:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

/* ===== ICON BUTTONS ===== */
.fp-icon-btn {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: #1e293b; border: 1px solid #334155; border-radius: 6px;
    color: #94a3b8; cursor: pointer; transition: all 0.15s;
}
.fp-icon-btn:hover { background: #334155; color: #fff; }
.fp-icon-btn svg { width: 18px; height: 18px; }

.fp-sep { width: 1px; height: 24px; background: #334155; }

.fp-edit-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 14px; background: #1e293b; border: 1px solid #334155;
    border-radius: 6px; color: #94a3b8; font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all 0.15s;
}
.fp-edit-btn:hover { background: #334155; color: #fff; }
.fp-edit-btn.active { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.fp-edit-btn svg { width: 16px; height: 16px; }

/* ===== TOOLBAR ===== */
.fp-toolbar {
    display: none;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(to right, #1e3a5f, #1e293b);
    border-bottom: 2px solid #3b82f6;
    gap: 10px;
    position: relative; z-index: 100;
}

.fp-toolbar .tool-group { display: flex; gap: 4px; }

.fp-toolbar .tool-btn {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    background: #0f172a; border: 1px solid #334155; border-radius: 6px;
    color: #94a3b8; cursor: pointer; transition: all 0.15s;
}
.fp-toolbar .tool-btn:hover { background: #334155; color: #e2e8f0; transform: translateY(-1px); }
.fp-toolbar .tool-btn.active { background: #3b82f6; border-color: #3b82f6; color: #fff; box-shadow: 0 2px 8px rgba(59,130,246,0.4); }
.fp-toolbar .tool-btn svg { width: 20px; height: 20px; }

.fp-toolbar .tool-sep { width: 1px; height: 30px; background: #475569; margin: 0 6px; }
.fp-toolbar .tool-options { display: flex; gap: 14px; }
.fp-toolbar .tool-options label { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #94a3b8; cursor: pointer; }
.fp-toolbar .tool-options input { width: 15px; height: 15px; accent-color: #3b82f6; }
.fp-toolbar .tool-spacer { flex: 1; }
.fp-toolbar .tool-actions { display: flex; gap: 6px; }

.fp-toolbar .action-btn {
    padding: 8px 12px; background: #334155; border: 1px solid #475569;
    border-radius: 6px; color: #e2e8f0; font-size: 12px; cursor: pointer;
}
.fp-toolbar .action-btn:hover { background: #475569; }
.fp-toolbar .action-btn.primary { background: #22c55e; border-color: #22c55e; color: #fff; font-weight: 600; }
.fp-toolbar .action-btn.primary:hover { background: #16a34a; }

/* ===== MAIN ===== */
.fp-main { flex: 1; display: flex; overflow: hidden; position: relative; }

.fp-canvas-area { 
    flex: 1; 
    overflow: hidden; 
    background: #e2e8f0; /* Match SVG floor background */
    position: relative; 
    user-select: none; 
    -webkit-user-select: none; 
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fp-canvas { 
    width: 100%; 
    height: 100%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 20px; 
    overflow: hidden;
    box-sizing: border-box;
    background: #e2e8f0; /* Match SVG floor background */
}

.floor-svg {
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
    transform-origin: center center; 
    transition: transform 0.08s ease-out;
    user-select: none; -webkit-user-select: none;
    position: relative;
    background: #f1f5f9;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}
.floor-svg text { pointer-events: none; user-select: none; }

body.editing .fp-canvas-area {
    background: 
        radial-gradient(circle at center, transparent 0%, #0f172a 100%),
        linear-gradient(90deg, #1e293b 21px, transparent 1%) center,
        linear-gradient(#1e293b 21px, transparent 1%) center,
        #172033;
    background-size: 100% 100%, 22px 22px, 22px 22px;
}
body.editing .floor-svg { 
    box-shadow: 0 0 0 3px #3b82f6, 0 8px 32px rgba(59,130,246,0.3), 0 0 60px rgba(59,130,246,0.2); 
}

/* ===== WORKSTATION STATES ===== */
.workstation, .custom-pc {
    cursor: pointer;
    transition: filter 0.2s, opacity 0.3s;
}

.workstation:hover, .custom-pc:hover {
    filter: brightness(1.15) drop-shadow(0 0 6px rgba(59, 130, 246, 0.6));
}

/* Dimmed state for filtering */
.workstation.dimmed, .custom-pc.dimmed {
    opacity: 0.15;
    filter: grayscale(0.8);
    pointer-events: none;
}

/* ===== SIDEBAR ===== */
.fp-sidebar {
    width: 260px; background: #1e293b; border-left: 1px solid #334155;
    overflow-y: auto; display: flex; flex-direction: column;
    position: relative; z-index: 100;
    flex-shrink: 0;
}
.fp-sidebar .panel { border-bottom: 1px solid #334155; }
.fp-sidebar .panel-title {
    padding: 12px 14px; font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px; color: #64748b; background: #0f172a;
}
.fp-sidebar .panel-body { padding: 14px; }

.fp-sidebar .legend { display: flex; flex-direction: column; gap: 8px; }
.fp-sidebar .legend-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #94a3b8; }
.fp-sidebar .dot { width: 18px; height: 14px; border-radius: 3px; }
.fp-sidebar .dot.online { background: linear-gradient(135deg, #86efac, #22c55e); border: 1px solid #16a34a; }
.fp-sidebar .dot.idle { background: linear-gradient(135deg, #fde047, #eab308); border: 1px solid #ca8a04; }
.fp-sidebar .dot.offline { background: linear-gradient(135deg, #475569, #334155); border: 1px solid #1e293b; }
.fp-sidebar .dot.unassigned { background: linear-gradient(135deg, #a5b4fc, #6366f1); border: 1px solid #4f46e5; }
.fp-sidebar .dot.conflict { background: linear-gradient(135deg, #fbbf24, #f59e0b); border: 1px solid #d97706; }

/* Properties */
.fp-sidebar .prop-status { font-size: 14px; font-weight: 600; margin-bottom: 12px; padding: 8px 10px; background: rgba(255,255,255,0.03); border-radius: 6px; }
.fp-sidebar .prop-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #334155; font-size: 12px; }
.fp-sidebar .prop-row span { color: #64748b; }
.fp-sidebar .prop-row strong { color: #fff; }
.fp-sidebar .prop-field { margin-bottom: 12px; }
.fp-sidebar .prop-field label { display: block; font-size: 10px; font-weight: 500; color: #64748b; text-transform: uppercase; margin-bottom: 4px; }
.fp-sidebar .prop-field input {
    width: 100%; padding: 8px 10px; background: #0f172a;
    border: 1px solid #334155; border-radius: 5px; color: #e2e8f0; font-size: 13px;
}
.fp-sidebar .prop-field input:focus { outline: none; border-color: #3b82f6; }
.fp-sidebar .prop-field input[type="color"] { height: 36px; padding: 3px; cursor: pointer; }
.fp-sidebar .prop-row-2 { display: flex; gap: 10px; }
.fp-sidebar .prop-row-2 .prop-field { flex: 1; }

.fp-sidebar .prop-delete, .fp-sidebar .prop-reset {
    width: 100%; margin-top: 12px; padding: 10px;
    font-size: 12px; font-weight: 500; border-radius: 6px; cursor: pointer;
}
.fp-sidebar .prop-delete { background: transparent; border: 1px solid #ef4444; color: #ef4444; }
.fp-sidebar .prop-delete:hover { background: #ef4444; color: #fff; }
.fp-sidebar .prop-reset { background: transparent; border: 1px solid #334155; color: #94a3b8; }
.fp-sidebar .prop-reset:hover { background: #334155; color: #fff; }

/* Room PC count text */
.room-count { font-style: italic; letter-spacing: 0.3px; }

.selected rect, .selected line { stroke: #3b82f6 !important; stroke-width: 3 !important; }
.multi-selected rect, .multi-selected line, line.multi-selected { stroke: #8b5cf6 !important; stroke-width: 4 !important; }
.multi-selected { filter: brightness(1.1); }

/* Custom PCs */
.custom-pc { cursor: pointer; transition: filter 0.15s; }
.custom-pc:hover { filter: brightness(1.15) drop-shadow(0 2px 4px rgba(59,130,246,0.4)); }

/* Selection box */
#selectionBox { pointer-events: none; }

/* Paste preview */
#pastePreview { pointer-events: none; }
#pastePreview rect, #pastePreview line {
    stroke-dasharray: 4,2;
    animation: fpPastePulse 0.8s ease-in-out infinite;
}
@keyframes fpPastePulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* Resize handles */
.resize-handle { cursor: pointer; transition: fill 0.15s; }
.resize-handle:hover { fill: #60a5fa !important; }

/* ===== DIALOG (Not scoped - appended to body) ===== */
.dialog-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7);
    display: flex; align-items: center; justify-content: center; z-index: 10000;
}
.dialog-box {
    background: #1e293b; border: 1px solid #334155; border-radius: 12px;
    padding: 24px; min-width: 320px; box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.dialog-title { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 16px; }
.dialog-box input {
    width: 100%; padding: 12px 14px; background: #0f172a;
    border: 1px solid #334155; border-radius: 8px; color: #fff; font-size: 14px; margin-bottom: 20px;
    box-sizing: border-box;
}
.dialog-box input:focus { outline: none; border-color: #3b82f6; }
.dialog-btns { display: flex; justify-content: flex-end; gap: 10px; }
.dialog-btn { padding: 10px 20px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; border: none; }
.dialog-btn.cancel { background: #334155; border: 1px solid #475569; color: #e2e8f0; }
.dialog-btn.cancel:hover { background: #475569; }
.dialog-btn.ok { background: #3b82f6; border: 1px solid #3b82f6; color: #fff; }
.dialog-btn.ok:hover { background: #2563eb; }

/* ===== TOAST (Not scoped - appended to body) ===== */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    padding: 12px 24px; background: #22c55e; color: #fff; border-radius: 8px;
    font-size: 13px; font-weight: 500; box-shadow: 0 4px 16px rgba(0,0,0,0.3); z-index: 10001;
    animation: fpSlideUp 0.25s;
}
.toast.error { background: #ef4444; }
.toast.info { background: #3b82f6; }

@keyframes fpSlideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== LOADING ===== */
.fp-loading, .fp-error { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 14px; color: #64748b; }
.fp-error { color: #f87171; }
.fp-error-page { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 400px; color: #f87171; }

/* ===== PC ASSIGNMENT ===== */
.fp-sidebar .badge-count { 
    display: inline-block; padding: 2px 6px; background: #ef4444; color: white; 
    font-size: 10px; border-radius: 10px; margin-left: 6px; 
}

.fp-sidebar .assign-station { display: flex; flex-direction: column; gap: 10px; }
.fp-sidebar .assign-header { display: flex; flex-direction: column; gap: 4px; }
.fp-sidebar .station-label { font-size: 12px; color: #94a3b8; }
.fp-sidebar .station-label strong { color: #f1f5f9; font-size: 14px; }
.fp-sidebar .current-assign { font-size: 11px; color: #3b82f6; }

.fp-sidebar .assign-search { display: flex; gap: 6px; }
.fp-sidebar .assign-search input {
    flex: 1; padding: 8px 10px; background: #0f172a; border: 1px solid #334155;
    border-radius: 4px; color: #f1f5f9; font-size: 12px;
}
.fp-sidebar .assign-search input:focus { outline: none; border-color: #3b82f6; }
.fp-sidebar .assign-manual-btn {
    width: 36px; background: #3b82f6; border: none; border-radius: 4px;
    color: white; font-size: 18px; cursor: pointer; font-weight: bold;
}
.fp-sidebar .assign-manual-btn:hover { background: #2563eb; }

.fp-sidebar .assign-list { max-height: 250px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.fp-sidebar .assign-list::-webkit-scrollbar { width: 4px; }
.fp-sidebar .assign-list::-webkit-scrollbar-thumb { background: #475569; border-radius: 2px; }

.fp-sidebar .pc-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px;
    background: #0f172a; border-radius: 4px; cursor: pointer; transition: all 0.15s;
}
.fp-sidebar .pc-item:hover { background: #1e3a5f; }
.fp-sidebar .pc-item .pc-status {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.fp-sidebar .pc-item.online .pc-status { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.fp-sidebar .pc-item.offline .pc-status { background: #64748b; }
.fp-sidebar .pc-item.assigned { opacity: 0.6; border-left: 2px solid #6366f1; }
.fp-sidebar .pc-item.assigned:hover { opacity: 0.8; }

.fp-sidebar .pc-info { display: flex; flex-direction: column; overflow: hidden; }
.fp-sidebar .pc-name { font-size: 12px; color: #f1f5f9; font-weight: 500; }
.fp-sidebar .pc-details { font-size: 10px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fp-sidebar .assign-actions { padding-top: 8px; border-top: 1px solid #334155; }
.fp-sidebar .btn-danger { 
    width: 100%; padding: 8px; background: #dc2626; color: white; border: none;
    border-radius: 4px; cursor: pointer; font-size: 11px; font-weight: 500;
}
.fp-sidebar .btn-danger:hover { background: #b91c1c; }

.fp-sidebar .assign-info { 
    font-size: 12px; 
    color: #94a3b8; 
    text-align: center; 
    padding: 20px 10px; 
    background: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    border: 1px dashed #3b82f6;
}

/* Conflict panel */
.fp-sidebar .conflict-item {
    display: flex; gap: 8px; padding: 8px; background: #0f172a; border-radius: 4px;
    margin-bottom: 6px; border-left: 3px solid #f59e0b;
}
.fp-sidebar .conflict-item.duplicate { border-left-color: #ef4444; }
.fp-sidebar .conflict-item.unassigned { border-left-color: #3b82f6; }
.fp-sidebar .conflict-icon { font-size: 16px; }
.fp-sidebar .conflict-details { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.fp-sidebar .conflict-details strong { font-size: 11px; color: #f1f5f9; }
.fp-sidebar .conflict-details span { font-size: 10px; color: #94a3b8; }
.fp-sidebar .conflict-details .btn-sm {
    align-self: flex-start; padding: 3px 8px; background: #3b82f6; color: white;
    border: none; border-radius: 3px; cursor: pointer; font-size: 10px; margin-top: 4px;
}
.fp-sidebar .conflict-details .btn-sm:hover { background: #2563eb; }

/* Quick assign dialog */
.fp-dialog {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.fp-dialog .dialog-content {
    background: #1e293b; border-radius: 8px; width: 400px; max-width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.fp-dialog .dialog-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px; border-bottom: 1px solid #334155;
}
.fp-dialog .dialog-header h3 { margin: 0; font-size: 16px; color: #f1f5f9; }
.fp-dialog .dialog-header .close-btn {
    background: none; border: none; color: #64748b; font-size: 24px;
    cursor: pointer; line-height: 1;
}
.fp-dialog .dialog-header .close-btn:hover { color: #f1f5f9; }
.fp-dialog .dialog-body { padding: 16px; }
.fp-dialog .dialog-body p { margin: 0 0 12px; font-size: 13px; color: #94a3b8; }

.fp-dialog .station-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
}
.fp-dialog .station-btn {
    padding: 8px; background: #0f172a; border: 1px solid #334155;
    border-radius: 4px; color: #f1f5f9; font-size: 11px; cursor: pointer;
}
.fp-dialog .station-btn:hover { background: #3b82f6; border-color: #3b82f6; }
.fp-dialog .more-msg { margin-top: 10px; font-size: 11px; color: #64748b; font-style: italic; }

/* ===== PC DETAIL MODAL ===== */
.pc-detail-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fpFadeIn 0.2s;
}

@keyframes fpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pc-detail-card {
    background: linear-gradient(180deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 16px;
    width: 420px;
    max-width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fpSlideUp 0.3s;
}

.pc-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    flex-shrink: 0;
}

.pc-status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.pc-detail-modal .modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.pc-detail-modal .modal-close:hover {
    background: #ef4444;
    color: white;
}

.pc-detail-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

/* Smooth scrolling */
.pc-detail-body::-webkit-scrollbar {
    width: 6px;
}

.pc-detail-body::-webkit-scrollbar-track {
    background: #0f172a;
}

.pc-detail-body::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

.pc-detail-body .detail-section {
    margin-bottom: 20px;
}

.pc-detail-body .detail-section:last-child {
    margin-bottom: 0;
}

.pc-detail-body .detail-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #334155;
}

.pc-detail-body .detail-section h4 svg {
    color: #3b82f6;
}

.pc-detail-body .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    gap: 12px;
}

.pc-detail-body .detail-label {
    color: #94a3b8;
    font-size: 13px;
}

.pc-detail-body .detail-value {
    color: #f1f5f9;
    font-size: 13px;
    font-weight: 500;
    text-align: right;
}

.pc-detail-body .detail-value.highlight {
    color: #3b82f6;
    font-weight: 600;
}

.pc-detail-body .detail-progress {
    flex: 1;
    height: 6px;
    background: #1e293b;
    border-radius: 3px;
    overflow: hidden;
    margin: 0 12px;
}

.pc-detail-body .progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

/* History list */
.pc-detail-body .history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 150px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.pc-detail-body .history-list::-webkit-scrollbar {
    width: 4px;
}

.pc-detail-body .history-list::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 2px;
}

.pc-detail-body .history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #0f172a;
    border-radius: 6px;
    border-left: 3px solid #64748b;
}

.pc-detail-body .history-item.current {
    border-left-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.pc-detail-body .history-item.idle {
    border-left-color: #eab308;
    background: rgba(234, 179, 8, 0.1);
}

.pc-detail-body .history-name {
    font-size: 12px;
    color: #f1f5f9;
    font-weight: 500;
}

.pc-detail-body .history-time {
    font-size: 11px;
    color: #64748b;
}

/* Modal footer with buttons */
.pc-detail-footer {
    padding: 16px 20px;
    border-top: 1px solid #334155;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    background: #0f172a;
}

.pc-detail-footer .btn-close {
    flex: 1;
    padding: 12px;
    background: #334155;
    border: 1px solid #475569;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pc-detail-footer .btn-close:hover {
    background: #475569;
}

.pc-detail-footer .modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: #334155;
    border: 1px solid #475569;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pc-detail-footer .modal-btn:hover {
    background: #475569;
}

.pc-detail-footer .modal-btn.primary {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.pc-detail-footer .modal-btn.primary:hover {
    background: #2563eb;
}

.pc-detail-footer .modal-btn.danger {
    background: transparent;
    border-color: #ef4444;
    color: #ef4444;
}

.pc-detail-footer .modal-btn.danger:hover {
    background: #ef4444;
    color: white;
}

/* No session message */
.pc-detail-body .no-session {
    font-size: 13px;
    color: #64748b;
    text-align: center;
    padding: 20px;
    background: rgba(100, 116, 139, 0.1);
    border-radius: 8px;
    margin: 0;
}

/* ===== CONTEXT MENU ===== */
.fp-context-menu {
    position: fixed;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 6px 0;
    min-width: 160px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    z-index: 1001;
}

.fp-context-menu .ctx-item {
    padding: 10px 16px;
    font-size: 13px;
    color: #e2e8f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fp-context-menu .ctx-item:hover {
    background: #334155;
}

.fp-context-menu .ctx-item.danger {
    color: #ef4444;
}

.fp-context-menu .ctx-sep {
    height: 1px;
    background: #334155;
    margin: 6px 0;
}

/* ===== SCROLLBAR ===== */
.fp-sidebar::-webkit-scrollbar { width: 5px; }
.fp-sidebar::-webkit-scrollbar-track { background: #1e293b; }
.fp-sidebar::-webkit-scrollbar-thumb { background: #475569; border-radius: 3px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) { .fp-sidebar { width: 220px; } }
@media (max-width: 900px) { .fp-sidebar, .fp-stats { display: none; } }
@media (max-width: 600px) { .fp-header, .fp-toolbar { flex-wrap: wrap; } .fp-toolbar .tool-spacer { display: none; } }