/* 设备管理页 — 简约灰蓝 */
.devices-page .page-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.devices-page .page-header-icon {
    font-size: 1.35rem;
}

.hw-device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.hw-device-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 1.15rem 1.2rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hw-device-card:hover {
    border-color: #d0d0d0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.hw-device-top {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.hw-device-avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    border: 1px solid #e8e8e8;
}

.hw-device-main {
    flex: 1;
    min-width: 0;
}

.hw-device-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.hw-device-title-row h3 {
    font-size: 1.02rem;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hw-device-meta {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.hw-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: #888;
    line-height: 1.4;
}

.hw-meta-icon {
    flex-shrink: 0;
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.hw-meta-row code {
    background: #f5f5f5;
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    font-size: 0.72rem;
    color: #666;
}

.hw-device-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding-top: 0.85rem;
    border-top: 1px solid #f0f0f0;
}

.hw-action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.48rem 0.65rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
    color: #333;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.2;
}

button.hw-action-btn {
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.hw-action-btn:hover {
    text-decoration: none;
    border-color: #186ade;
    color: #186ade;
    background: #f8fafc;
}

.hw-action-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.hw-action-delete:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
}

.fw-package-panel {
    margin-bottom: 1.25rem;
}

.fw-package-panel .form-hint {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: #888;
}

.fw-package-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.fw-package-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    grid-column: 1 / -1;
}

.fw-package-list {
    font-size: 0.85rem;
    color: #64748b;
}

.fw-package-list-scroll {
    max-height: min(320px, 45vh);
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.fw-package-list-scroll .admin-table {
    margin: 0;
}

.fw-package-list-scroll .admin-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    box-shadow: 0 1px 0 #e2e8f0;
}

.devices-page .empty-state {
    background: #fff;
    border: 1px dashed #ddd;
    border-radius: 8px;
}
