/* ===== base.css - 通用组件样式 ===== */
/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
    gap: 6px;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #6b7280;
    color: #fff;
    border-color: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-success {
    background: #059669;
    color: #fff;
    border-color: #059669;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-danger:disabled {
    background: #4b5563;
    color: #9ca3af;
    border-color: #4b5563;
    cursor: not-allowed;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 11px;
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    border: 1px solid #e5e7eb;
}

/* 输入框/选择框 */
input[type="text"],
input[type="number"],
textarea {
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    transition: border-color .2s;
}

select {
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    transition: border-color .2s;
    min-height: 32px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .1);
}

/* 标签 */
label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

/* 空状态 */
.no-data {
    color: #9ca3af;
    font-size: 13px;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* 条码按钮 */
.btn-barcode {

    padding: 8px;
    cursor: pointer;

    vertical-align: middle;
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.btn-barcode img {
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, .3);
    border-radius: 6px;
}

.btn-barcode img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(59, 130, 246, .5);
}

.btn-barcode img:active {
    transform: scale(0.95);
}

.btn-barcode:hover {
    background: #1d4ed8;
}
/* ═══ 打印指令 Tab (print-content) ═══ */

.print-device-section {
    margin-bottom: 16px;
}

.print-device-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
}

.print-device-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.print-device-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.print-device-label {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

.print-device-value {
    font-size: 13px;
    color: #1e293b;
    font-weight: 600;
}

.print-input-section {
    margin-bottom: 12px;
}

.print-textarea {
    width: 100%;
    min-height: 280px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
}

.print-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, .15);
}

.print-actions-section {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.print-actions-left {
    display: flex;
    gap: 6px;
}

.print-actions-right {
    display: flex;
    gap: 6px;
}

.print-status-section {
    margin-bottom: 12px;
}

.print-status-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    min-height: 20px;
}

.print-status-text {
    font-size: 13px;
}

.print-response {
    margin-top: 8px;
    padding: 8px;
    background: #1e293b;
    color: #22c55e;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 2 列适配 */
@media (max-width: 768px) {
    .print-device-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 1 列适配 */
@media (max-width: 480px) {
    .print-device-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══ 状态刷新按钮 ═══ */
.btn-refresh {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 0 2px;
    opacity: 0.5;
    transition: opacity 0.2s;
    vertical-align: middle;
}
.btn-refresh:hover {
    opacity: 1;
}

