/**
 * 工具共享样式
 * 所有工具模块共用的样式
 */

/* ========== Lamp Generator 样式 ========== */
.lamp-generator {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.lamp-layout {
    display: flex;
    flex: 1;
    gap: 16px;
    min-height: 0;
}

/* 左侧边栏 */
.lamp-sidebar {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding-right: 8px;
}

/* 工具卡片 */
.lamp-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.lamp-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.lamp-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: var(--bg-hover);
}

.lamp-card-title {
    font-size: 14px;
    font-weight: 600;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    margin-bottom: 8px;
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-area .upload-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.upload-area .upload-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.upload-area .upload-text strong {
    color: var(--primary);
}

.file-input {
    display: none;
}

/* 状态徽章 */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    width: 100%;
    justify-content: center;
}

.status-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.success {
    background: #ECFDF5;
    color: var(--success);
}

.status-badge.warning {
    background: #FFFBEB;
    color: var(--warning);
}

.status-badge.error {
    background: #FEF2F2;
    color: var(--danger);
}

/* 表单控件 */
.form-group {
    margin-bottom: 12px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.form-group input[type="number"],
.lamp-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.form-group input:focus,
.lamp-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-row {
    display: flex;
    gap: 8px;
}

.form-row .form-group {
    flex: 1;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.btn-group .btn {
    flex: 1;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

/* 预览区域 */
.lamp-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
    font-size: 13px;
    font-weight: 500;
}

.preview-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-actions .btn {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 12px;
}

.preview-actions span {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 36px;
    text-align: center;
}

.preview-canvas-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F1F5F9;
    padding: 16px;
    overflow: auto;
}

[data-theme="dark"] .preview-canvas-wrapper {
    background: #0F172A;
}

.preview-canvas-wrapper canvas {
    background: white;
    box-shadow: var(--shadow-lg);
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
}

/* 进度条 */
.progress-container {
    margin-top: 12px;
}

.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    text-align: center;
}

/* 响应式 */
@media (max-width: 900px) {
    .lamp-layout {
        flex-direction: column;
    }

    .lamp-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .lamp-sidebar .lamp-card {
        flex: 1;
        min-width: 280px;
    }
}

/* ========== AI Chat Panel 样式 ========== */
.ai-chat-panel {
    height: 100%;
    display: flex;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}

/* 侧边栏 */
.ai-chat-sidebar {
    width: 260px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.ai-sidebar-header {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.ai-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.ai-btn-primary {
    background: var(--primary);
    color: white;
}

.ai-btn-primary:hover {
    background: var(--primary-hover);
}

.ai-btn-danger {
    background: var(--danger);
    color: white;
}

.ai-btn-danger:hover {
    background: #DC2626;
}

/* 对话列表 */
.ai-conversation-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.ai-conversation-item {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.ai-conversation-item:hover {
    background: var(--bg-hover);
}

.ai-conversation-item.active {
    background: var(--bg-active);
}

.ai-conv-title {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-conv-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.ai-empty-list {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 12px;
}

/* 侧边栏底部 */
.ai-sidebar-footer {
    padding: 8px;
    border-top: 1px solid var(--border);
}

.ai-sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 13px;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
}

.ai-sidebar-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* 主聊天区域 */
.ai-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 消息区域 */
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 欢迎页面 */
.ai-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px;
}

.ai-welcome-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.8;
}

.ai-welcome h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.ai-welcome p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* 建议按钮 */
.ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 500px;
}

.ai-suggestion {
    padding: 8px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-suggestion:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* 消息样式 */
.ai-message {
    display: flex;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.ai-message-user {
    flex-direction: row-reverse;
}

.ai-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--bg-hover);
    flex-shrink: 0;
}

.ai-message-user .ai-message-avatar {
    background: var(--primary);
}

.ai-message-content {
    background: var(--bg-hover);
    padding: 12px 16px;
    border-radius: var(--radius);
    max-width: calc(100% - 50px);
}

.ai-message-user .ai-message-content {
    background: var(--primary-light);
}

.ai-message-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

.ai-message-text code {
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
}

.ai-message-user .ai-message-text code {
    background: rgba(255,255,255,0.3);
}

.ai-message-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* 代码块 */
.ai-code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 16px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 8px 0;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    line-height: 1.5;
}

/* 加载动画 */
.ai-message-loading {
    opacity: 0.7;
}

.ai-typing {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.ai-typing span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: ai-typing-bounce 1.4s infinite ease-in-out;
}

.ai-typing span:nth-child(1) { animation-delay: 0s; }
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-typing-bounce {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* 输入区域 */
.ai-chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.ai-input-container {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
}

.ai-input-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.ai-input {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    max-height: 150px;
    overflow-y: auto;
    padding: 6px 0;
}

.ai-input:focus {
    outline: none;
}

.ai-input::placeholder {
    color: var(--text-muted);
}

.ai-send-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--primary);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-send-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.ai-send-btn:disabled {
    background: var(--bg-hover);
    color: var(--text-muted);
    cursor: not-allowed;
}

.ai-input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
}

.ai-model-badge {
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.ai-tips {
    color: var(--text-muted);
}

/* 设置面板 */
.ai-settings-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    z-index: 10;
    display: flex;
    flex-direction: column;
    animation: ai-slide-in 0.2s ease;
}

@keyframes ai-slide-in {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.ai-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.ai-settings-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.ai-close-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--bg-hover);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.ai-close-btn:hover {
    background: var(--danger);
    color: white;
}

.ai-settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.ai-setting-group {
    margin-bottom: 20px;
}

.ai-setting-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.ai-setting-group input,
.ai-setting-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.ai-setting-group input:focus,
.ai-setting-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.ai-setting-group small {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* 响应式 */
@media (max-width: 768px) {
    .ai-chat-sidebar {
        display: none;
    }

    .ai-chat-panel.open-sidebar .ai-chat-sidebar {
        display: flex;
        position: absolute;
        z-index: 20;
        height: 100%;
    }

    .ai-settings-panel {
        width: 100%;
    }

    .ai-message,
    .ai-message-user {
        flex-direction: row;
        max-width: 100%;
    }

    .ai-message-user .ai-message-content {
        max-width: calc(100% - 50px);
    }
}

/* ========== Signature Tool 样式 ========== */
.sig-container {
    display: flex;
    height: 100%;
    background: #fff;
}

/* 顶部工具栏 */
.sig-toolbar {
    width: 260px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sig-section {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
}

.sig-section:last-child {
    border-bottom: none;
}

.sig-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 上传区域 */
.sig-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.sig-upload-area:hover {
    border-color: #4dabf7;
    background: #f8fdff;
}

.sig-upload-area.dragover {
    border-color: #339af0;
    background: #e7f5ff;
}

.sig-upload-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
    background: #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #868e96;
}

.sig-upload-text {
    font-size: 13px;
    color: #495057;
    margin-bottom: 4px;
}

.sig-upload-hint {
    font-size: 11px;
    color: #adb5bd;
}

.sig-upload input {
    display: none;
}

/* 旋转控制 */
.sig-rotate-controls {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.sig-rotate-label {
    font-size: 12px;
    color: #495057;
    margin-bottom: 10px;
}

.sig-rotate-btns {
    display: flex;
    gap: 8px;
}

.sig-rotate-btns .sig-btn {
    flex: 1;
    padding: 8px;
}

/* 效果控制 */
.sig-effect-group {
    margin-bottom: 16px;
}

.sig-effect-group:last-child {
    margin-bottom: 0;
}

.sig-effect-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.sig-effect-label span {
    font-size: 12px;
    color: #495057;
}

.sig-effect-value {
    font-size: 11px;
    color: #868e96;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
}

.sig-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    background: #dee2e6;
    border-radius: 2px;
    outline: none;
}

.sig-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #339af0;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.sig-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* 扫描器状态 */
.sig-scanner-status {
    margin-bottom: 12px;
}

.sig-scanner-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.sig-scanner-badge.jscanify {
    background: #d3f9d8;
    color: #2b8a3e;
}

.sig-scanner-badge.custom {
    background: #fff3bf;
    color: #e67700;
}

.sig-scanner-badge.loading {
    background: #e7f5ff;
    color: #1971c2;
}

/* 按钮组 */
.sig-btn-group {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.sig-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.sig-btn-primary {
    background: #339af0;
    color: white;
}

.sig-btn-primary:hover {
    background: #228be6;
}

.sig-btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.sig-btn-secondary:hover {
    background: #dee2e6;
}

.sig-btn-full {
    width: 100%;
}

.sig-btn-icon {
    font-size: 14px;
}

/* 输入框 */
.sig-input-group {
    margin-bottom: 12px;
}

.sig-input-group label {
    display: block;
    font-size: 12px;
    color: #495057;
    margin-bottom: 6px;
}

.sig-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
}

.sig-input:focus {
    border-color: #339af0;
}

/* OCR 结果 */
#ocrResultContainer {
    margin-bottom: 8px;
}

#ocrResult {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
    resize: none;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

#ocrResult:focus {
    border-color: #339af0;
}

/* 历史记录 */
.sig-history-list {
    max-height: 150px;
    overflow-y: auto;
}

.sig-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sig-history-item:hover {
    background: #e9ecef;
}

.sig-history-thumb {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    background: #dee2e6;
}

.sig-history-info {
    flex: 1;
    min-width: 0;
}

.sig-history-name {
    font-size: 12px;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sig-history-date {
    font-size: 10px;
    color: #868e96;
}

.sig-empty-text {
    font-size: 12px;
    color: #adb5bd;
    text-align: center;
    padding: 16px;
}

.sig-clear-btn {
    width: 100%;
    padding: 8px;
    border: none;
    background: none;
    color: #868e96;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.sig-clear-btn:hover {
    color: #fa5252;
}

/* 预览区域 */
.sig-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f1f3f4;
}

.sig-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
}

.sig-preview-title {
    font-size: 14px;
    font-weight: 500;
    color: #343a40;
}

.sig-zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sig-zoom-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    color: #495057;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sig-zoom-btn:hover {
    background: #339af0;
    color: white;
    border-color: #339af0;
}

.sig-zoom-level {
    font-size: 12px;
    color: #868e96;
    min-width: 40px;
    text-align: center;
}

.sig-preview-canvas {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
    cursor: crosshair;
}

.sig-preview-canvas canvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    background: white;
}

.sig-placeholder {
    text-align: center;
    color: #adb5bd;
}

.sig-placeholder-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.sig-placeholder-text {
    font-size: 14px;
}

/* 高级面板 */
.sig-toggle-btn {
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #868e96;
    transition: transform 0.2s ease;
}

.sig-toggle-btn:hover {
    color: #495057;
}

.sig-advanced-panel {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #dee2e6;
}

/* 预设按钮 */
.sig-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sig-preset-btn {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    border-radius: 16px;
    background: #fff;
    font-size: 12px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sig-preset-btn:hover {
    background: #e7f5ff;
    border-color: #339af0;
    color: #228be6;
}

/* 导出选择 */
.sig-export-row {
    display: flex;
    gap: 8px;
}

.sig-export-row .sig-btn {
    flex: 1;
}

.sig-select {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 12px;
    background: #fff;
    color: #495057;
    outline: none;
    cursor: pointer;
}

.sig-select:focus {
    border-color: #339af0;
}

/* 历史记录增强 */
.sig-history-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sig-history-list {
    flex: 1;
    overflow-y: auto;
    max-height: 200px;
}

.sig-history-item.active {
    background: #e7f5ff;
    border: 1px solid #a5d8ff;
}

.sig-history-item .history-date {
    font-size: 10px;
    color: #868e96;
}

/* 裁剪提示 */
.sig-crop-hint {
    padding: 8px 20px;
    background: #fff9db;
    color: #e67700;
    font-size: 12px;
    text-align: center;
    border-top: 1px solid #ffe066;
}

/* 引擎状态 */
.sig-scanner-badge.opencv {
    background: #d3f9d8;
    color: #2b8a3e;
}

.sig-scanner-badge.basic {
    background: #e7f5ff;
    color: #1971c2;
}

.sig-scanner-badge.ready {
    background: #d3f9d8;
    color: #2b8a3e;
}

/* 占位符 */
.sig-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
}

.sig-placeholder .icon-lg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.sig-placeholder p {
    font-size: 14px;
}

/* 缩放重置按钮 */
.sig-zoom-btn.reset {
    font-size: 14px;
}

.sig-zoom-btn.reset:hover {
    background: #339af0;
    color: white;
    border-color: #339af0;
}

@media (max-width: 768px) {
    .sig-container {
        flex-direction: column;
    }

    .sig-toolbar {
        width: 100%;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
}
