/* ===== tabs/device.css - 设备连接 Tab 样式 ===== */

/* 设备卡片 */
.device-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    width: 100%;
     min-width: 0;            /* 防止内容溢出 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
}

/* 图片 + 信息 并排 */
.device-image {
    flex: 0 0 120px;
    margin-right: 14px;
    text-align: center;
}

.device-image img {
    max-width: 100%;
    max-height: 100px;
    border-radius: 6px;
}

/* 设备信息 */
.device-info {
    flex: 1;
    min-width: 200px;
}

.device-name {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.device-manufacturer,
.device-serial,
.device-product-id {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 3px;
}

/* USB 接口信息 */
.usb-interfaces {
    width: 100%;
    background: #f9fafb;
    border-radius: 6px;
    padding: 10px;
    margin-top: 12px;
}

.usb-interfaces h4 {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.interface-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.interface-item {
    background-color: rgba(214, 214, 208, 0.703);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 8px;
    border: #111827 1px solid;
    border-left: 3px solid #212429;

    transition: all 0.3s ease;
}

.interface-item--highlight {
    background: #fef3c7;
    border-left: 24px solid #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, .1);
    animation: highlight-pulse 2s ease-in-out infinite;
    font-weight: 600;
}

@keyframes highlight-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 2px rgba(245, 158, 11, .1);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(245, 158, 11, .25);
    }
}

/* 串口配置 */
.serial-config {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
}

.serial-config label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    display: block;
    text-align: center;
    margin-bottom: 6px;
    padding-top: 4px;
}

.serial-config select {
    width: 100%;
}

/* 操作按钮 */
.device-actions {
    width: 100%;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 10px;
}

/* 设备卡片内的按钮 */
.device-card .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ═══ 系统信息表格 ═══ */
.system-info {
    width: 100%;
    margin-top: 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.system-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    padding: 10px 14px;
    margin: 0;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.info-table tr {
    border-bottom: 1px solid #f1f5f9;
}

.info-table tr:last-child {
    border-bottom: none;
}

.info-table tr:hover {
    background: #f8fafc;
}

.info-label {
    padding: 7px 14px;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
    width: 140px;
}

.info-value {
    padding: 7px 14px;
    color: #1e293b;
    font-weight: 500;
    word-break: break-all;
}
