*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html {
    scroll-behavior: smooth
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8f9fb;
    color: #1e293b;
    overflow-x: hidden;
    transition: background .3s, color .3s
}

.dark body,
.dark {
    background: #0f1117;
    color: #e2e8f0
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px
}

::-webkit-scrollbar-track {
    background: transparent
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 99px
}

.dark ::-webkit-scrollbar-thumb {
    background: #334155
}

#sidebar {
    width: 260px;
    transition: width .3s cubic-bezier(.4, 0, .2, 1), transform .3s cubic-bezier(.4, 0, .2, 1);
    background: #fff;
    border-right: 1px solid #f1f5f9
}

.dark #sidebar {
    background: #141920;
    border-right-color: #1e2736
}

#sidebar.collapsed {
    width: 72px
}

#sidebar.collapsed .sidebar-label,
#sidebar.collapsed .sidebar-group-label,
#sidebar.collapsed .sidebar-badge,
#sidebar.collapsed .brand-text {
    display: none !important
}

#sidebar.collapsed .sidebar-item {
    justify-content: center;
    padding-left: 0;
    padding-right: 0
}

#sidebar.collapsed .sidebar-icon {
    margin-right: 0
}

#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 39;
    backdrop-filter: blur(2px)
}

#sidebar-overlay.active {
    display: block
}

@media(max-width:1023px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 40;
        transform: translateX(-100%);
        width: 260px !important
    }

    #sidebar.mobile-open {
        transform: translateX(0)
    }

    #sidebar.collapsed {
        width: 260px !important
    }

    #sidebar.collapsed .sidebar-label,
    #sidebar.collapsed .sidebar-group-label,
    #sidebar.collapsed .sidebar-badge,
    #sidebar.collapsed .brand-text {
        display: flex !important
    }

    #sidebar.collapsed .sidebar-item {
        justify-content: flex-start;
        padding-left: 1rem;
        padding-right: 1rem
    }

    #sidebar.collapsed .sidebar-icon {
        margin-right: .75rem
    }
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: .55rem 1rem;
    margin: 1px .5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background .18s, color .18s;
    position: relative;
    gap: .65rem;
    font-size: .875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap
}

.sidebar-item:hover {
    background: #fff7ed;
    color: #f97316
}

.dark .sidebar-item:hover {
    background: #1e2736;
    color: #fb923c
}

.sidebar-item.active {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #f97316;
    font-weight: 600
}

.dark .sidebar-item.active {
    background: linear-gradient(135deg, #1e2736 0%, #1e2030 100%);
    color: #fb923c
}

.sidebar-item.active::before {
    content: '';
    position: absolute;
    left: -.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: #f97316;
    border-radius: 0 3px 3px 0
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    flex-shrink: 0
}

.sidebar-badge {
    margin-left: auto;
    background: #f97316;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 99px;
    line-height: 1.4
}

.sidebar-group-label {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
    padding: 1rem 1.5rem .35rem
}

#sidebar-nav {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1
}

#navbar {
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    z-index: 30;
    height: 64px
}

.dark #navbar {
    background: rgba(20, 25, 32, .9);
    border-bottom-color: #1e2736
}

.card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .04), 0 1px 2px -1px rgba(0, 0, 0, .04)
}

.dark .card {
    background: #141920;
    border-color: #1e2736
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .5rem 1.1rem;
    border-radius: 10px;
    font-size: .845rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
    border: none;
    outline: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden
}

.btn:focus-visible {
    outline: 2px solid #f97316;
    outline-offset: 2px
}

.btn-primary {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    box-shadow: 0 2px 8px rgba(249, 115, 22, .3)
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    box-shadow: 0 4px 14px rgba(249, 115, 22, .4);
    transform: translateY(-1px)
}

.btn-secondary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569
}

.dark .btn-secondary {
    background: #1e2736;
    border-color: #2d3748;
    color: #94a3b8
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155
}

.btn-ghost {
    background: transparent;
    color: #64748b
}

.btn-ghost:hover {
    background: #f8fafc;
    color: #1e293b
}

.dark .btn-ghost:hover {
    background: #1e2736;
    color: #e2e8f0
}

.btn-sm {
    padding: .35rem .75rem;
    font-size: .78rem;
    border-radius: 8px
}

.btn-icon {
    padding: .5rem;
    border-radius: 10px
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem .6rem;
    border-radius: 99px;
    font-size: .72rem;
    font-weight: 600
}

.badge-orange {
    background: #fff7ed;
    color: #ea580c
}

.badge-emerald {
    background: #ecfdf5;
    color: #059669
}

.badge-rose {
    background: #fff1f2;
    color: #e11d48
}

.badge-sky {
    background: #f0f9ff;
    color: #0284c7
}

.badge-amber {
    background: #fffbeb;
    color: #d97706
}

.badge-slate {
    background: #f8fafc;
    color: #475569
}

.badge-violet {
    background: #f5f3ff;
    color: #7c3aed
}

.dark .badge-orange {
    background: #431407;
    color: #fb923c
}

.dark .badge-emerald {
    background: #022c22;
    color: #34d399
}

.dark .badge-rose {
    background: #4c0519;
    color: #fb7185
}

.dark .badge-sky {
    background: #082f49;
    color: #38bdf8
}

.dark .badge-amber {
    background: #451a03;
    color: #fbbf24
}

.dark .badge-slate {
    background: #1e2736;
    color: #94a3b8
}

.dark .badge-violet {
    background: #2e1065;
    color: #a78bfa
}

.dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%
}

.dot-green {
    background: #10b981
}

.dot-red {
    background: #f43f5e
}

.dot-amber {
    background: #f59e0b
}

.dot-gray {
    background: #94a3b8
}

@keyframes livePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, .4)
    }

    50% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0)
    }
}

.live-dot {
    animation: livePulse 1.5s ease-in-out infinite
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, .12);
    z-index: 50;
    min-width: 220px;
    animation: slideDown .18s ease-out;
    overflow: hidden
}

.dark .dropdown-menu {
    background: #141920;
    border-color: #1e2736
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem 1rem;
    font-size: .845rem;
    color: #475569;
    cursor: pointer;
    transition: background .15s, color .15s
}

.dark .dropdown-item {
    color: #94a3b8
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #1e293b
}

.dark .dropdown-item:hover {
    background: #1a2232;
    color: #e2e8f0
}

.dropdown-divider {
    border-top: 1px solid #f1f5f9;
    margin: 4px 0
}

.dark .dropdown-divider {
    border-color: #1e2736
}

#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: .5rem
}

.toast {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1.1rem;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    min-width: 280px;
    max-width: 360px;
    animation: fadeIn .3s ease-out;
    font-size: .845rem;
    font-weight: 500
}

.dark .toast {
    background: #141920;
    border-color: #1e2736;
    color: #e2e8f0
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    backdrop-filter: blur(4px);
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn .2s ease-out
}

.modal-box {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .18);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeIn .25s ease-out
}

.dark .modal-box {
    background: #141920;
    border: 1px solid #1e2736
}

.form-input {
    width: 100%;
    padding: .6rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: .875rem;
    background: #fff;
    color: #1e293b;
    outline: none;
    transition: border-color .2s, box-shadow .2s
}

.dark .form-input {
    background: #0f1420;
    border-color: #1e2736;
    color: #e2e8f0
}

.form-input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, .12)
}

[data-tooltip] {
    position: relative
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    font-size: .72rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 99
}

[data-tooltip]:hover::after {
    opacity: 1
}

* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-duration: .2s;
    transition-timing-function: ease
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* ─── MESSAGES SPECIFIC ─── */
.messenger {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: calc(100vh - 140px);
    min-height: 600px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f1f5f9
}

.dark .messenger {
    background: #141920;
    border-color: #1e2736
}

@media(max-width:1023px) {
    .messenger {
        grid-template-columns: 1fr;
        position: relative
    }

    .chat-list-panel {
        position: absolute;
        inset: 0;
        z-index: 2;
        background: #fff
    }

    .dark .chat-list-panel {
        background: #141920
    }

    .chat-list-panel.hide-mobile {
        display: none
    }

    .chat-panel.hide-mobile-chat {
        display: none !important
    }
}

/* Chat List (left) */
.chat-list-panel {
    border-right: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    overflow: hidden
}

.dark .chat-list-panel {
    border-right-color: #1e2736
}

.chat-list-header {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0
}

.dark .chat-list-header {
    border-bottom-color: #1e2736
}

.chat-list-scroll {
    flex: 1;
    overflow-y: auto;
    padding: .5rem
}

.filter-pill {
    padding: .35rem .7rem;
    border-radius: 99px;
    font-size: .7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
    color: #64748b;
    background: #f1f5f9;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: .25rem
}

.dark .filter-pill {
    background: #1e2736;
    color: #94a3b8
}

.filter-pill:hover {
    background: #fff7ed;
    color: #f97316
}

.dark .filter-pill:hover {
    background: rgba(249, 115, 22, .1)
}

.filter-pill.active {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    box-shadow: 0 2px 8px rgba(249, 115, 22, .3)
}

.chat-item {
    display: flex;
    gap: .75rem;
    padding: .75rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all .18s;
    position: relative;
    margin-bottom: 2px
}

.chat-item:hover {
    background: #f8fafc
}

.dark .chat-item:hover {
    background: #0f1420
}

.chat-item.active {
    background: linear-gradient(90deg, #fff7ed 0%, #ffedd5 100%);
    border-left: 3px solid #f97316;
    padding-left: calc(.75rem - 3px)
}

.dark .chat-item.active {
    background: linear-gradient(90deg, rgba(249, 115, 22, .1) 0%, rgba(249, 115, 22, .03) 100%);
    border-left-color: #fb923c
}

.chat-item.unread .chat-preview {
    color: #1e293b;
    font-weight: 600
}

.dark .chat-item.unread .chat-preview {
    color: #e2e8f0
}

.chat-item.unread .chat-name {
    font-weight: 700
}

.avatar-wrap {
    position: relative;
    flex-shrink: 0
}

.chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    object-fit: cover;
    background: #f1f5f9
}

.dark .chat-avatar {
    background: #1e2736
}

.status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff
}

.dark .status-dot {
    border-color: #141920
}

.status-online {
    background: #10b981
}

.status-away {
    background: #f59e0b
}

.status-busy {
    background: #f43f5e
}

.status-offline {
    background: #94a3b8
}

.chat-name {
    font-size: .85rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2
}

.dark .chat-name {
    color: #e2e8f0
}

.chat-time {
    font-size: .68rem;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0
}

.chat-preview {
    font-size: .72rem;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4
}

.unread-count {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 99px;
    line-height: 1.4;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(249, 115, 22, .4)
}

.role-tag {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-left: .35rem
}

.role-customer {
    background: #f0f9ff;
    color: #0284c7
}

.role-rider {
    background: #ecfdf5;
    color: #059669
}

.role-restaurant {
    background: #f5f3ff;
    color: #7c3aed
}

.role-support {
    background: #fff7ed;
    color: #c2410c
}

.dark .role-customer {
    background: #082f49;
    color: #38bdf8
}

.dark .role-rider {
    background: #022c22;
    color: #34d399
}

.dark .role-restaurant {
    background: #2e1065;
    color: #a78bfa
}

.dark .role-support {
    background: #431407;
    color: #fb923c
}

/* Chat Panel (right) */
.chat-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fafbff;
    position: relative
}

.dark .chat-panel {
    background: #0f1420
}

.chat-header {
    padding: .85rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
    z-index: 5
}

.dark .chat-header {
    background: #141920;
    border-bottom-color: #1e2736
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    scroll-behavior: smooth
}

.msg-group {
    display: flex;
    gap: .6rem;
    max-width: 75%;
    animation: slideIn .3s ease-out
}

.msg-group.received {
    align-self: flex-start
}

.msg-group.sent {
    align-self: flex-end;
    flex-direction: row-reverse
}

.msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    align-self: flex-end
}

.msg-group.sent .msg-avatar {
    display: none
}

.msg-bubbles {
    display: flex;
    flex-direction: column;
    gap: 3px
}

.msg-bubble {
    padding: .65rem .9rem;
    border-radius: 16px;
    font-size: .86rem;
    line-height: 1.45;
    position: relative;
    word-break: break-word;
    animation: bounceIn .35s ease-out
}

.msg-group.received .msg-bubble {
    background: #fff;
    border: 1px solid #f1f5f9;
    color: #1e293b;
    border-bottom-left-radius: 5px
}

.dark .msg-group.received .msg-bubble {
    background: #141920;
    border-color: #1e2736;
    color: #e2e8f0
}

.msg-group.sent .msg-bubble {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    border-bottom-right-radius: 5px;
    box-shadow: 0 2px 6px rgba(249, 115, 22, .25)
}

.msg-bubble.first {
    margin-top: .35rem
}

.msg-group.received .msg-bubble:not(:first-child) {
    border-bottom-left-radius: 16px;
    border-top-left-radius: 5px
}

.msg-group.received .msg-bubble:not(:last-child) {
    border-bottom-left-radius: 5px
}

.msg-group.sent .msg-bubble:not(:first-child) {
    border-bottom-right-radius: 16px;
    border-top-right-radius: 5px
}

.msg-group.sent .msg-bubble:not(:last-child) {
    border-bottom-right-radius: 5px
}

.msg-meta {
    font-size: .65rem;
    color: #94a3b8;
    padding: 0 .5rem;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: .35rem
}

.msg-group.sent .msg-meta {
    justify-content: flex-end;
    color: #94a3b8
}

.msg-status-read {
    color: #0ea5e9
}

.msg-image {
    max-width: 280px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2px;
    cursor: pointer;
    transition: transform .2s
}

.msg-image:hover {
    transform: scale(1.02)
}

.msg-image img {
    width: 100%;
    height: auto;
    display: block
}

.msg-file {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem .8rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: .78rem;
    cursor: pointer;
    transition: all .15s
}

.msg-group.sent .msg-file {
    background: rgba(255, 255, 255, .15);
    border-color: rgba(255, 255, 255, .25);
    color: #fff
}

.dark .msg-file {
    background: #0f1420;
    border-color: #1e2736
}

.msg-file:hover {
    background: #f1f5f9
}

.msg-group.sent .msg-file:hover {
    background: rgba(255, 255, 255, .22)
}

.msg-file-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #fff7ed;
    color: #f97316;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0
}

.msg-group.sent .msg-file-icon {
    background: rgba(255, 255, 255, .2);
    color: #fff
}

.msg-quick-reply {
    display: flex;
    gap: 2px;
    margin-top: 4px;
    flex-wrap: wrap
}

.quick-reply-btn {
    padding: .4rem .7rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    font-size: .72rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all .15s
}

.dark .quick-reply-btn {
    background: #141920;
    border-color: #1e2736;
    color: #94a3b8
}

.quick-reply-btn:hover {
    background: #fff7ed;
    border-color: #f97316;
    color: #f97316
}

.dark .quick-reply-btn:hover {
    background: rgba(249, 115, 22, .1)
}

.day-divider {
    align-self: center;
    padding: .3rem .8rem;
    background: #e2e8f0;
    color: #64748b;
    font-size: .65rem;
    font-weight: 700;
    border-radius: 99px;
    margin: 1rem 0 .5rem;
    letter-spacing: .05em;
    text-transform: uppercase
}

.dark .day-divider {
    background: #1e2736;
    color: #94a3b8
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: .7rem 1rem;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    border-bottom-left-radius: 5px;
    width: fit-content
}

.dark .typing-indicator {
    background: #141920;
    border-color: #1e2736
}

.typing-dot {
    width: 7px;
    height: 7px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typeDot 1.4s infinite
}

.typing-dot:nth-child(2) {
    animation-delay: .2s
}

.typing-dot:nth-child(3) {
    animation-delay: .4s
}

/* Chat Input */
.chat-input-area {
    padding: .75rem 1rem;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0
}

.dark .chat-input-area {
    background: #141920;
    border-top-color: #1e2736
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: .5rem;
    padding: .4rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    transition: border-color .2s
}

.dark .input-wrapper {
    background: #0f1420;
    border-color: #1e2736
}

.input-wrapper:focus-within {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, .08)
}

.msg-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    padding: .5rem;
    font-size: .86rem;
    color: #1e293b;
    font-family: inherit;
    max-height: 120px;
    min-height: 38px;
    line-height: 1.4
}

.dark .msg-input {
    color: #e2e8f0
}

.msg-input::placeholder {
    color: #94a3b8
}

.input-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #64748b;
    border: none;
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0
}

.input-btn:hover {
    background: #fff7ed;
    color: #f97316
}

.dark .input-btn:hover {
    background: rgba(249, 115, 22, .1)
}

.send-btn {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(249, 115, 22, .3);
    border: none;
    cursor: pointer;
    transition: all .18s;
    flex-shrink: 0
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(249, 115, 22, .4)
}

.send-btn:active {
    transform: scale(.95)
}

/* Emoji picker (mini) */
.emoji-picker {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 1rem;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .15);
    padding: .85rem;
    display: none;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    z-index: 10;
    animation: slideDown .2s ease-out
}

.dark .emoji-picker {
    background: #141920;
    border-color: #1e2736
}

.emoji-picker.show {
    display: grid
}

.emoji-btn {
    padding: .4rem;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: all .15s
}

.emoji-btn:hover {
    background: #f1f5f9;
    transform: scale(1.15)
}

.dark .emoji-btn:hover {
    background: #1e2736
}

/* Attachment tray */
.attach-tray {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 1rem;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .15);
    padding: .5rem;
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    z-index: 10;
    width: 280px;
    animation: slideDown .2s ease-out
}

.dark .attach-tray {
    background: #141920;
    border-color: #1e2736
}

.attach-tray.show {
    display: grid
}

.attach-item {
    padding: .75rem;
    border-radius: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: all .15s
}

.attach-item:hover {
    background: #f1f5f9
}

.dark .attach-item:hover {
    background: #1e2736
}

.attach-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 4px;
    font-size: 15px;
    color: #fff
}

/* Empty state */
.empty-chat {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center
}

.empty-chat-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: #f97316;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 1rem
}

.dark .empty-chat-icon {
    background: linear-gradient(135deg, #431407, #7c2d12);
    color: #fdba74
}

/* Info Panel */
.info-panel {
    width: 280px;
    border-left: 1px solid #f1f5f9;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width .3s
}

.dark .info-panel {
    background: #141920;
    border-left-color: #1e2736
}

.info-panel.collapsed {
    width: 0;
    border-left: none
}

@media(max-width:1279px) {
    .info-panel {
        display: none
    }
}

.info-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem
}

/* Order card in chat */
.order-mini-card {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: .75rem;
    margin-bottom: 2px
}

.msg-group.sent .order-mini-card {
    background: rgba(255, 255, 255, .15);
    border-color: rgba(255, 255, 255, .3);
    color: #fff
}

.dark .order-mini-card {
    background: linear-gradient(135deg, #431407, #7c2d12);
    border-color: #9a3412
}

/* Search results counter */
.search-count {
    font-size: .65rem;
    color: #94a3b8;
    font-weight: 600;
    margin-left: auto;
    padding: 2px 6px;
    background: #f1f5f9;
    border-radius: 6px
}

.dark .search-count {
    background: #1e2736
}