/* ==================== PC INVENTORY PAGE ==================== */

/* Toolbar */
.pci-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.pci-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pci-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pci-search {
    width: 260px;
    padding: 9px 14px 9px 36px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    transition: var(--transition);
}

.pci-search:focus {
    outline: none;
    border-color: rgba(255, 107, 107, 0.5);
    background: var(--glass-hover);
}

.pci-search::placeholder { color: var(--text-muted); }

.pci-search-wrapper {
    position: relative;
}

.pci-search-wrapper::before {
    content: '🔍';
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    pointer-events: none;
}

.pci-count {
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.pci-btn {
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    color: #fff;
}

.pci-btn-refresh {
    background: var(--glass);
    border: 1px solid var(--border);
}

.pci-btn-refresh:hover {
    background: var(--glass-hover);
    transform: translateY(-1px);
}

.pci-btn-export {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.pci-btn-export:hover {
    box-shadow: 0 0 16px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

/* Filter Toggle Button */
.pci-filter-toggle {
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--text-secondary);
}

.pci-filter-toggle:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.pci-filter-toggle.has-filters {
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(102, 126, 234, 0.1);
    color: #a5b4fc;
}

.pci-filter-toggle .pci-filter-badge {
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.pci-filter-toggle .pci-toggle-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.pci-filter-toggle.open .pci-toggle-arrow {
    transform: rotate(180deg);
}

/* ===== Filter Panel ===== */
.pci-filter-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin 0.3s ease, opacity 0.2s ease;
    opacity: 0;
    margin-bottom: 0;
}

.pci-filter-panel.open {
    max-height: 600px;
    opacity: 1;
    margin-bottom: 16px;
}

.pci-filter-panel-inner {
    background: var(--dark-800);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
}

.pci-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.pci-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pci-filter-group-header {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pci-filter-group-icon {
    font-size: 12px;
}

.pci-filter-group-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pci-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.pci-tag:hover {
    background: var(--glass-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.pci-tag.active {
    background: rgba(102, 126, 234, 0.18);
    border-color: rgba(102, 126, 234, 0.45);
    color: #c7d2fe;
}

.pci-tag.active:hover {
    background: rgba(102, 126, 234, 0.28);
}

.pci-tag-count {
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.pci-tag.active .pci-tag-count {
    background: rgba(102, 126, 234, 0.3);
    color: #c7d2fe;
}

/* ===== Active Filters Bar ===== */
.pci-active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.06);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 10px;
    flex-wrap: wrap;
}

.pci-active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.pci-active-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(102, 126, 234, 0.12);
    border: 1px solid rgba(102, 126, 234, 0.25);
    border-radius: 6px;
    font-size: 11px;
    color: #a5b4fc;
    white-space: nowrap;
}

.pci-active-chip-cat {
    color: var(--text-muted);
    font-size: 10px;
}

.pci-active-chip-x {
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    margin-left: 2px;
    line-height: 1;
    transition: color 0.15s;
}

.pci-active-chip-x:hover {
    color: #ff6b6b;
}

.pci-clear-all-btn {
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 107, 107, 0.25);
    background: rgba(255, 107, 107, 0.08);
    color: #ff8a8a;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.pci-clear-all-btn:hover {
    background: rgba(255, 107, 107, 0.18);
    border-color: rgba(255, 107, 107, 0.4);
}

/* ===== Summary Cards ===== */
.pci-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.pci-stat-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.pci-stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--stat-accent, var(--primary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.pci-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.pci-stat-card:hover::after {
    transform: scaleX(1);
}

.pci-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--glass-hover);
    flex-shrink: 0;
}

.pci-stat-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.pci-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* ===== Table ===== */
.pci-table-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.pci-table-card:hover {
    transform: none;
    box-shadow: none;
}

.pci-table-scroll {
    overflow-x: auto;
}

.pci-table {
    width: 100%;
    border-collapse: collapse;
}

.pci-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.pci-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
    background: var(--dark-800);
    white-space: nowrap;
    user-select: none;
}

.pci-table th.sortable {
    cursor: pointer;
    transition: color 0.2s;
}

.pci-table th.sortable:hover { color: var(--text-primary); }
.pci-table th.sorted { color: #ff6b6b; }

.pci-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    vertical-align: middle;
}

.pci-table tbody tr {
    cursor: pointer;
    transition: background 0.15s ease;
}

.pci-table tbody tr:hover { background: var(--glass-hover); }
.pci-table tbody tr:last-child td { border-bottom: none; }

/* Cell styles */
.pci-cell-employee { white-space: nowrap; }

.pci-employee-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 12px;
}

.pci-employee-id {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.pci-cell-mono {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 11px;
    color: var(--text-secondary);
}

.pci-cell-brand {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 12px;
}

.pci-cell-secondary {
    color: var(--text-secondary);
    font-size: 11px;
}

.pci-cell-truncate {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: var(--text-secondary);
}

.pci-ram {
    font-weight: 700;
    font-size: 12px;
}

.pci-ram-high { color: #4ade80; }
.pci-ram-mid  { color: #feca57; }
.pci-ram-low  { color: #ff6b6b; }

.pci-last-seen {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.pci-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.pci-status-dot.online {
    background: #4ade80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
}

.pci-status-dot.offline { background: var(--text-muted); }

.pci-detail-btn {
    padding: 5px 12px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 7px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.pci-detail-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.4);
}

/* Empty / Error */
.pci-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.pci-empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.pci-empty-text { font-size: 14px; }

.pci-error {
    text-align: center;
    padding: 40px;
    color: #ff6b6b;
}

/* ===== Detail Modal ===== */
.pci-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pci-detail-section {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.pci-detail-section-title {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-primary);
}

.pci-detail-section-icon { font-size: 16px; }

.pci-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 5px 0;
    font-size: 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.pci-detail-row:last-child { border-bottom: none; }

.pci-detail-label {
    color: var(--text-muted);
    flex-shrink: 0;
    margin-right: 10px;
}

.pci-detail-value {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    word-break: break-all;
    max-width: 60%;
}

.pci-detail-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 8px 0;
}

.pci-hw-chip {
    background: var(--glass-hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
    font-size: 11px;
    line-height: 1.5;
}

.pci-hw-chip:last-child { margin-bottom: 0; }
.pci-hw-chip-name { font-weight: 600; color: var(--text-primary); }
.pci-hw-chip-detail { color: var(--text-secondary); }

.pci-hw-chip-sub {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
}

.pci-type-badge {
    display: inline-block;
    padding: 1px 7px;
    font-size: 9px;
    font-weight: 700;
    border-radius: 5px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pci-type-badge.ssd {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.pci-type-badge.nvme {
    background: rgba(79, 172, 254, 0.15);
    color: #4facfe;
    border: 1px solid rgba(79, 172, 254, 0.2);
}

.pci-type-badge.hdd {
    background: rgba(254, 202, 87, 0.15);
    color: #feca57;
    border: 1px solid rgba(254, 202, 87, 0.2);
}

.pci-no-data {
    color: var(--text-muted);
    font-size: 11px;
    font-style: italic;
}

/* ===== Date Range Filter ===== */
.pci-date-range {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--dark-800);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px 12px;
    transition: var(--transition);
}

.pci-date-range:focus-within {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.08);
}

.pci-date-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.pci-date-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.pci-date-sep {
    color: var(--text-muted);
    font-size: 12px;
    flex-shrink: 0;
    opacity: 0.5;
}

.pci-date-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 5px 8px;
    font-size: 12px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    width: 128px;
}

.pci-date-input:focus {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.06);
}

.pci-date-input::-webkit-calendar-picker-indicator {
    filter: invert(0.6);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.pci-date-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.pci-btn-date-clear {
    background: rgba(255, 107, 107, 0.1);
    color: #ff8a8a;
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 6px;
    width: 26px;
    height: 26px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--transition);
    flex-shrink: 0;
}

.pci-btn-date-clear:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.4);
    color: #ff6b6b;
}

/* ===== Export Modal ===== */
.pci-export-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.pci-export-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.pci-export-actions {
    display: flex;
    gap: 6px;
}

.pci-export-toggle-btn {
    padding: 5px 12px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pci-export-toggle-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.pci-export-columns-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    max-height: 380px;
    overflow-y: auto;
    padding: 6px;
    background: rgba(255, 255, 255, 0.015);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.pci-export-col-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    user-select: none;
}

.pci-export-col-item:hover {
    background: rgba(102, 126, 234, 0.06);
    color: var(--text-primary);
}

.pci-export-col-item input[type="checkbox"] {
    display: none;
}

.pci-export-col-check {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
    background: rgba(255, 255, 255, 0.03);
}

.pci-export-col-item:hover .pci-export-col-check {
    border-color: rgba(102, 126, 234, 0.4);
}

.pci-export-col-item input:checked + .pci-export-col-check {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.pci-export-col-item input:checked + .pci-export-col-check::after {
    content: '✓';
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.pci-export-col-item input:checked ~ span:last-child {
    color: var(--text-primary);
    font-weight: 600;
}

.pci-export-footer {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.pci-btn-cancel {
    background: var(--glass);
    border: 1px solid var(--border);
}

.pci-btn-cancel:hover {
    background: var(--glass-hover);
    border-color: var(--border-hover);
}

/* ===== Pagination ===== */
.pci-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 14px 16px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 16px 16px;
    margin-top: -1px;
}

.pci-page-info {
    font-size: 12px;
    color: var(--text-muted);
}

.pci-page-btns {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pci-page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--glass);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.pci-page-btn:hover:not(:disabled):not(.active) {
    background: var(--glass-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.pci-page-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.35);
}

.pci-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pci-page-ellipsis {
    width: 28px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .pci-detail-grid { grid-template-columns: 1fr; }
    .pci-filter-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .pci-toolbar-left { flex-wrap: wrap; }
    .pci-toolbar-right { flex-wrap: wrap; }
}

@media (max-width: 768px) {
    .pci-toolbar { flex-direction: column; align-items: stretch; }
    .pci-toolbar-left { flex-direction: column; align-items: stretch; }
    .pci-search { width: 100%; }
    .pci-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .pci-filter-grid { grid-template-columns: 1fr; }
    .pci-date-range { width: 100%; }
    .pci-export-columns-grid { grid-template-columns: repeat(2, 1fr); }
    .pci-pagination { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
    .pci-export-columns-grid { grid-template-columns: 1fr; }
    .pci-date-range { flex-wrap: wrap; }
}