.pqr-container {
    max-width: 900px;
    margin: 2rem auto;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 4px 16px rgba(37,99,235,.06);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pqr-header { text-align: center; margin-bottom: 2rem; }

.pqr-header-icon {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 56px; height: 56px;
    background: #2563eb;
    border-radius: 14px;
    margin-bottom: 1rem;
}

.pqr-header-icon svg { width: 28px; height: 28px; color: #ffffff; }

.pqr-title { font-size: 1.5rem; font-weight: 700; color: #1e293b; margin: 0 0 .3rem; }
.pqr-subtitle { font-size: .9rem; color: #64748b; margin: 0; }

/* Layout */
.pqr-main {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.pqr-col-options {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pqr-col-preview {
    width: 350px;
    flex-shrink: 0;
    position: sticky;
    top: 2rem;
}

/* Box */
.pqr-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
}

.pqr-label {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: .7rem;
}

/* Tipos */
.pqr-tipos {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.pqr-tipo {
    padding: .45rem .85rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
    color: #475569;
    transition: all .15s;
    font-family: inherit;
}

.pqr-tipo:hover { border-color: #93c5fd; background: #f0f7ff; }
.pqr-tipo.active { border-color: #2563eb; background: #eff6ff; color: #2563eb; }

/* Campos */
#pqr-campos { display: flex; flex-direction: column; gap: .6rem; }

.pqr-field { display: flex; flex-direction: column; gap: .25rem; }

.pqr-field label {
    font-size: .78rem;
    font-weight: 600;
    color: #334155;
}

.pqr-input {
    width: 100%;
    padding: .65rem .8rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: .88rem;
    font-family: inherit;
    color: #1e293b;
    outline: none;
    transition: all .15s;
    box-sizing: border-box;
    background: #ffffff;
}

.pqr-input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.06); }
.pqr-input::placeholder { color: #94a3b8; }
textarea.pqr-input { resize: vertical; min-height: 65px; }
select.pqr-input { cursor: pointer; }

.pqr-field-row { display: flex; gap: .5rem; }
.pqr-field-row .pqr-field { flex: 1; }

/* Cores */
.pqr-cores { display: flex; gap: 1rem; }

.pqr-cores > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.pqr-cores span { font-size: .75rem; font-weight: 600; color: #64748b; }

.pqr-cores input[type="color"] {
    width: 100%; height: 38px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    background: #ffffff;
}

/* Range */
#pqr-tamanho {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

#pqr-tamanho::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px; height: 20px;
    background: #2563eb;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(37,99,235,.3);
    cursor: pointer;
}

#pqr-tamanho::-moz-range-thumb {
    width: 20px; height: 20px;
    background: #2563eb;
    border-radius: 50%;
    border: 2px solid #ffffff;
    cursor: pointer;
}

#pqr-tam-label { color: #2563eb; }

/* Botão Gerar */
.pqr-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .8rem;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}

.pqr-btn:hover { background: #1d4ed8; box-shadow: 0 4px 12px rgba(37,99,235,.3); transform: translateY(-1px); }

/* Preview */
.pqr-preview-box {
    background: #ffffff;
    border: 2px dashed #dbeafe;
    border-radius: 14px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    transition: all .2s;
}

.pqr-preview-box.has-qr { border-style: solid; border-color: #e2e8f0; }

.pqr-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pqr-preview canvas,
.pqr-preview img { max-width: 100%; height: auto; border-radius: 6px; }

/* Ações */
.pqr-acoes {
    display: flex;
    gap: .5rem;
    margin-top: .75rem;
}

.pqr-btn-outline {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .55rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}

.pqr-btn-outline:hover { background: #eff6ff; border-color: #93c5fd; color: #2563eb; }

/* Footer */
.pqr-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    color: #94a3b8;
    font-size: .78rem;
}

.pqr-footer svg { color: #2563eb; flex-shrink: 0; }

/* Toast */
.pqr-toast {
    position: fixed;
    top: 1.5rem; right: 1.5rem;
    background: #2563eb;
    color: #ffffff;
    padding: .75rem 1.25rem;
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(37,99,235,.35);
    z-index: 9999;
    opacity: 0;
    transform: translateX(120%);
    transition: all .3s ease;
}

.pqr-toast.show { opacity: 1; transform: translateX(0); }

/* Responsivo */
@media (max-width: 768px) {
    .pqr-container { margin: 1rem; padding: 1.25rem; border-radius: 12px; }
    .pqr-title { font-size: 1.3rem; }
    .pqr-main { flex-direction: column; }
    .pqr-col-preview { width: 100%; position: static; }
    .pqr-preview-box { min-height: 220px; }
}

@media (max-width: 480px) {
    .pqr-tipos { gap: .3rem; }
    .pqr-tipo { padding: .35rem .6rem; font-size: .73rem; }
    .pqr-field-row { flex-direction: column; }
    .pqr-cores { flex-direction: column; gap: .5rem; }
}