/* Ensijam CRM — Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary: #1a3a5c;
    --accent:  #c8a45a;
    --green:   #10b981;
    --blue:    #3b82f6;
    --orange:  #f59e0b;
    --purple:  #8b5cf6;
    --red:     #ef4444;
    --bg:      #f0f4f8;
    --card:    #ffffff;
    --border:  #e2e8f0;
    --text:    #1e293b;
    --muted:   #64748b;
    --wa:      #25d366;
}

#wpcontent { background: var(--bg); }
.kcrm-wrap * { box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; }

/* Header */
.kcrm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary);
    padding: 0 20px;
    border-bottom: 3px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 54px;        /* fixed height keeps it compact */
    gap: 12px;
}
/* Logo */
.kcrm-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.kcrm-logo-icon { font-size: 24px; }
.kcrm-logo-title { display: block; color: #fff; font-size: 17px; font-weight: 700; line-height: 1; }
.kcrm-logo-sub   { color: var(--accent); font-size: 10px; letter-spacing: .5px; border-left: 1px solid rgba(255,255,255,.2); padding-left: 8px; margin-left: 2px; }

/* Nav — centred, flexible */
.kcrm-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
    overflow: visible; /* MUST be visible so dropdown panels are not clipped */
}
.kcrm-nav a {
    color: rgba(255,255,255,.72);
    text-decoration: none;
    padding: 6px 11px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 500;
    transition: all .18s;
    white-space: nowrap;
}
.kcrm-nav a:hover,
.kcrm-nav a.active { color: #fff; background: rgba(255,255,255,.13); }
.kcrm-btn-add {
    background: var(--accent) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
    font-size: 12.5px !important;
    padding: 7px 16px !important;
    border-radius: 20px !important;
    margin-left: 8px !important;
    white-space: nowrap !important;
    border: none !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    letter-spacing: 0.2px !important;
    box-shadow: 0 2px 8px rgba(200,164,90,0.35) !important;
    transition: all 0.18s !important;
    flex-shrink: 0 !important;
}
.kcrm-btn-add:hover {
    background: #d4a843 !important;
    box-shadow: 0 3px 12px rgba(200,164,90,0.5) !important;
    transform: translateY(-1px) !important;
    color: var(--primary) !important;
}

/* Page */
.kcrm-page { padding: 24px; max-width: 1400px; }

/* Cards */
.kcrm-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.kcrm-card h3 { margin: 0 0 16px; font-size: 16px; font-weight: 600; color: var(--text); }

/* Stats */
.kcrm-stats-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 16px; margin-bottom: 20px; }
.kcrm-stat-card { background: var(--card); border-radius: 12px; padding: 20px; text-align: center; border-top: 4px solid; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.kcrm-stat-card.blue   { border-color: var(--blue); }
.kcrm-stat-card.green  { border-color: var(--green); }
.kcrm-stat-card.orange { border-color: var(--orange); }
.kcrm-stat-card.purple { border-color: var(--purple); }
.kcrm-stat-card.red    { border-color: var(--red); }
.kcrm-stat-icon  { font-size: 28px; margin-bottom: 8px; }
.kcrm-stat-value { font-size: 36px; font-weight: 700; color: var(--text); line-height: 1; }
.kcrm-stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 500; }

/* Charts */
.kcrm-charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

/* Table */
.kcrm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kcrm-table thead th { background: #f8fafc; color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.kcrm-table tbody td { padding: 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: var(--text); }
.kcrm-table tbody tr:hover { background: #f8fafc; }
.kcrm-table tbody tr:last-child td { border-bottom: none; }
.kcrm-contact-name { color: var(--primary); font-weight: 600; text-decoration: none; }
.kcrm-contact-name:hover { color: var(--accent); }
.kcrm-unassigned { color: var(--muted); font-style: italic; font-size: 12px; }
.kcrm-empty { text-align: center; color: var(--muted); padding: 40px !important; font-size: 14px; }

/* Badges */
.kcrm-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; color: #fff; font-size: 11px; font-weight: 600; }
.kcrm-badge.large { font-size: 13px; padding: 5px 14px; }

/* Days badge */
.kcrm-days-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; background: #e2e8f0; color: var(--text); }
.kcrm-days-badge.kcrm-urgent  { background: #fee2e2; color: var(--red); }
.kcrm-days-badge.kcrm-warning { background: #fef3c7; color: #d97706; }

/* Row urgency */
tr.kcrm-urgent td  { background: #fff5f5; }
tr.kcrm-warning td { background: #fffbeb; }
td.kcrm-urgent  { color: var(--red); font-weight: 700; }
td.kcrm-warning { color: #d97706; font-weight: 600; }

/* Buttons */
.kcrm-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; border: none; background: var(--primary); color: #fff; transition: all .2s; }
.kcrm-btn:hover { background: #152f4a; color: #fff; }
.kcrm-btn.primary { background: var(--accent); color: var(--primary); }
.kcrm-btn.primary:hover { background: #d4b06a; }
.kcrm-btn.secondary { background: #f1f5f9; color: var(--primary); border: 1px solid var(--border); }
.kcrm-btn.secondary:hover { background: var(--border); color: var(--primary); }
.kcrm-btn-ghost { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; border: 1px solid var(--border); background: transparent; color: var(--muted); transition: all .2s; }
.kcrm-btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.kcrm-btn-sm { display: inline-flex; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; text-decoration: none; border: 1px solid var(--border); background: #fff; color: var(--text); transition: all .2s; }
.kcrm-btn-sm:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.kcrm-btn-sm.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.kcrm-btn-sm.danger { border-color: #fee2e2; color: var(--red); }
.kcrm-btn-sm.danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.kcrm-wa-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 6px; background: var(--wa); color: #fff; font-size: 12px; font-weight: 600; text-decoration: none; transition: all .2s; }
.kcrm-wa-btn:hover { background: #1da851; color: #fff; }
.kcrm-wa-btn.large { padding: 8px 16px; font-size: 14px; }

/* Toolbar */
.kcrm-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.kcrm-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kcrm-filters input[type=text], .kcrm-filters select { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text); background: #fff; }
.kcrm-count { font-size: 12px; color: var(--muted); font-weight: 500; }

/* Notices */
.kcrm-notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; font-weight: 500; }
.kcrm-notice.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.kcrm-notice.warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.kcrm-notice.error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* Forms */
.kcrm-form-card { max-width: 860px; }
.kcrm-form h2 { margin: 0 0 24px; font-size: 20px; font-weight: 700; color: var(--text); }
.kcrm-form-section { border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.kcrm-form-section h4 { margin: 0 0 16px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.kcrm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kcrm-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.kcrm-field.full { grid-column: 1/-1; }
.kcrm-field-wide { grid-column: 1 / -1; }
.kcrm-field label { font-size: 13px; font-weight: 600; color: var(--text); }
.kcrm-field input, .kcrm-field select, .kcrm-field textarea { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text); font-family: inherit; transition: border .2s; }
.kcrm-field input:focus, .kcrm-field select:focus, .kcrm-field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,58,92,.1); }
.kcrm-field small { font-size: 11px; color: var(--muted); }
.req { color: var(--red); }
.kcrm-form-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }

/* Detail */
.kcrm-detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
.kcrm-detail-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.kcrm-detail-header h2 { margin: 0 0 8px; font-size: 22px; font-weight: 700; }
.kcrm-detail-actions { display: flex; gap: 8px; }
.kcrm-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kcrm-info-item { background: #f8fafc; border-radius: 8px; padding: 12px; }
.kcrm-info-item.full { grid-column: 1/-1; }
.kcrm-info-item span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.kcrm-info-item strong { font-size: 14px; color: var(--text); font-weight: 600; }
.kcrm-info-item strong a { color: var(--blue); text-decoration: none; }

/* Activity */
.kcrm-activity-list { list-style: none; margin: 0; padding: 0; }
.kcrm-activity-list li { padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.kcrm-activity-list li:last-child { border-bottom: none; }
.kcrm-activity-action { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.kcrm-activity-note   { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.kcrm-activity-meta   { display: block; font-size: 11px; color: #94a3b8; margin-top: 4px; }

@media(max-width:1100px){ .kcrm-stats-grid { grid-template-columns: repeat(3,1fr); } }
@media(max-width:900px) { .kcrm-charts-row,.kcrm-detail-grid { grid-template-columns: 1fr; } .kcrm-form-row { grid-template-columns: 1fr; } }
@media(max-width:768px) { .kcrm-stats-grid { grid-template-columns: repeat(2,1fr); } .kcrm-header { flex-direction: column; padding: 12px; gap: 8px; } }

/* ── Settings ── */
.kcrm-settings-tabs { display:flex; gap:4px; border-bottom:2px solid var(--border); margin-bottom:24px; padding-bottom:0; }
.kcrm-tab { padding:10px 18px; font-size:13px; font-weight:600; color:var(--muted); text-decoration:none; border-radius:8px 8px 0 0; border:1px solid transparent; border-bottom:none; transition:all .2s; }
.kcrm-tab:hover { color:var(--primary); background:#f8fafc; }
.kcrm-tab.active { color:var(--primary); background:#fff; border-color:var(--border); border-bottom:2px solid #fff; margin-bottom:-2px; }
.kcrm-settings-section h3 { font-size:17px; font-weight:700; color:var(--text); margin:0 0 6px; }
.kcrm-settings-desc { font-size:13px; color:var(--muted); margin:0 0 20px; }
.kcrm-settings-section h4 { font-size:14px; font-weight:700; color:var(--text); margin:24px 0 12px; padding-top:20px; border-top:1px solid var(--border); }
.kcrm-muted { color:var(--muted); font-size:12px; }

/* ── Tag/Stage list ── */
.kcrm-tag-list { display:flex; flex-direction:column; gap:8px; max-width:600px; }
.kcrm-tag-row { display:flex; align-items:center; gap:8px; }
.kcrm-tag-input { flex:1; padding:8px 12px; border:1px solid var(--border); border-radius:8px; font-size:13px; color:var(--text); font-family:inherit; }
.kcrm-tag-input:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(26,58,92,.1); }
.kcrm-color-input { width:38px; height:36px; border:1px solid var(--border); border-radius:6px; cursor:pointer; padding:2px; background:#fff; }
.kcrm-stage-preview { min-width:120px; text-align:center; transition:background .2s; }
.kcrm-btn-remove { background:none; border:1px solid #fecaca; color:var(--red); border-radius:6px; padding:4px 10px; cursor:pointer; font-size:13px; font-weight:700; transition:all .2s; }
.kcrm-btn-remove:hover { background:var(--red); color:#fff; }

/* ── Inline assign ── */
.kcrm-assign-form { margin:0; }
.kcrm-assign-row { display:flex; align-items:center; gap:4px; }
.kcrm-assign-select { padding:5px 8px; border:1px solid var(--border); border-radius:6px; font-size:12px; color:var(--text); background:#fff; max-width:140px; }
.kcrm-assign-select:focus { outline:none; border-color:var(--primary); }
.kcrm-btn-assign { background:var(--green); color:#fff; border:none; border-radius:6px; padding:5px 10px; font-size:13px; font-weight:700; cursor:pointer; transition:all .2s; }
.kcrm-btn-assign:hover { background:#059669; }

/* ── Header logo ── */
.kcrm-header-logo {
    height: 26px;
    width: auto;
    filter: brightness(0) invert(1);
    display: block;
}
.kcrm-logo { display:flex; align-items:center; gap:10px; padding:10px 0; }
.kcrm-logo-sub {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 10px;
    margin-left: 2px;
}

/* ── Header user info ── */
.kcrm-header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    margin-left: 16px;
    border-left: 1px solid rgba(255,255,255,0.15);
    padding-left: 16px;
}
.kcrm-user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #e9584b;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.kcrm-user-info { display: flex; flex-direction: column; }
.kcrm-user-name { color: #fff; font-size: 13px; font-weight: 600; line-height: 1.2; }
.kcrm-user-role { color: rgba(255,255,255,0.5); font-size: 11px; }
.kcrm-logout-btn {
    color: rgba(255,255,255,0.5);
    font-size: 18px;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all .2s;
    line-height: 1;
}
.kcrm-logout-btn:hover { color: #e9584b; background: rgba(255,255,255,0.1); }

/* ── Import steps ── */
.kcrm-import-steps { display: flex; flex-direction: column; gap: 24px; max-width: 680px; }
.kcrm-import-step { display: flex; gap: 16px; align-items: flex-start; }
.kcrm-step-num {
    width: 32px; height: 32px; border-radius: 50%;
    background: #1a3a5c; color: #fff;
    font-weight: 700; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 2px;
}
.kcrm-import-step strong { display: block; font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.kcrm-import-step p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.kcrm-import-step code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 12px; color: var(--primary); }

/* ── File upload ── */
.kcrm-file-upload { position: relative; }
.kcrm-file-upload input[type=file] { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; z-index: 2; }
.kcrm-file-label {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px;
    border: 2px dashed var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
    background: #f8fafc;
}
.kcrm-file-label:hover { border-color: var(--primary); background: #f0f4f8; }
.kcrm-file-icon { font-size: 22px; }
.kcrm-file-text { font-size: 13px; color: var(--muted); font-weight: 500; }

/* ── Info box (login URL) ── */
.kcrm-info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
}
.kcrm-info-box strong { display: block; color: #1e40af; font-size: 14px; margin-bottom: 6px; }
.kcrm-info-box p { font-size: 13px; color: #3b82f6; margin-bottom: 10px; }
.kcrm-url-display { display: flex; align-items: center; gap: 10px; }
.kcrm-url-display code { flex:1; background:#fff; border:1px solid #bfdbfe; padding:8px 12px; border-radius:8px; font-size:13px; color:#1e40af; word-break:break-all; }

/* ══════════════════════════════════════════════
   FRONTEND PAGE OVERRIDES
   When CRM runs on WordPress frontend pages
   (not WP admin), reset browser/theme defaults.
   ══════════════════════════════════════════════ */

/* Full-page body reset */
body.kcrm-frontend-body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text);
}

/* ── Kill the WP admin-bar margin-top bump that applies even when bar is hidden ── */
html:has(body.kcrm-frontend-body) {
    margin-top: 0 !important;
}

/* ── Hide admin bar entirely on CRM frontend pages ── */
body.kcrm-frontend-body #wpadminbar {
    display: none !important;
}

/* ── Header always sticks to very top — no gap ── */
body.kcrm-frontend-body .kcrm-header {
    position: sticky;
    top: 0 !important;
    z-index: 1000;
}

/* ── Hide any theme header/footer/sidebars that bleed through ── */
body.kcrm-frontend-body > *:not(.kcrm-wrap):not(.kcrm-app-shell):not(script):not(style):not(#wpadminbar) {
    display: none !important;
}

/* ── CRM wrap fills viewport ── */
body.kcrm-frontend-body .kcrm-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Remove WP admin #wpcontent override (not present on frontend) ── */
body.kcrm-frontend-body #wpcontent { background: transparent; }

/* ══ Responsive nav for mobile ══ */
@media (max-width: 900px) {
    .kcrm-header {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 16px;
    }
    .kcrm-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
        flex-wrap: nowrap;
    }
    .kcrm-nav a {
        white-space: nowrap;
    }
    .kcrm-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .kcrm-charts-row {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════
   BODY LAYOUT  (main content + right sidebar)
   ══════════════════════════════════════════════ */
.kcrm-body-layout {
    display: flex;
    align-items: flex-start;
    flex: 1;
    min-height: 0;
}

.kcrm-main {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* ══════════════════════════════════════════════
   RIGHT SIDEBAR
   ══════════════════════════════════════════════ */
.kcrm-sidebar {
    width: 270px;
    flex-shrink: 0;
    padding: 20px 16px 20px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 60px;          /* sits just below the sticky header (~60px tall) */
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.kcrm-widget {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* ══════════════════════════════════════════════
   CALENDAR WIDGET
   ══════════════════════════════════════════════ */
.kcrm-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.kcrm-cal-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.kcrm-cal-nav {
    color: var(--primary);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: background .15s;
}
.kcrm-cal-nav:hover { background: var(--bg); }

/* 7-column grid */
.kcrm-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.kcrm-cal-dow {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    padding: 4px 0;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.kcrm-cal-cell {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: default;
    transition: background .15s;
    min-height: 30px;
}

.kcrm-cal-cell.empty { background: transparent; }

.kcrm-cal-cell:not(.empty):hover {
    background: var(--bg);
}

.kcrm-cal-day {
    font-size: 11px;
    font-weight: 500;
    color: var(--text);
    line-height: 1;
}

/* Today highlight */
.kcrm-cal-cell.today {
    background: var(--primary);
    border-radius: 6px;
}
.kcrm-cal-cell.today .kcrm-cal-day {
    color: #fff;
    font-weight: 700;
}
.kcrm-cal-cell.today:hover {
    background: #244d78;
}

/* Event cells — light red tint */
.kcrm-cal-cell.has-event {
    background: #fff0f0;
    cursor: pointer;
}
.kcrm-cal-cell.has-event:hover {
    background: #ffd6d6;
}
.kcrm-cal-cell.today.has-event {
    background: var(--primary);  /* today always primary */
    outline: 2px solid #ef4444;
    outline-offset: 1px;
}

/* Dots */
.kcrm-cal-dots {
    display: flex;
    gap: 2px;
    margin-top: 2px;
    justify-content: center;
}
.kcrm-cal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: inline-block;
}
.kcrm-cal-dot.followup { background: #3b82f6; }
.kcrm-cal-dot.renewal  { background: #ef4444; }

.kcrm-cal-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--muted);
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════════
   CALENDAR TOOLTIP  (hover popup)
   ══════════════════════════════════════════════ */
.kcrm-cal-tooltip {
    position: absolute;
    z-index: 9999;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    min-width: 200px;
    max-width: 260px;
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
    pointer-events: none;
    font-size: 12px;
    line-height: 1.4;
}
.kcrm-tip-row {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.kcrm-tip-row:last-child { border-bottom: none; }
.kcrm-tip-type {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 2px;
}
.kcrm-tip-name {
    font-weight: 600;
    color: #fff;
    font-size: 13px;
}
.kcrm-tip-svc {
    font-size: 11px;
    color: rgba(255,255,255,.65);
}

/* ══════════════════════════════════════════════
   TO-DO WIDGET
   ══════════════════════════════════════════════ */
.kcrm-widget-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.kcrm-todo-section {
    margin-bottom: 12px;
}
.kcrm-todo-section:last-child { margin-bottom: 0; }

.kcrm-todo-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--muted);
    margin-bottom: 6px;
}

.kcrm-todo-item {
    display: flex;
    flex-direction: column;
    padding: 7px 10px;
    border-radius: 8px;
    margin-bottom: 4px;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background .15s;
}
.kcrm-todo-item.followup {
    background: #eff6ff;
    border-left-color: #3b82f6;
}
.kcrm-todo-item.followup:hover { background: #dbeafe; }
.kcrm-todo-item.renewal {
    background: #fff0f0;
    border-left-color: #ef4444;
}
.kcrm-todo-item.renewal:hover { background: #fee2e2; }

.kcrm-todo-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kcrm-todo-svc {
    font-size: 11px;
    color: var(--muted);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kcrm-todo-date {
    font-size: 11px;
    color: var(--muted);
    margin-top: 1px;
    font-weight: 600;
}

.kcrm-todo-empty {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    padding: 8px 0;
}

.kcrm-todo-section.upcoming .kcrm-todo-item {
    opacity: .85;
}

/* ══════════════════════════════════════════════
   INLINE STAGE UPDATE  (contacts table)
   ══════════════════════════════════════════════ */
.kcrm-stage-update-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
}

.kcrm-stage-edit-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.kcrm-stage-select {
    flex: 1;
    padding: 4px 6px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #f8fafc;
    color: var(--text);
    cursor: pointer;
    max-width: 130px;
}
.kcrm-stage-select:focus { outline: 2px solid var(--primary); }

.kcrm-stage-save-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 9px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s;
    line-height: 1.4;
}
.kcrm-stage-save-btn:hover { background: #244d78; transform: scale(1.07); }
.kcrm-stage-save-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.kcrm-stage-spinner { font-size: 12px; }

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
.kcrm-footer {
    text-align: center;
    padding: 16px 24px;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.kcrm-footer strong { color: var(--primary); font-weight: 700; }
.kcrm-footer-sep { color: var(--border); font-size: 14px; }

/* ══════════════════════════════════════════════
   RESPONSIVE  sidebar collapses on small screens
   ══════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .kcrm-sidebar { width: 230px; }
}

@media (max-width: 860px) {
    .kcrm-body-layout { flex-direction: column; }
    .kcrm-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        padding: 0 16px 16px;
        flex-direction: row;
        flex-wrap: wrap;
        overflow: visible;
    }
    .kcrm-widget {
        flex: 1;
        min-width: 240px;
    }
}

/* ══════════════════════════════════════════════
   NOTES WIDGET
   ══════════════════════════════════════════════ */
.kcrm-notes-widget {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.kcrm-notes-textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    transition: border-color .2s;
    min-height: 100px;
}
.kcrm-notes-textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.kcrm-notes-save-btn {
    width: 100%;
    justify-content: center;
}
.kcrm-note-status {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    text-align: center;
}
.kcrm-note-status.success { background: #d1fae5; color: #065f46; }
.kcrm-note-status.error   { background: #fee2e2; color: #991b1b; }

/* ══════════════════════════════════════════════
   DOCUMENTS / FILE UPLOAD SECTION
   ══════════════════════════════════════════════ */
.kcrm-files-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.kcrm-files-header h3 { margin: 0; }

.kcrm-upload-panel {
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-top: 12px;
    margin-bottom: 4px;
}
.kcrm-upload-form { margin: 0; }
.kcrm-upload-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: flex-end;
}
.kcrm-field-file input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    background: #fff;
}
.kcrm-field-action { display: flex; align-items: flex-end; }

.kcrm-files-table .kcrm-file-type-badge {
    display: inline-block;
    background: #ede9fe;
    color: #5b21b6;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.kcrm-file-icon-label {
    font-size: 13px;
    color: var(--text);
}
.kcrm-files-table td { vertical-align: middle; }

/* ══════════════════════════════════════════════
   FOLLOW-UPS PAGE — STATUS BADGE
   ══════════════════════════════════════════════ */
.kcrm-days-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: #e0f2fe;
    color: #075985;
}
.kcrm-days-badge.kcrm-urgent  { background: #fee2e2; color: #991b1b; }
.kcrm-days-badge.kcrm-warning { background: #fef9c3; color: #854d0e; }

/* Overdue / warning row highlights */
tr.kcrm-urgent  td { background: #fff5f5; }
tr.kcrm-warning td { background: #fffbeb; }

/* ══════════════════════════════════════════════
   RESPONSIVE — upload row on mobile
   ══════════════════════════════════════════════ */
@media (max-width: 700px) {
    .kcrm-upload-row { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   CONTACT CARD GRID  (replaces table view)
   ═══════════════════════════════════════════════ */

.kcrm-contacts-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.kcrm-search-wrap { position: relative; display: flex; align-items: center; }
.kcrm-search-icon { position: absolute; left: 10px; font-size: 14px; pointer-events: none; }
.kcrm-contacts-toolbar input[type=text] {
    padding: 8px 10px 8px 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    min-width: 200px;
    color: var(--text);
}
.kcrm-contacts-toolbar select {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
}
.kcrm-contacts-toolbar input:focus,
.kcrm-contacts-toolbar select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,58,92,.1); }

/* Grid layout */
.kcrm-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

/* Individual card */
.kcrm-contact-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.kcrm-contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

/* Card header */
.kcrm-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid #f1f5f9;
}
.kcrm-card-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    letter-spacing: .5px;
}
.kcrm-card-identity { flex: 1; min-width: 0; }
.kcrm-card-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kcrm-card-name:hover { color: #e9584b; }
.kcrm-card-nationality { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.kcrm-card-stage { font-size: 10px !important; padding: 3px 8px !important; white-space: nowrap; }

/* Service tag */
.kcrm-card-service {
    padding: 8px 16px;
    border-bottom: 1px solid #f8fafc;
}
.kcrm-service-tag {
    display: inline-block;
    background: #eff6ff;
    color: #1e40af;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

/* Info rows */
.kcrm-card-info {
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}
.kcrm-card-info-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--muted);
}
.kcrm-card-info-row.urgent { color: var(--red); }
.kcrm-card-info-row.warning { color: #d97706; }
.kcrm-card-info-icon { font-size: 13px; flex-shrink: 0; }
.kcrm-card-badge-urgent {
    display: inline-block;
    background: #fee2e2;
    color: var(--red);
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
}
.kcrm-card-badge-warning {
    display: inline-block;
    background: #fef3c7;
    color: #d97706;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

/* Meta row (assign + files) */
.kcrm-card-meta {
    padding: 10px 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.kcrm-card-assign { flex: 1; }
.kcrm-card-agent { font-size: 12px; color: var(--muted); }
.kcrm-card-files-badge {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Action buttons row */
.kcrm-card-actions {
    display: flex;
    gap: 6px;
    padding: 10px 16px 14px;
    flex-wrap: wrap;
}
.kcrm-card-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all .15s;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
}
.kcrm-card-action-btn:hover { background: #f8fafc; color: var(--primary); border-color: var(--primary); }
.kcrm-card-action-btn.view    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.kcrm-card-action-btn.edit    { background: #f5f3ff; color: #7c3aed; border-color: #ddd6fe; }
.kcrm-card-action-btn.whatsapp { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.kcrm-card-action-btn.download { background: #fffbeb; color: #d97706; border-color: #fde68a; }
.kcrm-card-action-btn.delete  { background: #fef2f2; color: var(--red); border-color: #fecaca; }
.kcrm-card-action-btn:hover.view    { background: #dbeafe; }
.kcrm-card-action-btn:hover.delete  { background: #fee2e2; }

/* Empty state */
.kcrm-empty-state {
    text-align: center;
    padding: 60px 20px;
}
.kcrm-empty-icon { font-size: 48px; margin-bottom: 12px; }
.kcrm-empty-state p { color: var(--muted); font-size: 15px; margin-bottom: 16px; }

/* ═══════════════════════════════════════════════
   INLINE FILE UPLOAD in contact form
   ═══════════════════════════════════════════════ */
.kcrm-form-hint { font-size: 13px; color: var(--muted); margin: -8px 0 12px; }

.kcrm-file-upload-inline { position: relative; }
.kcrm-file-upload-inline input[type=file] {
    position: absolute; opacity: 0; width: 100%; height: 100%;
    cursor: pointer; z-index: 2; top: 0; left: 0;
}
.kcrm-file-label-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1.5px dashed var(--border);
    border-radius: 8px;
    cursor: pointer;
    background: #f8fafc;
    transition: all .2s;
}
.kcrm-file-label-inline:hover { border-color: var(--primary); background: #f0f4f8; }
.kcrm-file-name-display { font-size: 13px; color: var(--muted); }

/* Existing files in edit form */
.kcrm-existing-files { margin-top: 14px; }
.kcrm-existing-files label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.kcrm-files-list { display: flex; flex-direction: column; gap: 6px; }
.kcrm-file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
}
.kcrm-file-badge {
    background: #eff6ff;
    color: #1e40af;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
}
.kcrm-file-row-name { flex: 1; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcrm-file-row-date { color: var(--muted); white-space: nowrap; font-size: 11px; }

@media (max-width: 768px) {
    .kcrm-contact-grid { grid-template-columns: 1fr; }
    .kcrm-contacts-toolbar { flex-direction: column; align-items: stretch; }
}

/* ═══════════════════════════════════
   REPORTS — progress bars & labels
   ═══════════════════════════════════ */
.kcrm-report-sub {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
    margin-left: 6px;
}
.kcrm-progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}
.kcrm-progress-bar {
    height: 8px;
    border-radius: 4px;
    min-width: 4px;
    transition: width .3s;
    flex-shrink: 0;
}
.kcrm-progress-wrap span {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    font-weight: 600;
}

/* Dashboard followup card tweak */
.kcrm-followup-card { border-left: 3px solid #8b5cf6; }

/* ══════════════════════════════════════════════
   HEADER — COMPANY NAME + RIGHT GROUP
   ══════════════════════════════════════════════ */

/* Wrap company chip + user block together on the right */
.kcrm-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Company chip */
.kcrm-header-company {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 30px;
    padding: 4px 12px 4px 8px;
    max-width: 180px;
    overflow: hidden;
}

.kcrm-company-icon {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.kcrm-company-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: .1px;
}

/* Divider between company chip and user block */
.kcrm-header-right .kcrm-header-user {
    border-left: 1px solid rgba(255,255,255,.15);
    padding-left: 8px;
    gap: 7px;
}

/* ══════════════════════════════════════════════
   SETTINGS — COMPANY TAB
   ══════════════════════════════════════════════ */

/* Section sub-label inside the form */
.kcrm-company-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--muted);
    margin: 20px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.kcrm-company-section-label:first-of-type {
    margin-top: 4px;
}

/* Preview card shown after saving */
.kcrm-company-preview {
    margin-top: 28px;
}
.kcrm-company-preview-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 10px;
}
.kcrm-company-preview-card {
    background: linear-gradient(135deg, var(--primary) 0%, #244d78 100%);
    border-radius: 12px;
    padding: 20px 24px;
    color: #fff;
    max-width: 480px;
}
.kcrm-co-preview-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
}
.kcrm-co-preview-tag {
    font-size: 12px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: .2px;
}
.kcrm-co-preview-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.kcrm-co-preview-details span {
    font-size: 12px;
    color: rgba(255,255,255,.80);
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

/* Responsive — collapse company chip on smaller screens */
@media (max-width: 1100px) {
    .kcrm-header-company { max-width: 160px; }
}
@media (max-width: 860px) {
    .kcrm-header-company { display: none; }
}

/* ══════════════════════════════════════════════
   DASHBOARD — KPI CARDS  (replaces stat-grid)
   ══════════════════════════════════════════════ */
.kcrm-dashboard { padding: 20px 24px; }

.kcrm-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.kcrm-kpi-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px 14px;
    border-top: 3px solid var(--kpi-color, #3b82f6);
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: box-shadow .2s, transform .2s;
}
.kcrm-kpi-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.11);
    transform: translateY(-2px);
}

.kcrm-kpi-left { flex: 1; min-width: 0; }

.kcrm-kpi-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--kpi-color, #1a3a5c);
    line-height: 1;
    margin-bottom: 4px;
}

.kcrm-kpi-label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.kcrm-kpi-sub {
    font-size: 10px;
    color: var(--muted);
    margin-top: 3px;
}
.kcrm-kpi-alert {
    color: #ef4444 !important;
    font-weight: 600;
}

.kcrm-kpi-icon {
    font-size: 22px;
    opacity: .75;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   DASHBOARD — 4-CHART GRID
   ══════════════════════════════════════════════ */
.kcrm-charts-4grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.kcrm-chart-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}
.kcrm-chart-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,.10);
}

.kcrm-chart-header {
    padding: 12px 16px 8px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.kcrm-chart-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.kcrm-chart-subtitle {
    font-size: 11px;
    color: var(--muted);
}

.kcrm-chart-body {
    padding: 12px 14px 14px;
    /* Fixed height so all 4 charts are the same size */
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.kcrm-chart-body canvas {
    max-height: 166px !important;
}

/* ══════════════════════════════════════════════
   DASHBOARD — FOLLOW-UPS TODAY CARD
   ══════════════════════════════════════════════ */
.kcrm-followup-today-card { padding: 16px 20px; }

.kcrm-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.kcrm-card-title-row h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.kcrm-title-sub {
    font-size: 11px;
    color: var(--muted);
    font-weight: 400;
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 20px;
}

/* Tight contact card grid */
.kcrm-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
}

.kcrm-contact-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .15s, transform .15s;
}
.kcrm-contact-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,.10);
    transform: translateY(-1px);
}

.kcrm-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 8px;
}

.kcrm-card-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kcrm-card-identity { flex: 1; min-width: 0; }

.kcrm-card-name {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kcrm-card-name:hover { color: var(--primary); text-decoration: underline; }

.kcrm-card-nationality {
    font-size: 10px;
    color: var(--muted);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kcrm-card-stage {
    font-size: 9px !important;
    padding: 3px 7px !important;
    flex-shrink: 0;
    white-space: nowrap;
}

.kcrm-card-actions {
    display: flex;
    gap: 5px;
    padding: 8px 12px 10px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    background: #fff;
}

.kcrm-card-action-btn {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .15s;
}
.kcrm-card-action-btn:hover { opacity: .80; }
.kcrm-card-action-btn.call     { background: #eff6ff; color: #3b82f6; }
.kcrm-card-action-btn.whatsapp { background: #f0fdf4; color: #16a34a; }
.kcrm-card-action-btn.view     { background: #f5f3ff; color: #7c3aed; }
.kcrm-card-agent { font-size: 10px; color: var(--muted); align-self: center; }

/* ══════════════════════════════════════════════
   RESPONSIVE — dashboard
   ══════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .kcrm-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
    .kcrm-kpi-grid     { grid-template-columns: repeat(2, 1fr); }
    .kcrm-charts-4grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
    .kcrm-kpi-grid { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════
   VIEW TOGGLE BUTTONS  (card ⊞ / list ≡)
   ══════════════════════════════════════════════ */
.kcrm-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.kcrm-view-toggle {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.kcrm-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--muted);
    transition: background .15s, color .15s;
    padding: 0;
}
.kcrm-view-btn:hover {
    background: #e2e8f0;
    color: var(--primary);
}
.kcrm-view-btn.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

/* ══ List view avatar cell ══ */
.kcrm-list-contact-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}
.kcrm-list-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* Icon button styles moved to nav dropdown system */

/* ── Notification dropdown ── */
.kcrm-notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 9999;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.kcrm-notif-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}
.kcrm-notif-list { max-height: 320px; overflow-y: auto; }
.kcrm-notif-empty {
    padding: 24px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}
.kcrm-notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.12s;
}
.kcrm-notif-item:hover { background: #f8fafc; }
.kcrm-notif-title { font-size: 13px; color: #1e293b; margin-bottom: 2px; }
.kcrm-notif-sub   { font-size: 12px; color: #64748b; margin-bottom: 2px; }
.kcrm-notif-time  { font-size: 11px; color: #94a3b8; }

/* ════════════════════════════════════════════════════════════
   TEAM CHAT PANEL (WhatsApp-style)
   ════════════════════════════════════════════════════════════ */
.kcrm-tchat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 9990;
}
.kcrm-tchat-panel {
    position: fixed;
    bottom: 0; right: 0;
    width: min(780px, 100vw);
    height: min(560px, 92vh);
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 40px rgba(0,0,0,0.2);
    z-index: 9991;
    display: flex;
    overflow: hidden;
}

/* ── Sidebar (user list) ── */
.kcrm-tchat-sidebar {
    width: 240px;
    min-width: 240px;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}
.kcrm-tchat-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
}
.kcrm-tchat-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #94a3b8;
    padding: 4px 6px;
    border-radius: 6px;
    line-height: 1;
}
.kcrm-tchat-close:hover { background: #e2e8f0; }
.kcrm-tchat-userlist { flex: 1; overflow-y: auto; padding: 8px 0; }
.kcrm-tchat-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.12s;
    border-radius: 8px;
    margin: 2px 6px;
    position: relative;
}
.kcrm-tchat-user:hover  { background: #e8f0fe; }
.kcrm-tchat-user.active { background: #dbeafe; }
.kcrm-tchat-user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
    flex-shrink: 0;
}
.kcrm-tchat-user-name { font-size: 13px; font-weight: 500; color: #1e293b; flex: 1; }
.kcrm-tchat-unread-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #ef4444;
    flex-shrink: 0;
}

/* ── Main chat area ── */
.kcrm-tchat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.kcrm-tchat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    gap: 8px;
}
.kcrm-tchat-empty span { font-size: 40px; }
.kcrm-tchat-empty p   { font-size: 14px; margin: 0; }
.kcrm-tchat-conv { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.kcrm-tchat-conv-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}
.kcrm-tchat-conv-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
    flex-shrink: 0;
}
.kcrm-tchat-conv-name { font-weight: 600; font-size: 14px; color: #1e293b; }
.kcrm-tchat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #f0f4f8;
}
.kcrm-tchat-msg { display: flex; flex-direction: column; max-width: 72%; }
.kcrm-tchat-msg.mine    { align-self: flex-end; align-items: flex-end; }
.kcrm-tchat-msg.theirs  { align-self: flex-start; align-items: flex-start; }
.kcrm-tchat-bubble {
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.45;
    word-break: break-word;
    max-width: 100%;
}
.kcrm-tchat-msg.mine .kcrm-tchat-bubble {
    background: #1a3a5c;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.kcrm-tchat-msg.theirs .kcrm-tchat-bubble {
    background: #fff;
    color: #1e293b;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.kcrm-tchat-time { font-size: 10px; color: #94a3b8; margin-top: 2px; padding: 0 4px; }
.kcrm-tchat-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
    align-items: flex-end;
}
.kcrm-tchat-input-row textarea {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    resize: none;
    outline: none;
    font-family: inherit;
    max-height: 100px;
    line-height: 1.4;
}
.kcrm-tchat-input-row textarea:focus { border-color: #1a3a5c; }
.kcrm-tchat-send-btn {
    background: #1a3a5c;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 38px; height: 38px;
    cursor: pointer;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}
.kcrm-tchat-send-btn:hover { background: #2a4f7c; }

/* ════════════════════════════════════════════════════════════
   24-HOUR WINDOW BANNER + TEMPLATE MODAL
   ════════════════════════════════════════════════════════════ */
.kaa-24hr-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: #fff7ed;
    border-top: 2px solid #f97316;
    font-size: 12.5px;
    color: #9a3412;
    flex-shrink: 0;
}
.kaa-24hr-banner span { flex: 1; }

.kaa-tpl-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9995;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.kaa-tpl-modal-box {
    background: #fff;
    border-radius: 14px;
    width: min(520px, 100%);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.22);
}
.kaa-tpl-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 15px;
}
.kaa-tpl-modal-body {
    overflow-y: auto;
    padding: 16px 20px;
    flex: 1;
}
.kaa-tpl-list { display: flex; flex-direction: column; gap: 10px; }
.kaa-tpl-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.kaa-tpl-name {
    font-weight: 600;
    font-size: 13px;
    color: #1e293b;
}
.kaa-tpl-body {
    font-size: 12.5px;
    color: #64748b;
    white-space: pre-wrap;
    word-break: break-word;
}



/* ── Mobile: hide chat panel sidebar on small screens ── */
@media (max-width: 600px) {
    .kcrm-tchat-panel { width: 100vw; height: 92vh; border-radius: 16px 16px 0 0; }
    .kcrm-tchat-sidebar { display: none; }
    .kcrm-tchat-conv { display: flex !important; }
}

/* ════════════════════════════════════════════════════════════
   NAV DROPDOWN SYSTEM — Notifications, Chat, More (⋯)
   ════════════════════════════════════════════════════════════ */

/* Wrapper for any nav item that has a dropdown */
.kcrm-nav-dropdown-wrap {
    position: relative;
}

/* Utility nav link style (Notifications, Chat) — same as regular nav links */
.kcrm-nav-util {
    color: rgba(255,255,255,.72);
    text-decoration: none;
    padding: 6px 11px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 500;
    transition: all .18s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}
.kcrm-nav-util:hover,
.kcrm-nav-util.active { color: #fff; background: rgba(255,255,255,.13); }

/* Badge on Notifications / Chat nav items */
.kcrm-notif-badge,
.kcrm-chat-badge {
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Base dropdown panel */
.kcrm-nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 300px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 9999;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

/* ── Notification dropdown ── */
.kcrm-notif-header,
.kcrm-chat-menu-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}
.kcrm-notif-list { max-height: 320px; overflow-y: auto; }
.kcrm-notif-empty {
    padding: 24px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}
.kcrm-notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.12s;
    cursor: default;
}
.kcrm-notif-item:hover { background: #f8fafc; }
.kcrm-notif-title { font-size: 13px; color: #1e293b; margin-bottom: 2px; }
.kcrm-notif-sub   { font-size: 12px; color: #64748b; margin-bottom: 2px; }
.kcrm-notif-time  { font-size: 11px; color: #94a3b8; }

/* ── Chat menu dropdown ── */
.kcrm-chat-menu { min-width: 220px; }
.kcrm-chat-menu-users { max-height: 280px; overflow-y: auto; padding: 6px 0; }
/* Reuse .kcrm-tchat-user styles from team chat panel */

/* ── More (⋯) dropdown ── */
.kcrm-more-dropdown { min-width: 160px; padding: 6px 0; }
.kcrm-more-item {
    display: block;
    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 500;
    color: #1e293b;
    text-decoration: none;
    transition: background 0.12s;
}
.kcrm-more-item:hover  { background: #f1f5f9; color: #1e293b; }
.kcrm-more-item.active { background: #dbeafe; color: #1a3a5c; font-weight: 600; }

/* ⋯ button styling */
#kcrm-more-btn {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 10px;
}


/* ===== Premium SaaS Layout Upgrade ===== */
:root {
  --kcrm-sidebar-bg:#0b1f3a;
  --kcrm-sidebar-bg-2:#10284b;
  --kcrm-sidebar-text:#e7eef9;
  --kcrm-sidebar-muted:rgba(231,238,249,.58);
  --kcrm-sidebar-active:#173766;
  --kcrm-sidebar-border:rgba(255,255,255,.08);
  --kcrm-header-bg:#eef3f9;
  --kcrm-header-border:#d9e4ef;
  --kcrm-header-chip:#ffffff;
  --kcrm-app-bg:#f3f7fb;
  --kcrm-content-max:calc(100vw - 290px);
}
body.kcrm-frontend-body{background:var(--kcrm-app-bg)!important;color:#0f172a;}
body.kcrm-frontend-body .kcrm-wrap{margin-top:0!important;padding-top:0!important;}
.kcrm-app-shell{display:flex;min-height:100vh;background:var(--kcrm-app-bg);}
.kcrm-app-sidebar{position:fixed;left:0;top:0;bottom:0;width:266px;background:linear-gradient(180deg,var(--kcrm-sidebar-bg) 0%, #0d2444 100%);color:var(--kcrm-sidebar-text);z-index:1000;border-right:1px solid var(--kcrm-sidebar-border);box-shadow:0 10px 30px rgba(2,12,27,.22);display:flex;flex-direction:column;transition:transform .25s ease,width .25s ease;}
.kcrm-sidebar-brand{padding:22px 22px 18px;border-bottom:1px solid var(--kcrm-sidebar-border);}
.kcrm-sidebar-brand-logo-wrap{display:flex;align-items:center;gap:12px;min-height:34px;}
.kcrm-sidebar-brand-logo{height:28px;width:auto;filter:brightness(0) invert(1);display:block;}
.kcrm-sidebar-brand-divider{width:1px;height:22px;background:rgba(255,255,255,.22);}
.kcrm-sidebar-brand-text{font-size:12px;letter-spacing:2px;font-weight:800;color:#fff;text-transform:uppercase;}
.kcrm-sidebar-scroll{padding:18px 14px 24px;overflow:auto;}
.kcrm-side-group + .kcrm-side-group{margin-top:16px;}
.kcrm-side-title{padding:0 10px 8px;font-size:12px;font-weight:800;letter-spacing:1.2px;text-transform:uppercase;color:var(--kcrm-sidebar-muted);}
.kcrm-side-links{display:flex;flex-direction:column;gap:4px;}
.kcrm-side-link{display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:12px;color:var(--kcrm-sidebar-text);text-decoration:none;font-weight:600;font-size:14px;transition:background .18s ease,transform .18s ease,box-shadow .18s ease;position:relative;}
.kcrm-side-link:hover{background:rgba(255,255,255,.08);transform:translateX(2px);color:#fff;}
.kcrm-side-link.active{background:linear-gradient(135deg, rgba(255,255,255,.14), rgba(42,93,170,.28));box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);color:#fff;}
.kcrm-side-link.active:before{content:'';position:absolute;left:-2px;top:10px;bottom:10px;width:4px;border-radius:12px;background:#dce9ff;}
.kcrm-side-icon{width:22px;text-align:center;font-size:16px;flex:0 0 22px;display:inline-flex;align-items:center;justify-content:center;}
.kcrm-side-icon svg{width:18px;height:18px;display:block;}
.kcrm-side-icon--customer{color:#60a5fa;}
.kcrm-side-link.active .kcrm-side-icon--customer{color:#93c5fd;}
.kcrm-side-chat-dot{width:8px;height:8px;border-radius:999px;background:#22c55e;margin-left:auto;box-shadow:0 0 0 6px rgba(34,197,94,.12);}
.kcrm-side-inbox-dot{min-width:18px;height:18px;border-radius:999px;background:#ef4444;color:#fff;font-size:10px;font-weight:700;margin-left:auto;display:inline-flex;align-items:center;justify-content:center;padding:0 5px;box-shadow:0 0 0 3px rgba(239,68,68,.2);animation:kcrm-inbox-pulse 2s ease infinite;}
@keyframes kcrm-inbox-pulse{0%,100%{box-shadow:0 0 0 3px rgba(239,68,68,.2);}50%{box-shadow:0 0 0 6px rgba(239,68,68,.08);}}
.kcrm-mobile-sidebar-backdrop{display:none;position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:999;backdrop-filter:blur(2px);}
.kcrm-content-shell{margin-left:266px;min-width:0;flex:1;display:flex;flex-direction:column;}
.kcrm-topbar{position:sticky;top:0;z-index:980;height:78px;display:grid;grid-template-columns:auto minmax(260px,1fr) auto;gap:18px;align-items:center;padding:16px 24px;background:rgba(238,243,249,.94);backdrop-filter:blur(12px);border-bottom:1px solid var(--kcrm-header-border);}
.kcrm-topbar-left,.kcrm-topbar-right{display:flex;align-items:center;gap:14px;min-width:0;}
.kcrm-topbar-center{min-width:0;}
.kcrm-topbar-brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:#0f172a;font-weight:800;}
.kcrm-topbar-brand .kcrm-header-logo{height:28px;width:auto;display:block;filter:none;}
.kcrm-topbar-brand-logo{height:26px;max-height:26px;max-width:148px;width:auto;display:block;filter:none;object-fit:contain;flex:0 0 auto;}
.kcrm-brand-divider{width:1px;height:20px;background:#b6c5d7;}
.kcrm-topbar-brand-text{font-size:12px;letter-spacing:2px;text-transform:uppercase;color:#1e3a5f;}
.kcrm-topbar-toggle{width:42px;height:42px;border:none;border-radius:12px;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.06);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;cursor:pointer;}
.kcrm-topbar-toggle span{width:18px;height:2px;background:#183153;border-radius:4px;display:block;}
.kcrm-global-search-form{position:relative;display:flex;align-items:center;}
.kcrm-global-search-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);font-size:14px;opacity:.7;pointer-events:none;}
.kcrm-global-search{width:100%;height:46px;border-radius:14px;border:1px solid #d7e2ed;background:#fff;padding:0 16px 0 42px;font-size:14px;color:#0f172a;box-shadow:0 1px 2px rgba(15,23,42,.03);}
.kcrm-global-search:focus{outline:none;border-color:#91b1d5;box-shadow:0 0 0 4px rgba(37,99,235,.08);}
.kcrm-header-add-btn{display:inline-flex;align-items:center;justify-content:center;height:44px;padding:0 16px;border-radius:12px;background:#173766;color:#fff;text-decoration:none;font-weight:700;box-shadow:0 10px 20px rgba(23,55,102,.15);white-space:nowrap;}
.kcrm-header-add-btn:hover{background:#102d56;color:#fff;}
.kcrm-header-icon-wrap{position:relative;}
.kcrm-header-icon-btn{position:relative;width:44px;height:44px;border:1px solid #d7e2ed;background:#fff;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 1px 2px rgba(15,23,42,.04);}
.kcrm-header-icon{font-size:17px;line-height:1;}
.kcrm-header-company-pill{display:flex;align-items:center;gap:8px;height:44px;padding:0 14px;border-radius:12px;background:#1a3a5c;border:1px solid #0f2440;color:#ffffff;max-width:220px;}
.kcrm-company-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:700;}
.kcrm-profile-dropdown{position:relative;}
.kcrm-profile-trigger{height:48px;border:none;background:#fff;border-radius:14px;padding:6px 10px 6px 8px;display:flex;align-items:center;gap:10px;cursor:pointer;border:1px solid #d7e2ed;box-shadow:0 1px 2px rgba(15,23,42,.04);}
.kcrm-profile-meta{display:flex;flex-direction:column;align-items:flex-start;line-height:1.15;min-width:0;}
.kcrm-profile-caret{font-size:12px;color:#64748b;}
.kcrm-user-avatar{width:34px;height:34px;border-radius:12px;background:#173766;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:800;box-shadow:none;}
.kcrm-user-name{font-size:13px;font-weight:700;color:#0f172a;max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.kcrm-user-role{font-size:11px;color:#64748b;}
.kcrm-profile-menu{position:absolute;right:0;top:56px;min-width:220px;background:#fff;border:1px solid #dbe4ee;border-radius:16px;box-shadow:0 20px 30px rgba(15,23,42,.12);padding:10px;z-index:1005;}
.kcrm-profile-menu-head{padding:8px 10px 10px;border-bottom:1px solid #edf2f7;margin-bottom:6px;display:flex;flex-direction:column;gap:4px;}
.kcrm-profile-menu-head span{font-size:12px;color:#64748b;word-break:break-word;}
.kcrm-profile-menu a{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:10px;color:#0f172a;text-decoration:none;font-weight:600;}
.kcrm-profile-menu a:hover{background:#f5f8fb;}
.kcrm-main-content-area{padding:24px;min-width:0;}
.kcrm-page{max-width:none;}
.kcrm-footer{margin-top:auto;margin-left:0;background:transparent;border-top:1px solid #dbe4ee;padding:16px 24px 22px;color:#64748b;}
.kcrm-notif-badge,.kcrm-chat-badge{position:absolute;top:7px;right:7px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#ef4444;color:#fff;font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center;line-height:1;}
.kcrm-nav-dropdown{position:absolute;right:0;top:54px;background:#fff;border:1px solid #dbe4ee;border-radius:16px;box-shadow:0 20px 30px rgba(15,23,42,.14);overflow:hidden;z-index:1004;}
.kcrm-notif-dropdown{width:320px;}
.kcrm-notif-header{padding:14px 16px;border-bottom:1px solid #edf2f7;background:#f9fbfd;color:#0f172a;}
.kcrm-notif-list{max-height:360px;overflow:auto;}
.kcrm-notif-empty,.kcrm-notif-item{padding:14px 16px;font-size:13px;color:#475569;}
.kcrm-notif-item + .kcrm-notif-item{border-top:1px solid #f1f5f9;}
.kcrm-notif-item.unread{background:#eff6ff;}
body.kcrm-sidebar-collapsed .kcrm-app-sidebar{width:88px;}
body.kcrm-sidebar-collapsed .kcrm-content-shell{margin-left:88px;}
body.kcrm-sidebar-collapsed .kcrm-side-title,body.kcrm-sidebar-collapsed .kcrm-sidebar-brand-text,body.kcrm-sidebar-collapsed .kcrm-sidebar-brand-divider,body.kcrm-sidebar-collapsed .kcrm-side-label{display:none;}
body.kcrm-sidebar-collapsed .kcrm-side-link{justify-content:center;padding-left:10px;padding-right:10px;}
body.kcrm-sidebar-collapsed .kcrm-sidebar-brand-logo-wrap{justify-content:center;}
body.kcrm-sidebar-collapsed .kcrm-side-chat-dot{position:absolute;right:10px;top:12px;}
body.kcrm-sidebar-collapsed .kcrm-side-inbox-dot{position:absolute;right:6px;top:6px;min-width:16px;height:16px;font-size:9px;padding:0 3px;}
.kaa-inbox-layout{padding:24px;}
@media(max-width:1180px){.kcrm-topbar{grid-template-columns:auto 1fr auto;}.kcrm-header-company-pill{display:none;}}
@media(max-width:1024px){.kcrm-app-sidebar{transform:translateX(-100%);}.kcrm-content-shell{margin-left:0;}.kcrm-mobile-sidebar-backdrop.active{display:block;}body.kcrm-mobile-sidebar-open .kcrm-app-sidebar{transform:translateX(0);}body.kcrm-sidebar-collapsed .kcrm-app-sidebar{width:266px;}body.kcrm-sidebar-collapsed .kcrm-content-shell{margin-left:0;}}
@media(max-width:820px){.kcrm-topbar{grid-template-columns:auto 1fr;gap:12px;height:auto;padding:14px 16px;}.kcrm-topbar-center{grid-column:1 / -1;order:3;}.kcrm-topbar-right{gap:10px;justify-content:flex-end;}.kcrm-profile-meta,.kcrm-topbar-brand{display:none;}.kcrm-header-add-btn{padding:0 12px;height:40px;font-size:13px;}.kcrm-main-content-area,.kaa-inbox-layout{padding:16px;}}
@media(max-width:640px){.kcrm-header-add-btn{display:none;}.kcrm-topbar-right{gap:8px;}.kcrm-profile-trigger{padding-right:8px;}.kcrm-profile-caret{display:none;}.kcrm-notif-dropdown{width:min(320px,calc(100vw - 32px));right:-84px;}.kcrm-main-content-area,.kaa-inbox-layout{padding:14px;}}


/* === Fine tune premium shell + right widgets === */
.kcrm-app-sidebar{width:238px;}
.kcrm-content-shell{margin-left:238px;}
.kcrm-sidebar-brand{padding:22px 16px 14px;}
.kcrm-sidebar-brand-text{font-size:12px;letter-spacing:.3px;}
.kcrm-side-title{font-size:12px;letter-spacing:1.3px;margin-bottom:8px;}
.kcrm-side-links{gap:3px;}
.kcrm-side-link{gap:10px;padding:9px 10px;border-radius:10px;font-size:14px;}
.kcrm-side-icon{font-size:15px;}
.kcrm-side-label{font-size:14px;}
.body.kcrm-sidebar-collapsed .kcrm-app-sidebar{width:78px;}
body.kcrm-sidebar-collapsed .kcrm-content-shell{margin-left:78px;}

.kcrm-topbar{height:70px;padding:12px 20px;grid-template-columns:auto minmax(220px,1fr) auto;}
.kcrm-topbar-brand-text{font-size:11px;}
.kcrm-header-add-btn{height:34px;padding:0 11px;border-radius:10px;font-size:11px;font-weight:700;letter-spacing:.2px;box-shadow:0 6px 14px rgba(23,55,102,.12);}
.kcrm-header-icon-btn{width:34px;height:34px;border-radius:10px;}
.kcrm-header-icon{font-size:14px;}
.kcrm-header-company-pill{height:34px;padding:0 10px;border-radius:10px;font-size:11px;background:#1a3a5c;border-color:#0f2440;color:#ffffff;}
.kcrm-company-name{max-width:140px;font-size:11px;}
.kcrm-profile-trigger{padding:4px 8px 4px 4px;border-radius:12px;gap:8px;}
.kcrm-user-avatar{width:30px;height:30px;font-size:12px;}
.kcrm-profile-meta{gap:1px;}
.kcrm-user-name{font-size:11px;}
.kcrm-user-role{font-size:10px;}
.kcrm-profile-caret{font-size:10px;}
.kcrm-profile-menu{top:46px;min-width:184px;border-radius:12px;padding:7px;}
.kcrm-profile-menu-head{padding:6px 8px 8px;margin-bottom:4px;gap:3px;}
.kcrm-profile-menu-head strong{font-size:12px;}
.kcrm-profile-menu-head span{font-size:10px;}
.kcrm-profile-menu a{padding:8px 9px;border-radius:9px;font-size:11px;gap:7px;}

.kcrm-main-content-area{padding:18px 18px 18px 20px;}
.kcrm-right-widgets{width:248px;padding:18px 14px 18px 0;top:78px;max-height:calc(100vh - 78px);}
.kcrm-widget{border-radius:14px;padding:14px;}
.kcrm-widget-title,.kcrm-cal-title{font-size:12px;}
.kcrm-todo-name{font-size:11px;}
.kcrm-todo-svc,.kcrm-todo-date,.kcrm-todo-empty{font-size:10px;}
.kcrm-todo-item{padding:6px 9px;border-radius:7px;}
.kcrm-cal-day{font-size:10px;}
.kcrm-cal-cell{min-height:28px;}

@media(max-width:1180px){.kcrm-right-widgets{width:228px;}}
@media(max-width:1024px){.kcrm-app-sidebar{width:238px;}body.kcrm-sidebar-collapsed .kcrm-app-sidebar{width:238px;}.kcrm-right-widgets{width:100%;position:static;max-height:none;padding:0 18px 18px;}}
@media(max-width:820px){.kcrm-topbar{padding:12px 14px;}.kcrm-header-add-btn{font-size:10px;height:32px;padding:0 10px;}.kcrm-main-content-area{padding:14px;}.kcrm-right-widgets{padding:0 14px 14px;}}


/* === Header full-width + sidebar below header === */
:root{
  --kcrm-topbar-h:64px;
  --kcrm-sidebar-w:220px;
  --kcrm-sidebar-w-collapsed:72px;
}
.kcrm-app-shell{display:flex;min-height:100vh;background:var(--kcrm-app-bg);}
.kcrm-topbar{
  position:fixed !important;
  top:0;
  left:0;
  right:0;
  z-index:1200;
  height:var(--kcrm-topbar-h);
  min-height:var(--kcrm-topbar-h);
  padding:10px 16px;
  grid-template-columns:auto minmax(220px,1fr) auto;
  box-shadow:0 8px 24px rgba(15,23,42,.08);
}
.kcrm-app-sidebar{
  top:var(--kcrm-topbar-h);
  width:var(--kcrm-sidebar-w);
  z-index:1000;
}
.kcrm-content-shell{
  margin-left:var(--kcrm-sidebar-w);
  min-height:100vh;
  padding-top:var(--kcrm-topbar-h);
}
.kcrm-sidebar-brand{padding:14px 14px 10px;}
.kcrm-sidebar-brand-logo-wrap{min-height:26px;}
.kcrm-sidebar-brand-text{font-size:11px;letter-spacing:.25px;}
.kcrm-sidebar-scroll{padding:12px 10px 18px;}
.kcrm-side-group + .kcrm-side-group{margin-top:12px;}
.kcrm-side-title{padding:0 8px 6px;font-size:12px;letter-spacing:1px;}
.kcrm-side-link{gap:8px;padding:8px 9px;border-radius:9px;font-size:14px;}
.kcrm-side-icon{width:18px;flex:0 0 18px;font-size:15px;}
.kcrm-side-label{font-size:14px;}
.kcrm-topbar-brand-text{font-size:10px;letter-spacing:1.5px;}
.kcrm-topbar-toggle{width:34px;height:34px;border-radius:10px;}
.kcrm-topbar-toggle span{width:15px;}
.kcrm-global-search{height:38px;border-radius:12px;font-size:13px;}
.kcrm-global-search-icon{left:12px;font-size:13px;}
.kcrm-header-add-btn{height:30px;padding:0 10px;border-radius:9px;font-size:10px;font-weight:700;}
.kcrm-header-icon-btn{width:30px;height:30px;border-radius:9px;}
.kcrm-header-icon{font-size:13px;}
.kcrm-header-company-pill{height:30px;padding:0 9px;border-radius:9px;background:#1a3a5c;border-color:#0f2440;color:#ffffff;}
.kcrm-company-name{font-size:10px;max-width:120px;}
.kcrm-profile-trigger{height:32px;padding:3px 7px 3px 3px;border-radius:10px;gap:6px;}
.kcrm-user-avatar{width:26px;height:26px;border-radius:9px;font-size:11px;}
.kcrm-user-name{font-size:10px;max-width:92px;}
.kcrm-user-role{font-size:9px;}
.kcrm-profile-caret{font-size:9px;}
.kcrm-profile-menu{top:38px;min-width:168px;padding:6px;border-radius:10px;}
.kcrm-profile-menu-head strong{font-size:11px;}
.kcrm-profile-menu-head span{font-size:9px;}
.kcrm-profile-menu a{padding:7px 8px;font-size:10px;border-radius:8px;}
.kcrm-body-layout{align-items:flex-start;}
.kcrm-main-content-area{padding:16px 16px 16px 18px;}
.kcrm-right-widgets{
  top:calc(var(--kcrm-topbar-h) + 8px);
  max-height:calc(100vh - var(--kcrm-topbar-h) - 8px);
  padding:16px 12px 16px 0;
}
body.kcrm-sidebar-collapsed .kcrm-app-sidebar{width:var(--kcrm-sidebar-w-collapsed);}
body.kcrm-sidebar-collapsed .kcrm-content-shell{margin-left:var(--kcrm-sidebar-w-collapsed);}
@media(max-width:1024px){
  .kcrm-topbar{padding:10px 12px;}
  .kcrm-app-sidebar{width:var(--kcrm-sidebar-w);top:var(--kcrm-topbar-h);transform:translateX(-100%);} 
  .kcrm-content-shell{margin-left:0;padding-top:var(--kcrm-topbar-h);} 
  body.kcrm-sidebar-collapsed .kcrm-app-sidebar{width:var(--kcrm-sidebar-w);} 
  body.kcrm-sidebar-collapsed .kcrm-content-shell{margin-left:0;} 
  .kcrm-right-widgets{width:100%;position:static;max-height:none;padding:0 14px 14px;} 
}
@media(max-width:820px){
  :root{--kcrm-topbar-h:58px;}
  .kcrm-topbar{gap:10px;grid-template-columns:auto 1fr auto;} 
  .kcrm-topbar-brand-text,.kcrm-profile-meta,.kcrm-header-company-pill{display:none;} 
  .kcrm-header-add-btn{font-size:10px;height:28px;padding:0 8px;} 
  .kcrm-main-content-area{padding:14px;} 
}


/* Dashboard-only widgets layout */
.kcrm-body-layout--plain{display:block;}
.kcrm-body-layout--plain .kcrm-main-content-area{padding-right:18px;}
.kcrm-body-layout--dashboard{display:flex;align-items:flex-start;}
.kcrm-body-layout--dashboard .kcrm-main{flex:1;min-width:0;}
.kcrm-body-layout--dashboard .kcrm-right-widgets{width:248px;flex:0 0 248px;position:sticky;right:auto;}
.kcrm-body-layout--dashboard .kcrm-charts-4grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.kcrm-body-layout--dashboard .kcrm-chart-card{min-width:0;}
@media(max-width:1280px){.kcrm-body-layout--dashboard .kcrm-right-widgets{width:228px;flex-basis:228px;}}
@media(max-width:1024px){.kcrm-body-layout--plain .kcrm-main-content-area,.kcrm-body-layout--dashboard .kcrm-main-content-area{padding-right:14px;}.kcrm-body-layout--dashboard{display:block;}.kcrm-body-layout--dashboard .kcrm-right-widgets{width:100%;flex-basis:auto;position:static;max-height:none;padding:0 14px 14px;}}


/* Sidebar in campaigns/entities/inbox + no brand block */
.kcrm-app-sidebar{padding-top:0;}
.kcrm-sidebar-scroll{padding-top:14px!important;}
.kcrm-sidebar-brand{display:none!important;}
@media(max-width:1024px){.kcrm-sidebar-scroll{padding-top:14px!important;}}


/* Sidebar accordion */
.kcrm-side-group--accordion .kcrm-side-links{display:none;overflow:hidden;}
.kcrm-side-group--accordion.is-open .kcrm-side-links{display:flex;}
.kcrm-side-toggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:transparent;
  border:0;
  color:var(--kcrm-sidebar-muted);
  text-align:left;
  cursor:pointer;
  transition:color .18s ease, background .18s ease;
}
.kcrm-side-toggle:hover,
.kcrm-side-group--accordion.is-open .kcrm-side-toggle,
.kcrm-side-toggle.is-active{color:#f8fbff;}
.kcrm-side-caret{
  font-size:10px;
  line-height:1;
  transition:transform .18s ease;
  opacity:.85;
}
.kcrm-side-group--accordion.is-open .kcrm-side-caret{transform:rotate(180deg);}

/* Sales & Finance nested grouping */
.kcrm-side-links--grouped{gap:7px;}
.kcrm-side-subgroup{border:1px solid rgba(255,255,255,.07);border-radius:12px;background:rgba(255,255,255,.025);overflow:hidden;}
.kcrm-side-subtitle{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 10px;background:transparent;border:0;color:rgba(226,232,240,.76);font-size:11px;font-weight:800;letter-spacing:.8px;text-transform:uppercase;text-align:left;cursor:pointer;}
.kcrm-side-subtitle:hover,.kcrm-side-subgroup.is-open .kcrm-side-subtitle,.kcrm-side-subgroup.is-active .kcrm-side-subtitle{color:#f8fbff;background:rgba(255,255,255,.045);}
.kcrm-side-subcaret{font-size:9px;line-height:1;opacity:.82;transition:transform .18s ease;}
.kcrm-side-subgroup.is-open .kcrm-side-subcaret{transform:rotate(180deg);}
.kcrm-sales-submenu{display:none;flex-direction:column;gap:3px;padding:4px 6px 8px 8px;}
.kcrm-side-subgroup.is-open .kcrm-sales-submenu{display:flex;}
.kcrm-sales-submenu .kcrm-side-link{padding-left:8px;padding-right:8px;}
body.kcrm-sidebar-collapsed .kcrm-side-subtitle{display:none;}
body.kcrm-sidebar-collapsed .kcrm-side-subgroup{border:0;background:transparent;border-radius:0;}
body.kcrm-sidebar-collapsed .kcrm-sales-submenu{display:flex!important;padding:0;gap:2px;}
body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-side-subtitle{display:flex;}
body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-side-subgroup{border:1px solid rgba(255,255,255,.07);border-radius:12px;background:rgba(255,255,255,.025);}
body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-sales-submenu{padding:4px 6px 8px 8px;}
@media(max-width:1024px){.kcrm-sales-submenu .kcrm-side-link{min-height:40px;}.kcrm-side-subtitle{min-height:38px;}}

/* Sales & Finance submenu polish: transparent collapsible sections on the dark sidebar */
.kcrm-side-links--grouped{
  gap:3px!important;
}
.kcrm-side-subgroup--sales-finance{
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.kcrm-side-subgroup--sales-finance .kcrm-side-subtitle,
.kcrm-side-subgroup--sales-finance .kcrm-side-subtoggle{
  -webkit-appearance:none!important;
  appearance:none!important;
  width:100%!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:transparent!important;
  color:rgba(255,255,255,.78)!important;
  font-family:inherit!important;
  font-size:12px!important;
  font-weight:700!important;
  letter-spacing:.15px!important;
  text-transform:none!important;
  text-shadow:none!important;
  line-height:1.2!important;
  min-height:30px!important;
  padding:6px 12px 6px 20px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  cursor:pointer!important;
}
.kcrm-side-subgroup--sales-finance .kcrm-side-subtitle:hover,
.kcrm-side-subgroup--sales-finance.is-open .kcrm-side-subtitle,
.kcrm-side-subgroup--sales-finance.is-active .kcrm-side-subtitle{
  background:rgba(255,255,255,.045)!important;
  color:#fff!important;
  border-radius:10px!important;
}
.kcrm-side-subgroup--sales-finance .kcrm-side-subcaret{
  margin-left:auto!important;
  color:rgba(255,255,255,.72)!important;
}
.kcrm-side-subgroup--sales-finance .kcrm-sales-submenu{
  padding:2px 0 7px 20px!important;
  gap:2px!important;
}
.kcrm-side-subgroup--sales-finance .kcrm-sales-submenu .kcrm-side-link{
  color:rgba(255,255,255,.9)!important;
  padding-left:13px!important;
  padding-right:8px!important;
  min-height:36px!important;
  background:transparent;
}
.kcrm-side-subgroup--sales-finance .kcrm-sales-submenu .kcrm-side-link:hover{
  background:rgba(255,255,255,.075)!important;
}
.kcrm-side-subgroup--sales-finance .kcrm-sales-submenu .kcrm-side-link.active{
  background:rgba(255,255,255,.14)!important;
  color:#fff!important;
}
body.kcrm-sidebar-collapsed .kcrm-side-subgroup--sales-finance .kcrm-sales-submenu{padding:0!important;}
body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-side-subgroup--sales-finance .kcrm-sales-submenu{padding:2px 0 7px 20px!important;}
body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-side-subgroup--sales-finance .kcrm-side-subtitle{display:flex!important;}


/* Collapsed: hide accordion labels/carets but keep links visible (icons only) */
body.kcrm-sidebar-collapsed .kcrm-side-group--accordion .kcrm-side-links{display:flex!important;}
body.kcrm-sidebar-collapsed .kcrm-side-caret{display:none;}


/* Zoho / HubSpot style sidebar behaviour */
body.kcrm-sidebar-collapsed .kcrm-app-sidebar{width:72px;}
body.kcrm-sidebar-collapsed .kcrm-content-shell{margin-left:72px;}
body.kcrm-sidebar-collapsed .kcrm-side-link{justify-content:center;padding-left:10px;padding-right:10px;}
body.kcrm-sidebar-collapsed .kcrm-side-icon{width:auto;flex:0 0 auto;font-size:18px;}
body.kcrm-sidebar-collapsed .kcrm-side-label,
body.kcrm-sidebar-collapsed .kcrm-side-title span:first-child,
body.kcrm-sidebar-collapsed .kcrm-side-caret{display:none;}
body.kcrm-sidebar-collapsed .kcrm-side-title{justify-content:center;padding:0 4px 4px;}
/* Show all accordion link icons in collapsed state */
body.kcrm-sidebar-collapsed .kcrm-side-group--accordion .kcrm-side-links{display:flex!important;flex-direction:column;gap:2px;}
/* Active indicator still works for icon-only links */
body.kcrm-sidebar-collapsed .kcrm-side-link.active{background:rgba(255,255,255,0.14);}

body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-app-sidebar{width:220px;box-shadow:18px 0 36px rgba(15,23,42,.18);}
body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-content-shell{margin-left:72px;}
body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-side-label,
body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-side-title span:first-child,
body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-side-caret{display:inline;}
body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-side-title{justify-content:space-between;padding:0 8px 6px;}
body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-side-link{justify-content:flex-start;padding-left:9px;padding-right:9px;}
body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-side-icon{width:18px;flex:0 0 18px;}
body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-side-group--accordion .kcrm-side-links{display:flex!important;}

@media(max-width:1024px){
  body.kcrm-sidebar-collapsed .kcrm-app-sidebar,
  body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-app-sidebar{width:220px;}
  body.kcrm-sidebar-collapsed .kcrm-content-shell,
  body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-content-shell{margin-left:0;}
}


/* ═══════════════════════════════════════════════════════════════
   KASALOMA CRM — FULL MOBILE APP EXPERIENCE
   Breakpoint: ≤ 768px behaves like a native mobile app
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── 1. ROOT / BODY ── */
  :root {
    --kcrm-topbar-h: 56px;
    --kcrm-bottom-nav-h: 62px;
    --kcrm-safe-bottom: env(safe-area-inset-bottom, 0px);
  }

  html, body.kcrm-frontend-body {
    height: 100%;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  body.kcrm-frontend-body {
    background: #f1f5f9;
  }

  /* ── 2. HIDE left sidebar — replaced by bottom tab bar ── */
  .kcrm-app-sidebar,
  .kcrm-mobile-sidebar-backdrop { display: none !important; }

  /* ── 3. APP SHELL ── */
  .kcrm-app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    min-height: 100vh;
  }

  .kcrm-content-shell {
    margin-left: 0 !important;
    padding-top: var(--kcrm-topbar-h);
    padding-bottom: calc(var(--kcrm-bottom-nav-h) + var(--kcrm-safe-bottom));
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-x: hidden;
  }

  /* ── 4. TOPBAR — compact mobile header ── */
  .kcrm-topbar {
    position: fixed !important;
    top: 0; left: 0; right: 0;
    z-index: 1200;
    height: var(--kcrm-topbar-h) !important;
    min-height: var(--kcrm-topbar-h) !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px !important;
    gap: 0 !important;
    background: #0f2440 !important;
    border-bottom: none !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.22) !important;
    backdrop-filter: none !important;
  }

  /* Kill the grid layout on mobile topbar */
  .kcrm-topbar-left  { flex: 1; gap: 0 !important; }
  .kcrm-topbar-center { display: none !important; }
  .kcrm-topbar-right  { gap: 4px !important; }

  /* Hamburger → becomes visible on mobile, opens slide-in drawer */
  .kcrm-topbar-toggle {
    background: rgba(255,255,255,0.1) !important;
    border-radius: 10px !important;
    width: 38px !important; height: 38px !important;
    margin-right: 10px;
  }
  .kcrm-topbar-toggle span { background: #fff !important; width: 16px !important; }

  /* Brand in header */
  .kcrm-topbar-brand {
    display: flex !important;
    align-items: center;
    gap: 6px;
  }
  .kcrm-topbar-brand-text {
    color: #fff !important;
    font-size: 13px !important;
    letter-spacing: 1.5px !important;
  }
  .kcrm-brand-divider {
    width: 1px; height: 14px;
    background: rgba(255,255,255,0.3);
    display: block !important;
  }

  /* Right-side header icons — white on dark */
  .kcrm-header-add-btn { display: none !important; }

  .kcrm-header-icon-btn {
    width: 36px !important; height: 36px !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,0.1) !important;
    border: none !important;
  }
  .kcrm-header-icon { font-size: 16px !important; }

  .kcrm-notif-badge, .kcrm-chat-badge {
    top: 4px !important; right: 4px !important;
    width: 16px !important; height: 16px !important;
    font-size: 9px !important;
  }

  .kcrm-header-company-pill { display: none !important; }
  .kcrm-profile-meta, .kcrm-profile-caret { display: none !important; }

  .kcrm-profile-trigger {
    background: rgba(255,255,255,0.1) !important;
    border-radius: 10px !important;
    padding: 4px !important;
    height: 36px !important; width: 36px !important;
  }
  .kcrm-user-avatar {
    width: 28px !important; height: 28px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    background: rgba(255,255,255,0.25) !important;
    color: #fff !important;
  }

  /* Dropdowns — full-width on mobile */
  .kcrm-notif-dropdown,
  .kcrm-chat-menu {
    position: fixed !important;
    top: var(--kcrm-topbar-h) !important;
    left: 0 !important; right: 0 !important;
    width: 100% !important;
    max-height: 60vh !important;
    overflow-y: auto !important;
    border-radius: 0 0 20px 20px !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18) !important;
    z-index: 1300 !important;
  }
  .kcrm-profile-menu {
    position: fixed !important;
    top: var(--kcrm-topbar-h) !important;
    right: 10px !important;
    left: auto !important;
    width: min(260px, calc(100vw - 20px)) !important;
    border-radius: 16px !important;
    z-index: 1300 !important;
  }

  /* ── 5. MOBILE DRAWER — full slide-in sidebar ── */
  /* The existing sidebar becomes a full-height drawer from left */
  .kcrm-app-sidebar {
    display: flex !important;
    position: fixed !important;
    top: 0 !important; left: 0 !important; bottom: 0 !important;
    width: 280px !important;
    z-index: 1400 !important;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: linear-gradient(180deg, #0f2440 0%, #0d2444 100%) !important;
    box-shadow: 4px 0 32px rgba(0,0,0,0.28) !important;
  }
  body.kcrm-mobile-sidebar-open .kcrm-app-sidebar {
    transform: translateX(0) !important;
  }
  .kcrm-mobile-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1399;
    backdrop-filter: blur(2px);
  }
  .kcrm-mobile-sidebar-backdrop.active {
    display: block !important;
  }
  .kcrm-sidebar-scroll { padding: 56px 12px 100px !important; }

  /* Close X in drawer */
  .kcrm-drawer-close-btn {
    position: absolute;
    top: 14px; right: 14px;
    width: 32px; height: 32px;
    border: none; border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: #fff; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 1;
  }

  /* Drawer logo */
  .kcrm-sidebar-brand { display: flex !important; padding: 18px 14px 10px !important; }

  /* ── 6. BOTTOM TAB BAR ── */
  .kcrm-mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(var(--kcrm-bottom-nav-h) + var(--kcrm-safe-bottom));
    padding-bottom: var(--kcrm-safe-bottom);
    background: #fff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 20px rgba(15,23,42,0.1);
    z-index: 1100;
    align-items: flex-start;
    justify-content: space-around;
    padding-top: 8px;
  }

  .kcrm-mobile-bottom-nav a,
  .kcrm-mobile-bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 48px;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease;
  }
  .kcrm-mobile-bottom-nav a:active,
  .kcrm-mobile-bottom-nav button:active {
    transform: scale(0.88);
  }

  .kcrm-mobile-tab-icon {
    font-size: 20px;
    line-height: 1;
    transition: transform 0.15s ease;
  }
  .kcrm-mobile-tab-label {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.2px;
    font-family: inherit;
    transition: color 0.15s;
  }
  .kcrm-mobile-bottom-nav a.active .kcrm-mobile-tab-label,
  .kcrm-mobile-bottom-nav button.active .kcrm-mobile-tab-label {
    color: #1a3a5c;
  }
  .kcrm-mobile-bottom-nav a.active .kcrm-mobile-tab-icon {
    transform: translateY(-2px);
  }

  /* Active indicator pill */
  .kcrm-mobile-tab-active-dot {
    position: absolute;
    top: -1px; left: 50%; transform: translateX(-50%);
    width: 20px; height: 3px;
    background: #1a3a5c;
    border-radius: 2px;
    display: none;
  }
  .kcrm-mobile-bottom-nav a.active .kcrm-mobile-tab-active-dot,
  .kcrm-mobile-bottom-nav button.active .kcrm-mobile-tab-active-dot {
    display: block;
  }

  /* Badge on bottom tab */
  .kcrm-tab-badge {
    position: absolute;
    top: 2px; right: 50%;
    transform: translateX(calc(50% + 8px));
    min-width: 16px; height: 16px;
    background: #ef4444;
    color: #fff;
    font-size: 9px; font-weight: 700;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
    border: 1.5px solid #fff;
  }

  /* ── 7. MAIN CONTENT ── */
  .kcrm-main-content-area,
  .kaa-inbox-layout {
    padding: 14px 12px !important;
  }

  .kcrm-body-layout,
  .kcrm-body-layout--dashboard,
  .kcrm-body-layout--plain {
    display: block !important;
  }

  /* Hide desktop right sidebar (calendar/todo widget) on mobile */
  .kcrm-right-widgets,
  .kcrm-sidebar.kcrm-right-widgets {
    display: none !important;
  }

  /* ── 8. CARDS ── */
  .kcrm-card {
    border-radius: 16px !important;
    padding: 14px !important;
    box-shadow: 0 2px 8px rgba(15,23,42,0.06) !important;
    margin-bottom: 12px;
  }

  .kcrm-page { padding: 0 !important; }

  /* ── 9. STAT CARDS ── */
  .kcrm-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .kcrm-stat-card {
    border-radius: 14px !important;
    padding: 14px 12px !important;
  }
  .kcrm-stat-val { font-size: 26px !important; }
  .kcrm-stat-label { font-size: 11px !important; }

  /* ── 10. CHARTS ── */
  .kcrm-charts-row,
  .kcrm-charts-4grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .kcrm-chart-card { min-height: 200px; }

  /* ── 11. TABLES → card list on mobile ── */
  .kcrm-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
  .kcrm-table { font-size: 12px !important; }
  .kcrm-table td, .kcrm-table th { padding: 10px 10px !important; white-space: nowrap; }

  /* ── 12. FORMS ── */
  .kcrm-form-row { grid-template-columns: 1fr !important; gap: 12px !important; }
  .kcrm-field input,
  .kcrm-field select,
  .kcrm-field textarea {
    font-size: 16px !important; /* prevent iOS zoom */
    border-radius: 12px !important;
    height: auto !important;
    min-height: 48px !important;
    padding: 12px 14px !important;
  }
  .kcrm-field label { font-size: 13px !important; margin-bottom: 6px !important; }
  .kcrm-form-card { max-width: 100% !important; }

  /* ── 13. BUTTONS ── */
  .kcrm-btn, .kcrm-btn-ghost {
    min-height: 44px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    padding: 10px 16px !important;
    -webkit-tap-highlight-color: transparent;
  }

  /* ── 14. PAGE HEADERS ── */
  .kcrm-header {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    padding: 0 0 12px !important;
    gap: 8px !important;
    align-items: center !important;
  }
  .kcrm-header h1, .kcrm-header h2 { font-size: 18px !important; }

  /* ── 15. CONTACT DETAIL ── */
  .kcrm-detail-grid { grid-template-columns: 1fr !important; }
  .kcrm-info-grid { grid-template-columns: 1fr 1fr !important; }

  /* ── 16. TEAM CHAT PANEL — full screen on mobile ── */
  .kcrm-tchat-overlay {
    z-index: 1500 !important;
  }
  .kcrm-tchat-panel {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    z-index: 1600 !important;
    flex-direction: column !important;
  }
  .kcrm-tchat-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    max-height: 40vh !important;
    overflow-y: auto !important;
  }
  /* When a conversation is active, hide user list and show full chat */
  .kcrm-tchat-panel.kcrm-tchat-conv-active .kcrm-tchat-sidebar { display: none !important; }
  .kcrm-tchat-panel.kcrm-tchat-conv-active .kcrm-tchat-main { flex: 1 !important; display: flex !important; flex-direction: column !important; }
  .kcrm-tchat-messages { flex: 1 !important; overflow-y: auto !important; }
  .kcrm-tchat-input-row { padding: 10px 12px !important; padding-bottom: max(10px, env(safe-area-inset-bottom, 10px)) !important; }
  .kcrm-tchat-input-row textarea { font-size: 16px !important; border-radius: 20px !important; }
  .kcrm-tchat-send-btn { width: 44px !important; height: 44px !important; border-radius: 22px !important; }
  .kcrm-tchat-conv-header { padding: 12px 14px !important; }
  /* Back button in chat conv header */
  .kcrm-tchat-back-btn {
    display: flex !important;
    align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border: none; border-radius: 8px;
    background: #f1f5f9;
    cursor: pointer; font-size: 16px;
    margin-right: 8px;
  }

  /* ── 17. AI INBOX — full-screen on mobile ── */
  .kaa-inbox-layout {
    padding: 0 !important;
  }
  .kaa-inbox-shell {
    flex-direction: column !important;
    height: auto !important;
    min-height: auto !important;
  }
  .kaa-conv-list {
    width: 100% !important;
    max-width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    max-height: 45vh !important;
    overflow-y: auto !important;
  }
  .kaa-chat-area { min-height: 55vh !important; }
  .kaa-msg-input-row { padding-bottom: max(12px, env(safe-area-inset-bottom, 12px)) !important; }
  .kaa-msg-input-row textarea, .kaa-msg-input { font-size: 16px !important; }

  /* ── 18. ENTITY / EMPLOYEE VIEWS ── */
  .kce-entity-grid,
  .kce-emp-grid { grid-template-columns: 1fr !important; }

  /* ── 19. CAMPAIGNS ── */
  .ktc-layout { flex-direction: column !important; }
  .ktc-sidebar { width: 100% !important; border-right: none !important; border-bottom: 1px solid #e2e8f0 !important; }

  /* ── 20. FOOTER ── */
  .kcrm-footer {
    display: none !important; /* bottom nav replaces footer nav on mobile */
  }

  /* ── 21. MODALS ── */
  .kcrm-modal-wrap,
  .kcrm-overlay + .kcrm-modal {
    padding: 10px !important;
  }
  .kcrm-modal {
    border-radius: 20px !important;
    padding: 20px 16px !important;
    max-height: 90dvh !important;
    overflow-y: auto !important;
  }

  /* ── 22. SETTINGS TABS ── */
  .kcrm-tabs { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .kcrm-tab { flex-shrink: 0; min-height: 44px; }

  /* ── 23. FOLLOW-UPS / RENEWALS ── */
  .kcrm-filter-row { flex-wrap: wrap; gap: 8px; }
  .kcrm-filter-row select,
  .kcrm-filter-row input { font-size: 16px !important; height: 44px; border-radius: 10px; }

  /* ── 24. SEARCH BAR — shown below topbar on mobile ── */
  .kcrm-mobile-search-bar {
    display: flex !important;
    padding: 8px 12px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: var(--kcrm-topbar-h);
    z-index: 100;
  }
  .kcrm-mobile-search-bar form { width: 100%; }
  .kcrm-mobile-search-bar .kcrm-global-search-form { width: 100%; }
  .kcrm-mobile-search-bar input {
    width: 100%;
    height: 40px;
    font-size: 16px !important;
    border-radius: 20px;
    border: 1px solid #dbe4f1;
    padding: 0 16px 0 40px;
    background: #fff;
  }

  /* ── 25. PULL-TO-REFRESH feel — smooth scrolling ── */
  .kcrm-main { overflow-y: auto; -webkit-overflow-scrolling: touch; }

  /* ── 26. Touch-friendly tap targets ── */
  .kcrm-side-link,
  .kcrm-profile-menu a,
  .kcrm-notif-item,
  .kcrm-chat-menu-user-row {
    min-height: 48px !important;
  }

  /* ── 27. Dashboard welcome ── */
  .kcrm-dash-welcome { font-size: 18px !important; }
  .kcrm-dash-sub { font-size: 13px !important; }

} /* end @media ≤ 768px */


/* ═══ BOTTOM NAV — hidden on desktop, shown on mobile ═══ */
.kcrm-mobile-bottom-nav { display: none; }


/* ═══ DRAWER CLOSE BUTTON — only meaningful on mobile ═══ */
.kcrm-drawer-close-btn { display: none; }
@media (max-width: 768px) {
  .kcrm-drawer-close-btn { display: flex; }
}


/* ── AI Provider selector grid ── */
.kaa-provider-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 6px;
}
@media (max-width: 900px) { .kaa-provider-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 500px) { .kaa-provider-grid { grid-template-columns: 1fr 1fr; } }

/* ════════════════════════════════════════════════════════
   NEW MESSAGE ROUTING — AI Agent Settings
   ════════════════════════════════════════════════════════ */

.kaa-routing-section h4 { margin-bottom: 4px; }

/* Route cards grid */
.kaa-route-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
@media (max-width: 700px) { .kaa-route-cards { grid-template-columns: 1fr; } }

/* Individual card */
.kaa-route-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 2px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    background: #fff;
    transition: border-color .18s, box-shadow .18s, background .18s;
    position: relative;
    user-select: none;
}
.kaa-route-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.kaa-route-card.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,58,92,.1), 0 4px 16px rgba(0,0,0,.08);
    background: #f8faff;
}

.kaa-route-card-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.kaa-route-card-body { flex: 1; min-width: 0; }
.kaa-route-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
}
.kaa-route-card-desc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.kaa-route-card-check {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.kaa-route-card.selected .kaa-route-card-check { display: flex; }

/* Sub-options panel (flow selector / human assign) */
.kaa-route-subopts {
    margin-bottom: 16px;
    animation: kaaSubIn .18s ease;
}
@keyframes kaaSubIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.kaa-route-subopts-inner {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}
.kaa-route-subopts-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    padding-top: 8px;
    min-width: 180px;
}

/* Live preview pill */
.kaa-route-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    transition: background .2s, border-color .2s, color .2s;
    margin-top: 4px;
}
.kaa-route-preview-icon { font-size: 16px; }

.kaa-route-preview.mode-flow  { background:#f0fdf4; border-color:#86efac; color:#15803d; }
.kaa-route-preview.mode-human { background:#fffbeb; border-color:#fcd34d; color:#92400e; }

/* ===== KCRM UI residue cleanup (Safari blue focus/tap artifact fix) ===== */
.kcrm-topbar,
.kcrm-topbar *,
.kcrm-header,
.kcrm-header * {
  -webkit-tap-highlight-color: transparent !important;
}

.kcrm-topbar a:focus,
.kcrm-topbar button:focus,
.kcrm-topbar input:focus,
.kcrm-topbar select:focus,
.kcrm-header a:focus,
.kcrm-header button:focus,
.kcrm-header input:focus,
.kcrm-header select:focus,
.kcrm-preserve-contact-state:focus,
.kcrm-btn-assign:focus {
  outline: none !important;
  box-shadow: none !important;
}

.kcrm-topbar a:active,
.kcrm-topbar button:active,
.kcrm-header a:active,
.kcrm-header button:active,
.kcrm-preserve-contact-state:active,
.kcrm-btn-assign:active {
  outline: none !important;
}

.kcrm-topbar ::selection,
.kcrm-header ::selection {
  background: transparent !important;
}

/* === KCRM blue residue fix v2 ===
   Safari can keep a painted focus/tap overlay on the fixed topbar/sidebar after AJAX contact actions.
   Limit the cleanup to the CRM chrome and action buttons so form accessibility remains intact. */
.kcrm-topbar,
.kcrm-topbar *,
.kcrm-app-sidebar,
.kcrm-app-sidebar *,
.kcrm-header-add-btn,
.kcrm-header-icon-btn,
.kcrm-profile-trigger,
.kcrm-topbar-toggle,
.kcrm-side-link,
.kcrm-preserve-contact-state,
.kcrm-assign-form button,
.kcrm-btn-sm,
.kcrm-wa-btn {
  -webkit-tap-highlight-color: transparent !important;
}
.kcrm-topbar a:focus,
.kcrm-topbar button:focus,
.kcrm-topbar a:focus-visible,
.kcrm-topbar button:focus-visible,
.kcrm-app-sidebar a:focus,
.kcrm-app-sidebar button:focus,
.kcrm-app-sidebar a:focus-visible,
.kcrm-app-sidebar button:focus-visible,
.kcrm-preserve-contact-state:focus,
.kcrm-preserve-contact-state:focus-visible,
.kcrm-assign-form button:focus,
.kcrm-assign-form button:focus-visible,
.kcrm-btn-sm:focus,
.kcrm-btn-sm:focus-visible,
.kcrm-wa-btn:focus,
.kcrm-wa-btn:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
}
.kcrm-topbar a::selection,
.kcrm-topbar button::selection,
.kcrm-app-sidebar a::selection,
.kcrm-app-sidebar button::selection {
  background: transparent !important;
}
body.kcrm-clear-active-ui .kcrm-topbar a,
body.kcrm-clear-active-ui .kcrm-topbar button,
body.kcrm-clear-active-ui .kcrm-app-sidebar a,
body.kcrm-clear-active-ui .kcrm-app-sidebar button {
  outline: 0 !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* === KCRM residue real fix v3 ===
   Removes the legacy header/selection bar that can appear above the new topbar
   after contact silent actions in Safari/Firefox. */
body.kcrm-frontend-body .kcrm-wrap > .kcrm-header,
body.kcrm-frontend-body .kcrm-app-shell > .kcrm-header {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}
body.kcrm-frontend-body .kcrm-topbar,
body.kcrm-frontend-body .kcrm-topbar *,
body.kcrm-frontend-body .kcrm-app-sidebar,
body.kcrm-frontend-body .kcrm-app-sidebar * {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  user-select: none !important;
}
body.kcrm-frontend-body .kcrm-global-search,
body.kcrm-frontend-body input,
body.kcrm-frontend-body textarea,
body.kcrm-frontend-body select {
  -webkit-user-select: auto !important;
  -moz-user-select: auto !important;
  user-select: auto !important;
}


/* BOS Contact → Customer icon action */
.kcrm-customer-icon-svg {
    width: 17px;
    height: 17px;
    display: block;
    flex: 0 0 auto;
}
.kcrm-card-action-btn.customer,
.kcrm-btn-sm.kcrm-btn-customer,
.kcrm-detail-actions .kcrm-customer-icon-btn {
    background: #eff6ff;
    color: #3b82f6;
    border-color: #bfdbfe;
}
.kcrm-card-action-btn.customer:hover,
.kcrm-btn-sm.kcrm-btn-customer:hover,
.kcrm-detail-actions .kcrm-customer-icon-btn:hover {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #93c5fd;
}
.kcrm-customer-icon-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0 !important;
    min-width: 34px;
    width: 34px;
    height: 34px;
    padding: 0 !important;
    line-height: 1;
}
.kcrm-btn-sm.kcrm-customer-icon-btn {
    min-width: 30px;
    width: 30px;
    height: 30px;
}
.kcrm-card-customer-badge,
.kcrm-list-customer-badge,
.kcrm-detail-customer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff !important;
    color: #3b82f6 !important;
    padding: 0;
    width: 28px;
    height: 28px;
    white-space: nowrap;
}
.kcrm-list-customer-badge { width: 30px; height: 30px; }
.kcrm-detail-customer-badge { width: 34px; height: 34px; }

/* === BOS final sidebar/customer icon fix 2.6.6.2 === */
.kcrm-side-icon{display:inline-flex!important;align-items:center!important;justify-content:center!important;}
.kcrm-side-icon svg,
.kcrm-side-customer-svg,
.kcrm-customer-icon-svg{width:18px!important;height:18px!important;display:block!important;flex:0 0 18px!important;}
.kcrm-side-icon--customer{color:#dbeafe!important;}
.kcrm-card-action-btn.customer,
.kcrm-btn-sm.kcrm-btn-customer,
.kcrm-detail-actions .kcrm-customer-icon-btn,
.kcrm-customer-icon-btn{
  background:#eff6ff!important;
  color:#2563eb!important;
  border:1px solid #bfdbfe!important;
  box-shadow:none!important;
}
.kcrm-card-action-btn.customer:hover,
.kcrm-btn-sm.kcrm-btn-customer:hover,
.kcrm-detail-actions .kcrm-customer-icon-btn:hover,
.kcrm-customer-icon-btn:hover{
  background:#dbeafe!important;
  color:#1d4ed8!important;
  border-color:#93c5fd!important;
}
.kcrm-card-customer-badge,
.kcrm-list-customer-badge,
.kcrm-detail-customer-badge{
  background:#eff6ff!important;
  color:#2563eb!important;
  border:1px solid #bfdbfe!important;
  box-shadow:none!important;
}
.kcrm-customer-icon-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:0!important;padding:0!important;min-width:30px!important;width:30px!important;height:30px!important;border-radius:8px!important;}
.kcrm-card-action-btn.customer.kcrm-customer-icon-btn{min-width:30px!important;width:30px!important;height:30px!important;}
.kcrm-detail-actions .kcrm-customer-icon-btn{min-width:34px!important;width:34px!important;height:34px!important;}

/* Sales & Finance must be real accordion submenus: transparent labels, one open section, hidden when closed */
.kcrm-side-links--grouped{gap:3px!important;}
.kcrm-side-subgroup--sales-finance{border:0!important;background:transparent!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important;}
.kcrm-side-subgroup--sales-finance > .kcrm-side-subtitle,
.kcrm-side-subgroup--sales-finance > .kcrm-side-subtoggle{
  background:transparent!important;
  color:rgba(255,255,255,.86)!important;
  border:0!important;
  border-radius:9px!important;
  box-shadow:none!important;
  width:100%!important;
  min-height:30px!important;
  padding:6px 12px 6px 20px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  font-size:12px!important;
  font-weight:700!important;
  letter-spacing:.15px!important;
  text-transform:none!important;
  text-align:left!important;
  cursor:pointer!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}
.kcrm-side-subgroup--sales-finance > .kcrm-side-subtitle span:first-child{background:transparent!important;border:0!important;padding:0!important;color:inherit!important;box-shadow:none!important;}
.kcrm-side-subgroup--sales-finance > .kcrm-side-subtitle:hover,
.kcrm-side-subgroup--sales-finance.is-open > .kcrm-side-subtitle{background:rgba(255,255,255,.06)!important;color:#fff!important;}
.kcrm-side-subgroup--sales-finance .kcrm-side-subcaret{margin-left:auto!important;color:rgba(255,255,255,.72)!important;transition:transform .18s ease!important;}
.kcrm-side-subgroup--sales-finance:not(.is-open) > .kcrm-sales-submenu{display:none!important;}
.kcrm-side-subgroup--sales-finance.is-open > .kcrm-sales-submenu{display:flex!important;flex-direction:column!important;}
.kcrm-side-subgroup--sales-finance:not(.is-open) .kcrm-side-subcaret{transform:rotate(0deg)!important;}
.kcrm-side-subgroup--sales-finance.is-open .kcrm-side-subcaret{transform:rotate(180deg)!important;}
.kcrm-side-subgroup--sales-finance > .kcrm-sales-submenu{padding:2px 0 7px 20px!important;gap:2px!important;background:transparent!important;}
.kcrm-side-subgroup--sales-finance > .kcrm-sales-submenu .kcrm-side-link{background:transparent!important;color:rgba(255,255,255,.9)!important;padding-left:13px!important;padding-right:8px!important;min-height:36px!important;}
.kcrm-side-subgroup--sales-finance > .kcrm-sales-submenu .kcrm-side-link:hover{background:rgba(255,255,255,.075)!important;}
.kcrm-side-subgroup--sales-finance > .kcrm-sales-submenu .kcrm-side-link.active{background:rgba(255,255,255,.14)!important;color:#fff!important;}
body.kcrm-sidebar-collapsed:not(.kcrm-sidebar-hovered) .kcrm-side-subgroup--sales-finance > .kcrm-side-subtitle{display:none!important;}
body.kcrm-sidebar-collapsed:not(.kcrm-sidebar-hovered) .kcrm-side-subgroup--sales-finance > .kcrm-sales-submenu{padding:0!important;}
body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-side-subgroup--sales-finance > .kcrm-side-subtitle{display:flex!important;}
body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-side-subgroup--sales-finance:not(.is-open) > .kcrm-sales-submenu{display:none!important;}


/* === BOS Modern Module UI — Instagram-style standard for other pages === */
:root{
  --kbos-ui-bg:#fafafa;
  --kbos-ui-surface:#ffffff;
  --kbos-ui-border:#e8e8e8;
  --kbos-ui-text:#1f2937;
  --kbos-ui-muted:#6b7280;
  --kbos-ui-accent:#e9584b;
  --kbos-ui-accent-soft:#fdf2f0;
  --kbos-ui-shadow:0 1px 3px rgba(0,0,0,.05);
}
.kcrm-body-layout--plain .kcrm-main-content-area{
  padding:0!important;
  background:var(--kbos-ui-bg)!important;
  min-height:calc(100vh - var(--kcrm-topbar-h));
  overflow:hidden;
}
.kbos-module-app{
  display:flex;
  flex-direction:column;
  min-height:calc(100vh - var(--kcrm-topbar-h));
  background:var(--kbos-ui-bg);
}
.kbos-module-topnav{
  display:flex;
  align-items:center;
  gap:16px;
  min-height:52px;
  padding:0 20px;
  background:var(--kbos-ui-surface);
  border-bottom:1px solid var(--kbos-ui-border);
  box-shadow:var(--kbos-ui-shadow);
  flex-shrink:0;
}
.kbos-module-topnav-left{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
  min-width:0;
}
.kbos-module-icon{
  width:22px;
  height:22px;
  border-radius:7px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#e9584b,#8b5cf6);
  color:#fff;
  font-size:12px;
  font-weight:900;
  box-shadow:0 6px 14px rgba(233,88,75,.18);
}
.kbos-module-title{
  font-size:16px;
  font-weight:800;
  letter-spacing:.1px;
  color:var(--kbos-ui-text);
  white-space:nowrap;
}
.kbos-module-topnav--sales .kbos-module-icon{background:linear-gradient(135deg,#1d4ed8,#06b6d4);box-shadow:0 6px 14px rgba(37,99,235,.16)}
.kbos-module-topnav--business .kbos-module-icon{background:linear-gradient(135deg,#0f766e,#10b981);box-shadow:0 6px 14px rgba(16,185,129,.15)}
.kbos-module-topnav--system .kbos-module-icon{background:linear-gradient(135deg,#475569,#0f172a);box-shadow:0 6px 14px rgba(15,23,42,.14)}
.kbos-module-tabs{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:2px;
  height:52px;
  overflow-x:auto;
  scrollbar-width:none;
}
.kbos-module-tabs::-webkit-scrollbar{display:none;}
.kbos-module-tab{
  height:52px;
  display:flex;
  align-items:center;
  gap:6px;
  padding:0 13px;
  color:var(--kbos-ui-muted);
  text-decoration:none!important;
  border-bottom:2px solid transparent;
  font-size:13px;
  font-weight:600;
  white-space:nowrap;
  transition:color .15s,border-color .15s,background .15s;
}
.kbos-module-tab:hover{color:var(--kbos-ui-accent);background:#fff7f6;}
.kbos-module-tab.active{color:var(--kbos-ui-accent);border-bottom-color:var(--kbos-ui-accent);background:#fff;}
.kbos-module-topnav--sales .kbos-module-tab:hover,.kbos-module-topnav--sales .kbos-module-tab.active{color:#2563eb;border-bottom-color:#2563eb;background:#eff6ff;}
.kbos-module-topnav--business .kbos-module-tab:hover,.kbos-module-topnav--business .kbos-module-tab.active{color:#0f766e;border-bottom-color:#0f766e;background:#f0fdfa;}
.kbos-module-topnav--system .kbos-module-tab:hover,.kbos-module-topnav--system .kbos-module-tab.active{color:#1f2937;border-bottom-color:#1f2937;background:#f8fafc;}
.kbos-module-tab-icon{font-size:12px;line-height:1;opacity:.9;}
.kbos-module-content{
  flex:1;
  padding:22px 24px 28px;
  overflow:auto;
  min-height:0;
}
.kbos-module-content > .kcrm-page{
  padding:0!important;
  max-width:none!important;
}
.kbos-module-content .kcrm-card,
.kbos-module-content .ktc-card,
.kbos-module-content .kads-card{
  border:1px solid var(--kbos-ui-border);
  border-radius:14px;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
}
.kbos-module-content .kcrm-contacts-toolbar,
.kbos-module-content .kbos-page-head,
.kbos-module-content .kcrm-page-head,
.kbos-module-content .ktc-page-header{
  background:#fff;
  border:1px solid var(--kbos-ui-border);
  border-radius:16px;
  padding:14px 16px;
  box-shadow:0 1px 3px rgba(0,0,0,.035);
}
.kbos-module-content .kcrm-contacts-toolbar{margin-bottom:18px;}
.kbos-module-content .kcrm-contact-card{
  border:1px solid #ececec;
  border-radius:14px;
  box-shadow:0 1px 3px rgba(0,0,0,.035);
}
.kbos-module-content .kcrm-contact-card:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 20px rgba(15,23,42,.06);
}
.kbos-module-content .kcrm-btn,
.kbos-module-content .kcrm-btn.primary{
  border-radius:9px;
  box-shadow:none;
}
.kbos-module-content .kcrm-btn-ghost,
.kbos-module-content .kcrm-btn.secondary{
  border-radius:9px;
  background:#fff;
}
.kbos-module-content input,
.kbos-module-content select,
.kbos-module-content textarea{
  border-radius:10px!important;
}
/* Campaign and Ads pages: align with the same modern topnav language */
.ktc-page,.kads-shell{background:var(--kbos-ui-bg);min-height:calc(100vh - var(--kcrm-topbar-h));}
.ktc-page{padding:0!important;}
.ktc-page-header,
.kads-platform-bar{
  min-height:52px;
  padding:0 20px!important;
  background:#fff!important;
  border-bottom:1px solid var(--kbos-ui-border)!important;
  box-shadow:0 1px 3px rgba(0,0,0,.05)!important;
  margin:0!important;
  border-radius:0!important;
}
.ktc-title-icon,.kads-title-icon{font-size:22px!important;}
.ktc-page-title h1,.kads-platform-bar-title h1{font-size:16px!important;margin:0!important;color:#1f2937!important;}
.ktc-page-title p,.kads-platform-bar-title p{display:none!important;}
.ktc-tabs,.kads-subtabs{
  background:#fff!important;
  border-bottom:1px solid var(--kbos-ui-border)!important;
  margin:0 0 20px!important;
  padding:0 20px!important;
  min-height:44px;
  align-items:center;
  gap:2px!important;
}
.ktc-tab,.kads-subtab{
  height:44px;
  display:inline-flex;
  align-items:center;
  border:0!important;
  border-radius:0!important;
  border-bottom:2px solid transparent!important;
  background:transparent!important;
  margin:0!important;
  color:#6b7280!important;
  font-weight:600!important;
}
.ktc-tab:hover,.kads-subtab:hover{color:#e9584b!important;background:#fff7f6!important;}
.ktc-tab.active,.kads-subtab.active{color:#e9584b!important;border-bottom-color:#e9584b!important;background:#fff!important;}
.kads-platform-tabs{height:52px;align-items:center!important;}
.kads-platform-tab{height:52px;border:0!important;border-radius:0!important;background:transparent!important;border-bottom:2px solid transparent!important;padding:0 13px!important;margin:0!important;}
.kads-platform-tab.active{border-bottom-color:var(--tab-color,#e9584b)!important;color:#1f2937!important;}
.kads-content{padding:22px 24px 28px!important;}
.ktc-page > :not(.ktc-page-header):not(.ktc-tabs){margin-left:24px;margin-right:24px;}
@media(max-width:820px){
  .kbos-module-topnav{align-items:flex-start;flex-direction:column;height:auto;min-height:0;padding:12px 14px 0;gap:8px;}
  .kbos-module-tabs{width:100%;height:44px;margin-left:0;}
  .kbos-module-tab{height:44px;padding:0 11px;font-size:12px;}
  .kbos-module-content{padding:16px 14px 80px;}
  .ktc-page-header,.kads-platform-bar{height:auto;min-height:52px;padding:10px 14px!important;}
  .ktc-tabs,.kads-subtabs{padding:0 14px!important;overflow-x:auto;flex-wrap:nowrap!important;}
  .ktc-page > :not(.ktc-page-header):not(.ktc-tabs){margin-left:14px;margin-right:14px;}
}


/* === Sales & Finance compact title/name blocks === */
.kbos-module-content > .ksales-shell{
  padding:0!important;
  background:transparent!important;
  min-height:auto!important;
}
.kbos-module-content .ksales-page-head,
.kbos-module-content .kbos-page-head,
.kbos-module-content .kcrm-page-head.kbos-page-head{
  min-height:38px!important;
  padding:8px 12px!important;
  margin:0 0 12px!important;
  border-radius:12px!important;
  gap:8px!important;
}
.kbos-module-content .ksales-page-head h1,
.kbos-module-content .kbos-page-title{
  font-size:16px!important;
  line-height:1.15!important;
  font-weight:800!important;
  margin:0!important;
  gap:7px!important;
}
.kbos-module-content .ksales-page-head p,
.kbos-module-content .kbos-page-sub{
  font-size:11px!important;
  line-height:1.25!important;
  margin:1px 0 0!important;
}
.kbos-module-content .ksales-page-head .ksales-btn,
.kbos-module-content .kbos-page-head .kcrm-btn,
.kbos-module-content .kbos-page-head .kcrm-btn-ghost,
.kbos-module-content .kbos-action-row a{
  min-height:28px!important;
  padding:5px 10px!important;
  font-size:12px!important;
  border-radius:8px!important;
}
.kbos-module-content .kbos-action-row{
  gap:6px!important;
}
@media(max-width:820px){
  .kbos-module-content .ksales-page-head,
  .kbos-module-content .kbos-page-head,
  .kbos-module-content .kcrm-page-head.kbos-page-head{
    padding:7px 10px!important;
    margin-bottom:10px!important;
  }
  .kbos-module-content .ksales-page-head h1,
  .kbos-module-content .kbos-page-title{font-size:15px!important;}
  .kbos-module-content .ksales-page-head p,
  .kbos-module-content .kbos-page-sub{display:none!important;}
}



/* BOS module header refinement: page-specific top tabs only */
.kbos-module-topnav{position:sticky;top:0;z-index:20;}
.kbos-module-topnav-left{min-width:max-content;}
.kbos-module-tabs{justify-content:flex-end;}
.kbos-module-tab{white-space:nowrap;}
.kbos-module-content .kjp-page > .kcrm-card{padding-top:18px;}
.kbos-module-content .klm-page{padding-top:0!important;}
.kbos-module-content .ksp-wrap{padding-top:0!important;}
.kbos-module-content .ksp-tabs{margin-top:0!important;}
.kbos-module-content .kcrm-stats-grid:first-child,
.kbos-module-content > .kcrm-page > .kcrm-stats-grid:first-child{margin-top:0!important;}
@media(max-width:900px){
  .kbos-module-topnav{position:relative;top:auto;}
  .kbos-module-tabs{width:100%;justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px;}
  .kbos-module-tab{flex:0 0 auto;}
}

/* === BOS Sales & Finance page-specific top navigation 2.6.6.14 === */
.kbos-module-topnav--sales .kbos-module-title{
  font-size:15px;
  font-weight:700;
  letter-spacing:.01em;
}
.kbos-module-topnav--sales .kbos-module-tabs{
  justify-content:flex-end;
}
.kbos-module-content > .kbos-sales-bridge > .kbos-page-head,
.kbos-module-content > .ksales-shell > .ksales-page-head{
  display:none!important;
}
.kbos-module-content > .ksales-shell,
.kbos-module-content > .kbos-sales-bridge{
  padding-top:0!important;
  margin-top:0!important;
}
.kbos-module-content > .ksales-shell .ksales-stats:first-child,
.kbos-module-content > .kbos-sales-bridge .kbos-metrics:first-child,
.kbos-module-content > .kbos-sales-bridge .kbos-report-grid:first-child{
  margin-top:0!important;
}
.kbos-module-content .kbos-account-settings-tabs{
  display:none!important;
}
.kbos-module-content .kbos-full-form-shell{
  margin-top:0!important;
}
@media(max-width:860px){
  .kbos-module-topnav--sales .kbos-module-title{font-size:14px;}
  .kbos-module-topnav--sales .kbos-module-tabs{justify-content:flex-start;}
}


/* === HR & Payroll page-specific top navigation 2.6.6.16 === */
.kbos-module-topnav--hr .kbos-module-icon{
  background:linear-gradient(135deg,#7c3aed,#0f766e);
  box-shadow:0 6px 14px rgba(124,58,237,.16);
}
.kbos-module-topnav--hr .kbos-module-title{
  font-size:15px;
  font-weight:800;
}
.kbos-module-topnav--hr .kbos-module-tabs{
  flex:1 1 auto;
  justify-content:flex-end;
  min-width:0;
}
.kbos-module-topnav--hr .kbos-module-tab{
  padding:0 9px;
  font-size:12px;
  gap:4px;
}
.kbos-module-topnav--hr .kbos-module-tab:hover,
.kbos-module-topnav--hr .kbos-module-tab.active{
  color:#7c3aed;
  border-bottom-color:#7c3aed;
  background:#f5f3ff;
}
.kbos-module-content .khr-page.khr-page--modern{
  padding:0!important;
}
.kbos-module-content .khr-page.khr-page--modern > .khr-grid:first-child,
.kbos-module-content .khr-page.khr-page--modern > .khr-panel:first-child,
.kbos-module-content .khr-page.khr-page--modern > form:first-child{
  margin-top:0!important;
}
.kbos-module-content .khr-page.khr-page--modern .khr-hero,
.kbos-module-content .khr-page.khr-page--modern .khr-tabs{
  display:none!important;
}
@media(max-width:1180px){
  .kbos-module-topnav--hr{align-items:flex-start;flex-direction:column;height:auto;min-height:0;padding:10px 14px 0;gap:6px;}
  .kbos-module-topnav--hr .kbos-module-tabs{width:100%;justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap;}
  .kbos-module-topnav--hr .kbos-module-tab{height:42px;flex:0 0 auto;}
}


/* === BOS smooth in-app navigation loader === */
#kbos-spa-loader{
  position:fixed;left:0;top:0;height:3px;width:0;z-index:99999;
  background:linear-gradient(90deg,#60a5fa,#2563eb,#14b8a6);
  opacity:0;pointer-events:none;transition:width .28s ease,opacity .18s ease;
  box-shadow:0 0 14px rgba(37,99,235,.35);
}
#kbos-spa-loader.is-active{width:72%;opacity:1;animation:kbosSpaPulse 1.1s ease-in-out infinite;}
body.kbos-spa-loading .kcrm-main-content-area{opacity:.72;transition:opacity .16s ease;}
body.kbos-spa-loading .kcrm-content-shell{cursor:progress;}
@keyframes kbosSpaPulse{0%{width:18%;}55%{width:82%;}100%{width:96%;}}
@media(max-width:768px){#kbos-spa-loader{top:0;height:3px;}}

#kbos-spa-spinner{
  position:fixed;left:50%;top:50%;width:54px;height:54px;margin:-27px 0 0 -27px;z-index:100000;
  display:flex;align-items:center;justify-content:center;border-radius:999px;
  background:rgba(255,255,255,.92);box-shadow:0 18px 55px rgba(15,23,42,.20),0 0 0 1px rgba(226,232,240,.85);
  opacity:0;pointer-events:none;transform:scale(.92);transition:opacity .16s ease,transform .16s ease;backdrop-filter:blur(10px);
}
#kbos-spa-spinner span{width:26px;height:26px;border-radius:999px;border:3px solid #dbeafe;border-top-color:#1d4ed8;display:block;animation:kbosRoundSpin .72s linear infinite;}
#kbos-spa-spinner.is-active{opacity:1;transform:scale(1);}
@keyframes kbosRoundSpin{to{transform:rotate(360deg);}}
@media(max-width:768px){#kbos-spa-spinner{width:48px;height:48px;margin:-24px 0 0 -24px;}#kbos-spa-spinner span{width:23px;height:23px;}}


.kbos-spa-form-submitting{opacity:.78;pointer-events:none;}
.kbos-spa-form-submitting button,.kbos-spa-form-submitting input[type=submit]{cursor:progress!important;}


/* ===== Mobile app-style dashboard home + header ===== */
@media (max-width: 768px) {
  body.kcrm-view-dashboard .kcrm-topbar {
    position: sticky;
    top: 0;
    z-index: 1001;
    grid-template-columns: 42px 1fr 42px !important;
    gap: 0 !important;
    align-items: center !important;
    padding: 10px 14px !important;
    min-height: 64px !important;
    height: 64px !important;
    background: #f5f7fb !important;
    border-bottom: 1px solid #e8edf5 !important;
    box-shadow: 0 8px 18px rgba(15,23,42,.06) !important;
  }
  body.kcrm-view-dashboard .kcrm-topbar-center,
  body.kcrm-view-dashboard .kcrm-header-add-btn,
  body.kcrm-view-dashboard .kcrm-header-icon-wrap,
  body.kcrm-view-dashboard .kcrm-header-company-pill { display: none !important; }
  body.kcrm-view-dashboard .kcrm-topbar-left,
  body.kcrm-view-dashboard .kcrm-topbar-right { min-width: 0; display:flex; align-items:center; }
  body.kcrm-view-dashboard .kcrm-topbar-left { justify-content: flex-start; }
  body.kcrm-view-dashboard .kcrm-topbar-right { justify-content: flex-end; }
  body.kcrm-view-dashboard .kcrm-topbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px !important;
    text-decoration:none;
    max-width: calc(100% - 120px);
    white-space: nowrap;
  }
  body.kcrm-view-dashboard .kcrm-topbar-brand-logo { display:block !important; height: 18px !important; width: auto !important; filter: none !important; }
  body.kcrm-view-dashboard .kcrm-topbar-brand-mark,
  body.kcrm-view-dashboard .kcrm-topbar-brand-name { display: none !important; }
  body.kcrm-view-dashboard .kcrm-brand-divider { height: 16px; background: #cfd7e4; width: 1px; display:inline-block; flex:0 0 1px; }
  body.kcrm-view-dashboard .kcrm-topbar-brand-text { display: inline-block !important; font-size: 11px !important; letter-spacing: 1.6px !important; color:#111827 !important; font-weight:700 !important; }
  body.kcrm-view-dashboard .kcrm-topbar-toggle { width: 38px !important; height: 38px !important; border-radius: 12px !important; background:#fff !important; box-shadow:0 4px 12px rgba(15,23,42,.05) !important; }
  body.kcrm-view-dashboard .kcrm-topbar-toggle span { background:#475569 !important; width: 17px !important; }
  body.kcrm-view-dashboard .kcrm-profile-trigger {
    width: 38px; height: 38px; padding: 0 !important; border-radius: 50% !important; justify-content: center !important; background:#fff !important;
    box-shadow:0 4px 12px rgba(15,23,42,.05) !important; border:1px solid #edf1f7 !important;
  }
  body.kcrm-view-dashboard .kcrm-profile-meta,
  body.kcrm-view-dashboard .kcrm-profile-caret { display: none !important; }
  body.kcrm-view-dashboard .kcrm-user-avatar { width: 30px !important; height: 30px !important; font-size: 13px !important; }
  body.kcrm-view-dashboard .kcrm-main-content-area { padding: 12px 12px 88px !important; background:#f5f7fb; }
  body.kcrm-view-dashboard .kcrm-profile-menu {
    top: 60px !important; right: 12px !important; left: auto !important; width: min(300px, calc(100vw - 24px)) !important; border-radius: 20px !important;
    background: #fff !important; border: 1px solid #edf1f7 !important; box-shadow: 0 18px 34px rgba(15,23,42,.12) !important; padding: 0 !important; overflow: hidden;
  }
  body.kcrm-view-dashboard .kcrm-profile-menu-head { display:flex; align-items:flex-start; gap:12px; padding:16px; border-bottom:1px solid #edf1f7; background:#fff; }
  body.kcrm-view-dashboard .kcrm-profile-menu-avatar { width:46px; height:46px; border-radius:16px; display:inline-flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#6f63ff 0%, #818cf8 100%); color:#fff; font-size:16px; font-weight:800; flex:0 0 46px; }
  body.kcrm-view-dashboard .kcrm-profile-menu-ident { display:flex; flex-direction:column; min-width:0; }
  body.kcrm-view-dashboard .kcrm-profile-menu-company { font-size:15px; line-height:1.2; color:#111827; margin:1px 0 2px; }
  body.kcrm-view-dashboard .kcrm-profile-menu-user { font-size:12px; color:#64748b; margin-bottom:6px; }
  body.kcrm-view-dashboard .kcrm-profile-menu-role-badge { align-self:flex-start; font-size:11px; font-weight:700; color:#6d5df6; background:#f1efff; border-radius:999px; padding:3px 9px; }
  body.kcrm-view-dashboard .kcrm-profile-menu-link { display:flex; align-items:center; gap:10px; padding:14px 16px; text-decoration:none; color:#0f172a; font-size:13px; font-weight:600; }
  body.kcrm-view-dashboard .kcrm-profile-menu-signout { color:#ef4444; }

  body.kcrm-view-dashboard .kbos-mobile-home-greet { margin: 4px 2px 12px; }
  body.kcrm-view-dashboard .kbos-mobile-home-greet h1 { font-size: 24px; line-height: 1.08; font-weight: 700; margin:0; }
  body.kcrm-view-dashboard .kbos-mobile-home-greet p { margin-top: 4px; font-size: 12px; color:#6b7280; }
  body.kcrm-view-dashboard .kbos-mobile-summary-grid { gap: 10px; margin-bottom: 14px; }
  body.kcrm-view-dashboard .kbos-mobile-summary-card { border-radius: 18px; padding: 12px; min-height: 88px; gap: 10px; box-shadow: 0 6px 18px rgba(15,23,42,.04); }
  body.kcrm-view-dashboard .kbos-mobile-summary-icon { width: 42px; height: 42px; border-radius: 14px; font-size: 20px; flex-basis: 42px; }
  body.kcrm-view-dashboard .kbos-mobile-summary-title { font-size: 11px; margin-bottom: 2px; font-weight:500; }
  body.kcrm-view-dashboard .kbos-mobile-summary-value { font-size: 24px; font-weight: 700; }
  body.kcrm-view-dashboard .kbos-mobile-summary-sub { margin-top: 5px; font-size: 11px; }
  body.kcrm-view-dashboard .kbos-mobile-section-title { margin: 10px 2px 12px; font-size: 18px; font-weight: 700; }
  body.kcrm-view-dashboard .kbos-mobile-app-grid { gap: 10px; }
  body.kcrm-view-dashboard .kbos-mobile-app-tile { border-radius: 18px; padding: 12px 8px 12px; min-height: 108px; box-shadow: 0 6px 18px rgba(15,23,42,.04); }
  body.kcrm-view-dashboard .kbos-mobile-app-ico { width: 42px; height: 42px; border-radius: 14px; font-size: 21px; margin-bottom: 10px; }
  body.kcrm-view-dashboard .kbos-mobile-app-label { font-size: 11px; line-height: 1.18; font-weight: 600; }
}


/* ===== BOS mobile header final fix v2.6.6.22 =====
   Applies to ALL mobile app pages. Desktop is untouched. */
@media (max-width: 768px) {
  body.kcrm-frontend-body .kcrm-topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 2000 !important;
    display: grid !important;
    grid-template-columns: 42px 1fr 42px !important;
    align-items: center !important;
    gap: 0 !important;
    height: 64px !important;
    min-height: 64px !important;
    padding: 10px 14px !important;
    background: #0b213a !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    box-shadow: 0 8px 22px rgba(11,33,58,.22) !important;
    backdrop-filter: blur(14px) !important;
    overflow: hidden !important;
  }

  body.kcrm-frontend-body .kcrm-topbar-left,
  body.kcrm-frontend-body .kcrm-topbar-right {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    z-index: 2 !important;
  }
  body.kcrm-frontend-body .kcrm-topbar-left { justify-content: flex-start !important; }
  body.kcrm-frontend-body .kcrm-topbar-right { justify-content: flex-end !important; }

  /* No search bar in mobile header */
  body.kcrm-frontend-body .kcrm-topbar-center,
  body.kcrm-frontend-body .kcrm-global-search-form,
  body.kcrm-frontend-body .kcrm-header-add-btn,
  body.kcrm-frontend-body .kcrm-header-icon-wrap,
  body.kcrm-frontend-body .kcrm-header-company-pill {
    display: none !important;
  }

  /* Center [real white logo] | BOS exactly in the header */
  body.kcrm-frontend-body .kcrm-topbar-brand {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: auto !important;
    max-width: calc(100vw - 132px) !important;
    height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    z-index: 1 !important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-logo {
    display: block !important;
    height: 15px !important;
    width: auto !important;
    max-width: 102px !important;
    object-fit: contain !important;
    filter: brightness(0) invert(1) !important;
    opacity: .98 !important;
    flex: 0 1 auto !important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-mark,
  body.kcrm-frontend-body .kcrm-topbar-brand-name {
    display: none !important;
  }
  body.kcrm-frontend-body .kcrm-brand-divider {
    display: inline-block !important;
    width: 1px !important;
    height: 16px !important;
    background: rgba(255,255,255,.35) !important;
    flex: 0 0 1px !important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-text {
    display: inline-block !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 1.6px !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    opacity: .96 !important;
  }

  /* Left menu button */
  body.kcrm-frontend-body .kcrm-topbar-toggle {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,.08) !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 4px !important;
    padding: 0 !important;
  }
  body.kcrm-frontend-body .kcrm-topbar-toggle span {
    display: block !important;
    width: 17px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: #fff !important;
  }

  /* Right profile avatar, first letter only */
  body.kcrm-frontend-body .kcrm-profile-trigger {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    padding: 0 !important;
    border-radius: 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255,255,255,.08) !important;
    border: 1px solid rgba(255,255,255,.35) !important;
    box-shadow: none !important;
  }
  body.kcrm-frontend-body .kcrm-profile-meta,
  body.kcrm-frontend-body .kcrm-profile-caret {
    display: none !important;
  }
  body.kcrm-frontend-body .kcrm-user-avatar {
    width: 30px !important;
    height: 30px !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,.14) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* All mobile pages should start below a clean sticky header */
  body.kcrm-frontend-body .kcrm-main-content-area,
  body.kcrm-frontend-body .kaa-inbox-layout {
    padding-top: 14px !important;
  }

  /* Profile dropdown follows the app header on every mobile page */
  body.kcrm-frontend-body .kcrm-profile-menu {
    position: fixed !important;
    top: 58px !important;
    right: 12px !important;
    left: auto !important;
    width: min(300px, calc(100vw - 24px)) !important;
    border-radius: 18px !important;
    background: #fff !important;
    border: 1px solid #edf1f7 !important;
    box-shadow: 0 18px 34px rgba(15,23,42,.18) !important;
    padding: 0 !important;
    overflow: hidden !important;
    z-index: 2100 !important;
  }
  body.kcrm-frontend-body .kcrm-profile-menu-head {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 16px !important;
    border-bottom: 1px solid #edf1f7 !important;
    background: #fff !important;
  }
  body.kcrm-frontend-body .kcrm-profile-menu-avatar {
    width: 46px !important;
    height: 46px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg,#6f63ff 0%, #818cf8 100%) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    flex: 0 0 46px !important;
  }
  body.kcrm-frontend-body .kcrm-profile-menu-ident { display:flex !important; flex-direction:column !important; min-width:0 !important; }
  body.kcrm-frontend-body .kcrm-profile-menu-company { font-size:15px !important; line-height:1.2 !important; color:#111827 !important; margin:1px 0 2px !important; }
  body.kcrm-frontend-body .kcrm-profile-menu-user { font-size:12px !important; color:#64748b !important; margin-bottom:6px !important; }
  body.kcrm-frontend-body .kcrm-profile-menu-role-badge { align-self:flex-start !important; font-size:11px !important; font-weight:700 !important; color:#6d5df6 !important; background:#f1efff !important; border-radius:999px !important; padding:3px 9px !important; }
  body.kcrm-frontend-body .kcrm-profile-menu-link { display:flex !important; align-items:center !important; gap:10px !important; padding:14px 16px !important; text-decoration:none !important; color:#0f172a !important; font-size:13px !important; font-weight:600 !important; }
  body.kcrm-frontend-body .kcrm-profile-menu-signout { color:#ef4444 !important; }
}


/* ===== BOS mobile header sticky/fixed correction v2.6.6.23 ===== */
@media (max-width: 768px) {
  :root { --kbos-mobile-header-h: 60px; }
  html, body.kcrm-frontend-body { background: #f5f7fb !important; }

  body.kcrm-frontend-body .kcrm-content-shell {
    padding-top: calc(var(--kbos-mobile-header-h) + env(safe-area-inset-top, 0px)) !important;
  }

  body.kcrm-frontend-body .kcrm-topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: calc(var(--kbos-mobile-header-h) + env(safe-area-inset-top, 0px)) !important;
    min-height: calc(var(--kbos-mobile-header-h) + env(safe-area-inset-top, 0px)) !important;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 8px 8px 14px !important;
    box-sizing: border-box !important;
    background: #0b213a !important;
    background-color: #0b213a !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    box-shadow: 0 10px 24px rgba(11,33,58,.24) !important;
    z-index: 99990 !important;
    overflow: visible !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
  }

  body.kcrm-frontend-body .kcrm-topbar::before {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: calc(var(--kbos-mobile-header-h) + env(safe-area-inset-top, 0px));
    background: #0b213a;
    z-index: -1;
    pointer-events: none;
  }

  body.kcrm-frontend-body .kcrm-topbar-left,
  body.kcrm-frontend-body .kcrm-topbar-right {
    height: 42px !important;
    z-index: 100000 !important;
  }
  body.kcrm-frontend-body .kcrm-topbar-right {
    justify-content: flex-end !important;
    margin-right: -2px !important;
  }

  body.kcrm-frontend-body .kcrm-topbar-brand {
    height: 40px !important;
    max-width: calc(100vw - 112px) !important;
    gap: 9px !important;
    z-index: 99995 !important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-logo {
    height: 18px !important;
    max-width: 122px !important;
  }
  body.kcrm-frontend-body .kcrm-brand-divider {
    height: 18px !important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-text {
    font-size: 11px !important;
    letter-spacing: 1.7px !important;
  }

  body.kcrm-frontend-body .kcrm-profile-trigger {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }

  body.kcrm-frontend-body .kcrm-profile-dropdown {
    position: relative !important;
    z-index: 100000 !important;
    overflow: visible !important;
  }
  body.kcrm-frontend-body .kcrm-profile-menu {
    position: fixed !important;
    top: calc(var(--kbos-mobile-header-h) + env(safe-area-inset-top, 0px) + 6px) !important;
    right: 8px !important;
    left: auto !important;
    z-index: 999999 !important;
    overflow: visible !important;
    max-height: calc(100vh - var(--kbos-mobile-header-h) - env(safe-area-inset-top, 0px) - 16px) !important;
  }

  body.kcrm-mobile-sidebar-open .kcrm-app-sidebar {
    z-index: 99998 !important;
  }
  body.kcrm-frontend-body .kcrm-mobile-sidebar-backdrop {
    z-index: 99980 !important;
  }
}


/* ===== BOS mobile header safe-area + page heading stack fix v2.6.6.24 =====
   Navy fills the very top edge. Module/page headers stay below the main app header. */
@media (max-width: 768px) {
  :root {
    --kbos-mobile-header-h: 62px;
    --kbos-mobile-safe-top: env(safe-area-inset-top, 0px);
    --kbos-mobile-header-total: calc(var(--kbos-mobile-header-h) + var(--kbos-mobile-safe-top));
  }

  html {
    background: #0b213a !important;
    overscroll-behavior-y: none;
  }
  body.kcrm-frontend-body {
    background: linear-gradient(to bottom, #0b213a 0, #0b213a var(--kbos-mobile-header-total), #f5f7fb var(--kbos-mobile-header-total), #f5f7fb 100%) fixed !important;
  }
  body.kcrm-frontend-body .kcrm-wrap,
  body.kcrm-frontend-body .kcrm-app-shell,
  body.kcrm-frontend-body .kcrm-content-shell,
  body.kcrm-frontend-body .kcrm-body-layout,
  body.kcrm-frontend-body .kcrm-main-content-area {
    background-color: #f5f7fb !important;
  }

  body.kcrm-frontend-body .kcrm-content-shell {
    padding-top: var(--kbos-mobile-header-total) !important;
  }

  body.kcrm-frontend-body .kcrm-topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: var(--kbos-mobile-header-total) !important;
    min-height: var(--kbos-mobile-header-total) !important;
    padding: calc(8px + var(--kbos-mobile-safe-top)) 4px 8px 14px !important;
    box-sizing: border-box !important;
    background: #0b213a !important;
    background-color: #0b213a !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    box-shadow: 0 10px 24px rgba(11,33,58,.24) !important;
    z-index: 2147482000 !important;
    overflow: visible !important;
  }
  body.kcrm-frontend-body .kcrm-topbar::before {
    content: '' !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: var(--kbos-mobile-header-total) !important;
    background: #0b213a !important;
    z-index: -1 !important;
    pointer-events: none !important;
  }

  body.kcrm-frontend-body .kcrm-topbar-right {
    justify-content: flex-end !important;
    margin-right: -4px !important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-logo {
    height: 20px !important;
    max-width: 138px !important;
    filter: brightness(0) invert(1) !important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-text {
    font-size: 11px !important;
    letter-spacing: 1.8px !important;
  }

  /* Keep every page/module heading visible under the main app header. */
  body.kcrm-frontend-body .kbos-module-topnav,
  body.kcrm-frontend-body .ktc-page-header,
  body.kcrm-frontend-body .kads-platform-bar {
    position: sticky !important;
    top: var(--kbos-mobile-header-total) !important;
    z-index: 1600 !important;
    background: #fff !important;
  }

  body.kcrm-frontend-body .kbos-module-app,
  body.kcrm-frontend-body .ktc-page,
  body.kcrm-frontend-body .kads-shell {
    min-height: calc(100vh - var(--kbos-mobile-header-total)) !important;
  }

  body.kcrm-frontend-body .kbos-module-topnav {
    box-shadow: 0 1px 3px rgba(15,23,42,.06) !important;
  }
  body.kcrm-frontend-body .kbos-module-content {
    padding-top: 14px !important;
  }

  /* Profile dropdown must float above page headers and content. */
  body.kcrm-frontend-body .kcrm-profile-dropdown {
    position: relative !important;
    z-index: 2147483000 !important;
  }
  body.kcrm-frontend-body .kcrm-profile-menu {
    position: fixed !important;
    top: calc(var(--kbos-mobile-header-total) + 8px) !important;
    right: 8px !important;
    z-index: 2147483000 !important;
    max-height: calc(100vh - var(--kbos-mobile-header-total) - 16px) !important;
    overflow-y: auto !important;
  }

  body.kcrm-frontend-body .kcrm-app-sidebar {
    z-index: 2147482500 !important;
  }
  body.kcrm-frontend-body .kcrm-mobile-sidebar-backdrop {
    z-index: 2147482400 !important;
  }
}


/* ===== BOS mobile sticky stack cleanup v2.6.6.25 =====
   Main header stays fixed. Page heading + horizontal tabs stay sticky directly below it.
   Removes old mobile search/residue gap below header. Desktop untouched. */
@media (max-width: 768px) {
  :root{
    --kbos-mobile-header-h: 62px;
    --kbos-mobile-safe-top: env(safe-area-inset-top, 0px);
    --kbos-mobile-header-total: calc(var(--kbos-mobile-header-h) + var(--kbos-mobile-safe-top));
  }

  html{
    background:#0b213a!important;
    scroll-padding-top: var(--kbos-mobile-header-total)!important;
  }
  body.kcrm-frontend-body{
    background:#f5f7fb!important;
    padding-top:0!important;
    margin-top:0!important;
    overflow-x:hidden!important;
  }

  /* Remove the residue/gap below the fixed app header. */
  body.kcrm-frontend-body .kcrm-wrap,
  body.kcrm-frontend-body .kcrm-app-shell,
  body.kcrm-frontend-body .kcrm-content-shell,
  body.kcrm-frontend-body .kcrm-body-layout{
    margin-top:0!important;
    padding-top:0!important;
    background:#f5f7fb!important;
  }
  body.kcrm-frontend-body .kcrm-content-shell{
    padding-top:var(--kbos-mobile-header-total)!important;
    padding-bottom:calc(var(--kcrm-bottom-nav-h, 62px) + env(safe-area-inset-bottom, 0px))!important;
  }
  body.kcrm-frontend-body .kcrm-main-content-area{
    padding:0!important;
    margin:0!important;
    background:#f5f7fb!important;
    min-height:calc(100vh - var(--kbos-mobile-header-total))!important;
    overflow:visible!important;
  }

  /* App header: full navy to very top edge, no second/search row. */
  body.kcrm-frontend-body .kcrm-topbar{
    position:fixed!important;
    top:0!important;
    left:0!important;
    right:0!important;
    width:100vw!important;
    height:var(--kbos-mobile-header-total)!important;
    min-height:var(--kbos-mobile-header-total)!important;
    max-height:var(--kbos-mobile-header-total)!important;
    display:grid!important;
    grid-template-columns:44px 1fr 44px!important;
    align-items:end!important;
    gap:0!important;
    padding:calc(9px + var(--kbos-mobile-safe-top)) 6px 9px 12px!important;
    box-sizing:border-box!important;
    background:#0b213a!important;
    background-color:#0b213a!important;
    border:0!important;
    border-bottom:1px solid rgba(255,255,255,.08)!important;
    box-shadow:0 8px 22px rgba(11,33,58,.22)!important;
    z-index:2147482000!important;
    overflow:visible!important;
  }
  body.kcrm-frontend-body .kcrm-topbar::before{
    content:''!important;
    position:fixed!important;
    top:0!important;
    left:0!important;
    right:0!important;
    height:var(--kbos-mobile-header-total)!important;
    background:#0b213a!important;
    z-index:-1!important;
    pointer-events:none!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-center,
  body.kcrm-frontend-body .kcrm-global-search-form,
  body.kcrm-frontend-body .kcrm-global-search,
  body.kcrm-frontend-body .kcrm-header-add-btn,
  body.kcrm-frontend-body .kcrm-header-icon-wrap,
  body.kcrm-frontend-body .kcrm-header-company-pill{
    display:none!important;
    height:0!important;
    min-height:0!important;
    max-height:0!important;
    overflow:hidden!important;
    padding:0!important;
    margin:0!important;
    opacity:0!important;
    pointer-events:none!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-left,
  body.kcrm-frontend-body .kcrm-topbar-right{
    height:44px!important;
    min-height:44px!important;
    display:flex!important;
    align-items:center!important;
    min-width:0!important;
    position:relative!important;
    z-index:2147482100!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-left{justify-content:flex-start!important;grid-column:1!important;}
  body.kcrm-frontend-body .kcrm-topbar-right{justify-content:flex-end!important;grid-column:3!important;margin-right:-2px!important;}
  body.kcrm-frontend-body .kcrm-topbar-toggle{
    width:38px!important;
    height:38px!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.10)!important;
    border:1px solid rgba(255,255,255,.06)!important;
    box-shadow:none!important;
    margin:0!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-toggle span{background:#fff!important;width:17px!important;height:2px!important;}
  body.kcrm-frontend-body .kcrm-topbar-brand{
    position:absolute!important;
    left:50%!important;
    top:calc(var(--kbos-mobile-safe-top) + 12px)!important;
    transform:translateX(-50%)!important;
    height:40px!important;
    max-width:calc(100vw - 112px)!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    text-decoration:none!important;
    z-index:2147482050!important;
    overflow:hidden!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-logo{
    display:block!important;
    height:22px!important;
    max-width:150px!important;
    width:auto!important;
    object-fit:contain!important;
    filter:brightness(0) invert(1)!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-mark,
  body.kcrm-frontend-body .kcrm-topbar-brand-name{display:none!important;}
  body.kcrm-frontend-body .kcrm-brand-divider{
    width:1px!important;
    height:18px!important;
    background:rgba(255,255,255,.32)!important;
    flex:0 0 1px!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-text{
    display:inline-block!important;
    color:#fff!important;
    font-size:12px!important;
    line-height:1!important;
    letter-spacing:1.9px!important;
    font-weight:700!important;
  }
  body.kcrm-frontend-body .kcrm-profile-trigger{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    padding:0!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.12)!important;
    border:1px solid rgba(255,255,255,.16)!important;
    box-shadow:none!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  body.kcrm-frontend-body .kcrm-profile-meta,
  body.kcrm-frontend-body .kcrm-profile-caret{display:none!important;}
  body.kcrm-frontend-body .kcrm-user-avatar{
    width:31px!important;
    height:31px!important;
    border-radius:10px!important;
    background:rgba(255,255,255,.18)!important;
    color:#fff!important;
    font-size:13px!important;
    font-weight:800!important;
  }
  body.kcrm-frontend-body .kcrm-profile-dropdown{position:relative!important;z-index:2147483000!important;overflow:visible!important;}
  body.kcrm-frontend-body .kcrm-profile-menu{
    position:fixed!important;
    top:calc(var(--kbos-mobile-header-total) + 8px)!important;
    right:8px!important;
    left:auto!important;
    width:min(300px, calc(100vw - 18px))!important;
    max-height:calc(100vh - var(--kbos-mobile-header-total) - 18px)!important;
    overflow-y:auto!important;
    z-index:2147483500!important;
    border-radius:18px!important;
  }

  /* Mobile dashboard content: starts cleanly below header, no hidden greeting/search residue. */
  body.kcrm-view-dashboard .kbos-mobile-home,
  body.kcrm-frontend-body .kbos-mobile-home{
    padding:12px 12px 92px!important;
    margin:0!important;
    background:#f5f7fb!important;
  }
  body.kcrm-frontend-body .kbos-mobile-home-greet{margin:0 2px 12px!important;}
  body.kcrm-frontend-body .kbos-mobile-home-greet h1{font-size:22px!important;line-height:1.1!important;font-weight:700!important;margin:0!important;letter-spacing:-.01em!important;}
  body.kcrm-frontend-body .kbos-mobile-home-greet p{font-size:12px!important;line-height:1.35!important;margin:4px 0 0!important;color:#6b7280!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-grid{gap:10px!important;margin:0 0 14px!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-card{min-height:84px!important;border-radius:18px!important;padding:11px!important;gap:9px!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-icon{width:40px!important;height:40px!important;border-radius:13px!important;font-size:19px!important;flex:0 0 40px!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-title{font-size:11px!important;line-height:1.22!important;margin:0 0 2px!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-value{font-size:23px!important;line-height:1!important;font-weight:700!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-sub{font-size:10.5px!important;line-height:1.25!important;margin-top:5px!important;}
  body.kcrm-frontend-body .kbos-mobile-section-title{font-size:17px!important;line-height:1.2!important;margin:8px 2px 11px!important;font-weight:700!important;}
  body.kcrm-frontend-body .kbos-mobile-app-grid{gap:9px!important;}
  body.kcrm-frontend-body .kbos-mobile-app-tile{min-height:102px!important;border-radius:17px!important;padding:11px 7px!important;}
  body.kcrm-frontend-body .kbos-mobile-app-ico{width:40px!important;height:40px!important;border-radius:13px!important;font-size:20px!important;margin-bottom:8px!important;}
  body.kcrm-frontend-body .kbos-mobile-app-label{font-size:10.8px!important;line-height:1.18!important;font-weight:600!important;}

  /* Sticky stack for inner pages: Main header → Page heading → Scrollable tabs → Content. */
  body.kcrm-frontend-body .kbos-module-app{margin:0!important;padding:0!important;background:#f5f7fb!important;min-height:calc(100vh - var(--kbos-mobile-header-total))!important;}
  body.kcrm-frontend-body .kbos-module-topnav{
    position:sticky!important;
    top:var(--kbos-mobile-header-total)!important;
    z-index:1500!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:0!important;
    height:auto!important;
    min-height:0!important;
    padding:8px 12px 0!important;
    margin:0!important;
    background:#fff!important;
    border-bottom:1px solid #e5e7eb!important;
    box-shadow:0 2px 7px rgba(15,23,42,.045)!important;
    overflow:hidden!important;
  }
  body.kcrm-frontend-body .kbos-module-topnav-left{
    width:100%!important;
    min-width:0!important;
    height:30px!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    padding:0!important;
    margin:0!important;
    flex:0 0 30px!important;
  }
  body.kcrm-frontend-body .kbos-module-icon{width:20px!important;height:20px!important;border-radius:7px!important;font-size:11px!important;flex:0 0 20px!important;}
  body.kcrm-frontend-body .kbos-module-title{
    font-size:15px!important;
    line-height:1!important;
    font-weight:750!important;
    color:#111827!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.kcrm-frontend-body .kbos-module-tabs{
    width:calc(100% + 24px)!important;
    height:38px!important;
    min-height:38px!important;
    margin:0 -12px!important;
    padding:0 12px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:2px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    flex-wrap:nowrap!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important;
  }
  body.kcrm-frontend-body .kbos-module-tabs::-webkit-scrollbar{display:none!important;}
  body.kcrm-frontend-body .kbos-module-tab{
    height:38px!important;
    flex:0 0 auto!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    padding:0 10px!important;
    font-size:12px!important;
    font-weight:600!important;
    white-space:nowrap!important;
    border-bottom:2px solid transparent!important;
    border-radius:0!important;
  }
  body.kcrm-frontend-body .kbos-module-tab-icon{font-size:11px!important;}
  body.kcrm-frontend-body .kbos-module-content{
    padding:12px 12px 92px!important;
    margin:0!important;
    background:#f5f7fb!important;
    overflow:visible!important;
  }

  /* Other module/tab systems should also sit under the main header and scroll horizontally. */
  body.kcrm-frontend-body .ktc-page-header,
  body.kcrm-frontend-body .kads-platform-bar{
    position:sticky!important;
    top:var(--kbos-mobile-header-total)!important;
    z-index:1500!important;
    margin:0!important;
    background:#fff!important;
  }
  body.kcrm-frontend-body .ktc-tabs,
  body.kcrm-frontend-body .kads-subtabs{
    position:sticky!important;
    top:calc(var(--kbos-mobile-header-total) + 44px)!important;
    z-index:1499!important;
    display:flex!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    flex-wrap:nowrap!important;
    white-space:nowrap!important;
    background:#fff!important;
    scrollbar-width:none!important;
  }
  body.kcrm-frontend-body .ktc-tabs::-webkit-scrollbar,
  body.kcrm-frontend-body .kads-subtabs::-webkit-scrollbar{display:none!important;}

  body.kcrm-frontend-body .kcrm-app-sidebar{z-index:2147482500!important;}
  body.kcrm-frontend-body .kcrm-mobile-sidebar-backdrop{z-index:2147482400!important;}
}

/* ===== BOS mobile final correction v2.6.6.26 =====
   Fixed stack: Navy app header -> page title -> scrollable tabs -> content. */
@media (max-width: 768px) {
  :root{
    --kbos-mobile-safe-top: env(safe-area-inset-top, 0px);
    --kbos-mobile-safe-right: env(safe-area-inset-right, 0px);
    --kbos-mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --kbos-mobile-header-h: 60px;
    --kbos-mobile-header-total: calc(var(--kbos-mobile-header-h) + var(--kbos-mobile-safe-top));
    --kbos-mobile-pagehead-h: 44px;
    --kbos-mobile-tabs-h: 42px;
    --kbos-mobile-navy: #0b213a;
    --kbos-mobile-bg: #f5f7fb;
  }

  html,
  body.kcrm-frontend-body{
    margin:0!important;
    padding:0!important;
    min-height:100%!important;
    overflow-x:hidden!important;
    background:var(--kbos-mobile-navy)!important;
  }

  body.kcrm-frontend-body::before{
    content:''!important;
    position:fixed!important;
    top:0!important;
    left:0!important;
    right:0!important;
    height:var(--kbos-mobile-header-total)!important;
    background:var(--kbos-mobile-navy)!important;
    z-index:2147480000!important;
    pointer-events:none!important;
  }

  body.kcrm-frontend-body .kcrm-wrap,
  body.kcrm-frontend-body .kcrm-app-shell,
  body.kcrm-frontend-body .kcrm-content-shell,
  body.kcrm-frontend-body .kcrm-body-layout,
  body.kcrm-frontend-body .kcrm-main-content-area,
  body.kcrm-frontend-body .kbos-module-app,
  body.kcrm-frontend-body .kbos-module-content{
    background:var(--kbos-mobile-bg)!important;
  }

  body.kcrm-frontend-body .kcrm-content-shell{
    margin-left:0!important;
    padding-top:var(--kbos-mobile-header-total)!important;
    padding-bottom:calc(var(--kcrm-bottom-nav-h, 62px) + var(--kbos-mobile-safe-bottom))!important;
    overflow:visible!important;
  }
  body.kcrm-frontend-body .kcrm-body-layout,
  body.kcrm-frontend-body .kcrm-body-layout--plain,
  body.kcrm-frontend-body .kcrm-body-layout--dashboard{
    display:block!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }
  body.kcrm-frontend-body .kcrm-main-content-area,
  body.kcrm-frontend-body .kaa-inbox-layout{
    margin:0!important;
    padding:0!important;
    min-height:calc(100svh - var(--kbos-mobile-header-total))!important;
    overflow:visible!important;
  }

  /* Main app header: fixed, full navy, centred logo, profile on far right. */
  body.kcrm-frontend-body .kcrm-topbar{
    position:fixed!important;
    top:0!important;
    left:0!important;
    right:0!important;
    width:100vw!important;
    height:var(--kbos-mobile-header-total)!important;
    min-height:var(--kbos-mobile-header-total)!important;
    max-height:var(--kbos-mobile-header-total)!important;
    display:grid!important;
    grid-template-columns:48px 1fr 48px!important;
    align-items:end!important;
    justify-content:stretch!important;
    gap:0!important;
    padding:calc(8px + var(--kbos-mobile-safe-top)) max(8px, var(--kbos-mobile-safe-right)) 8px 12px!important;
    box-sizing:border-box!important;
    background:var(--kbos-mobile-navy)!important;
    background-color:var(--kbos-mobile-navy)!important;
    border:0!important;
    border-bottom:1px solid rgba(255,255,255,.08)!important;
    box-shadow:0 8px 18px rgba(11,33,58,.22)!important;
    z-index:2147481000!important;
    overflow:visible!important;
    transform:translateZ(0)!important;
    -webkit-transform:translateZ(0)!important;
  }
  body.kcrm-frontend-body .kcrm-topbar::before{
    content:''!important;
    position:fixed!important;
    top:0!important;
    left:0!important;
    right:0!important;
    height:var(--kbos-mobile-header-total)!important;
    background:var(--kbos-mobile-navy)!important;
    z-index:-1!important;
    pointer-events:none!important;
  }

  body.kcrm-frontend-body .kcrm-topbar-center,
  body.kcrm-frontend-body .kcrm-global-search-form,
  body.kcrm-frontend-body .kcrm-global-search,
  body.kcrm-frontend-body .kcrm-header-add-btn,
  body.kcrm-frontend-body .kcrm-header-icon-wrap,
  body.kcrm-frontend-body .kcrm-header-company-pill{
    display:none!important;
    width:0!important;
    height:0!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  body.kcrm-frontend-body .kcrm-topbar-left,
  body.kcrm-frontend-body .kcrm-topbar-right{
    display:flex!important;
    align-items:center!important;
    height:44px!important;
    min-height:44px!important;
    min-width:0!important;
    position:relative!important;
    z-index:2147481200!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-left{grid-column:1!important;justify-content:flex-start!important;}
  body.kcrm-frontend-body .kcrm-topbar-right{grid-column:3!important;justify-content:flex-end!important;margin-right:-3px!important;}

  body.kcrm-frontend-body .kcrm-topbar-toggle{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    margin:0!important;
    padding:0!important;
    border-radius:12px!important;
    border:1px solid rgba(255,255,255,.08)!important;
    background:rgba(255,255,255,.10)!important;
    box-shadow:none!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-toggle span{
    display:block!important;
    width:17px!important;
    height:2px!important;
    border-radius:999px!important;
    background:#fff!important;
  }

  body.kcrm-frontend-body .kcrm-topbar-brand{
    position:fixed!important;
    left:50vw!important;
    top:calc(var(--kbos-mobile-safe-top) + 30px)!important;
    transform:translate(-50%, -50%)!important;
    height:40px!important;
    max-width:calc(100vw - 118px)!important;
    width:auto!important;
    padding:0!important;
    margin:0!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-decoration:none!important;
    z-index:2147481150!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-logo{
    display:block!important;
    height:24px!important;
    max-height:24px!important;
    max-width:142px!important;
    width:auto!important;
    object-fit:contain!important;
    filter:brightness(0) invert(1)!important;
    opacity:.98!important;
    flex:0 1 auto!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-mark,
  body.kcrm-frontend-body .kcrm-topbar-brand-name{display:none!important;}
  body.kcrm-frontend-body .kcrm-brand-divider{
    display:inline-block!important;
    width:1px!important;
    height:18px!important;
    background:rgba(255,255,255,.36)!important;
    flex:0 0 1px!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-text{
    display:inline-block!important;
    color:#fff!important;
    font-size:12px!important;
    font-weight:700!important;
    letter-spacing:1.9px!important;
    line-height:1!important;
    text-transform:uppercase!important;
  }

  body.kcrm-frontend-body .kcrm-profile-dropdown{position:relative!important;z-index:2147483000!important;overflow:visible!important;}
  body.kcrm-frontend-body .kcrm-profile-trigger{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    margin:0!important;
    padding:0!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.12)!important;
    border:1px solid rgba(255,255,255,.22)!important;
    box-shadow:none!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  body.kcrm-frontend-body .kcrm-profile-meta,
  body.kcrm-frontend-body .kcrm-profile-caret{display:none!important;}
  body.kcrm-frontend-body .kcrm-user-avatar{
    width:31px!important;
    height:31px!important;
    border-radius:10px!important;
    background:rgba(255,255,255,.17)!important;
    color:#fff!important;
    font-size:13px!important;
    font-weight:800!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  body.kcrm-frontend-body .kcrm-profile-menu{
    position:fixed!important;
    top:calc(var(--kbos-mobile-header-total) + 8px)!important;
    right:8px!important;
    left:auto!important;
    width:min(300px, calc(100vw - 18px))!important;
    max-height:calc(100svh - var(--kbos-mobile-header-total) - 18px)!important;
    overflow-y:auto!important;
    z-index:2147483600!important;
    border-radius:18px!important;
    background:#fff!important;
    box-shadow:0 18px 34px rgba(15,23,42,.20)!important;
  }

  /* Dashboard: no residue under header, greeting starts normally. */
  body.kcrm-frontend-body .kbos-mobile-home{
    padding:10px 12px 92px!important;
    margin:0!important;
    background:var(--kbos-mobile-bg)!important;
  }
  body.kcrm-frontend-body .kbos-mobile-home-greet{margin:0 2px 12px!important;}
  body.kcrm-frontend-body .kbos-mobile-home-greet h1{font-size:22px!important;line-height:1.1!important;font-weight:700!important;margin:0!important;letter-spacing:-.01em!important;}
  body.kcrm-frontend-body .kbos-mobile-home-greet p{font-size:12px!important;line-height:1.35!important;margin:4px 0 0!important;color:#6b7280!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-grid{gap:10px!important;margin:0 0 14px!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-card{min-height:84px!important;border-radius:18px!important;padding:11px!important;gap:9px!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-icon{width:40px!important;height:40px!important;border-radius:13px!important;font-size:19px!important;flex:0 0 40px!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-title{font-size:11px!important;line-height:1.22!important;margin:0 0 2px!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-value{font-size:23px!important;line-height:1!important;font-weight:700!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-sub{font-size:10.5px!important;line-height:1.25!important;margin-top:5px!important;}
  body.kcrm-frontend-body .kbos-mobile-section-title{font-size:17px!important;line-height:1.2!important;margin:8px 2px 11px!important;font-weight:700!important;}
  body.kcrm-frontend-body .kbos-mobile-app-grid{gap:9px!important;}
  body.kcrm-frontend-body .kbos-mobile-app-tile{min-height:102px!important;border-radius:17px!important;padding:11px 7px!important;}
  body.kcrm-frontend-body .kbos-mobile-app-ico{width:40px!important;height:40px!important;border-radius:13px!important;font-size:20px!important;margin-bottom:8px!important;}
  body.kcrm-frontend-body .kbos-mobile-app-label{font-size:10.8px!important;line-height:1.18!important;font-weight:600!important;}

  /* Inner pages: sticky stack under main header. */
  body.kcrm-frontend-body .kbos-module-app{margin:0!important;padding:0!important;overflow:visible!important;}
  body.kcrm-frontend-body .kbos-module-topnav{
    position:sticky!important;
    top:var(--kbos-mobile-header-total)!important;
    z-index:1800!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:0!important;
    height:auto!important;
    min-height:calc(var(--kbos-mobile-pagehead-h) + var(--kbos-mobile-tabs-h))!important;
    padding:0!important;
    margin:0!important;
    background:#fff!important;
    border-bottom:1px solid #e5e7eb!important;
    box-shadow:0 2px 7px rgba(15,23,42,.045)!important;
    overflow:hidden!important;
  }
  body.kcrm-frontend-body .kbos-module-topnav-left{
    width:100%!important;
    height:var(--kbos-mobile-pagehead-h)!important;
    min-height:var(--kbos-mobile-pagehead-h)!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    padding:0 12px!important;
    margin:0!important;
    flex:0 0 var(--kbos-mobile-pagehead-h)!important;
    box-sizing:border-box!important;
    background:#fff!important;
  }
  body.kcrm-frontend-body .kbos-module-icon{width:22px!important;height:22px!important;border-radius:7px!important;font-size:12px!important;flex:0 0 22px!important;}
  body.kcrm-frontend-body .kbos-module-title{
    font-size:15px!important;
    line-height:1!important;
    font-weight:750!important;
    color:#111827!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.kcrm-frontend-body .kbos-module-tabs{
    width:100%!important;
    height:var(--kbos-mobile-tabs-h)!important;
    min-height:var(--kbos-mobile-tabs-h)!important;
    margin:0!important;
    padding:0 12px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:2px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    flex-wrap:nowrap!important;
    white-space:nowrap!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important;
    box-sizing:border-box!important;
    background:#fff!important;
  }
  body.kcrm-frontend-body .kbos-module-tabs::-webkit-scrollbar{display:none!important;}
  body.kcrm-frontend-body .kbos-module-tab{
    height:var(--kbos-mobile-tabs-h)!important;
    flex:0 0 auto!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    padding:0 10px!important;
    font-size:12px!important;
    font-weight:600!important;
    white-space:nowrap!important;
    border-radius:0!important;
    border-bottom:2px solid transparent!important;
  }
  body.kcrm-frontend-body .kbos-module-tab-icon{font-size:11px!important;}
  body.kcrm-frontend-body .kbos-module-content{
    margin:0!important;
    padding:12px 12px 92px!important;
    background:var(--kbos-mobile-bg)!important;
    overflow:visible!important;
  }

  /* Other tab systems get a safe sticky position too. */
  body.kcrm-frontend-body .ktc-page-header,
  body.kcrm-frontend-body .kads-platform-bar{
    position:sticky!important;
    top:var(--kbos-mobile-header-total)!important;
    z-index:1700!important;
    margin:0!important;
    background:#fff!important;
  }
  body.kcrm-frontend-body .ktc-tabs,
  body.kcrm-frontend-body .kads-subtabs{
    position:sticky!important;
    top:calc(var(--kbos-mobile-header-total) + 44px)!important;
    z-index:1690!important;
    display:flex!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    flex-wrap:nowrap!important;
    white-space:nowrap!important;
    background:#fff!important;
    scrollbar-width:none!important;
  }
  body.kcrm-frontend-body .ktc-tabs::-webkit-scrollbar,
  body.kcrm-frontend-body .kads-subtabs::-webkit-scrollbar{display:none!important;}

  /* Bottom app footer/nav safe area colour. */
  body.kcrm-frontend-body .kcrm-mobile-bottom-nav{
    background:#fff!important;
    border-top:1px solid #edf1f7!important;
    z-index:1600!important;
  }
  body.kcrm-frontend-body .kcrm-mobile-bottom-nav::after{
    content:'';
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    height:var(--kbos-mobile-safe-bottom);
    background:#fff;
    pointer-events:none;
  }

  body.kcrm-frontend-body .kcrm-app-sidebar{z-index:2147482500!important;}
  body.kcrm-frontend-body .kcrm-mobile-sidebar-backdrop{z-index:2147482400!important;}
}


/* ===== BOS mobile super-sticky heading/tabs final correction v2.6.6.27 =====
   Header -> page heading -> tabs are fixed as a single app stack.
   No empty tab space when a module has no tabs. Desktop untouched. */
@media (max-width: 768px) {
  :root{
    --kbos-mobile-safe-top: env(safe-area-inset-top, 0px);
    --kbos-mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --kbos-mobile-header-h: 60px;
    --kbos-mobile-header-total: calc(var(--kbos-mobile-header-h) + var(--kbos-mobile-safe-top));
    --kbos-mobile-pagehead-h: 42px;
    --kbos-mobile-tabs-h: 40px;
    --kbos-mobile-navy: #0b213a;
    --kbos-mobile-bg: #f5f7fb;
  }

  html,
  body.kcrm-frontend-body{
    background:var(--kbos-mobile-navy)!important;
    overflow-x:hidden!important;
    scroll-padding-top:var(--kbos-mobile-header-total)!important;
  }
  body.kcrm-frontend-body .kcrm-content-shell{
    padding-top:var(--kbos-mobile-header-total)!important;
    background:var(--kbos-mobile-bg)!important;
    overflow:visible!important;
  }
  body.kcrm-frontend-body .kcrm-body-layout,
  body.kcrm-frontend-body .kcrm-main-content-area{
    overflow:visible!important;
    background:var(--kbos-mobile-bg)!important;
  }

  /* Main header stays fixed. Navy extends to the phone top edge. */
  body.kcrm-frontend-body .kcrm-topbar{
    position:fixed!important;
    top:0!important;
    left:0!important;
    right:0!important;
    width:100vw!important;
    height:var(--kbos-mobile-header-total)!important;
    min-height:var(--kbos-mobile-header-total)!important;
    max-height:var(--kbos-mobile-header-total)!important;
    background:var(--kbos-mobile-navy)!important;
    background-color:var(--kbos-mobile-navy)!important;
    z-index:2147481000!important;
    transform:none!important;
    -webkit-transform:none!important;
    grid-template-columns:48px 1fr 48px!important;
    padding:calc(8px + var(--kbos-mobile-safe-top)) 8px 8px 12px!important;
  }
  body.kcrm-frontend-body .kcrm-topbar::before,
  body.kcrm-frontend-body::before{
    content:''!important;
    position:fixed!important;
    top:0!important;left:0!important;right:0!important;
    height:var(--kbos-mobile-header-total)!important;
    background:var(--kbos-mobile-navy)!important;
    z-index:2147480000!important;
    pointer-events:none!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand{
    position:fixed!important;
    left:50%!important;
    top:calc(var(--kbos-mobile-safe-top) + 30px)!important;
    transform:translate(-50%, -50%)!important;
    z-index:2147481300!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-logo{
    height:24px!important;
    max-height:24px!important;
    max-width:142px!important;
    filter:brightness(0) invert(1)!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-right{margin-right:-3px!important;}
  body.kcrm-frontend-body .kcrm-profile-menu{z-index:2147483600!important;}

  /* Dashboard has no module heading. Start content immediately under main header. */
  body.kcrm-view-dashboard .kcrm-main-content-area{
    padding:0!important;
  }
  body.kcrm-view-dashboard .kbos-mobile-home{
    padding:10px 12px calc(92px + var(--kbos-mobile-safe-bottom))!important;
    margin:0!important;
  }

  /* Inner modules: fixed page heading/tabs below the main header. */
  body.kcrm-frontend-body .kbos-module-app{
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    background:var(--kbos-mobile-bg)!important;
  }
  body.kcrm-frontend-body .kbos-module-topnav{
    position:fixed!important;
    top:var(--kbos-mobile-header-total)!important;
    left:0!important;
    right:0!important;
    width:100vw!important;
    z-index:214748000!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:0!important;
    padding:0!important;
    margin:0!important;
    background:#fff!important;
    border-bottom:1px solid #e5e7eb!important;
    box-shadow:0 3px 9px rgba(15,23,42,.06)!important;
    overflow:hidden!important;
    transform:none!important;
  }
  body.kcrm-frontend-body .kbos-module-topnav.kbos-module-topnav--has-tabs{
    height:calc(var(--kbos-mobile-pagehead-h) + var(--kbos-mobile-tabs-h))!important;
    min-height:calc(var(--kbos-mobile-pagehead-h) + var(--kbos-mobile-tabs-h))!important;
    max-height:calc(var(--kbos-mobile-pagehead-h) + var(--kbos-mobile-tabs-h))!important;
  }
  body.kcrm-frontend-body .kbos-module-topnav.kbos-module-topnav--no-tabs{
    height:var(--kbos-mobile-pagehead-h)!important;
    min-height:var(--kbos-mobile-pagehead-h)!important;
    max-height:var(--kbos-mobile-pagehead-h)!important;
  }
  body.kcrm-frontend-body .kbos-module-topnav-left{
    height:var(--kbos-mobile-pagehead-h)!important;
    min-height:var(--kbos-mobile-pagehead-h)!important;
    flex:0 0 var(--kbos-mobile-pagehead-h)!important;
    width:100%!important;
    padding:0 12px!important;
    margin:0!important;
    display:flex!important;
    align-items:center!important;
    box-sizing:border-box!important;
    background:#fff!important;
  }
  body.kcrm-frontend-body .kbos-module-title{
    font-size:15px!important;
    font-weight:750!important;
    line-height:1!important;
  }
  body.kcrm-frontend-body .kbos-module-tabs{
    height:var(--kbos-mobile-tabs-h)!important;
    min-height:var(--kbos-mobile-tabs-h)!important;
    flex:0 0 var(--kbos-mobile-tabs-h)!important;
    width:100%!important;
    padding:0 12px!important;
    margin:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:2px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    flex-wrap:nowrap!important;
    white-space:nowrap!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important;
    background:#fff!important;
    box-sizing:border-box!important;
  }
  body.kcrm-frontend-body .kbos-module-tabs::-webkit-scrollbar{display:none!important;}
  body.kcrm-frontend-body .kbos-module-tab{
    flex:0 0 auto!important;
    height:var(--kbos-mobile-tabs-h)!important;
    padding:0 10px!important;
    font-size:12px!important;
    font-weight:600!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
  }

  /* Content begins below the fixed page heading/tabs. */
  body.kcrm-frontend-body .kbos-module-topnav--has-tabs + .kbos-module-content{
    padding:calc(var(--kbos-mobile-pagehead-h) + var(--kbos-mobile-tabs-h) + 12px) 12px calc(92px + var(--kbos-mobile-safe-bottom))!important;
  }
  body.kcrm-frontend-body .kbos-module-topnav--no-tabs + .kbos-module-content{
    padding:calc(var(--kbos-mobile-pagehead-h) + 12px) 12px calc(92px + var(--kbos-mobile-safe-bottom))!important;
  }
  body.kcrm-frontend-body .kbos-module-content{
    margin:0!important;
    background:var(--kbos-mobile-bg)!important;
    overflow:visible!important;
  }

  /* Other legacy page header/tab systems should also stay below the main header. */
  body.kcrm-frontend-body .ktc-page-header,
  body.kcrm-frontend-body .kads-platform-bar{
    position:fixed!important;
    top:var(--kbos-mobile-header-total)!important;
    left:0!important;right:0!important;width:100vw!important;
    height:var(--kbos-mobile-pagehead-h)!important;
    min-height:var(--kbos-mobile-pagehead-h)!important;
    z-index:214747900!important;
    margin:0!important;
    background:#fff!important;
    box-shadow:0 2px 7px rgba(15,23,42,.045)!important;
  }
  body.kcrm-frontend-body .ktc-tabs,
  body.kcrm-frontend-body .kads-subtabs{
    position:fixed!important;
    top:calc(var(--kbos-mobile-header-total) + var(--kbos-mobile-pagehead-h))!important;
    left:0!important;right:0!important;width:100vw!important;
    height:var(--kbos-mobile-tabs-h)!important;
    min-height:var(--kbos-mobile-tabs-h)!important;
    z-index:214747890!important;
    display:flex!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    flex-wrap:nowrap!important;
    white-space:nowrap!important;
    background:#fff!important;
    scrollbar-width:none!important;
  }
  body.kcrm-frontend-body .ktc-tabs::-webkit-scrollbar,
  body.kcrm-frontend-body .kads-subtabs::-webkit-scrollbar{display:none!important;}
}


/* ===== BOS mobile safety styles for Orders, Create Order, and Job Pipeline v2.6.6.28 ===== */
@media (max-width: 768px) {
  /* Sales order list/create/detail pages */
  body.kcrm-frontend-body .kbos-module-content .ksales-shell{
    padding:0!important;
    min-height:auto!important;
    background:transparent!important;
  }
  body.kcrm-frontend-body .kbos-module-content .ksales-page-head{
    display:none!important; /* page heading is already in sticky module header */
  }
  body.kcrm-frontend-body .ksales-stats{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
    margin:0 0 12px!important;
  }
  body.kcrm-frontend-body .ksales-stat{
    border-radius:16px!important;
    padding:12px!important;
    box-shadow:0 6px 18px rgba(15,23,42,.04)!important;
  }
  body.kcrm-frontend-body .ksales-stat-val{font-size:18px!important;line-height:1.05!important;}
  body.kcrm-frontend-body .ksales-stat-label{font-size:9.5px!important;letter-spacing:.35px!important;}
  body.kcrm-frontend-body .ksales-tabs{
    display:flex!important;
    align-items:center!important;
    gap:2px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    flex-wrap:nowrap!important;
    white-space:nowrap!important;
    margin:0 0 12px!important;
    padding:0 0 6px!important;
    border-bottom:1px solid #e5e7eb!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important;
  }
  body.kcrm-frontend-body .ksales-tabs::-webkit-scrollbar{display:none!important;}
  body.kcrm-frontend-body .ksales-tab{
    flex:0 0 auto!important;
    font-size:11px!important;
    padding:8px 10px!important;
    border-radius:999px!important;
    border:1px solid #e5e7eb!important;
    background:#fff!important;
    margin:0!important;
  }
  body.kcrm-frontend-body .ksales-tab.active{
    border-color:#10b981!important;
    color:#047857!important;
    background:#ecfdf5!important;
  }
  body.kcrm-frontend-body .ksales-tabs form{
    flex:0 0 100%!important;
    width:100%!important;
    margin:8px 0 0!important;
    display:flex!important;
    gap:8px!important;
  }
  body.kcrm-frontend-body .ksales-tabs form .ksales-search{width:100%!important;min-width:0!important;}
  body.kcrm-frontend-body .ksales-card{
    border-radius:16px!important;
    margin-bottom:12px!important;
    box-shadow:0 6px 18px rgba(15,23,42,.045)!important;
  }
  body.kcrm-frontend-body .ksales-card-head{padding:12px 14px!important;}
  body.kcrm-frontend-body .ksales-card-head h2{font-size:13px!important;}
  body.kcrm-frontend-body .ksales-card-body{padding:14px!important;}
  body.kcrm-frontend-body .ksales-table-wrap{
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch!important;
    border-radius:14px!important;
  }
  body.kcrm-frontend-body .ksales-table{min-width:760px!important;font-size:12px!important;}
  body.kcrm-frontend-body .ksales-table th{font-size:9px!important;padding:9px 10px!important;}
  body.kcrm-frontend-body .ksales-table td{padding:10px!important;}
  body.kcrm-frontend-body .ksales-btn{min-height:38px!important;border-radius:10px!important;font-size:12px!important;padding:7px 12px!important;}
  body.kcrm-frontend-body .ksales-btn.sm{min-height:32px!important;font-size:11px!important;padding:5px 10px!important;}

  /* Create Order / Order Detail */
  body.kcrm-frontend-body .ksales-order-create-layout,
  body.kcrm-frontend-body .ksales-order-detail-layout{
    display:flex!important;
    flex-direction:column!important;
    gap:12px!important;
  }
  body.kcrm-frontend-body .ksales-order-create-main,
  body.kcrm-frontend-body .ksales-order-create-side,
  body.kcrm-frontend-body .ksales-order-detail-main,
  body.kcrm-frontend-body .ksales-order-detail-side{display:contents!important;}
  body.kcrm-frontend-body .ksales-order-card-customer{order:1!important;}
  body.kcrm-frontend-body .ksales-order-card-products{order:2!important;}
  body.kcrm-frontend-body .ksales-order-card-discount{order:3!important;}
  body.kcrm-frontend-body .ksales-order-card-payment{order:4!important;}
  body.kcrm-frontend-body .ksales-order-card-shipping{order:5!important;}
  body.kcrm-frontend-body .ksales-order-card-notes{order:6!important;}
  body.kcrm-frontend-body .ksales-order-submit-wrap{
    order:7!important;
    position:sticky!important;
    bottom:calc(58px + env(safe-area-inset-bottom, 0px))!important;
    z-index:1300!important;
    padding:10px 0!important;
    background:rgba(245,247,251,.96)!important;
    backdrop-filter:blur(10px)!important;
  }
  body.kcrm-frontend-body .ksales-order-submit-btn{width:100%!important;min-height:46px!important;justify-content:center!important;}
  body.kcrm-frontend-body .ksales-form-grid,
  body.kcrm-frontend-body .ksales-form-grid.col2,
  body.kcrm-frontend-body .ksales-form-grid.col3,
  body.kcrm-frontend-body .ksales-form-grid.col4{
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  body.kcrm-frontend-body .ksales-input,
  body.kcrm-frontend-body .ksales-select,
  body.kcrm-frontend-body .ksales-textarea,
  body.kcrm-frontend-body .ksales-search{
    min-height:42px!important;
    font-size:15px!important;
    border-radius:10px!important;
  }
  body.kcrm-frontend-body .ksales-line-item{
    grid-template-columns:minmax(0,1fr) 78px 38px!important;
    gap:8px!important;
    padding:10px!important;
    border-radius:12px!important;
  }
  body.kcrm-frontend-body .ksales-line-item-name{grid-column:1 / -1!important;}
  body.kcrm-frontend-body .ksales-line-item-amount{grid-column:1 / 2!important;}
  body.kcrm-frontend-body .ksales-line-item-qty{grid-column:2 / 3!important;}
  body.kcrm-frontend-body .ksales-line-item-remove{grid-column:3 / 4!important;}
  body.kcrm-frontend-body .ksales-search-results{
    position:fixed!important;
    left:12px!important;
    right:12px!important;
    top:auto!important;
    bottom:calc(72px + env(safe-area-inset-bottom, 0px))!important;
    max-height:52vh!important;
    overflow:auto!important;
    z-index:2147482500!important;
    border-radius:16px!important;
  }
  body.kcrm-frontend-body .ksales-order-detail-customer{order:1!important;}
  body.kcrm-frontend-body .ksales-order-detail-items{order:2!important;}
  body.kcrm-frontend-body .ksales-order-detail-payment{order:3!important;}
  body.kcrm-frontend-body .ksales-order-detail-package{order:4!important;}
  body.kcrm-frontend-body .ksales-order-detail-meta{order:5!important;}
  body.kcrm-frontend-body .ksales-order-detail-items .ksales-table{min-width:520px!important;}
  body.kcrm-frontend-body .ksales-stepper{overflow-x:auto!important;padding-bottom:4px!important;}
  body.kcrm-frontend-body .ksales-step-wrap{min-width:76px!important;}

  /* Job Pipeline */
  body.kcrm-frontend-body .kbos-module-content .kjp-page{
    padding:0!important;
    margin:0!important;
    background:transparent!important;
  }
  body.kcrm-frontend-body .kbos-module-content .kjp-page > .kcrm-card{
    border:0!important;
    box-shadow:none!important;
    background:transparent!important;
    padding:0!important;
    margin:0!important;
  }
  body.kcrm-frontend-body .kjp-stats{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
    margin:0 0 12px!important;
  }
  body.kcrm-frontend-body .kjp-stat{
    border-radius:16px!important;
    padding:12px!important;
    box-shadow:0 6px 18px rgba(15,23,42,.04)!important;
  }
  body.kcrm-frontend-body .kjp-stat strong{font-size:22px!important;line-height:1.05!important;}
  body.kcrm-frontend-body .kjp-stat span{font-size:9.5px!important;letter-spacing:.35px!important;}
  body.kcrm-frontend-body .kjp-panel-head{
    align-items:flex-start!important;
    gap:8px!important;
    margin:0 0 10px!important;
  }
  body.kcrm-frontend-body .kjp-panel-head h3{font-size:14px!important;}
  body.kcrm-frontend-body .kjp-card-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
  }
  body.kcrm-frontend-body .kjp-card-item,
  body.kcrm-frontend-body .kjp-page .kcrm-card{
    border-radius:16px!important;
    box-shadow:0 6px 18px rgba(15,23,42,.045)!important;
  }
  body.kcrm-frontend-body .kjp-history-row{
    grid-template-columns:34px 1fr!important;
    gap:10px!important;
    padding:12px 0!important;
  }
  body.kcrm-frontend-body .kjp-history-side{grid-column:2!important;}
  body.kcrm-frontend-body .kjp-create-grid{grid-template-columns:1fr!important;gap:12px!important;}
  body.kcrm-frontend-body .kjp-field--span2{grid-column:auto!important;}
  body.kcrm-frontend-body .kjp-create-grid input[type=text],
  body.kcrm-frontend-body .kjp-create-grid select,
  body.kcrm-frontend-body .kjp-create-grid textarea,
  body.kcrm-frontend-body .kjp-create-grid input[type=file],
  body.kcrm-frontend-body .kjp-done-form textarea,
  body.kcrm-frontend-body .kjp-done-form input[type=file],
  body.kcrm-frontend-body .kjp-assign-grid textarea,
  body.kcrm-frontend-body .kjp-assign-grid select{
    min-height:42px!important;
    font-size:15px!important;
    border-radius:10px!important;
  }
  body.kcrm-frontend-body .kjp-actions-row,
  body.kcrm-frontend-body .kjp-inline-form--single,
  body.kcrm-frontend-body .kjp-admin-actions{flex-direction:column!important;display:flex!important;width:100%!important;}
  body.kcrm-frontend-body .kcrm-btn-primary,
  body.kcrm-frontend-body .kcrm-btn-secondary,
  body.kcrm-frontend-body .kjp-view-btn{width:100%!important;justify-content:center!important;}
  body.kcrm-frontend-body .kjp-history-table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}
  body.kcrm-frontend-body .kjp-history-full-table,
  body.kcrm-frontend-body .kjp-table{min-width:720px!important;}
}


/* ===== BOS mobile landscape support v2.6.6.29 =====
   Phone landscape must keep the same app design as portrait, not desktop. */
@media (max-width: 1024px) and (orientation: landscape) and (pointer: coarse) {
  :root{
    --kbos-mobile-safe-top: env(safe-area-inset-top, 0px);
    --kbos-mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --kbos-mobile-header-h: 54px;
    --kbos-mobile-header-total: calc(var(--kbos-mobile-header-h) + var(--kbos-mobile-safe-top));
    --kbos-mobile-pagehead-h: 38px;
    --kbos-mobile-tabs-h: 36px;
    --kbos-mobile-navy: #0b213a;
    --kbos-mobile-bg: #f5f7fb;
    --kcrm-bottom-nav-h: 58px;
    --kcrm-safe-bottom: env(safe-area-inset-bottom, 0px);
  }
  html,
  body.kcrm-frontend-body{
    margin:0!important;
    padding:0!important;
    overflow-x:hidden!important;
    background:var(--kbos-mobile-navy)!important;
    -webkit-overflow-scrolling:touch!important;
    scroll-padding-top:var(--kbos-mobile-header-total)!important;
  }
  body.kcrm-frontend-body::before{
    content:''!important;
    position:fixed!important;
    top:0!important;left:0!important;right:0!important;
    height:var(--kbos-mobile-header-total)!important;
    background:var(--kbos-mobile-navy)!important;
    z-index:2147480000!important;
    pointer-events:none!important;
  }
  body.kcrm-frontend-body .kcrm-wrap,
  body.kcrm-frontend-body .kcrm-app-shell,
  body.kcrm-frontend-body .kcrm-content-shell,
  body.kcrm-frontend-body .kcrm-body-layout,
  body.kcrm-frontend-body .kcrm-main-content-area,
  body.kcrm-frontend-body .kbos-module-app,
  body.kcrm-frontend-body .kbos-module-content{
    background:var(--kbos-mobile-bg)!important;
  }
  body.kcrm-frontend-body .kcrm-content-shell{
    margin-left:0!important;
    padding-top:var(--kbos-mobile-header-total)!important;
    padding-bottom:calc(var(--kcrm-bottom-nav-h) + var(--kbos-mobile-safe-bottom))!important;
    overflow:visible!important;
  }
  body.kcrm-frontend-body .kcrm-body-layout,
  body.kcrm-frontend-body .kcrm-body-layout--plain,
  body.kcrm-frontend-body .kcrm-body-layout--dashboard{
    display:block!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }
  body.kcrm-frontend-body .kcrm-main-content-area,
  body.kcrm-frontend-body .kaa-inbox-layout{
    margin:0!important;
    padding:0!important;
    min-height:calc(100svh - var(--kbos-mobile-header-total))!important;
    overflow:visible!important;
  }

  /* Main app header remains the mobile app header in landscape. */
  body.kcrm-frontend-body .kcrm-topbar{
    position:fixed!important;
    top:0!important;left:0!important;right:0!important;
    width:100vw!important;
    height:var(--kbos-mobile-header-total)!important;
    min-height:var(--kbos-mobile-header-total)!important;
    max-height:var(--kbos-mobile-header-total)!important;
    display:grid!important;
    grid-template-columns:48px 1fr 48px!important;
    align-items:center!important;
    gap:0!important;
    padding:calc(7px + var(--kbos-mobile-safe-top)) 8px 7px 12px!important;
    background:var(--kbos-mobile-navy)!important;
    background-color:var(--kbos-mobile-navy)!important;
    border:0!important;
    box-shadow:0 2px 12px rgba(0,0,0,.22)!important;
    z-index:2147481000!important;
    transform:none!important;
    -webkit-transform:none!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-center,
  body.kcrm-frontend-body .kcrm-header-add-btn,
  body.kcrm-frontend-body .kcrm-header-icon-wrap,
  body.kcrm-frontend-body .kcrm-header-company-pill{display:none!important;}
  body.kcrm-frontend-body .kcrm-topbar-left,
  body.kcrm-frontend-body .kcrm-topbar-right{display:flex!important;align-items:center!important;min-width:0!important;}
  body.kcrm-frontend-body .kcrm-topbar-left{justify-content:flex-start!important;}
  body.kcrm-frontend-body .kcrm-topbar-right{justify-content:flex-end!important;margin-right:-3px!important;}
  body.kcrm-frontend-body .kcrm-topbar-toggle{
    width:38px!important;height:38px!important;border-radius:12px!important;
    background:rgba(255,255,255,.12)!important;border:1px solid rgba(255,255,255,.08)!important;box-shadow:none!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-toggle span{background:#fff!important;width:17px!important;}
  body.kcrm-frontend-body .kcrm-topbar-brand{
    position:fixed!important;
    left:50%!important;
    top:calc(var(--kbos-mobile-safe-top) + 27px)!important;
    transform:translate(-50%, -50%)!important;
    z-index:2147481300!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    max-width:calc(100vw - 140px)!important;
    white-space:nowrap!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-logo{
    height:22px!important;
    max-height:22px!important;
    max-width:135px!important;
    filter:brightness(0) invert(1)!important;
    display:block!important;
    width:auto!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-mark,
  body.kcrm-frontend-body .kcrm-topbar-brand-name{display:none!important;}
  body.kcrm-frontend-body .kcrm-brand-divider{height:15px!important;background:rgba(255,255,255,.35)!important;width:1px!important;display:inline-block!important;flex:0 0 1px!important;}
  body.kcrm-frontend-body .kcrm-topbar-brand-text{display:inline-block!important;color:#fff!important;font-size:11px!important;letter-spacing:1.6px!important;font-weight:700!important;}
  body.kcrm-frontend-body .kcrm-profile-trigger{
    width:38px!important;height:38px!important;min-width:38px!important;padding:0!important;border-radius:12px!important;
    background:rgba(255,255,255,.12)!important;border:1px solid rgba(255,255,255,.16)!important;box-shadow:none!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
  }
  body.kcrm-frontend-body .kcrm-profile-meta,
  body.kcrm-frontend-body .kcrm-profile-caret{display:none!important;}
  body.kcrm-frontend-body .kcrm-user-avatar{width:31px!important;height:31px!important;border-radius:10px!important;background:rgba(255,255,255,.18)!important;color:#fff!important;font-size:13px!important;font-weight:800!important;}
  body.kcrm-frontend-body .kcrm-profile-dropdown{position:relative!important;z-index:2147483000!important;overflow:visible!important;}
  body.kcrm-frontend-body .kcrm-profile-menu{
    position:fixed!important;
    top:calc(var(--kbos-mobile-header-total) + 8px)!important;
    right:8px!important;left:auto!important;
    width:min(300px, calc(100vw - 18px))!important;
    max-height:calc(100vh - var(--kbos-mobile-header-total) - 18px)!important;
    overflow-y:auto!important;
    z-index:2147483600!important;
    border-radius:18px!important;
  }

  /* Sidebar remains a mobile drawer in landscape. */
  body.kcrm-frontend-body .kcrm-app-sidebar{
    display:flex!important;
    position:fixed!important;
    top:0!important;left:0!important;bottom:0!important;
    width:280px!important;
    z-index:2147482500!important;
    transform:translateX(-100%)!important;
    transition:transform .28s cubic-bezier(.4,0,.2,1)!important;
    background:linear-gradient(180deg,#0f2440 0%,#0d2444 100%)!important;
    box-shadow:4px 0 32px rgba(0,0,0,.28)!important;
  }
  body.kcrm-mobile-sidebar-open .kcrm-app-sidebar{transform:translateX(0)!important;}
  body.kcrm-frontend-body .kcrm-mobile-sidebar-backdrop{
    display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:2147482400!important;backdrop-filter:blur(2px);
  }
  body.kcrm-frontend-body .kcrm-mobile-sidebar-backdrop.active{display:block!important;}
  body.kcrm-frontend-body .kcrm-sidebar-scroll{padding:56px 12px 100px!important;}

  /* Bottom mobile nav and bottom safe colour. */
  body.kcrm-frontend-body .kcrm-mobile-bottom-nav{
    display:flex!important;
    position:fixed!important;
    left:0!important;right:0!important;bottom:0!important;
    height:calc(var(--kcrm-bottom-nav-h) + var(--kbos-mobile-safe-bottom))!important;
    padding:7px 0 var(--kbos-mobile-safe-bottom)!important;
    background:#fff!important;
    border-top:1px solid #edf1f7!important;
    box-shadow:0 -4px 20px rgba(15,23,42,.1)!important;
    z-index:1600!important;
    align-items:flex-start!important;
    justify-content:space-around!important;
  }
  body.kcrm-frontend-body .kcrm-mobile-bottom-nav::after{content:'';position:fixed;left:0;right:0;bottom:0;height:var(--kbos-mobile-safe-bottom);background:#fff;pointer-events:none;}
  body.kcrm-frontend-body .kcrm-footer{display:none!important;}

  /* Dashboard keeps app-card design in landscape, but compact enough for short height. */
  body.kcrm-view-dashboard .kcrm-main-content-area{padding:0!important;}
  body.kcrm-view-dashboard .kbos-mobile-home,
  body.kcrm-frontend-body .kbos-mobile-home{
    padding:8px 12px calc(82px + var(--kbos-mobile-safe-bottom))!important;
    margin:0!important;
    background:var(--kbos-mobile-bg)!important;
  }
  body.kcrm-frontend-body .kbos-mobile-home-greet{margin:0 2px 8px!important;}
  body.kcrm-frontend-body .kbos-mobile-home-greet h1{font-size:19px!important;line-height:1.08!important;font-weight:700!important;margin:0!important;}
  body.kcrm-frontend-body .kbos-mobile-home-greet p{font-size:11px!important;line-height:1.2!important;margin:3px 0 0!important;color:#6b7280!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;margin:0 0 10px!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-card{min-height:68px!important;border-radius:15px!important;padding:8px!important;gap:7px!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-icon{width:34px!important;height:34px!important;border-radius:11px!important;font-size:17px!important;flex:0 0 34px!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-title{font-size:10px!important;line-height:1.15!important;margin:0!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-value{font-size:18px!important;line-height:1!important;font-weight:700!important;}
  body.kcrm-frontend-body .kbos-mobile-summary-sub{font-size:9px!important;line-height:1.12!important;margin-top:3px!important;}
  body.kcrm-frontend-body .kbos-mobile-section-title{font-size:15px!important;line-height:1.1!important;margin:6px 2px 8px!important;font-weight:700!important;}
  body.kcrm-frontend-body .kbos-mobile-app-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:8px!important;}
  body.kcrm-frontend-body .kbos-mobile-app-tile{min-height:84px!important;border-radius:15px!important;padding:8px 6px!important;}
  body.kcrm-frontend-body .kbos-mobile-app-ico{width:34px!important;height:34px!important;border-radius:11px!important;font-size:18px!important;margin-bottom:6px!important;}
  body.kcrm-frontend-body .kbos-mobile-app-label{font-size:9.8px!important;line-height:1.12!important;font-weight:600!important;}

  /* Inner pages: fixed header stack remains attached to main header in landscape. */
  body.kcrm-frontend-body .kbos-module-app{margin:0!important;padding:0!important;overflow:visible!important;background:var(--kbos-mobile-bg)!important;}
  body.kcrm-frontend-body .kbos-module-topnav{
    position:fixed!important;
    top:var(--kbos-mobile-header-total)!important;
    left:0!important;right:0!important;width:100vw!important;
    z-index:214748000!important;
    display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;gap:0!important;
    padding:0!important;margin:0!important;background:#fff!important;border-bottom:1px solid #e5e7eb!important;box-shadow:0 3px 9px rgba(15,23,42,.06)!important;overflow:hidden!important;transform:none!important;
  }
  body.kcrm-frontend-body .kbos-module-topnav.kbos-module-topnav--has-tabs{height:calc(var(--kbos-mobile-pagehead-h) + var(--kbos-mobile-tabs-h))!important;min-height:calc(var(--kbos-mobile-pagehead-h) + var(--kbos-mobile-tabs-h))!important;max-height:calc(var(--kbos-mobile-pagehead-h) + var(--kbos-mobile-tabs-h))!important;}
  body.kcrm-frontend-body .kbos-module-topnav.kbos-module-topnav--no-tabs{height:var(--kbos-mobile-pagehead-h)!important;min-height:var(--kbos-mobile-pagehead-h)!important;max-height:var(--kbos-mobile-pagehead-h)!important;}
  body.kcrm-frontend-body .kbos-module-topnav-left{height:var(--kbos-mobile-pagehead-h)!important;min-height:var(--kbos-mobile-pagehead-h)!important;flex:0 0 var(--kbos-mobile-pagehead-h)!important;width:100%!important;padding:0 12px!important;margin:0!important;display:flex!important;align-items:center!important;box-sizing:border-box!important;background:#fff!important;}
  body.kcrm-frontend-body .kbos-module-icon{width:20px!important;height:20px!important;border-radius:7px!important;font-size:11px!important;flex:0 0 20px!important;}
  body.kcrm-frontend-body .kbos-module-title{font-size:14px!important;font-weight:750!important;line-height:1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
  body.kcrm-frontend-body .kbos-module-tabs{height:var(--kbos-mobile-tabs-h)!important;min-height:var(--kbos-mobile-tabs-h)!important;flex:0 0 var(--kbos-mobile-tabs-h)!important;width:100%!important;padding:0 12px!important;margin:0!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:2px!important;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;white-space:nowrap!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important;background:#fff!important;box-sizing:border-box!important;}
  body.kcrm-frontend-body .kbos-module-tabs::-webkit-scrollbar{display:none!important;}
  body.kcrm-frontend-body .kbos-module-tab{flex:0 0 auto!important;height:var(--kbos-mobile-tabs-h)!important;padding:0 10px!important;font-size:11px!important;font-weight:600!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;}
  body.kcrm-frontend-body .kbos-module-topnav--has-tabs + .kbos-module-content{padding:calc(var(--kbos-mobile-pagehead-h) + var(--kbos-mobile-tabs-h) + 10px) 12px calc(82px + var(--kbos-mobile-safe-bottom))!important;}
  body.kcrm-frontend-body .kbos-module-topnav--no-tabs + .kbos-module-content{padding:calc(var(--kbos-mobile-pagehead-h) + 10px) 12px calc(82px + var(--kbos-mobile-safe-bottom))!important;}
  body.kcrm-frontend-body .kbos-module-content{margin:0!important;background:var(--kbos-mobile-bg)!important;overflow:visible!important;}

  /* Sales Orders / Create Order / Order Detail landscape mobile safety. */
  body.kcrm-frontend-body .kbos-module-content .ksales-shell{padding:0!important;min-height:auto!important;background:transparent!important;}
  body.kcrm-frontend-body .kbos-module-content .ksales-page-head{display:none!important;}
  body.kcrm-frontend-body .ksales-stats{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;margin:0 0 10px!important;}
  body.kcrm-frontend-body .ksales-stat{border-radius:14px!important;padding:10px!important;box-shadow:0 6px 18px rgba(15,23,42,.04)!important;}
  body.kcrm-frontend-body .ksales-stat-val{font-size:17px!important;line-height:1.05!important;}
  body.kcrm-frontend-body .ksales-stat-label{font-size:9px!important;letter-spacing:.3px!important;}
  body.kcrm-frontend-body .ksales-tabs{display:flex!important;align-items:center!important;gap:2px!important;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;white-space:nowrap!important;margin:0 0 10px!important;padding:0 0 6px!important;border-bottom:1px solid #e5e7eb!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important;}
  body.kcrm-frontend-body .ksales-tabs::-webkit-scrollbar{display:none!important;}
  body.kcrm-frontend-body .ksales-tab{flex:0 0 auto!important;font-size:10.5px!important;padding:7px 10px!important;border-radius:999px!important;border:1px solid #e5e7eb!important;background:#fff!important;margin:0!important;}
  body.kcrm-frontend-body .ksales-card{border-radius:15px!important;margin-bottom:10px!important;box-shadow:0 6px 18px rgba(15,23,42,.045)!important;}
  body.kcrm-frontend-body .ksales-card-head{padding:10px 12px!important;}
  body.kcrm-frontend-body .ksales-card-head h2{font-size:13px!important;}
  body.kcrm-frontend-body .ksales-card-body{padding:12px!important;}
  body.kcrm-frontend-body .ksales-table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;border-radius:14px!important;}
  body.kcrm-frontend-body .ksales-table{min-width:760px!important;font-size:12px!important;}
  body.kcrm-frontend-body .ksales-btn{min-height:36px!important;border-radius:10px!important;font-size:11.5px!important;padding:6px 11px!important;}
  body.kcrm-frontend-body .ksales-order-create-layout,
  body.kcrm-frontend-body .ksales-order-detail-layout{display:flex!important;flex-direction:column!important;gap:10px!important;}
  body.kcrm-frontend-body .ksales-order-create-main,
  body.kcrm-frontend-body .ksales-order-create-side,
  body.kcrm-frontend-body .ksales-order-detail-main,
  body.kcrm-frontend-body .ksales-order-detail-side{display:contents!important;}
  body.kcrm-frontend-body .ksales-order-card-customer{order:1!important;}
  body.kcrm-frontend-body .ksales-order-card-products{order:2!important;}
  body.kcrm-frontend-body .ksales-order-card-discount{order:3!important;}
  body.kcrm-frontend-body .ksales-order-card-payment{order:4!important;}
  body.kcrm-frontend-body .ksales-order-card-shipping{order:5!important;}
  body.kcrm-frontend-body .ksales-order-card-notes{order:6!important;}
  body.kcrm-frontend-body .ksales-order-submit-wrap{order:7!important;position:sticky!important;bottom:calc(58px + env(safe-area-inset-bottom, 0px))!important;z-index:1300!important;padding:8px 0!important;background:rgba(245,247,251,.96)!important;backdrop-filter:blur(10px)!important;}
  body.kcrm-frontend-body .ksales-order-submit-btn{width:100%!important;min-height:42px!important;justify-content:center!important;}
  body.kcrm-frontend-body .ksales-form-grid,
  body.kcrm-frontend-body .ksales-form-grid.col2,
  body.kcrm-frontend-body .ksales-form-grid.col3,
  body.kcrm-frontend-body .ksales-form-grid.col4{grid-template-columns:1fr!important;gap:9px!important;}
  body.kcrm-frontend-body .ksales-input,
  body.kcrm-frontend-body .ksales-select,
  body.kcrm-frontend-body .ksales-textarea,
  body.kcrm-frontend-body .ksales-search{min-height:40px!important;font-size:14px!important;border-radius:10px!important;}
  body.kcrm-frontend-body .ksales-line-item{grid-template-columns:minmax(0,1fr) 78px 38px!important;gap:8px!important;padding:10px!important;border-radius:12px!important;}
  body.kcrm-frontend-body .ksales-line-item-name{grid-column:1 / -1!important;}
  body.kcrm-frontend-body .ksales-line-item-amount{grid-column:1 / 2!important;}
  body.kcrm-frontend-body .ksales-line-item-qty{grid-column:2 / 3!important;}
  body.kcrm-frontend-body .ksales-line-item-remove{grid-column:3 / 4!important;}
  body.kcrm-frontend-body .ksales-search-results{position:fixed!important;left:12px!important;right:12px!important;bottom:calc(64px + env(safe-area-inset-bottom, 0px))!important;max-height:48vh!important;overflow:auto!important;z-index:2147482500!important;border-radius:16px!important;}
  body.kcrm-frontend-body .ksales-order-detail-customer{order:1!important;}
  body.kcrm-frontend-body .ksales-order-detail-items{order:2!important;}
  body.kcrm-frontend-body .ksales-order-detail-payment{order:3!important;}
  body.kcrm-frontend-body .ksales-order-detail-package{order:4!important;}
  body.kcrm-frontend-body .ksales-order-detail-meta{order:5!important;}
  body.kcrm-frontend-body .ksales-order-detail-items .ksales-table{min-width:520px!important;}

  /* Job Pipeline stays mobile-styled in landscape. */
  body.kcrm-frontend-body .kbos-module-content .kjp-page{padding:0!important;margin:0!important;background:transparent!important;}
  body.kcrm-frontend-body .kbos-module-content .kjp-page > .kcrm-card{border:0!important;box-shadow:none!important;background:transparent!important;padding:0!important;margin:0!important;}
  body.kcrm-frontend-body .kjp-stats{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;margin:0 0 10px!important;}
  body.kcrm-frontend-body .kjp-stat{border-radius:14px!important;padding:10px!important;box-shadow:0 6px 18px rgba(15,23,42,.04)!important;}
  body.kcrm-frontend-body .kjp-stat strong{font-size:18px!important;line-height:1.05!important;}
  body.kcrm-frontend-body .kjp-stat span{font-size:9px!important;letter-spacing:.3px!important;}
  body.kcrm-frontend-body .kjp-panel-head{align-items:flex-start!important;gap:8px!important;margin:0 0 10px!important;}
  body.kcrm-frontend-body .kjp-panel-head h3{font-size:13px!important;}
  body.kcrm-frontend-body .kjp-card-grid{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;}
  body.kcrm-frontend-body .kjp-card-item,
  body.kcrm-frontend-body .kjp-page .kcrm-card{border-radius:15px!important;box-shadow:0 6px 18px rgba(15,23,42,.045)!important;}
  body.kcrm-frontend-body .kjp-history-row{grid-template-columns:34px 1fr!important;gap:10px!important;padding:10px 0!important;}
  body.kcrm-frontend-body .kjp-history-side{grid-column:2!important;}
  body.kcrm-frontend-body .kjp-create-grid{grid-template-columns:1fr!important;gap:10px!important;}
  body.kcrm-frontend-body .kjp-field--span2{grid-column:auto!important;}
  body.kcrm-frontend-body .kjp-create-grid input[type=text],
  body.kcrm-frontend-body .kjp-create-grid select,
  body.kcrm-frontend-body .kjp-create-grid textarea,
  body.kcrm-frontend-body .kjp-create-grid input[type=file],
  body.kcrm-frontend-body .kjp-done-form textarea,
  body.kcrm-frontend-body .kjp-done-form input[type=file],
  body.kcrm-frontend-body .kjp-assign-grid textarea,
  body.kcrm-frontend-body .kjp-assign-grid select{min-height:40px!important;font-size:14px!important;border-radius:10px!important;}
  body.kcrm-frontend-body .kjp-actions-row,
  body.kcrm-frontend-body .kjp-inline-form--single,
  body.kcrm-frontend-body .kjp-admin-actions{flex-direction:column!important;display:flex!important;width:100%!important;}
  body.kcrm-frontend-body .kcrm-btn-primary,
  body.kcrm-frontend-body .kcrm-btn-secondary,
  body.kcrm-frontend-body .kjp-view-btn{width:100%!important;justify-content:center!important;}
  body.kcrm-frontend-body .kjp-history-table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}
  body.kcrm-frontend-body .kjp-history-full-table,
  body.kcrm-frontend-body .kjp-table{min-width:720px!important;}
}


/* BOS mobile Create Order fixes v2.6.6.30 */
@media (max-width: 900px), (max-height: 520px) and (pointer: coarse) {
    body.kcrm-frontend-body .ksales-order-create-layout,
    body.kcrm-frontend-body .ksales-order-create-main,
    body.kcrm-frontend-body .ksales-order-create-side,
    body.kcrm-frontend-body .ksales-card,
    body.kcrm-frontend-body .ksales-card-body,
    body.kcrm-frontend-body .ksales-order-card-customer,
    body.kcrm-frontend-body .ksales-order-card-products {
        overflow: visible !important;
    }
    body.kcrm-frontend-body .ksales-order-submit-wrap {
        position: static !important;
        bottom: auto !important;
        z-index: auto !important;
        padding: 12px 0 calc(20px + env(safe-area-inset-bottom, 0px)) !important;
        margin-top: 4px !important;
        background: transparent !important;
        border-top: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    body.kcrm-frontend-body .ksales-order-submit-btn {
        width: 100% !important;
        min-height: 46px !important;
        border-radius: 14px !important;
    }
    body.kcrm-frontend-body .ksales-search-wrap {
        position: relative !important;
        overflow: visible !important;
        z-index: 30 !important;
    }
    body.kcrm-frontend-body .ksales-search-wrap:focus-within {
        z-index: 2147482400 !important;
    }
    body.kcrm-frontend-body .ksales-order-create-layout .ksales-search-results,
    body.kcrm-frontend-body #ksales-search-results,
    body.kcrm-frontend-body #ksales-customer-search-results {
        position: absolute !important;
        top: calc(100% + 6px) !important;
        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        width: auto !important;
        max-height: min(280px, 42vh) !important;
        overflow-y: auto !important;
        border-radius: 14px !important;
        z-index: 2147482600 !important;
        box-shadow: 0 18px 35px rgba(15, 23, 42, .16) !important;
        -webkit-overflow-scrolling: touch !important;
    }
    body.kcrm-frontend-body .ksales-order-card-products { z-index: 12 !important; }
    body.kcrm-frontend-body .ksales-order-card-customer { z-index: 13 !important; }
    body.kcrm-frontend-body .ksales-line-item-qty input[type="number"] {
        -webkit-user-select: text !important;
        user-select: text !important;
        font-size: 16px !important;
    }
}


/* BOS mobile Create Order real fixes v2.6.6.31 */
@media (max-width: 900px), (max-height: 520px) and (pointer: coarse) {
  html body.kcrm-frontend-body .ksales-order-create-form .ksales-order-submit-wrap,
  html body.kcrm-frontend-body .ksales-order-create-form .ksales-order-submit-wrap-bottom {
    position: static !important;
    bottom: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: 1 !important;
    transform: none !important;
    padding: 12px 0 calc(22px + env(safe-area-inset-bottom, 0px)) !important;
    margin: 4px 0 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  html body.kcrm-frontend-body .ksales-order-create-form .ksales-order-submit-btn {
    width: 100% !important;
    min-height: 46px !important;
    border-radius: 14px !important;
  }
  html body.kcrm-frontend-body .ksales-order-create-form .ksales-search-wrap,
  html body.kcrm-frontend-body .ksales-order-create-form .ksales-card,
  html body.kcrm-frontend-body .ksales-order-create-form .ksales-card-body,
  html body.kcrm-frontend-body .ksales-order-create-form .ksales-order-create-layout,
  html body.kcrm-frontend-body .ksales-order-create-form .ksales-order-create-main,
  html body.kcrm-frontend-body .ksales-order-create-form .ksales-order-create-side {
    overflow: visible !important;
  }
  html body.kcrm-frontend-body .ksales-order-create-form .ksales-search-wrap:focus-within {
    z-index: 2147483000 !important;
  }
  html body.kcrm-frontend-body .ksales-order-create-form .ksales-search-results,
  html body.kcrm-frontend-body .ksales-order-create-form .kbos-mobile-search-results-live {
    position: fixed !important;
    bottom: auto !important;
    right: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 14px !important;
    z-index: 2147483000 !important;
    box-shadow: 0 18px 36px rgba(15,23,42,.18) !important;
    background: #fff !important;
  }
  html body.kcrm-frontend-body .ksales-order-create-form .ksales-qty-input {
    font-size: 16px !important;
    -webkit-user-select: text !important;
    user-select: text !important;
    touch-action: manipulation !important;
  }
}


/* ===== BOS module shell fix: PRO Works, Entities, Tenancy, Settings v2.6.6.32 ===== */
.kbos-module-topnav--proworks .kbos-module-icon{background:linear-gradient(135deg,#7c3aed,#2563eb);box-shadow:0 6px 14px rgba(124,58,237,.16)}
.kbos-module-topnav--entities .kbos-module-icon{background:linear-gradient(135deg,#0f766e,#2563eb);box-shadow:0 6px 14px rgba(15,118,110,.16)}
.kbos-module-topnav--tenancy .kbos-module-icon{background:linear-gradient(135deg,#0891b2,#0f766e);box-shadow:0 6px 14px rgba(8,145,178,.16)}
.kbos-module-topnav--settings .kbos-module-icon{background:linear-gradient(135deg,#475569,#0f172a);box-shadow:0 6px 14px rgba(15,23,42,.14)}
.kbos-module-topnav--proworks .kbos-module-tab:hover,.kbos-module-topnav--proworks .kbos-module-tab.active{color:#6d28d9;border-bottom-color:#6d28d9;background:#f5f3ff;}
.kbos-module-topnav--entities .kbos-module-tab:hover,.kbos-module-topnav--entities .kbos-module-tab.active{color:#0f766e;border-bottom-color:#0f766e;background:#f0fdfa;}
.kbos-module-topnav--tenancy .kbos-module-tab:hover,.kbos-module-topnav--tenancy .kbos-module-tab.active{color:#0e7490;border-bottom-color:#0e7490;background:#ecfeff;}
.kbos-module-content .kpw-subnav,
.kbos-module-content .ktn-subnav,
.kbos-module-content > .kcrm-page > .kcrm-card > .kcrm-settings-tabs{display:none!important;}
.kbos-module-content .kpw-page,
.kbos-module-content .kcrm-page{margin-top:0!important;}
.kbos-module-content .kcrm-card:first-child{margin-top:0!important;}
@media (max-width:768px){
  body.kcrm-frontend-body .kbos-module-app--proworks,
  body.kcrm-frontend-body .kbos-module-app--entities,
  body.kcrm-frontend-body .kbos-module-app--tenancy{margin:0!important;padding:0!important;background:var(--kbos-mobile-bg,#f5f7fb)!important;overflow:visible!important;}
  body.kcrm-frontend-body .kbos-module-app--proworks .kbos-module-content,
  body.kcrm-frontend-body .kbos-module-app--entities .kbos-module-content,
  body.kcrm-frontend-body .kbos-module-app--tenancy .kbos-module-content{margin:0!important;background:var(--kbos-mobile-bg,#f5f7fb)!important;overflow:visible!important;}
  body.kcrm-frontend-body .kbos-module-content .kcrm-page,
  body.kcrm-frontend-body .kbos-module-content .kpw-page{padding:0!important;margin:0!important;background:transparent!important;}
  body.kcrm-frontend-body .kbos-module-content > .kcrm-page > .kcrm-card{border-radius:16px!important;margin:0!important;}
}


/* ===== v2.6.6.33 module CSS fallback: PRO forms + Tenancy spaces ===== */
/* These rules keep forms/cards styled even after SPA navigation where page-specific CSS may not have been loaded yet. */
.kbos-module-app--proworks .kpw-page{padding:0!important;margin:0!important;background:transparent!important;}
.kbos-module-app--proworks .kpw-form-card{max-width:980px!important;margin:0 auto!important;background:#fff!important;border:1px solid #e5eaf2!important;border-radius:18px!important;box-shadow:0 10px 26px rgba(15,23,42,.06)!important;padding:18px!important;}
.kbos-module-app--proworks .kpw-form-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin:0 0 18px!important;padding-bottom:14px!important;border-bottom:1px solid #eef2f7!important;}
.kbos-module-app--proworks .kpw-form-head>div{display:flex!important;align-items:flex-start!important;gap:12px!important;min-width:0!important;}
.kbos-module-app--proworks .kpw-icon-badge{width:42px!important;height:42px!important;border-radius:13px!important;display:flex!important;align-items:center!important;justify-content:center!important;background:linear-gradient(135deg,#7c3aed,#2563eb)!important;color:#fff!important;font-size:20px!important;flex:0 0 42px!important;box-shadow:0 8px 18px rgba(124,58,237,.18)!important;}
.kbos-module-app--proworks .kpw-form-title{margin:0!important;font-size:18px!important;line-height:1.2!important;font-weight:800!important;color:#0f172a!important;}
.kbos-module-app--proworks .kpw-form-sub{margin:4px 0 0!important;font-size:12px!important;line-height:1.4!important;color:#64748b!important;}
.kbos-module-app--proworks .kpw-panel{background:#f8fafc!important;border:1px solid #e2e8f0!important;border-radius:15px!important;padding:16px!important;margin:0 0 14px!important;}
.kbos-module-app--proworks .kpw-panel-title{margin:0 0 12px!important;font-size:11px!important;letter-spacing:.08em!important;text-transform:uppercase!important;color:#64748b!important;font-weight:800!important;}
.kbos-module-app--proworks .kpw-form-grid{display:grid!important;gap:14px!important;}
.kbos-module-app--proworks .kpw-form-grid.two-col{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
.kbos-module-app--proworks .kpw-field{display:flex!important;flex-direction:column!important;gap:7px!important;min-width:0!important;}
.kbos-module-app--proworks .kpw-field.full{grid-column:1/-1!important;}
.kbos-module-app--proworks .kpw-field label{font-size:12px!important;font-weight:750!important;color:#334155!important;margin:0!important;}
.kbos-module-app--proworks .kpw-field input[type="text"],
.kbos-module-app--proworks .kpw-field input[type="email"],
.kbos-module-app--proworks .kpw-field input[type="date"],
.kbos-module-app--proworks .kpw-field input[type="file"],
.kbos-module-app--proworks .kpw-field select,
.kbos-module-app--proworks .kpw-field textarea{width:100%!important;min-height:42px!important;padding:10px 12px!important;border:1px solid #dbe3ee!important;border-radius:11px!important;background:#fff!important;color:#0f172a!important;font-size:13px!important;line-height:1.35!important;box-shadow:none!important;box-sizing:border-box!important;}
.kbos-module-app--proworks .kpw-field textarea{min-height:110px!important;resize:vertical!important;}
.kbos-module-app--proworks .kpw-field input:focus,
.kbos-module-app--proworks .kpw-field select:focus,
.kbos-module-app--proworks .kpw-field textarea:focus{outline:none!important;border-color:#7c3aed!important;box-shadow:0 0 0 3px rgba(124,58,237,.11)!important;}
.kbos-module-app--proworks .kpw-help{font-size:11px!important;color:#64748b!important;margin-top:2px!important;}
.kbos-module-app--proworks .kpw-actions{display:flex!important;gap:10px!important;align-items:center!important;flex-wrap:wrap!important;margin-top:4px!important;}

/* Tenancy Spaces safety styling */
.kbos-module-app--tenancy .ktn-subnav{display:none!important;}
.kbos-module-app--tenancy .kcrm-page{margin:0!important;padding:0!important;background:transparent!important;}
.kbos-module-app--tenancy .kce-toolbar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin:0 0 14px!important;padding:14px!important;background:#fff!important;border:1px solid #e5eaf2!important;border-radius:18px!important;box-shadow:0 8px 22px rgba(15,23,42,.045)!important;}
.kbos-module-app--tenancy .kcrm-filters{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;margin:0!important;}
.kbos-module-app--tenancy .kcrm-search-wrap{position:relative!important;min-width:220px!important;}
.kbos-module-app--tenancy .kcrm-search-wrap input{width:100%!important;height:40px!important;border:1px solid #dbe3ee!important;border-radius:12px!important;background:#fff!important;padding:0 12px 0 34px!important;font-size:13px!important;box-sizing:border-box!important;}
.kbos-module-app--tenancy .kcrm-search-icon{position:absolute!important;left:12px!important;top:50%!important;transform:translateY(-50%)!important;color:#94a3b8!important;font-size:13px!important;}
.kbos-module-app--tenancy select{height:40px!important;border:1px solid #dbe3ee!important;border-radius:12px!important;background:#fff!important;padding:0 12px!important;font-size:13px!important;}
.kbos-module-app--tenancy .kce-toolbar-right{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important;flex-wrap:wrap!important;}
.kbos-module-app--tenancy .kcrm-count{display:inline-flex!important;align-items:center!important;height:34px!important;padding:0 12px!important;border-radius:999px!important;background:#f1f5f9!important;color:#475569!important;font-size:12px!important;font-weight:700!important;}
.kbos-module-app--tenancy .ktn-summary-pills{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;margin:0 0 14px!important;}
.kbos-module-app--tenancy .ktn-summary-pill{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;text-decoration:none!important;background:#fff!important;border:1px solid #e5eaf2!important;border-left:4px solid var(--pill-color,#0e7490)!important;border-radius:15px!important;padding:12px!important;box-shadow:0 8px 22px rgba(15,23,42,.04)!important;}
.kbos-module-app--tenancy .ktn-pill-count{font-size:20px!important;line-height:1!important;font-weight:800!important;color:#0f172a!important;}
.kbos-module-app--tenancy .ktn-pill-label{font-size:12px!important;font-weight:700!important;color:#64748b!important;}
.kbos-module-app--tenancy .ktn-spaces-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))!important;gap:14px!important;}
.kbos-module-app--tenancy .ktn-space-card{background:#fff!important;border:1px solid #e5eaf2!important;border-radius:18px!important;padding:16px!important;box-shadow:0 8px 22px rgba(15,23,42,.045)!important;display:flex!important;flex-direction:column!important;gap:12px!important;transition:box-shadow .15s ease,transform .15s ease!important;}
.kbos-module-app--tenancy .ktn-space-card:hover{box-shadow:0 12px 28px rgba(15,23,42,.08)!important;transform:translateY(-1px)!important;}
.kbos-module-app--tenancy .ktn-space-card-header{display:flex!important;align-items:flex-start!important;gap:12px!important;}
.kbos-module-app--tenancy .ktn-space-icon{width:42px!important;height:42px!important;border-radius:14px!important;background:#ecfeff!important;color:#0e7490!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:21px!important;flex:0 0 42px!important;}
.kbos-module-app--tenancy .ktn-space-info{flex:1 1 auto!important;min-width:0!important;}
.kbos-module-app--tenancy .ktn-space-name{font-size:14px!important;font-weight:800!important;color:#0f172a!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.kbos-module-app--tenancy .ktn-space-sub{font-size:12px!important;color:#64748b!important;margin-top:3px!important;}
.kbos-module-app--tenancy .ktn-status-badge{display:inline-flex!important;align-items:center!important;justify-content:center!important;border-radius:999px!important;padding:4px 10px!important;font-size:11px!important;font-weight:800!important;white-space:nowrap!important;}
.kbos-module-app--tenancy .ktn-space-meta{display:flex!important;flex-wrap:wrap!important;gap:6px!important;}
.kbos-module-app--tenancy .ktn-meta-tag{display:inline-flex!important;align-items:center!important;gap:4px!important;border-radius:999px!important;background:#f8fafc!important;border:1px solid #e2e8f0!important;color:#475569!important;padding:5px 9px!important;font-size:11.5px!important;font-weight:700!important;}
.kbos-module-app--tenancy .ktn-space-tenant{display:flex!important;align-items:center!important;gap:8px!important;font-size:12px!important;color:#0f766e!important;font-weight:700!important;}
.kbos-module-app--tenancy .ktn-tenant-dot{width:8px!important;height:8px!important;border-radius:50%!important;background:#10b981!important;box-shadow:0 0 0 3px rgba(16,185,129,.12)!important;}
.kbos-module-app--tenancy .ktn-space-vacant{font-size:12px!important;color:#94a3b8!important;font-weight:700!important;}
.kbos-module-app--tenancy .ktn-card-actions{display:flex!important;gap:8px!important;align-items:center!important;flex-wrap:wrap!important;margin-top:auto!important;padding-top:4px!important;}

@media (max-width:768px){
  body.kcrm-frontend-body .kbos-module-app--proworks .kpw-form-card{border-radius:16px!important;margin:0!important;padding:14px!important;}
  body.kcrm-frontend-body .kbos-module-app--proworks .kpw-form-head{align-items:flex-start!important;flex-direction:column!important;gap:10px!important;margin-bottom:14px!important;}
  body.kcrm-frontend-body .kbos-module-app--proworks .kpw-form-title{font-size:15px!important;}
  body.kcrm-frontend-body .kbos-module-app--proworks .kpw-form-sub{font-size:11px!important;}
  body.kcrm-frontend-body .kbos-module-app--proworks .kpw-icon-badge{width:36px!important;height:36px!important;border-radius:12px!important;font-size:17px!important;flex-basis:36px!important;}
  body.kcrm-frontend-body .kbos-module-app--proworks .kpw-panel{padding:13px!important;border-radius:14px!important;}
  body.kcrm-frontend-body .kbos-module-app--proworks .kpw-form-grid.two-col{grid-template-columns:1fr!important;gap:11px!important;}
  body.kcrm-frontend-body .kbos-module-app--proworks .kpw-field input[type="text"],
  body.kcrm-frontend-body .kbos-module-app--proworks .kpw-field input[type="email"],
  body.kcrm-frontend-body .kbos-module-app--proworks .kpw-field input[type="date"],
  body.kcrm-frontend-body .kbos-module-app--proworks .kpw-field input[type="file"],
  body.kcrm-frontend-body .kbos-module-app--proworks .kpw-field select,
  body.kcrm-frontend-body .kbos-module-app--proworks .kpw-field textarea{font-size:14px!important;min-height:42px!important;}
  body.kcrm-frontend-body .kbos-module-app--proworks .kpw-actions .kcrm-btn,
  body.kcrm-frontend-body .kbos-module-app--proworks .kpw-actions .kcrm-btn-ghost{width:100%!important;justify-content:center!important;}

  body.kcrm-frontend-body .kbos-module-app--tenancy .kce-toolbar{display:flex!important;flex-direction:column!important;align-items:stretch!important;padding:12px!important;border-radius:16px!important;margin-bottom:12px!important;}
  body.kcrm-frontend-body .kbos-module-app--tenancy .kcrm-filters{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;}
  body.kcrm-frontend-body .kbos-module-app--tenancy .kcrm-search-wrap{min-width:0!important;width:100%!important;}
  body.kcrm-frontend-body .kbos-module-app--tenancy .kcrm-filters .kcrm-btn,
  body.kcrm-frontend-body .kbos-module-app--tenancy .kcrm-filters .kcrm-btn-ghost{width:100%!important;justify-content:center!important;}
  body.kcrm-frontend-body .kbos-module-app--tenancy .kce-toolbar-right{justify-content:space-between!important;}
  body.kcrm-frontend-body .kbos-module-app--tenancy .ktn-summary-pills{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
  body.kcrm-frontend-body .kbos-module-app--tenancy .ktn-summary-pill{padding:10px!important;border-radius:14px!important;}
  body.kcrm-frontend-body .kbos-module-app--tenancy .ktn-spaces-grid{grid-template-columns:1fr!important;gap:10px!important;}
  body.kcrm-frontend-body .kbos-module-app--tenancy .ktn-space-card{border-radius:16px!important;padding:13px!important;gap:10px!important;}
  body.kcrm-frontend-body .kbos-module-app--tenancy .ktn-space-card-header{gap:10px!important;}
  body.kcrm-frontend-body .kbos-module-app--tenancy .ktn-status-badge{font-size:10px!important;padding:3px 8px!important;}
  body.kcrm-frontend-body .kbos-module-app--tenancy .ktn-card-actions .kcrm-btn-sm{flex:1 1 0!important;justify-content:center!important;min-height:34px!important;}
}


/* === Final header stack fixes: Campaigns, Ads Manager, Instagram === */
body.kcrm-view-campaigns .kcrm-main-content-area,
body.kcrm-view-meta-campaign .kcrm-main-content-area,
body.kcrm-view-ads-manager .kcrm-main-content-area,
body.kcrm-view-instagram .kcrm-main-content-area{
  padding:0!important;
  background:#fafafa!important;
  overflow:visible!important;
}
body.kcrm-view-campaigns .ktc-page,
body.kcrm-view-meta-campaign .ktc-page{
  background:#fafafa;
  min-height:calc(100vh - var(--kcrm-topbar-h,70px));
  padding:18px 24px 24px!important;
}
body.kcrm-view-campaigns .ktc-page-header,
body.kcrm-view-meta-campaign .ktc-page-header{
  background:#fff;
  border:1px solid #e8e8e8;
  border-radius:14px 14px 0 0;
  margin:0!important;
  padding:12px 16px!important;
  box-shadow:0 1px 3px rgba(0,0,0,.05);
}
body.kcrm-view-campaigns .ktc-tabs,
body.kcrm-view-meta-campaign .ktc-tabs{
  background:#fff;
  border:1px solid #e8e8e8;
  border-top:0;
  border-radius:0 0 14px 14px;
  margin:0 0 16px!important;
  padding:0 10px!important;
  min-height:44px;
  align-items:center;
  overflow-x:auto;
  flex-wrap:nowrap;
  white-space:nowrap;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
body.kcrm-view-campaigns .ktc-tabs::-webkit-scrollbar,
body.kcrm-view-meta-campaign .ktc-tabs::-webkit-scrollbar{display:none;}
body.kcrm-view-campaigns .ktc-tab,
body.kcrm-view-meta-campaign .ktc-tab{flex:0 0 auto;border-radius:10px;padding:8px 13px;margin-bottom:0;border:0;}
body.kcrm-view-campaigns .ktc-tab.active,
body.kcrm-view-meta-campaign .ktc-tab.active{background:#eff6ff;color:#1d4ed8;border:0;}
body.kcrm-view-campaigns .ktc-tab-content,
body.kcrm-view-meta-campaign .ktc-tab-content{padding-top:0!important;}

/* Ads Manager: page header -> provider header -> tabs header */
body.kcrm-view-ads-manager .kads-shell{background:#fafafa;min-height:calc(100vh - var(--kcrm-topbar-h,70px));}
body.kcrm-view-ads-manager .kads-page-name-header{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px 24px;background:#fff;border-bottom:1px solid #e8e8e8;box-shadow:0 1px 3px rgba(0,0,0,.05);
}
body.kcrm-view-ads-manager .kads-page-name-header .kads-platform-bar-title h1{font-size:18px;margin:0 0 2px;color:#1e293b;font-weight:800;}
body.kcrm-view-ads-manager .kads-page-name-header .kads-platform-bar-title p{font-size:12px;margin:0;color:#64748b;}
body.kcrm-view-ads-manager .kads-platform-bar{
  padding:10px 24px 0!important;background:#fff;border-bottom:1px solid #e8e8e8;box-shadow:none;gap:14px;
}
body.kcrm-view-ads-manager .kads-provider-title .kads-title-icon{font-size:20px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;}
body.kcrm-view-ads-manager .kads-provider-title h2{font-size:15px;line-height:1.1;margin:0 0 2px;color:#1e293b;font-weight:800;}
body.kcrm-view-ads-manager .kads-provider-title p{font-size:11px;line-height:1.2;margin:0;color:#64748b;}
body.kcrm-view-ads-manager .kads-platform-tabs{overflow-x:auto;flex-wrap:nowrap;white-space:nowrap;-webkit-overflow-scrolling:touch;scrollbar-width:none;}
body.kcrm-view-ads-manager .kads-platform-tabs::-webkit-scrollbar{display:none;}
body.kcrm-view-ads-manager .kads-platform-tab{flex:0 0 auto;}
body.kcrm-view-ads-manager .kads-subtabs{
  padding:10px 24px!important;background:#fff;border-bottom:1px solid #e8e8e8;overflow-x:auto;flex-wrap:nowrap;white-space:nowrap;-webkit-overflow-scrolling:touch;scrollbar-width:none;
}
body.kcrm-view-ads-manager .kads-subtabs::-webkit-scrollbar{display:none;}
body.kcrm-view-ads-manager .kads-subtab{flex:0 0 auto;}
body.kcrm-view-ads-manager .kads-content{padding:18px 24px 24px!important;overflow:visible!important;}

/* Instagram: split page heading and tab row while keeping original module look */
body.kcrm-view-instagram .kinsta-app{
  height:auto!important;
  min-height:calc(100vh - var(--kcrm-topbar-h,70px));
  overflow:visible!important;
  background:#fafafa!important;
}
body.kcrm-view-instagram .kinsta-topnav{
  height:auto!important;min-height:0!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:0!important;
  padding:0!important;background:#fff!important;border-bottom:1px solid #e8e8e8!important;box-shadow:0 1px 3px rgba(0,0,0,.05)!important;
}
body.kcrm-view-instagram .kinsta-topnav-left{
  width:100%;height:50px;display:flex;align-items:center;gap:10px;padding:0 20px;box-sizing:border-box;border-bottom:1px solid #f1f5f9;
}
body.kcrm-view-instagram .kinsta-topnav-tabs{
  width:100%;height:44px;margin-left:0!important;display:flex;align-items:center;gap:2px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;flex-wrap:nowrap;padding:0 12px;box-sizing:border-box;-webkit-overflow-scrolling:touch;scrollbar-width:none;
}
body.kcrm-view-instagram .kinsta-topnav-tabs::-webkit-scrollbar{display:none;}
body.kcrm-view-instagram .kinsta-tab{flex:0 0 auto;height:44px;padding:0 12px;font-size:12px;}
body.kcrm-view-instagram .kinsta-content{display:flex;overflow:visible!important;min-height:calc(100vh - 70px - 94px);}

@media (max-width: 768px), (hover:none) and (pointer:coarse) {
  /* Campaign and Meta Campaign fixed stack: main header -> page heading -> tabs -> content */
  body.kcrm-view-campaigns,
  body.kcrm-view-meta-campaign,
  body.kcrm-view-ads-manager,
  body.kcrm-view-instagram{background:#f5f7fb!important;}
  body.kcrm-view-campaigns .kcrm-content-shell,
  body.kcrm-view-meta-campaign .kcrm-content-shell,
  body.kcrm-view-ads-manager .kcrm-content-shell,
  body.kcrm-view-instagram .kcrm-content-shell{overflow:visible!important;background:#f5f7fb!important;}
  body.kcrm-view-campaigns .kcrm-main-content-area,
  body.kcrm-view-meta-campaign .kcrm-main-content-area,
  body.kcrm-view-ads-manager .kcrm-main-content-area,
  body.kcrm-view-instagram .kcrm-main-content-area{padding:0!important;margin:0!important;background:#f5f7fb!important;overflow:visible!important;}

  body.kcrm-view-campaigns .ktc-page,
  body.kcrm-view-meta-campaign .ktc-page{padding:0!important;margin:0!important;background:#f5f7fb!important;min-height:calc(100svh - var(--kbos-mobile-header-total));}
  body.kcrm-view-campaigns .ktc-page-header,
  body.kcrm-view-meta-campaign .ktc-page-header{
    position:fixed!important;top:var(--kbos-mobile-header-total)!important;left:0!important;right:0!important;z-index:214748000!important;
    height:44px!important;min-height:44px!important;max-height:44px!important;border-radius:0!important;border:0!important;border-bottom:1px solid #e5e7eb!important;
    padding:0 12px!important;background:#fff!important;display:flex!important;align-items:center!important;box-shadow:0 3px 9px rgba(15,23,42,.06)!important;
  }
  body.kcrm-view-campaigns .ktc-title-icon,
  body.kcrm-view-meta-campaign .ktc-title-icon{font-size:18px!important;}
  body.kcrm-view-campaigns .ktc-page-title,
  body.kcrm-view-meta-campaign .ktc-page-title{gap:8px!important;min-width:0;}
  body.kcrm-view-campaigns .ktc-page-title h1,
  body.kcrm-view-meta-campaign .ktc-page-title h1{font-size:14px!important;line-height:1!important;margin:0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  body.kcrm-view-campaigns .ktc-page-title p,
  body.kcrm-view-meta-campaign .ktc-page-title p{display:none!important;}
  body.kcrm-view-campaigns .ktc-page-header .ktc-btn,
  body.kcrm-view-meta-campaign .ktc-page-header .ktc-btn{height:30px!important;padding:0 10px!important;font-size:11px!important;white-space:nowrap;}
  body.kcrm-view-campaigns .ktc-tabs,
  body.kcrm-view-meta-campaign .ktc-tabs{
    position:fixed!important;top:calc(var(--kbos-mobile-header-total) + 44px)!important;left:0!important;right:0!important;z-index:214747999!important;
    height:42px!important;min-height:42px!important;max-height:42px!important;border-radius:0!important;border:0!important;border-bottom:1px solid #e5e7eb!important;
    padding:0 10px!important;margin:0!important;background:#fff!important;display:flex!important;align-items:center!important;gap:2px!important;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;white-space:nowrap!important;box-shadow:0 3px 9px rgba(15,23,42,.04)!important;
  }
  body.kcrm-view-campaigns .ktc-tab,
  body.kcrm-view-meta-campaign .ktc-tab{height:42px!important;padding:0 10px!important;font-size:11px!important;display:inline-flex;align-items:center;justify-content:center;}
  body.kcrm-view-campaigns .ktc-tab-content,
  body.kcrm-view-meta-campaign .ktc-tab-content{padding:96px 12px calc(82px + var(--kbos-mobile-safe-bottom))!important;background:#f5f7fb!important;}

  /* Ads fixed stack: main header -> Ads Manager page name -> provider -> tabs -> content */
  body.kcrm-view-ads-manager .kads-shell{padding:0!important;margin:0!important;background:#f5f7fb!important;min-height:calc(100svh - var(--kbos-mobile-header-total));}
  body.kcrm-view-ads-manager .kads-page-name-header{
    position:fixed!important;top:var(--kbos-mobile-header-total)!important;left:0!important;right:0!important;z-index:214748000!important;
    height:42px!important;min-height:42px!important;max-height:42px!important;padding:0 12px!important;display:flex!important;align-items:center!important;background:#fff!important;border-bottom:1px solid #e5e7eb!important;box-shadow:0 3px 9px rgba(15,23,42,.06)!important;
  }
  body.kcrm-view-ads-manager .kads-page-name-header .kads-title-icon{font-size:18px!important;}
  body.kcrm-view-ads-manager .kads-page-name-header h1{font-size:14px!important;line-height:1!important;margin:0!important;}
  body.kcrm-view-ads-manager .kads-page-name-header p{display:none!important;}
  body.kcrm-view-ads-manager .kads-platform-bar{
    position:fixed!important;top:calc(var(--kbos-mobile-header-total) + 42px)!important;left:0!important;right:0!important;z-index:214747999!important;
    height:54px!important;min-height:54px!important;max-height:54px!important;padding:0 10px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;flex-wrap:nowrap!important;background:#fff!important;border-bottom:1px solid #e5e7eb!important;overflow:hidden!important;
  }
  body.kcrm-view-ads-manager .kads-provider-title{flex:0 0 auto!important;gap:7px!important;min-width:120px;}
  body.kcrm-view-ads-manager .kads-provider-title .kads-title-icon{width:20px!important;height:20px!important;font-size:17px!important;}
  body.kcrm-view-ads-manager .kads-provider-title h2{font-size:12px!important;line-height:1!important;margin:0!important;}
  body.kcrm-view-ads-manager .kads-provider-title p{display:none!important;}
  body.kcrm-view-ads-manager .kads-platform-tabs{flex:1 1 auto!important;min-width:0!important;overflow-x:auto!important;gap:3px!important;}
  body.kcrm-view-ads-manager .kads-platform-tab{height:40px!important;padding:0 10px!important;font-size:11px!important;border-radius:10px!important;background:#f8fafc!important;}
  body.kcrm-view-ads-manager .kads-ptab-label{font-size:11px!important;}
  body.kcrm-view-ads-manager .kads-subtabs{
    position:fixed!important;top:calc(var(--kbos-mobile-header-total) + 96px)!important;left:0!important;right:0!important;z-index:214747998!important;
    height:42px!important;min-height:42px!important;max-height:42px!important;padding:0 10px!important;margin:0!important;display:flex!important;align-items:center!important;gap:2px!important;background:#fff!important;border-bottom:1px solid #e5e7eb!important;overflow-x:auto!important;flex-wrap:nowrap!important;
  }
  body.kcrm-view-ads-manager .kads-subtab{height:42px!important;display:inline-flex!important;align-items:center!important;padding:0 10px!important;font-size:11px!important;}
  body.kcrm-view-ads-manager .kads-sync-btn,
  body.kcrm-view-ads-manager .kads-connected-badge{flex:0 0 auto!important;font-size:10px!important;height:28px!important;padding:0 9px!important;margin-left:0!important;}
  body.kcrm-view-ads-manager .kads-content{padding:148px 12px calc(82px + var(--kbos-mobile-safe-bottom))!important;background:#f5f7fb!important;overflow:visible!important;}

  /* Instagram fixed stack: main header -> Instagram page heading -> tabs -> content */
  body.kcrm-view-instagram .kinsta-app{margin:0!important;padding:0!important;background:#f5f7fb!important;min-height:calc(100svh - var(--kbos-mobile-header-total))!important;overflow:visible!important;}
  body.kcrm-view-instagram .kinsta-topnav{
    position:fixed!important;top:var(--kbos-mobile-header-total)!important;left:0!important;right:0!important;width:100vw!important;z-index:214748000!important;
    height:86px!important;min-height:86px!important;max-height:86px!important;display:flex!important;flex-direction:column!important;background:#fff!important;border-bottom:1px solid #e5e7eb!important;box-shadow:0 3px 9px rgba(15,23,42,.06)!important;overflow:hidden!important;
  }
  body.kcrm-view-instagram .kinsta-topnav-left{height:44px!important;min-height:44px!important;padding:0 12px!important;border-bottom:1px solid #f1f5f9!important;}
  body.kcrm-view-instagram .kinsta-logo-icon svg{width:18px!important;height:18px!important;}
  body.kcrm-view-instagram .kinsta-app-title{font-size:14px!important;line-height:1!important;font-weight:750!important;}
  body.kcrm-view-instagram .kinsta-account-switcher select{height:28px!important;font-size:11px!important;max-width:160px!important;}
  body.kcrm-view-instagram .kinsta-topnav-tabs{height:42px!important;min-height:42px!important;padding:0 10px!important;display:flex!important;align-items:center!important;gap:2px!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;flex-wrap:nowrap!important;}
  body.kcrm-view-instagram .kinsta-tab{height:42px!important;flex:0 0 auto!important;padding:0 10px!important;font-size:11px!important;}
  body.kcrm-view-instagram .kinsta-content{padding-top:86px!important;min-height:calc(100svh - var(--kbos-mobile-header-total) - 86px)!important;background:#f5f7fb!important;overflow:visible!important;display:flex!important;padding-bottom:calc(82px + var(--kbos-mobile-safe-bottom))!important;}
}

/* ===== Contact detail mobile polish v2.6.6.47 ===== */
@media (max-width: 768px), (max-height: 520px) and (max-width: 1180px) {
  body.kcrm-view-contact-detail .kbos-module-content,
  body.kcrm-view-contact-detail .kcrm-main-content-area {
    background: #f5f7fb !important;
  }
  body.kcrm-view-contact-detail .kcrm-page {
    padding: 8px 10px 96px !important;
    margin: 0 !important;
  }
  body.kcrm-view-contact-detail .kcrm-detail-grid {
    display: block !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  body.kcrm-view-contact-detail .kcrm-detail-main,
  body.kcrm-view-contact-detail .kcrm-detail-side {
    width: 100% !important;
    max-width: none !important;
  }
  body.kcrm-view-contact-detail .kcrm-card {
    border-radius: 18px !important;
    padding: 14px !important;
    margin: 0 0 12px !important;
    border: 1px solid #e7edf5 !important;
    box-shadow: 0 6px 18px rgba(15,23,42,.045) !important;
  }
  body.kcrm-view-contact-detail .kcrm-detail-header {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
  }
  body.kcrm-view-contact-detail .kcrm-detail-header h2 {
    font-size: 20px !important;
    line-height: 1.15 !important;
    margin: 0 0 6px !important;
    word-break: break-word !important;
  }
  body.kcrm-view-contact-detail .kcrm-detail-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }
  body.kcrm-view-contact-detail .kcrm-detail-actions a,
  body.kcrm-view-contact-detail .kcrm-detail-actions span,
  body.kcrm-view-contact-detail .kcrm-detail-actions button {
    min-height: 38px !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 12px !important;
    border-radius: 12px !important;
    padding: 9px 10px !important;
    white-space: nowrap !important;
  }
  body.kcrm-view-contact-detail .kcrm-info-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  body.kcrm-view-contact-detail .kcrm-info-item {
    border-radius: 14px !important;
    padding: 11px 12px !important;
    background: #f8fafc !important;
    border: 1px solid #eef2f7 !important;
  }
  body.kcrm-view-contact-detail .kcrm-info-item span {
    font-size: 10px !important;
    letter-spacing: .04em !important;
    text-transform: uppercase !important;
    color: #64748b !important;
    font-weight: 800 !important;
  }
  body.kcrm-view-contact-detail .kcrm-info-item strong {
    display: block !important;
    margin-top: 4px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    word-break: break-word !important;
  }
  body.kcrm-view-contact-detail .kcrm-files-header,
  body.kcrm-view-contact-detail .kcrm-card h3 {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 15px !important;
    line-height: 1.25 !important;
  }
  body.kcrm-view-contact-detail .kcrm-files-table,
  body.kcrm-view-contact-detail .kcrm-table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
  }
  body.kcrm-view-contact-detail .kcrm-upload-row,
  body.kcrm-view-contact-detail .kcrm-form-row,
  body.kcrm-view-contact-detail .kcrm-form-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  body.kcrm-view-contact-detail input,
  body.kcrm-view-contact-detail select,
  body.kcrm-view-contact-detail textarea {
    font-size: 16px !important;
    border-radius: 12px !important;
  }
  body.kcrm-view-contact-detail .kcrm-btn,
  body.kcrm-view-contact-detail .kcrm-btn-ghost,
  body.kcrm-view-contact-detail .kcrm-btn-sm,
  body.kcrm-view-contact-detail .kcrm-wa-btn {
    min-height: 38px !important;
  }
}


/* ===== Desktop header safety reset v2.6.6.48 =====
   Prevent mobile app header rules from affecting desktop/tablet desktop layout. */
@media (min-width: 1025px) {
  body.kcrm-frontend-body .kcrm-topbar{
    position:sticky!important;
    top:0!important;
    left:auto!important;
    right:auto!important;
    width:auto!important;
    height:70px!important;
    min-height:70px!important;
    max-height:none!important;
    display:grid!important;
    grid-template-columns:auto minmax(220px,1fr) auto!important;
    align-items:center!important;
    gap:18px!important;
    padding:12px 20px!important;
    background:rgba(238,243,249,.94)!important;
    border-bottom:1px solid var(--kcrm-header-border)!important;
    box-shadow:none!important;
    transform:none!important;
    z-index:980!important;
  }
  body.kcrm-frontend-body .kcrm-topbar::before{display:none!important;content:none!important;}
  body.kcrm-frontend-body .kcrm-topbar-left,
  body.kcrm-frontend-body .kcrm-topbar-right{display:flex!important;align-items:center!important;gap:14px!important;min-width:0!important;}
  body.kcrm-frontend-body .kcrm-topbar-left{justify-content:flex-start!important;grid-column:auto!important;}
  body.kcrm-frontend-body .kcrm-topbar-right{justify-content:flex-end!important;margin-right:0!important;grid-column:auto!important;}
  body.kcrm-frontend-body .kcrm-topbar-center{display:block!important;grid-column:auto!important;order:initial!important;min-width:0!important;}
  body.kcrm-frontend-body .kcrm-topbar-brand{
    position:static!important;
    left:auto!important;
    top:auto!important;
    transform:none!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:10px!important;
    max-width:none!important;
    white-space:nowrap!important;
    z-index:auto!important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-logo{
    height:26px!important;
    max-height:26px!important;
    max-width:148px!important;
    width:auto!important;
    display:block!important;
    filter:none!important;
    object-fit:contain!important;
  }
  body.kcrm-frontend-body .kcrm-brand-divider{width:1px!important;height:20px!important;background:#b6c5d7!important;display:inline-block!important;flex:0 0 1px!important;}
  body.kcrm-frontend-body .kcrm-topbar-brand-text{display:inline-block!important;color:#1e3a5f!important;font-size:11px!important;letter-spacing:1.5px!important;font-weight:700!important;}
  body.kcrm-frontend-body .kcrm-topbar-toggle{width:34px!important;height:34px!important;border-radius:10px!important;background:#fff!important;border:none!important;box-shadow:0 1px 2px rgba(15,23,42,.06)!important;}
  body.kcrm-frontend-body .kcrm-topbar-toggle span{background:#183153!important;width:15px!important;height:2px!important;}
  body.kcrm-frontend-body .kcrm-header-add-btn,
  body.kcrm-frontend-body .kcrm-header-icon-wrap,
  body.kcrm-frontend-body .kcrm-header-company-pill{display:flex!important;}
  body.kcrm-frontend-body .kcrm-profile-trigger{height:40px!important;width:auto!important;min-width:0!important;border-radius:12px!important;padding:4px 8px 4px 4px!important;background:#fff!important;border:1px solid #d7e2ed!important;box-shadow:0 1px 2px rgba(15,23,42,.04)!important;display:flex!important;align-items:center!important;gap:8px!important;}
  body.kcrm-frontend-body .kcrm-profile-meta{display:flex!important;}
  body.kcrm-frontend-body .kcrm-profile-caret{display:inline-block!important;}
  body.kcrm-frontend-body .kcrm-user-avatar{width:32px!important;height:32px!important;border-radius:10px!important;background:#1e3a5f!important;color:#fff!important;font-size:13px!important;font-weight:800!important;}
  body.kcrm-frontend-body .kcrm-content-shell{padding-top:0!important;}
}


/* ===== Desktop layout audit fix v2.6.6.49 =====
   Keep all app/mobile header rules away from desktop browsers, even if the desktop window is narrow. */
@media (hover: hover) and (pointer: fine) {
  body.kcrm-frontend-body {
    background: #eef3f9 !important;
    overflow-x: hidden !important;
  }
  body.kcrm-frontend-body::before {
    display: none !important;
    content: none !important;
  }
  body.kcrm-frontend-body .kcrm-app-shell {
    display: flex !important;
    min-height: 100vh !important;
    flex-direction: row !important;
    background: #eef3f9 !important;
  }
  body.kcrm-frontend-body .kcrm-app-sidebar {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 266px !important;
    transform: none !important;
    transition: width .18s ease, transform .18s ease !important;
    z-index: 900 !important;
    background: linear-gradient(180deg,#0b1f3a 0%,#102f57 100%) !important;
  }
  body.kcrm-frontend-body.kcrm-sidebar-collapsed .kcrm-app-sidebar { width: 76px !important; }
  body.kcrm-frontend-body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-app-sidebar { width: 266px !important; }
  body.kcrm-frontend-body .kcrm-content-shell {
    margin-left: 266px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-width: 0 !important;
    width: calc(100% - 266px) !important;
    display: flex !important;
    flex-direction: column !important;
    background: #eef3f9 !important;
  }
  body.kcrm-frontend-body.kcrm-sidebar-collapsed .kcrm-content-shell { margin-left: 76px !important; width: calc(100% - 76px) !important; }
  body.kcrm-frontend-body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-content-shell { margin-left: 76px !important; }
  body.kcrm-frontend-body .kcrm-topbar {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    height: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;
    display: grid !important;
    grid-template-columns: auto minmax(220px,1fr) auto !important;
    align-items: center !important;
    gap: 18px !important;
    padding: 12px 20px !important;
    background: rgba(238,243,249,.94) !important;
    border-bottom: 1px solid var(--kcrm-header-border,#d7e2ed) !important;
    box-shadow: none !important;
    transform: none !important;
    z-index: 980 !important;
  }
  body.kcrm-frontend-body .kcrm-topbar::before { display: none !important; content: none !important; }
  body.kcrm-frontend-body .kcrm-topbar-left,
  body.kcrm-frontend-body .kcrm-topbar-right {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    min-width: 0 !important;
  }
  body.kcrm-frontend-body .kcrm-topbar-left { justify-content: flex-start !important; grid-column: auto !important; }
  body.kcrm-frontend-body .kcrm-topbar-right { justify-content: flex-end !important; margin-right: 0 !important; grid-column: auto !important; }
  body.kcrm-frontend-body .kcrm-topbar-center {
    display: block !important;
    grid-column: auto !important;
    order: initial !important;
    min-width: 0 !important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    max-width: 220px !important;
    white-space: nowrap !important;
    z-index: auto !important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-logo {
    height: 24px !important;
    max-height: 24px !important;
    max-width: 128px !important;
    width: auto !important;
    display: block !important;
    object-fit: contain !important;
    filter: none !important;
  }
  body.kcrm-frontend-body .kcrm-brand-divider {
    width: 1px !important;
    height: 20px !important;
    background: #b6c5d7 !important;
    display: inline-block !important;
    flex: 0 0 1px !important;
  }
  body.kcrm-frontend-body .kcrm-topbar-brand-text {
    display: inline-block !important;
    color: #1e3a5f !important;
    font-size: 11px !important;
    letter-spacing: 1.5px !important;
    font-weight: 700 !important;
  }
  body.kcrm-frontend-body .kcrm-topbar-toggle {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    background: #fff !important;
    border: none !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.06) !important;
  }
  body.kcrm-frontend-body .kcrm-topbar-toggle span { background: #183153 !important; width: 15px !important; height: 2px !important; }
  body.kcrm-frontend-body .kcrm-global-search-form { display: flex !important; }
  body.kcrm-frontend-body .kcrm-header-add-btn,
  body.kcrm-frontend-body .kcrm-header-icon-wrap,
  body.kcrm-frontend-body .kcrm-header-company-pill { display: flex !important; }
  body.kcrm-frontend-body .kcrm-profile-trigger {
    height: 40px !important;
    width: auto !important;
    min-width: 0 !important;
    border-radius: 12px !important;
    padding: 4px 8px 4px 4px !important;
    background: #fff !important;
    border: 1px solid #d7e2ed !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.04) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }
  body.kcrm-frontend-body .kcrm-profile-meta { display: flex !important; flex-direction: column !important; }
  body.kcrm-frontend-body .kcrm-profile-caret { display: inline-block !important; }
  body.kcrm-frontend-body .kcrm-user-avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 10px !important;
    background: #1e3a5f !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }
  body.kcrm-frontend-body .kcrm-profile-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    width: 260px !important;
    max-height: none !important;
    border-radius: 16px !important;
    z-index: 1400 !important;
  }
  body.kcrm-frontend-body .kcrm-mobile-bottom-nav,
  body.kcrm-frontend-body .kcrm-mobile-sidebar-backdrop { display: none !important; }
  body.kcrm-frontend-body .kcrm-body-layout,
  body.kcrm-frontend-body .kcrm-body-layout--plain,
  body.kcrm-frontend-body .kcrm-body-layout--dashboard {
    display: flex !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  body.kcrm-frontend-body .kcrm-main-content-area {
    padding: 20px !important;
    min-height: calc(100vh - 70px) !important;
    overflow: visible !important;
  }
}


/* ===== Desktop full-width header with sidebar below header v2.6.6.50 =====
   Desktop only: header starts from the left edge of the screen, sidebar starts under it. */
@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
  :root { --kcrm-desktop-topbar-h: 70px; }

  body.kcrm-frontend-body .kcrm-app-shell {
    display: flex !important;
    flex-direction: row !important;
    min-height: 100vh !important;
    background: #eef3f9 !important;
  }

  body.kcrm-frontend-body .kcrm-topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: var(--kcrm-desktop-topbar-h) !important;
    min-height: var(--kcrm-desktop-topbar-h) !important;
    max-height: var(--kcrm-desktop-topbar-h) !important;
    display: grid !important;
    grid-template-columns: auto minmax(260px, 1fr) auto !important;
    align-items: center !important;
    gap: 18px !important;
    padding: 12px 24px !important;
    background: rgba(238,243,249,.96) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid var(--kcrm-header-border,#d7e2ed) !important;
    box-shadow: 0 8px 24px rgba(15,23,42,.06) !important;
    transform: none !important;
    z-index: 1800 !important;
  }

  body.kcrm-frontend-body .kcrm-topbar::before {
    display: none !important;
    content: none !important;
  }

  body.kcrm-frontend-body .kcrm-app-sidebar {
    position: fixed !important;
    top: var(--kcrm-desktop-topbar-h) !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 266px !important;
    height: auto !important;
    transform: none !important;
    z-index: 1200 !important;
    background: linear-gradient(180deg,#0b1f3a 0%,#102f57 100%) !important;
    box-shadow: 10px 0 30px rgba(2,12,27,.18) !important;
  }

  body.kcrm-frontend-body .kcrm-content-shell {
    margin-left: 266px !important;
    width: calc(100% - 266px) !important;
    min-width: 0 !important;
    padding-top: var(--kcrm-desktop-topbar-h) !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    background: #eef3f9 !important;
  }

  body.kcrm-frontend-body.kcrm-sidebar-collapsed .kcrm-app-sidebar {
    width: 76px !important;
  }

  body.kcrm-frontend-body.kcrm-sidebar-collapsed .kcrm-content-shell {
    margin-left: 76px !important;
    width: calc(100% - 76px) !important;
    padding-top: var(--kcrm-desktop-topbar-h) !important;
  }

  body.kcrm-frontend-body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-app-sidebar {
    width: 266px !important;
  }

  body.kcrm-frontend-body.kcrm-sidebar-collapsed.kcrm-sidebar-hovered .kcrm-content-shell {
    margin-left: 76px !important;
    width: calc(100% - 76px) !important;
  }

  body.kcrm-frontend-body .kcrm-topbar-left,
  body.kcrm-frontend-body .kcrm-topbar-center,
  body.kcrm-frontend-body .kcrm-topbar-right {
    min-width: 0 !important;
  }

  body.kcrm-frontend-body .kcrm-topbar-left,
  body.kcrm-frontend-body .kcrm-topbar-right {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
  }

  body.kcrm-frontend-body .kcrm-topbar-left { justify-content: flex-start !important; }
  body.kcrm-frontend-body .kcrm-topbar-right { justify-content: flex-end !important; margin-right: 0 !important; }
  body.kcrm-frontend-body .kcrm-topbar-center { display: block !important; }

  body.kcrm-frontend-body .kcrm-right-widgets {
    top: calc(var(--kcrm-desktop-topbar-h) + 8px) !important;
    max-height: calc(100vh - var(--kcrm-desktop-topbar-h) - 8px) !important;
  }

  body.kcrm-frontend-body .kcrm-profile-menu,
  body.kcrm-frontend-body .kcrm-nav-dropdown {
    z-index: 1900 !important;
  }
}

/* ===== Compact desktop header height v2.6.6.51 =====
   Desktop only: keep full-width header, make height only as much as needed. */
@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
  :root { --kcrm-desktop-topbar-h: 56px !important; }

  body.kcrm-frontend-body .kcrm-topbar {
    height: var(--kcrm-desktop-topbar-h) !important;
    min-height: var(--kcrm-desktop-topbar-h) !important;
    max-height: var(--kcrm-desktop-topbar-h) !important;
    padding: 8px 20px !important;
    gap: 14px !important;
    box-shadow: 0 5px 16px rgba(15,23,42,.05) !important;
  }

  body.kcrm-frontend-body .kcrm-app-sidebar {
    top: var(--kcrm-desktop-topbar-h) !important;
  }

  body.kcrm-frontend-body .kcrm-content-shell,
  body.kcrm-frontend-body.kcrm-sidebar-collapsed .kcrm-content-shell {
    padding-top: var(--kcrm-desktop-topbar-h) !important;
  }

  body.kcrm-frontend-body .kcrm-topbar-brand-logo {
    height: 22px !important;
    max-height: 22px !important;
    max-width: 120px !important;
  }

  body.kcrm-frontend-body .kcrm-brand-divider {
    height: 16px !important;
  }

  body.kcrm-frontend-body .kcrm-topbar-brand-text {
    font-size: 10px !important;
    letter-spacing: 1.35px !important;
  }

  body.kcrm-frontend-body .kcrm-topbar-toggle {
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
  }

  body.kcrm-frontend-body .kcrm-topbar-toggle span {
    width: 14px !important;
  }

  body.kcrm-frontend-body .kcrm-global-search-form {
    min-height: 36px !important;
    height: 36px !important;
  }

  body.kcrm-frontend-body .kcrm-global-search {
    height: 36px !important;
    min-height: 36px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 12px !important;
  }

  body.kcrm-frontend-body .kcrm-header-add-btn,
  body.kcrm-frontend-body .kcrm-header-icon-btn {
    height: 34px !important;
    min-height: 34px !important;
  }

  body.kcrm-frontend-body .kcrm-header-add-btn {
    padding: 0 12px !important;
    font-size: 12px !important;
  }

  body.kcrm-frontend-body .kcrm-header-icon-btn {
    width: 34px !important;
    border-radius: 10px !important;
  }

  body.kcrm-frontend-body .kcrm-header-company-pill {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 10px !important;
  }

  body.kcrm-frontend-body .kcrm-profile-trigger {
    height: 36px !important;
    min-height: 36px !important;
    border-radius: 10px !important;
    padding: 3px 8px 3px 3px !important;
  }

  body.kcrm-frontend-body .kcrm-user-avatar {
    width: 30px !important;
    height: 30px !important;
    border-radius: 9px !important;
    font-size: 12px !important;
  }

  body.kcrm-frontend-body .kcrm-user-name {
    font-size: 12px !important;
    line-height: 1.1 !important;
  }

  body.kcrm-frontend-body .kcrm-user-role {
    font-size: 10px !important;
    line-height: 1.1 !important;
  }

  body.kcrm-frontend-body .kcrm-right-widgets {
    top: calc(var(--kcrm-desktop-topbar-h) + 8px) !important;
    max-height: calc(100vh - var(--kcrm-desktop-topbar-h) - 8px) !important;
  }

  body.kcrm-frontend-body .kcrm-main-content-area {
    min-height: calc(100vh - var(--kcrm-desktop-topbar-h)) !important;
  }
}


/* Instagram v2.6.6.62: protect inbox/chat height from global BOS overflow overrides */
body.kcrm-view-instagram .kinsta-inbox-layout{min-height:calc(100vh - 70px - 94px)!important;}
body.kcrm-view-instagram .kinsta-inbox-chat{min-height:calc(100vh - 70px - 94px)!important;}
body.kcrm-view-instagram .kinsta-messages-wrap{display:flex;min-height:260px!important;}
@media (max-width:768px), (hover:none) and (pointer:coarse){
  body.kcrm-view-instagram .kinsta-inbox-layout,
  body.kcrm-view-instagram .kinsta-inbox-chat{min-height:calc(100svh - var(--kbos-mobile-header-total) - 86px - 82px)!important;}
  body.kcrm-view-instagram .kinsta-messages-wrap{min-height:320px!important;}
}


/* ===== Scrollable settings/module tabs with right overflow indicator v2.6.6.82 ===== */
.kbos-scroll-tabs-shell{position:relative;min-width:0;}
.kbos-module-tabs-wrap{position:relative;min-width:0;flex:1;display:flex;align-items:center;margin-left:auto;}
.kbos-module-tabs-wrap .kbos-module-tabs{margin-left:0;width:100%;padding-right:32px;box-sizing:border-box;}
.kbos-settings-tabs-wrap{position:relative;margin-bottom:24px;}
.kbos-settings-tabs-wrap .kcrm-settings-tabs{overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;white-space:nowrap!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important;padding-right:34px!important;margin-bottom:0!important;box-sizing:border-box;}
.kbos-settings-tabs-wrap .kcrm-settings-tabs::-webkit-scrollbar{display:none!important;}
.kbos-settings-tabs-wrap .kcrm-tab{flex:0 0 auto;white-space:nowrap;}
.kbos-tab-more-indicator{position:absolute;right:0;top:50%;transform:translateY(-50%);width:30px;height:34px;display:inline-flex;align-items:center;justify-content:flex-end;padding-right:8px;box-sizing:border-box;font-size:18px;font-weight:900;line-height:1;color:#334155;background:linear-gradient(90deg,rgba(255,255,255,0),#fff 38%,#fff);pointer-events:none;opacity:0;visibility:hidden;transition:opacity .15s ease,visibility .15s ease;z-index:4;}
.kbos-tab-more-indicator.is-visible{opacity:1;visibility:visible;}
.kbos-module-topnav--system .kbos-tab-more-indicator,.kbos-module-topnav--settings .kbos-tab-more-indicator{color:#1f2937;}
@media(max-width:900px){
  .kbos-module-tabs-wrap{width:100%;height:44px;margin-left:0;flex:0 0 auto;}
  .kbos-module-tabs-wrap .kbos-module-tabs{height:44px;padding-right:34px;}
}
@media(max-width:768px){
  body.kcrm-frontend-body .kbos-module-tabs-wrap{height:var(--kbos-mobile-tabs-h)!important;min-height:var(--kbos-mobile-tabs-h)!important;flex:0 0 var(--kbos-mobile-tabs-h)!important;width:100%!important;margin:0!important;position:relative!important;background:#fff!important;box-sizing:border-box!important;}
  body.kcrm-frontend-body .kbos-module-tabs-wrap .kbos-module-tabs{height:var(--kbos-mobile-tabs-h)!important;min-height:var(--kbos-mobile-tabs-h)!important;width:100%!important;padding:0 38px 0 12px!important;margin:0!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:2px!important;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;white-space:nowrap!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important;background:#fff!important;box-sizing:border-box!important;}
  body.kcrm-frontend-body .kbos-module-tabs-wrap .kbos-module-tabs::-webkit-scrollbar{display:none!important;}
  body.kcrm-frontend-body .kbos-tab-more-indicator{right:0!important;width:36px!important;height:var(--kbos-mobile-tabs-h)!important;padding-right:11px!important;font-size:19px!important;background:linear-gradient(90deg,rgba(255,255,255,0),#fff 34%,#fff)!important;}
}

/* ===== Settings top tab overflow correction v2.6.6.82 =====
   Fixes desktop/large-screen settings tabs starting under the page title or hiding first tabs.
   The module top navigation is the single source of truth, so the duplicate inner settings tab row is hidden. */
body.kcrm-frontend-body .kbos-module-topnav--settings,
body.kcrm-frontend-body .kbos-module-topnav--system{
  overflow:hidden!important;
}
body.kcrm-frontend-body .kbos-module-topnav--settings .kbos-module-topnav-left,
body.kcrm-frontend-body .kbos-module-topnav--system .kbos-module-topnav-left{
  flex:0 0 auto!important;
  position:relative!important;
  z-index:2!important;
  background:#fff!important;
}
body.kcrm-frontend-body .kbos-module-topnav--settings .kbos-module-tabs-wrap,
body.kcrm-frontend-body .kbos-module-topnav--system .kbos-module-tabs-wrap{
  flex:1 1 auto!important;
  min-width:0!important;
  overflow:hidden!important;
  margin-left:4px!important;
  max-width:100%!important;
}
body.kcrm-frontend-body .kbos-module-topnav--settings .kbos-module-tabs-wrap .kbos-module-tabs,
body.kcrm-frontend-body .kbos-module-topnav--system .kbos-module-tabs-wrap .kbos-module-tabs{
  justify-content:flex-start!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  flex-wrap:nowrap!important;
  white-space:nowrap!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:none!important;
  padding-left:0!important;
  padding-right:38px!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
body.kcrm-frontend-body .kbos-module-topnav--settings .kbos-module-tabs-wrap .kbos-module-tab,
body.kcrm-frontend-body .kbos-module-topnav--system .kbos-module-tabs-wrap .kbos-module-tab{
  flex:0 0 auto!important;
}
body.kcrm-frontend-body .kbos-module-topnav--settings + .kbos-module-content .kbos-settings-tabs-wrap,
body.kcrm-frontend-body .kbos-module-topnav--system + .kbos-module-content .kbos-settings-tabs-wrap{
  display:none!important;
}
@media(max-width:900px){
  body.kcrm-frontend-body .kbos-module-topnav--settings .kbos-module-tabs-wrap,
  body.kcrm-frontend-body .kbos-module-topnav--system .kbos-module-tabs-wrap{
    margin-left:0!important;
    width:100%!important;
  }
}

/* ===== Mobile Contacts tab residue fix v2.6.8.44 =====
   Desktop untouched. On mobile the Contacts/Add Contact tab row must stay visible,
   not clipped by the overflow residue/arrow layer. */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  body.kcrm-frontend-body.kcrm-view-contacts .kbos-module-topnav,
  body.kcrm-frontend-body.kcrm-view-add-contact .kbos-module-topnav,
  body.kcrm-frontend-body.kcrm-view-edit-contact .kbos-module-topnav,
  body.kcrm-frontend-body.kcrm-view-contact-detail .kbos-module-topnav{
    overflow:hidden!important;
    height:calc(var(--kbos-mobile-pagehead-h, 42px) + var(--kbos-mobile-tabs-h, 40px))!important;
    min-height:calc(var(--kbos-mobile-pagehead-h, 42px) + var(--kbos-mobile-tabs-h, 40px))!important;
    max-height:calc(var(--kbos-mobile-pagehead-h, 42px) + var(--kbos-mobile-tabs-h, 40px))!important;
  }
  body.kcrm-frontend-body.kcrm-view-contacts .kbos-module-tabs-wrap,
  body.kcrm-frontend-body.kcrm-view-add-contact .kbos-module-tabs-wrap,
  body.kcrm-frontend-body.kcrm-view-edit-contact .kbos-module-tabs-wrap,
  body.kcrm-frontend-body.kcrm-view-contact-detail .kbos-module-tabs-wrap{
    display:flex!important;
    align-items:center!important;
    width:100%!important;
    height:var(--kbos-mobile-tabs-h, 40px)!important;
    min-height:var(--kbos-mobile-tabs-h, 40px)!important;
    flex:0 0 var(--kbos-mobile-tabs-h, 40px)!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
    overflow:hidden!important;
    position:relative!important;
    box-sizing:border-box!important;
  }
  body.kcrm-frontend-body.kcrm-view-contacts .kbos-module-tabs-wrap .kbos-module-tabs,
  body.kcrm-frontend-body.kcrm-view-add-contact .kbos-module-tabs-wrap .kbos-module-tabs,
  body.kcrm-frontend-body.kcrm-view-edit-contact .kbos-module-tabs-wrap .kbos-module-tabs,
  body.kcrm-frontend-body.kcrm-view-contact-detail .kbos-module-tabs-wrap .kbos-module-tabs{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:100%!important;
    height:var(--kbos-mobile-tabs-h, 40px)!important;
    min-height:var(--kbos-mobile-tabs-h, 40px)!important;
    flex:1 1 auto!important;
    gap:6px!important;
    padding:0 12px!important;
    margin:0!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    white-space:nowrap!important;
    flex-wrap:nowrap!important;
    scrollbar-width:none!important;
    -webkit-overflow-scrolling:touch!important;
    background:#fff!important;
    box-sizing:border-box!important;
  }
  body.kcrm-frontend-body.kcrm-view-contacts .kbos-module-tabs-wrap .kbos-module-tabs::-webkit-scrollbar,
  body.kcrm-frontend-body.kcrm-view-add-contact .kbos-module-tabs-wrap .kbos-module-tabs::-webkit-scrollbar,
  body.kcrm-frontend-body.kcrm-view-edit-contact .kbos-module-tabs-wrap .kbos-module-tabs::-webkit-scrollbar,
  body.kcrm-frontend-body.kcrm-view-contact-detail .kbos-module-tabs-wrap .kbos-module-tabs::-webkit-scrollbar{display:none!important;}
  body.kcrm-frontend-body.kcrm-view-contacts .kbos-module-tab,
  body.kcrm-frontend-body.kcrm-view-add-contact .kbos-module-tab,
  body.kcrm-frontend-body.kcrm-view-edit-contact .kbos-module-tab,
  body.kcrm-frontend-body.kcrm-view-contact-detail .kbos-module-tab{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:max-content!important;
    max-width:none!important;
    height:var(--kbos-mobile-tabs-h, 40px)!important;
    padding:0 12px!important;
    margin:0!important;
    line-height:1!important;
    overflow:visible!important;
    white-space:nowrap!important;
    text-overflow:clip!important;
    box-sizing:border-box!important;
  }
  body.kcrm-frontend-body.kcrm-view-contacts .kbos-module-tab span,
  body.kcrm-frontend-body.kcrm-view-add-contact .kbos-module-tab span,
  body.kcrm-frontend-body.kcrm-view-edit-contact .kbos-module-tab span,
  body.kcrm-frontend-body.kcrm-view-contact-detail .kbos-module-tab span{
    display:inline-flex!important;
    align-items:center!important;
    visibility:visible!important;
    opacity:1!important;
    width:auto!important;
    max-width:none!important;
    overflow:visible!important;
    white-space:nowrap!important;
    text-overflow:clip!important;
  }
  body.kcrm-frontend-body.kcrm-view-contacts .kbos-tab-more-indicator,
  body.kcrm-frontend-body.kcrm-view-add-contact .kbos-tab-more-indicator,
  body.kcrm-frontend-body.kcrm-view-edit-contact .kbos-tab-more-indicator,
  body.kcrm-frontend-body.kcrm-view-contact-detail .kbos-tab-more-indicator{
    display:none!important;
    opacity:0!important;
    visibility:hidden!important;
  }
}

/* ===== Global mobile module-tab residue fix v2.6.8.45 =====
   Apply to every BOS module on mobile only. The right overflow indicator/arrow was
   covering/clipping tab text on multiple pages; desktop tab behaviour is untouched. */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  body.kcrm-frontend-body .kbos-tab-more-indicator,
  body.kcrm-frontend-body .kbos-tab-more-indicator.is-visible{
    display:none!important;
    opacity:0!important;
    visibility:hidden!important;
    width:0!important;
    min-width:0!important;
    max-width:0!important;
    pointer-events:none!important;
  }

  body.kcrm-frontend-body .kbos-module-topnav.kbos-module-topnav--has-tabs{
    overflow:hidden!important;
    height:calc(var(--kbos-mobile-pagehead-h, 42px) + var(--kbos-mobile-tabs-h, 40px))!important;
    min-height:calc(var(--kbos-mobile-pagehead-h, 42px) + var(--kbos-mobile-tabs-h, 40px))!important;
    max-height:calc(var(--kbos-mobile-pagehead-h, 42px) + var(--kbos-mobile-tabs-h, 40px))!important;
  }

  body.kcrm-frontend-body .kbos-module-topnav.kbos-module-topnav--has-tabs .kbos-module-tabs-wrap,
  body.kcrm-frontend-body .kbos-module-topnav.kbos-module-topnav--has-tabs .kbos-scroll-tabs-shell{
    display:flex!important;
    align-items:center!important;
    width:100%!important;
    height:var(--kbos-mobile-tabs-h, 40px)!important;
    min-height:var(--kbos-mobile-tabs-h, 40px)!important;
    max-height:var(--kbos-mobile-tabs-h, 40px)!important;
    flex:0 0 var(--kbos-mobile-tabs-h, 40px)!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
    overflow:hidden!important;
    position:relative!important;
    box-sizing:border-box!important;
  }

  body.kcrm-frontend-body .kbos-module-topnav.kbos-module-topnav--has-tabs .kbos-module-tabs-wrap .kbos-module-tabs,
  body.kcrm-frontend-body .kbos-module-topnav.kbos-module-topnav--has-tabs .kbos-scroll-tabs-shell .kbos-module-tabs,
  body.kcrm-frontend-body .kbos-module-topnav.kbos-module-topnav--has-tabs > .kbos-module-tabs{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:100%!important;
    max-width:100%!important;
    height:var(--kbos-mobile-tabs-h, 40px)!important;
    min-height:var(--kbos-mobile-tabs-h, 40px)!important;
    max-height:var(--kbos-mobile-tabs-h, 40px)!important;
    flex:1 1 auto!important;
    gap:6px!important;
    padding:0 12px!important;
    margin:0!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    white-space:nowrap!important;
    flex-wrap:nowrap!important;
    scrollbar-width:none!important;
    -webkit-overflow-scrolling:touch!important;
    background:#fff!important;
    box-sizing:border-box!important;
  }

  body.kcrm-frontend-body .kbos-module-topnav.kbos-module-topnav--has-tabs .kbos-module-tabs::-webkit-scrollbar{
    display:none!important;
  }

  body.kcrm-frontend-body .kbos-module-topnav.kbos-module-topnav--has-tabs .kbos-module-tab{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:max-content!important;
    max-width:none!important;
    height:var(--kbos-mobile-tabs-h, 40px)!important;
    min-height:var(--kbos-mobile-tabs-h, 40px)!important;
    padding:0 12px!important;
    margin:0!important;
    line-height:1!important;
    overflow:visible!important;
    white-space:nowrap!important;
    text-overflow:clip!important;
    box-sizing:border-box!important;
  }

  body.kcrm-frontend-body .kbos-module-topnav.kbos-module-topnav--has-tabs .kbos-module-tab span,
  body.kcrm-frontend-body .kbos-module-topnav.kbos-module-topnav--has-tabs .kbos-module-tab-icon{
    display:inline-flex!important;
    align-items:center!important;
    visibility:visible!important;
    opacity:1!important;
    width:auto!important;
    max-width:none!important;
    overflow:visible!important;
    white-space:nowrap!important;
    text-overflow:clip!important;
  }
}

/* Shipping Labels manager — keep Print All visible even when inner sales page head is hidden */
.kbos-module-content .ksales-label-toolbar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:12px 14px!important;margin:0 0 14px!important;background:#fff!important;border:1px solid #e2e8f0!important;border-radius:12px!important;box-shadow:0 1px 3px rgba(0,0,0,.06),0 4px 16px rgba(0,0,0,.04)!important;}
.kbos-module-content .ksales-label-toolbar strong{display:block!important;color:#0f172a!important;font-size:14px!important;line-height:1.2!important;margin-bottom:2px!important;}
.kbos-module-content .ksales-label-toolbar span{display:block!important;color:#64748b!important;font-size:11px!important;line-height:1.25!important;}
.kbos-module-content .ksales-label-toolbar-actions{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;}
.kbos-module-content .ksales-label-stats{display:grid!important;grid-template-columns:repeat(5,minmax(120px,1fr))!important;gap:12px!important;margin:0 0 16px!important;}
.kbos-module-content .ksales-label-stats .ksales-stat{display:block!important;background:#fff!important;border:1px solid #e2e8f0!important;border-radius:12px!important;padding:14px 16px!important;box-shadow:0 1px 3px rgba(0,0,0,.06),0 4px 16px rgba(0,0,0,.04)!important;position:relative!important;overflow:hidden!important;}
.kbos-module-content .ksales-label-stats .ksales-stat-val{font-size:24px!important;font-weight:800!important;color:#0f172a!important;line-height:1!important;margin-bottom:4px!important;}
.kbos-module-content .ksales-label-stats .ksales-stat-label{font-size:10px!important;font-weight:700!important;text-transform:uppercase!important;letter-spacing:.55px!important;color:#94a3b8!important;}
@media(max-width:820px){
  .kbos-module-content .ksales-label-toolbar{align-items:stretch!important;flex-direction:column!important;padding:11px 12px!important;}
  .kbos-module-content .ksales-label-toolbar-actions{width:100%!important;}
  .kbos-module-content .ksales-label-toolbar-actions .ksales-btn{flex:1 1 auto!important;justify-content:center!important;}
  .kbos-module-content .ksales-label-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
  .kbos-module-content .ksales-label-stats .ksales-stat{padding:10px 11px!important;}
  .kbos-module-content .ksales-label-stats .ksales-stat-val{font-size:18px!important;}
  .kbos-module-content .ksales-label-stats .ksales-stat-label{font-size:9px!important;}
}


/* === Developer API topnav visibility polish === */
.kbos-module-topnav--developer-api{
  background:linear-gradient(135deg,#071426 0%,#0b2747 62%,#12345f 100%)!important;
  border-bottom-color:rgba(148,163,184,.24)!important;
  box-shadow:0 10px 28px rgba(2,6,23,.18)!important;
}
.kbos-module-topnav--developer-api .kbos-module-title{color:#f8fbff!important;}
.kbos-module-topnav--developer-api .kbos-module-icon{
  background:rgba(255,255,255,.14)!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.16)!important;
  box-shadow:none!important;
}
.kbos-module-topnav--developer-api .kbos-module-tab{color:rgba(219,234,254,.84)!important;}
.kbos-module-topnav--developer-api .kbos-module-tab:hover,
.kbos-module-topnav--developer-api .kbos-module-tab.active{
  color:#fff!important;
  background:rgba(255,255,255,.10)!important;
  border-bottom-color:#60a5fa!important;
}
.kbos-module-topnav--developer-api .kbos-tab-more-indicator{color:#fff!important;}

/* === Developer API standard settings header + mobile visibility fix v2.6.9.51 === */
body.kcrm-frontend-body .kbos-module-topnav--developer-api{
  background:#fff!important;
  border-bottom:1px solid #e5e7eb!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
body.kcrm-frontend-body .kbos-module-topnav--developer-api .kbos-module-topnav-left{background:#fff!important;}
body.kcrm-frontend-body .kbos-module-topnav--developer-api .kbos-module-title{color:#0f172a!important;}
body.kcrm-frontend-body .kbos-module-topnav--developer-api .kbos-module-icon{background:linear-gradient(135deg,#475569,#0f172a)!important;color:#fff!important;border:0!important;}
body.kcrm-frontend-body .kbos-module-topnav--developer-api .kbos-module-tab{color:#334155!important;background:transparent!important;}
body.kcrm-frontend-body .kbos-module-topnav--developer-api .kbos-module-tab:hover,
body.kcrm-frontend-body .kbos-module-topnav--developer-api .kbos-module-tab.active{color:#1f2937!important;background:#f8fafc!important;border-bottom-color:#1f2937!important;}
body.kcrm-frontend-body .kbos-module-topnav--developer-api .kbos-tab-more-indicator{color:#1f2937!important;background:linear-gradient(90deg,rgba(255,255,255,0),#fff 38%,#fff)!important;}
body.kcrm-frontend-body .kbos-module-content .kbos-devapi{max-width:100%!important;overflow-x:hidden!important;}
@media(max-width:768px),(hover:none) and (pointer:coarse){
  body.kcrm-frontend-body .kbos-module-content .kbos-devapi-section{max-width:100%!important;overflow:hidden!important;}
  body.kcrm-frontend-body .kbos-module-content .kbos-devapi-table td[style]{white-space:normal!important;}
}


/* === Header search removal: BOS topbar now uses logo + right actions only === */
.kcrm-topbar{grid-template-columns:auto minmax(0,1fr)!important;}
.kcrm-topbar-right{grid-column:2!important;justify-content:flex-end!important;}
.kcrm-topbar-center,.kcrm-mobile-search-bar{display:none!important;}
@media(max-width:820px){
  .kcrm-topbar{display:flex!important;align-items:center!important;justify-content:space-between!important;}
  .kcrm-topbar-left{flex:1 1 auto!important;min-width:0!important;}
  .kcrm-topbar-right{flex:0 0 auto!important;margin-left:auto!important;}
}

/* 2.6.9.103 — Premium topbar quick status + Create menu */
.kcrm-topbar-center{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;overflow:hidden;}
.kcrm-topbar-chip{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 9px;border:1px solid #dbe5f0;border-radius:999px;background:rgba(255,255,255,.72);color:#334155;text-decoration:none;font-size:10.5px;font-weight:800;line-height:1;white-space:nowrap;box-shadow:0 1px 2px rgba(15,23,42,.035);backdrop-filter:blur(8px);max-width:160px;}
.kcrm-topbar-chip:hover{background:#fff;color:#0f172a;border-color:#c8d7e6;text-decoration:none;}
.kcrm-topbar-chip strong{font-size:11px;font-weight:900;color:#0f172a;}
.kcrm-chip-dot{width:8px;height:8px;border-radius:999px;display:inline-block;background:#64748b;box-shadow:0 0 0 3px rgba(100,116,139,.11);flex:0 0 8px;}
.kcrm-chip-dot.ai{background:#6366f1;box-shadow:0 0 0 3px rgba(99,102,241,.13);}
.kcrm-chip-dot.follow{background:#f97316;box-shadow:0 0 0 3px rgba(249,115,22,.13);}
.kcrm-chip-dot.pay{background:#ef4444;box-shadow:0 0 0 3px rgba(239,68,68,.12);}
.kcrm-chip-ring{--pct:0;width:16px;height:16px;border-radius:50%;display:inline-block;background:conic-gradient(#22c55e calc(var(--pct) * 1%),#dbe5f0 0);position:relative;flex:0 0 16px;}
.kcrm-chip-ring:after{content:"";position:absolute;inset:4px;background:#fff;border-radius:50%;}
.kcrm-create-wrap{position:relative;}
.kcrm-create-trigger{border:0;cursor:pointer;font-family:inherit;gap:6px;}
.kcrm-create-caret{font-size:10px;opacity:.78;margin-left:2px;}
.kcrm-create-menu{width:236px;right:0;top:calc(100% + 8px);padding:7px;background:#fff;border:1px solid #dbe5f0;border-radius:14px;box-shadow:0 18px 44px rgba(15,23,42,.16);z-index:1005;}
.kcrm-create-menu-link{display:flex;align-items:center;gap:10px;padding:10px 11px;border-radius:11px;color:#0f172a;text-decoration:none;font-size:12px;font-weight:800;}
.kcrm-create-menu-link span{width:28px;height:28px;border-radius:10px;background:#f1f5f9;display:inline-flex;align-items:center;justify-content:center;flex:0 0 28px;}
.kcrm-create-menu-link strong{font-size:12px;font-weight:900;}
.kcrm-create-menu-link:hover{background:#f8fafc;color:#102d56;text-decoration:none;}
@media(max-width:1180px){.kcrm-topbar-chip{max-width:132px;padding:0 8px}.kcrm-topbar-chip span:not(.kcrm-chip-dot):not(.kcrm-chip-ring){max-width:72px;overflow:hidden;text-overflow:ellipsis;}}
@media(max-width:940px){.kcrm-topbar-center{display:none!important}.kcrm-topbar{grid-template-columns:auto 1fr auto!important;}}
@media(max-width:640px){.kcrm-create-trigger{width:30px;height:30px;padding:0!important;font-size:0!important;border-radius:9px}.kcrm-create-trigger:before{content:"+";font-size:17px;line-height:1}.kcrm-create-caret{display:none}.kcrm-create-menu{right:-72px;width:min(232px,calc(100vw - 28px));}}

/* 2.6.9.104 — topbar chip alignment + stable create dropdown */
.kcrm-topbar{grid-template-columns:auto minmax(260px,1fr) auto!important;align-items:center!important;column-gap:14px!important;}
.kcrm-topbar-left{grid-column:1!important;min-width:0!important;}
.kcrm-topbar-center{display:flex!important;grid-column:2!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;min-width:0!important;overflow:hidden!important;height:100%!important;}
.kcrm-topbar-right{grid-column:3!important;justify-content:flex-end!important;min-width:0!important;}
.kcrm-topbar-chip{height:30px!important;min-height:30px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;line-height:1!important;box-sizing:border-box!important;white-space:nowrap!important;vertical-align:middle!important;}
.kcrm-topbar-chip span,.kcrm-topbar-chip strong{display:inline-flex!important;align-items:center!important;line-height:1!important;}
.kcrm-topbar-chip.health{padding-left:9px!important;padding-right:10px!important;}
.kcrm-chip-ring{width:14px!important;height:14px!important;flex:0 0 14px!important;margin:0!important;transform:none!important;vertical-align:middle!important;}
.kcrm-chip-ring:after{inset:3.5px!important;}
.kcrm-create-wrap{position:relative!important;}
.kcrm-create-menu{position:absolute!important;right:0!important;left:auto!important;top:calc(100% + 8px)!important;display:none;}
.kcrm-create-menu a{cursor:pointer!important;}
@media(max-width:1180px){.kcrm-topbar{grid-template-columns:auto minmax(190px,1fr) auto!important}.kcrm-topbar-chip{max-width:126px!important}.kcrm-topbar-chip span:not(.kcrm-chip-dot):not(.kcrm-chip-ring){max-width:68px!important;overflow:hidden!important;text-overflow:ellipsis!important;}}
@media(max-width:940px){.kcrm-topbar-center{display:none!important}.kcrm-topbar{display:flex!important;align-items:center!important;justify-content:space-between!important}.kcrm-topbar-right{margin-left:auto!important;}}

/* 2.6.9.105 — topbar health uses dashboard health calculation */
.kcrm-topbar-chip.health .kcrm-chip-ring{--chip-ring-size:14px;width:var(--chip-ring-size);height:var(--chip-ring-size);flex:0 0 var(--chip-ring-size);display:inline-block;vertical-align:middle;align-self:center;margin:0 0 0 1px;border-radius:999px;position:relative;background:conic-gradient(#22c55e calc(var(--pct,0) * 1%), #e5e7eb 0);}
.kcrm-topbar-chip.health .kcrm-chip-ring::after{content:"";position:absolute;inset:3px;background:#fff;border-radius:999px;}

/* 2.6.9.107 — removed post-order AI support mode; conversations reset after order creation and after 24h inactivity. */

/* 2.6.9.108 — fixed AI Sales checkout memory reset, multi-message address recovery, and final confirmation/order creation recovery. */


/* ════════════════════════════════════════════════════════
   Human Handoff Requests — premium Communication page
   ════════════════════════════════════════════════════════ */
.khrq-wrap{padding:24px;max-width:1440px;margin:0 auto;background:linear-gradient(180deg,#f8fafc 0%,#fff 46%);min-height:calc(100vh - 110px)}
.khrq-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0 0 18px;flex-wrap:wrap}.khrq-title h1{margin:0 0 6px;font-size:26px;font-weight:900;letter-spacing:-.03em;color:#0f172a}.khrq-title p{margin:0;color:#64748b;font-size:13px;line-height:1.55}.khrq-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0}.khrq-card{position:relative;background:rgba(255,255,255,.92);border:1px solid rgba(226,232,240,.9);border-radius:22px;padding:18px 18px 16px;box-shadow:0 18px 45px rgba(15,23,42,.07);overflow:hidden}.khrq-card:before{content:"";position:absolute;inset:0 0 auto;height:4px;background:linear-gradient(90deg,#1a3a5c,#25d366)}.khrq-card small{display:block;color:#64748b;font-weight:850;font-size:11px;text-transform:uppercase;letter-spacing:.08em}.khrq-card strong{display:block;font-size:32px;line-height:1;color:#0f172a;margin-top:8px;letter-spacing:-.04em}.khrq-tabs{display:flex;gap:8px;margin:4px 0 14px;flex-wrap:wrap}.khrq-tab{display:inline-flex;align-items:center;gap:7px;padding:10px 15px;border-radius:999px;border:1px solid #dbe4ef;background:#fff;text-decoration:none;color:#334155;font-weight:850;font-size:13px;box-shadow:0 6px 18px rgba(15,23,42,.035)}.khrq-tab.active{background:#0f172a;color:#fff;border-color:#0f172a}.khrq-table-wrap{background:rgba(255,255,255,.94);border:1px solid rgba(226,232,240,.92);border-radius:22px;overflow:hidden;box-shadow:0 18px 45px rgba(15,23,42,.06)}.khrq-table{width:100%;border-collapse:separate;border-spacing:0}.khrq-table th{background:#f8fafc;color:#475569;font-size:11px;text-align:left;padding:14px 14px;border-bottom:1px solid #e2e8f0;text-transform:uppercase;letter-spacing:.06em}.khrq-table td{padding:15px 14px;border-bottom:1px solid #f1f5f9;vertical-align:top;font-size:13px;color:#334155}.khrq-table tr:last-child td{border-bottom:none}.khrq-table tbody tr:hover{background:#fbfdff}.khrq-name{font-weight:900;color:#0f172a;letter-spacing:-.01em}.khrq-muted{color:#64748b;font-size:12px;line-height:1.45}.khrq-pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 10px;background:#eef2ff;color:#3730a3;font-size:11px;font-weight:900;text-transform:capitalize}.khrq-pill.flow{background:#dcfce7;color:#166534}.khrq-pill.ai{background:#fef3c7;color:#92400e}.khrq-actions{display:flex;gap:8px;flex-wrap:wrap}.khrq-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid #dbe4ef;background:#fff;color:#0f172a;text-decoration:none;padding:9px 12px;border-radius:12px;font-size:12px;font-weight:900;cursor:pointer;box-shadow:0 6px 14px rgba(15,23,42,.04);transition:transform .15s,box-shadow .15s,background .15s}.khrq-btn:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(15,23,42,.08)}.khrq-btn.primary{background:linear-gradient(135deg,#1a3a5c,#0f172a);color:#fff;border-color:#1a3a5c}.khrq-btn.success{background:linear-gradient(135deg,#16a34a,#15803d);color:#fff;border-color:#16a34a}.khrq-empty{padding:44px;text-align:center;color:#64748b}.khrq-alert{background:#ecfdf5;border:1px solid #bbf7d0;color:#166534;border-radius:14px;padding:11px 14px;margin-bottom:14px;font-weight:800;font-size:13px;box-shadow:0 8px 22px rgba(22,163,74,.06)}
@media(max-width:900px){.khrq-wrap{padding:16px}.khrq-cards{grid-template-columns:1fr}.khrq-table thead{display:none}.khrq-table,.khrq-table tbody,.khrq-table tr,.khrq-table td{display:block;width:100%}.khrq-table tr{border-bottom:1px solid #e2e8f0;padding:10px 0}.khrq-table td{border-bottom:none;padding:8px 16px}.khrq-table td:before{content:attr(data-label);display:block;font-size:10px;font-weight:900;color:#94a3b8;text-transform:uppercase;letter-spacing:.06em;margin-bottom:3px}.khrq-actions{padding-top:4px}.khrq-btn{width:100%}}

/* ════════════════════════════════════════════════════════
   AI Settings → Agent Setup premium CSS repair
   ════════════════════════════════════════════════════════ */
.kaa-status-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;margin:0 0 18px;border-radius:18px;border:1px solid #dbeafe;background:linear-gradient(135deg,#f8fafc,#eff6ff);box-shadow:0 14px 34px rgba(15,23,42,.06)}.kaa-status-banner.active{border-color:#bbf7d0;background:linear-gradient(135deg,#f0fdf4,#ecfeff)}.kaa-status-banner.inactive{border-color:#fed7aa;background:linear-gradient(135deg,#fff7ed,#fff)}.kaa-status-left{display:flex;align-items:center;gap:12px}.kaa-status-left strong{display:block;color:#0f172a;font-weight:900;font-size:15px}.kaa-status-left span:not(.kaa-status-dot){display:block;color:#64748b;font-size:12px;margin-top:2px}.kaa-status-dot{width:12px;height:12px;border-radius:999px;background:#f97316;box-shadow:0 0 0 5px rgba(249,115,22,.14)}.kaa-status-dot.on{background:#22c55e;box-shadow:0 0 0 5px rgba(34,197,94,.14)}.kaa-toggle-btn{border:0;border-radius:12px;padding:10px 14px;font-weight:900;font-size:13px;cursor:pointer;color:#fff;background:#1a3a5c;box-shadow:0 10px 24px rgba(26,58,92,.18)}.kaa-toggle-btn.activate{background:linear-gradient(135deg,#16a34a,#22c55e)}.kaa-toggle-btn.deactivate{background:linear-gradient(135deg,#ef4444,#f97316)}.kaa-provider-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:10px;margin-top:8px}.kaa-provider-option{min-height:46px;box-shadow:0 8px 18px rgba(15,23,42,.035);transition:transform .15s,box-shadow .15s}.kaa-provider-option:hover{transform:translateY(-1px);box-shadow:0 12px 28px rgba(15,23,42,.07)}.kaa-provider-panel{border-radius:16px;background:#fff}.kaa-provider-pill{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:11px;font-weight:850}.kaa-model-picker-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end}.kaa-refresh-models,.kaa-load-main-models,.kaa-load-tts-models,.kaa-load-elevenlabs-models{border:1px solid #dbe4ef;background:#fff;color:#1a3a5c;border-radius:10px;padding:9px 12px;font-weight:850;cursor:pointer}.kaa-usecase-card{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:16px;margin:14px 0;box-shadow:0 10px 28px rgba(15,23,42,.045)}.kaa-usecase-titlebar,.kaa-usecase-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.kaa-usecase-label{font-weight:900;color:#0f172a}.kaa-usecase-mini-note,.kaa-usecase-footer-note{font-size:11px;color:#64748b;line-height:1.45}.kaa-usecase-table{width:100%;border-collapse:separate;border-spacing:0 8px}.kaa-usecase-row{background:#f8fafc;border-radius:12px}.kaa-usecase-row td{padding:10px;vertical-align:top}.kaa-usecase-provider,.kaa-usecase-model,.kaa-usecase-temp{width:100%;border:1px solid #dbe4ef;border-radius:10px;padding:9px 10px;background:#fff}.kaa-usecase-provider-status,.kaa-usecase-model-result,.kaa-main-provider-model-result{font-size:11px;color:#64748b;margin-top:5px}.kaa-voice-reply-card{border:1px solid #e2e8f0;border-radius:16px;background:#fff;padding:14px;margin-top:12px}.kaa-voice-tts-field{margin-top:10px}.kaa-usecase-panel{border:1px solid #e2e8f0;border-radius:16px;padding:14px;background:#f8fafc;margin-top:12px}
@media(max-width:760px){.kaa-status-banner{align-items:flex-start;flex-direction:column}.kaa-toggle-btn{width:100%}.kaa-model-picker-row{grid-template-columns:1fr}.kaa-usecase-titlebar,.kaa-usecase-header{flex-direction:column}.kaa-usecase-table,.kaa-usecase-table tbody,.kaa-usecase-table tr,.kaa-usecase-table td{display:block;width:100%}.kaa-usecase-row{display:block;margin-bottom:10px}}
