* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    color: #333;
}

.hidden {
    display: none !important;
}

.section {
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Login Section */
#loginSection {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    padding: 50px 40px;
    text-align: center;
    max-width: 560px;
    width: 100%;
}

.login-features {
    margin-top: 36px;
    text-align: left;
    border-top: 1px solid #f0f0f0;
    padding-top: 28px;
}

.login-features h2 {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 18px;
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.feature-item svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-item strong {
    display: block;
    font-size: 13px;
    color: #1a1a2e;
    margin-bottom: 2px;
}

.feature-item p {
    font-size: 12px;
    color: #888;
    margin: 0;
}

@media (max-width: 480px) {
    .feature-grid { grid-template-columns: 1fr; }
}

.logo {
    color: #667eea;
    margin-bottom: 20px;
}

.login-container h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.subtitle {
    color: #666;
    margin-bottom: 35px;
    font-size: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.google-btn {
    background: white;
    color: #333;
    border: 2px solid #e0e0e0;
}

.google-btn:hover {
    background: #f8f9fa;
    border-color: #ccc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.terms {
    margin-top: 25px;
    font-size: 12px;
    color: #999;
}

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #667eea;
    font-weight: 700;
    font-size: 18px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

#userName {
    font-weight: 500;
    color: #333;
}

.btn-logout {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #e9ecef;
    color: #333;
}

/* Main Content */
.main-content {
    padding: 40px 20px;
}

.app-container {
    max-width: 500px;
}

.generator-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.generator-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.section-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
    font-family: inherit;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-bottom: 15px;
    display: none;
}

/* Options Group */
.options-group {
    margin-bottom: 20px;
}

.options-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #444;
}

/* Color Options */
.color-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: #333;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #667eea;
}

/* Frame Options */
.frame-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.frame-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 70px;
}

.frame-btn:hover {
    border-color: #667eea;
}

.frame-btn.active {
    border-color: #667eea;
    background: #f0f3ff;
}

.frame-preview {
    font-size: 10px;
    font-weight: 700;
    padding: 8px 6px;
    border-radius: 4px;
    margin-bottom: 5px;
}

.no-frame {
    background: #f0f0f0;
    color: #666;
}

.scan-frame {
    background: #000;
    color: #fff;
    font-size: 8px;
}

.point-frame {
    font-size: 20px;
    padding: 4px 8px;
}

.frame-label {
    font-size: 11px;
    color: #666;
}

/* QR Frame Wrapper */
.qr-frame-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.qr-frame {
    display: inline-block;
    padding: 15px;
    border-radius: 16px;
    background: white;
}

.qr-frame.has-frame {
    border: 4px solid #000;
    padding: 10px 15px;
}

.frame-text {
    text-align: center;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 2px;
    display: none;
}

.frame-text.top {
    margin-bottom: 10px;
}

.frame-text.bottom {
    margin-top: 10px;
}

.qr-frame.has-frame .frame-text {
    display: block;
}

.qr-frame.point-style {
    position: relative;
}

.qr-frame.point-style::before {
    content: "☞";
    position: absolute;
    left: -35px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
}

.qr-result {
    margin-top: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 16px;
    text-align: center;
    display: none;
}

.qr-result.active {
    display: block;
}

#qrcode {
    display: flex;
    justify-content: center;
}

#qrcode canvas,
#qrcode img {
    border-radius: 8px;
}

.url-display {
    word-break: break-all;
    color: #666;
    font-size: 13px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
}

.qr-buttons {
    display: flex;
    gap: 10px;
}

.qr-buttons .btn {
    flex: 1;
}

.btn-email {
    background: #0066cc;
    color: white;
}

.btn-email:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);
}

.btn-email:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.email-status {
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}

.email-status.success {
    color: #28a745;
}

.email-status.error {
    color: #dc3545;
}

/* Support Section */
.support-section {
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.support-card {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.support-content {
    flex: 1;
}

.support-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.support-content p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.support-qr {
    text-align: center;
}

.support-qr img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    object-fit: cover;
}

.scan-text {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

/* QR History Section */
.history-section {
    padding: 20px 20px 40px;
}

.history-card {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.history-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 5px;
}

.history-subtitle {
    color: #888;
    font-size: 13px;
    margin-bottom: 20px;
}

.qr-history-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.history-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.history-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.history-item img {
    width: 100%;
    max-width: 100px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

.history-item .history-url {
    font-size: 11px;
    color: #666;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
    line-height: 1.4;
}

.history-item .history-date {
    font-size: 10px;
    color: #999;
    margin-bottom: 10px;
}

.btn-small {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 8px;
    width: auto;
}

.no-history {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 30px;
}

/* Privacy Notice */
.privacy-notice {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-top: 1px solid #b1dfbb;
    padding: 16px 20px;
}

.privacy-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.privacy-content svg {
    flex-shrink: 0;
    color: #28a745;
}

.privacy-content span {
    font-size: 14px;
    color: #155724;
    line-height: 1.5;
}

/* ── Guide & Features Section ─────────────────────────── */
.guide-section {
    padding: 8px 0 24px;
}
.guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 16px 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8eaed;
    user-select: none;
}
.guide-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}
#guideChevron { transition: transform 0.2s; }
#guideChevron.open { transform: rotate(180deg); }

#guideBody {
    background: #fff;
    border: 1px solid #e8eaed;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 20px;
}
.guide-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.guide-tab {
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    background: #f5f7fa;
    font-size: 0.83rem;
    font-weight: 500;
    cursor: pointer;
    color: #555;
    transition: all 0.15s;
}
.guide-tab.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}
.guide-intro {
    color: #555;
    font-size: 0.88rem;
    margin-bottom: 16px;
    line-height: 1.6;
}
.guide-steps {
    padding-left: 20px;
    color: #444;
    font-size: 0.85rem;
    line-height: 1.8;
}
.guide-steps li { margin-bottom: 6px; }
.guide-steps strong { color: #333; }
.guide-steps em { color: #667eea; }
.guide-tip {
    margin-top: 16px;
    background: #f0f4ff;
    border-left: 3px solid #667eea;
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    font-size: 0.82rem;
    color: #444;
    line-height: 1.5;
}
.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
    margin-top: 8px;
}
.compare-table th {
    background: #f8f9fb;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e8eaed;
}
.compare-table th:nth-child(2),
.compare-table th:nth-child(3) { text-align: center; }
.compare-table td {
    padding: 9px 14px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}
.compare-table td:nth-child(2),
.compare-table td:nth-child(3) { text-align: center; }
.compare-table tr.compare-group td {
    background: #f8f9fb;
    font-weight: 700;
    font-size: 0.8rem;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 14px;
}
.compare-table tr:hover td { background: #fafbff; }
.compare-table tr.compare-group:hover td { background: #f8f9fb; }

/* ── Use Case Cards ───────────────────────────────────── */
.usecase-card {
    border: 1px solid #e8eaed;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}
.usecase-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    background: #fafbff;
    user-select: none;
}
.usecase-header:hover { background: #f0f4ff; }
.usecase-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
}
.usecase-icon { font-size: 1.1rem; }
.usecase-chevron { transition: transform 0.2s; flex-shrink: 0; }
.usecase-chevron.open { transform: rotate(180deg); }
.usecase-body { padding: 0 16px 16px; }
.usecase-block {
    margin-top: 14px;
    font-size: 0.84rem;
    line-height: 1.6;
}
.usecase-block strong {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.usecase-scenario strong { color: #3b82f6; }
.usecase-challenge strong { color: #f59e0b; }
.usecase-solution strong { color: #10b981; }
.usecase-outcome strong { color: #667eea; }
.usecase-block p { color: #444; }
.usecase-block ul { padding-left: 18px; color: #444; margin-top: 4px; }
.usecase-block ul li { margin-bottom: 3px; }

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: #888;
    font-size: 14px;
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    .login-container {
        padding: 40px 25px;
        margin: 20px;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 10px;
    }

    #userName {
        display: none;
    }

    .generator-section {
        padding: 25px;
    }

    .support-card {
        flex-direction: column;
        text-align: center;
    }

    .support-qr img {
        width: 150px;
        height: 150px;
    }

    .qr-history-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .history-item img {
        max-width: 80px;
    }
}

@media (max-width: 400px) {
    .qr-history-grid {
        grid-template-columns: 1fr;
    }
}

/* ── WhatsApp QR ──────────────────────────────────────── */

/* Type tabs */
.qr-type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: #f0f2f5;
    padding: 4px;
    border-radius: 12px;
    width: fit-content;
}

.qr-type-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border: none;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: #666;
    transition: all 0.15s;
}
.qr-type-tab.active {
    background: #fff;
    color: #1a1a2e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.qr-type-tab:hover:not(.active) { color: #333; }

/* WhatsApp form textarea */
#wqMessage {
    width: 100%;
    border: 2px solid #e8eaed;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
    color: #333;
}
#wqMessage:focus { border-color: #25d366; outline: none; }

/* WhatsApp QR result */
.wq-qr-code {
    display: flex;
    justify-content: center;
    margin: 16px 0 12px;
}

.wq-link-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}
.wq-link-label { font-size: 0.78rem; color: #888; }
.wq-short-link {
    font-size: 0.85rem;
    color: #667eea;
    word-break: break-all;
    text-decoration: none;
}
.wq-short-link:hover { text-decoration: underline; }

/* My QR Codes section */
.my-qr-section {
    background: #f8f9fb;
    border-top: 1px solid #eee;
    padding: 32px 0 40px;
    margin-top: 8px;
}

.my-qr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.my-qr-header h3 { font-size: 1.1rem; font-weight: 700; color: #1a1a2e; }
.my-qr-count {
    font-size: 0.8rem;
    background: #25d366;
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.my-qr-list { display: flex; flex-direction: column; gap: 14px; }

/* QR card */
.wq-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.wq-card-qr { flex-shrink: 0; }
.wq-card-qr img, .wq-card-qr canvas { border-radius: 8px; }

.wq-card-body { flex: 1; min-width: 0; }
.wq-card-name { font-weight: 700; font-size: 0.98rem; color: #1a1a2e; margin-bottom: 2px; }
.wq-card-phone { font-size: 0.8rem; color: #25d366; font-weight: 600; margin-bottom: 6px; }
.wq-card-msg {
    font-size: 0.83rem;
    color: #555;
    margin-bottom: 8px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.wq-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.wq-scans { font-size: 0.78rem; color: #888; }
.wq-card-link {
    font-size: 0.75rem;
    color: #667eea;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}
.wq-card-link:hover { text-decoration: underline; }

.wq-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.btn-wq-action {
    border: none;
    border-radius: 7px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.btn-wq-action:hover { opacity: 0.82; }
.btn-wq-edit { background: #e8f0fe; color: #3367d6; }
.btn-wq-dl   { background: #e6f4ea; color: #1e7e34; }
.btn-wq-del  { background: #fce8e6; color: #c5221f; }

/* Formatting toolbar */
.fmt-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.fmt-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.4;
    transition: background 0.15s;
}
.fmt-btn:hover { background: #e5e7eb; }
.fmt-hint {
    font-size: 0.72rem;
    color: #9ca3af;
    margin-left: 4px;
}

/* Image upload */
.img-upload-box {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    font-size: 0.85rem;
    transition: border-color 0.2s, background 0.2s;
}
.img-upload-box:hover { border-color: #25d366; background: #f0fdf4; }

.wq-loading, .wq-empty {
    text-align: center;
    color: #aaa;
    font-size: 0.9rem;
    padding: 24px;
}

@media (max-width: 560px) {
    .wq-card { flex-wrap: wrap; }
    .wq-card-actions { flex-direction: row; width: 100%; }
    .btn-wq-action { flex: 1; text-align: center; }
    .qr-type-tabs { width: 100%; }
    .qr-type-tab { flex: 1; justify-content: center; }
}

/* ── Pro / Upgrade styles ───────────────────────────────── */
.pro-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}
.upgrade-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}
.upgrade-btn:hover { opacity: 0.88; }

.pro-lock-label {
    font-size: 0.78rem;
    color: #9ca3af;
}
.pro-lock-label a { color: #667eea; text-decoration: none; }
.pro-lock-label a:hover { text-decoration: underline; }

.color-btn.pro-color { opacity: 0.4; cursor: pointer; position: relative; }
.color-btn.pro-color::after {
    content: '🔒';
    position: absolute;
    top: -6px; right: -6px;
    font-size: 10px;
    background: #fff;
    border-radius: 50%;
    width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}

.pro-locked { opacity: 0.5; pointer-events: none; }
.fmt-toolbar.pro-locked::after,
.img-upload-box.pro-locked::after {
    content: '🔒 Pro feature — upgrade to unlock';
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 4px;
}

/* Upgrade modal */
.upgrade-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 16px;
}
.upgrade-modal.hidden { display: none; }

.upgrade-card {
    background: #fff;
    border-radius: 20px;
    padding: 36px 32px;
    max-width: 440px;
    width: 100%;
    position: relative;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0,0,0,0.18);
}
.upgrade-card-wide { max-width: 860px; }

.upgrade-icon { font-size: 2.5rem; margin-bottom: 12px; }
.upgrade-card h2 { font-size: 1.4rem; font-weight: 700; color: #1a1a2e; margin-bottom: 6px; }
.upgrade-sub { color: #888; font-size: 0.88rem; margin-bottom: 24px; }

.modal-close {
    position: absolute; top: 14px; right: 16px;
    background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #9ca3af;
}

/* Pricing grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
    text-align: left;
}
@media (max-width: 680px) {
    .pricing-grid { grid-template-columns: 1fr; }
}

.pricing-card {
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px 18px;
    position: relative;
}
.pricing-card-featured {
    border-color: #667eea;
    background: #f5f3ff;
}
.pricing-best {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 0.72rem; font-weight: 700;
    padding: 3px 12px; border-radius: 20px;
    white-space: nowrap;
}
.pricing-label { font-size: 0.8rem; font-weight: 600; color: #667eea; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.pricing-price { font-size: 2rem; font-weight: 800; color: #1a1a2e; line-height: 1; }
.pricing-desc  { font-size: 0.75rem; color: #9ca3af; margin-bottom: 14px; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 16px; }
.pricing-features li { font-size: 0.82rem; color: #374151; padding: 3px 0; }

.btn-outline-upgrade {
    width: 100%;
    background: #fff;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 10px;
    font-size: 0.85rem; font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.btn-outline-upgrade:hover { background: #667eea; color: #fff; }

.btn-upgrade {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px;
    font-size: 0.85rem; font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
}
.btn-upgrade:hover { opacity: 0.9; }

.razorpay-note { font-size: 0.75rem; color: #9ca3af; margin-top: 12px; }
.sustain-note  { font-size: 0.78rem; color: #888; margin-top: 8px; }

/* Pro toast */
.pro-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: #1a1a2e; color: #fff;
    padding: 12px 24px; border-radius: 12px;
    font-size: 0.9rem; font-weight: 600;
    z-index: 9999; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.pro-toast.hidden { display: none; }

/* How it works */
.how-it-works { background: #f9fafb; border-top: 1px solid #f0f0f0; }
.how-it-works .app-container { padding-top: 0; padding-bottom: 0; }

.hiw-toggle {
    display: flex; align-items: center; gap: 8px;
    width: 100%; background: none; border: none;
    padding: 16px 0; cursor: pointer;
    font-size: 0.88rem; font-weight: 600; color: #6b7280;
    text-align: left;
}
.hiw-toggle:hover { color: #25d366; }
.hiw-chevron { transition: transform 0.2s; margin-left: auto; }
.hiw-chevron.open { transform: rotate(180deg); }

.hiw-body { padding-bottom: 20px; }

.hiw-steps { display: flex; flex-direction: column; gap: 16px; }

.hiw-step {
    display: flex; gap: 14px; align-items: flex-start;
}
.hiw-step-num {
    flex-shrink: 0;
    width: 28px; height: 28px;
    background: #25d366; color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700;
}
.hiw-step-content strong { display: block; font-size: 0.9rem; color: #1a1a2e; margin-bottom: 3px; }
.hiw-step-content p { font-size: 0.82rem; color: #6b7280; line-height: 1.5; margin: 0; }

/* Input hint */
.input-hint { font-size: 0.78rem; color: #9ca3af; margin-top: 6px; }

/* Invert button */
.invert-btn {
    height: 32px;
    padding: 0 12px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.invert-btn:hover { border-color: #667eea; color: #667eea; }
.invert-btn.invert-active { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }

/* Dark background color section */
.dark-bg-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 10px;
    margin-bottom: 6px;
}
.dark-bg-options { margin-top: 0; }
.dark-bg-btn {
    box-sizing: border-box;
}
.dark-bg-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Frame message input */
.frame-msg-group { margin-top: 12px; }
.frame-msg-label { font-size: 0.85rem; font-weight: 600; color: #374151; display: block; margin-bottom: 6px; }
.frame-msg-row { display: flex; gap: 8px; align-items: center; }
.frame-msg-pos {
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.85rem;
    color: #374151;
    background: #fff;
    cursor: pointer;
    outline: none;
    flex-shrink: 0;
}
.frame-msg-input {
    flex: 1;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: #374151;
    outline: none;
    transition: border-color 0.2s;
}
.frame-msg-input:focus { border-color: #667eea; }

/* Allow-edit toggle */
.wq-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    color: #374151;
    user-select: none;
}
.wq-toggle-input { display: none; }
.wq-toggle-track {
    position: relative;
    width: 40px;
    height: 22px;
    background: #d1d5db;
    border-radius: 11px;
    flex-shrink: 0;
    transition: background 0.2s;
}
.wq-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: left 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.wq-toggle-input:checked + .wq-toggle-track { background: #25d366; }
.wq-toggle-input:checked + .wq-toggle-track::after { left: 21px; }

/* AI improve row */
.ai-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.btn-ai-improve {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.btn-ai-improve:hover { opacity: 0.88; }
.btn-ai-improve:disabled { opacity: 0.6; cursor: not-allowed; }
.ai-usage-info { font-size: 0.76rem; color: #6b7280; }

/* Editable badge on QR cards */
.wq-edit-badge {
    font-size: 0.72rem;
    background: #eff6ff;
    color: #3b82f6;
    border-radius: 6px;
    padding: 2px 7px;
    font-weight: 600;
}

/* Badges */
.wq-pin-badge {
    font-size: 0.72rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 6px;
    padding: 2px 7px;
    font-weight: 600;
}
.wq-public-badge {
    font-size: 0.72rem;
    background: #f0fdf4;
    color: #15803d;
    border-radius: 6px;
    padding: 2px 7px;
    font-weight: 600;
}

