/* ===== QR Generator ===== */
.qr-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    color: white; padding: 3rem 0 2.5rem; text-align: center;
}
.qr-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.qr-hero p  { opacity: 0.8; font-size: 1rem; }

.qr-main { padding: 2rem 0 3rem; }

.qr-card {
    background: white; border: 1px solid #e5e7eb;
    border-radius: 12px; padding: 1.5rem; margin-bottom: 1rem;
}

.qr-section-title {
    font-size: 15px; font-weight: 700; color: #111827;
    margin-bottom: 1.25rem; display: flex; align-items: center; gap: 10px;
}
.qr-step {
    width: 26px; height: 26px; border-radius: 50%;
    background: #0f172a; color: white;
    font-size: 13px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.qr-sublabel {
    font-size: 11px; font-weight: 700; color: #9ca3af;
    text-transform: uppercase; letter-spacing: 0.6px;
    margin-bottom: 10px; display: block;
}
.qr-field-label { font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 4px; display: block; }
.qr-input { font-size: 14px; border-radius: 8px; border: 1px solid #e5e7eb; }
.qr-input:focus { border-color: #0f172a; box-shadow: 0 0 0 2px rgba(15,23,42,0.1); }
.qr-hint { font-size: 12px; color: #9ca3af; }

/* Type selector */
.qr-type-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.qr-type-opt {
    border: 1.5px solid #e5e7eb; border-radius: 10px;
    padding: 12px 8px; text-align: center; cursor: pointer;
    transition: all 0.15s; display: flex; flex-direction: column;
    align-items: center; gap: 6px;
}
.qr-type-opt span:last-child { font-size: 12px; font-weight: 600; color: #374151; }
.qr-type-opt:hover { border-color: #0f172a; background: #f8fafc; }
.qr-type-opt.active { border-color: #0f172a; background: #0f172a; }
.qr-type-opt.active span:last-child { color: white; }
.qr-type-icon { font-size: 22px; }

/* Style grid */
.qr-style-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.qr-style-opt {
    border: 1.5px solid #e5e7eb; border-radius: 10px;
    padding: 10px 6px; text-align: center; cursor: pointer;
    transition: all 0.15s; display: flex; flex-direction: column;
    align-items: center; gap: 6px;
}
.qr-style-opt span { font-size: 11px; font-weight: 600; color: #6b7280; }
.qr-style-opt:hover { border-color: #0f172a; }
.qr-style-opt.active { border-color: #0f172a; background: #f0f4ff; }
.qr-style-opt canvas { display: block; }

/* Colors */
.qr-color-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.qr-swatch {
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
}
.qr-swatch:hover { transform: scale(1.15); }
.qr-swatch.active { box-shadow: 0 0 0 3px white, 0 0 0 5px #0f172a; transform: scale(1.1); }
.qr-swatch-custom { display: flex; flex-direction: column; align-items: center; }
.qr-color-input {
    width: 32px; height: 32px; border-radius: 50%;
    border: none; cursor: pointer; padding: 0;
    overflow: hidden;
}

/* Logo */
.qr-logo-preview { display: flex; align-items: center; gap: 10px; }
.qr-logo-preview img { height: 48px; width: 48px; object-fit: contain; border-radius: 6px; border: 1px solid #e5e7eb; }

/* Generate button */
.qr-btn-generate {
    background: #0f172a; color: white; border: none;
    border-radius: 10px; padding: 14px; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: background 0.2s;
}
.qr-btn-generate:hover:not(:disabled) { background: #1e293b; }
.qr-btn-generate:disabled { opacity: 0.6; cursor: not-allowed; }

/* Preview card */
.qr-preview-card {
    background: white; border: 1px solid #e5e7eb;
    border-radius: 12px; padding: 1.5rem;
    position: sticky; top: 80px;
}
.qr-preview-box {
    background: #f8f9fa; border-radius: 10px;
    min-height: 260px; display: flex;
    align-items: center; justify-content: center;
    padding: 1rem;
}
.qr-empty-state { text-align: center; color: #9ca3af; }
.qr-empty-state p { margin-top: 10px; font-size: 13px; }
.qr-loading-box { text-align: center; color: #6b7280; font-size: 13px; }
.qr-loading-box p { margin-top: 8px; }
#qr-canvas { margin: 0 auto; display: block; }

/* Type badge */
.qr-type-badge {
    display: flex; justify-content: center;
}
.qr-type-badge span {
    background: #eff6ff; color: #2563eb;
    font-size: 12px; font-weight: 600;
    padding: 4px 14px; border-radius: 50px;
}

/* Download */
.qr-download-section {}
.qr-format-row { display: flex; gap: 8px; margin-top: 8px; }
.qr-format-btn {
    flex: 1; border: 1.5px solid #e5e7eb; background: white;
    border-radius: 8px; padding: 8px; font-size: 13px; font-weight: 700;
    cursor: pointer; transition: all 0.15s; color: #374151;
}
.qr-format-btn:hover { border-color: #0f172a; background: #f8fafc; }
.qr-format-btn.active { background: #0f172a; color: white; border-color: #0f172a; }
.qr-btn-download {
    background: #16a34a; color: white; border: none;
    border-radius: 10px; padding: 12px; font-size: 14px; font-weight: 700;
    cursor: pointer; transition: background 0.2s; width: 100%;
}
.qr-btn-download:hover { background: #15803d; }

/* Tips */
.qr-tips {
    background: #fffbeb; border-radius: 10px;
    padding: 1rem 1rem 0.75rem;
}
.qr-tips-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: #92400e; }
.qr-tips ul { margin: 0; padding-left: 1.2rem; }
.qr-tips li { font-size: 12px; color: #78350f; line-height: 1.7; }

/* Responsive */
@media (max-width: 768px) {
    .qr-type-grid { grid-template-columns: repeat(2, 1fr); }
    .qr-style-grid { grid-template-columns: repeat(2, 1fr); }
    .qr-preview-card { position: static; }
}

/* ── Guest mode ─────────────────────────────── */
.qr-guest-banner {
    background: #1e293b; color: rgba(255,255,255,0.9);
    font-size: 13px; border-bottom: 2px solid #c41230;
}
.qr-guest-banner strong { color: white; }
.qr-guest-login {
    color: rgba(255,255,255,0.8); font-size: 12px; font-weight: 500;
    text-decoration: none; padding: 5px 12px; border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.3); white-space: nowrap;
    transition: all 0.15s;
}
.qr-guest-login:hover { color: white; background: rgba(255,255,255,0.1); }
.qr-guest-register {
    background: #c41230; color: white; font-size: 12px; font-weight: 700;
    text-decoration: none; padding: 5px 12px; border-radius: 5px;
    white-space: nowrap; transition: all 0.15s;
}
.qr-guest-register:hover { background: #a50f28; color: white; }

.qr-type-locked {
    opacity: 0.5; cursor: pointer; position: relative;
}
.qr-type-locked::after {
    content: "🔒"; position: absolute; top: 6px; right: 6px;
    font-size: 11px;
}
.qr-guest-lock-row {
    background: #f8f9fa; border: 1.5px dashed #e5e7eb;
    border-radius: 8px; padding: 12px 16px; cursor: pointer;
    font-size: 13px; color: #6b7280; margin-bottom: 0.5rem;
    transition: all 0.15s;
}
.qr-guest-lock-row:hover { border-color: #c41230; color: #c41230; background: #fff5f5; }
.qr-guest-lock-row strong { color: #c41230; }
