* {
    box-sizing: border-box;
}


[hidden] {
    display: none !important;
}


:root {
    --bg: #080b14;
    --panel: rgba(17, 24, 39, .82);
    --panel-solid: #111827;
    --panel-soft: #182132;
    --border: rgba(255, 255, 255, .09);
    --text: #f8fafc;
    --muted: #94a3b8;
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --cyan: #22d3ee;
    --success: #22c55e;
    --danger: #ef4444;
    --shadow: 0 30px 80px rgba(0, 0, 0, .42);
}

html {
    color-scheme: dark;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 20% 0%, rgba(124, 58, 237, .13), transparent 34rem),
        radial-gradient(circle at 100% 80%, rgba(34, 211, 238, .08), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

.background-glow {
    position: fixed;
    z-index: -1;
    width: 28rem;
    height: 28rem;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .25;
}

.glow-one {
    top: -12rem;
    left: -8rem;
    background: var(--primary);
}

.glow-two {
    right: -12rem;
    bottom: -10rem;
    background: var(--cyan);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    box-shadow: 0 12px 30px rgba(124, 58, 237, .3);
    font-weight: 900;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 16px;
}

.brand small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.admin-link {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .035);
    color: #e2e8f0;
    transition: .2s ease;
}

.admin-link:hover {
    border-color: rgba(167, 139, 250, .45);
    background: rgba(124, 58, 237, .12);
}

.danger-link:hover {
    border-color: rgba(239, 68, 68, .45);
    background: rgba(239, 68, 68, .1);
}

.topbar-actions {
    display: flex;
    gap: 10px;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.intro {
    max-width: 780px;
    padding: 64px 0 36px;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--primary-light);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: .98;
    letter-spacing: -.055em;
}

.intro p,
.admin-header p,
.login-card > p {
    max-width: 700px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.generator-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr);
    gap: 22px;
    align-items: start;
}

.panel {
    border: 1px solid var(--border);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.form-panel,
.preview-panel {
    padding: 26px;
}

.preview-panel {
    position: sticky;
    top: 22px;
}

.panel-heading,
.panel-heading > div {
    display: flex;
    align-items: center;
}

.panel-heading {
    justify-content: space-between;
    margin-bottom: 24px;
}

.panel-heading > div {
    gap: 12px;
}

.panel-heading h2 {
    margin: 0;
    font-size: 20px;
}

.step {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    background: rgba(124, 58, 237, .18);
    color: var(--primary-light);
    font-size: 13px;
    font-weight: 900;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 9px;
    border: 1px solid rgba(167, 139, 250, .2);
    border-radius: 999px;
    background: rgba(124, 58, 237, .1);
    color: #c4b5fd;
    font-size: 11px;
    font-weight: 800;
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 9px;
    margin-bottom: 24px;
}

.type-card {
    display: flex;
    min-height: 66px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: rgba(255, 255, 255, .025);
    color: #cbd5e1;
    cursor: pointer;
    font-size: 12px;
    font-weight: 750;
    transition: .18s ease;
}

.type-card span {
    color: #94a3b8;
    font-size: 19px;
}

.type-card:hover,
.type-card.active {
    transform: translateY(-2px);
    border-color: rgba(167, 139, 250, .48);
    background: linear-gradient(145deg, rgba(124, 58, 237, .18), rgba(79, 70, 229, .08));
    color: #fff;
}

.type-card.active span {
    color: #c4b5fd;
}

.dynamic-fields {
    margin-bottom: 4px;
}

.field-row {
    display: grid;
    gap: 14px;
}

.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field,
.check-field {
    display: flex;
    margin-bottom: 15px;
}

.field {
    flex-direction: column;
    gap: 8px;
}

.field > span:first-child,
.check-field span {
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .1);
    outline: none;
    border-radius: 13px;
    background: rgba(5, 9, 18, .7);
    color: #f8fafc;
    transition: border-color .18s ease, box-shadow .18s ease;
}

input,
select {
    height: 48px;
    padding: 0 14px;
}

textarea {
    min-height: 110px;
    padding: 13px 14px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(167, 139, 250, .65);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, .12);
}

input::placeholder,
textarea::placeholder {
    color: #526077;
}

.check-field {
    min-height: 48px;
    align-items: center;
    gap: 10px;
    padding-top: 24px;
}

.check-field input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.color-input-wrap {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 8px;
}

.color-input-wrap input[type="color"] {
    padding: 5px;
    cursor: pointer;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 13px;
    padding: 0 17px;
    cursor: pointer;
    font-weight: 800;
    transition: .18s ease;
}

.button:hover:not(:disabled) {
    transform: translateY(-2px);
}

.button:disabled {
    cursor: not-allowed;
    opacity: .42;
}

.button.primary {
    background: linear-gradient(135deg, #8b5cf6, #4f46e5);
    color: #fff;
    box-shadow: 0 12px 26px rgba(79, 70, 229, .25);
}

.button.secondary {
    border: 1px solid rgba(167, 139, 250, .28);
    background: rgba(124, 58, 237, .12);
    color: #ddd6fe;
}

.button.ghost {
    border: 1px solid var(--border);
    background: transparent;
    color: #cbd5e1;
}

.button.danger {
    border: 1px solid rgba(239, 68, 68, .3);
    background: rgba(239, 68, 68, .1);
    color: #fca5a5;
}

.button.small {
    min-height: 39px;
    padding: 0 13px;
    font-size: 12px;
}

.full-width {
    width: 100%;
}

.message {
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 12px 14px;
    color: #cbd5e1;
    font-size: 13px;
}

.message.success {
    border-color: rgba(34, 197, 94, .25);
    background: rgba(34, 197, 94, .08);
    color: #86efac;
}

.message.error {
    border-color: rgba(239, 68, 68, .25);
    background: rgba(239, 68, 68, .08);
    color: #fca5a5;
}

.qr-stage {
    display: grid;
    min-height: 390px;
    place-items: center;
    overflow: auto;
    border: 1px dashed rgba(255, 255, 255, .11);
    border-radius: 22px;
    background:
        linear-gradient(45deg, rgba(255, 255, 255, .025) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, .025) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, .025) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, .025) 75%);
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-size: 20px 20px;
}

#qrcode {
    display: grid;
    max-width: 100%;
    padding: 18px;
    place-items: center;
}

#qrcode canvas,
#qrcode img {
    display: block;
    max-width: 100%;
    height: auto !important;
    border-radius: 10px;
}

.qr-placeholder {
    display: flex;
    max-width: 260px;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.placeholder-icon {
    display: block;
    margin-bottom: 12px;
    color: #64748b;
    font-size: 52px;
}

.qr-placeholder strong {
    margin-bottom: 7px;
}

.qr-placeholder small,
.privacy-note {
    color: var(--muted);
    line-height: 1.55;
}

.preview-meta {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
    margin: 18px 0;
}

.preview-meta > div {
    min-width: 0;
}

.preview-meta span,
.stat-card span,
.qr-card-top time {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.preview-meta strong {
    display: block;
    overflow: hidden;
    color: #e2e8f0;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-buttons .button {
    flex: 1;
}

.privacy-note {
    margin: 16px 0 0;
    font-size: 11px;
}

footer {
    display: flex;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding: 26px 0 40px;
    color: #64748b;
    font-size: 12px;
}

.login-page {
    display: grid;
    min-height: 100vh;
    padding: 24px;
    place-items: center;
}

.login-card {
    width: min(100%, 440px);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 34px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.login-brand {
    margin-bottom: 38px;
}

.login-card h1 {
    margin-bottom: 12px;
    font-size: 40px;
}

.login-card form {
    margin-top: 24px;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--muted);
    font-size: 13px;
}

.admin-shell {
    padding-top: 64px;
    padding-bottom: 60px;
}

.admin-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.admin-header h1 {
    margin-bottom: 14px;
    font-size: clamp(38px, 5vw, 64px);
}

.admin-header p {
    margin-bottom: 0;
    font-size: 15px;
}

code {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, .04);
    color: #c4b5fd;
}

.stat-card {
    min-width: 130px;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px 20px;
    background: var(--panel);
}

.stat-card strong {
    font-size: 32px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.qr-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--panel);
}

.qr-card-image {
    display: grid;
    min-height: 230px;
    padding: 20px;
    place-items: center;
    background: rgba(255, 255, 255, .025);
}

.qr-card-image img {
    display: block;
    width: 100%;
    border-radius: 10px;
}

.qr-card-body {
    min-width: 0;
    padding: 20px;
}

.qr-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.qr-card-top time {
    margin: 0;
    white-space: nowrap;
}

.qr-card h2 {
    margin: 16px 0 10px;
    font-size: 19px;
}

.content-preview {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.qr-details {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    color: #64748b;
    font-size: 11px;
}

.color-dot {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
}

.empty-state {
    padding: 70px 24px;
    text-align: center;
}

.empty-state p {
    color: var(--muted);
}

@media (max-width: 980px) {
    .generator-grid {
        grid-template-columns: 1fr;
    }

    .preview-panel {
        position: static;
    }

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

@media (max-width: 700px) {
    .intro {
        padding-top: 42px;
    }

    .type-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .check-field {
        padding-top: 0;
    }

    .form-panel,
    .preview-panel {
        padding: 18px;
        border-radius: 22px;
    }

    .qr-stage {
        min-height: 310px;
    }

    .admin-header {
        align-items: stretch;
        flex-direction: column;
    }

    .stat-card {
        width: 100%;
    }

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

    .qr-card-image img {
        max-width: 260px;
    }

    .topbar-actions {
        flex-direction: column;
    }

    footer {
        gap: 8px;
        flex-direction: column;
    }
}


.field-help {
    margin: -5px 0 18px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}


.admin-message {
    margin: 0 0 22px;
}

.forward-edit-form {
    margin: 14px 0 16px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: rgba(255, 255, 255, .025);
}

.forward-edit-form .field {
    margin-bottom: 10px;
}

.forward-edit-form input {
    height: 42px;
    font-size: 12px;
}


.admin-intro {
    padding-top: 10px;
}

.archive-header {
    margin-top: 70px;
    scroll-margin-top: 90px;
}

#generator,
#archief {
    scroll-margin-top: 90px;
}
