:root {
    --bg-dark: #0A0A0A;
    --bg-card: rgba(20, 20, 20, 0.6);
    --accent: #A855F7;
    --accent-hover: #7C3AED;
    --text-main: #FFFFFF;
    --text-muted: #9CA3AF;
    --border: rgba(168, 85, 247, 0.18);
    --border-light: rgba(255, 255, 255, 0.05);
    --danger: #ef4444;
    --success: #10b981;
    --font: 'Inter', sans-serif;
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --gradient-gold: linear-gradient(135deg, #7C3AED 0%, #9333EA 45%, #A855F7 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font); }

body { background-color: var(--bg-dark); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }

/* Utilities */
.hidden { display: none !important; }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.muted-text { color: var(--text-muted); font-size: 0.9rem; }
.divider { border: 0; border-top: 1px solid var(--border-light); margin: 1.5rem 0; }
.branding-footer { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0.5px; }

/* Glassmorphism */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

/* Typography */
h1, h2, h3 { font-weight: 600; }
.page-title { font-size: 1.8rem; margin-bottom: 1.5rem; letter-spacing: -0.5px; color: var(--text-main); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.6rem 1.2rem; border-radius: 8px; font-weight: 600; cursor: pointer;
    transition: all 0.3s ease; border: none; outline: none; font-size: 0.95rem;
}
.btn-primary { background: var(--gradient-gold); color: #000; box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--accent); }
.btn-outline:hover { background: rgba(212, 175, 55, 0.1); }
.btn-danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-icon { background: transparent; border: none; color: var(--text-muted); cursor: pointer; transition: 0.2s; padding: 0.5rem; }
.btn-icon:hover { color: var(--accent); transform: scale(1.1); }
.block-btn { width: 100%; padding: 0.8rem; }

/* Form Controls */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.form-control {
    width: 100%; padding: 0.8rem 1rem; border-radius: 8px; background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-light); color: var(--text-main); transition: 0.3s;
}
.form-control:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2); }

/* Layouts */
.app-layout { display: flex; height: 100vh; overflow: hidden; }

/* Sidebar */
.sidebar {
    width: 260px; background: rgba(10,10,10,0.95); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; transition: 0.3s; z-index: 100;
}
.sidebar-header { padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-light); }
.logo { font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.sidebar-nav { padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.nav-link {
    padding: 0.8rem 1rem; color: var(--text-muted); text-decoration: none; border-radius: 8px;
    display: flex; align-items: center; gap: 1rem; transition: 0.3s; font-weight: 500;
}
.nav-link:hover, .nav-link.active { background: rgba(212, 175, 55, 0.1); color: var(--accent); border-left: 3px solid var(--accent); }
.sidebar-footer { padding: 1.5rem; border-top: 1px solid var(--border-light); text-align: center; }
.mobile-toggle { display: none; background: transparent; border: none; color: var(--text-main); font-size: 1.2rem; cursor: pointer; }

/* Main Content */
.main-content { flex: 1; display: flex; flex-direction: column; overflow-y: auto; position: relative; }
.topbar {
    height: 70px; padding: 0 2rem; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border-light); background: rgba(10,10,10,0.8); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 50;
}
.topbar-actions { display: flex; align-items: center; gap: 2rem; }
.search-bar { display: flex; align-items: center; background: rgba(255,255,255,0.03); border-radius: 8px; padding: 0.5rem 1rem; width: 300px; border: 1px solid var(--border-light); transition: 0.3s; }
.search-bar:focus-within { border-color: var(--accent); }
.search-bar input { background: transparent; border: none; color: white; outline: none; margin-left: 0.8rem; width: 100%; }
.page-content { padding: 2rem; max-width: 1400px; margin: 0 auto; width: 100%; }

/* Pages & Animations */
.page { display: none; animation: fadeIn 0.5s ease forwards; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { padding: 1.5rem; display: flex; align-items: center; gap: 1.5rem; border-left: 4px solid var(--accent); }
.stat-card:hover { transform: translateY(-5px); border-color: #fff; }
.stat-icon { width: 50px; height: 50px; border-radius: 12px; background: rgba(212, 175, 55, 0.1); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.animated-counter { font-size: 2rem; font-weight: 700; margin-top: 0.2rem; color: var(--text-main); }

/* Dashboard Sections */
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.dash-section { padding: 1.5rem; }
.quick-actions { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }

/* Tables */
.table-container { overflow-x: auto; padding: 1rem; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 1rem; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border-light); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }
.data-table td { padding: 1rem; border-bottom: 1px solid rgba(255,255,255,0.03); vertical-align: middle; }
.data-table tr:hover { background: rgba(255,255,255,0.02); }
.biz-logo-sm { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 1rem; color: rgba(212,175,55,0.3); }

/* QR Generator Layout */
.qr-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.qr-controls, .qr-preview { padding: 2rem; }
.qr-preview { display: flex; justify-content: center; align-items: center; min-height: 350px; background: #fff; border-radius: 16px; box-shadow: 0 0 30px rgba(212,175,55,0.2); }
.empty-qr { color: #888; text-align: center; }
.empty-qr i { font-size: 3rem; margin-bottom: 1rem; }

/* Charts Layout */
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2rem; }
.chart-container { padding: 1.5rem; height: 350px; display: flex; justify-content: center; align-items: center; }

/* Settings Layout */
.settings-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; max-width: 600px; }
.settings-card { padding: 2rem; }
.settings-actions { display: flex; gap: 1rem; margin-top: 1.5rem; }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 1000; opacity: 0; pointer-events: none; transition: 0.3s ease; }
.modal-overlay:not(.hidden) { opacity: 1; pointer-events: all; }
.modal-content { width: 100%; max-width: 500px; padding: 2rem; transform: scale(0.95); transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.modal-overlay:not(.hidden) .modal-content { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.close-btn { background: transparent; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; transition: 0.2s; }
.close-btn:hover { color: var(--danger); transform: rotate(90deg); }
.form-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 2rem; }
.logo-preview { width: 60px; height: 60px; border-radius: 8px; margin-top: 1rem; object-fit: cover; border: 1px solid var(--accent); }

/* Review Manager UI */
.reviews-list-container { max-height: 250px; overflow-y: auto; padding-right: 10px; display: flex; flex-direction: column; gap: 0.8rem; }
.reviews-list-container::-webkit-scrollbar { width: 6px; }
.reviews-list-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.admin-review-card { background: rgba(255,255,255,0.05); padding: 1rem; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; border: 1px solid transparent; transition: 0.2s; }
.admin-review-card:hover { border-color: var(--accent); }

/* Toast Notifications */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--bg-card); backdrop-filter: blur(10px); border-left: 4px solid var(--accent); color: white; padding: 1rem 1.5rem; border-radius: 8px; box-shadow: var(--shadow); transform: translateX(120%); transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); display: flex; align-items: center; gap: 10px; font-weight: 500; }
.toast.show { transform: translateX(0); }
.toast.error { border-left-color: var(--danger); }

/* ================= CUSTOMER VIEW ================= */
.customer-container { max-width: 450px; margin: 2rem auto; padding: 2.5rem 2rem; text-align: center; position: relative; overflow: hidden; }
.cv-header { margin-bottom: 1.5rem; }
.cv-logo { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; border: 3px solid var(--accent); box-shadow: 0 0 20px rgba(212,175,55,0.3); }
.cv-title { font-size: 1.8rem; margin-bottom: 0.3rem; color: var(--text-main); }
.cv-subtitle { color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1.5px; }
.rating-stars { color: var(--accent); font-size: 1.8rem; margin-bottom: 1.5rem; display: flex; justify-content: center; gap: 0.4rem; filter: drop-shadow(0 0 5px rgba(212,175,55,0.5)); }
.cv-instruction { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.95rem; }
.cv-templates-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.cv-template-card { background: rgba(255,255,255,0.03); border: 1px solid var(--border-light); padding: 1.2rem; border-radius: 12px; text-align: left; position: relative; cursor: pointer; transition: all 0.3s ease; }
.cv-template-card:hover { border-color: var(--accent); background: rgba(212,175,55,0.05); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.cv-template-card p { font-size: 0.95rem; margin-bottom: 0; padding-right: 35px; color: #eee; font-style: italic; }
.copy-icon { position: absolute; top: 50%; right: 1.2rem; transform: translateY(-50%); color: var(--text-muted); transition: 0.3s; font-size: 1.2rem; }
.cv-template-card:hover .copy-icon { color: var(--accent); }
.customer-container .branding-footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border-light); }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { position: fixed; left: -260px; height: 100vh; box-shadow: none; }
    .sidebar.open { left: 0; box-shadow: 10px 0 30px rgba(0,0,0,0.8); }
    .mobile-toggle { display: block; }
    .mobile-hide { display: none; }
    .topbar-actions { justify-content: flex-end; width: 100%; }
    .search-bar { display: none; } 
    .dashboard-grid, .qr-layout, .charts-grid { grid-template-columns: 1fr; }
    .page-content { padding: 1rem; }
    .customer-container { margin: 1rem; padding: 2rem 1.5rem; }
}

/* ================= ADMIN LOGIN ================= */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background:
        radial-gradient(circle at top left, rgba(212,175,55,0.14), transparent 35%),
        radial-gradient(circle at bottom right, rgba(212,175,55,0.08), transparent 35%),
        var(--bg-dark);
}
.login-card {
    width: 100%;
    max-width: 430px;
    padding: 2rem;
}
.login-logo {
    margin-bottom: 1.5rem;
}
.login-card h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.login-card form {
    margin-top: 1.5rem;
}
.login-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
}
@media (max-width: 768px) {
    .topbar-actions .btn-outline {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
    }
    .user-profile {
        display: none;
    }
}


/* ================= CUSTOMER REVIEW SWIPE + LOGO UPDATE ================= */
.cv-logo {
    display: block;
    background: rgba(255,255,255,0.04);
}
.cv-templates-list {
    display: flex !important;
    flex-direction: row !important;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    padding: 0.4rem 0.2rem 1rem;
    margin-bottom: 1.5rem;
    -webkit-overflow-scrolling: touch;
    direction: rtl;
}
.cv-templates-list::-webkit-scrollbar {
    height: 6px;
}
.cv-templates-list::-webkit-scrollbar-thumb {
    background: rgba(212,175,55,0.35);
    border-radius: 999px;
}
.cv-template-card {
    min-width: 82%;
    max-width: 82%;
    flex: 0 0 82%;
    scroll-snap-align: center;
    direction: ltr;
}
.cv-template-card p {
    padding-right: 0;
    min-height: 85px;
}
.tap-hint {
    margin-top: 0.9rem;
    font-size: 0.78rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.cv-template-card .copy-icon {
    right: 1rem;
    top: 1rem;
    transform: none;
}
.cv-instruction::after {
    content: " Swipe reviews right to left";
    color: var(--accent);
    display: block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
}
@media (min-width: 768px) {
    .cv-template-card {
        min-width: 70%;
        max-width: 70%;
        flex-basis: 70%;
    }
}


/* ================= FLOATING COPY HELPER ================= */
.copy-floating-widget {
    position: fixed;
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom));
    transform: translateX(-50%) translateY(130%);
    width: min(92vw, 460px);
    background: rgba(12, 12, 12, 0.96);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 18px;
    box-shadow: 0 18px 55px rgba(0,0,0,0.55), 0 0 28px rgba(212,175,55,0.14);
    padding: 0.95rem;
    z-index: 99999;
    transition: transform 0.35s ease, opacity 0.35s ease;
    opacity: 0;
}
.copy-floating-widget.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.copy-floating-text {
    text-align: left;
    margin-bottom: 0.75rem;
}
.copy-floating-text strong {
    display: block;
    color: var(--accent);
    font-size: 0.98rem;
    margin-bottom: 0.18rem;
}
.copy-floating-text span {
    display: block;
    color: var(--text-muted);
    font-size: 0.84rem;
}
.copy-floating-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}
.copy-floating-actions .btn {
    padding: 0.75rem 0.6rem;
    font-size: 0.88rem;
}
@media (max-width: 420px) {
    .copy-floating-actions {
        grid-template-columns: 1fr;
    }
}

/* ================= QR HISTORY + AD VISION PURPLE QR ================= */
.qr-history-panel {
    margin-top: 1.5rem;
    padding: 1.5rem;
}
.qr-history-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}
.qr-history-card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,0.035);
}
.qr-history-card small {
    color: var(--text-muted);
    word-break: break-all;
}
.qr-history-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.qr-preview {
    background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(168,85,247,0.08)), #0f0f12 !important;
    border: 1px solid rgba(168,85,247,0.35);
}
@media (max-width: 768px) {
    .qr-history-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .qr-history-actions {
        width: 100%;
    }
    .qr-history-actions .btn {
        flex: 1;
    }
}

/* ================= IMPROVED ADMIN REVIEW MANAGER ================= */
.review-modal-content {
    max-width: 880px !important;
    max-height: 92vh;
    overflow-y: auto;
}
.review-manager-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(212,175,55,0.14), rgba(123,13,22,0.18));
}
.review-manager-hero h4 { margin: 0.25rem 0 0; font-size: 1rem; }
.mini-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--accent);
    font-weight: 700;
}
.review-language-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.review-language-box {
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    background: rgba(255,255,255,0.035);
}
.review-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}
.btn-sm { padding: 0.55rem 0.85rem; font-size: 0.82rem; }
.reviews-admin-grid {
    max-height: 360px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.admin-review-section {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.admin-review-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.5px;
}
.review-lang-badge, .cv-lang-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 22px;
    padding: 0 0.45rem;
    border-radius: 7px;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--accent);
    background: rgba(212,175,55,0.12);
    border: 1px solid rgba(212,175,55,0.2);
}
.small-text { font-size: 0.82rem; }
.cv-review-section-title {
    flex: 0 0 100%;
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--accent);
    text-align: left;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.3rem 0.2rem 0;
    direction: ltr;
}
.cv-review-section-title small {
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}
.cv-lang-badge { margin-bottom: 0.75rem; }

@media (max-width: 768px) {
    .review-modal-content { max-width: calc(100vw - 24px) !important; padding: 1.1rem; }
    .review-manager-hero { flex-direction: column; align-items: stretch; }
    .review-language-grid, .reviews-admin-grid { grid-template-columns: 1fr; }
}

/* ================= CUSTOMER FUNNEL PREMIUM UI (REFERENCE STYLE) ================= */
#customer-view {
    min-height: 100vh;
    background: #7b0f17 !important;
    padding: 0 12px;
    color: #241a16;
}
#customer-view .customer-container {
    max-width: 690px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px 38px 42px;
    border-radius: 0;
    text-align: center;
    background:
        radial-gradient(circle at 50% 4%, rgba(212,175,55,0.16), transparent 16%),
        linear-gradient(180deg, #fffaf0 0%, #fffdf7 56%, #fffaf0 100%) !important;
    border: 1px solid rgba(212,175,55,0.24);
    box-shadow: none;
    backdrop-filter: none;
}
#customer-view .cv-logo {
    width: 112px;
    height: 112px;
    border: 7px solid #fffaf0;
    outline: 2px solid #d4af37;
    box-shadow: 0 12px 30px rgba(96,14,20,0.16);
    margin-bottom: 18px;
    background: #000;
}
#customer-view .cv-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 38px;
    color: #7b0f17;
    line-height: 1.05;
    letter-spacing: -0.5px;
}
#customer-view .cv-subtitle {
    color: #8b8178;
    text-transform: none;
    letter-spacing: 0;
    font-style: italic;
    font-size: 20px;
    margin-top: 4px;
}
.cv-divider {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 18px 0 10px;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.24), transparent);
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: center;
}
.cv-divider span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d4af37;
    box-shadow: 0 0 0 6px #fffaf0;
}
.cv-divider.small { height: 22px; margin: 10px 0 16px; }
.cv-question-block h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 34px;
    color: #1e1715;
    font-weight: 600;
    margin: 0;
}
.cv-question-block h2 em { color: #7b0f17; }
.cv-question-block p {
    margin: 10px 0 24px;
    color: #8a7d73;
    font-size: 18px;
}
#customer-view .rating-stars.cv-rating-buttons {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 14px;
    filter: none;
    margin: 0 auto 14px;
    color: inherit;
}
.cv-rating-buttons button {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 1px solid rgba(141,92,21,0.24);
    cursor: pointer;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 28px;
    color: #7b0f17;
    background: radial-gradient(circle at 34% 22%, #f7dea0 0%, #d9af4f 72%);
    box-shadow: 0 12px 18px rgba(118,69,13,0.18), inset 0 2px 8px rgba(255,255,255,0.3);
    transition: 0.22s ease;
}
.cv-rating-buttons button:hover,
.cv-rating-buttons button.active {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 15px 24px rgba(118,69,13,0.24), inset 0 2px 8px rgba(255,255,255,0.42);
}
.cv-rating-buttons button.muted {
    background: #f3ecdf;
    color: #9e9488;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.03);
}
.cv-rating-label {
    color: #7b0f17;
    font-weight: 800;
    font-size: 22px;
    margin: 8px 0 8px;
}
.cv-locked-hint {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 48px;
    padding: 14px 26px;
    border-radius: 999px;
    background: #f8efe2;
    color: #8d8175;
    font-size: 16px;
}
.cv-tags-card {
    background: #7b0f17;
    border-radius: 18px;
    padding: 22px 24px 24px;
    text-align: left;
    box-shadow: 0 10px 25px rgba(123,15,23,0.13);
    margin: 0 0 24px;
}
.cv-tags-title {
    color: #f7e6df;
    letter-spacing: 3px;
    font-size: 16px;
    font-style: italic;
    margin-bottom: 14px;
}
.cv-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.cv-tags-wrap span {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #f9f1f2;
    color: #6d2f33;
    border: 1px solid rgba(255,255,255,0.65);
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 16px;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.05);
}
#customer-view .cv-templates-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 0 24px !important;
    direction: ltr !important;
    scroll-snap-type: none !important;
}
#customer-view .cv-review-section-title {
    display: flex;
    min-width: 0;
    flex: none;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 0;
    margin-top: 4px;
    color: #7b0f17;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    letter-spacing: 4px;
}
#customer-view .cv-review-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(123,15,23,0.16);
}
#customer-view .cv-review-section-title small {
    order: 0;
    font-family: inherit;
    letter-spacing: 1px;
    font-size: 12px;
    color: #7b0f17;
    background: #efd69d;
    border-radius: 5px;
    padding: 4px 9px;
    font-weight: 800;
}
#customer-view .cv-template-card {
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
    flex: none !important;
    padding: 24px 26px;
    border-radius: 18px;
    background: rgba(255,255,255,0.52);
    border: 1px solid #eadfce;
    box-shadow: 0 4px 14px rgba(80,47,21,0.03);
    color: #333;
    text-align: left;
    scroll-snap-align: none;
}
#customer-view .cv-template-card:hover {
    background: #fffdf8;
    border-color: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(123,15,23,0.08);
}
#customer-view .cv-template-card p {
    color: #3f3936;
    font-style: normal;
    padding: 0;
    min-height: 0;
    font-size: 21px;
    line-height: 1.55;
    margin: 0;
}
#customer-view .cv-lang-badge {
    background: #f3eee5;
    color: #7d746c;
    border: none;
    margin-right: 12px;
    margin-bottom: 0;
    vertical-align: 3px;
}
.cv-low-rating-box {
    background: #fff7ef;
    border: 1px solid #eadfce;
    border-radius: 18px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #7b0f17;
}
#customer-view .branding-footer { color: #9b8f83; border-top-color: rgba(123,15,23,0.12); }
@media (max-width: 768px) {
    #customer-view { padding: 0 12px; }
    #customer-view .customer-container { padding: 28px 40px 40px; }
    #customer-view .cv-title { font-size: 34px; }
    .cv-question-block h2 { font-size: 32px; }
    .cv-rating-buttons button { width: 84px; height: 84px; font-size: 26px; }
    #customer-view .rating-stars.cv-rating-buttons { gap: 10px; }
    #customer-view .cv-template-card p { font-size: 20px; }
}
@media (max-width: 560px) {
    #customer-view .customer-container { padding: 26px 38px 38px; }
    #customer-view .cv-logo { width: 104px; height: 104px; }
    #customer-view .cv-title { font-size: 31px; }
    #customer-view .cv-subtitle { font-size: 18px; }
    .cv-question-block h2 { font-size: 29px; }
    .cv-question-block p { font-size: 17px; }
    #customer-view .rating-stars.cv-rating-buttons { gap: 9px; }
    .cv-rating-buttons button { width: 58px; height: 58px; font-size: 22px; }
    .cv-tags-card { padding: 20px 22px; border-radius: 16px; }
    .cv-tags-wrap { gap: 10px; }
    .cv-tags-wrap span { padding: 9px 16px; font-size: 15px; max-width: 150px; }
    #customer-view .cv-template-card { padding: 22px 26px; }
    #customer-view .cv-template-card p { font-size: 20px; }
}


/* Customer UI professional mobile polish */
html, body {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
}
#customer-view {
    min-height: 100svh;
    padding: 0 10px;
    background:
        radial-gradient(circle at top, rgba(212,175,55,0.10), transparent 28%),
        linear-gradient(90deg, #740b14 0, #740b14 10px, #fffaf2 10px, #fffaf2 calc(100% - 10px), #740b14 calc(100% - 10px));
}
#customer-view .customer-container {
    width: min(100%, 720px);
    margin: 0 auto;
    min-height: 100svh;
    border-radius: 0;
    border: 0;
    background: linear-gradient(180deg, #fffaf1 0%, #fffdf8 52%, #fffaf1 100%) !important;
    box-shadow: none;
}
.cv-header { padding-top: 22px; }
#customer-view .cv-review-content { margin-top: 6px; }
#customer-view .rating-stars.cv-rating-buttons { flex-wrap: nowrap; }
.cv-rating-buttons button {
    -webkit-tap-highlight-color: transparent;
    position: relative;
    border: 1px solid rgba(111,66,10,0.20);
    background:
        radial-gradient(circle at 32% 25%, rgba(255,255,255,0.72), transparent 24%),
        linear-gradient(145deg, #f5d888 0%, #d6aa45 52%, #bd892c 100%);
    box-shadow:
        0 10px 22px rgba(116,11,20,0.12),
        inset 0 1px 0 rgba(255,255,255,0.7),
        inset 0 -5px 10px rgba(111,66,10,0.13);
}
.cv-rating-buttons button:active { transform: scale(0.96); }
.cv-rating-buttons button.muted {
    background: linear-gradient(145deg, #f6efe3, #eee4d4);
    border-color: #e7dccb;
}
#customer-view .cv-template-card {
    position: relative;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(123,15,23,0.10);
    box-shadow: 0 10px 28px rgba(80,47,21,0.055);
}
#customer-view .cv-template-card::after {
    content: "Tap to copy";
    position: absolute;
    right: 14px;
    bottom: 12px;
    font-size: 11px;
    letter-spacing: .2px;
    color: #9b8f83;
    background: #faf2e5;
    border: 1px solid #eadfce;
    padding: 4px 8px;
    border-radius: 999px;
}
#customer-view .cv-template-card p { padding-bottom: 22px; }
#customer-view .cv-review-section-title { margin: 16px 0 2px; }
#customer-view .btn-primary,
#customer-view .copy-floating-actions .btn-primary {
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, #7b0f17 0%, #a31522 52%, #d4af37 140%);
    box-shadow: 0 12px 24px rgba(123,15,23,0.18);
}
#customer-view .btn-outline {
    border-color: rgba(123,15,23,0.20);
    color: #7b0f17;
    background: #fffaf1;
    border-radius: 14px;
}
.copy-floating-widget {
    border-radius: 20px;
    border: 1px solid rgba(123,15,23,0.12);
    background: rgba(255,250,241,0.96);
    box-shadow: 0 18px 45px rgba(42,20,9,0.18);
}
.copy-floating-text strong { color: #7b0f17; }
.copy-floating-text span { color: #81766c; }
.cv-tags-card { display: none !important; }

@media (max-width: 560px) {
    #customer-view { padding: 0 8px; }
    #customer-view .customer-container { padding: 22px 22px 34px; }
    #customer-view .cv-logo { width: 94px; height: 94px; border-width: 6px; }
    #customer-view .cv-title { font-size: 30px; }
    #customer-view .cv-subtitle { font-size: 15px; }
    .cv-divider { margin: 12px 0 6px; height: 24px; }
    .cv-question-block h2 { font-size: 27px; line-height: 1.15; }
    .cv-question-block p { font-size: 15px; margin: 8px 0 20px; }
    #customer-view .rating-stars.cv-rating-buttons { gap: 8px; width: 100%; }
    .cv-rating-buttons button { width: clamp(50px, 16vw, 62px); height: clamp(50px, 16vw, 62px); font-size: 22px; }
    .cv-rating-label { font-size: 19px; }
    #customer-view .cv-review-section-title { font-size: 15px; letter-spacing: 2.4px; gap: 10px; }
    #customer-view .cv-review-section-title small { font-size: 10px; padding: 3px 7px; }
    #customer-view .cv-template-card { padding: 18px 18px 16px; border-radius: 16px; }
    #customer-view .cv-template-card p { font-size: 17px; line-height: 1.55; padding-bottom: 24px; }
    #customer-view .cv-lang-badge { font-size: 10px; padding: 4px 6px; margin-right: 8px; }
    .cv-locked-hint { margin-top: 38px; padding: 12px 18px; font-size: 14px; }
    .copy-floating-widget { left: 14px; right: 14px; bottom: 14px; width: auto; }
}

@media (max-width: 380px) {
    #customer-view .customer-container { padding-left: 16px; padding-right: 16px; }
    #customer-view .rating-stars.cv-rating-buttons { gap: 6px; }
    .cv-rating-buttons button { width: 48px; height: 48px; font-size: 19px; }
    .cv-question-block h2 { font-size: 24px; }
}


/* Business-wise lead capture */
.cv-template-card.selected { border-color: #7b0f17 !important; box-shadow: 0 10px 28px rgba(123,15,23,.16) !important; }
.lead-capture-overlay { padding: 16px; background: rgba(24, 12, 10, .76); backdrop-filter: blur(14px); }
.lead-capture-card { max-width: 430px; padding: 34px 28px 28px; text-align: center; border: 1px solid rgba(123,15,23,.18); border-radius: 26px; background: linear-gradient(155deg,#fffdf9,#fff7ef); color: #271915; box-shadow: 0 28px 90px rgba(26,10,4,.35); position: relative; }
.lead-popup-close { position:absolute; right:16px; top:16px; width:38px; height:38px; border-radius:50%; border:1px solid rgba(123,15,23,.12); background:#fff; color:#7b0f17; cursor:pointer; }
.lead-offer-icon { width:72px; height:72px; margin:0 auto 14px; display:grid; place-items:center; border-radius:22px; font-size:30px; color:#fff; background:linear-gradient(145deg,#7b0f17,#b53740); box-shadow:0 14px 28px rgba(123,15,23,.28); transform:rotate(-3deg); }
.lead-offer-badge { display:inline-block; padding:6px 10px; border-radius:999px; background:#f6e5d6; color:#7b0f17; font-size:10px; font-weight:800; letter-spacing:1.4px; }
.lead-capture-card h3 { margin:12px 0 8px; font-size:28px; color:#2b1915; }
.lead-popup-copy { margin:0 auto 12px; max-width:330px; color:#715f57; line-height:1.55; font-size:14px; }
.lead-selected-rating { display:inline-flex; align-items:center; justify-content:center; margin-bottom:17px; padding:8px 13px; border-radius:10px; background:#fff2d8; color:#805b06; font-weight:700; font-size:13px; }
.lead-input-wrap { position:relative; margin-bottom:12px; }
.lead-input-wrap > i { position:absolute; left:15px; top:50%; transform:translateY(-50%); color:#9b7064; z-index:2; }
.lead-input-wrap .form-control { height:52px; padding-left:44px; border-radius:14px; background:#fff; color:#2b1915; border:1px solid #eadad0; font-size:15px; }
.lead-input-wrap .form-control:focus { border-color:#7b0f17; box-shadow:0 0 0 3px rgba(123,15,23,.09); }
.lead-privacy { margin:4px 0 16px; color:#8b7971; font-size:11px; line-height:1.4; }
.lead-capture-card .btn-primary { min-height:52px; border-radius:14px; background:linear-gradient(135deg,#7b0f17,#a52932); border:none; }
.leads-modal-content { width:min(1050px, calc(100vw - 28px)); max-width:1050px; max-height:88vh; overflow:hidden; }
.lead-admin-kicker { color:var(--accent); font-weight:800; font-size:11px; letter-spacing:1.5px; }
.leads-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.lead-count-badge { padding:8px 12px; border-radius:999px; background:rgba(212,175,55,.12); color:var(--accent); font-weight:700; }
.leads-list { max-height:62vh; overflow:auto; }
.leads-table { min-width:820px; }
.rating-pill { display:inline-block; padding:5px 9px; border-radius:999px; background:rgba(212,175,55,.12); color:var(--accent); font-weight:700; white-space:nowrap; }
.lead-review-cell { min-width:280px; max-width:420px; white-space:normal; line-height:1.45; }
.lead-loading { padding:45px; text-align:center; color:var(--text-muted); }
@media (max-width:600px){
  .lead-capture-card{padding:30px 18px 22px;border-radius:22px}.lead-capture-card h3{font-size:25px}
  .leads-modal-content{padding:18px 14px}.leads-toolbar{align-items:stretch;flex-direction:column}.leads-toolbar .btn{width:100%}
}

/* QR subscription controls */
.subscription-fields { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.switch-label { display:flex; align-items:center; gap:10px; font-weight:700; cursor:pointer; }
.switch-label input { width:20px; height:20px; accent-color:var(--accent); }
.qr-status-control { padding:14px; border:1px solid rgba(255,255,255,.1); border-radius:12px; }
.qr-status-badge { display:inline-flex; padding:6px 10px; border-radius:999px; font-size:11px; font-weight:800; letter-spacing:.4px; }
.qr-status-badge.active { background:rgba(37,211,102,.14); color:#58e58e; border:1px solid rgba(37,211,102,.28); }
.qr-status-badge.inactive { background:rgba(255,90,90,.12); color:#ff8d8d; border:1px solid rgba(255,90,90,.25); }
.qr-toggle-btn.is-on { color:#ffb86b; }
.qr-toggle-btn.is-off { color:#58e58e; }
.subscription-cell { min-width:145px; font-size:12px; line-height:1.5; }
.qr-unavailable-card { text-align:center; max-width:460px; margin:auto; }
@media (max-width:640px) { .subscription-fields { grid-template-columns:1fr; } }

/* Paused / expired QR customer notice */
.qr-unavailable-card {
    padding: 2rem 1.35rem;
    border: 1px solid rgba(139, 92, 246, .35);
}
.renew-icon-wrap {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 22px;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    box-shadow: 0 14px 35px rgba(124, 58, 237, .32);
}
.service-status-pill {
    display: inline-flex;
    padding: .38rem .8rem;
    margin-bottom: .85rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #e9d5ff;
    background: rgba(139, 92, 246, .16);
    border: 1px solid rgba(168, 85, 247, .35);
}
.qr-unavailable-card h2 {
    margin-bottom: .75rem;
    line-height: 1.25;
}
.renew-main-message {
    margin: 0 auto .65rem;
    max-width: 390px;
    color: #f3f4f6;
    line-height: 1.6;
}
@media (max-width: 520px) {
    .qr-unavailable-card { margin: 1rem; padding: 1.75rem 1rem; }
    .qr-unavailable-card h2 { font-size: 1.45rem; }
}
