/* ============================================
   ReviewFlow — "Quiet Luxury" Design System
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    /* Quiet Luxury Color Tokens */
    --bg: #E2E4E9;
    --surface: #E2E4E9;
    --surface-low: #f1f4f7;
    --surface-lowest: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text: #2b3438;
    --text-secondary: #586065;
    --border: rgba(171, 179, 185, 0.15);
    --accent: #0c0f10;
    --accent-text: #ffffff;
    --danger: #9f403d;
    --success: #34c759;
    --radius: 16px;
    --font: 'Manrope', 'Inter', -apple-system, sans-serif;
    --transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Glass card utility */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    font-size: 20px;
    flex-shrink: 0;
}

/* ============================================
   SHARED COMPONENTS
   ============================================ */
.hidden {
    display: none !important;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    border-radius: 50px;
    font: 600 15px var(--font);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-primary.big-btn {
    background: #0c0f10;
    font-size: 14px;
    padding: 15px 24px;
    font-weight: 600;
    letter-spacing: 0.2px;
    border-radius: 9999px;
    box-shadow: 0 4px 14px rgba(12, 15, 16, 0.12);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-primary.big-btn:hover {
    background: #1a1e1f;
    box-shadow: 0 6px 18px rgba(12, 15, 16, 0.18);
    transform: translateY(-1px);
    opacity: 1;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    padding: 10px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font: 500 14px var(--font);
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text);
}

.btn-secondary:hover {
    background: #f0f0f0;
}

.btn-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: transparent;
    color: #64748b;
    font: 500 15px var(--font);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-ghost:hover {
    border-color: #94a3b8;
    color: #475569;
    background: #f8fafc;
}

.btn-ghost ion-icon {
    font-size: 20px;
}

.btn-text {
    background: none;
    border: none;
    color: #0052cc;
    font: 600 15px var(--font);
    cursor: pointer;
}

.btn-text:hover {
    text-decoration: underline;
}

.btn-text.danger {
    color: var(--danger);
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    color: var(--text);
}

.btn-icon:hover {
    background: #f0f0f0;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font: 400 16px var(--font);
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--accent);
}

.hint {
    font-size: 12px;
    color: #999;
    font-weight: 400;
    text-transform: none;
}

/* Slug validation */
.slug-status {
    display: none;
    font: 500 12px var(--font);
    margin-top: 6px;
}

.slug-status.available {
    display: block;
    color: #16a34a;
}

.slug-status.taken {
    display: block;
    color: #dc2626;
}

#biz-slug.slug-available {
    border-color: #16a34a;
}

#biz-slug.slug-taken {
    border-color: #dc2626;
}

.error-text {
    color: var(--danger);
    font-size: 14px;
    margin-top: 12px;
    text-align: center;
}

/* ============================================
   LAYOUTS (Auth, Dashboard)
   ============================================ */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 48px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.auth-card .form-group {
    margin-bottom: 24px;
}

.auth-card .btn-primary {
    margin-top: 8px;
}

.auth-toggle {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.logo,
.logo-sm {
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo {
    font-size: 28px;
    text-align: center;
    margin-bottom: 4px;
}

.logo-sm {
    font-size: 20px;
    margin: 0;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

/* ── Google Sign-In button ── */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 14px;
    background: #ffffff;
    font: 600 14px var(--font, 'Inter', sans-serif);
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 0;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-google:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.btn-google:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ── Divider between Google and email form ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
}

/* ---- Business Switcher Dropdown ---- */
.biz-switcher {
    position: relative;
    margin-left: 8px;
}

.biz-switcher-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    font: 600 14px var(--font);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    max-width: 220px;
}

.biz-switcher-trigger:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.biz-switcher-icon {
    font-size: 15px;
    color: #6366f1;
    background: #eef2ff;
    padding: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

#biz-switcher-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.biz-switcher-chevron {
    font-size: 14px;
    color: #94a3b8;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.biz-switcher.open .biz-switcher-chevron {
    transform: rotate(180deg);
}

.biz-switcher-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    z-index: 200;
    padding: 8px;
    animation: bizDropIn 0.15s ease-out;
}

@keyframes bizDropIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.biz-switcher-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    padding: 6px 10px 8px;
}

.biz-switcher-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font: 500 14px var(--font);
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}

.biz-switcher-item:hover {
    background: #f1f5f9;
}

.biz-switcher-item.active {
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 600;
}

.biz-switcher-item ion-icon {
    font-size: 18px;
    color: #94a3b8;
    flex-shrink: 0;
}

.biz-switcher-item.active ion-icon {
    color: #6366f1;
}

.biz-switcher-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.biz-switcher-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.biz-switcher-add {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font: 500 14px var(--font);
    color: #6366f1;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}

.biz-switcher-add:hover {
    background: #eef2ff;
}

.biz-switcher-add ion-icon {
    font-size: 18px;
}

.dashboard {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* ============================================
   SIDEBAR — Floating Glass Panel
   ============================================ */
.sidebar {
    position: fixed;
    left: 20px;
    top: 20px;
    /* full height since no topbar */
    bottom: 20px;
    width: 268px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    border-radius: 32px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 50;
    transition: var(--transition);
}

/* Brand block */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 20px;
}

.sidebar-logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0c0f10;
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--font);
}

.sidebar-brand-name {
    font-family: var(--font);
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    letter-spacing: -0.3px;
}

/* Business Switcher inside sidebar */
.sidebar-biz-switcher {
    margin: 0 0 8px;
    position: relative;
}

.sidebar-biz-switcher .biz-switcher-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 9999px;
    font: 600 13px var(--font);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.sidebar-biz-switcher .biz-switcher-trigger:hover {
    background: rgba(255, 255, 255, 0.7);
}

.sidebar-biz-switcher .biz-switcher-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    z-index: 200;
    padding: 8px;
    animation: bizDropIn 0.2s ease-out;
}

/* Sidebar Content */
.sidebar-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.sidebar-footer {
    padding-top: 12px;
}

/* Legacy MENU label — hidden in new design */
.sidebar h2 {
    display: none;
}

.sidebar-header {
    display: none !important;
}

/* Hidden business list for JS */
.sidebar-item {
    display: none;
}

#business-list {
    display: none !important;
}

/* Sidebar Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    padding-top: 0;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 11px 16px;
    background: transparent;
    border: none;
    border-radius: 9999px;
    font: 500 14px var(--font);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    position: relative;
}

.sidebar-nav-item .material-symbols-outlined {
    font-size: 20px;
    opacity: 0.5;
    transition: var(--transition);
}

/* Keep ionicons for lock icon */
.sidebar-nav-item ion-icon:not(.nav-lock-icon) {
    font-size: 19px;
    color: var(--text-secondary);
    opacity: 0.5;
    transition: var(--transition);
    flex-shrink: 0;
}

.sidebar-nav-item span[data-i18n] {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--text);
}

.sidebar-nav-item:hover .material-symbols-outlined,
.sidebar-nav-item:hover ion-icon:not(.nav-lock-icon) {
    opacity: 1;
}

/* Active — Black Pill */
.sidebar-nav-item.active {
    background: #0c0f10;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.sidebar-nav-item.active .material-symbols-outlined,
.sidebar-nav-item.active ion-icon:not(.nav-lock-icon) {
    opacity: 1;
    color: #ffffff;
}

.sidebar-nav-item.active::before {
    display: none;
}

/* Lock icon */
.nav-lock-icon {
    display: none;
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: auto;
    flex-shrink: 0;
    opacity: 0.5;
}

/* Sidebar Locked Mode */
.sidebar-locked .sidebar-nav-item[data-requires-biz] {
    opacity: 0.4;
    cursor: not-allowed;
}

.sidebar-locked .sidebar-nav-item[data-requires-biz]:hover {
    opacity: 0.55;
    background: transparent;
}

.sidebar-locked .sidebar-nav-item[data-requires-biz] .nav-lock-icon {
    display: block;
}

/* Sidebar Profile */
.sidebar-profile-wrapper {
    position: relative;
    margin-top: 4px;
}

.sidebar-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 16px;
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.sidebar-profile-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.sidebar-profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-profile-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-profile-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-role {
    font-size: 11px;
    color: var(--text-secondary);
}

.sidebar-profile-email {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-chevron {
    font-size: 16px;
    color: var(--text-secondary);
    opacity: 0.5;
    transition: transform 0.2s ease, opacity 0.2s;
    flex-shrink: 0;
}

.sidebar-profile-btn[aria-expanded="true"] .sidebar-profile-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

.sidebar-profile-btn:hover .sidebar-profile-chevron {
    opacity: 1;
}

/* ── Profile avatar: photo or initials ── */
.sidebar-profile-avatar img,
.profile-popover-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.sidebar-avatar-initials,
.popover-avatar-initials {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
}

/* ── Profile Popover — opens upward above button ── */
.profile-popover {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    padding: 6px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.10), 0 8px 32px rgba(0,0,0,0.08);
    z-index: 500;
    animation: popoverReveal 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom center;
}

.profile-popover.hidden {
    display: none !important;
}

@keyframes popoverReveal {
    from { opacity: 0; transform: scale(0.95) translateY(6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* User info header */
.profile-popover-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 10px;
}

.profile-popover-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    color: rgba(255,255,255,0.7);
    font-size: 18px;
}

.profile-popover-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-popover-name {
    font-size: 13px;
    font-weight: 700;
    color: #0c0f10;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-popover-email {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-popover-divider {
    height: 1px;
    background: rgba(0,0,0,0.06);
    margin: 4px 0;
}

/* Action items */
.profile-popover-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 12px;
    background: transparent;
    font: 500 13px var(--font);
    color: #1a1a1a;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s;
}

.profile-popover-item .material-symbols-outlined {
    font-size: 17px;
    color: #64748b;
    flex-shrink: 0;
}

.profile-popover-item:hover {
    background: rgba(0,0,0,0.04);
}

.profile-popover-item.danger {
    color: #dc2626;
}

.profile-popover-item.danger .material-symbols-outlined {
    color: #dc2626;
}

.profile-popover-item.danger:hover {
    background: rgba(220, 38, 38, 0.06);
}

/* Position dropdown correctly when triggered from sidebar */
.sidebar-dropdown-pos {
    top: auto;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
}

/* New Business ghost btn */
.btn-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    border: 1px dashed rgba(88, 96, 101, 0.3);
    border-radius: 9999px;
    background: transparent;
    color: var(--text-secondary);
    font: 500 13px var(--font);
    cursor: pointer;
    transition: var(--transition);
}

.btn-ghost:hover {
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.3);
    color: var(--text);
}

.btn-ghost ion-icon {
    font-size: 18px;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main-content {
    flex: 1;
    margin-left: calc(268px + 40px);
    padding: 24px 24px 24px 0;
    overflow-y: auto;
    height: 100%;
    background: var(--bg);
    scrollbar-width: none;
    position: relative;
}

@media (max-width: 900px) {
    .main-content {
        margin-left: 0;
        padding: 80px 20px 20px 20px;
    }
}

.main-content::-webkit-scrollbar {
    display: none;
}

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

.empty-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 100%;
    padding: 20px 20px 40px;
}

/* ---- Welcome Banner ---- */
.ed-welcome-banner {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    border-radius: 32px;
    padding: 40px 44px;
    position: relative;
    overflow: hidden;
}

.ed-welcome-banner::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(43, 52, 56, 0.06), transparent 70%);
    pointer-events: none;
}

.ed-welcome-left {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.ed-welcome-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 10px;
    letter-spacing: -0.5px;
    line-height: 1.25;
}

.ed-welcome-sub {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 28px;
    max-width: 480px;
}

.ed-welcome-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font: 600 14px var(--font);
    color: #fff;
    background: #0c0f10;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.ed-welcome-cta:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
}

.ed-welcome-cta ion-icon {
    font-size: 18px;
}



/* ---- Skeleton Analytics Row ---- */
.ed-skeleton-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
}

.ed-skeleton-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    border-radius: 28px;
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.ed-skeleton-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.ed-skeleton-header ion-icon {
    font-size: 16px;
    color: var(--text-secondary);
    opacity: 0.6;
}

.ed-skeleton-chart {
    flex: 1;
    min-height: 70px;
    display: flex;
    align-items: center;
}

.ed-line-chart {
    width: 100%;
    height: 70px;
}

.ed-line-chart path {
    filter: blur(1.5px);
    opacity: 0.6;
}

.ed-skeleton-hint {
    font-size: 11px;
    color: #7e8a9d;
    margin: 16px 0 0;
    font-style: italic;
}

.ed-hint-link {
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
    font-style: normal;
}

.ed-hint-link:hover {
    text-decoration: underline;
}

/* Star distribution bars */
.ed-skeleton-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.ed-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ed-bar-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    width: 24px;
    flex-shrink: 0;
}

.ed-bar-track {
    flex: 1;
    height: 8px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    overflow: hidden;
    animation: skeletonShimmer 2.5s infinite linear;
}

.ed-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    border-radius: 4px;
}

.ed-bar-val {
    font-size: 11px;
    color: #cbd5e1;
    width: 20px;
    text-align: right;
    flex-shrink: 0;
}

/* Top services skeleton */
.ed-skeleton-services {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.ed-service-skeleton {
    height: 10px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    border-radius: 5px;
    width: 85%;
    animation: skeletonShimmer 2.5s infinite linear;
}

.ed-service-skeleton.short {
    width: 60%;
    animation-delay: 0.2s;
}

.ed-service-skeleton.medium {
    width: 72%;
    animation-delay: 0.4s;
}

.ed-service-skeleton.shorter {
    width: 45%;
    animation-delay: 0.6s;
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ---- Bottom Grid (Checklist + Quick Actions) ---- */
.ed-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: stretch;
}

.ed-bottom-grid>* {
    display: flex;
    flex-direction: column;
}

/* Setup Checklist Card */
.ed-checklist-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    border-radius: 28px;
    padding: 28px 32px;
    flex: 1;
}

.ed-checklist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.ed-checklist-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ed-checklist-icon {
    font-size: 24px;
    color: #0c0f10;
}

.ed-checklist-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px;
}

.ed-checklist-sub {
    font-size: 11px;
    color: #94a3b8;
    margin: 0;
    font-weight: 500;
}

.ed-checklist-percent {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    background: rgba(43, 52, 56, 0.08);
    padding: 4px 12px;
    border-radius: 16px;
}

.ed-checklist-bar {
    width: 100%;
    height: 4px;
    background: rgba(43, 52, 56, 0.08);
    border-radius: 2px;
    margin-bottom: 16px;
    overflow: hidden;
}

.ed-checklist-bar-fill {
    height: 100%;
    background: #0c0f10;
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ed-checklist-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ed-check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: all 0.15s ease;
}

.ed-check-item>div:nth-child(2) {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.ed-check-item.clickable {
    cursor: pointer;
    background: rgba(43, 52, 56, 0.02);
    border: 1px solid rgba(43, 52, 56, 0.06);
}

.ed-check-item.clickable:hover {
    background: rgba(43, 52, 56, 0.04);
    border-color: rgba(43, 52, 56, 0.1);
}

.ed-check-item.done {
    opacity: 0.55;
}

.ed-check-item.disabled {
    opacity: 0.35;
    pointer-events: none;
}

.ed-check-circle {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #94a3b8;
}

.ed-check-circle.done {
    background: #0c0f10;
    border-color: transparent;
    color: #fff;
    box-shadow: none;
}

.ed-check-circle.done ion-icon {
    font-size: 15px;
}

.ed-check-num {
    font-size: 12px;
    font-weight: 700;
}

.ed-check-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.ed-check-item.done .ed-check-title {
    text-decoration: line-through;
    color: #64748b;
}

.ed-check-sub {
    font-size: 11px;
    color: #94a3b8;
}

.ed-check-arrow {
    font-size: 16px;
    color: #94a3b8;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.ed-check-item.clickable:hover .ed-check-arrow {
    transform: translateX(3px);
    color: #0c0f10;
}

/* Quick Actions Card */
.ed-quick-actions {
    background: transparent;
    border: none;
    padding: 0;
    flex: 1;
}

.ed-quick-actions h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 12px;
    padding-left: 4px;
}

.ed-action-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ed-action-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    border-radius: 28px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-family: var(--font);
}

.ed-action-item:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.8);
    transform: none;
}

.ed-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    color: var(--text);
}

.ed-action-icon.blue {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text);
}

.ed-action-icon.purple {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text);
}

.ed-action-icon.green {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text);
}

.ed-action-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ed-action-text span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.ed-action-text small {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

.ed-action-chevron {
    position: absolute;
    bottom: 24px;
    right: 24px;
    font-size: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: var(--transition);
    opacity: 0.6;
}

.ed-action-item:hover .ed-action-chevron {
    opacity: 1;
    transform: translateX(3px);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .ed-skeleton-row {
        grid-template-columns: 1fr;
    }

    .ed-bottom-grid {
        grid-template-columns: 1fr;
    }

    .ed-welcome-banner {
        flex-direction: column;
        padding: 32px 24px;
        gap: 24px;
    }
}

@media (max-width: 640px) {
    .ed-welcome-banner {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .ed-welcome-title {
        font-size: 22px;
    }

    .ed-welcome-cta {
        width: 100%;
        justify-content: center;
    }

    .ed-welcome-visual {
        display: none;
    }

    .ed-skeleton-card {
        padding: 20px;
    }

    .ed-checklist-card,
    .ed-quick-actions {
        padding: 20px;
    }
}



/* Business Overview Grid */
.overview-header {
    text-align: center;
    margin-bottom: 40px;
}

.overview-header h2 {
    font-size: 32px;
    margin-bottom: 8px;
    font-weight: 700;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card-action {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.card-action:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: #0052cc;
}

.icon-box {
    width: 50px;
    height: 50px;
    background: #f0f5ff;
    color: #0052cc;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.card-action h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.card-action p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ============================================
   MOBILE MANAGER UI (The core request)
   ============================================ */


.mobile-frame {
    width: 100%;
    max-width: 480px;
    /* Mobile width */
    background: var(--bg);
    /* Light gray background like iOS settings */
    min-height: 600px;
}

.manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 4px;
    position: relative;
}

.manager-header h2 {
    font-size: 18px;
    font-weight: 700;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    white-space: nowrap;
}

.manager-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
    padding: 0 8px;
}

/* Category Card */
.category-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    border-radius: 28px;
    padding: 32px;
    margin-bottom: 24px;
    transition: all 0.3s;
}

.category-card.inactive {
    opacity: 0.6;
}

/* Dim when inactive */
.category-card:hover {
    border-color: #e0e0e0;
}

.cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.cat-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.cat-delete {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.2s;
    padding: 4px;
    color: #888;
}

.cat-delete:hover {
    opacity: 0.85;
    transform: scale(1.1);
    color: #c0392b;
}

.cat-title-input {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    background: transparent;
    padding: 4px 0;
    width: 100%;
    outline: none;
    letter-spacing: 0.5px;
    color: var(--text);
}

.cat-title-input::placeholder {
    color: #94a3b8;
    text-transform: none;
    font-weight: 500;
}

.cat-title-input:focus {
    border-bottom: 2px solid #27272a;
}

/* iOS Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: #27272a;
}

input:focus+.slider {
    box-shadow: 0 0 1px #27272a;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* ============================================
   HIERARCHICAL CATEGORY MANAGER (Quiet Luxury)
   ============================================ */

.categories-grid-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: 12px 24px 24px;
}

.chip-drag-handle {
    color: #a1a1aa;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    margin-right: -4px;
    opacity: 0.3;
}

.parent-chip:hover .chip-drag-handle,
.child-chip:hover .chip-drag-handle {
    opacity: 0.8;
}

.chip-drag-handle:active {
    cursor: grabbing;
}

.sortable-ghost {
    opacity: 0.35 !important;
    background: #f4f4f5 !important;
    border: 1px dashed #d4d4d8 !important;
}

.sortable-drag,
.sortable-fallback {
    opacity: 1 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
    transform: scale(1.01);
    cursor: grabbing !important;
    z-index: 9999 !important;
}

.cat-chips {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
}

.parent-item-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 24px 0;
}

.parent-item-wrapper:not(:last-of-type) {
    border-bottom: 1px solid #f4f4f5;
}

.parent-item-wrapper:first-of-type {
    padding-top: 12px;
}

.save-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #71717a;
    transition: all 0.3s ease;
}

.save-status ion-icon {
    font-size: 18px;
    color: #16a34a;
}

.save-status.saving {
    opacity: 0.6;
}

.save-status.saving ion-icon {
    animation: rotateSave 1.5s linear infinite;
    color: #71717a;
}

@keyframes rotateSave {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Parent Chip — Refined minimalist pill */
.parent-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 14px;
    padding: 10px 10px 10px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #18181b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    width: fit-content;
}

.parent-chip:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.parent-chip .chip-text {
    outline: none;
    min-width: 60px;
}

.parent-chip .chip-text:empty::before {
    content: "Group Name...";
    color: #a1a1aa;
    pointer-events: none;
}

.parent-chip-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    border-left: 1px solid #f4f4f5;
    padding-left: 6px;
}

.parent-chip-actions .chip-remove,
.parent-chip-add {
    cursor: pointer;
    color: #a1a1aa;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    transition: all 0.15s;
}

.parent-chip-actions .chip-remove:hover {
    background: #fef2f2;
    color: #ef4444;
}

.parent-chip-actions ion-icon,
.child-chip ion-icon {
    pointer-events: none;
}

.parent-chip-add {
    font-size: 18px;
    font-weight: 400;
}

.parent-chip-add:hover {
    background: #f4f4f5;
    color: #18181b;
}

/* Child Group — Elegant L-connector */
.child-group {
    margin-left: 22px;
    padding: 14px 0 10px 24px;
    border-left: 1px solid #e4e4e7;
    position: relative;
}

.child-group-label {
    display: block;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #d4d4d8;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.child-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Link Color Themes */
.link-theme-0 { background: #EEEDFE !important; border-color: #AFA9EC !important; color: #3C3489 !important; }
.link-theme-0 .chip-dot { background: #534AB7; }

.link-theme-1 { background: #E1F5EE !important; border-color: #5DCAA5 !important; color: #085041 !important; }
.link-theme-1 .chip-dot { background: #0F6E56; }

.link-theme-2 { background: #FAEEDA !important; border-color: #EF9F27 !important; color: #633806 !important; }
.link-theme-2 .chip-dot { background: #BA7517; }

.link-theme-3 { background: #FAECE7 !important; border-color: #F0997B !important; color: #712B13 !important; }
.link-theme-3 .chip-dot { background: #993C1D; }

.link-theme-4 { background: #E6F1FB !important; border-color: #85B7EB !important; color: #0C447C !important; }
.link-theme-4 .chip-dot { background: #185FA5; }

.link-theme-5 { background: #FBEAF0 !important; border-color: #ED93B1 !important; color: #72243E !important; }
.link-theme-5 .chip-dot { background: #993556; }

.link-theme-6 { background: #EAF3DE !important; border-color: #97C459 !important; color: #27500A !important; }
.link-theme-6 .chip-dot { background: #3B6D11; }

.link-theme-7 { background: #F1EFE8 !important; border-color: #B4B2A9 !important; color: #444441 !important; }
.link-theme-7 .chip-dot { background: #5F5E5A; }

.chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}


/* Child Chip — Clean, neutral */
.child-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #3f3f46;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.child-chip:hover {
    border-color: #18181b;
    color: #18181b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.child-chip .chip-text {
    outline: none;
    min-width: 40px;
}

.child-chip .chip-remove {
    cursor: pointer;
    color: #d4d4d8;
    transition: color 0.15s;
}

.child-chip .chip-remove:hover {
    color: #ef4444;
}

.child-chip .chip-remove ion-icon {
    pointer-events: none;
}

/* Actions group: branch | × | drag — equally spaced */
.child-chip-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    flex-shrink: 0;
    padding-left: 6px;
    border-left: 1px solid rgba(0,0,0,0.06);
}

.chip-link-btn {
    display: flex;
    align-items: center;
    color: #d4d4d8;
    cursor: pointer;
    transition: color 0.15s;
}

.chip-link-btn:hover,
.chip-link-btn.has-links {
    color: #18181b;
}

/* + Add Option button */
.chip-add-service, .chip-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    background: #f4f4f5;
    border: 1px dashed #d4d4d8;
    border-radius: 10px;
    color: #71717a;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.chip-add {
    width: 100%;
    height: 48px;
    border-radius: 14px;
    font-size: 14px;
    margin-top: 12px;
}

.chip-add-service:hover, .chip-add:hover {
    background: #e4e4e7;
    border-color: #18181b;
    color: #18181b;
}

.categories-actions-row {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f4f4f5;
}

.chip-add-service:hover {
    background: #f4f4f5;
    color: #0c0f10;
}

/* Animations for optimistic UI */
@keyframes chipSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.92);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes chipFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
        max-height: 200px;
    }

    to {
        opacity: 0;
        transform: scale(0.9);
        max-height: 0;
        padding: 0;
        margin: 0;
        border-width: 0;
        overflow: hidden;
    }
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chip-animate-in {
    animation: chipSlideIn 0.25s ease-out forwards;
}

.chip-animate-out {
    animation: chipFadeOut 0.25s ease-in forwards;
    pointer-events: none;
}

.card-animate-in {
    animation: cardSlideIn 0.3s ease-out forwards;
}

.card-animate-out {
    animation: chipFadeOut 0.3s ease-in forwards;
    pointer-events: none;
}

/* Custom Confirm Modal */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.confirm-overlay.visible {
    opacity: 1;
}

.confirm-overlay.hidden {
    display: none !important;
}

.confirm-modal {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 28px 24px;
    max-width: 360px;
    width: 92%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.confirm-overlay.visible .confirm-modal {
    transform: scale(1) translateY(0);
}

.confirm-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #fafafa;
    border: 1px solid #f4f4f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-icon ion-icon {
    font-size: 26px;
    color: #18181b;
}

.confirm-title {
    font: 700 18px var(--font);
    color: #18181b;
    margin: 0 0 10px;
}

.confirm-msg {
    font: 400 14px var(--font);
    color: #71717a;
    margin: 0 0 28px;
    line-height: 1.6;
}

.confirm-actions {
    display: flex;
    gap: 12px;
}

.confirm-btn {
    flex: 1;
    padding: 14px 16px;
    border-radius: 12px;
    border: none;
    font: 600 14px var(--font);
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-btn.cancel {
    background: #f4f4f5;
    color: #52525b;
}

.confirm-btn.cancel:hover {
    background: #e4e4e7;
}

.confirm-btn.danger {
    background: #18181b;
    color: #fff;
}

.confirm-btn.danger:hover {
    background: #27272a;
}

.confirm-btn.primary {
    background: #18181b;
    color: #fff;
}

.confirm-btn.primary:hover {
    background: #0043a6;
}

/* + Add Item */
.chip-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #71717a;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
    width: fit-content;
}

.chip-add:hover {
    background: #f4f4f5;
    color: #0c0f10;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .parent-chip {
        padding: 12px 8px 12px 18px;
        font-size: 16px;
    }

    .child-chip {
        padding: 10px 12px 10px 16px;
        font-size: 15px;
    }

    .child-group {
        margin-left: 16px;
        padding-left: 16px;
    }

    .chip-add-service {
        padding: 10px 18px;
        font-size: 14px;
    }
}

/* ============================================
   SKELETON LOADING
   ============================================ */
@keyframes skeleton-pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.skeleton-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    padding: 24px;
    pointer-events: none;
}

.skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: #f4f4f5;
    animation: skeleton-pulse 1.8s ease-in-out infinite;
}

.skeleton-title {
    width: 40%;
    height: 18px;
}

.skeleton-toggle {
    width: 40px;
    height: 20px;
    border-radius: 10px;
    background: #f4f4f5;
    animation: skeleton-pulse 1.8s ease-in-out infinite;
    animation-delay: 0.1s;
}

.skeleton-chip {
    width: 90px;
    height: 36px;
    border-radius: 20px;
    background: #e5e5e5;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    animation-delay: 0.2s;
}

.skeleton-chip.short {
    width: 64px;
    animation-delay: 0.35s;
}

/* Modal Spinner */
.modal-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e5e5e5;
    border-top-color: #0052cc;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Connection Overlay */
#connection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.hidden-opt {
    display: none !important;
}

/* Link Modal Overlay (Simple) */
/* Link Modal Redesign */
.link-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 9, 11, 0.4);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.link-modal-overlay.visible {
    opacity: 1;
}

.link-modal {
    background: #ffffff;
    border-radius: 24px;
    width: 90%;
    max-width: 440px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.link-modal-overlay.visible .link-modal {
    transform: translateY(0);
}

.link-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
}

.link-modal-header h3 {
    font: 700 18px var(--font);
    color: #18181b;
    margin: 0;
}

.link-modal-close {
    background: #f4f4f5;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    color: #71717a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.link-modal-close:hover {
    background: #e4e4e7;
    color: #18181b;
}

.link-modal-desc {
    font-size: 13px;
    color: #71717a;
    padding: 0 24px 16px;
    margin: 0;
    line-height: 1.5;
}

.link-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 24px 24px;
}

.link-modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
}

.link-modal-cancel-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: #f4f4f5;
    color: #52525b;
    font: 600 14px var(--font);
    cursor: pointer;
    transition: all 0.2s;
}

.link-modal-submit-btn {
    flex: 2;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: #18181b;
    color: #ffffff;
    font: 600 14px var(--font);
    cursor: pointer;
    transition: all 0.2s;
}

.link-modal-submit-btn:hover {
    background: #27272a;
}

.link-group-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a1a1aa;
    margin: 20px 0 10px;
}

.link-group-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.link-option-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 20px;
    font: 500 13px var(--font);
    color: #3f3f46;
    cursor: pointer;
    transition: all 0.2s;
}

.link-option-btn:hover {
    border-color: #18181b;
    color: #18181b;
}

.link-option-btn.selected {
    background: #18181b;
    border-color: #18181b;
    color: #ffffff;
}

.link-option-btn:active {
    transform: translateY(0);
}

/* Parent chip link button */
.parent-chip-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px 6px;
    transition: all 0.2s;
}

.parent-chip-link:hover {
    background: #f0f5ff;
    color: var(--accent-blue, #0052cc);
    border-radius: 8px;
}

@media (min-width: 768px) {
    .link-modal {
        border-radius: 20px;
        max-height: 60vh;
        margin-bottom: 0;
    }

    .link-modal-overlay {
        align-items: center;
    }

    .link-modal-overlay.visible .link-modal {
        transform: translateY(0);
    }

    .link-modal {
        transform: translateY(20px);
    }
}

.manager-footer {
    position: sticky;
    bottom: 20px;
    padding-top: 20px;
    background: linear-gradient(to bottom, rgba(247, 247, 248, 0), rgba(247, 247, 248, 1) 20%);
    pointer-events: none;
    text-align: center;
}

.manager-footer button {
    pointer-events: auto;
    width: 100%;
    border-radius: 16px;
}

/* Utility Visibility Classes */
.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }

    .btn-icon.mobile-only {
        display: flex !important;
    }

    .desktop-only {
        display: none !important;
    }

    .biz-switcher {
        display: none !important;
    }
}

/* ============================================
   MOBILE TOPBAR (Fixed Header, mobile only)
   ============================================ */
.mob-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    z-index: 500;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .mob-topbar {
        display: flex;
    }
}

.mob-topbar-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.04);
    cursor: pointer;
    color: var(--text);
    font-size: 22px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.mob-topbar-hamburger:hover {
    background: rgba(0, 0, 0, 0.08);
}

.mob-topbar-hamburger ion-icon {
    font-size: 22px;
    display: block;
}

/* ── Mobile business switcher button (center of topbar) ── */
.mob-biz-switcher-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 10px;
    transition: background 0.15s;
    max-width: 200px;
}

.mob-biz-switcher-btn:active {
    background: rgba(0,0,0,0.05);
}

.mob-biz-switcher-name {
    font-family: var(--font);
    font-weight: 600;
    font-size: 16px;
    color: var(--text);
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.mob-biz-switcher-chevron {
    font-size: 14px;
    color: #64748b;
    flex-shrink: 0;
}

/* ── Mobile business switcher bottom sheet ── */
.mob-biz-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 23, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9998;
    display: flex;
    align-items: flex-end;
    animation: fadeIn 0.2s ease;
}

.mob-biz-sheet-overlay.hidden { display: none !important; }

.mob-biz-sheet {
    width: 100%;
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    padding: 0 0 env(safe-area-inset-bottom, 16px);
    animation: mobileSheetUp 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.mob-biz-sheet-handle {
    width: 36px;
    height: 4px;
    background: rgba(0,0,0,0.12);
    border-radius: 999px;
    margin: 10px auto 0;
    flex-shrink: 0;
}

.mob-biz-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 10px;
    flex-shrink: 0;
}

.mob-biz-sheet-title {
    font: 600 16px var(--font);
    color: #0c0f10;
    letter-spacing: -0.01em;
}

.mob-biz-sheet-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #f4f4f5;
    color: #52525b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
}

.mob-biz-sheet-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 12px 8px;
    -webkit-overflow-scrolling: touch;
}

.mob-biz-sheet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 12px;
    border: none;
    border-radius: 14px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s;
    font-family: var(--font);
}

.mob-biz-sheet-item:hover,
.mob-biz-sheet-item:active {
    background: rgba(0,0,0,0.04);
}

.mob-biz-sheet-item.active {
    background: rgba(0,0,0,0.06);
}

.mob-biz-sheet-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f4f4f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #64748b;
    font-size: 18px;
}

.mob-biz-sheet-item.active .mob-biz-sheet-item-icon {
    background: #0c0f10;
    color: #fff;
}

.mob-biz-sheet-item-name {
    font-size: 15px;
    font-weight: 500;
    color: #0c0f10;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mob-biz-sheet-item-check {
    color: #0c0f10;
    font-size: 18px;
    flex-shrink: 0;
}

.mob-biz-sheet-footer {
    padding: 8px 20px 12px;
    border-top: 1px solid rgba(0,0,0,0.06);
    flex-shrink: 0;
}

.mob-biz-sheet-new-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 13px 16px;
    border: 1.5px dashed rgba(0,0,0,0.15);
    border-radius: 14px;
    background: transparent;
    cursor: pointer;
    font: 500 14px var(--font);
    color: #52525b;
    transition: all 0.15s;
}

.mob-biz-sheet-new-btn:hover,
.mob-biz-sheet-new-btn:active {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.25);
    color: #0c0f10;
}

.mob-biz-sheet-new-btn ion-icon {
    font-size: 20px;
    color: #64748b;
}

.mob-topbar-spacer {
    width: 40px;
    flex-shrink: 0;
}

/* Responsive Sidebar Drawer — Full-Height Left Panel */
@media (max-width: 768px) {
    .dashboard {
        position: relative;
        overflow-x: hidden;
    }

    /* Push main content down for the fixed topbar */
    .main-content {
        margin-top: 60px;
        margin-left: 0 !important;
        padding: 16px 16px 32px !important;
    }

    /* Full-height drawer from left edge */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(80vw, 300px);
        height: 100dvh;
        height: 100%;
        border-radius: 0 28px 28px 0;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: none;
        border-right: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.15);
        transform: translateX(-105%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 56px 20px 24px;
        z-index: 600;
        /* Ensure flex layout for sticky footer */
        display: flex !important;
        flex-direction: column !important;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* Sidebar content scrollable, footer pinned at bottom */
    .sidebar #sidebar-content {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar .sidebar-nav {
        flex: 1;
    }

    .sidebar .sidebar-footer {
        margin-top: auto;
        padding-top: 16px;
        flex-shrink: 0;
    }

    /* Full-screen overlay behind drawer — darkened */
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 590;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s ease;
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }

    .sidebar-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Mobile Sidebar Header with Close Button */
    .sidebar-header.mobile-flex {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-header h2 {
        margin: 0;
        font-size: 16px;
    }

    /* Hide old floating hamburger if any */
    .btn-icon.mobile-only[style*="position: absolute"] {
        display: none !important;
    }
}

/* ============================================
   PUBLIC REVIEW PAGE STYLES (Premium Card)
   ============================================ */

/* Prevent page-level scroll — review is a single-screen app */
.review-container,
.review-container ~ * {
    /* guard */
}

html:has(.review-container),
body:has(.review-container) {
    overflow: hidden;
    height: 100dvh;
}

.review-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    height: 100dvh;
    padding: 16px;
    box-sizing: border-box;
    background: var(--bg);
    overflow: hidden;
}

.review-container>div {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    border-radius: 28px;
    width: 100%;
    max-width: 448px;
    height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#review-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

#result-card {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
}

#loading-review:not(.hidden),
#review-result:not(.hidden) {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Header */
.rv-header {
    padding: 48px 32px 32px;
    text-align: center;
}

.rv-header h1,
#review-heading {
    font-size: 30px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.025em;
    margin: 0;
    line-height: 1.2;
}

/* Star Rating */
.rv-stars {
    padding: 0 32px 40px;
}

.star-rating {
    display: flex;
    justify-content: center;
    direction: rtl;
    gap: 8px;
    margin: 0;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 40px;
    color: #e5e7eb;
    cursor: pointer;
    transition: color 0.15s, transform 0.2s ease;
    line-height: 1;
}

.star-rating label:active {
    transform: scale(1.2);
}

.star-rating input:checked~label,
.star-rating label:hover,
.star-rating label:hover~label {
    color: #0c0f10;
}

/* Categories Area */
.rv-categories {
    padding: 0 32px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

/* Section Headings */
.section h2 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    margin-bottom: 16px;
}

.section {
    margin-bottom: 28px;
}

/* Section: locked = hidden, waiting for previous section selection */
.section.locked {
    display: none;
}

/* Progressive reveal animation — slides up + fades in */
@keyframes sectionUnlock {
    from {
        opacity: 0;
        transform: translateY(20px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 1200px;   /* generous cap; removed after animation */
    }
}

.section.section-animate-in {
    overflow: hidden;         /* clips content while max-height animates */
    animation: sectionUnlock 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Public Chips (Selectable) */
.chips-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 0;
}

.chip {
    padding: 10px 24px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.5);
    font: 500 14px var(--font);
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-secondary);
    user-select: none;
}

@keyframes chipScaleIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(4px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.chip-animate-in {
    animation: chipScaleIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.chip:hover {
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text);
}

.chip.selected {
    border-color: #0c0f10;
    background: #0c0f10;
    color: #ffffff;
}

/* OK Button Footer */
.rv-footer {
    padding: 32px;
    margin-top: auto;
}

.rv-submit-btn {
    width: 100%;
    padding: 16px;
    background: #0c0f10;
    color: #ffffff;
    border: none;
    border-radius: 28px;
    font: 600 16px var(--font);
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.rv-submit-btn:hover {
    background: #27272a;
}

.rv-submit-btn:active {
    transform: scale(0.98);
}

/* Textarea & Result */
textarea {
    width: 100%;
    min-height: 140px;
    padding: 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    font: 400 16px/1.6 var(--font);
    resize: none;
    outline: none;
    color: var(--text);
    margin-bottom: 20px;
    display: block;
}

textarea:focus {
    border-color: var(--accent);
    background: #fff;
}

/* Common Utilities */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #eee;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 24px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 40px;
    color: #9ca3af;
    font: 400 14px var(--font);
    gap: 16px;
}

/* Modern dot-pulse loader */
.dot-loader {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dot-loader span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    animation: dotPulse 1.2s ease-in-out infinite;
}

.dot-loader span:nth-child(2) {
    animation-delay: 0.15s;
}

.dot-loader span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes dotPulse {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   REVIEW GENERATED PAGE (Modern Redesign)
   ============================================ */
.rg-page {
    padding: 8px 0 24px;
}

.rg-back {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 8px 4px;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    transition: background 0.15s;
}

.rg-back:hover {
    background: #f5f5f5;
}

.rg-heading {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text);
}

.rg-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.5;
}

.rg-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.rg-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.rg-stars {
    font-size: 18px;
    color: #f5c518;
    letter-spacing: 3px;
}

.rg-review-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 24px;
}

.rg-review-card p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.rg-card-divider {
    height: 1px;
    background: #E4EDFF;
    margin: 16px 0;
}

.rg-copy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
}

.rg-copy-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #34c759;
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.3s ease;
}

.rg-copy-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

.rg-check-icon {
    flex-shrink: 0;
}

.rg-copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.rg-copy-btn:hover {
    background: #f0f0f0;
    color: var(--text);
}

.rg-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 80%;
    max-width: 320px;
    margin: 0 auto;
    padding: 16px 24px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 50px;
    font: 600 16px var(--font);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.rg-submit-btn:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.rg-g-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* What Went Wrong — Feedback Card */
#feedback-form {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 16px;
}

.ww-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 28px;
    padding: 48px 32px 36px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ww-heading {
    font: 500 20px/1.3 var(--font);
    color: #374151;
    text-align: center;
    margin: 0 0 28px;
}

.ww-textarea {
    width: 100%;
    min-height: 130px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    font: 400 14px/1.5 var(--font);
    color: #374151;
    background: #ffffff;
    resize: none;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ww-textarea::placeholder {
    color: #9ca3af;
}

.ww-textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.ww-send-btn {
    width: 100%;
    padding: 16px 24px;
    margin-top: 24px;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    font: 600 15px var(--font);
    cursor: pointer;
    transition: background 0.15s;
}

.ww-send-btn:hover {
    background: #27272a;
}

.ww-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    padding: 8px 12px;
    background: none;
    border: none;
    color: #6b7280;
    font: 500 14px var(--font);
    cursor: pointer;
    transition: color 0.15s;
}

.ww-back-link:hover {
    color: #111827;
}

/* ============================================
   ANALYTICS DASHBOARD — Quiet Luxury
   ============================================ */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

/* Mobile: 2-col for Scans+Reviews, Satisfaction full-width */
@media (max-width: 768px) {
    .analytics-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px;
    }

    /* First two KPI cards (Scans, Reviews) stay 2-col */
    .analytics-grid .kpi-card:nth-child(1),
    .analytics-grid .kpi-card:nth-child(2) {
        grid-column: span 1;
    }

    /* Satisfaction card: full-width hero treatment */
    .analytics-grid .kpi-card:nth-child(3) {
        grid-column: 1 / -1;
    }
}

.analytics-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
}

.analytics-header h2 {
    font-size: 26px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.5px;
}

/* Time Filter — Pill Capsule */
.time-filter-wrapper {
    position: relative;
}

.time-filter {
    padding: 10px 18px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font: 500 13px var(--font);
    color: var(--text-secondary);
    cursor: pointer;
    outline: none;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23586065' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.time-filter:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.7);
}

.time-filter:focus {
    border-color: rgba(43, 52, 56, 0.2);
    box-shadow: 0 0 0 3px rgba(43, 52, 56, 0.06);
}

/* KPI Cards — Glass Morphism */
.kpi-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    padding: 28px;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: var(--transition);
}

.kpi-card:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kpi-header h3 {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.8px;
}

/* Icons — Ghost-like, part of the background */
.kpi-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    opacity: 0.18;
    transition: var(--transition);
}

.kpi-card:hover .kpi-icon {
    opacity: 0.3;
}

.kpi-icon ion-icon {
    stroke-width: 1.2px;
}

.scans-icon {
    color: var(--text);
}

.reviews-icon {
    color: var(--text);
}

.sat-icon {
    color: var(--text);
}

.kpi-body {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.kpi-value {
    font-size: 36px;
    font-weight: 500;
    color: var(--text);
    margin: 0;
    letter-spacing: -1px;
    background: linear-gradient(180deg, var(--text) 0%, rgba(43, 52, 56, 0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Trend Indicators — Minimal, No Pill */
.kpi-trend {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0;
    border-radius: 0;
    background: none !important;
}

.trend-up {
    color: #2d8a56;
    background: none !important;
}

.trend-down {
    color: #9f403d;
    background: none !important;
}

.trend-neutral {
    color: var(--text-secondary);
    background: none !important;
}

.val-green {
    color: #2d8a56 !important;
}

.val-orange {
    color: #b8660d !important;
}

.val-red {
    color: #9f403d !important;
}

/* Custom Top Services Progress Bars */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 12px;
}

.service-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-item-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.service-item-track {
    width: 100%;
    height: 6px;
    background: rgba(43, 52, 56, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.service-item-fill {
    height: 100%;
    background: #27272a;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Skeleton Empty State for Services */
.skeleton-services-empty {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 8px;
}

.skel-bar {
    height: 5px;
    background: rgba(43, 52, 56, 0.06);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.skel-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(43, 52, 56, 0.04) 50%, transparent 100%);
    animation: skelShimmer 2.5s infinite linear;
}

@keyframes skelShimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.skel-hint {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.5;
    text-align: center;
    margin-top: 8px;
    font-style: normal;
}

/* Skeleton Donut for Sentiment */
.skel-donut-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
}

.skel-donut-ring {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 8px solid rgba(43, 52, 56, 0.04);
    border-top-color: rgba(43, 52, 56, 0.08);
    animation: skelDonutSpin 4s linear infinite;
    position: relative;
}

.skel-donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% - 16px));
}

.skel-donut-icon {
    font-size: 28px;
    color: var(--text-secondary);
    opacity: 0.12;
    font-variation-settings: 'FILL' 1, 'wght' 300;
}

@keyframes skelDonutSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Empty State — Skeleton-inspired */
.analytics-empty {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 28px;
    padding: 56px 24px;
    text-align: center;
    margin-top: 24px;
}

.analytics-empty-content {
    max-width: 360px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.empty-icon-wrapper {
    width: 72px;
    height: 72px;
    background: rgba(43, 52, 56, 0.04);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: rgba(88, 96, 101, 0.3);
    margin-bottom: 20px;
}

.analytics-empty h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
    letter-spacing: -0.3px;
}

.analytics-empty p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 20px;
}

/* ============================================
   MOBILE DASHBOARD OVERVIEW
   ============================================ */

/* Desktop/Mobile visibility for overview wrappers */
/* Sidebar now handles navigation, so desktop card grid is hidden */
.mob-overview {
    display: block;
}

.desktop-overview {
    display: none !important;
}

/* Hide mob-tabs on desktop (sidebar handles navigation) */
@media (min-width: 769px) {
    .mob-tabs {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .overview-header {
        text-align: left;
        margin-bottom: 20px;
    }

    .overview-header h2 {
        font-size: 24px;
    }

    .overview-header .detail-slug {
        font-size: 12px;
    }
}

/* Horizontal Pill Tabs */
.mob-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 24px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mob-tabs::-webkit-scrollbar {
    display: none;
}

.mob-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    font: 600 13px var(--font);
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.mob-tab-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.mob-tab.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.mob-tab:not(.active):hover {
    background: #f0f5ff;
    border-color: #c4d9f2;
}

/* Section Titles */
.mob-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

/* Performance KPI Grid */
.mob-perf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.mob-kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.mob-kpi-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.mob-kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
}

.mob-kpi-trend {
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mob-kpi-trend.up {
    color: #22c55e;
}

.mob-kpi-trend.down {
    color: var(--danger);
}

.mob-kpi-trend ion-icon {
    font-size: 14px;
}

/* Generic Card */
.mob-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.mob-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.mob-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.mob-card-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Section Header */
.mob-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mob-view-all {
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

/* Review Summary Card */
.review-summary-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.review-latest-badge {
    background: #dcfce7;
    color: #22c55e;
    font-size: 18px;
    font-weight: 700;
    padding: 12px;
    border-radius: 12px;
    min-width: 50px;
    text-align: center;
}

.review-summary-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.review-summary-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-summary-sub {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-summary-chevron {
    color: #cbd5e1;
    font-size: 20px;
}

/* ============================================
   BUSINESS FORM MODAL — Premium SaaS Design
   ============================================ */
.form-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(12px) brightness(0.8);
    -webkit-backdrop-filter: blur(12px) brightness(0.8);
}

.form-modal-overlay.hidden {
    display: none !important;
}

/* ---- Modal Card ---- */
.biz-modal-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.1), 0 2px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    max-width: 900px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 28px 32px 0;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Side-by-side body */
.biz-modal-body {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    flex: 1;
    overflow: hidden;
    padding-bottom: 28px;
}

/* Left column: scrollable form */
.biz-modal-left {
    overflow-y: auto;
    overflow-x: visible;   /* prevent left-side box-shadow clipping */
    scrollbar-width: none;
    padding-right: 4px;
    padding-left: 4px;     /* breathing room so input focus-ring isn't clipped */
}
.biz-modal-left::-webkit-scrollbar { display: none; }

/* Right column: centered phone mockup */
.biz-modal-right {
    display: flex;
    align-items: center;   /* vertical center */
    justify-content: center;
    border-left: 1px solid #f4f4f5;
    padding-left: 28px;
}

/* ── Phone mockup ── */
.biz-phone-preview-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    /* no sticky — right column doesn't scroll */
}

.biz-pp-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #a1a1aa;
    text-transform: uppercase;
    margin: 0;
}

.biz-phone-frame {
    width: 218px;          /* larger */
    height: 440px;
    background: linear-gradient(145deg, #2c2c2e, #1a1a1c);
    border-radius: 34px;
    padding: 6px;
    position: relative;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.07),
        0 0 0 0.5px rgba(0,0,0,0.9),
        0 24px 60px rgba(0,0,0,0.24);
    flex-shrink: 0;
}

.biz-phone-screen {
    background: #fff;
    border-radius: 29px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px 16px;
    gap: 10px;
    overflow: hidden;
}

.biz-pp-heading {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    text-align: center;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0;
    transition: all 0.15s;
    word-break: break-word;
}

.biz-pp-stars {
    font-size: 20px;
    color: #111;
    letter-spacing: 1px;
    line-height: 1;
}

.biz-pp-section-lbl {
    font-size: 7.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a1a1aa;
    align-self: flex-start;
    margin: 0;
}

/* Dynamic preview area */
.biz-pp-dynamic {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 0;
    overflow: hidden;
}

/* Skeleton shimmer */
@keyframes ppSkelShimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}
.biz-pp-skel {
    border-radius: 6px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: ppSkelShimmer 1.6s ease-in-out infinite;
}
.biz-pp-skel-label { height: 8px; width: 55%; align-self: flex-start; margin-bottom: 4px; }
.biz-pp-skel-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.biz-pp-skel-chip  { height: 22px; border-radius: 6px; }
.biz-pp-skel-chip:nth-child(1) { width: 52px; }
.biz-pp-skel-chip:nth-child(2) { width: 40px; }
.biz-pp-skel-chip:nth-child(3) { width: 60px; }
.biz-pp-skel-chip:nth-child(4) { width: 44px; }

.biz-pp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-self: flex-start;
}

.biz-pp-chip {
    font-size: 9.5px;
    font-weight: 500;
    padding: 4px 9px;
    border-radius: 7px;
    border: 1px solid rgba(0,0,0,0.1);
    color: #71717a;
    background: #fafafa;
}

.biz-pp-chip--on {
    background: #09090b;
    color: #fff;
    border-color: #09090b;
}

.biz-pp-ok {
    width: 100%;
    height: 34px;
    background: #09090b;
    color: #fff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    margin-top: auto;
    flex-shrink: 0;
}

.biz-pp-caption {
    font-size: 10.5px;
    color: #a1a1aa;
    text-align: center;
    margin: 0;
}

@keyframes mobileSheetUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ---- Header ---- */
.biz-modal-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}

.biz-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-width: 0;
}

/* Title row: title+badge on left, close on right */
.biz-modal-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.biz-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #71717a;
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.biz-modal-badge ion-icon {
    font-size: 11px;
    color: #a1a1aa;
}

.biz-modal-card h2 {
    font: 700 20px var(--font);
    color: #0f172a;
    margin: 0;
}

.biz-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    color: #a1a1aa;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.biz-modal-close:hover {
    background: #f4f4f5;
    color: #18181b;
}

.biz-modal-close ion-icon {
    font-size: 18px;
}

/* ---- Sections ---- */
.biz-form-section {
    margin-bottom: 24px;
}

.biz-form-section-label {
    font: 500 10px var(--font);
    letter-spacing: 0.1em;
    color: #a1a1aa;
    margin: 0 0 16px;
}

.biz-form-section-hint {
    font-weight: 400;
    font-size: 10px;
    letter-spacing: 0;
    color: #94a3b8;
    margin-left: 6px;
    text-transform: none;
}

.form-group {
    margin-bottom: 14px;
}

/* ---- Labels ---- */
.biz-label {
    display: block;
    font: 400 11px var(--font);
    letter-spacing: 0.01em;
    color: #a1a1aa;   /* muted — draws eye to input content, not label */
    margin-bottom: 6px;
}

.biz-slug-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}

.biz-slug-edit-hint {
    font-weight: 400;
    color: #94a3b8;
    font-size: 11px;
}

.biz-slug-edit-btn {
    font: 500 11px var(--font);
    color: #52525b;
    background: #f4f4f5;
    border: none;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.biz-slug-edit-btn:hover {
    background: #e4e4e7;
    color: #18181b;
}

.biz-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.biz-slug-prefix {
    position: absolute;
    left: 40px;
    color: #a1a1aa;
    font: 400 11px var(--font);  /* smaller — prefix is context, not focus */
    pointer-events: none;
    z-index: 1;
    white-space: nowrap;
}

.biz-slug-wrap input.biz-input {
    padding-left: 54px;  /* space for "r/" prefix */
    padding-right: 62px;  /* space for inline Edit button */
}

/* Inline Edit/Lock button inside the slug input */
.biz-slug-edit-inline {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    border-radius: 7px;
    padding: 3px 9px;
    font: 500 11px var(--font);
    color: #52525b;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    z-index: 2;
}
.biz-slug-edit-inline:hover  { background: #e4e4e7; color: #18181b; }
.biz-slug-edit-inline.active { background: #18181b; color: #fff; border-color: #18181b; }

.biz-input-icon {
    position: absolute;
    left: 16px;
    color: #a1a1aa;
    font-size: 18px;
    pointer-events: none;
    z-index: 1;
}

input.biz-input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 42px;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    font: 400 14px var(--font);
    color: #18181b;
    background: #fafafa;
    transition: all 0.2s ease;
    outline: none;
}

input.biz-input::placeholder {
    color: #a1a1aa;
}

input.biz-input:focus {
    border-color: #18181b;
    background: #ffffff;
    box-shadow: 0 0 0 1px #18181b;
}

input.biz-input[readonly] {
    background: #f4f4f5;
    color: #71717a;
    border-color: transparent;
    cursor: default;
}

/* ---- iOS Segmented Control with sliding indicator ---- */
.biz-segment-control {
    position: relative;
    display: inline-flex;
    background: #f4f4f5;
    border-radius: 12px;
    padding: 4px;
    gap: 0;
    width: 100%;
}

/* The sliding white pill — JS sets left + width */
.biz-segment-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    background: #ffffff;
    border-radius: 9px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: left 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 0;
}

.biz-segment-btn {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 0;
    font: 500 12.5px var(--font);
    color: #71717a;
    background: transparent;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    transition: color 0.15s;
}
.biz-segment-btn .material-symbols-outlined { font-size: 14px; }

.biz-segment-btn.active {
    color: #18181b;
    font-weight: 600;
    background: transparent; /* slider provides the bg */
    box-shadow: none;
}

/* ---- Actions ---- */
.biz-modal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 24px;
    border-top: 1px solid #f4f4f5;
}

.biz-save-btn {
    flex: 1;
    height: 48px;
    background: #09090b;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font: 500 14px var(--font);
    cursor: pointer;
    transition: all 0.2s ease;
}

.biz-save-btn:hover {
    background: #27272a;
}

.biz-save-btn:active {
    transform: scale(0.98);
}

.biz-cancel-btn {
    background: #f4f4f5;
    border: none;
    border-radius: 14px;
    height: 48px;
    color: #52525b;
    font: 500 14px var(--font);
    cursor: pointer;
    padding: 0 24px;
    transition: all 0.2s ease;
}

.biz-cancel-btn:hover {
    background: #e4e4e7;
    color: #18181b;
}

/* ---- Settings card fallback (used in other places) ---- */
.settings-card {
    margin-bottom: 24px;
}



/* Sentiment Bars */
.sentiment-card {
    margin-bottom: 24px;
}

.mob-sentiment-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mob-bar-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mob-bar {
    height: 40px;
    border-radius: 8px;
    min-width: 20px;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mob-bar-happy {
    background: linear-gradient(135deg, #34c759, #30d158);
}

.mob-bar-unhappy {
    background: linear-gradient(135deg, #ff6b81, #ff4757);
}

.mob-bar-neutral {
    background: linear-gradient(135deg, #f9ca24, #f0932b);
}

.mob-bar-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Conversion Funnel */
.mob-funnel {
    padding: 20px;
}

.mob-funnel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.mob-funnel-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.mob-funnel-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.mob-funnel-progress {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.mob-funnel-progress:last-child {
    margin-bottom: 0;
}

.mob-funnel-bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #0052cc, #4d9aff);
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mob-funnel-bar.green {
    background: linear-gradient(90deg, #34c759, #5dd97b);
}

.mob-funnel-bar.orange {
    background: linear-gradient(90deg, #f0932b, #f9ca24);
}

/* Bottom Navigation Bar */
.mob-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    padding-bottom: max(0px, env(safe-area-inset-bottom));
    z-index: 200;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    margin: 0;
}

@media (max-width: 768px) {
    /* Bottom nav is removed — override any remnants */
    .mob-bottom-nav {
        display: none !important;
    }

    /* ── Analytics Charts ── */
    .charts-container {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .chart-card {
        min-width: 0;
        overflow: hidden;
    }

    .chart-wrapper {
        min-width: 0;
        -webkit-overflow-scrolling: touch;
    }

    #analytics-dashboard {
        overflow-x: hidden;
    }

    /* Mobile manager header */
    #mobile-manager .manager-header {
        justify-content: space-between;
    }

    /* ── Dashboard Header Typography ── */
    .analytics-header {
        margin-bottom: 12px !important;
    }

    .analytics-header h2 {
        font-size: 22px !important;
        letter-spacing: -0.4px;
    }

    .analytics-header + p,
    .analytics-header p {
        margin-top: 2px !important;
        font-size: 13px !important;
    }

    /* ── Empty / Welcome Dashboard ── */
    .empty-dashboard {
        padding: 12px 0 32px !important;
        gap: 14px !important;
    }

    /* ── Hero / Welcome Banner ── */
    .ed-welcome-banner {
        padding: 24px 20px !important;
        border-radius: 20px !important;
        gap: 16px !important;
    }

    .ed-welcome-title {
        font-size: 20px !important;
        letter-spacing: -0.3px;
        margin-bottom: 6px !important;
    }

    .ed-welcome-sub {
        font-size: 13px !important;
        margin-bottom: 16px !important;
    }

    /* Full-width CTA button */
    .ed-welcome-cta {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px 20px !important;
        font-size: 14px !important;
    }

    /* ── Skeleton Chart Cards ── */
    .ed-skeleton-row {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .ed-skeleton-card {
        padding: 20px !important;
        border-radius: 20px !important;
    }

    /* Dashboard reviews chart: prevent overflow, compact */
    #dashboard-reviews-chart-container {
        min-height: 100px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Star distribution bars: stretch full width */
    .service-item-track {
        flex: 1 !important;
    }

    /* ── Bottom Grid (Checklist + Quick Actions) ── */
    .ed-bottom-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .ed-checklist-card {
        padding: 20px !important;
        border-radius: 20px !important;
    }

    /* Quick Actions: keep 2-col grid, tighten padding */
    .ed-action-list {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .ed-action-item {
        padding: 16px !important;
        border-radius: 20px !important;
        gap: 10px !important;
    }

    .ed-action-chevron {
        position: static !important;
        display: none !important;
    }

    .ed-action-text span {
        font-size: 12px !important;
    }

    .ed-action-text small {
        font-size: 11px !important;
    }

    /* ── Reviews list: single column ── */
    .reviews-list {
        grid-template-columns: 1fr !important;
    }

    /* ═══════════════════════════════════════
       SEO — Mobile Optimizations
       ═══════════════════════════════════════ */

    /* Stack left + right columns vertically */
    .seo-content.seo-grid-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    .seo-grid-layout {
        flex-direction: column !important;
        display: flex !important;
    }

    .seo-grid-left,
    .seo-grid-right {
        width: 100% !important;
    }

    /* SEO page container */
    #seo-view {
        padding: 16px 16px 32px !important;
    }

    #seo-view .analytics-header {
        margin-bottom: 20px !important;
    }

    /* Workspace card: tighter padding */
    .seo-workspace-card {
        padding: 20px !important;
    }

    /* Textarea: shorter on mobile */
    #business-niche-input {
        height: 150px !important;
        padding: 14px !important;
        padding-bottom: 14px !important;
        font-size: 14px !important;
        border-radius: 14px !important;
    }

    #business-niche-input:focus {
        border-color: #000000 !important;
        box-shadow: 0 0 0 1px #000000 !important;
    }

    /* Analyze button: move out of textarea, full-width below, primary action style */
    #analyze-seo-btn {
        position: static !important;
        width: 100% !important;
        margin-top: 10px !important;
        border-radius: 12px !important;
        padding: 12px 16px !important;
        font-size: 13px !important;
        justify-content: center !important;
        border: none !important;
        background: #1A1A1A !important;
        color: #ffffff !important;
    }

    /* Textarea container: remove relative position so button flows below */
    .seo-input-row {
        position: static !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Results grid: 2 cols → 1 col */
    .seo-results-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* Tag wrapper: no overflow, added padding and gap */
    .seo-tag-wrapper {
        min-height: 80px !important;
        overflow: hidden !important;
        flex-wrap: wrap !important;
        padding-top: 16px !important;
        padding-bottom: 16px !important;
        gap: 12px !important;
    }

    #seo-tag-input {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Hide dummy tags on mobile to prevent overlapping with placeholder */
    #seo-dummy-tags {
        display: none !important;
    }

    /* Recommendations: compact */
    #seo-recommendations {
        min-height: 80px !important;
    }

    /* Results area: tighter top margin */
    #seo-workspace-results-area {
        margin-top: 20px !important;
    }

    /* Performance card: tighter padding */
    .seo-performance-card {
        padding: 20px !important;
        gap: 20px !important;
        height: auto !important;
    }

    /* SEO Performance header: stack on mobile with small gap */
    .seo-strength-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
        margin-bottom: 16px !important;
    }

    .seo-strength-badge {
        font-size: 9px !important;
        padding: 4px 8px !important;
    }

    /* Circular progress: reduced to allow more content visibility */
    .seo-circular-progress {
        width: 78px !important;
        height: 78px !important;
    }

    .seo-circular-inner {
        width: 74px !important;
        height: 74px !important;
    }

    .seo-strength-value {
        font-size: 16px !important;
    }

    .seo-circular-progress-wrapper {
        padding: 8px 0 !important;
    }

    /* Checklist: bigger touch targets, perfectly centered */
    .seo-check-item {
        padding: 8px 4px !important;
        gap: 12px !important;
        min-height: 40px !important;
        display: flex !important;
        align-items: center !important;
    }

    .seo-check-item .icon {
        font-size: 20px !important;
        flex-shrink: 0;
    }

    .seo-check-item .text {
        font-size: 13px !important;
        line-height: 1.4 !important;
    }

    /* Mini stats bottom row */
    #seo-view .glass-card[style*="flex: 1"] {
        padding: 12px !important;
        border-radius: 16px !important;
    }

    /* Footer save button: full-width */
    .seo-footer-action {
        margin-top: 20px !important;
    }

    .seo-save-btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px 20px !important;
        font-size: 14px !important;
    }

    /* ═══════════════════════════════════════
       ANALYTICS — Mobile Optimizations
       ═══════════════════════════════════════ */

    /* Header: flex-row always, compact margin */
    #analytics-dashboard .analytics-header {
        margin-bottom: 16px !important;
        align-items: center;
    }

    #analytics-dashboard .analytics-header h2 {
        font-size: 22px !important;
        white-space: nowrap;
    }

    /* Time filter compact */
    .time-filter {
        padding: 8px 32px 8px 14px !important;
        font-size: 12px !important;
    }

    /* KPI cards: tighter padding, softer shadow, smaller radius */
    .analytics-grid .kpi-card {
        padding: 18px 16px !important;
        border-radius: 20px !important;
        gap: 12px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
        border: 1px solid rgba(0, 0, 0, 0.06) !important;
    }

    /* Scans + Reviews: smaller value font for 2-col fit */
    .analytics-grid .kpi-card:nth-child(1) .kpi-value,
    .analytics-grid .kpi-card:nth-child(2) .kpi-value {
        font-size: 28px !important;
        letter-spacing: -0.5px;
    }

    /* Satisfaction (full-width): horizontal layout */
    .analytics-grid .kpi-card:nth-child(3) {
        flex-direction: row !important;
        align-items: center !important;
        gap: 16px !important;
    }

    .analytics-grid .kpi-card:nth-child(3) .kpi-header {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex: 1;
    }

    .analytics-grid .kpi-card:nth-child(3) .kpi-body {
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .analytics-grid .kpi-card:nth-child(3) .kpi-value {
        font-size: 32px !important;
    }

    .analytics-grid .kpi-card:nth-child(3) .kpi-trend {
        background: rgba(45, 138, 86, 0.1) !important;
        padding: 4px 8px !important;
        border-radius: 12px !important;
    }

    /* KPI icons: ~12% smaller on mobile */
    .kpi-icon {
        width: 22px !important;
        height: 22px !important;
        font-size: 18px !important;
    }

    .kpi-trend {
        font-size: 11px !important;
    }

    /* Chart cards: compact */
    .chart-card {
        padding: 20px !important;
        border-radius: 20px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
        border: 1px solid rgba(0, 0, 0, 0.06) !important;
    }

    .chart-card h3 {
        margin-bottom: 14px !important;
    }

    /* Services list: max-height + internal scroll */
    #top-services-list.services-list {
        max-height: 220px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-right: 4px;
    }

    /* Service item: name truncates, count pinned right */
    .service-item-header {
        display: flex !important;
        justify-content: space-between !important;
        gap: 8px !important;
    }

    .service-item-header span:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
        flex: 1;
    }

    .service-item-header span:last-child {
        flex-shrink: 0;
    }

    /* Sentiment donut chart: reduced height */
    .chart-card .chart-wrapper {
        height: 200px !important;
    }

    /* ═══════════════════════════════════════
       REVIEWS — Mobile Optimizations
       ═══════════════════════════════════════ */

    /* Export Button inside header */
    .export-btn.icon-only-mobile {
        padding: 8px !important;
        border-radius: 50% !important;
        height: 36px !important;
        width: 36px !important;
        justify-content: center !important;
        background: transparent !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: none !important;
    }
    .export-btn.icon-only-mobile .desktop-text {
        display: none !important;
    }

    /* Toolbar Layout */
    .reviews-toolbar {
        flex-direction: column;
        gap: 16px !important;
    }
    
    .reviews-actions {
        order: 1;
        width: 100%;
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px !important;
    }
    
    .review-search-box {
        grid-column: 1 / -1;
        height: 40px !important;
    }
    
    .time-filter-wrapper,
    .time-filter {
        width: 100%;
    }

    /* Category Chips Scroll */
    .reviews-filters {
        order: 2;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0px;
        margin-top: -4px; /* pull closer to filters */
        -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
    }
    
    .filter-chip {
        padding: 6px 12px !important;
        font-size: 13px !important;
    }

    /* Review Card compact layout */
    .review-card {
        padding: 20px !important;
        border-radius: 20px !important;
    }
    
    .review-text {
        font-size: 14px !important;
        line-height: 1.7 !important;
        margin-bottom: 12px !important;
    }
    
    .review-service-container {
        margin-bottom: 16px !important;
    }
    
    .review-service-tag {
        font-size: 9px !important;
        padding: 3px 8px !important;
        background: #f8fafc !important;
    }
    
    .review-time {
        font-size: 11px !important;
        color: #94a3b8 !important;
        font-weight: 400 !important;
    }
    
    .review-rating {
        gap: 5px !important;
    }
    
    /* Sentiment Footer alignment */
    .review-sentiment-indicator {
        gap: 6px !important;
    }
    
    .review-sentiment-text {
        font-size: 12px !important;
    }
    
    .review-dot {
        width: 6px !important;
        height: 6px !important;
    }

    /* ═══════════════════════════════════════
       MANAGE CATEGORIES — Mobile Optimizations
       ═══════════════════════════════════════ */

    /* Save Status: compact inline badge — nowrap fix */
    .save-status {
        padding: 4px 10px !important;
        font-size: 11px !important;
        font-weight: 500 !important;
        border-radius: 20px !important;
        gap: 5px !important;
        background: transparent !important;
        border: none !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .save-status ion-icon {
        font-size: 14px !important;
    }

    /* Category Card: tighter container padding */
    .category-card {
        padding: 8px 16px 16px !important;
        border-radius: 16px !important;
    }

    /* Parent Group Wrapper spacing */
    .parent-item-wrapper {
        padding: 16px 0 !important;
    }

    .parent-item-wrapper:first-of-type {
        padding-top: 8px !important;
    }

    /* Parent Chip: full width, compact */
    .parent-chip {
        width: 100% !important;
        padding: 8px 8px 8px 12px !important;
        border-radius: 12px !important;
        font-size: 13px !important;
        gap: 8px !important;
    }

    /* Drag handle on the right: push to end */
    .parent-chip .chip-drag-handle {
        order: 10;
        margin-right: 0 !important;
        margin-left: auto;
    }

    .parent-chip .chip-text {
        order: 1;
        flex: 1;
        min-width: 40px !important;
    }

    .parent-chip-actions {
        order: 9;
        margin-left: 0 !important;
        padding-left: 4px !important;
        gap: 2px !important;
        border-left: none !important;
    }

    .parent-chip-actions .chip-remove,
    .parent-chip-add {
        width: 28px !important;
        height: 28px !important;
        border-radius: 8px !important;
    }

    /* Child Group: tighter indent */
    .child-group {
        margin-left: 12px !important;
        padding: 10px 0 6px 16px !important;
    }

    .child-group-label {
        font-size: 8px !important;
        margin-bottom: 10px !important;
    }

    /* Child Chips: compact */
    .child-chips {
        gap: 6px !important;
    }

    .child-chip {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        padding: 5px 10px !important;
        font-size: 12px !important;
        border-radius: 8px !important;
        gap: 6px !important;
    }

    /* Child chip: dot + text on left, actions on right */
    .child-chip .chip-dot {
        order: 1;
        flex-shrink: 0;
    }

    .child-chip .chip-text {
        order: 2;
        flex: 1;
    }

    .child-chip .chip-link-btn {
        order: 8;
    }

    .child-chip .chip-remove {
        order: 9;
    }

    /* Child chip drag handle moves to the right */
    .child-chip .chip-drag-handle {
        order: 10;
        margin-right: 0 !important;
        margin-left: 4px !important;
    }

    /* Color theme opacity: subtler backgrounds */
    .link-theme-0, .link-theme-1, .link-theme-2,
    .link-theme-3, .link-theme-4, .link-theme-5,
    .link-theme-6, .link-theme-7 {
        opacity: 0.85;
    }

    /* Child chip actions group: symmetric icons */
    .child-chip-actions {
        gap: 4px !important;
        padding-left: 8px !important;
    }

    .child-chip-actions .chip-link-btn,
    .child-chip-actions .chip-remove,
    .child-chip-actions .chip-drag-handle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px !important;
        height: 24px !important;
        border-radius: 6px !important;
        flex-shrink: 0;
    }

    /* Remove obsolete order-based overrides */
    .child-chip .chip-dot { order: unset; }
    .child-chip .chip-text { order: unset; flex: 1; }
    .child-chip .chip-link-btn { order: unset; }
    .child-chip .chip-remove { order: unset; }
    .child-chip .chip-drag-handle { order: unset; margin-left: 0 !important; }

    /* + Add Option: compact, subtler */
    .chip-add-service {
        padding: 5px 10px !important;
        font-size: 11px !important;
        border-radius: 8px !important;
    }

    /* + Add Question Group: minimalist */
    .chip-add {
        height: 40px !important;
        font-size: 12px !important;
        border-radius: 12px !important;
        margin-top: 8px !important;
    }

    /* Categories view padding */
    #categories-view {
        padding: 16px 16px 32px !important;
    }

    /* Categories header compact */
    #categories-view .analytics-header {
        margin-bottom: 16px !important;
    }

    #categories-view .analytics-header h2 {
        font-size: 20px !important;
    }

    #categories-view .analytics-header p {
        font-size: 12px !important;
    }
}

.mob-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 12px;
    transition: all 0.2s;
    color: #94a3b8;
    font-family: var(--font);
}

.mob-nav-icon-wrap {
    padding: 8px;
    border-radius: 12px;
}

.mob-nav-icon {
    width: 24px;
    height: 24px;
    display: block;
}

.mob-nav-item span {
    font-size: 10px;
    font-weight: 700;
}

.mob-nav-item.active {
    color: #2563eb;
}

.mob-nav-item:not(.active):hover {
    color: var(--text);
    background: #f5f5f5;
}

/* ============================================
   QR CODE SPLIT-SCREEN WIZARD
   ============================================ */

/* ============================================
   QR STYLE LAB — Editor-First Redesign
   ============================================ */

/* ── QR View: full-height editor ── */
#qr-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: #e8eaef;
}

/* ── Top Bar ── */
.qr-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin: 10px 10px 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 22px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.04);
    gap: 12px;
    flex-shrink: 0;
    z-index: 20;
}

.qr-topbar-left {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* Title group wrapper (needed for mobile row layout) */
.qr-topbar-title-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.qr-topbar-title {
    font-size: 16px;
    font-weight: 700;
    color: #0c0f10;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.2;
}

.qr-topbar-sub {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

.qr-topbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.qr-topbar-outline-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    background: transparent;
    color: #2b3438;
    font: 600 12px var(--font);
    cursor: pointer;
    transition: all 0.2s;
}

.qr-topbar-outline-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.22);
}

.qr-topbar-dark-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: none;
    border-radius: 12px;
    background: #0c0f10;
    color: #fff;
    font: 600 12px var(--font);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.qr-topbar-dark-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: skewX(-18deg);
    animation: qrShimmer 2.8s infinite;
}

.qr-topbar-dark-btn:hover {
    background: #1e1e1e;
}

/* ── Editor Body ── */
.qr-editor-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    align-items: stretch;  /* all columns same height */
    /* Accounts for prop-bar height when visible */
}

/* ── Left: Icon Toolbar ── */
.qr-icon-toolbar {
    width: 72px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 2px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    margin: 16px 0 16px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    overflow: hidden; /* prevent label overflow */
}

.qr-tool-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 0 8px;
}

.qr-tool-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 6px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #8a9099;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.qr-tool-icon:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #2b3438;
}

.qr-tool-icon.active {
    background: #1A1A1A;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-tool-icon .material-symbols-outlined {
    font-size: 20px;
}

.qr-tool-label {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    max-width: 56px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

/* ── Center: Artboard — always centered ── */
.qr-artboard-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;   /* vertically centered */
    gap: 16px;
    padding: 20px;
    min-width: 0;
    overflow: auto;       /* scroll when canvas content goes below visible area */
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}

/* Dot-grid artboard background — matches canvas exactly */
.qr-artboard-bg {
    background-color: transparent;
    background-image: radial-gradient(#d0d2d8 1.5px, transparent 1.5px);
    background-size: 18px 18px;
    border-radius: 24px;
    padding: 24px;
    flex-shrink: 0;
}

/* White artboard card — exact canvas size, no clipping */
.qr-artboard {
    background: #ffffff;
    border-radius: 20px;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.05),
        0 16px 48px rgba(0,0,0,0.12),
        0 40px 80px rgba(0,0,0,0.06);
    position: relative;
    overflow: visible;    /* never clip Fabric objects dragged near edges */
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    /* Size matches Fabric canvas (500×500) exactly */
    width: 500px;
    height: 500px;
    flex-shrink: 0;
}

/* ACTIVE badge on artboard */
.qr-artboard .qr-active-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #666666;
    font-size: 9px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.qr-pulse-dot {
    width: 6px;
    height: 6px;
    background-color: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(34,197,94, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(34,197,94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94, 0); }
}


/* Artboard footer: scan text + share */
.qr-artboard-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 300px;
}

.qr-scan-input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font: 600 11px var(--font);
    color: #2b3438;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    outline: none;
    background: rgba(255, 255, 255, 0.7);
    transition: border-color 0.15s, background 0.15s;
}

.qr-scan-input:focus {
    border-color: rgba(0, 0, 0, 0.25);
    background: #fff;
}

.qr-share-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.6);
    color: #8a9099;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.qr-share-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #0c0f10;
}

.qr-share-btn.copied {
    background: #10b981;
    color: #fff;
    border-color: transparent;
}

/* ── Right: Glass Property Panel ── */
.qr-prop-panel {
    width: 260px;
    flex-shrink: 0;
    /* height auto fills via flex — never overflows into topbar */
    min-height: 0;
    overflow-y: auto;
    padding: 16px 14px;
    background: rgba(226, 228, 234, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}

.qr-prop-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin: 0 0 10px;
}

.qr-prop-desc {
    font-size: 12px;
    color: #7a8390;
    margin: 0 0 14px;
    line-height: 1.5;
    font-weight: 400;
}

/* ── Fabric Controls ── */
.qr-fabric-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.qr-fabric-controls {
    display: flex;
    gap: 8px;
    width: 100%;
}

.qr-fabric-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background: #ffffff;
    color: #2b3438;
    font: 600 11px var(--font);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.qr-fabric-btn:hover {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.15);
}

.qr-fabric-btn.danger {
    color: #9f403d;
}

.qr-fabric-btn.danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

/* ── Shared: Label button (logo upload) ── */
.qr-label-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    color: #2b3438;
    font: 600 12px var(--font);
    cursor: pointer;
    transition: all 0.2s;
}

.qr-label-btn:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* ── Tab Panels with fade transition ── */
.qr-tab-panel {
    display: none;
}

.qr-tab-panel.active {
    display: block;
    animation: qrTabFadeIn 0.28s ease forwards;
}

@keyframes qrTabFadeIn {
    from { opacity: 0; transform: translateY(7px); }
    to   { opacity: 1; transform: translateY(0); }
}

.qr-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: #0c0f10;
    margin: 0 0 4px;
}

.qr-panel-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 16px;
    line-height: 1.4;
}

.qr-panel-subtitle {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a0aab4;
    margin: 16px 0 8px;
}

.qr-panel-subtitle:first-of-type {
    margin-top: 0;
}

/* ── Dot Style Grid — 2 rows × 3 cols, no scroll ── */
.qr-style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    /* No overflow, no scroll — all 6 cards always visible */
    overflow: visible;
}

.qr-style-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 6px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    justify-content: center;
}

.qr-style-render {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Square mini-preview canvas */
.qr-style-card canvas {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 6px;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.qr-style-card:hover {
    border-color: rgba(0, 0, 0, 0.18);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
    transform: translateY(-1px);
}

/* Selected: quiet dark border, no blue fill */
.qr-style-card.selected {
    border-color: rgba(0, 0, 0, 0.36);
    border-width: 2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
}

/* Remove the blue circle indicator entirely */
.qr-style-card.selected::after {
    display: none;
}

/* Label: uppercase, compact */
.qr-style-label {
    font-size: 8px;
    font-weight: 700;
    color: #8a9099;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* ── Preset Color Chips ── */
.qr-preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.qr-preset-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #2b3438;
    font: 600 11px var(--font);
    cursor: pointer;
    transition: all 0.2s;
}

.qr-preset-chip:hover {
    border-color: rgba(0, 0, 0, 0.22);
    background: rgba(255, 255, 255, 0.7);
}

.qr-preset-chip.active {
    border-color: rgba(0, 0, 0, 0.35);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.qr-preset-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Custom Color Buttons ── */
.qr-accent-colors {
    display: flex;
    gap: 10px;
    padding: 4px 0;
}

.qr-color-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s;
}

.qr-color-btn:hover {
    transform: scale(1.15);
}

.qr-color-btn.selected::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.4);
}

/* ── Logo Upload ── */
.qr-logo-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.qr-logo-upload-btn {
    flex: 1;
}

.qr-logo-remove-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.qr-logo-remove-btn:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* ── RIGHT: Master Preview (elevated hero card) ── */
.qr-preview-sticky {
    position: sticky;
    top: 80px;
    align-self: start;
}

.qr-preview-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    overflow: hidden;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.1),
        0 6px 20px rgba(0, 0, 0, 0.05),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.qr-preview-canvas-area {
    position: relative;
    background: rgba(242, 244, 248, 0.75);
    padding: 36px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

/* Active badge: outline style, monochrome */
.qr-active-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.qr-live-canvas {
    display: block;
    width: 500px;
    height: 500px;
    flex-shrink: 0;
}

/* Fabric.js canvas — exact 500×500, fills artboard perfectly */
.qr-live-canvas canvas {
    width: 500px !important;
    height: 500px !important;
    display: block;
    border-radius: 0;
    box-shadow: none;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.qr-preview-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 10px;
}

.qr-preview-info-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.qr-preview-name {
    font-size: 14px;
    font-weight: 600;
    color: #0c0f10;
    margin: 0;
}

/* Monochrome, subdued meta text */
.qr-preview-meta {
    font-size: 10px;
    color: #b0bac4;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* QR icon: monochrome */
.qr-preview-qr-icon {
    color: #c8d0d8 !important;
}

.qr-preview-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px 16px;
}

.qr-scan-input {
    flex: 1;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    font: 600 11px var(--font);
    color: #2b3438;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    outline: none;
    background: rgba(255, 255, 255, 0.7);
    transition: border-color 0.15s, background 0.15s;
}

.qr-scan-input:focus {
    border-color: rgba(0, 0, 0, 0.25);
    background: #fff;
}

.qr-share-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.6);
    color: #8a9099;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.qr-share-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #0c0f10;
    border-color: rgba(0, 0, 0, 0.15);
}

.qr-share-btn.copied {
    background: #10b981;
    color: #fff;
    border-color: transparent;
}

/* ── CTA Buttons ── */
.qr-sticky-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

/* Download: full black with shimmer */
.qr-download-btn {
    flex: 1;
    padding: 14px 14px;
    background: #0c0f10;
    color: #fff;
    border: none;
    border-radius: 16px;
    font: 600 13px var(--font);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}

.qr-download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.13), transparent);
    transform: skewX(-18deg);
    animation: qrShimmer 2.8s infinite;
}

@keyframes qrShimmer {
    0%   { left: -120%; }
    100% { left: 220%; }
}

.qr-download-btn:hover {
    background: #1e1e1e;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.qr-download-btn:active {
    transform: translateY(0);
}

/* Print: clean outline only */
.qr-print-btn {
    padding: 14px 18px;
    background: transparent;
    color: #2b3438;
    border: 1.5px solid rgba(0, 0, 0, 0.18);
    border-radius: 16px;
    font: 600 13px var(--font);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.qr-print-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.28);
    transform: translateY(-1px);
}

/* ── Back arrow: featherweight ── */
#back-from-qr {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

#back-from-qr:hover {
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ── Scale Wrapper: desktop = passthrough ── */
.qr-artboard-scale-wrap {
    display: contents; /* transparent on desktop — no layout effect */
}

/* ── Desktop-only / mobile-only QR helpers ── */
.qr-mob-only,
.qr-mob-more-menu {
    display: none;
}

/* ── Tablet responsive (900px) ── */
@media (max-width: 900px) {
    .qr-editor-body {
        flex-direction: column;
    }

    .qr-icon-toolbar {
        width: 100%;
        flex-direction: row;
        height: 52px;
        padding: 0 12px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.4);
        overflow-x: auto;
        gap: 4px;
        margin: 8px 0 8px 0;
        border-radius: 12px;
    }

    .qr-tool-group {
        flex-direction: row;
        width: auto;
        padding: 0;
    }

    .qr-tool-icon {
        flex-direction: row;
        gap: 6px;
        padding: 8px 14px;
        white-space: nowrap;
        width: auto;
    }

    .qr-prop-panel {
        width: 100%;
        height: 260px;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.5);
        overflow-y: auto;
    }

    .qr-artboard-area {
        padding: 16px;
    }

    .qr-artboard-bg {
        padding: 16px;
    }

    .qr-style-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ================================================
   QR STYLE LAB — Mobile Responsive (≤ 768px)
   Quiet Luxury • Native-App Feel • Canva Pattern
   ================================================ */
@media (max-width: 768px) {

    /* ── View container ── */
    #qr-view {
        background: #eaecf1;
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
        position: relative;
    }

    /* ── Topbar: connected header extension on mobile ── */
    .qr-topbar {
        margin: 0;
        padding: 12px 16px;
        min-height: auto;
        height: auto;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.07);
        border-radius: 0 0 24px 24px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.06);
        gap: 8px;
        flex-shrink: 0;
    }

    .qr-topbar-left {
        flex-direction: row;
        align-items: center;
        gap: 0;
        flex: 1;
        min-width: 0;
    }

    .qr-topbar-title-group {
        display: flex;
        flex-direction: column;
        gap: 1px;
        min-width: 0;
    }

    .qr-topbar-title {
        font-size: 15px;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        letter-spacing: -0.02em;
    }

    .qr-topbar-sub {
        font-size: 10px;
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Show mobile-only, hide desktop-only in topbar */
    .qr-desktop-only { display: none !important; }
    .qr-mob-only     { display: flex !important; }

    .qr-topbar-right {
        gap: 6px;
        flex-shrink: 0;
        position: relative;
    }

    /* Save button: refined compact */
    .qr-topbar-dark-btn {
        padding: 8px 14px;
        font-size: 12px;
        border-radius: 12px;
        gap: 4px;
    }

    /* ── Mobile more-options dropdown ── */
    .qr-mob-more-menu {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        z-index: 9999;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 20px;
        padding: 8px;
        box-shadow: 0 16px 48px rgba(0,0,0,0.14), 0 4px 12px rgba(0,0,0,0.06);
        min-width: 170px;
        animation: ctxFadeIn 0.14s ease;
    }

    .qr-mob-more-menu.hidden {
        display: none !important;
    }

    .qr-mob-menu-item {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 11px 14px;
        border: none;
        border-radius: 12px;
        background: transparent;
        color: #1a1a1a;
        font: 500 13px var(--font);
        cursor: pointer;
        text-align: left;
        transition: background 0.12s;
    }

    .qr-mob-menu-item:hover,
    .qr-mob-menu-item:active {
        background: rgba(0,0,0,0.04);
    }

    .qr-mob-menu-item .material-symbols-outlined {
        font-size: 17px;
        color: #64748b;
    }

    /* Save dropdown: right-anchored, rounded on mobile */
    .qr-save-dropdown {
        right: 0;
        left: auto;
        border-radius: 18px;
    }

    /* ── Prop bar: sits between topbar and artboard on mobile ── */
    #qr-prop-bar {
        position: absolute;
        top: 50px;
        left: 0;
        right: 0;
        z-index: 20;
        margin: 0 10px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(0, 0, 0, 0.07);
        box-shadow: 0 2px 10px rgba(0,0,0,0.06);
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        padding: 7px 12px;
        gap: 6px;
        flex-shrink: 0;
    }

    #qr-prop-bar::-webkit-scrollbar { display: none; }

    /* ── Editor body: tight column, no wasted space ── */
    .qr-editor-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-height: 0;
        margin-top: 12px;
    }

    /* Stacking order */
    .qr-artboard-area { order: 1; }
    .qr-icon-toolbar  { order: 2; }
    .qr-prop-panel    { order: 3; }

    /* ── Artboard area: CSS-only height via viewport units — no JS dependency ──
       Canvas is square, constrained by width on most phones.
       height ≈ canvas_width + padding → use min(100vw, 46vh) so it never
       consumes more than half the screen on short devices.                    */
    .qr-artboard-area {
        flex: 0 0 var(--qr-artboard-height, min(100vw, 36vh)) !important;
        height: var(--qr-artboard-height, min(100vw, 36vh)) !important;
        min-height: 0 !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;          /* center horizontally */
        justify-content: flex-start !important;  /* canvas anchors to top vertically */
        background: #eaecf1;
        background-image: radial-gradient(#bec3cc 1.5px, transparent 1.5px);
        background-size: 18px 18px;
        overflow: hidden !important;
        position: relative;
    }

    /* Scale wrapper: fills the artboard-area height entirely */
    .qr-artboard-scale-wrap {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        flex-shrink: 0;
    }

    /* artboard-bg: only JS scale remains; height handled by viewport CSS above */
    .qr-artboard-bg {
        transform: scale(var(--qr-artboard-scale, 0.66)) !important;
        transform-origin: top center !important;
        margin: 0 !important;
        padding: 0 !important;
        flex-shrink: 0;
        border-radius: 0;
        background-image: none;
        background-color: transparent;
    }

    /* Artboard card */
    .qr-artboard {
        border-radius: 20px;
    }

    /* ── Icon toolbar: fixed-height tab bar, top of bottom sheet ── */
    .qr-icon-toolbar {
        flex-shrink: 0;
        width: 100%;
        height: auto;
        flex-direction: row;
        padding: 14px 0 0;        /* space for drag handle + tab icons */
        margin: 0;
        border-radius: 22px 22px 0 0;
        background: #ffffff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        box-shadow: 0 -10px 36px rgba(0,0,0,0.09), 0 -1px 0 rgba(0,0,0,0.04);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0;
        position: relative;
    }

    /* Drag handle pill */
    .qr-icon-toolbar::before {
        content: '';
        position: absolute;
        top: 6px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: rgba(0, 0, 0, 0.1);
        border-radius: 999px;
    }

    .qr-icon-toolbar::-webkit-scrollbar { display: none; }

    .qr-tool-group {
        flex-direction: row;
        width: 100%;
        padding: 0;
        gap: 0;
        justify-content: space-around;
    }

    .qr-tool-icon {
        flex: 1;
        flex-direction: column;
        align-items: center;
        padding: 6px 4px 12px;
        gap: 4px;
        border-radius: 0;
        width: auto;
        min-width: 48px;
        position: relative;
        color: #94a3b8;
    }

    /* Active indicator: animated dot under icon */
    .qr-tool-icon::after {
        content: '';
        position: absolute;
        bottom: 5px;
        left: 50%;
        transform: translateX(-50%) scale(0);
        width: 4px;
        height: 4px;
        background: #0c0f10;
        border-radius: 50%;
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .qr-tool-icon.active::after {
        transform: translateX(-50%) scale(1);
    }

    .qr-tool-icon.active {
        background: transparent;
        color: #0c0f10;
        box-shadow: none;
    }

    .qr-tool-icon .material-symbols-outlined {
        font-size: 22px;
    }

    .qr-tool-label {
        font-size: 8px;
        font-weight: 700;
        letter-spacing: 0.02em;
    }

    /* ── Property panel: flex:1 → takes ALL remaining screen height ── */
    .qr-prop-panel {
        flex: 1;                  /* grows to fill everything below toolbar */
        min-height: 160px;        /* safety floor — lower so small phones don't overflow */
        width: 100%;
        height: auto;             /* let flex decide */
        max-height: none;         /* no artificial cap */
        border-left: none;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        border-radius: 0;
        background: #ffffff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px 16px env(safe-area-inset-bottom, 24px);
        scrollbar-width: thin;
        scrollbar-color: rgba(0,0,0,0.08) transparent;
    }

    /* No drag handle on panel — it's on toolbar */
    .qr-prop-panel::before {
        display: none;
    }

    /* Panel prop label */
    .qr-prop-label {
        font-size: 9px;
        margin-bottom: 12px;
    }

    /* ── Style grid: 2 cols on mobile — cards large enough to see QR previews ── */
    .qr-style-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .qr-style-card {
        padding: 10px 8px 8px;
        border-radius: 18px;
        gap: 7px;
    }

    .qr-style-label {
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 0.06em;
    }

    /* ── Colors panel ── */
    .qr-qrbg-row {
        gap: 8px;
    }

    .qr-qrbg-btn {
        padding: 10px 14px;
        font-size: 12px;
        border-radius: 12px;
    }

    /* ── Template grid: 2-col ── */
    .qr-template-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    /* ── Layer items: touch-friendly ── */
    .qr-layer-item {
        min-height: 44px;
        border-radius: 12px;
    }

    /* ── Image dropzone ── */
    .qr-img-dropzone {
        padding: 24px 12px;
        font-size: 12px;
        border-radius: 16px;
    }

    /* ── Objects shape grid ── */
    .qr-shape-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }

    /* ── Prop bar controls ── */
    .qr-pb-icon-btn {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .qr-pb-range {
        width: 60px;
    }
}


/* ============================================
   QR CONTEXT MENU
   ============================================ */
.qr-context-menu {
    position: fixed;
    z-index: 9999;
    min-width: 210px;
    width: max-content;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.06);
    animation: ctxFadeIn 0.12s ease;
}

@keyframes ctxFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(-4px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.qr-ctx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #1a1a1a;
    font: 500 13px var(--font);
    cursor: pointer;
    text-align: left;
    transition: background 0.12s;
}

.qr-ctx-item .material-symbols-outlined {
    font-size: 16px;
    color: #64748b;
    flex-shrink: 0;
}

.qr-ctx-item kbd {
    margin-left: auto;
    font-size: 11px;
    color: #94a3b8;
    font-family: var(--font);
}

.qr-ctx-item:hover { background: rgba(0,0,0,0.05); }

.qr-ctx-item.danger { color: #dc2626; }
.qr-ctx-item.danger .material-symbols-outlined { color: #dc2626; }
.qr-ctx-item.danger:hover { background: rgba(220,38,38,0.07); }

.qr-ctx-divider {
    height: 1px;
    background: rgba(0,0,0,0.07);
    margin: 4px 0;
}

/* ============================================
   PREVIEW — Floating Island, Dark Luxury
   ============================================ */

#preview-view {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg);
    background-image: radial-gradient(circle, rgba(0,0,0,0.08) 1px, transparent 1px);
    background-size: 22px 22px;
    padding: 12px 16px 12px;
    gap: 10px;
}
#preview-view.hidden { display: none !important; }

/* ── Floating Header Pill ── */
.pv-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    height: 50px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255,255,255,0.9);
    z-index: 10;
}

.pv-nav-btn {
    width: 32px; height: 32px;
    border-radius: 9px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text);
    transition: background 0.15s;
    flex-shrink: 0;
}
.pv-nav-btn:hover { background: rgba(0,0,0,0.05); }
.pv-nav-btn .material-symbols-outlined { font-size: 14px; }

.pv-header-center {
    flex: 1;
    display: flex; align-items: center;
    gap: 7px; min-width: 0;
}

.pv-live-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2.5px rgba(34, 197, 94, 0.2);
    flex-shrink: 0;
    animation: pvDotPulse 3s ease-in-out infinite;
}
@keyframes pvDotPulse {
    0%, 100% { box-shadow: 0 0 0 2.5px rgba(34,197,94,0.2); }
    50%       { box-shadow: 0 0 0 5px  rgba(34,197,94,0.08); }
}

.pv-header-biz-label {
    font-size: 13px; font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 240px;
}

.pv-header-end {
    display: flex; align-items: center; gap: 7px;
    flex-shrink: 0;
}
.pv-header-sep {
    width: 1px; height: 18px;
    background: rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Device toggle */
.pv-device-toggle-wrap {
    display: flex;
    background: rgba(0,0,0,0.06);
    border-radius: 9px;
    padding: 2px; gap: 1px;
}
.pv-device-btn {
    display: flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    border-radius: 7px; border: none; background: transparent;
    cursor: pointer;
    font-family: var(--font); font-size: 11.5px; font-weight: 500;
    color: #64748b;
    transition: all 0.15s;
}
.pv-device-btn .material-symbols-outlined { font-size: 13px; }
.pv-device-btn.active {
    background: #fff; color: var(--text); font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* Header action buttons */
.pv-hdr-btn {
    display: flex; align-items: center; gap: 5px;
    padding: 6px 12px;
    border-radius: 9px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: transparent;
    cursor: pointer;
    font-family: var(--font); font-size: 12px; font-weight: 600;
    color: var(--text);
    transition: background 0.15s;
    white-space: nowrap;
}
.pv-hdr-btn:hover { background: rgba(0,0,0,0.04); }
.pv-hdr-btn .material-symbols-outlined { font-size: 13px; }
.pv-hdr-btn--filled {
    background: var(--accent); border-color: var(--accent); color: #fff;
}
.pv-hdr-btn--filled:hover { background: #252b2e; border-color: #252b2e; }

/* ── Stage (fills space between pills) ── */
.pv-stage {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    /* overflow visible so phone shadow isn't clipped at stage edge */
    overflow: visible;
    padding: 4px 0 0;
    background: transparent;
    position: relative;
    min-height: 0;
}

/* ── Shared device wrapper ── */
.pv-device-wrapper {
    position: relative;
    flex-shrink: 0;
    z-index: 1;
    transition: width 0.4s cubic-bezier(0.4,0,0.2,1),
                height 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* ========================================
   MOBILE PHONE FRAME
   ======================================== */
.pv-device-wrapper[data-device="mobile"] {
    /* Responsive: fills available stage height, max at 620px */
    width: 300px;
    height: clamp(480px, calc(100vh - 200px), 620px);
    background: linear-gradient(145deg, #2c2c2e 0%, #1a1a1c 55%, #0f0f11 100%);
    border-radius: 46px;
    overflow: visible;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.09),
        0 0 0 0.5px rgba(0,0,0,0.9),
        0 40px 80px rgba(0,0,0,0.35),
        0 16px 40px rgba(0,0,0,0.18);
}

.pv-phone-vol-up,
.pv-phone-vol-dn,
.pv-phone-power {
    position: absolute; z-index: 2; pointer-events: none;
}
.pv-device-wrapper[data-device="mobile"] .pv-phone-vol-up,
.pv-device-wrapper[data-device="mobile"] .pv-phone-vol-dn,
.pv-device-wrapper[data-device="mobile"] .pv-phone-power {
    display: block;
    background: linear-gradient(180deg, #2e2e30, #1e1e20);
}
.pv-device-wrapper:not([data-device="mobile"]) .pv-phone-vol-up,
.pv-device-wrapper:not([data-device="mobile"]) .pv-phone-vol-dn,
.pv-device-wrapper:not([data-device="mobile"]) .pv-phone-power { display: none; }

.pv-phone-vol-up { left: -3.5px; top: 120px; width: 3.5px; height: 32px; border-radius: 2px 0 0 2px; }
.pv-phone-vol-dn { left: -3.5px; top: 162px; width: 3.5px; height: 32px; border-radius: 2px 0 0 2px; }
.pv-phone-power  { right: -3.5px; top: 146px; width: 3.5px; height: 60px; border-radius: 0 2px 2px 0; }

/* Notch removed from preview mockup */
.pv-phone-island { display: none !important; }

/* Phone screen slot */
.pv-device-wrapper[data-device="mobile"] .pv-iframe-slot {
    position: absolute;
    inset: 10px;
    border-radius: 38px;
    overflow: hidden;
    background: #0f0f11;
    z-index: 5;
}

/*
 * Scale trick: render at 143% size then scale down by 0.7.
 * The iframe sees a 400px-wide viewport (280/0.7), matching
 * the review page's mobile max-width of 448px — no more
 * oversized text and stars inside the phone frame.
 */
.pv-device-wrapper[data-device="mobile"] .pv-iframe-slot iframe {
    width:  142.857%;   /* 100% / 0.7 */
    height: 142.857%;
    transform: scale(0.7);
    transform-origin: top left;
    border: none;
    display: block;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
}

.pv-device-wrapper[data-device="mobile"] .pv-browser-chrome { display: none; }

/* ========================================
   DESKTOP BROWSER FRAME
   ======================================== */
.pv-device-wrapper[data-device="desktop"] {
    width: min(860px, 100%);
    height: clamp(440px, calc(100vh - 200px), 560px);
    background: transparent;
    overflow: visible;
}

.pv-device-wrapper[data-device="desktop"]::after {
    content: '';
    position: absolute;
    bottom: -30px; left: 5%; right: 5%;
    height: 30px;
    background: transparent;
    box-shadow: 0 0 60px 20px rgba(0,0,0,0.12);
    border-radius: 50%;
    pointer-events: none; z-index: -1;
}

.pv-device-wrapper[data-device="desktop"] .pv-phone-vol-up,
.pv-device-wrapper[data-device="desktop"] .pv-phone-vol-dn,
.pv-device-wrapper[data-device="desktop"] .pv-phone-power,
.pv-device-wrapper[data-device="desktop"] .pv-phone-island { display: none; }

/* Browser chrome bar */
.pv-browser-chrome { display: none; }
.pv-device-wrapper[data-device="desktop"] .pv-browser-chrome {
    display: flex;
    position: absolute; top: 0; left: 0; right: 0; height: 44px;
    background: #f0eeeb;
    border-radius: 13px 13px 0 0;
    border: 1px solid rgba(0,0,0,0.12);
    border-bottom: none;
    align-items: center; padding: 0 14px; gap: 10px;
    z-index: 6;
    box-shadow: 0 -1px 0 rgba(0,0,0,0.05) inset;
}
.pv-browser-dots { display: flex; gap: 6px; flex-shrink: 0; }
.pv-browser-dots span { width: 11px; height: 11px; border-radius: 50%; }
.pv-browser-dots span:nth-child(1) { background: #ff5f57; }
.pv-browser-dots span:nth-child(2) { background: #febc2e; }
.pv-browser-dots span:nth-child(3) { background: #28c840; }

.pv-browser-url-pill {
    flex: 1; max-width: 380px; margin: 0 auto;
    display: flex; align-items: center; gap: 5px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 7px; padding: 5px 10px;
    font-size: 11.5px; color: #475569;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.pv-browser-url-pill .material-symbols-outlined { font-size: 11px; color: #22c55e; flex-shrink: 0; }
.pv-browser-spacer { width: 60px; flex-shrink: 0; }

/* Desktop iframe slot */
.pv-device-wrapper[data-device="desktop"] .pv-iframe-slot {
    position: absolute;
    top: 44px; left: 0; right: 0; bottom: 0;
    border-radius: 0 0 13px 13px;
    overflow: hidden;
    background: #fff;
    z-index: 5;
    border: 1px solid rgba(0,0,0,0.12);
    border-top: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* Desktop iframe: scale to simulate ~1280px wide real desktop viewport */
.pv-device-wrapper[data-device="desktop"] .pv-iframe-slot iframe {
    width:  148.81%;   /* 100% / 0.672 — inner viewport ≈ 1280px wide */
    height: 148.81%;
    transform: scale(0.672);
    transform-origin: top left;
    border: none;
    display: block;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Floating Footer Pill (Dock) ── */
.pv-footer-strip {
    align-self: center;
    flex-shrink: 0;
    display: flex; align-items: center;
    gap: 10px;
    max-width: fit-content;
    height: 36px;
    padding: 0 18px;
    border-radius: 100px;
    /* No backdrop-filter here to avoid white haze above the pill */
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    white-space: nowrap;
}

.pv-footer-url-row {
    display: flex; align-items: center; gap: 5px;
    font-size: 11px; color: #94a3b8;
    max-width: 300px;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.pv-footer-url-row .material-symbols-outlined { font-size: 12px; flex-shrink: 0; }

.pv-footer-note-row {
    display: flex; align-items: center; gap: 7px; flex-shrink: 0;
}
.pv-preview-badge {
    font-size: 9.5px; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase;
    background: #fef3c7; color: #92400e;
    padding: 2px 8px; border-radius: 20px;
    border: 1px solid #fde68a;
}
.pv-footer-hint { font-size: 11px; color: #94a3b8; }

/* ── Copy toast ── */
.pv-toast {
    position: fixed; bottom: 80px; left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #0c0f10; color: #fff;
    font-family: var(--font); font-size: 12px; font-weight: 600;
    padding: 9px 18px; border-radius: 100px;
    opacity: 0; pointer-events: none; z-index: 9999;
    transition: opacity 0.2s, transform 0.2s;
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap;
}
.pv-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.pv-toast .material-symbols-outlined { font-size: 13px; color: #22c55e; }

/* ── Mobile Overrides for Preview ── */
@media (max-width: 768px) {
    #preview-view {
        padding: 8px 6px 36px; /* Increased bottom padding to push footer higher */
    }
    .pv-header {
        padding: 0 10px;
        height: 44px; /* Reduce header height */
        justify-content: center; /* Center items instead of space-between */
        gap: 16px;
        overflow-x: visible; /* No scroll */
    }
    
    .pv-header-center {
        flex: none; /* Stop pushing elements to the right */
    }
    
    .pv-header-biz-label {
        display: none; /* Hide 'Preview' label to save space */
    }
    
    /* Hide text inside header buttons, keep icons */
    .pv-hdr-btn span:not(.material-symbols-outlined) {
        display: none;
    }
    .pv-hdr-btn {
        padding: 6px 8px; /* Shrink button since it only has icon */
    }
    
    .pv-device-wrapper[data-device="mobile"] {
        /* Slim true-phone proportions on mobile: ~55% viewport height */
        width:  min(220px, calc(100vw - 40px));
        height: clamp(380px, 55dvh, 490px);
        border-radius: 36px;
    }

    .pv-device-wrapper[data-device="mobile"] .pv-iframe-slot {
        inset: 8px;
        border-radius: 30px;
    }
    
    .pv-footer-strip {
        max-width: 100%;
        padding: 0 12px;
        gap: 6px;
    }
    
    .pv-footer-url-row {
        flex: 1;
        min-width: 0;
    }
    
    .pv-footer-hint {
        display: none;
    }
}

/* ============================================
   PREVIEW MODE — Scoped review.html overrides
   (only active when body has .preview-mode)
   ============================================ */

/* Preview mode body — dark background so no white gap ever shows */
body.preview-mode {
    background: #0f0f11;
    margin: 0;
    padding: 0;
    height: 100dvh;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.8);
}

/* Container fills full iframe viewport */
body.preview-mode .review-container {
    background: transparent;
    padding: 0;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

/* Glass card — fills full height, no border-radius (phone frame clips it) */
body.preview-mode .review-container > div {
    background: rgba(15, 15, 17, 0.92);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: none;
    box-shadow: none;
    height: 100dvh;
    max-height: 100dvh;
    max-width: 100%;
    border-radius: 0;
    overflow: hidden;
}

/* Main heading — 30% smaller, elegant weight */
body.preview-mode .rv-header h1,
body.preview-mode #review-heading {
    font-size: 21px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.25;
}

body.preview-mode .rv-header {
    padding: 36px 28px 20px;
}

/* Stars — 40% smaller, thin-stroke jewelry style */
body.preview-mode .rv-stars {
    padding: 0 28px 22px;
}
body.preview-mode .star-rating { gap: 5px; }
body.preview-mode .star-rating label {
    font-size: 22px;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.18);
    transition: -webkit-text-stroke 0.12s;
}
body.preview-mode .star-rating input:checked ~ label,
body.preview-mode .star-rating label:hover,
body.preview-mode .star-rating label:hover ~ label {
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.88);
}

/* Category section labels — ultra-small, spaced caps */
body.preview-mode .section h2 {
    font-size: 10px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
}

body.preview-mode .rv-categories {
    padding: 0 20px;
}

/* Preview: show all sections at once (no step-by-step in preview) */
body.preview-mode .section.locked {
    display: block;
}

/* Inactive chips — glass */
body.preview-mode .chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    padding: 8px 18px;
}
body.preview-mode .chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

/* Active chip */
body.preview-mode .chip.selected {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.95);
}

/* OK button — glass */
body.preview-mode .rv-footer { padding: 20px 20px; }
body.preview-mode .rv-submit-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    box-shadow: none;
    font-weight: 500;
}
body.preview-mode .rv-submit-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Scrollbars hidden in preview */
body.preview-mode .rv-categories::-webkit-scrollbar { display: none; }
body.preview-mode .rv-categories { scrollbar-width: none; }

/* Loading state text */
/* body.preview-mode color is set in the block above */

/* ============================================
   MODERN SETTINGS FORM
   ============================================ */
.settings-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 640px;
    margin: 24px auto 60px;
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
}

.settings-card h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 36px;
    letter-spacing: -0.5px;
    color: var(--text);
}

.form-actions-modern {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
}

.form-actions-modern .btn-primary {
    width: 100%;
}

.form-actions-modern .btn-secondary {
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
}

/* ============================================
   GOOGLE MAPS PLACES SEARCH WIDGET
   ============================================ */
.gmap-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.gmap-search-icon {
    position: absolute;
    left: 14px;
    font-size: 20px;
    color: #94a3b8;
    pointer-events: none;
}

.gmap-search-wrapper input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font: 400 14px var(--font);
    color: #0f172a;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.gmap-search-wrapper input:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Results dropdown */
.gmap-results {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    max-height: 260px;
    overflow-y: auto;
    margin-top: 8px;
}

.gmap-result-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.gmap-result-item:last-child {
    border-bottom: none;
}

.gmap-result-item:hover {
    background: #f1f5f9;
}

.gmap-result-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #eff6ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 18px;
}

.gmap-result-text {
    flex: 1;
    min-width: 0;
}

.gmap-result-name {
    font: 600 14px var(--font);
    color: #0f172a;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gmap-result-addr {
    font: 400 12px var(--font);
    color: #64748b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gmap-no-results {
    padding: 20px 16px;
    text-align: center;
    color: #94a3b8;
    font: 400 13px var(--font);
}

/* Selected place card — compact row */
.gmap-selected-card {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    background: #fafafa;
}

.gmap-place-info {
    flex: 1;
    min-width: 0;
}

.gmap-place-info h4 {
    font: 600 13px var(--font);
    color: #0f172a;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gmap-place-info p {
    font: 400 11px var(--font);
    color: #64748b;
    margin: 0 0 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gmap-place-info p:last-child { margin-bottom: 0; }

/* Card action buttons (expand + clear) */
.gmap-card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.gmap-expand-btn,
.gmap-clear-btn {
    width: 30px; height: 30px;
    border-radius: 8px;
    border: 1px solid #e4e4e7;
    background: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #71717a;
    transition: all 0.15s;
}
.gmap-expand-btn:hover { background: #f4f4f5; color: #18181b; }
.gmap-clear-btn:hover  { background: #fef2f2; color: #ef4444; border-color: #fee2e2; }
.gmap-expand-btn .material-symbols-outlined,
.gmap-clear-btn  .material-symbols-outlined { font-size: 15px !important; }

/* Expandable map wrapper */
/* Map accordion — starts collapsed, animates open */
.gmap-mini-map-wrapper {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid transparent;
    /* collapsed state */
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    transition:
        max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
        opacity    0.28s ease,
        margin-top 0.38s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.28s ease;
}
.gmap-mini-map-wrapper.open {
    max-height: 180px;
    opacity: 1;
    margin-top: 8px;
    border-color: #e4e4e7;
}

.gmap-mini-map {
    width: 100%;
    height: 180px;
    background: #f1f5f9;
}

/* Phone Channel Toggle (SMS / WhatsApp) */
.phone-channel-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
}

.channel-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font: 500 13px var(--font);
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
}

.channel-btn.active {
    background: #2563eb;
    color: #ffffff;
}

.channel-btn:not(.active):hover {
    background: #e2e8f0;
}

/* Danger Zone — minimalist link */
.settings-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 28px 0 20px;
}

/* New minimalist danger link */
.biz-danger-wrap {
    padding-top: 16px;
    margin-top: 4px;
    text-align: center;
}

.biz-danger-link {
    background: none;
    border: none;
    cursor: pointer;
    font: 400 12px var(--font);
    color: #ef4444;
    opacity: 0.7;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.15s;
    padding: 0;
}
.biz-danger-link:hover { opacity: 1; }

/* Keep old classes for any other references */
.danger-zone-settings { margin-top: 0; }
.danger-zone-title { font-size: 14px; font-weight: 700; color: var(--danger); margin-bottom: 8px; }
.danger-zone-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }

.btn-danger-outline {
    height: 48px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 14px;
    color: #ef4444;
    font: 500 14px var(--font);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-danger-outline:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    border-radius: 28px;
    padding: 28px;
}

.chart-card h3 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.chart-wrapper {
    position: relative;
    height: 250px;
}

/* Sentiment empty-state overlay */
.sentiment-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    pointer-events: none;
}

/* Hide placeholder once chart has data (canvas has width > 0) */
.sentiment-placeholder.hidden {
    display: none;
}

/* ============================================
   SEO DASHBOARD REDESIGN
   ============================================ */
.seo-content.seo-grid-layout {
    display: grid;
    grid-template-columns: 60% 1fr;
    gap: 32px;
    padding-bottom: 24px;
    position: relative;
}

.seo-content.seo-grid-layout::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background: radial-gradient(circle at 0% 0%, #FAFAFA 0%, rgba(255, 255, 255, 0) 60%),
                radial-gradient(circle at 100% 100%, #EEEEEE 0%, rgba(255, 255, 255, 0) 60%),
                radial-gradient(circle at 50% 50%, #F5F5F5 0%, rgba(255, 255, 255, 0) 60%);
    z-index: -1;
    pointer-events: none;
    border-radius: 32px;
}

@media (max-width: 1024px) {
    .seo-content.seo-grid-layout {
        grid-template-columns: 1fr;
    }
}

.seo-grid-left {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.seo-grid-right {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid transparent;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 20px 80px rgba(0, 0, 0, 0.03);
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.04);
}

/* SEO Strength Hero Card */
.seo-strength-card {
    padding: 32px;
}

.seo-strength-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.seo-strength-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.seo-strength-label {
    font-size: 10px;
    font-weight: 600;
    color: #1A1A1A;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.seo-strength-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.08); /* Pastel soft background */
    padding: 5px 10px;
    border-radius: 9999px;
    border: none;
    font-size: 10px;
    font-weight: 600;
    color: #B45309; /* Muted amber text */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.seo-strength-badge::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #f59e0b;
    animation: pulse-dot 2.5s infinite;
}

@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Circular Progress */
.seo-circular-progress-wrapper {
    display: flex;
    justify-content: center;
    padding: 16px 0;
}

.seo-circular-progress {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: conic-gradient(#1A1A1A var(--progress), #E2E8F0 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.5s ease-out;
}

.seo-circular-inner {
    width: 136px;
    height: 136px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
}

.seo-strength-value {
    font-size: 28px;
    font-weight: 200;
    font-family: 'Inter', sans-serif;
    color: #1A1A1A;
    letter-spacing: -1px;
    margin: 0;
    line-height: 1;
}

/* Checklist */
.seo-checklist {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.seo-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #666666;
    transition: all 0.3s ease;
}

.seo-check-item .icon {
    font-size: 18px;
    color: #CBD5E1;
}

.seo-check-item.completed {
    color: #1A1A1A;
}
.seo-check-item.completed .icon {
    color: #1A1A1A;
}
.seo-check-item.completed .text {
    color: #333333;
    text-decoration: line-through;
    text-decoration-color: rgba(51, 51, 51, 0.2);
    text-decoration-thickness: 1px;
}

/* Stats Grid */
.seo-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.seo-stat-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.seo-stat-icon {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
}

.seo-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: #777777;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.seo-stat-value {
    font-size: 28px;
    font-weight: 300;
    color: #1A1A1A;
    margin: 0;
}

/* Business Context Card */
.seo-context-card {
    padding: 32px;
}

.seo-context-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.seo-context-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.seo-context-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #F8FAFC;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-variation-settings: 'wght' 200;
}

.seo-context-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #1A1A1A;
}

.seo-context-sub {
    font-size: 13px;
    font-weight: 300;
    color: #64748b;
    margin: 4px 0 0;
}

.seo-context-edit {
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.15s;
    font-variation-settings: 'wght' 200;
}
.seo-context-edit:hover { color: #1A1A1A; }

.ai-analyzing-icon {
    animation: float-pulse 2s infinite ease-in-out;
}
@keyframes float-pulse {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.8; }
    50% { transform: translateY(-2px) scale(1.1); opacity: 1; }
}

.seo-context-body {
    margin-top: 24px;
}

.seo-context-body textarea {
    width: 100%;
    height: 120px;
    padding: 16px;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    font: 300 14px var(--font);
    color: #1A1A1A;
    outline: none;
    resize: vertical;
    line-height: 1.6;
    background: rgba(255,255,255,0.8);
    box-sizing: border-box;
    transition: all 0.2s;
}

.seo-context-body textarea:focus {
    border-color: #1A1A1A;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.seo-workspace-textarea:focus {
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 0 0 4px rgba(0,0,0,0.02);
}

.seo-context-hint {
    font-size: 12px;
    font-weight: 300;
    color: #94a3b8;
    margin-top: 10px;
}

@keyframes spin-slow { 
    100% { transform: rotate(360deg); } 
}
.rotating-icon { 
    animation: spin-slow 2s linear infinite; 
}

/* Keywords Card */
.seo-keywords-card {
    padding: 32px;
}

.seo-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.seo-section-title {
    font-size: 10px;
    font-weight: 600;
    color: #1A1A1A;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.seo-refresh-btn {
    color: #94a3b8;
    background: none;
    border: none;
    padding: 4px;
    border-radius: 9999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.seo-refresh-btn:hover {
    color: #1A1A1A;
}

/* Tag Wrapper */
.seo-tag-wrapper {
    position: relative;
    min-height: 80px;
    width: 100%;
    padding: 12px;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: center;
    gap: 8px;
    cursor: text;
}
.seo-tag-wrapper:focus-within {
    border-color: #1A1A1A;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.seo-input-icon {
    font-size: 16px;
    color: #BBBBBB;
    font-variation-settings: 'wght' 200;
    flex-shrink: 0;
    margin-left: 4px;
}

/* Empty State */
.seo-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 32px 16px;
    gap: 12px;
    text-align: center;
    color: #999999;
    font-size: 13px;
    font-weight: 300;
    background: rgba(255,255,255,0.4);
    border-radius: 12px;
    border: 1px dashed rgba(0,0,0,0.08);
}

.seo-recommendations {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Footer Action - Floating */
.seo-footer-action {
    position: fixed;
    bottom: 32px;
    left: 280px; /* offset sidebar */
    right: 0;
    margin: 0 auto;
    width: calc(100% - 312px);
    max-width: 800px;
    z-index: 100;
    pointer-events: none; /* Let clicks pass through empty space */
    transform: translateY(200%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.seo-footer-action.show {
    transform: translateY(0);
}

@media (max-width: 1024px) {
    .seo-footer-action {
        left: 0;
        width: calc(100% - 64px);
    }
}

.seo-save-btn {
    pointer-events: auto;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(to bottom, rgba(39,39,42,0.95), rgba(0,0,0,0.95));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    font: 500 15px var(--font);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.seo-save-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.seo-save-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}

.seo-save-btn:active {
    transform: scale(0.98);
}

.seo-save-btn .material-symbols-outlined {
    font-weight: 200;
}

.seo-tag-wrapper:focus-within {
    border-bottom-color: #0c0f10;
    box-shadow: 0 10px 10px -10px rgba(0,0,0,0.05);
}

.seo-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 400;
    animation: seoTagIn 0.2s ease-out;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seo-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

@keyframes seoTagIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.seo-tag .remove-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.15s;
}

.seo-tag .remove-btn:hover {
    color: #ef4444;
}

.seo-tag .remove-btn svg {
    width: 16px;
    height: 16px;
}

.seo-tag-input {
    flex-grow: 1;
    background: transparent;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 14px;
    padding: 4px 0;
    min-width: 120px;
    color: #0f172a;
}

.seo-tag-input::placeholder {
    color: #9ca3af;
}

/* SEO Autocomplete Chips */
.seo-recommend-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px dashed #BBBBBB;
    color: #666666;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
}

.seo-recommend-chip:hover {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(17, 17, 17, 0.15);
}

.seo-recommend-chip .chip-icon {
    font-size: 14px;
    color: #999999;
    transition: color 0.2s;
    font-variation-settings: 'wght' 300;
}

.seo-recommend-chip:hover .chip-icon {
    color: #ffffff;
}

/* ============================================
   REVIEWS DASHBOARD
   ============================================ */
.reviews-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 16px;
    padding-bottom: 80px;
    /* space for mobile nav */
}

.reviews-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 24px;
    scrollbar-width: none;
}

.reviews-filters::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    white-space: nowrap;
    background: #f4f4f5;
    border: 1px solid #eeeeee;
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.filter-chip:hover {
    background: #e4e4e7;
}

.filter-chip.active {
    background: #27272a;
    color: #ffffff;
    border-color: #27272a;
}

.reviews-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.reviews-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.review-search-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 9999px;
    padding: 6px 16px;
    gap: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 38px;
    box-sizing: border-box;
}

.review-search-box:focus-within {
    border-color: #0c0f10;
    box-shadow: 0 0 0 2px rgba(12, 15, 16, 0.1);
}

.review-search-box input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: #3f3f46;
    width: 140px;
    transition: width 0.3s ease;
    padding: 0;
}

.review-search-box input:focus {
    width: 180px;
}

.review-search-box input::placeholder {
    color: #a1a1aa;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    color: #3f3f46;
    padding: 0 16px;
    height: 38px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.export-btn:hover {
    background: #f4f4f5;
    border-color: #d4d4d8;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    border-radius: 28px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.review-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #d4af37;
}

.review-rating .text-\[20px\] {
    font-size: 20px;
}

.review-rating-number {
    font-weight: 500;
    font-size: 16px;
    margin-left: 8px;
    color: #3f3f46;
}

.review-time {
    font-size: 12px;
    font-weight: 500;
}

.review-service-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.review-service-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid #e4e4e7;
    background: transparent;
    color: #52525b;
}

.review-tag-more {
    border: 1px dashed #e2e8f0;
    color: #94a3b8;
    background: transparent;
    font-weight: 400;
    font-style: italic;
}

.review-text {
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 24px;
    color: #3f3f46;
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-sentiment-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
}

.review-dot-positive {
    background-color: #86efac;
}

.review-text-positive {
    color: #16a34a;
    font-weight: 500;
    font-size: 13px;
}

.review-dot-negative {
    background-color: #fca5a5;
}

.review-text-negative {
    color: #dc2626;
    font-weight: 500;
    font-size: 13px;
}

.review-dot-neutral {
    background-color: #fde047;
}

.review-text-neutral {
    color: #ca8a04;
    font-weight: 500;
    font-size: 13px;
}

.review-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.review-source-google {
    background: transparent;
    color: #71717a;
    padding: 0;
    transition: color 0.2s;
}

.review-source-google:hover {
    color: #3f3f46;
}

.review-source-sms {
    background: transparent;
    color: #71717a;
    padding: 0;
}

/* Tailwind-ish utility classes mapped */
.bg-emerald-500 {
    background-color: #10b981 !important;
}

.text-emerald-700 {
    color: #047857 !important;
}

.bg-amber-400 {
    background-color: #fbbf24 !important;
}

.text-amber-700 {
    color: #b45309 !important;
}

.bg-rose-500 {
    background-color: #f43f5e !important;
}

.text-rose-700 {
    color: #be123c !important;
}

.fill-current {
    font-variation-settings: 'FILL' 1;
}

.text-slate-200 {
    color: #e2e8f0 !important;
}

.text-slate-400 {
    color: #94a3b8 !important;
}

.text-slate-600 {
    color: #475569 !important;
}

/* Header Profile Dropdown */
.header-profile {
    position: relative;
}

.avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    position: relative;
}

.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #a855f7;
    border: 2px solid #fff;
    border-radius: 50%;
}

.avatar-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.avatar-btn ion-icon {
    font-size: 20px !important;
    color: #475569 !important;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    /* Softer shadow */
    border: 1px solid var(--border);
    min-width: 180px;
    display: flex;
    flex-direction: column;
    padding: 8px;
    z-index: 1000;
    transform-origin: top right;

    /* Animation states */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    font: 500 15px var(--font);
    color: var(--text-main);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f1f5f9;
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-item.danger:hover {
    background: #fef2f2;
}

.dropdown-item ion-icon {
    font-size: 20px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

.text-slate-900 {
    color: #0f172a !important;
}

.bg-slate-100 {
    background-color: #f1f5f9 !important;
}

.text-amber-400 {
    color: #fbbf24 !important;
}

@media (max-width: 768px) {
    .settings-card {
        border-radius: 24px;
        padding: 24px 16px;
        max-width: 100%;
    }

    .parent-chip {
        border-radius: 20px;
        padding: 6px 4px 6px 12px;
        font-size: 13px;
    }

    .parent-chip-actions .chip-remove {
        font-size: 16px;
    }

    .parent-chip-add {
        font-size: 18px;
    }

    .child-chip {
        border-radius: 16px;
        padding: 5px 8px 5px 10px;
        font-size: 12px;
    }

    .child-chip .chip-remove {
        font-size: 14px;
    }
}

/* ============================================
   GOOGLE POST MODAL
   ============================================ */
.g-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.g-modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.g-modal-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    width: 100%;
    max-width: 380px;
    border-radius: 28px;
    padding: 40px 24px 32px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.g-modal-card::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(43, 52, 56, 0.06), transparent 70%);
    pointer-events: none;
}

.g-modal-overlay:not(.hidden) .g-modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.g-modal-icon-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
}

.g-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #0c0f10;
    border-radius: 50%;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
}

.g-modal-icon-wrap::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    border: 2px solid rgba(12, 15, 16, 0.1);
    z-index: 1;
    animation: iconPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes iconPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.g-modal-title {
    font-size: 26px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    font-family: var(--font);
}

.g-modal-desc {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 32px;
    line-height: 1.5;
    padding: 0 10px;
}

.g-modal-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
    margin-bottom: 32px;
}

.g-modal-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(255, 255, 255, 0.5);
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform 0.2s, background 0.2s;
    opacity: 0;
    transform: translateY(10px);
}

.g-modal-overlay:not(.hidden) .g-modal-step:nth-child(1) {
    animation: stepSlideIn 0.5s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.g-modal-step:nth-child(2) {
    align-items: center;
}

.g-modal-overlay:not(.hidden) .g-modal-step:nth-child(2) {
    animation: stepSlideIn 0.5s 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes stepSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.g-modal-step:hover {
    background: #f1f5f9;
    transform: translateY(-2px) !important;
}

.g-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #27272a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 2px;
}

.g-step-text {
    font-size: 15px;
    color: #334155;
    line-height: 1.5;
}

.g-step-text strong {
    color: #0f172a;
    font-weight: 700;
}

.g-step-stars {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.g-step-stars svg {
    width: 20px;
    height: 20px;
    color: #fbbf24;
    filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.3));
    animation: starPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.g-modal-overlay:not(.hidden) .g-step-stars svg:nth-child(1) {
    animation-delay: 0.5s;
}

.g-modal-overlay:not(.hidden) .g-step-stars svg:nth-child(2) {
    animation-delay: 0.6s;
}

.g-modal-overlay:not(.hidden) .g-step-stars svg:nth-child(3) {
    animation-delay: 0.7s;
}

.g-modal-overlay:not(.hidden) .g-step-stars svg:nth-child(4) {
    animation-delay: 0.8s;
}

.g-modal-overlay:not(.hidden) .g-step-stars svg:nth-child(5) {
    animation-delay: 0.9s;
}

@keyframes starPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.g-modal-btn {
    width: 100%;
    padding: 16px;
    background: #0c0f10;
    color: #fff;
    border: none;
    border-radius: 28px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.g-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.2);
    background: #27272a;
}

.g-modal-btn svg {
    transition: transform 0.2s;
}

.g-modal-btn:hover svg {
    transform: translateX(4px);
}

/* ============================================
   QR EDITOR v2 — NEW COMPONENTS
   ============================================ */
.qr-topbar-right{display:flex;align-items:center;gap:6px}
.qr-topbar-sep{width:1px;height:18px;background:rgba(0,0,0,.1);flex-shrink:0}
.qr-topbar-icon-btn{width:30px;height:30px;border:none;background:transparent;border-radius:8px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#64748b;transition:background .15s}
.qr-topbar-icon-btn:hover{background:rgba(0,0,0,.06);color:#0c0f10}
.qr-zoom-ctrl{display:flex;align-items:center;gap:4px}
.qr-zoom-label{font-size:11px;font-weight:700;color:#64748b;min-width:34px;text-align:center}
.qr-save-dropdown{position:absolute;top:calc(100% + 6px);right:0;background:rgba(255,255,255,.92);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(0,0,0,.09);border-radius:12px;padding:6px;z-index:200;min-width:150px;display:flex;flex-direction:column;gap:2px;box-shadow:0 8px 24px rgba(0,0,0,.12)}
.qr-dropdown-item{text-align:left;background:transparent;border:none;padding:8px 12px;font-size:12px;font-weight:600;color:#1a1a1a;border-radius:8px;cursor:pointer;transition:background .15s}
.qr-dropdown-item:hover{background:rgba(0,0,0,.05)}

/* Property Bar */
.qr-prop-bar{display:flex;align-items:center;gap:6px;padding:6px 14px;background:rgba(255,255,255,.9);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-bottom:1px solid rgba(0,0,0,.07);flex-shrink:0;flex-wrap:wrap;animation:pbSlideIn .15s ease;min-height:44px;transition:opacity .15s}.qr-prop-bar.hidden{visibility:hidden;pointer-events:none;opacity:0}
@keyframes pbSlideIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
.qr-pb-seg{display:flex;gap:2px;padding:2px;background:rgba(0,0,0,.06);border-radius:8px}
.qr-pb-seg-btn{display:flex;align-items:center;gap:4px;padding:5px 9px;border:none;border-radius:6px;background:transparent;color:#64748b;font:600 11px var(--font);cursor:pointer;transition:all .15s}
.qr-pb-seg-btn.active{background:#fff;color:#0c0f10;box-shadow:0 1px 4px rgba(0,0,0,.1)}
.qr-pb-divider{width:1px;height:20px;background:rgba(0,0,0,.08);flex-shrink:0}
.qr-pb-item{display:flex;align-items:center;gap:5px;position:relative}
.qr-pb-color-ring{width:28px;height:28px;border-radius:8px;border:2px solid rgba(0,0,0,.12);overflow:hidden;cursor:pointer;position:relative}
.qr-pb-color-swatch{width:100%;height:100%}
.qr-pb-select{border:1px solid rgba(0,0,0,.1);border-radius:6px;background:rgba(255,255,255,.7);font:600 11px var(--font);color:#2b3438;padding:3px 4px;cursor:pointer;outline:none}
.qr-pb-range{width:70px;accent-color:#0c0f10}
.qr-pb-val{font-size:10px;font-weight:700;color:#64748b;min-width:28px}
.qr-pb-icon-btn{width:28px;height:28px;border:none;background:transparent;border-radius:6px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#64748b;transition:background .15s}
.qr-pb-icon-btn:hover{background:rgba(0,0,0,.06);color:#0c0f10}
.qr-pb-icon-btn.danger:hover{background:rgba(220,38,38,.08);color:#dc2626}

/* Guide overlay */
.qr-guide-overlay{position:absolute;top:0;left:0;width:500px;height:500px;pointer-events:none;z-index:100;overflow:visible}

/* Colors */
.qr-color-custom-row{display:flex;align-items:center;gap:8px;margin-bottom:4px}
.qr-color-picker-wrap{display:flex;align-items:center;gap:6px;flex:1}
.qr-color-picker-native{width:36px;height:36px;border-radius:10px;border:1px solid rgba(0,0,0,.12);cursor:pointer;padding:2px;background:transparent}
.qr-color-hex{font-size:12px;font-weight:700;color:#2b3438;font-family:monospace}
.qr-color-apply-btn{padding:7px 12px;border:none;border-radius:8px;background:#0c0f10;color:#fff;font:700 11px var(--font);cursor:pointer;transition:background .15s;white-space:nowrap}
.qr-color-apply-btn:hover{background:#1e1e1e}
.qr-swatch-row{display:flex;flex-wrap:wrap;gap:5px;min-height:22px}
.qr-no-recent{font-size:10px;color:#b0bac4;font-weight:500}
.qr-color-swatch{width:22px;height:22px;border-radius:6px;cursor:pointer;border:1px solid rgba(0,0,0,.08);transition:transform .15s,box-shadow .15s;flex-shrink:0}
.qr-color-swatch:hover{transform:scale(1.15);box-shadow:0 2px 8px rgba(0,0,0,.15)}
.qr-color-swatch.active{outline:2px solid #0c0f10;outline-offset:2px}
.qr-color-palette-grid{display:grid;grid-template-columns:repeat(10,1fr);gap:3px}
.qr-palette-swatch{width:100%;aspect-ratio:1;border-radius:4px;cursor:pointer;border:none;transition:transform .1s,box-shadow .1s}
.qr-palette-swatch:hover{transform:scale(1.25);box-shadow:0 2px 6px rgba(0,0,0,.2);z-index:1;position:relative}

/* Objects */
.qr-full-add-btn{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;padding:10px;border:1.5px dashed rgba(0,0,0,.15);border-radius:10px;background:rgba(255,255,255,.4);color:#2b3438;font:600 12px var(--font);cursor:pointer;transition:all .2s}
.qr-full-add-btn:hover{background:rgba(255,255,255,.7);border-color:rgba(0,0,0,.25)}
.qr-fill-toggle-row{display:flex;align-items:center;justify-content:space-between;margin-top:10px;gap:8px}
.qr-fill-label{font-size:10px;font-weight:600;color:#94a3b8;text-transform:uppercase;letter-spacing:.06em;white-space:nowrap}
.qr-fill-seg{display:flex;gap:2px;padding:2px;background:rgba(0,0,0,.06);border-radius:8px}
.qr-fill-seg-btn{padding:4px 8px;border:none;border-radius:6px;background:transparent;color:#64748b;font:600 11px var(--font);cursor:pointer;transition:all .15s}
.qr-fill-seg-btn.active{background:#fff;color:#0c0f10;box-shadow:0 1px 4px rgba(0,0,0,.1)}
.qr-shape-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}
.qr-shape-item{display:flex;flex-direction:column;align-items:center;gap:3px;padding:7px 4px;border:1px solid rgba(255,255,255,.5);border-radius:8px;background:rgba(255,255,255,.35);cursor:pointer;transition:all .15s}
.qr-shape-item:hover{background:rgba(255,255,255,.7);border-color:rgba(0,0,0,.15);transform:translateY(-1px)}
.qr-shape-item svg{width:24px;height:24px}
.qr-shape-item .qr-shape-lbl{font-size:8px;font-weight:700;color:#8a9099;text-transform:uppercase;letter-spacing:.05em;text-align:center;line-height:1.2}

/* Images */
.qr-img-dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:20px;border:2px dashed rgba(0,0,0,.12);border-radius:12px;cursor:pointer;transition:all .2s;background:rgba(255,255,255,.3);text-align:center}
.qr-img-dropzone span:not(.material-symbols-outlined){font-size:11px;font-weight:500;color:#94a3b8}
.qr-img-dropzone:hover,.qr-img-dropzone.drag-over{border-color:rgba(0,0,0,.3);background:rgba(255,255,255,.6)}

/* Layers */
.qr-layers-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.qr-layers-hint{font-size:9px;font-weight:600;color:#b0bac4;text-transform:uppercase;letter-spacing:.05em}
.qr-layers-list{display:flex;flex-direction:column;gap:3px}
.qr-layer-item{display:flex;align-items:center;gap:7px;padding:7px 8px;border-radius:8px;background:rgba(255,255,255,.35);border:1px solid rgba(255,255,255,.5);cursor:pointer;transition:background .15s;user-select:none}
.qr-layer-item:hover,.qr-layer-item.selected{background:rgba(255,255,255,.7);border-color:rgba(0,0,0,.12)}
.qr-layer-thumb{width:28px;height:28px;border-radius:5px;overflow:hidden;flex-shrink:0;background:#f1f4f7;border:1px solid rgba(0,0,0,.07);display:flex;align-items:center;justify-content:center}
.qr-layer-name{flex:1;font-size:11px;font-weight:600;color:#2b3438;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.qr-layer-actions{display:flex;gap:2px;flex-shrink:0}
.qr-layer-btn{width:22px;height:22px;border:none;background:transparent;border-radius:5px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#94a3b8;transition:all .15s}
.qr-layer-btn:hover{background:rgba(0,0,0,.07);color:#2b3438}
.qr-layer-btn.danger:hover{background:rgba(220,38,38,.08);color:#dc2626}
.qr-layer-drag {
    color: #c0c8d0;
    cursor: grab;
    font-size: 16px;
    padding: 2px;
    border-radius: 4px;
    transition: all 0.2s;
    user-select: none;
}
.qr-layer-drag:hover {
    color: #2b3438;
    background: rgba(0,0,0,0.05);
}
.qr-layer-drag:active {
    cursor: grabbing;
}
.qr-rotate-hint{position:absolute;bottom:-28px;left:50%;transform:translateX(-50%);background:#0c0f10;color:#fff;font:700 10px var(--font);padding:3px 8px;border-radius:6px;pointer-events:none;z-index:200;animation:fadeOut .6s ease 1s forwards}
@keyframes fadeOut{to{opacity:0}}

/* ── Templates Panel ── */
.qr-template-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:4px}
.qr-tmpl-card{display:flex;flex-direction:column;border-radius:10px;overflow:hidden;cursor:pointer;border:1.5px solid rgba(255,255,255,.5);transition:all .18s;background:rgba(255,255,255,.3)}
.qr-tmpl-card:hover{border-color:rgba(0,0,0,.18);transform:translateY(-2px);box-shadow:0 6px 18px rgba(0,0,0,.1)}
.qr-tmpl-card.selected{border-color:#0c0f10;border-width:2px;box-shadow:0 4px 14px rgba(0,0,0,.15)}
.qr-tmpl-preview{height:64px;display:flex;align-items:center;justify-content:center;position:relative}
.qr-tmpl-inner{width:36px;height:36px;border:2px solid;border-radius:4px;display:flex;align-items:center;justify-content:center;background:#fff}
.qr-tmpl-dot{width:14px;height:14px;border-radius:2px}
.qr-tmpl-label{padding:5px 8px;font-size:10px;font-weight:700;color:#2b3438;text-align:center;letter-spacing:.03em;text-transform:uppercase;background:rgba(255,255,255,.5)}

/* ── Context Menu enhancements ── */
.qr-ctx-info{padding:6px 10px;font-size:10px;font-weight:700;color:#94a3b8;text-transform:uppercase;letter-spacing:.06em}
.qr-ctx-color-row{display:flex;align-items:center;gap:6px;padding:6px 10px;flex-wrap:nowrap}
.qr-ctx-color-label{font-size:10px;font-weight:700;color:#64748b;min-width:32px}
.qr-ctx-color-swatches{display:flex;gap:4px;flex:1}
.qr-ctx-swatch{width:18px;height:18px;border-radius:5px;border:1px solid rgba(0,0,0,.1);cursor:pointer;transition:transform .12s;flex-shrink:0}
.qr-ctx-swatch:hover{transform:scale(1.25);box-shadow:0 2px 6px rgba(0,0,0,.2)}
.qr-ctx-color-pick-wrap input[type=color]{width:22px;height:22px;border-radius:6px;border:1px solid rgba(0,0,0,.12);cursor:pointer;padding:1px;background:transparent}

/* Layers ghost while dragging */
.qr-layer-ghost{opacity:.4;background:rgba(255,255,255,.8)!important}

/* Template thumbnail improvements */
.qr-tmpl-card{transition:all .18s;cursor:pointer}
.qr-tmpl-card:hover .qr-tmpl-preview{filter:brightness(0.96)}

/* Background color row */
.qr-bg-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}

/* QR background toggle */
.qr-qrbg-row{display:flex;gap:6px;margin-bottom:2px}
.qr-qrbg-btn{display:flex;align-items:center;gap:6px;padding:6px 10px;border:1.5px solid rgba(0,0,0,.1);border-radius:8px;background:rgba(255,255,255,.4);font:600 11px var(--font);color:#2b3438;cursor:pointer;transition:all .15s;flex:1;justify-content:center}
.qr-qrbg-btn.active{border-color:#0c0f10;background:rgba(255,255,255,.85);box-shadow:0 1px 4px rgba(0,0,0,.1)}
.qr-qrbg-btn:hover{background:rgba(255,255,255,.65)}
.qr-qrbg-swatch{width:16px;height:16px;border-radius:4px;flex-shrink:0}
.qr-qrbg-checker{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:8px 8px;background-position:0 0,0 4px,4px -4px,-4px 0;border:1px solid rgba(0,0,0,.08)}

/* ============================================
   RESPONSIVE REVIEW PAGE (Mobile Quiet Luxury)
   ============================================ */
@media (max-width: 600px) {
    .review-container {
        padding: 0;
        background: var(--bg);
    }
    
    .review-container > div {
        border-radius: 0;
        border: none;
        box-shadow: none;
        max-width: 100%;
        height: 100dvh;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    
    .rv-header {
        padding: 40px 24px 24px;
    }
    
    .rv-header h1,
    #review-heading {
        font-size: 26px;
    }
    
    .rv-stars {
        padding: 0 24px 32px;
    }
    
    .star-rating label {
        font-size: 40px;
        gap: 6px;
    }
    
    .rv-categories {
        padding: 0 24px;
    }
    
    .chip {
        padding: 10px 20px;
        font-size: 14px;
        border-radius: 12px;
    }
    
    .rv-footer {
        padding: 24px;
    }
    
    .rv-submit-btn {
        padding: 16px;
        border-radius: 28px;
        font-size: 16px;
    }
    
    /* Review Generated Page */
    #result-card {
        padding: 24px 20px;
    }
    
    .rg-heading {
        font-size: 24px;
    }
    
    .rg-review-card {
        padding: 20px;
        border-radius: 20px;
    }
    
    .rg-review-card p {
        font-size: 14px;
    }
    
    .ww-card {
        padding: 32px 24px 24px;
        border-radius: 24px;
        border: none;
    }
    
    /* Post Modal */
    .g-modal-card {
        margin: 16px;
        padding: 32px 20px 24px;
        border-radius: 24px;
        max-width: 100%;
        width: calc(100% - 32px);
    }
}

/* ================================================
   NEW BUSINESS & SETTINGS — Mobile Responsive
   Bottom-sheet • Quiet Luxury • Fixed sticky bug
   ================================================ */
@media (max-width: 768px) {

    /* ── Overlay ── */
    .form-modal-overlay {
        padding: 0;
        align-items: flex-end;
        background: rgba(10, 14, 23, 0.55);
        backdrop-filter: blur(14px) brightness(0.78);
        -webkit-backdrop-filter: blur(14px) brightness(0.78);
    }

    /* ── Card: native bottom sheet ── */
    .biz-modal-card {
        border-radius: 28px 28px 0 0;
        max-width: 100%;
        width: 100%;
        max-height: 94dvh;
        padding: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        animation: mobileSheetUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* ── Header: drag handle + title row ── */
    .biz-modal-header {
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        background: #ffffff;
        padding: 10px 20px 16px;
        margin-bottom: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        z-index: 20;
    }

    /* Drag handle at very top */
    .biz-modal-header::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: rgba(0, 0, 0, 0.11);
        border-radius: 999px;
        margin: 0 auto 14px;
    }

    /* Title + close on same row */
    .biz-modal-title-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 12px;
    }

    .biz-modal-meta {
        flex: 1;
        min-width: 0;
    }

    .biz-modal-card h2 {
        font-size: 17px;
        font-weight: 700;
        letter-spacing: -0.01em;
    }

    /* Badge: hide on mobile (saves space) */
    .biz-modal-badge {
        display: none;
    }

    /* Close button: round, sits inside title row */
    .biz-modal-close {
        width: 32px;
        height: 32px;
        background: #f1f1f3;
        border-radius: 50%;
        border: none;
        flex-shrink: 0;
        color: #52525b;
    }

    .biz-modal-close:hover {
        background: #e4e4e7;
        color: #18181b;
    }

    /* ── Body: NOT the scroll container — left col scrolls ── */
    .biz-modal-body {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
        flex: 1;
        min-height: 0;
        overflow: hidden;          /* body itself does NOT scroll */
        display: flex;
        flex-direction: column;
    }

    /* ── Left col: THE scroll container ── */
    /* Actions inside it use sticky; this is the parent they stick within */
    .biz-modal-left {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 20px 20px 0;
        display: flex;
        flex-direction: column;
    }
    .biz-modal-left::-webkit-scrollbar { display: none; }

    /* Phone preview: hidden */
    .biz-modal-right {
        display: none;
    }

    /* ── Section labels ── */
    .biz-form-section-label {
        display: flex;
        flex-direction: column;
        gap: 4px;
        font-size: 10px;
        letter-spacing: 0.08em;
        color: #b0b8c4;
        margin-bottom: 14px;
    }

    /* Hint text: readable size */
    .biz-form-section-hint {
        margin-left: 0;
        font-size: 12px;
        font-weight: 400;
        letter-spacing: 0;
        color: #94a3b8;
        text-transform: none;
    }

    /* ── Field labels: cleaner hierarchy ── */
    .biz-label {
        font-size: 12px;
        font-weight: 500;
        color: #71717a;
        margin-bottom: 7px;
    }

    /* Character counter: move below label, right-aligned */
    .biz-slug-row {
        flex-direction: row;
        align-items: baseline;
        margin-bottom: 7px;
    }

    .biz-slug-edit-hint {
        font-size: 11px;
        color: #b0b8c4;
    }

    /* ── Inputs: touch-friendly ── */
    input.biz-input {
        height: 50px;
        font-size: 15px;
        border-radius: 14px;
        background: #fafafa;
    }

    /* Slug prefix: hide (too long) */
    .biz-slug-prefix {
        display: none;
    }

    .biz-slug-wrap input.biz-input {
        padding-left: 42px;
        padding-right: 64px;
    }

    /* ── Segment control: full-width, tall touch targets ── */
    .biz-segment-control {
        border-radius: 14px;
    }

    .biz-segment-btn {
        padding: 12px 6px;
        font-size: 12px;
        font-weight: 500;
        gap: 5px;
        flex-direction: column;  /* icon above text on mobile */
    }

    .biz-segment-btn .material-symbols-outlined {
        font-size: 18px;
    }

    /* Unhappy redirect: add bottom breathing room before sticky bar */
    #phone-channel-control {
        margin-bottom: 4px;
    }

    /* ── Actions: sticky to bottom of .biz-modal-left ── */
    /* Root fix: .biz-modal-left is the scroll container → sticky works here */
    .biz-modal-actions {
        position: sticky;
        bottom: 0;
        z-index: 10;
        background: #ffffff;
        padding: 14px 0 calc(env(safe-area-inset-bottom, 0px) + 14px);
        margin-top: auto;          /* pushes to bottom when content is short */
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        gap: 10px;
        box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.05);
    }

    /* Save: full-width, dark */
    .biz-save-btn {
        flex: 1;
        height: 50px;
        border-radius: 14px;
        font-size: 15px;
        font-weight: 600;
        background: #0c0f10;
        letter-spacing: -0.01em;
    }

    /* Cancel: outline style — visually balanced with Save */
    .biz-cancel-btn {
        height: 50px;
        border-radius: 14px;
        font-size: 14px;
        font-weight: 500;
        padding: 0 22px;
        flex-shrink: 0;
        background: transparent;
        border: 1.5px solid rgba(0, 0, 0, 0.12);
        color: #52525b;
    }

    .biz-cancel-btn:hover {
        background: #f4f4f5;
        border-color: rgba(0, 0, 0, 0.18);
    }

    /* Danger link: below the scrollable content */
    .biz-danger-wrap {
        padding: 10px 0 24px;
        text-align: center;
    }

    /* ── Maps search ── */
    .gmap-search-wrapper input {
        font-size: 15px;
    }

    .gmap-results {
        max-height: 200px;
    }

    .gmap-selected-card {
        border-radius: 14px;
    }

    .gmap-mini-map-wrapper.open {
        max-height: 200px;
    }

    /* ── Settings card ── */
    .settings-card {
        padding: 24px 20px;
        margin: 0;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        box-shadow: none;
        max-width: 100%;
    }

    .settings-card h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

/* ============================================================
   ACCOUNT SETTINGS MODAL
   ============================================================ */
.acct-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 16, 28, 0.38);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10500;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.acct-overlay.visible { opacity: 1; }
.acct-overlay.hidden  { display: none !important; }

/* Glass-surface modal card */
.acct-modal {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 26px;
    width: 100%;
    max-width: 460px;
    box-shadow:
        0 32px 80px rgba(0,0,0,0.10),
        0 8px 24px rgba(0,0,0,0.05),
        inset 0 1px 0 rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.97) translateY(14px);
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}

.acct-overlay.visible .acct-modal {
    transform: scale(1) translateY(0);
}

/* ── Header ── */
.acct-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.acct-modal-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.acct-header-icon {
    font-size: 20px;
    color: #667eea;
    font-variation-settings: 'FILL' 0, 'wght' 300;
    opacity: 0.9;
}

.acct-modal-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: #0c0f10;
    letter-spacing: -0.02em;
}

.acct-close-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a929a;
    font-size: 18px;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.acct-close-btn:hover {
    background: rgba(0,0,0,0.08);
    color: #0c0f10;
}

/* ── Body ── */
.acct-modal-body {
    padding: 26px 24px 22px;
    overflow-y: auto;
    flex: 1;
}

/* ── Avatar ── */
.acct-avatar-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.acct-avatar-wrap {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.85);
    font-size: 28px;
    flex-shrink: 0;
    overflow: hidden;
}

.acct-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.acct-avatar-initials {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
}

.acct-avatar-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.acct-avatar-label {
    font-size: 15px;
    font-weight: 700;
    color: #0c0f10;
    letter-spacing: -0.01em;
}

.acct-avatar-sub {
    font-size: 11.5px;
    color: #a0a8b0;
    font-weight: 500;
}

/* ── Divider ── */
.acct-divider {
    height: 1px;
    background: rgba(0,0,0,0.05);
    margin: 18px 0;
}

.acct-divider--security {
    background: rgba(0,0,0,0.04);
    margin: 20px 0 16px;
}

/* ── Fields ── */
.acct-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.acct-field-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.acct-label {
    font-size: 10.5px;
    font-weight: 700;
    color: #a0a8b0;
    text-transform: uppercase;
    letter-spacing: 0.10em;
}

.acct-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.acct-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 11px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: #0c0f10;
    background: rgba(0,0,0,0.02);
    outline: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.acct-input:focus {
    border-color: rgba(102,126,234,0.5);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.10);
}

/* Email — pasive, non-interactive look */
.acct-input--readonly {
    color: #9aa0a8;
    cursor: default;
    background: rgba(0,0,0,0.025);
    border-color: transparent;
    pointer-events: none;
    padding-right: 28px;
}

/* Verified green dot */
.acct-verified-dot {
    position: absolute;
    right: 12px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34c759;
    box-shadow: 0 0 0 2px rgba(52,199,89,0.18);
    pointer-events: none;
    flex-shrink: 0;
}

.acct-hint {
    font-size: 11px;
    color: #b0b8c0;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* ── Security row ── */
.acct-security-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.acct-security-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.acct-section-label {
    font-size: 10.5px;
    font-weight: 700;
    color: #a0a8b0;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    display: block;
}

.acct-security-sub {
    font-size: 12px;
    color: #b8c0c8;
    font-weight: 500;
}

/* Password reset — subtle inline link-style button */
.acct-pw-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid rgba(102,126,234,0.2);
    border-radius: 20px;
    background: rgba(102,126,234,0.05);
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 600;
    color: #667eea;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

.acct-pw-link:hover {
    background: rgba(102,126,234,0.10);
    border-color: rgba(102,126,234,0.35);
    color: #5568d4;
}

.acct-pw-link:disabled { opacity: 0.4; cursor: default; }

.acct-pw-link .material-symbols-outlined {
    font-size: 14px;
    font-variation-settings: 'FILL' 0, 'wght' 300;
}

/* Success notice */
.acct-pw-sent {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 9px 13px;
    background: rgba(52,199,89,0.07);
    border: 1px solid rgba(52,199,89,0.15);
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: #2a9d47;
    letter-spacing: 0.005em;
}

.acct-pw-sent .material-symbols-outlined {
    font-size: 15px;
    color: #34c759;
    font-variation-settings: 'FILL' 1, 'wght' 400;
}

.acct-pw-sent.hidden { display: none !important; }

/* ── Footer ── */
.acct-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px 24px 22px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Text-only cancel */
.acct-cancel-btn {
    padding: 8px 4px;
    border: none;
    background: transparent;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    color: #a0a8b0;
    cursor: pointer;
    transition: color 0.15s;
}

.acct-cancel-btn:hover { color: #586065; }

/* Primary save */
.acct-save-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    border: none;
    border-radius: 11px;
    background: #0c0f10;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    letter-spacing: -0.01em;
    transition: background 0.15s, opacity 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(12,15,16,0.18);
}

.acct-save-btn:hover {
    background: #1c2224;
    box-shadow: 0 4px 16px rgba(12,15,16,0.22);
}

.acct-save-btn:disabled { opacity: 0.45; cursor: default; box-shadow: none; }

.acct-save-btn .material-symbols-outlined {
    font-size: 16px;
    font-variation-settings: 'FILL' 0, 'wght' 300;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .acct-overlay { padding: 0; align-items: flex-end; }

    .acct-modal {
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        transform: translateY(44px);
        max-height: 92dvh;
        border-bottom: none;
    }

    .acct-overlay.visible .acct-modal { transform: translateY(0); }

    .acct-modal-header { padding: 20px 20px 16px; }
    .acct-modal-body   { padding: 20px 20px; }
    .acct-modal-footer { padding: 12px 20px 28px; }

    .acct-save-btn  { flex: 1; justify-content: center; }
    .acct-cancel-btn { padding: 8px 8px; }
}
