/* Styles shared by the Messages area (inbox list, chat thread, service requests). Cinematic dark theme on the site.css tokens.
   (was inline in Views/Messages/_MsgStyles.cshtml; now a cached file) */
/* ---------- conversation page head: "From [member] to [member]" ---------- */
.ph-people { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .45rem .55rem; }
.who-chip {
    display: inline-flex; align-items: center; gap: .45rem; max-width: 100%; padding: .2rem .8rem .2rem .25rem; border-radius: var(--pill);
    border: 1px solid var(--line-2); background: rgba(255, 255, 255, .06); color: var(--text); font-weight: 800; font-size: .95rem;
    text-decoration: none; transition: border-color .25s, background-color .25s, color .25s;
}
.who-chip img { width: 1.6rem; height: 1.6rem; flex-shrink: 0; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1.5px rgba(245, 197, 24, .55); }
.who-chip bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.who-chip[href]:hover { border-color: rgba(245, 197, 24, .6); background: rgba(245, 197, 24, .1); color: var(--gold-2); }
.who-chip.me { border-color: rgba(245, 197, 24, .45); background: rgba(245, 197, 24, .14); color: var(--gold); }
.who-chip.staff img { background: #151312; object-fit: contain; }

/* ---------- toolbar: pill search + sort ---------- */
.msg-toolbar { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1rem; }
.msg-toolbar .row { flex-wrap: nowrap; gap: .6rem; }
.msg-search {
    position: relative; display: flex; align-items: center; gap: .35rem; flex: 1; min-width: min(15rem, 100%); max-width: 34rem;
    padding-inline-end: .3rem; border-radius: var(--pill); background: #121110; border: 1px solid var(--line-2); transition: border-color .25s, box-shadow .25s;
}
.msg-search:hover { border-color: rgba(255, 244, 225, .28); }
.msg-search:focus-within { border-color: rgba(245, 197, 24, .7); box-shadow: 0 0 0 .25rem rgba(245, 197, 24, .14); }
.msg-search > i { position: absolute; inset-inline-start: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.1rem; pointer-events: none; }
.msg-search .input { flex: 1; min-width: 0; min-height: 2.9rem; padding-inline-start: 2.6rem; border: 0; background: transparent; box-shadow: none; text-overflow: ellipsis; }
.msg-search .input:focus { background: transparent; box-shadow: none; }
.msg-search .btn { --bh: 2.35rem; flex: none; width: 2.35rem; padding: 0; border-radius: 50%; border-color: transparent; color: var(--on-gold); background: var(--grad); box-shadow: 0 .5rem 1.2rem -.6rem rgba(245, 197, 24, .8); }
.msg-search .btn:hover { color: var(--on-gold); background: var(--grad); border-color: transparent; }
.msg-toolbar .select { width: auto; min-width: 9.5rem; min-height: 2.9rem; border-radius: var(--pill); }
@media (max-width: 720px) {
    .msg-search { max-width: none; flex-basis: 100%; }
    .msg-toolbar .row { width: 100%; flex-wrap: wrap; }
    .msg-toolbar .row > * { flex: 1 1 auto; }
    .msg-toolbar .row > .icon-btn, .msg-toolbar .row > .muted { flex: none; }
}

/* ---------- pager ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: .4rem; flex-wrap: wrap; padding: 1.1rem .75rem; }
.pager a, .pager span { min-width: 2.6rem; height: 2.6rem; padding: 0 .75rem; display: inline-grid; place-items: center; border-radius: var(--pill); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; transition: transform .45s var(--spring), border-color .25s, color .25s, background-color .25s; }
.pager a:hover { border-color: rgba(245, 197, 24, .6); color: var(--gold-2); background: rgba(245, 197, 24, .08); transform: translate3d(0, -2px, 0); }
.pager .cur { background: var(--grad); border-color: transparent; color: var(--on-gold); box-shadow: 0 .5rem 1.2rem -.6rem rgba(245, 197, 24, .75); }
.pager .gap { border-color: transparent; background: none; min-width: 1.5rem; padding: 0; }

/* ---------- filter cards: the inbox filters (all / new / purchases / sales / requests / support) ---------- */
.msg-filters { display: grid; gap: .75rem; grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1099.98px) { .msg-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639.98px) { .msg-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; } }
.msg-filter.stat {
    --tone: 245, 197, 24; display: flex; align-items: center; gap: .8rem; padding: .95rem 1rem; min-width: 0; color: var(--text); isolation: isolate;
    transition: transform .5s var(--spring), border-color .3s, box-shadow .4s, background-color .3s;
}
.msg-filter.stat:hover { color: var(--text); transform: translate3d(0, -3px, 0); border-color: rgba(var(--tone), .45); box-shadow: 0 1.2rem 2.6rem -1.5rem rgba(var(--tone), .55); }
.msg-filter.stat:active { transform: scale(.96); transition-duration: .12s; }
.msg-filter.stat:focus-visible { outline: 2px solid rgb(var(--tone)); outline-offset: 2px; }
.msg-filter .txt { display: grid; min-width: 0; }
.msg-filter .label { color: var(--muted); font-weight: 600; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .3s; }
.msg-filter .value { font-size: 1.45rem; line-height: 1.15; }
.msg-filter .ic {
    width: 2.7rem; height: 2.7rem; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 1.25rem;
    color: rgb(var(--tone)); background: rgba(var(--tone), .13); box-shadow: inset 0 0 0 1px rgba(var(--tone), .32), 0 0 1.6rem -.5rem rgba(var(--tone), .6);
    transition: background-color .35s, color .35s, transform .6s var(--spring);
}
.msg-filter:hover .ic { transform: rotate(-8deg) scale(1.06); }
.msg-filter.hot { --tone: 248, 113, 113; }
.msg-filter.hot .value { color: var(--danger); }
/* the chosen filter: lit edge and glow, filled icon, a line along the bottom */
.msg-filter.active { border-color: rgba(var(--tone), .7); background: radial-gradient(120% 90% at 50% 0%, rgba(var(--tone), .2), transparent 70%), var(--surface); box-shadow: 0 0 0 1px rgba(var(--tone), .35), 0 1rem 2.4rem -1.4rem rgba(var(--tone), .7); }
.msg-filter.active .label { color: var(--text); }
.msg-filter.active .ic { background: rgb(var(--tone)); color: var(--on-gold); }
.msg-filter.active::after { content: ""; position: absolute; inset-inline: 1rem; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, transparent, rgb(var(--tone)), transparent); }
/* click: a ripple from the pointer, and the icon pulses while the list opens */
.msg-filter .ripple { position: absolute; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(var(--tone), .38), transparent 62%); transform: scale(0); pointer-events: none; animation: msg-ripple .65s var(--ease-out) forwards; }
.msg-filter.going .ic i { animation: msg-going .8s ease-in-out infinite; }
@media (prefers-reduced-motion: no-preference) {
    .msg-filter.hot .ic { animation: msg-ring 1.8s ease-out infinite; }
    .msg-filter.active::after { animation: msg-line .7s var(--ease-out) .25s both; }
}
@media (max-width: 639.98px) {
    .msg-filter.stat { padding: .7rem; gap: .6rem; }
    .msg-filter .ic { width: 2.25rem; height: 2.25rem; font-size: 1.05rem; }
    .msg-filter .value { font-size: 1.2rem; }
    .msg-filter .label { font-size: .8rem; }
}
@keyframes msg-ripple { to { transform: scale(1); opacity: 0; } }
@keyframes msg-going { 50% { transform: scale(.78); opacity: .55; } }
@keyframes msg-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes msg-ring { 0% { box-shadow: inset 0 0 0 1px rgba(var(--tone), .32), 0 0 0 0 rgba(var(--tone), .55); } 100% { box-shadow: inset 0 0 0 1px rgba(var(--tone), .32), 0 0 0 .6rem rgba(var(--tone), 0); } }

/* ---------- conversation list (messenger) ---------- */
.inbox-shell { overflow: hidden; border-radius: var(--r-xl); background: radial-gradient(90% 40% at 50% 0%, rgba(245, 197, 24, .07), transparent 70%), linear-gradient(180deg, #151312, #100f0e); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.inbox-shell > .empty { margin: 0 .75rem .75rem; border-color: var(--line); background: rgba(255, 255, 255, .015); }
.conv-list { list-style: none; margin: 0; padding: 0 .5rem .5rem; display: grid; gap: .15rem; }
.conv-list > li { min-width: 0; }
.conv {
    position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .9rem; align-items: center;
    padding: .8rem 1rem; border-radius: var(--r); color: var(--text); transition: background-color .25s, transform .5s var(--spring);
}
.conv::before { content: ""; position: absolute; inset-block: 1.1rem; inset-inline-start: 0; width: 3px; border-radius: var(--pill); background: var(--grad); box-shadow: 0 0 .8rem rgba(245, 197, 24, .8); opacity: 0; transition: opacity .3s; }
.conv:hover { color: var(--text); background: rgba(255, 255, 255, .045); }
.conv:hover::before, .conv.unread::before { opacity: 1; }
.conv.unread { background: rgba(245, 197, 24, .06); }
.conv.unread:hover { background: rgba(245, 197, 24, .09); }
.conv-list > li + li .conv::after { content: ""; position: absolute; top: -.08rem; inset-inline: 4.9rem 1rem; height: 1px; background: var(--line); pointer-events: none; }
.conv-av { position: relative; width: 3.25rem; height: 3.25rem; flex: none; }
.conv-av .avatar { width: 3.25rem; height: 3.25rem; box-shadow: 0 0 0 2px #151312, 0 0 0 3px var(--line-2); }
.conv.unread .conv-av .avatar { box-shadow: 0 0 0 2px #151312, 0 0 0 3.5px rgba(245, 197, 24, .75); }
.conv-av .dot { position: absolute; top: -.1rem; inset-inline-end: -.1rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--gold); border: 2px solid #151312; box-shadow: 0 0 .6rem rgba(245, 197, 24, .9); }
@media (prefers-reduced-motion: no-preference) { .conv-av .dot { animation: msg-dot 1.8s ease-out infinite; } }
@keyframes msg-dot { 0% { box-shadow: 0 0 0 0 rgba(245, 197, 24, .7); } 100% { box-shadow: 0 0 0 .45rem rgba(245, 197, 24, 0); } }
.conv-av .kind { position: absolute; bottom: -.3rem; inset-inline-end: -.3rem; width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border-radius: 50%; font-size: .78rem; color: var(--on-gold); background: var(--gold); border: 2px solid #151312; }
.kind.k-order { background: var(--success); color: #052e16; } .kind.k-support { background: var(--warning); color: #1c1300; } .kind.k-wanted { background: var(--info); color: #082f49; } .kind.k-review { background: #a78bfa; color: #1e0b3d; }
.conv-main { min-width: 0; display: grid; gap: .1rem; }
.conv-top { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.conv-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-dir { flex: none; display: inline-flex; align-items: center; gap: .2rem; padding: 0 .45rem; border-radius: var(--pill); background: rgba(255, 255, 255, .05); font-size: .72rem; color: var(--muted); }
.conv-title { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv.unread .conv-title, .conv.unread .conv-name { color: var(--text); font-weight: 800; }
.conv-meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; min-width: 0; }
.conv-meta .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.conv-side { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.conv.unread .conv-side time { color: var(--gold); font-weight: 800; }
.receipt { font-size: 1.05rem; color: var(--muted); }
.receipt.read { color: var(--info); }
@media (max-width: 600px) {
    .conv-list { padding: 0 .25rem .25rem; }
    .conv { grid-template-columns: auto minmax(0, 1fr); gap: .75rem; padding: .75rem .65rem; }
    .conv-side { grid-column: 2; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .25rem .6rem; }
    .conv-av, .conv-av .avatar { width: 2.75rem; height: 2.75rem; }
    .conv-list > li + li .conv::after { inset-inline-start: 4.1rem; }
}

/* ---------- chat thread ---------- */
.chat { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: var(--r-xl); background: #121110; border: 1px solid var(--line); box-shadow: var(--shadow-1), 0 2rem 4rem -3rem rgba(245, 197, 24, .25); }
.chat-head { display: flex; align-items: center; gap: .9rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, 0)), #151312; }
.chat-head h3 { margin: 0; font-size: 1.1rem; display: flex; gap: .5rem; align-items: center; min-width: 0; }
.chat-people { display: flex; flex: none; }
.chat-people img { width: 2.9rem; height: 2.9rem; border-radius: 50%; object-fit: cover; border: 2px solid #151312; box-shadow: 0 0 0 1px var(--line-2); background: var(--surface-2); transition: transform .5s var(--spring); }
.chat-people img + img { margin-inline-start: -.9rem; }
.chat-people:hover img:first-child { transform: translate3d(var(--nudge, -4px), 0, 0); }
[dir="rtl"] .chat-people:hover img:first-child { --nudge: 4px; }
.chat-who { min-width: 0; flex: 1; }
.chat-who .names { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
.chat-who .names i { color: var(--gold); }
.chat-who .when { display: flex; gap: .15rem .9rem; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.chat-who .when b { color: var(--text-2); font-weight: 700; }
.chat-body {
    position: relative; display: flex; flex-direction: column; gap: .85rem; padding: 1.25rem 1.1rem; min-height: 12rem;
    background-color: #0e0d0c;
    background-image:
        radial-gradient(70% 45% at 50% 0%, rgba(245, 197, 24, .06), transparent 70%),
        radial-gradient(circle at 1px 1px, rgba(255, 244, 225, .045) 1px, transparent 1.6px);
    background-size: 100% 100%, 1.4rem 1.4rem;
}
@media (min-width: 1001px) { .chat-body.scroll { max-height: min(70vh, 48rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; } }
@media (min-width: 1001px) and (prefers-reduced-motion: no-preference) { .chat-body.scroll { scroll-behavior: smooth; } }
.replies { display: flex; flex-direction: column; gap: .85rem; }
.day { align-self: center; padding: .15rem .85rem; border-radius: var(--pill); font-size: .74rem; font-weight: 800; color: var(--text-2); background: rgba(20, 19, 18, .85); border: 1px solid var(--line-2); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* bubbles: the other side sits at the inline-start, mine at the inline-end (mirrors in RTL) */
.msg { display: flex; align-items: flex-end; gap: .6rem; max-width: min(82%, 44rem); animation: bubble-in .5s var(--ease-out) both; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg > a, .msg > span { flex: none; display: block; border-radius: 50%; }
.msg .avatar { width: 2.35rem; height: 2.35rem; box-shadow: 0 0 0 2px #0e0d0c, 0 0 0 3px var(--line-2); transition: transform .45s var(--spring); }
.msg.mine .avatar { box-shadow: 0 0 0 2px #0e0d0c, 0 0 0 3px rgba(245, 197, 24, .55); }
.msg a:hover .avatar { transform: scale(1.08); }
.bubble {
    position: relative; min-width: 8.75rem; padding: .6rem .95rem .45rem; color: var(--text); overflow-wrap: anywhere;
    border-radius: 1.25rem; border-end-start-radius: .4rem; background: #1c1a17; border: 1px solid var(--line-2); box-shadow: 0 .6rem 1.4rem -1rem rgba(0, 0, 0, .9);
}
.msg.mine .bubble {
    border-radius: 1.25rem; border-end-end-radius: .4rem; border-color: rgba(245, 197, 24, .38);
    background: linear-gradient(150deg, rgba(245, 197, 24, .24), rgba(233, 168, 0, .12)), #17140d;
    box-shadow: 0 .8rem 1.6rem -1.1rem rgba(245, 197, 24, .55);
}
.msg.owner:not(.mine) .bubble { border-color: rgba(255, 159, 28, .4); }
.bubble .who { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .15rem; font-size: .78rem; font-weight: 800; color: var(--gold); }
.bubble .who a { color: inherit; }
.bubble .who a:hover { color: var(--gold-2); text-decoration: underline; }
.msg.mine .bubble .who { color: var(--gold-2); }
.bubble .who .badge { font-size: .66rem; padding: 0 .45rem; }
.bubble .text { white-space: pre-wrap; line-height: 1.75; }
.bubble .html { line-height: 1.8; }
.bubble .html img { display: inline-block; border-radius: .6rem; }
.bubble .html a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 2px; }
.bubble .meta { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; margin-top: .25rem; font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.msg.mine .bubble .meta { color: rgba(246, 239, 227, .62); }
.bubble .edit-btn { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; font-size: .95rem; opacity: .75; transition: opacity .2s, background-color .2s, color .2s; }
.bubble .edit-btn:hover { opacity: 1; color: var(--gold); background: rgba(245, 197, 24, .12); }
.msg.original { max-width: min(92%, 48rem); }
.msg.original .bubble { min-width: min(20rem, 55vw); }
.attach { display: flex; align-items: center; gap: .6rem; margin-top: .5rem; padding: .5rem .8rem; border-radius: var(--r-sm); font-size: .85rem; font-weight: 700; color: var(--text-2); background: rgba(255, 255, 255, .04); border: 1px dashed var(--line-2); transition: border-color .25s, color .25s, transform .45s var(--spring); }
.attach:hover { border-color: rgba(245, 197, 24, .6); color: var(--gold-2); transform: translate3d(0, -2px, 0); }
.attach i { font-size: 1.3rem; color: var(--gold); }
.attach.pic { display: block; padding: .25rem; border-style: solid; }
.attach.pic img { width: 100%; max-width: 17.5rem; max-height: 13.75rem; object-fit: cover; border-radius: .6rem; }
.msg.mine .attach { background: rgba(10, 10, 10, .25); border-color: rgba(245, 197, 24, .35); }
.no-replies { align-self: center; display: flex; align-items: center; gap: .5rem; padding: .35rem 1rem; border-radius: var(--pill); color: var(--muted); font-weight: 600; font-size: .88rem; background: rgba(20, 19, 18, .85); border: 1px dashed var(--line-2); }
@media (max-width: 600px) { .msg { max-width: 94%; gap: .45rem; } .msg .avatar { width: 2rem; height: 2rem; } .chat-body { padding: 1rem .65rem; } .chat-head { padding: .75rem; gap: .65rem; } .chat-people img { width: 2.4rem; height: 2.4rem; } }
@media (max-width: 379.98px) { .chat-people { display: none; } }
@keyframes bubble-in { from { opacity: 0; transform: translate3d(0, .75rem, 0) scale(.97); } }

/* context card (service / order / request / support / private) */
.sys { --tone: 245, 197, 24; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem; padding: .95rem 1.05rem; border-radius: var(--r-lg); background: radial-gradient(90% 120% at 0% 0%, rgba(var(--tone), .1), transparent 60%), #171513; border: 1px solid rgba(var(--tone), .28); box-shadow: var(--shadow-1); animation: fade-up .5s var(--ease-out); }
[dir="rtl"] .sys { background: radial-gradient(90% 120% at 100% 0%, rgba(var(--tone), .1), transparent 60%), #171513; }
.sys > .ic { width: 2.9rem; height: 2.9rem; display: grid; place-items: center; border-radius: 50%; font-size: 1.35rem; color: rgb(var(--tone)); background: rgba(var(--tone), .13); box-shadow: inset 0 0 0 1px rgba(var(--tone), .35), 0 0 1.4rem -.4rem rgba(var(--tone), .6); }
.sys.ok { --tone: 74, 222, 128; } .sys.warn { --tone: 251, 191, 36; } .sys.info { --tone: 56, 189, 248; }
.sys > div { min-width: 0; }
.sys h3 { margin: 0 0 .35rem; font-size: 1.02rem; overflow-wrap: anywhere; }
.sys ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; font-size: .9rem; }
.sys ul li { display: flex; gap: .4rem; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
.sys ul li > span:first-child { color: var(--muted); }
.sys .note { margin: .5rem 0 0; color: #fca5a5; font-size: .84rem; font-weight: 600; }

/* composer */
.composer { display: grid; gap: .5rem; padding: .75rem .9rem; border-top: 1px solid var(--line); background: #151312; }
/* attach | text box | send on one line, the chars-left counter under the box (not beside the buttons) */
.composer-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; }
.composer-row .grow { display: contents; }
.composer-row > .icon-btn { grid-area: 1 / 1; margin-inline-end: .5rem; }
.composer-row .grow > textarea { grid-area: 1 / 2; width: 100%; }
.composer-row .grow > .counter { grid-area: 2 / 2; }
.composer-row > .btn { grid-area: 1 / 3; margin-inline-start: .5rem; }
.composer textarea { min-height: 2.9rem; max-height: 15rem; padding-block: .6rem; border-radius: 1.45rem; resize: none; overflow-y: auto; line-height: 1.6; }
.composer .counter { margin-top: .15rem; padding-inline: .75rem; }
.composer .icon-btn { width: 2.9rem; height: 2.9rem; }
.composer .icon-btn.on { color: var(--on-gold); background: var(--gold); border-color: transparent; }
.composer .btn { --bh: 2.9rem; }
.composer-foot { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; justify-content: space-between; font-size: .78rem; color: var(--muted); }
.composer-foot kbd { display: inline-block; padding: 0 .4rem; border-radius: .4rem; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); font: 700 .7rem/1.6 var(--font); color: var(--text-2); }
.warn-line { display: inline-flex; align-items: center; gap: .4rem; color: #fca5a5; font-weight: 600; }
.file-chip { display: inline-flex; align-items: center; gap: .5rem; max-width: 100%; padding: .2rem .3rem .2rem .7rem; border-radius: var(--pill); font-size: .84rem; font-weight: 700; color: var(--gold-2); background: rgba(245, 197, 24, .1); border: 1px solid rgba(245, 197, 24, .35); animation: fade-up .4s var(--ease-out); }
[dir="rtl"] .file-chip { padding: .2rem .7rem .2rem .3rem; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 13.75rem; }
.file-chip button { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; padding: 0; border: 0; border-radius: 50%; background: rgba(248, 113, 113, .14); cursor: pointer; color: var(--danger); font-size: .9rem; line-height: 1; }
.login-strip { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .9rem 1rem; border-top: 1px solid var(--line); background: rgba(245, 197, 24, .05); font-weight: 600; color: var(--text-2); }
.login-strip .ti { color: var(--gold); }
@media (max-width: 600px) { .composer { padding: .6rem; } .composer .btn .lbl { display: none; } .composer .btn { width: 2.9rem; padding: 0; } }

/* ---------- side panels ---------- */
.chat-split > aside { display: grid; gap: 1.1rem; }
.chat-split > * { min-width: 0; }
.chat-split.order-first > aside { position: static; } /* tall order panel: keep the action buttons reachable */
@media (max-width: 1000px) { .chat-split.order-first > aside { order: -1; } }
.order-media { position: relative; display: block; margin: 1rem 1.25rem 0; aspect-ratio: 28 / 15; overflow: hidden; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.order-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.order-media:hover img { transform: scale(1.07); }
.order-media .badge { position: absolute; z-index: 1; top: .6rem; inset-inline-start: .6rem; background-color: rgba(12, 11, 10, .82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 .5rem 1.2rem -.4rem rgba(0, 0, 0, .7); }
.order-title { display: block; font-weight: 800; color: var(--text); line-height: 1.55; overflow-wrap: anywhere; }
.order-title:hover { color: var(--gold-2); }
.person-row { display: flex; align-items: center; gap: .6rem; min-width: 0; color: var(--text-2); font-weight: 700; }
.person-row span { min-width: 0; overflow-wrap: anywhere; }
.person-row small { display: block; font-weight: 600; color: var(--muted); }
.steps { list-style: none; margin: 1rem 0 .4rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps li { position: relative; text-align: center; font-size: .74rem; font-weight: 700; color: var(--muted); line-height: 1.35; }
.steps li .sq { position: relative; z-index: 1; width: 2rem; height: 2rem; margin: 0 auto .4rem; display: grid; place-items: center; border-radius: 50%; font-size: 1rem; background: #1a1816; border: 1.5px solid var(--line-2); transition: background-color .4s, border-color .4s, color .4s; }
.steps li::after { content: ""; position: absolute; top: calc(1rem - 1px); inset-inline-start: calc(50% + 1.25rem); width: calc(100% - 2.5rem); height: 2px; border-radius: 2px; background: var(--line-2); }
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--success); } .steps li.done .sq { color: #052e16; background: var(--success); border-color: var(--success); box-shadow: 0 0 1rem -.2rem rgba(74, 222, 128, .6); }
.steps li.done::after { background: linear-gradient(var(--to-e), var(--success), rgba(74, 222, 128, .35)); }
.steps li.cur { color: var(--gold); } .steps li.cur .sq { color: var(--gold); border-color: var(--gold); }
@media (prefers-reduced-motion: no-preference) { .steps li.cur .sq { animation: cur-pulse 1.8s ease-in-out infinite; } }
.steps li.bad { color: var(--danger); } .steps li.bad .sq { color: #fff; background: #dc2626; border-color: #dc2626; }
@keyframes cur-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 197, 24, .45); } 50% { box-shadow: 0 0 0 .45rem rgba(245, 197, 24, 0); } }
.kv { display: grid; gap: .5rem; margin: .9rem 0; font-size: .9rem; }
.kv > div { display: flex; justify-content: space-between; gap: .75rem; padding-bottom: .45rem; border-bottom: 1px dashed var(--line-2); }
.kv > div > span:first-child { color: var(--muted); }
.kv > div > b { text-align: end; color: var(--text); overflow-wrap: anywhere; }
.kv .countdown, .countdown { color: var(--gold); }
.kv .countdown.late, .countdown.late { color: var(--danger); }
.extras { list-style: none; margin: 0 0 .9rem; padding: 0; display: grid; gap: .4rem; }
.extras li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .5rem .75rem; border-radius: var(--r-sm); background: rgba(255, 255, 255, .035); border: 1px solid var(--line); font-size: .88rem; color: var(--text-2); }
.extras b { color: var(--success); white-space: nowrap; }
.side-title { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; font-size: .9rem; font-weight: 800; color: var(--text-2); }
.side-title .ti { color: var(--gold); }
.actions { display: grid; gap: .6rem; }
.actions .btn { white-space: normal; text-align: center; line-height: 1.4; padding-block: .45rem; }
.hint { display: flex; gap: .4rem; align-items: flex-start; font-size: .8rem; color: var(--muted); }
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; font-size: .88rem; color: var(--text-2); }
.tips li { display: flex; gap: .65rem; align-items: flex-start; }
.tips li i { flex: none; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 50%; color: var(--gold); background: rgba(245, 197, 24, .1); box-shadow: inset 0 0 0 1px rgba(245, 197, 24, .25); }

/* ---------- service requests ---------- */
.w-hero {
    position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 1.1rem; flex-wrap: wrap;
    padding: clamp(1.15rem, 3vw, 1.75rem); border-radius: var(--r-xl); border: 1px solid rgba(245, 197, 24, .2);
    background: radial-gradient(80% 140% at 0% 0%, rgba(245, 197, 24, .14), transparent 60%), linear-gradient(180deg, #171513, #111010);
    box-shadow: var(--shadow-1), 0 1.5rem 3rem -2.4rem rgba(245, 197, 24, .5);
}
[dir="rtl"] .w-hero { background: radial-gradient(80% 140% at 100% 0%, rgba(245, 197, 24, .14), transparent 60%), linear-gradient(180deg, #171513, #111010); }
.w-hero h2 { margin: 0 0 .25rem; font-size: clamp(1.15rem, 2.2vw, 1.5rem); }
.w-hero p { margin: 0; color: var(--text-2); }
.w-hero .deco {
    position: absolute; z-index: -1; inset-inline-end: -3.5rem; top: -4.5rem; width: 13rem; height: 13rem; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(245, 197, 24, .16), transparent 62%);
    box-shadow: inset 0 0 0 1px rgba(245, 197, 24, .14), 0 0 0 1.5rem rgba(245, 197, 24, .03), 0 0 0 3rem rgba(245, 197, 24, .02);
}
.w-hero > *:not(.deco) { position: relative; min-width: 0; }
.w-hero .btn { white-space: normal; text-align: center; line-height: 1.4; }
@media (max-width: 600px) { .w-hero .btn { width: 100%; } }
.w-card .card-body { display: grid; gap: .6rem; align-content: start; }
.w-card .card-title { font-size: 1.05rem; min-height: 0; }
.w-card .card-footer { gap: .75rem; }
.w-desc { margin: 0; color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.w-card .chip { min-height: 1.9rem; padding: 0 .7rem; font-size: .78rem; cursor: default; }
.w-card .chip:hover { transform: none; }
.chip.ok, .chip.ok:hover { color: #86efac; background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .32); }
.chip.wait, .chip.wait:hover { color: #fcd34d; background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .32); }
.chip.ok .ti { color: #86efac; } .chip.wait .ti { color: #fcd34d; }
.w-owner { position: relative; z-index: 2; display: flex; align-items: center; gap: .6rem; min-width: 0; color: var(--text-2); }
.w-owner .avatar { box-shadow: 0 0 0 2px var(--line-2); }
.w-owner span { min-width: 0; }
.w-owner b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-owner small { display: block; color: var(--muted); font-size: .74rem; }
.w-card .card-footer .btn { flex: none; width: 2.4rem; padding: 0; }
.request-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.05rem; line-height: 1.9; color: var(--text-2); }
.profile { text-align: center; overflow: hidden; background: radial-gradient(110% 50% at 50% 0%, rgba(245, 197, 24, .12), transparent 65%), linear-gradient(180deg, #171513, #111010); }
.profile .avatar-lg { margin: 0 auto .65rem; border: 3px solid #141312; box-shadow: 0 0 0 2px rgba(245, 197, 24, .7), 0 0 2rem -.3rem rgba(245, 197, 24, .5); }
.profile .name { font-size: 1.15rem; font-weight: 800; color: var(--text); overflow-wrap: anywhere; }
.profile .name:hover { color: var(--gold-2); }
.online { display: inline-flex; align-items: center; gap: .4rem; padding: .05rem .65rem; border-radius: var(--pill); font-size: .74rem; font-weight: 800; border: 1px solid; }
.online::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.online.on { color: #86efac; background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .35); }
.online.off { color: #fca5a5; background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .32); }
@media (prefers-reduced-motion: no-preference) { .online.on::before { animation: msg-online 1.8s ease-out infinite; } }
@keyframes msg-online { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); } 100% { box-shadow: 0 0 0 .4rem rgba(74, 222, 128, 0); } }
.profile-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: .9rem 0; overflow: hidden; border-radius: var(--r); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .025); }
.profile-stats > div { padding: .6rem; font-size: .8rem; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.profile-stats > div + div { border-inline-start: 1px solid var(--line-2); }
.profile-stats b { display: block; font-size: .95rem; color: var(--gold); }
.profile-info { text-align: start; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; color: var(--text-2); max-height: 13.75rem; overflow: auto; }

/* sent confirmation inside dialogs */
.sent-ok { text-align: center; padding-block: .75rem; }
.sent-ok .sq-icon { width: 4.75rem; height: 4.75rem; margin: .4rem auto 1rem; display: grid; place-items: center; border-radius: 50%; font-size: 2rem; color: var(--success); background: radial-gradient(circle at 35% 30%, rgba(134, 239, 172, .3), rgba(34, 197, 94, .08) 60%); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .4), 0 0 2.5rem rgba(74, 222, 128, .25); animation: msg-pop .6s var(--spring); }
@keyframes msg-pop { from { opacity: 0; transform: scale(.6); } }
