/* ============================================
   iOS MESSAGES STYLE - RESET & VARIABLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* iOS Light Mode Colors */
    --ios-bg: #ffffff;
    --ios-sidebar-bg: #f5f5f7;
    --ios-header-bg: rgba(245, 245, 247, 0.85);
    --ios-blue: #007aff;
    --ios-blue-hover: #0066d6;
    --ios-green: #34c759;
    --ios-gray-1: #f2f2f7;
    --ios-gray-2: #e5e5ea;
    --ios-gray-3: #d1d1d6;
    --ios-gray-4: #c7c7cc;
    --ios-gray-5: #aeaeb2;
    --ios-gray-6: #8e8e93;
    --ios-text: #000000;
    --ios-text-secondary: #3c3c43;
    --ios-text-tertiary: rgba(60, 60, 67, 0.6);
    --ios-text-quaternary: rgba(60, 60, 67, 0.3);
    --ios-separator: rgba(60, 60, 67, 0.12);
    --ios-bubble-incoming: #e9e9eb;
    --ios-bubble-outgoing: #007aff;
    --ios-bubble-outgoing-text: #ffffff;
    --ios-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    --ios-blur: saturate(180%) blur(20px);
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Text', 
                 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--ios-bg);
    color: var(--ios-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 15px;
    line-height: 1.4;
}

/* ============================================
   APP LAYOUT
   ============================================ */
.app {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background: var(--ios-bg);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: 380px;
    min-width: 320px;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    background: var(--ios-sidebar-bg);
    border-right: 1px solid var(--ios-separator);
    height: 100vh;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px 16px;
    background: var(--ios-header-bg);
    backdrop-filter: var(--ios-blur);
    -webkit-backdrop-filter: var(--ios-blur);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--ios-separator);
}

.sidebar-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--ios-text);
    letter-spacing: -0.4px;
}

.header-btn-text {
    background: none;
    border: none;
    color: var(--ios-blue);
    font-size: 17px;
    font-weight: 400;
    cursor: pointer;
    padding: 4px 8px;
    transition: opacity 0.15s;
}

.header-btn-text:hover { opacity: 0.6; }
.header-btn-text:active { opacity: 0.4; }

.header-btn-icon {
    background: none;
    border: none;
    color: var(--ios-blue);
    font-size: 18px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.15s;
}

.header-btn-icon:hover { background-color: var(--ios-gray-2); }

/* Search */
.search-wrapper {
    padding: 8px 12px 10px 12px;
    background: var(--ios-sidebar-bg);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--ios-gray-2);
    border-radius: 10px;
    padding: 8px 10px;
    gap: 6px;
}

.search-box i.fa-search {
    color: var(--ios-text-tertiary);
    font-size: 14px;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--ios-text);
    font-family: inherit;
}

.search-box input::placeholder {
    color: var(--ios-text-tertiary);
}

.search-clear {
    background: none;
    border: none;
    color: var(--ios-text-tertiary);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    display: flex;
    align-items: center;
}

/* ============================================
   CHAT LIST
   ============================================ */
.chat-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.chat-list::-webkit-scrollbar { width: 0; }

.chat-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 16px 10px 16px;
    cursor: pointer;
    position: relative;
    background: var(--ios-sidebar-bg);
    transition: background-color 0.1s;
}

.chat-item::after {
    content: '';
    position: absolute;
    left: 78px;
    right: 0;
    bottom: 0;
    height: 0.5px;
    background: var(--ios-separator);
}

.chat-item:last-child::after { display: none; }

.chat-item:hover { background-color: var(--ios-gray-2); }
.chat-item.active { background-color: var(--ios-gray-2); }

@media (min-width: 769px) {
    .chat-item.active { background-color: var(--ios-blue); }
    .chat-item.active .chat-item-name,
    .chat-item.active .chat-item-preview,
    .chat-item.active .chat-item-time {
        color: white !important;
    }
    .chat-item.active .chat-item-preview {
        color: rgba(255,255,255,0.85) !important;
    }
    .chat-item.active::after { display: none; }
}

.chat-item-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--ios-gray-3);
    position: relative;
}

.chat-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-item-content {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.chat-item-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2px;
    gap: 6px;
}

.chat-item-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--ios-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.chat-item-time {
    font-size: 13px;
    color: var(--ios-text-tertiary);
    flex-shrink: 0;
    font-weight: 400;
}

.chat-item-preview {
    font-size: 14px;
    color: var(--ios-text-tertiary);
    line-height: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.chat-item-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 4px;
    gap: 6px;
}

.chat-item-chevron {
    color: var(--ios-text-quaternary);
    font-size: 12px;
}

/* Loading & Empty states */
.loading-state, .no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--ios-text-tertiary);
    text-align: center;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2.5px solid var(--ios-gray-3);
    border-top-color: var(--ios-blue);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-bottom: 14px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.no-results i {
    font-size: 42px;
    margin-bottom: 14px;
    opacity: 0.3;
}

/* ============================================
   CHAT AREA
   ============================================ */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--ios-bg);
    overflow: hidden;
    min-width: 0;
}

.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--ios-text-tertiary);
    padding: 40px;
    text-align: center;
}

.empty-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--ios-gray-1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.empty-icon i {
    font-size: 44px;
    color: var(--ios-gray-5);
}

.empty-state h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--ios-text);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.empty-state p {
    font-size: 15px;
    color: var(--ios-text-tertiary);
}

/* Active Chat */
.active-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--ios-bg);
}

/* Chat Header */
.chat-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: var(--ios-header-bg);
    backdrop-filter: var(--ios-blur);
    -webkit-backdrop-filter: var(--ios-blur);
    border-bottom: 1px solid var(--ios-separator);
    min-height: 54px;
    position: relative;
}

.back-btn {
    display: none;
    background: none;
    border: none;
    color: var(--ios-blue);
    font-size: 17px;
    cursor: pointer;
    padding: 4px 8px;
    align-items: center;
    gap: 4px;
    font-family: inherit;
    font-weight: 400;
}

.back-btn i { font-size: 16px; }

.chat-header-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-width: 0;
    padding: 0 8px;
}

.chat-header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 2px;
    background: var(--ios-gray-3);
}

.chat-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-header-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--ios-text);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 14px;
}

.chat-header-status {
    font-size: 10px;
    color: var(--ios-text-tertiary);
    text-align: center;
    display: flex;
    align-items: center;
    gap: 2px;
    line-height: 12px;
}

.chat-header-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* ============================================
   MESSAGES AREA
   ============================================ */
.messages-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--ios-bg);
    -webkit-overflow-scrolling: touch;
}

.messages-area::-webkit-scrollbar { width: 0; }

.messages-list {
    padding: 12px 14px 8px 14px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* Date separator */
.date-separator {
    display: flex;
    justify-content: center;
    margin: 14px 0 8px 0;
}

.date-separator span {
    font-size: 11px;
    font-weight: 600;
    color: var(--ios-text-tertiary);
    letter-spacing: 0.2px;
}

.date-separator .date-time {
    font-weight: 400;
    margin-left: 4px;
}

/* Sender label (above group of messages) */
.sender-label {
    font-size: 11px;
    color: var(--ios-text-tertiary);
    margin: 8px 0 2px 56px;
    font-weight: 500;
}

/* Message Row */
.msg-row {
    display: flex;
    margin-bottom: 2px;
    padding: 0;
    align-items: flex-end;
    gap: 6px;
}

.msg-row.outgoing {
    justify-content: flex-end;
}

.msg-row.incoming {
    justify-content: flex-start;
}

.msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--ios-gray-3);
    visibility: hidden;
}

.msg-row.show-avatar .msg-avatar {
    visibility: visible;
}

.msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Message Bubble */
.bubble-container {
    display: flex;
    flex-direction: column;
    max-width: 70%;
    min-width: 0;
}

.msg-row.outgoing .bubble-container {
    align-items: flex-end;
}

.msg-row.incoming .bubble-container {
    align-items: flex-start;
}

.bubble {
    padding: 8px 13px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 19px;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    position: relative;
    max-width: 100%;
}

.msg-row.incoming .bubble {
    background: var(--ios-bubble-incoming);
    color: var(--ios-text);
    border-bottom-left-radius: 4px;
}

.msg-row.outgoing .bubble {
    background: var(--ios-bubble-outgoing);
    color: var(--ios-bubble-outgoing-text);
    border-bottom-right-radius: 4px;
}

/* When a message is followed by another from same sender */
.msg-row.same-sender-next.incoming .bubble {
    border-bottom-left-radius: 18px;
}

.msg-row.same-sender-next.outgoing .bubble {
    border-bottom-right-radius: 18px;
}

.msg-row.same-sender-prev.incoming .bubble {
    border-top-left-radius: 4px;
}

.msg-row.same-sender-prev.outgoing .bubble {
    border-top-right-radius: 4px;
}

/* Subject */
.msg-subject {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    opacity: 0.95;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.msg-row.incoming .msg-subject {
    border-bottom-color: rgba(0,0,0,0.08);
}

/* Attachment */
.msg-attachment {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    font-size: 13px;
}

.msg-row.incoming .msg-attachment {
    background: rgba(0,0,0,0.05);
}

/* Time below message */
.msg-time-below {
    font-size: 10.5px;
    color: var(--ios-text-tertiary);
    margin: 2px 8px 4px 8px;
}

.msg-row.outgoing .msg-time-below {
    text-align: right;
}

/* Delivered/Read indicator */
.msg-delivered {
    font-size: 10.5px;
    color: var(--ios-text-tertiary);
    margin: 0 8px 4px 0;
    text-align: right;
}

/* ============================================
   COMPOSER (Input area)
   ============================================ */
.composer {
    display: flex;
    align-items: flex-end;
    padding: 8px 12px 10px 12px;
    background: var(--ios-bg);
    border-top: 1px solid var(--ios-separator);
    gap: 8px;
}

.composer-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ios-gray-2);
    border: none;
    color: var(--ios-gray-6);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.composer-input {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--ios-bg);
    border: 1px solid var(--ios-gray-3);
    border-radius: 18px;
    padding: 6px 6px 6px 14px;
    min-height: 34px;
}

.composer-input input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: inherit;
    color: var(--ios-text);
}

.composer-input input::placeholder {
    color: var(--ios-text-tertiary);
}

.composer-mic {
    background: none;
    border: none;
    color: var(--ios-blue);
    font-size: 18px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   INFO PANEL
   ============================================ */
.info-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: var(--ios-sidebar-bg);
    border-left: 1px solid var(--ios-separator);
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 20px rgba(0,0,0,0.1);
    animation: slideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.info-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--ios-header-bg);
    backdrop-filter: var(--ios-blur);
    -webkit-backdrop-filter: var(--ios-blur);
    border-bottom: 1px solid var(--ios-separator);
    min-height: 54px;
}

.info-panel-header h2 {
    font-size: 17px;
    font-weight: 600;
}

.info-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
}

.info-avatar-large {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: block;
    overflow: hidden;
    background: var(--ios-gray-3);
}

.info-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-name {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: -0.4px;
}

.info-subtitle {
    font-size: 14px;
    text-align: center;
    color: var(--ios-text-tertiary);
    margin-bottom: 28px;
}

.info-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 28px;
}

.info-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: var(--ios-gray-2);
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    color: var(--ios-blue);
    min-width: 70px;
}

.info-action-btn i { font-size: 22px; }
.info-action-btn span { font-size: 11px; }

.info-section {
    background: var(--ios-bg);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 20px;
    overflow: hidden;
}

.info-section-title {
    font-size: 13px;
    color: var(--ios-text-tertiary);
    text-transform: uppercase;
    margin: 0 16px 8px 16px;
    letter-spacing: 0.3px;
    font-weight: 500;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 0.5px solid var(--ios-separator);
    font-size: 15px;
    gap: 12px;
}

.info-row:last-child { border-bottom: none; }

.info-row .label {
    color: var(--ios-text);
    font-weight: 400;
    flex-shrink: 0;
}

.info-row .value {
    color: var(--ios-text-tertiary);
    text-align: right;
    word-break: break-all;
    font-size: 14px;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media screen and (max-width: 768px) {
    .sidebar {
        width: 100%;
        min-width: unset;
        max-width: unset;
    }

    .chat-area {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        z-index: 50;
        display: none;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .chat-area.mobile-active {
        display: flex;
    }

    .back-btn { display: flex !important; }

    .empty-state { display: none; }

    .info-panel {
        width: 100%;
        max-width: unset;
    }

    .bubble-container { max-width: 80%; }

    .chat-header-center {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: 50%;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --ios-bg: #000000;
        --ios-sidebar-bg: #1c1c1e;
        --ios-header-bg: rgba(28, 28, 30, 0.85);
        --ios-gray-1: #1c1c1e;
        --ios-gray-2: #2c2c2e;
        --ios-gray-3: #3a3a3c;
        --ios-gray-4: #48484a;
        --ios-gray-5: #636366;
        --ios-gray-6: #8e8e93;
        --ios-text: #ffffff;
        --ios-text-secondary: rgba(235, 235, 245, 0.9);
        --ios-text-tertiary: rgba(235, 235, 245, 0.6);
        --ios-text-quaternary: rgba(235, 235, 245, 0.3);
        --ios-separator: rgba(84, 84, 88, 0.65);
        --ios-bubble-incoming: #26252a;
    }
}


/* ============================================
   ADD THESE TO YOUR EXISTING style.css
   (or find & replace the matching sections)
   ============================================ */

/* ============================================
   BRANDING - JCHATS LOGO
   ============================================ */
.sidebar-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-logo {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #007aff 0%, #00c7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.5px;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3);
}

.brand-logo-large {
    width: 110px;
    height: 110px;
    border-radius: 28px;
    background: linear-gradient(135deg, #007aff 0%, #00c7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 64px;
    letter-spacing: -2px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 122, 255, 0.3);
}

/* Override sidebar-header to fit new layout */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 10px 16px;
    background: var(--ios-header-bg);
    backdrop-filter: var(--ios-blur);
    -webkit-backdrop-filter: var(--ios-blur);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--ios-separator);
    gap: 8px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--ios-text);
    letter-spacing: -0.5px;
}

/* ============================================
   FILTER TABS (All / People / Promo)
   ============================================ */
.filter-tabs {
    display: flex;
    padding: 4px 12px 8px 12px;
    gap: 6px;
    background: var(--ios-sidebar-bg);
    border-bottom: 1px solid var(--ios-separator);
}

.filter-tab {
    flex: 1;
    padding: 7px 10px;
    background: var(--ios-gray-2);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ios-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-family: inherit;
}

.filter-tab i {
    font-size: 11px;
}

.filter-tab:hover {
    background: var(--ios-gray-3);
}

.filter-tab.active {
    background: var(--ios-blue);
    color: white;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.25);
}

.filter-tab.active:hover {
    background: var(--ios-blue-hover);
}

/* ============================================
   SECTION DIVIDER IN CHAT LIST
   ============================================ */
.section-header {
    padding: 14px 16px 6px 16px;
    background: var(--ios-sidebar-bg);
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.section-header-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
}

.section-header.real .section-header-icon {
    background: var(--ios-green);
}

.section-header.promo .section-header-icon {
    background: var(--ios-gray-5);
}

.section-header-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--ios-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-header-count {
    font-size: 11px;
    color: var(--ios-text-tertiary);
    margin-left: auto;
    background: var(--ios-gray-2);
    padding: 2px 8px;
    border-radius: 10px;
}

/* ============================================
   PROMO BADGE ON CHAT ITEMS
   ============================================ */
.chat-item-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    background: var(--ios-gray-2);
    color: var(--ios-text-tertiary);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.promo-badge i {
    font-size: 8px;
}

/* Promo chat items appear slightly muted */
.chat-item.promo .chat-item-name {
    color: var(--ios-text-secondary);
    font-weight: 500;
}

.chat-item.promo .chat-item-avatar {
    opacity: 0.85;
}

/* Active promo chat (desktop) */
@media (min-width: 769px) {
    .chat-item.active.promo .promo-badge {
        background: rgba(255,255,255,0.25);
        color: white;
    }
}

/* ============================================
   EMPTY STATE - JCHATS BRANDED
   ============================================ */
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--ios-text-tertiary);
    padding: 40px;
    text-align: center;
}

.empty-state h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--ios-text);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.empty-state p {
    font-size: 15px;
    color: var(--ios-text-tertiary);
    max-width: 320px;
}

/* ============================================
   DARK MODE: BRAND ADJUSTMENTS
   ============================================ */
@media (prefers-color-scheme: dark) {
    .brand-logo {
        box-shadow: 0 2px 8px rgba(0, 122, 255, 0.5);
    }
    
    .brand-logo-large {
        box-shadow: 0 8px 40px rgba(0, 122, 255, 0.4);
    }
    
    .filter-tab {
        background: var(--ios-gray-3);
    }
    
    .promo-badge {
        background: var(--ios-gray-3);
    }
}