* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Bengali", sans-serif;
}

body {
    background: #eef2f6;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    color: #111827;
}

.app-shell {
    width: 100%;
    max-width: 460px;
    min-height: 100vh;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    padding-bottom: 82px;
}

.db-note {
    font-size: 11px;
    padding: 6px 14px;
    background: #fef3c7;
    color: #92400e;
}

.top-tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 20;
}

.tab-group {
    display: flex;
    gap: 24px;
    align-items: center;
}

.tab-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    padding: 6px 4px;
    cursor: pointer;
}

.tab-btn.active {
    color: #0284c7;
}

.tab-btn.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 3px;
    background: #0284c7;
    border-radius: 3px 3px 0 0;
}

.badge-dot {
    position: absolute;
    top: -2px;
    right: -11px;
    background: #22c55e;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 999px;
}

.view-panel {
    display: none;
}

.view-panel.active {
    display: block;
}

.story-strip {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    overflow-x: auto;
    border-bottom: 1px solid #f1f5f9;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 64px;
    flex-shrink: 0;
    font-size: 11px;
    color: #374151;
}

.story-ring {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 2px solid #22c55e;
    background: #e0f2fe;
    color: #0284c7;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.story-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #22c55e;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-bottom: 1px solid #f8fafc;
    cursor: pointer;
}

.list-row:hover {
    background: #f9fafb;
}

.row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.avatar-circle {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #ffffff;
}

.row-meta {
    min-width: 0;
    flex: 1;
}

.row-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-sub {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    margin-left: 8px;
}

.row-time {
    font-size: 11px;
    color: #9ca3af;
}

.unread-pill {
    background: #22c55e;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px 6px;
    font-size: 14px;
    font-weight: 700;
}

.mini-action-btn {
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.cat-chips {
    display: flex;
    gap: 8px;
    padding: 8px 14px;
    overflow-x: auto;
}

.chip-btn {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.chip-btn.active {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

.room-card {
    margin: 10px 14px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    cursor: pointer;
}

.room-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.room-badge {
    font-size: 11px;
    font-weight: 700;
    color: #0284c7;
    background: #e0f2fe;
    padding: 2px 8px;
    border-radius: 999px;
}

.me-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 14px;
    border-bottom: 8px solid #f1f5f9;
}

.me-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.call-trigger-btn {
    background: #e0f2fe;
    color: #0284c7;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 15px;
    cursor: pointer;
}

.fab-plus {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: #0284c7;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    z-index: 30;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.chat-drawer {
    position: fixed;
    inset: 0;
    max-width: 460px;
    margin: 0 auto;
    background: #ffffff;
    z-index: 50;
    display: none;
    flex-direction: column;
}

.chat-drawer.open {
    display: flex;
}

.imo-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.imo-chat-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.imo-icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #111827;
    cursor: pointer;
    padding: 4px 6px;
}

.imo-head-name {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.imo-head-status {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

.imo-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.imo-call-icon {
    background: none;
    border: none;
    font-size: 18px;
    color: #0284c7;
    cursor: pointer;
    padding: 4px;
}

.chat-drawer-body {
    flex: 1;
    overflow-y: auto;
    background: #eef3f7;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.imo-msg-group {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 84%;
}

.imo-msg-group.mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.imo-msg-group.peer {
    align-self: flex-start;
}

.imo-mini-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #0f172a;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.imo-bubble-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.imo-bubble {
    padding: 9px 13px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.35;
    word-break: break-word;
}

.imo-msg-group.mine .imo-bubble {
    background: #bae6fd;
    color: #0f172a;
    border-bottom-right-radius: 4px;
}

.imo-msg-group.peer .imo-bubble {
    background: #ffffff;
    color: #111827;
    border-bottom-left-radius: 4px;
}

.imo-msg-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #64748b;
    padding: 0 4px;
}

.imo-msg-group.mine .imo-msg-meta {
    justify-content: flex-end;
}

.imo-quick-reactions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    gap: 4px;
}

.imo-emoji-chip {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 4px;
    transition: transform 0.12s ease;
}

.imo-emoji-chip:active {
    transform: scale(1.2);
}

.imo-chat-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.imo-input-pill {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 4px 10px;
}

.imo-input-pill input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    padding: 6px 4px;
    outline: none;
    color: #111827;
}

.imo-sub-btn {
    background: none;
    border: none;
    font-size: 17px;
    color: #475569;
    cursor: pointer;
    padding: 2px 4px;
}

.imo-mic-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #0ea5e9;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
