.qrcode-workbench-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 20px;
    margin-bottom: 16px;
}

.qrcode-workbench-head h2 {
    margin-bottom: 6px;
}

.qrcode-status {
    margin: 0;
    text-align: right;
    max-width: 420px;
}

.qrcode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.qrcode-tab {
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.qrcode-tab.active {
    color: var(--text);
    border-color: rgba(91, 124, 250, 0.5);
    background: rgba(91, 124, 250, 0.12);
}

.qrcode-panel[hidden] {
    display: none !important;
}

.qrcode-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 20px;
    align-items: start;
}

.qrcode-form label,
.qrcode-upload-label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.qrcode-textarea {
    width: 100%;
    min-height: 140px;
    resize: vertical;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #060912;
    color: #dbe4ff;
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 13px;
    line-height: 1.65;
    outline: none;
    box-sizing: border-box;
    flex: none;
}

.qrcode-textarea:focus {
    border-color: rgba(91, 124, 250, 0.65);
    box-shadow: 0 0 0 4px rgba(91, 124, 250, 0.15);
}

.qrcode-textarea-readonly {
    min-height: 120px;
    background: rgba(6, 9, 18, 0.85);
}

.qrcode-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.qrcode-options .form-field {
    min-width: 0;
}

.qrcode-options .form-field label {
    font-size: 12px;
    margin-bottom: 6px;
}

.tool-select-sm {
    width: 100%;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 0 10px;
    font-size: 13px;
    color-scheme: light;
    cursor: pointer;
    box-sizing: border-box;
    flex: none;
}

.tool-select-sm option {
    color: #1a2233;
    background: #eef2fb;
}

.qrcode-form .actions {
    margin-top: 16px;
    margin-bottom: 0;
}

.qrcode-preview-wrap {
    min-width: 0;
}

.qrcode-preview-title {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.qrcode-preview-box {
    position: relative;
    min-height: 280px;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-image-box {
    min-height: 320px;
}

#qrCodeMount {
    display: none;
    line-height: 0;
}

#qrCodeMount.visible {
    display: block;
}

#qrCodeMount canvas,
#qrCodeMount img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}

#decodePreview {
    display: none;
    max-width: 100%;
    max-height: 320px;
    border-radius: 8px;
    object-fit: contain;
}

#decodePreview.visible {
    display: block;
}

.qrcode-placeholder {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}

.qrcode-preview-box.has-content .qrcode-placeholder {
    display: none;
}

.qrcode-upload {
    margin-bottom: 16px;
}

.upload-zone-sm {
    border: 2px dashed rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
}

.upload-zone-sm:hover,
.upload-zone-sm.dragover {
    border-color: rgba(91, 124, 250, 0.5);
    background: rgba(91, 124, 250, 0.06);
}

.upload-zone-sm input {
    display: none;
}

.status-msg.success {
    color: #7dcea0;
}

.status-msg.error {
    color: #f08a8a;
}

@media (max-width: 900px) {
    .qrcode-layout {
        grid-template-columns: 1fr;
    }

    .qrcode-status {
        text-align: left;
        max-width: none;
    }
}

@media (max-width: 560px) {
    .qrcode-options {
        grid-template-columns: 1fr;
    }
}
