:root {
    --primary: #e11d82;
    --primary-2: #ff6fa5;
    --primary-dark: #9b1361;
    --primary-light: #fbe1ef;
    --primary-soft: #fdf1f8;
    --success: #17a673;
    --danger: #e5484d;
    --warning: #f0a020;
    --gold: #f0a020;
    --bg: #faf6f9;
    --card-bg: #ffffff;
    --text-dark: #1b1023;
    --text-muted: #766f82;
    --border: #f0dcea;
    --sidebar-bg: #ffffff;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 11px;
    --shadow-card: 0 4px 18px rgba(225, 29, 130, 0.09), 0 1px 3px rgba(27, 16, 35, 0.04);
    --shadow-soft: 0 10px 30px rgba(23, 20, 26, 0.06);
    --shadow-glow: 0 8px 24px rgba(225, 29, 130, 0.22);
    --topbar-h: 60px;
    --bottom-nav-h: 68px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --font-display: 'Sora', 'Segoe UI', Roboto, Arial, sans-serif;
    --font-body: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
    --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--primary-light) transparent; }
::selection { background: var(--primary); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
:focus-visible { outline: 2.5px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
body {
    margin: 0;
    font-family: var(--font-body);
    background:
        radial-gradient(720px 420px at 100% -8%, rgba(225,29,130,0.06), transparent 60%),
        radial-gradient(600px 380px at -6% 12%, rgba(240,160,32,0.05), transparent 55%),
        var(--bg);
    color: var(--text-dark);
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); letter-spacing: -0.01em; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ===================================================================
   APP SHELL — mobile-app style: sticky top bar + fixed bottom tab bar
   =================================================================== */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.app-topbar {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255,255,255,0.86);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid var(--border);
    position: relative;
}
.app-topbar::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2), transparent 70%);
    opacity: 0.9;
}
.app-topbar-inner {
    max-width: 1080px; margin: 0 auto;
    height: var(--topbar-h);
    padding: 0 16px;
    display: flex; align-items: center; gap: 12px;
}
.app-topbar-brandmark {
    width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; box-shadow: var(--shadow-glow);
    transition: transform 0.25s var(--ease);
}
.app-topbar-brandmark:hover { transform: rotate(-6deg) scale(1.06); }
.app-topbar-text { flex: 1; min-width: 0; }
.app-topbar-eyebrow { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.app-topbar h1 { font-family: var(--font-display); margin: 0; font-size: 17px; font-weight: 800; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.app-main { flex: 1; width: 100%; }
.content-body {
    max-width: 1080px; margin: 0 auto; width: 100%;
    padding: 16px 16px calc(var(--bottom-nav-h) + 28px + var(--safe-b));
}

/* ===== Bottom tab bar ===== */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: flex; align-items: flex-end;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px rgba(23,20,26,0.07);
    padding: 8px 4px calc(8px + var(--safe-b));
    height: calc(var(--bottom-nav-h) + var(--safe-b));
}
.bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    text-decoration: none; color: var(--text-muted);
    font-size: 10.5px; font-weight: 700;
    padding: 5px 2px; border-radius: 12px;
    transition: color 0.2s var(--ease), transform 0.15s var(--ease);
}
.bottom-nav a:active { transform: scale(0.94); }
.bottom-nav a .nav-ic {
    font-size: 20px; line-height: 1; width: 34px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px; transition: background 0.2s var(--ease);
}
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a.active .nav-ic { background: var(--primary-soft); }
.bottom-nav a.nav-fab { margin-top: -30px; }
.bottom-nav a.nav-fab .nav-ic {
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 24px; box-shadow: 0 10px 24px rgba(225,29,130,0.4);
    border: 4px solid var(--bg);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.bottom-nav a.nav-fab:active .nav-ic { transform: scale(0.92); }
.bottom-nav a.nav-fab { color: var(--primary); }
.bottom-nav a.nav-fab.active .nav-ic { transform: scale(1.05); }
.bottom-nav a.nav-extra-desktop { display: none; }

/* ===== "More" screen — app-style icon grid menu ===== */
.more-section-title {
    font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-muted); font-weight: 800; margin: 22px 4px 10px;
}
.more-section-title:first-child { margin-top: 4px; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.more-tile {
    background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 14px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px;
    text-decoration: none; color: var(--text-dark); text-align: center;
    box-shadow: var(--shadow-card); transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.more-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.more-tile:active { transform: scale(0.95); }
.more-tile .ic {
    width: 42px; height: 42px; border-radius: 13px; background: var(--primary-soft);
    display: flex; align-items: center; justify-content: center; font-size: 19px;
    transition: background 0.2s var(--ease);
}
.more-tile:hover .ic { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.more-tile span { font-size: 11px; font-weight: 700; line-height: 1.3; }
.more-tile.danger .ic { background: #fdecec; }
.more-profile-card {
    display: flex; align-items: center; gap: 12px;
    background: linear-gradient(135deg, var(--primary-soft), #fff);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 16px; margin-bottom: 6px;
}
.more-profile-avatar {
    width: 46px; height: 46px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 19px; font-weight: 800; flex-shrink: 0;
}
.more-profile-name { font-weight: 800; font-size: 14.5px; font-family: var(--font-display); }
.more-profile-sub { font-size: 12px; color: var(--text-muted); }

.user-chip {
    background: var(--primary-soft);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border);
}

/* ===== Cards ===== */
@keyframes cardRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    animation: cardRise 0.45s var(--ease) both;
    transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    opacity: 0; transition: opacity 0.25s var(--ease);
}
.card:hover::before { opacity: 1; }
.card h3 { margin-top: 0; color: var(--text-dark); font-family: var(--font-display); font-weight: 700; }

/* ===== Stats ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
    animation: cardRise 0.45s var(--ease) both;
}
.stat-card:hover, .stat-card:active { transform: translateY(-3px); box-shadow: var(--shadow-glow); border-color: var(--primary-light); }
.stat-num {
    display: block; font-family: var(--font-mono); font-size: 27px; font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--primary);
}
.stat-label { font-size: 12.5px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.01em; }

/* ===== Score progress bar (GMB Profile Completeness) ===== */
.score-bar-track { background: #f0f0f0; border-radius: 999px; height: 18px; overflow: hidden; margin: 10px 0; }
.score-bar-fill { height: 100%; border-radius: 999px; transition: width 0.3s; }
.checklist-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.checklist-item:last-child { border-bottom: none; }
.checklist-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.checklist-label { flex: 1; font-weight: 600; }
.checklist-hint { font-size: 12px; color: var(--text-muted); }

/* ===== Forms ===== */
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 13.5px; color: var(--text-dark); }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], textarea, select {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-body);
    background: #fffdfe;
    color: var(--text-dark);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
input[type=text]:hover, input[type=email]:hover, input[type=password]:hover,
input[type=datetime-local]:hover, textarea:hover, select:hover { border-color: #e6c3d8; }
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus,
input[type=datetime-local]:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(225, 29, 130, 0.1);
}
textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    border: none;
    padding: 13px 26px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    margin-top: 18px;
    box-shadow: var(--shadow-glow);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(225,29,130,0.32); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-small {
    display: inline-block;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    background: var(--primary-soft);
    color: var(--text-dark);
    border: 1px solid var(--border);
    margin-right: 6px;
    transition: 0.2s var(--ease);
}
.btn-small:hover { background: var(--primary-light); transform: translateY(-1px); }
.btn-danger { background: #fee2e2; color: var(--danger); border-color: #fecaca; }
.btn-success { background: #dcfce7; color: var(--success); border-color: #bbf7d0; }

/* ===== Checkbox chips ===== */
.checkbox-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.checkbox-chip {
    background: var(--primary-soft);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: normal;
    cursor: pointer;
    margin: 0;
    color: var(--text-dark);
}
.checkbox-chip input { margin-right: 6px; accent-color: var(--primary); }

/* ===== Badges ===== */
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.badge {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: var(--primary-soft);
    color: var(--text-muted);
    border: 1px solid transparent;
}
.badge-connected { background: #e5f9f1; color: var(--success); border-color: #bdeeda; }
.badge-disconnected { background: #fdecec; color: var(--danger); border-color: #f8d0d0; }
.status-posted, .status-active { background: #e5f9f1; color: var(--success); }
.status-failed, .status-blocked, .status-rejected { background: #fdecec; color: var(--danger); }
.status-scheduled, .status-pending, .status-pending_approval { background: #fdf1dc; color: var(--warning); }
.status-draft { background: #f1eef2; color: var(--text-muted); }

/* ===== Tables ===== */
.data-table { width: 100%; border-collapse: collapse; margin-top: 10px; border-radius: var(--radius-sm); overflow: hidden; }
.data-table th, .data-table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table th { color: var(--text-dark); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.02em; background: var(--primary-soft); }
.data-table tr { transition: background 0.15s var(--ease); }
.data-table tr:hover td { background: #fdf5fa; }

/* ===== Posts list ===== */
.post-item { padding: 10px 0; }
.post-item-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.post-thumb { max-width: 280px; max-height: 200px; border-radius: 8px; display: block; margin: 8px 0; border: 1px solid var(--border); }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 12px; }
.gallery-item { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px; box-shadow: 0 2px 8px rgba(225, 29, 130, 0.05); }
.gallery-item .post-thumb { max-width: 100%; width: 100%; height: 160px; object-fit: cover; margin: 0 0 8px 0; }

.calendar-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.calendar-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.calendar-table th { text-align: center; padding: 8px 4px; color: var(--text-dark); font-weight: 700; font-size: 0.85em; background: var(--primary-soft); }
.calendar-table td { border: 1px solid var(--border); vertical-align: top; height: 84px; padding: 6px; }
.calendar-table td.cal-empty { background: #fcfcfc; border-color: #f3f4f6; }
.cal-day-num { display: inline-block; font-weight: 700; text-decoration: none; color: var(--text-dark); }
.cal-today { background: var(--primary-soft); }
.cal-today .cal-day-num { color: var(--primary); }
.cal-selected { outline: 2px solid var(--primary); outline-offset: -2px; }
.cal-dots { display: flex; gap: 3px; margin-top: 6px; flex-wrap: wrap; }
.cal-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.cal-count { display: block; font-size: 0.75em; color: var(--text-muted); margin-top: 3px; }
.post-actions { margin-top: 10px; }
hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.text-muted { color: var(--text-muted); font-size: 13px; }

/* ===== Platform cards ===== */
.platform-accordion { display: flex; flex-direction: column; gap: 14px; }
.platform-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: 0 2px 10px rgba(225, 29, 130, 0.05); }
.platform-card-head { display: flex; align-items: center; gap: 10px; }
.platform-note { color: var(--text-muted); font-size: 13px; margin: 6px 0 12px; }
.platform-form { margin-top: 10px; }
.disabled-note { opacity: 0.7; }

.switch-row { display: flex; align-items: center; gap: 10px; font-weight: normal; }
.switch-row input { width: auto; accent-color: var(--primary); }

/* ===== Auth pages ===== */
@keyframes authBoxRise { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px 16px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(600px 380px at 15% 15%, rgba(255,111,165,0.35), transparent 60%),
        radial-gradient(560px 420px at 85% 85%, rgba(240,160,32,0.18), transparent 55%),
        linear-gradient(135deg, #2a1030 0%, #4a1245 45%, #1b0e22 100%);
}
.auth-box {
    background: rgba(255,255,255,0.98);
    padding: 38px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 380px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
    position: relative;
    z-index: 1;
    overflow: hidden;
    animation: authBoxRise 0.5s var(--ease) both;
}
.auth-box::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
}
.auth-box h2 { margin-top: 0; text-align: center; color: var(--text-dark); font-weight: 800; font-family: var(--font-display); }
.auth-switch { text-align: center; font-size: 14px; margin-top: 16px; color: var(--text-muted); }
.auth-switch a { color: var(--primary); text-decoration: none; font-weight: 700; }

/* ===== Branding footer on auth pages (login/register/etc.) ===== */
.auth-brand-footer {
    text-align: center;
    font-size: 12.5px;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    margin-top: 22px;
}
.auth-brand-footer strong { color: #fff; font-weight: 800; }

/* ===== Public QR review page (review.php) ===== */
.review-box { max-width: 420px; }
.star-rate-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.star-rate-grid form { margin: 0; }
.star-rate-btn {
    width: 100%; padding: 14px; font-size: 20px; letter-spacing: 2px;
    border: 1px solid var(--border); border-radius: 12px; background: var(--primary-soft);
    cursor: pointer; transition: transform 0.1s, background 0.15s;
}
.star-rate-btn:hover { background: var(--primary); transform: scale(1.02); }

/* ===== AI Business Assistant chat ===== */
.chat-window {
    max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
    padding: 12px; background: #fbf9fb; border: 1px solid var(--border); border-radius: 12px; margin-top: 12px;
}
.chat-bubble { display: flex; }
.chat-bubble.chat-user { justify-content: flex-end; }
.chat-bubble.chat-assistant { justify-content: flex-start; }
.chat-bubble-inner {
    max-width: 80%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5;
}
.chat-user .chat-bubble-inner { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-assistant .chat-bubble-inner { background: #fff; border: 1px solid var(--border); color: var(--text-dark); border-bottom-left-radius: 4px; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.auth-switch a:hover { text-decoration: underline; }

/* ===== Alerts ===== */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fee2e2; color: var(--danger); }
.alert-success { background: #dcfce7; color: var(--success); }
.alert-warning { background: #fef3c7; color: var(--warning); }

/* ===== Pagination ===== */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.pagination .active-page { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Notifications bell ===== */
.topbar-right { display: flex; align-items: center; gap: 14px; }
.bell-link { position: relative; font-size: 20px; text-decoration: none; line-height: 1; padding: 4px; }
.bell-badge {
    position: absolute; top: -4px; right: -6px;
    background: var(--danger); color: #fff; font-size: 10px; font-weight: 800;
    border-radius: 10px; min-width: 16px; height: 16px; line-height: 16px; text-align: center;
    padding: 0 3px;
}
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card-bg); text-decoration: none; color: inherit; }
.notif-item.unread { background: var(--primary-soft); border-color: var(--primary-light); }
.notif-icon { font-size: 20px; line-height: 1; margin-top: 2px; }
.notif-body { flex: 1; }
.notif-title { font-weight: 700; font-size: 14px; color: var(--text-dark); margin-bottom: 2px; }
.notif-message { font-size: 13px; color: var(--text-muted); }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex-shrink: 0; }

/* ===== Analytics ===== */
.analytics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 20px; }
.analytics-grid .card { margin-bottom: 0; }
.chart-scroll { width: 100%; overflow-x: auto; }
.chart-svg { width: 100%; height: 180px; display: block; }
.chart-empty { color: var(--text-muted); font-size: 14px; padding: 20px 0; text-align: center; }

.hbar-chart { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.hbar-row { display: grid; grid-template-columns: 110px 1fr 40px; align-items: center; gap: 10px; }
.hbar-label { font-size: 13px; font-weight: 600; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { background: var(--primary-soft); border-radius: 6px; height: 14px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 6px; transition: width 0.3s ease; }
.hbar-value { font-size: 13px; font-weight: 700; color: var(--text-dark); text-align: right; }

.donut-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-around; }
.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.donut-svg { width: 110px; height: 110px; }
.donut-label { font-size: 13px; color: var(--text-muted); font-weight: 600; text-align: center; }

.analytics-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.analytics-filters a.btn-small.active-range { background: var(--primary); color: #fff; border-color: var(--primary); }

.mini-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); margin-top: 8px; }

/* ===== Advanced analytics: custom range picker, export button, change badges, heatmap ===== */
.analytics-custom-range { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text-muted); }
.analytics-custom-range input[type="date"] {
    padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: #fff;
}
.btn-export { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-export:hover { background: var(--primary-dark, var(--primary)); opacity: 0.9; }

.change-badge {
    display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; margin-top: 4px;
}
.change-up { background: #dcfce7; color: #16a34a; }
.change-down { background: #fee2e2; color: #dc2626; }
.change-flat { background: var(--primary-soft); color: var(--text-muted); }

.analytics-wide { grid-column: 1 / -1; }

.heatmap-scroll { width: 100%; overflow-x: auto; }
.heatmap-grid {
    display: grid;
    grid-template-columns: 40px repeat(24, minmax(18px, 1fr));
    gap: 2px;
    min-width: 560px;
    margin-top: 8px;
}
.heatmap-corner { grid-column: 1; }
.heatmap-hour-label { font-size: 9px; color: var(--text-muted); text-align: center; padding-bottom: 2px; }
.heatmap-day-label { font-size: 11px; font-weight: 600; color: var(--text-dark); display: flex; align-items: center; }
.heatmap-cell { aspect-ratio: 1; border-radius: 3px; background: var(--primary-soft); }

/* ===== Location SEO Keywords widget (Create Post / Business Gallery) ===== */
.seo-widget { margin-top: 16px; }
.seo-group-label { font-size: 12px; font-weight: 700; color: var(--text-muted); margin: 12px 0 6px; text-transform: uppercase; letter-spacing: 0.03em; }
.seo-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.seo-chip {
    background: var(--primary-soft);
    border: 1px solid var(--border);
    color: var(--text-dark);
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.seo-chip:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }

/* ===== Growth Guide (100K Followers) page ===== */
.guide-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.guide-toc a {
    background: var(--primary-soft); color: var(--text-dark); font-size: 13px; font-weight: 600;
    padding: 6px 12px; border-radius: 999px; text-decoration: none;
}
.guide-toc a:hover { background: var(--primary); color: #fff; }
.guide-section h3 { display: flex; align-items: center; gap: 8px; }
.guide-section ul, .guide-section ol { margin: 8px 0 8px 20px; line-height: 1.7; }
.guide-section li { margin-bottom: 4px; }
.guide-section p { line-height: 1.7; }
.guide-checklist { list-style: none; margin-left: 0 !important; }
.guide-checklist li { padding-left: 26px; position: relative; }
.guide-checklist li::before { content: "☐"; position: absolute; left: 0; color: var(--primary); font-size: 16px; }
.guide-platforms details {
    border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; background: #fffafd;
}
.guide-platforms summary { font-weight: 700; cursor: pointer; color: var(--text-dark); }
.guide-platforms details[open] summary { margin-bottom: 8px; }
.guide-callout {
    background: var(--primary-soft); border-left: 4px solid var(--primary); border-radius: 8px;
    padding: 12px 16px; font-size: 14px; margin: 10px 0;
}
.mini-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mini-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ===== Connect Guide — mobile-friendly card/accordion style ===== */
.connect-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.connect-overview-card {
    background: var(--primary-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.12s, box-shadow 0.12s;
}
.connect-overview-card:active, .connect-overview-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(225, 29, 130, 0.14);
    background: var(--primary-light);
}
.connect-overview-icon { font-size: 22px; line-height: 1; }
.connect-overview-name { font-weight: 700; font-size: 13.5px; color: var(--text-dark); }
.connect-overview-time { font-size: 11.5px; color: var(--text-muted); }

.difficulty-pill {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    width: fit-content;
}
.difficulty-easy { background: #dcfce7; color: #16a34a; }
.difficulty-medium { background: #fef3c7; color: #b45309; }
.difficulty-hard { background: #fee2e2; color: #dc2626; }

/* Each platform is a native <details> card — tap header to expand, no JS needed, works great on mobile */
.platform-guide-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(225, 29, 130, 0.05);
    overflow: hidden;
    scroll-margin-top: 16px;
}
.platform-guide-card summary {
    list-style: none;
    cursor: pointer;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    -webkit-tap-highlight-color: transparent;
}
.platform-guide-card summary::-webkit-details-marker { display: none; }
.platform-guide-icon {
    font-size: 26px;
    line-height: 1;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}
.platform-guide-head-text { flex: 1; min-width: 0; }
.platform-guide-name { font-weight: 800; font-size: 16px; color: var(--text-dark); }
.platform-guide-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.platform-guide-chevron {
    font-size: 13px;
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.platform-guide-card[open] .platform-guide-chevron { transform: rotate(180deg); }
.platform-guide-card[open] summary { border-bottom: 1px solid var(--border); background: var(--primary-soft); }
.platform-guide-body { padding: 16px; }
.platform-guide-body p.platform-guide-need { margin: 0 0 12px; font-size: 13.5px; color: var(--text-muted); }
.platform-guide-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: step;
}
.platform-guide-steps li {
    counter-increment: step;
    position: relative;
    padding: 0 0 14px 34px;
    font-size: 14px;
    line-height: 1.6;
}
.platform-guide-steps li:last-child { padding-bottom: 0; }
.platform-guide-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.platform-guide-steps li::after {
    content: "";
    position: absolute;
    left: 11px;
    top: 24px;
    bottom: 0;
    width: 2px;
    background: var(--primary-light);
}
.platform-guide-steps li:last-child::after { display: none; }

/* Sticky horizontal chip nav — scrolls instead of wrapping into a huge block on small screens */
.connect-chip-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 14px;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.connect-chip-nav::-webkit-scrollbar { display: none; }
.connect-chip-nav a {
    flex-shrink: 0;
    background: var(--primary-soft);
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
}
.connect-chip-nav a:hover { background: var(--primary); color: #fff; }

@media (max-width: 600px) {
    .connect-overview-grid { grid-template-columns: repeat(2, 1fr); }
    .platform-guide-card summary { padding: 14px; }
    .platform-guide-body { padding: 14px; }
    .platform-guide-name { font-size: 15px; }
}

/* ===== Lead Auto-Reply Bot tabs ===== */
.tab-bar { display: flex; gap: 6px; margin: 16px 0; border-bottom: 2px solid var(--border); }
.tab-link {
    padding: 10px 16px; text-decoration: none; color: var(--text-muted); font-weight: 600;
    font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tab-link:hover { color: var(--primary); }
.tab-link.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ===== Responsive ===== */
@media (min-width: 640px) {
    .content-body { padding: 22px 28px calc(var(--bottom-nav-h) + 32px + var(--safe-b)); }
    .more-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
    .more-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 360px) {
    .more-grid { grid-template-columns: repeat(2, 1fr); }
    .bottom-nav a { font-size: 9.5px; }
}

/* ===================================================================
   DESKTOP LAYOUT (>=1024px) — laptop/desktop par mobile-app jaisa nahi,
   normal website jaisa dikhna chahiye: dark/premium left sidebar +
   wide top navbar. Mobile/tablet (< 1024px) par app-shell jaisa hi
   rehta hai, kuch nahi badalta.
   =================================================================== */
@media (min-width: 1024px) {
    :root {
        --sidebar-w: 248px;
        --sb-bg-1: #1c1424;
        --sb-bg-2: #150e1b;
        --sb-text: #f3eef7;
        --sb-text-muted: #9d92ac;
        --sb-hover: rgba(255,255,255,0.06);
        --sb-active: rgba(225,29,130,0.22);
        --sb-border: rgba(255,255,255,0.08);
    }

    .app-topbar-inner { max-width: 1320px; padding: 0 32px; }
    .app-topbar h1 { font-size: 19px; }

    .bottom-nav {
        position: fixed;
        top: var(--topbar-h);
        bottom: 0;
        left: 0;
        right: auto;
        width: var(--sidebar-w);
        height: auto;
        z-index: 45;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 3px;
        padding: 22px 14px 20px;
        border-top: none;
        border-right: none;
        box-shadow: 4px 0 24px rgba(0,0,0,0.18);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: linear-gradient(180deg, var(--sb-bg-1), var(--sb-bg-2));
    }

    /* Small section label at the top of the sidebar for a premium dashboard feel */
    .bottom-nav::before {
        content: "MENU";
        display: block;
        color: var(--sb-text-muted);
        font-weight: 800;
        font-size: 10.5px;
        letter-spacing: 0.08em;
        padding: 0 12px 12px;
    }

    .bottom-nav a {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 13px;
        padding: 12px 14px;
        border-radius: 11px;
        font-size: 14px;
        font-weight: 600;
        color: var(--sb-text-muted);
        border-left: 3px solid transparent;
    }
    .bottom-nav a:hover { background: var(--sb-hover); color: var(--sb-text); }
    .bottom-nav a.active {
        background: var(--sb-active);
        color: #ff9fc9;
        border-left-color: var(--primary);
        font-weight: 700;
    }
    .bottom-nav a .nav-ic { font-size: 19px; opacity: 0.95; }

    /* "Post" stays a bold pink call-to-action pill, even in the dark sidebar */
    .bottom-nav a.nav-fab {
        margin: 8px 0 6px;
        flex-direction: row;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        color: #fff;
        border-left-color: transparent;
        border-radius: 11px;
        box-shadow: 0 6px 18px rgba(225, 29, 130, 0.35);
    }
    .bottom-nav a.nav-fab:hover { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); filter: brightness(1.08); }
    .bottom-nav a.nav-fab .nav-ic {
        width: auto; height: auto; border-radius: 0;
        background: none; box-shadow: none; border: none;
        font-size: 19px; color: #fff;
    }
    .bottom-nav a.nav-fab span { color: #fff; }
    .bottom-nav a.nav-fab.active .nav-ic { transform: none; }

    .content-body {
        margin-left: var(--sidebar-w);
        max-width: 1140px;
        padding: 30px 36px 44px;
    }

    .auth-page, .review-box { margin-left: 0; }

    /* Extra sidebar-only link (Setup & Operate Guide) — hidden on mobile bottom-nav
       (no room for a 6th icon there), shown as a normal link on the desktop sidebar */
    .bottom-nav a.nav-extra-desktop {
        display: flex;
        margin-top: auto;
        padding-top: 16px;
        border-top: 1px solid var(--sb-border);
        font-size: 13px;
        color: var(--sb-text-muted);
    }
    .bottom-nav a.nav-extra-desktop:hover { color: var(--sb-text); }
    /* When there's more than one desktop-only extra link (e.g. Platform Updates + Setup Guide),
       only the first one gets the top divider/spacer — the rest stack directly beneath it. */
    .bottom-nav a.nav-extra-desktop + a.nav-extra-desktop {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
}

/* ================= PLATFORM UPDATES (YouTube/Google/social media auto-updates, bilingual) ================= */
.update-card { border-left: 4px solid var(--primary); }
.update-lang-block { padding: 10px 0; }
.update-lang-block + .update-lang-block { border-top: 1px dashed var(--border); margin-top: 6px; }
.update-lang-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.update-lang-hi h3, .update-lang-hi p { font-family: 'Noto Sans', 'Inter', sans-serif; }
