/* =============================================
   Mystery Shoppers - iNCOGNITO Digital Tracker design
   Ported from the Digital-Tracker UI mockup (Bootstrap 5 + a custom design-system layer).
   Brand: #be0d0d | #000000 | #ffffff. Light theme only - no dark variant in the source mockup.
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --red: #be0d0d;
    --red-dark: #930a0a;
    --red-light: #d41212;
    --red-glow: rgba(190, 13, 13, 0.14);
    --red-pale: rgba(190, 13, 13, 0.07);
    --red-pale2: rgba(190, 13, 13, 0.04);

    --bg: #f4f5f7;
    --bg-alt: #eee;
    --card: #ffffff;
    --card-inner: #f8f9fb;

    --border: rgba(0, 0, 0, 0.07);
    --border-mid: rgba(0, 0, 0, 0.11);
    --border-str: rgba(0, 0, 0, 0.16);

    --text-primary: #0f0f0f;
    --text-secondary: #3c3c3c;
    --text-muted: #7a7a7a;
    --text-light: #b0b0b0;

    --success: #15803d;
    --success-bg: rgba(21, 128, 61, 0.09);
    --warning: #b45309;
    --warning-bg: rgba(180, 83, 9, 0.09);
    --info: #1d4ed8;
    --info-bg: rgba(29, 78, 216, 0.09);

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 100px;

    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.09), 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.07);
    --shadow-red: 0 4px 16px rgba(190, 13, 13, 0.28);

    --nav-height: 68px;
    --header-height: 60px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { width: 100%; min-height: 100%; }

body {
    margin: 0;
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.2;
}

a { color: var(--red); }

/* ── App Shell ──────────────────────────────── */
.app-container {
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(160deg, rgba(190, 13, 13, 0.06) 0%, rgba(255, 255, 255, 0) 100%), var(--bg);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
}

.brand-mark {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.text-brand-red { color: var(--red); }

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.app-header-title {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.header-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--card);
    box-shadow: 0 0 0 1px var(--border);
}

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    padding: 0;
    border: none;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: transparent;
    text-decoration: none;
}

.btn-icon:hover { background: var(--bg-alt); color: var(--text-secondary); }

.app-content {
    flex: 1;
    padding: 20px 16px;
    padding-bottom: calc(var(--nav-height) + 24px);
}

.app-content.no-bottom-nav { padding-bottom: 32px; }
.app-content.app-content-flush { padding: 0 0 calc(var(--nav-height) + 24px); }

/* ── Bottom Nav ─────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 600px;
    margin: 0 auto;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 900;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.62rem;
    font-weight: 600;
    padding: 8px 4px;
    width: 100%;
    text-transform: uppercase;
    transition: color 0.15s;
}

.nav-item i { font-size: 1.3rem; }
.nav-item.active { color: var(--red); background: var(--red-pale); }
.nav-item:active { transform: scale(0.94); }

/* ── Offcanvas Menu ─────────────────────────── */
.offcanvas-sidebar { width: 300px; }
.offcanvas-sidebar .offcanvas-header { border-bottom: 1px solid var(--border); padding: 16px; }
.offcanvas-brand-title { font-size: 1.1rem; }

.offcanvas-user-card { padding: 20px 16px; background: var(--card-inner); border-bottom: 1px solid var(--border); }
.offcanvas-user-avatar { width: 46px; height: 46px; object-fit: cover; }
.offcanvas-user-name { font-weight: 700; }
.offcanvas-user-id { font-size: 0.8rem; color: var(--text-muted); }

.offcanvas-nav-body { padding: 12px; flex: 1; }
.offcanvas-nav-item { color: var(--text-secondary); }
.offcanvas-nav-item:hover { background: var(--bg-alt); color: var(--text-primary); }
.offcanvas-nav-item.active { background: var(--red-pale); color: var(--red); font-weight: 700; }
.offcanvas-nav-link { font-weight: 600; font-size: 0.92rem; }

.offcanvas-nav-signout-wrap { border-top: 1px solid var(--border); padding: 12px; }
.offcanvas-nav-signout { color: var(--red); }
.offcanvas-nav-signout:hover { background: var(--red-pale); }

/* ── Buttons ────────────────────────────────── */
.btn {
    font-family: var(--font-main);
    font-weight: 600;
    border-radius: var(--radius-md) !important;
    padding: 13px 22px;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: -0.01em;
    font-size: 0.95rem;
    border: none;
    transition: transform 0.15s, opacity 0.15s;
}

.btn:active { transform: scale(0.97); }

.btn-primary-red { background: var(--red); color: #fff; box-shadow: var(--shadow-red); }
.btn-primary-red:hover { background: var(--red-light); color: #fff; }
.btn-primary-red:disabled { opacity: 0.55; box-shadow: none; }

.btn-outline { background: #fff; border: 1.5px solid var(--border-mid) !important; color: var(--text-primary); }
.btn-outline:hover { border-color: var(--border-str) !important; color: var(--text-primary); }

/* Also re-skin plain Bootstrap buttons used by the shared survey-runner engine, so it matches
   without needing its own class names. */
.btn-primary, .btn-success { background: var(--red); border-color: var(--red); box-shadow: var(--shadow-red); }
.btn-primary:hover, .btn-success:hover { background: var(--red-light); border-color: var(--red-light); }
.btn-outline-secondary, .btn-secondary { background: #fff; border: 1.5px solid var(--border-mid); color: var(--text-primary); }
.btn-outline-secondary:hover, .btn-secondary:hover { border-color: var(--border-str); background: var(--bg-alt); color: var(--text-primary); }

/* ── Login ──────────────────────────────────── */
.login-body { background: var(--bg); }
.login-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 32px 24px; min-height: 100vh; }
.login-top-decoration { position: absolute; top: 0; left: 0; right: 0; height: 220px; background: linear-gradient(160deg, var(--red-pale) 0%, rgba(255,255,255,0) 100%); max-width: 600px; margin: 0 auto; z-index: 0; }
.login-content { position: relative; z-index: 1; }

.brand-section { text-align: center; margin-bottom: 28px; }
.app-icon {
    width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.3rem; box-shadow: var(--shadow-red);
}
.login-brand-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }
.login-brand-subtitle { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }

.login-heading { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; }
.login-sub { color: var(--text-muted); font-size: 0.9rem; }

.field-group { margin-bottom: 18px; display: flex; flex-direction: column; gap: 12px; }
.field-row {
    display: flex; align-items: center; gap: 10px; background: #fff;
    border: 1.5px solid var(--border-mid); border-radius: var(--radius-md); padding: 0 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field-row:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-glow); }
.field-icon { color: var(--text-light); font-size: 1rem; }
.field-input { flex: 1; border: none; outline: none; padding: 13px 0; font-size: 0.92rem; font-family: var(--font-main); background: transparent; }
.field-action { border: none; background: transparent; color: var(--text-light); padding: 6px; }

.register-text { text-align: center; margin-top: 18px; font-size: 0.85rem; color: var(--text-muted); }
.register-text a { font-weight: 600; }

/* ── Cards ──────────────────────────────────── */
.app-card { background: var(--card); border-radius: var(--radius-lg); padding: 16px; border: 1px solid var(--border); box-shadow: var(--shadow-xs); margin-bottom: 12px; }
.app-card-elevated { background: var(--card); border-radius: var(--radius-lg); padding: 18px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.section-label { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-light); }
.divider-line { height: 1px; background: var(--border); margin: 16px 0; }

/* ── Badges / status ────────────────────────── */
.badge-tag { background: var(--red-pale); color: var(--red); font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-full); display: inline-flex; align-items: center; gap: 5px; }
.badge-tag.success { background: var(--success-bg); color: var(--success); }
.badge-tag.warning { background: var(--warning-bg); color: var(--warning); }
.text-success-icon { color: var(--success); }

/* ── Home ───────────────────────────────────── */
.greeting-wrap { margin-bottom: 18px; }
.greeting-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.greeting-name { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; }

.kpi-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.kpi-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 8px; text-align: center; box-shadow: var(--shadow-xs); }
.kpi-icon { width: 34px; height: 34px; margin: 0 auto 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; }
.kpi-icon-score { background: var(--red-pale); color: var(--red); }
.kpi-icon-done { background: var(--success-bg); color: var(--success); }
.kpi-icon-pending { background: var(--warning-bg); color: var(--warning); }
.kpi-val { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }
.kpi-lbl { font-size: 0.63rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }

.section-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-hdr h3 { font-size: 1rem; margin: 0; }
.section-hdr a { font-size: 0.82rem; font-weight: 600; text-decoration: none; }

.task-list-card {
    display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 14px; margin-bottom: 10px; text-decoration: none; color: inherit;
    box-shadow: var(--shadow-xs); transition: transform 0.1s;
}
.task-list-card:active { transform: scale(0.98); }
.task-icon-wrap { width: 42px; height: 42px; border-radius: var(--radius-md); background: var(--red-pale); color: var(--red); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.task-info { flex: 1; min-width: 0; }
.task-name { font-weight: 700; font-size: 0.92rem; }
.task-meta-row { display: flex; gap: 12px; font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; }
.task-list-chevron { color: var(--text-light); }

/* ── Tasks list ─────────────────────────────── */
.seg-control { display: flex; background: var(--bg-alt); border-radius: var(--radius-md); padding: 4px; margin-bottom: 16px; gap: 4px; }
.seg-btn { flex: 1; text-align: center; padding: 9px 6px; border-radius: var(--radius-sm); font-size: 0.82rem; font-weight: 700; color: var(--text-muted); cursor: pointer; user-select: none; transition: all 0.15s; }
.seg-btn.active { background: #fff; color: var(--red); box-shadow: var(--shadow-xs); }

.task-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-xs); position: relative; overflow: hidden; }
.task-card.inprogress::before, .task-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--red); }
.task-card.inprogress::before { background: var(--warning); }
.task-card.completed::before { background: var(--success); }
.task-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.task-title { font-weight: 700; font-size: 0.95rem; }
.task-store { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.task-meta { display: flex; gap: 16px; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 12px; }
.task-actions .btn { width: 100%; min-height: 44px; padding: 10px 16px; font-size: 0.88rem; }

/* ── Profile ────────────────────────────────── */
.profile-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 16px 16px; }
.avatar-ring { position: relative; width: 88px; height: 88px; border-radius: 50%; padding: 3px; background: linear-gradient(135deg, var(--red), var(--red-dark)); margin-bottom: 14px; }
.avatar-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #fff; }
.avatar-edit-btn {
    position: absolute; bottom: 0; right: 0; width: 28px; height: 28px; border-radius: 50%;
    background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; border: 2px solid #fff; cursor: pointer;
}
.profile-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.03em; }
.profile-id { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }

.stats-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); margin: 0 0 16px; }
.stat-item { background: var(--card); padding: 14px 10px; text-align: center; }
.stat-val { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; }
.stat-lbl { font-size: 0.63rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }

.profile-settings-wrap { padding: 0 16px; }
.settings-group { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); margin-bottom: 16px; }
.settings-item { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text-primary); background: #fff; }
.settings-item:last-child { border-bottom: none; }
.settings-item:hover { background: var(--bg); color: var(--text-primary); }
.settings-item-disabled { opacity: 0.6; cursor: default; }
.settings-icon { width: 34px; height: 34px; background: var(--bg-alt); color: var(--text-secondary); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; margin-right: 14px; flex-shrink: 0; }
.settings-icon-signout { background: var(--red-pale); color: var(--red); }
.settings-label { flex: 1; font-weight: 600; font-size: 0.9rem; }
.settings-label-signout { color: var(--red); }
.settings-value { font-size: 0.8rem; color: var(--text-muted); }
.settings-chevron { color: var(--text-light); }
.app-version { text-align: center; font-size: 0.75rem; color: var(--text-light); padding: 8px 0 4px; }

/* ── Help & Support ─────────────────────────── */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.contact-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 8px; text-align: center; box-shadow: var(--shadow-xs); cursor: pointer; }
.contact-card-disabled { opacity: 0.5; cursor: default; }
.contact-icon { width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.contact-icon-chat { background: var(--info-bg); color: var(--info); }
.contact-icon-call { background: var(--success-bg); color: var(--success); }
.contact-icon-email { background: var(--red-pale); color: var(--red); }
.contact-label { font-size: 0.78rem; font-weight: 600; }

.faq-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 10px; }
.faq-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); }
.accordion-button { font-size: 0.88rem; font-weight: 600; }
.accordion-button:not(.collapsed) { background: var(--red-pale); color: var(--red); box-shadow: none; }
.accordion-button:focus { box-shadow: none; }
.accordion-body { font-size: 0.86rem; color: var(--text-secondary); }

.popup-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1200; opacity: 0; pointer-events: none; transition: opacity 0.2s; display: flex; align-items: flex-end; justify-content: center; }
.popup-overlay.open { opacity: 1; pointer-events: auto; }
.popup-card { background: #fff; border-radius: var(--radius-lg) var(--radius-lg) 0 0; width: 100%; max-width: 600px; padding: 8px 20px 28px; box-shadow: var(--shadow-lg); transform: translateY(100%); transition: transform 0.25s; }
.popup-overlay.open .popup-card { transform: translateY(0); }
.popup-handle { width: 40px; height: 4px; background: var(--border-str); border-radius: var(--radius-full); margin: 8px auto 16px; }
.popup-header { text-align: center; position: relative; margin-bottom: 16px; }
.popup-close { position: absolute; right: 0; top: -4px; border: none; background: var(--bg-alt); width: 32px; height: 32px; border-radius: 50%; }
.popup-header-icon { width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.popup-header-icon.call { background: var(--success-bg); color: var(--success); }
.popup-title { font-weight: 800; font-size: 1.1rem; }
.popup-subtitle { font-size: 0.82rem; color: var(--text-muted); padding: 0 20px; }
.popup-info-list { background: var(--card-inner); border-radius: var(--radius-md); padding: 4px 14px; margin-bottom: 12px; }
.popup-info-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.popup-info-row:last-child { border-bottom: none; }
.popup-info-row-label { color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.popup-info-row-value { font-weight: 700; }
.popup-note { text-align: center; font-size: 0.76rem; color: var(--text-light); display: flex; align-items: center; justify-content: center; gap: 5px; }

/* ── Survey runner restyle (generic Bootstrap markup from the shared engine) ───────────── */
.survey-runner-header h5 { font-size: 1.05rem; font-weight: 800; }
.question-block { border: 1px solid var(--border) !important; border-radius: var(--radius-lg) !important; box-shadow: var(--shadow-xs) !important; }
.question-number-badge { background: var(--red-pale) !important; color: var(--red) !important; font-weight: 700; }
.question-block--followup { margin-left: 12px; border-left: 3px solid var(--red-pale) !important; }
.survey-runner-progress .progress { border-radius: var(--radius-full); background: var(--bg-alt); }
.survey-runner-progress .progress-bar { background: var(--red); }
.form-control, .form-select {
    border: 1.5px solid var(--border-mid) !important; border-radius: var(--radius-md) !important;
    min-height: 48px; padding: 12px 14px; font-family: var(--font-main);
}
.form-control:focus, .form-select:focus { border-color: var(--red) !important; box-shadow: 0 0 0 3px var(--red-glow) !important; }

.survey-review-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.survey-review-row:last-child { border-bottom: none; }
.survey-review-label { font-weight: 600; font-size: 0.86rem; flex: 1; }
.survey-review-value { font-size: 0.86rem; color: var(--text-secondary); text-align: right; flex: 1; }
.survey-review-edit { font-size: 0.78rem; font-weight: 600; text-decoration: none; flex-shrink: 0; }

.submitted-check-wrap { font-size: 4rem; color: var(--success); }

/* ── Utilities ──────────────────────────────── */
.alert { border-radius: var(--radius-md); font-size: 0.88rem; }

/* ── Toasts ─────────────────────────────────── */
.toast-stack {
    position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 560px; padding: 0 16px; z-index: 1300;
    display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.app-toast {
    display: flex; align-items: center; gap: 10px; background: var(--card);
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 12px 16px;
    font-size: 0.88rem; font-weight: 600; color: var(--text-primary);
    border-left: 4px solid var(--success);
    opacity: 0; transform: translateY(-10px); transition: opacity 0.2s, transform 0.2s;
}
.app-toast.show { opacity: 1; transform: translateY(0); }
.app-toast.app-toast-danger { border-left-color: var(--red); }
.app-toast-icon { font-size: 1.1rem; color: var(--success); flex-shrink: 0; }
.app-toast-danger .app-toast-icon { color: var(--red); }

/* ── Chat with Support ──────────────────────── */
.chat-fab {
    position: fixed;
    bottom: calc(var(--nav-height) + 16px);
    right: max(16px, calc(50% - 300px + 16px));
    z-index: 950;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: var(--shadow-red);
}

.chat-panel-card { display: flex; flex-direction: column; height: 74vh; max-height: 640px; padding: 8px 0 0; }
.chat-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 10px; }
.chat-panel-title { font-weight: 700; }
.chat-panel-body { flex: 1; overflow-y: auto; padding: 8px 16px; display: flex; flex-direction: column; gap: 8px; }
.chat-panel-load-more { text-align: center; font-size: 0.75rem; color: var(--text-muted); padding: 4px 0; }

.chat-bubble { max-width: 78%; padding: 8px 12px; border-radius: 14px; font-size: 0.86rem; line-height: 1.35; overflow-wrap: anywhere; }
.chat-bubble-admin { align-self: flex-start; background: var(--card-inner); color: var(--text-primary); border-bottom-left-radius: 3px; }
.chat-bubble-shopper { align-self: flex-end; background: var(--red); color: #fff; border-bottom-right-radius: 3px; }
.chat-bubble-time { font-size: 0.68rem; opacity: 0.65; margin-top: 3px; }
.chat-bubble-attachment img { max-width: 100%; border-radius: 10px; margin-top: 4px; display: block; }

.chat-panel-input-row { display: flex; align-items: center; gap: 8px; padding: 10px 16px 4px; border-top: 1px solid var(--border); }
.chat-panel-input-row input[type="text"] { flex: 1; border: 1.5px solid var(--border-mid); border-radius: var(--radius-full); padding: 8px 14px; font-size: 0.86rem; }
.chat-panel-input-row .btn-icon { background: none; border: none; color: var(--text-muted); font-size: 1.15rem; }
.chat-panel-input-row .btn-send { background: var(--red); color: #fff; border: none; border-radius: 50%; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ── Notification bell + list ───────────────── */
.header-bell-link { position: relative; color: var(--text-primary); font-size: 1.2rem; display: inline-flex; align-items: center; }
.header-bell-dot { position: absolute; top: -1px; right: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 1.5px solid var(--card); }

.notification-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow-xs); }
.notification-card-title { font-weight: 700; font-size: 0.92rem; margin-bottom: 2px; }
.notification-card-body { font-size: 0.86rem; color: var(--text-secondary); }
.notification-card-time { font-size: 0.74rem; color: var(--text-muted); margin-top: 6px; }
