/* =========================================
   RESET
========================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --background: #080b10;
    --surface: #0e131b;
    --surface-light: #151b25;
    --surface-hover: #1a2230;

    --border: #252d3a;
    --border-light: #313b4b;

    --text: #f5f7fa;
    --muted: #929dad;
    --muted-light: #bac2cd;

    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --accent-dark: #d97706;

    --danger: #ef4444;

    --max-width: 1180px;

    --radius-small: 10px;
    --radius: 18px;
    --radius-large: 26px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 20% 0%,
            rgba(245, 158, 11, 0.08),
            transparent 25%
        ),
        var(--background);

    color: var(--text);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.6;

    overflow-x: hidden;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================
   BACKGROUND
========================================= */

.background-glow {
    position: fixed;

    width: 500px;
    height: 500px;

    border-radius: 50%;

    filter: blur(120px);

    pointer-events: none;

    z-index: -1;

    opacity: 0.08;
}

.glow-one {
    background: var(--accent);

    top: -250px;
    right: -200px;
}

.glow-two {
    background: #2563eb;

    left: -300px;
    bottom: -250px;
}


/* =========================================
   HEADER
========================================= */

.site-header {
    width: min(
        calc(100% - 40px),
        var(--max-width)
    );

    margin: 0 auto;

    min-height: 84px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.logo span {
    color: var(--accent);
}

.header-badge {
    padding: 7px 12px;

    border: 1px solid var(--border);

    background: rgba(
        255,
        255,
        255,
        0.025
    );

    border-radius: 999px;

    color: var(--muted-light);

    font-size: 0.76rem;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.08em;
}


/* =========================================
   PAGE
========================================= */

.page {
    width: min(
        calc(100% - 40px),
        var(--max-width)
    );

    margin: 0 auto;
}


/* =========================================
   HERO
========================================= */

.hero {
    max-width: 780px;

    padding: 70px 0 60px;
}

.hero-label,
.eyebrow {
    color: var(--accent);

    font-size: 0.72rem;
    font-weight: 700;

    letter-spacing: 0.15em;

    text-transform: uppercase;
}

.hero h1 {
    margin-top: 18px;

    max-width: 750px;

    font-size: clamp(
        3rem,
        8vw,
        5.8rem
    );

    line-height: 0.98;

    letter-spacing: -0.065em;

    font-weight: 800;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    max-width: 650px;

    margin-top: 28px;

    color: var(--muted);

    font-size: 1.05rem;
}


/* =========================================
   GENERATOR LAYOUT
========================================= */

.generator {
    display: grid;

    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(350px, 0.85fr);

    gap: 20px;

    align-items: stretch;
}

.generator-panel,
.preview-panel {
    border: 1px solid var(--border);

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,0.025),
            rgba(255,255,255,0)
        ),
        var(--surface);

    border-radius: var(--radius-large);
}

.generator-panel {
    padding: 34px;
}

.preview-panel {
    padding: 34px;

    display: flex;
    flex-direction: column;
}


/* =========================================
   PANEL HEADERS
========================================= */

.panel-heading,
.preview-header,
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;
}

.panel-heading h2,
.preview-header h2 {
    margin-top: 5px;

    font-size: 1.35rem;

    letter-spacing: -0.03em;
}

.character-count {
    color: var(--muted);

    font-size: 0.75rem;

    white-space: nowrap;
}


/* =========================================
   FORM
========================================= */

.field {
    display: flex;
    flex-direction: column;

    gap: 9px;
}

.generator-panel > .field {
    margin-top: 30px;
}

label {
    font-size: 0.82rem;

    font-weight: 600;

    color: var(--muted-light);
}

textarea,
input[type="text"],
select {
    width: 100%;

    border: 1px solid var(--border);

    border-radius: var(--radius-small);

    background: #0a0e14;

    color: var(--text);

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

textarea:focus,
input[type="text"]:focus,
select:focus {
    border-color: var(--accent);

    box-shadow:
        0 0 0 3px
        rgba(245, 158, 11, 0.08);

    background: #0c1118;
}

textarea {
    min-height: 150px;

    padding: 16px 75px 16px 16px;

    resize: vertical;
}

input[type="text"],
select {
    min-height: 48px;

    padding: 0 14px;
}

select {
    cursor: pointer;
}

.field-help {
    color: var(--muted);

    font-size: 0.74rem;
}


/* =========================================
   TEXTAREA
========================================= */

.textarea-wrapper {
    position: relative;
}

.inside-button {
    position: absolute;

    top: 12px;
    right: 12px;

    border: 1px solid var(--border);

    background: var(--surface-light);

    color: var(--muted-light);

    padding: 6px 10px;

    border-radius: 7px;

    font-size: 0.7rem;
    font-weight: 600;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.inside-button:hover {
    background: var(--surface-hover);

    color: var(--text);
}


/* =========================================
   SETTINGS
========================================= */

.settings-grid,
.color-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;

    margin-top: 22px;
}


/* =========================================
   COLORS
========================================= */

.color-section {
    margin-top: 32px;

    padding-top: 30px;

    border-top: 1px solid var(--border);
}

.section-title h3 {
    margin-top: 4px;

    font-size: 1rem;
}

.text-button {
    border: 0;

    background: none;

    color: var(--muted);

    font-size: 0.75rem;
}

.text-button:hover {
    color: var(--accent);
}

.color-input {
    display: grid;

    grid-template-columns: 52px 1fr;

    gap: 8px;
}

input[type="color"] {
    width: 52px;
    height: 48px;

    border: 1px solid var(--border);

    border-radius: var(--radius-small);

    background: #0a0e14;

    cursor: pointer;

    padding: 5px;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 6px;
}


/* =========================================
   PRESETS
========================================= */

.preset-section {
    margin-top: 18px;
}

.preset-label {
    display: block;

    margin-bottom: 10px;

    color: var(--muted);

    font-size: 0.74rem;
}

.preset-list {
    display: flex;

    gap: 9px;

    flex-wrap: wrap;
}

.color-preset {
    width: 44px;
    height: 44px;

    display: grid;

    grid-template-columns: 1fr 1fr;

    border: 1px solid var(--border);

    border-radius: 10px;

    overflow: hidden;

    background: none;

    padding: 4px;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease;
}

.color-preset:hover {
    transform: translateY(-2px);

    border-color: var(--border-light);
}

.color-preset.active {
    border-color: var(--accent);

    box-shadow:
        0 0 0 2px
        rgba(245, 158, 11, 0.1);
}

.color-preset span {
    height: 100%;
}


/* =========================================
   ACTIONS
========================================= */

.actions {
    display: grid;

    grid-template-columns:
        1fr auto;

    gap: 10px;

    margin-top: 30px;
}

.primary-button,
.secondary-button,
.download-button {
    min-height: 50px;

    border-radius: 11px;

    border: 0;

    font-weight: 700;

    transition:
        transform 0.15s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.primary-button {
    background: var(--accent);

    color: #111;

    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.primary-button:hover {
    background: var(--accent-light);

    transform: translateY(-1px);
}

.button-arrow {
    font-size: 1.2rem;
}

.secondary-button {
    min-width: 100px;

    padding: 0 18px;

    border: 1px solid var(--border);

    background: var(--surface-light);

    color: var(--muted-light);
}

.secondary-button:hover {
    color: var(--text);

    border-color: var(--border-light);

    transform: translateY(-1px);
}


/* =========================================
   SHORTCUT
========================================= */

.shortcut {
    display: flex;
    align-items: center;

    gap: 5px;

    margin-top: 14px;

    color: var(--muted);

    font-size: 0.68rem;
}

kbd {
    padding: 2px 6px;

    border: 1px solid var(--border);

    border-radius: 5px;

    background: var(--surface-light);

    color: var(--muted-light);

    font-size: 0.64rem;
}


/* =========================================
   ERROR
========================================= */

.error-message {
    margin-top: 20px;

    padding: 12px 14px;

    background:
        rgba(239, 68, 68, 0.08);

    border: 1px solid
        rgba(239, 68, 68, 0.25);

    border-radius: 9px;

    color: #fca5a5;

    font-size: 0.78rem;
}


/* =========================================
   PREVIEW
========================================= */

.status {
    display: flex;
    align-items: center;

    gap: 7px;

    color: var(--muted);

    font-size: 0.72rem;
}

.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #22c55e;

    box-shadow:
        0 0 10px
        rgba(34, 197, 94, 0.6);
}

.qr-placeholder {
    flex: 1;

    min-height: 430px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.placeholder-icon {
    width: 90px;
    height: 90px;

    display: grid;
    place-items: center;

    border: 1px solid var(--border);

    border-radius: 22px;

    background: var(--surface-light);

    margin-bottom: 22px;
}

.qr-placeholder h3 {
    font-size: 1rem;

    margin-bottom: 6px;
}

.qr-placeholder p {
    max-width: 240px;

    color: var(--muted);

    font-size: 0.78rem;
}

.mini-qr {
    width: 45px;
    height: 45px;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    grid-template-rows:
        repeat(3, 1fr);

    gap: 3px;
}

.mini-qr span {
    background: var(--muted);

    border-radius: 1px;
}

.mini-qr span:nth-child(2),
.mini-qr span:nth-child(4),
.mini-qr span:nth-child(8) {
    opacity: 0.15;
}


/* =========================================
   QR RESULT
========================================= */

.qr-result {
    flex: 1;

    padding-top: 34px;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-frame {
    max-width: 100%;

    padding: 22px;

    display: grid;
    place-items: center;

    background: #fff;

    border-radius: 18px;

    box-shadow:
        0 20px 60px
        rgba(0,0,0,0.32);

    overflow: auto;
}

#qr-code {
    display: grid;

    place-items: center;
}

#qr-code canvas,
#qr-code img {
    display: block;

    max-width: 100%;

    height: auto !important;
}

.qr-info {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 8px;

    margin-top: 26px;
}

.qr-info div {
    padding: 13px 10px;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: rgba(
        255,
        255,
        255,
        0.015
    );

    text-align: center;
}

.qr-info span {
    display: block;

    color: var(--muted);

    font-size: 0.62rem;

    margin-bottom: 3px;
}

.qr-info strong {
    font-size: 0.74rem;
}

.download-button {
    width: 100%;

    margin-top: 10px;

    border: 1px solid var(--border);

    background: var(--surface-light);

    color: var(--text);
}

.download-button:hover {
    border-color: var(--accent);

    color: var(--accent-light);

    transform: translateY(-1px);
}


/* =========================================
   PRIVACY
========================================= */

.privacy-note {
    display: flex;
    align-items: center;

    gap: 11px;

    margin-top: 26px;

    padding-top: 22px;

    border-top: 1px solid var(--border);
}

.privacy-icon {
    width: 30px;
    height: 30px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        rgba(34, 197, 94, 0.08);

    color: #4ade80;

    font-size: 0.7rem;
}

.privacy-note strong {
    display: block;

    font-size: 0.75rem;
}

.privacy-note p {
    color: var(--muted);

    font-size: 0.67rem;
}


/* =========================================
   FEATURES
========================================= */

.features {
    margin-top: 20px;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;
}

.feature {
    min-height: 160px;

    padding: 25px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    border: 1px solid var(--border);

    border-radius: var(--radius);

    background: rgba(
        255,
        255,
        255,
        0.012
    );
}

.feature-number {
    color: var(--accent);

    font-family: monospace;

    font-size: 0.7rem;
}

.feature h3 {
    margin-top: 25px;

    font-size: 0.92rem;
}

.feature p {
    margin-top: 7px;

    color: var(--muted);

    font-size: 0.76rem;
}


/* =========================================
   FOOTER
========================================= */

.footer {
    width: min(
        calc(100% - 40px),
        var(--max-width)
    );

    margin: 70px auto 0;

    padding: 30px 0 40px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-top: 1px solid var(--border);

    color: var(--muted);

    font-size: 0.72rem;
}

.footer strong {
    color: var(--muted-light);
}


/* =========================================
   UTILITIES
========================================= */

.hidden {
    display: none !important;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 900px) {

    .generator {
        grid-template-columns: 1fr;
    }

    .preview-panel {
        min-height: 600px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .feature {
        min-height: 130px;
    }

}


@media (max-width: 600px) {

    .site-header,
    .page,
    .footer {
        width: min(
            calc(100% - 28px),
            var(--max-width)
        );
    }

    .hero {
        padding-top: 45px;
    }

    .hero h1 {
        font-size: 3.3rem;
    }

    .generator-panel,
    .preview-panel {
        padding: 22px;

        border-radius: 20px;
    }

    .settings-grid,
    .color-grid {
        grid-template-columns: 1fr;
    }

    .panel-heading,
    .preview-header,
    .section-title {
        flex-direction: column;

        gap: 8px;
    }

    .actions {
        grid-template-columns: 1fr;
    }

    .secondary-button {
        width: 100%;
    }

    .qr-info {
        grid-template-columns: 1fr;
    }

    .qr-placeholder {
        min-height: 330px;
    }

    .footer {
        flex-direction: column;

        gap: 6px;

        align-items: flex-start;
    }

}

/* =========================================
   PDF EDITOR
========================================= */

.pdf-editor-section {
    margin-top: 24px;

    padding: 34px;

    border: 1px solid var(--border);

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,0.025),
            rgba(255,255,255,0)
        ),
        var(--surface);

    border-radius: var(--radius-large);
}

.pdf-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;

    margin-bottom: 28px;
}

.pdf-editor-header h2 {
    margin-top: 5px;

    font-size: 1.35rem;

    letter-spacing: -0.03em;
}

.pdf-editor-header p {
    margin-top: 7px;

    color: var(--muted);

    font-size: 0.78rem;
}


/* =========================================
   PDF UPLOAD
========================================= */

.pdf-upload-area {
    margin-top: 20px;

    padding: 22px;

    border: 1px dashed var(--border-light);

    border-radius: var(--radius);

    background: rgba(
        255,
        255,
        255,
        0.012
    );

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.pdf-upload-area:hover {
    border-color: var(--accent);

    background:
        rgba(245, 158, 11, 0.025);
}

.pdf-upload-area label {
    display: flex;
    flex-direction: column;

    gap: 8px;

    cursor: pointer;
}

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

    font-size: 0.9rem;
}

.pdf-upload-area span {
    color: var(--muted);

    font-size: 0.72rem;
}

#pdf-upload {
    margin-top: 12px;

    width: 100%;

    color: var(--muted);

    font-size: 0.75rem;
}

#pdf-upload::file-selector-button {
    margin-right: 12px;

    padding: 9px 13px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: var(--surface-light);

    color: var(--text);

    cursor: pointer;
}


/* =========================================
   PDF TOOLBAR
========================================= */

.pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-top: 22px;

    padding: 14px;

    border: 1px solid var(--border);

    border-radius: 12px;

    background: #0a0e14;

    flex-wrap: wrap;
}

.pdf-navigation,
.pdf-actions {
    display: flex;
    align-items: center;

    gap: 8px;

    flex-wrap: wrap;
}

.pdf-toolbar button {
    min-height: 38px;

    padding: 0 13px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: var(--surface-light);

    color: var(--muted-light);

    font-size: 0.73rem;
    font-weight: 700;

    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background 0.2s ease;
}

.pdf-toolbar button:hover:not(:disabled) {
    border-color: var(--accent);

    color: var(--accent-light);

    background: var(--surface-hover);
}

.pdf-toolbar button:disabled {
    opacity: 0.35;

    cursor: not-allowed;
}

#page-indicator {
    min-width: 90px;

    text-align: center;

    color: var(--muted-light);

    font-size: 0.72rem;
}


/* =========================================
   PDF WORKSPACE
========================================= */

.pdf-workspace {
    margin-top: 20px;

    min-height: 500px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    border: 1px solid var(--border);

    border-radius: var(--radius);

    background:
        repeating-conic-gradient(
            rgba(255,255,255,0.015)
            0% 25%,
            transparent 0% 50%
        )
        0 / 24px 24px,
        #070a0f;

    overflow: auto;
}


/* =========================================
   EMPTY STATE
========================================= */

.pdf-empty-state {
    min-height: 360px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.pdf-empty-icon {
    width: 72px;
    height: 72px;

    display: grid;
    place-items: center;

    margin-bottom: 18px;

    border: 1px solid var(--border);

    border-radius: 18px;

    background: var(--surface-light);

    color: var(--accent);

    font-size: 1.6rem;
}

.pdf-empty-state h3 {
    font-size: 1rem;

    margin-bottom: 5px;
}

.pdf-empty-state p {
    max-width: 280px;

    color: var(--muted);

    font-size: 0.76rem;
}


/* =========================================
   PDF CANVAS
========================================= */

#pdf-canvas-wrapper {
    position: relative;

    display: inline-block;

    background: white;

    box-shadow:
        0 25px 80px
        rgba(0, 0, 0, 0.5);

    user-select: none;
}

#pdf-canvas {
    display: block;

    max-width: none;
}


/* =========================================
   QR OVERLAY
========================================= */

#pdf-qr-overlay {
    position: absolute;

    display: block;

    object-fit: contain;

    cursor: grab;

    touch-action: none;

    z-index: 10;

    border: 2px solid var(--accent);

    border-radius: 4px;

    box-shadow:
        0 0 0 2px
        rgba(245, 158, 11, 0.18),
        0 10px 30px
        rgba(0,0,0,0.3);

    background: white;
}

#pdf-qr-overlay:active {
    cursor: grabbing;
}


/* =========================================
   QR SIZE CONTROL
========================================= */

.pdf-size-control {
    margin-top: 18px;

    display: grid;

    grid-template-columns:
        auto 1fr auto;

    align-items: center;

    gap: 14px;

    padding: 15px;

    border: 1px solid var(--border);

    border-radius: 11px;

    background: rgba(
        255,
        255,
        255,
        0.012
    );
}

.pdf-size-control label {
    white-space: nowrap;
}

#pdf-qr-size {
    width: 100%;

    accent-color: var(--accent);

    cursor: pointer;
}

#pdf-qr-size-value {
    min-width: 60px;

    text-align: right;

    color: var(--muted-light);

    font-family: monospace;

    font-size: 0.72rem;
}


/* =========================================
   PDF MAIN ACTIONS
========================================= */

.pdf-main-actions {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;

    margin-top: 18px;
}

.pdf-main-actions button {
    min-height: 48px;

    padding: 0 16px;

    border-radius: 10px;

    font-weight: 700;

    transition:
        transform 0.15s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

#add-qr-to-pdf-btn {
    border: 0;

    background: var(--accent);

    color: #111;
}

#add-qr-to-pdf-btn:hover:not(:disabled) {
    background: var(--accent-light);

    transform: translateY(-1px);
}

#remove-qr-from-pdf-btn {
    border: 1px solid var(--border);

    background: var(--surface-light);

    color: var(--muted-light);
}

#remove-qr-from-pdf-btn:hover:not(:disabled) {
    border-color: var(--danger);

    color: #fca5a5;
}

#export-pdf-btn {
    border: 1px solid var(--accent);

    background:
        rgba(245, 158, 11, 0.08);

    color: var(--accent-light);
}

#export-pdf-btn:hover:not(:disabled) {
    background:
        rgba(245, 158, 11, 0.15);

    transform: translateY(-1px);
}

.pdf-main-actions button:disabled {
    opacity: 0.35;

    cursor: not-allowed;

    transform: none;
}


/* =========================================
   PDF INFO
========================================= */

.pdf-editor-note {
    margin-top: 16px;

    padding: 13px 14px;

    border-left: 2px solid var(--accent);

    background:
        rgba(245, 158, 11, 0.035);

    color: var(--muted);

    font-size: 0.72rem;

    border-radius:
        0 8px 8px 0;
}


/* =========================================
   PDF RESPONSIVE
========================================= */

@media (max-width: 900px) {

    .pdf-editor-section {
        padding: 24px;
    }

    .pdf-main-actions {
        grid-template-columns: 1fr;
    }

    .pdf-workspace {
        justify-content: flex-start;
    }

}


@media (max-width: 600px) {

    .pdf-editor-section {
        padding: 20px;
    }

    .pdf-editor-header {
        flex-direction: column;
    }

    .pdf-toolbar {
        align-items: stretch;
    }

    .pdf-navigation,
    .pdf-actions {
        width: 100%;
    }

    .pdf-toolbar button {
        flex: 1;
    }

    .pdf-size-control {
        grid-template-columns: 1fr;
    }

    #pdf-qr-size-value {
        text-align: left;
    }

    .pdf-workspace {
        padding: 14px;

        min-height: 420px;
    }

}
/* =========================================
   PDF EDITOR - HTML COMPATIBILITY FIX
========================================= */

.hidden {
    display: none !important;
}

.pdf-editor-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.pdf-controls {
    display: flex;
    flex-direction: column;
    gap: 18px;

    padding: 22px;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: var(--surface);
}

.pdf-controls input[type="file"] {
    width: 100%;
}

.pdf-page-controls,
.pdf-qr-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pdf-page-controls {
    justify-content: space-between;
}

#page-indicator {
    color: var(--muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

.pdf-qr-controls button {
    flex: 1;
}

#pdf-qr-size {
    width: 100%;
    accent-color: var(--accent);
}

#pdf-qr-size-value {
    display: inline-block;
    margin-top: 8px;

    color: var(--muted);
    font-size: 0.78rem;
}

.pdf-preview-panel {
    min-height: 520px;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    overflow: auto;

    padding: 28px;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background:
        radial-gradient(
            circle at top,
            rgba(245, 158, 11, 0.04),
            transparent 40%
        ),
        rgba(0, 0, 0, 0.18);
}

#pdf-canvas-wrapper {
    position: relative;
    flex: 0 0 auto;
}

#pdf-canvas {
    display: block;
}

#pdf-qr-overlay {
    position: absolute;
    z-index: 20;

    cursor: grab;
    touch-action: none;

    user-select: none;
    -webkit-user-drag: none;
}

#pdf-qr-overlay:active {
    cursor: grabbing;
}

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

    .pdf-preview-panel {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .pdf-page-controls,
    .pdf-qr-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .pdf-page-controls button,
    .pdf-qr-controls button {
        width: 100%;
    }

    #page-indicator {
        text-align: center;
    }

    .pdf-preview-panel {
        padding: 14px;
        min-height: 400px;
    }
}
