/* /messages — eBay tarzi inbox. Site slate paleti (orders/products ile ayni dil). */
.msg-wrap { max-width: 1280px; margin: 0 auto; padding: 18px 20px; }
.msg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.msg-head h1 { font-size: 18px; font-weight: 700; color: #f1f5f9; margin: 0; }
.msg-head .msg-head-icon { font-size: 20px; }

.msg-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.msg-filter { background: #1e293b; border: 1px solid #334155; color: #94a3b8; border-radius: 999px;
    padding: 6px 14px; font-size: 13px; cursor: pointer; transition: all .15s ease; font-family: inherit; }
.msg-filter:hover { border-color: #475569; color: #cbd5e1; }
.msg-filter.active { background: rgba(14,165,233,.14); color: #38bdf8; border-color: rgba(14,165,233,.5); font-weight: 600; }
.msg-refresh { margin-left: auto; background: rgba(16,185,129,.12); color: #34d399;
    border: 1px solid rgba(16,185,129,.4); border-radius: 8px; padding: 6px 14px; font-size: 13px;
    font-weight: 600; cursor: pointer; font-family: inherit; }
.msg-refresh:hover { background: rgba(16,185,129,.2); }
/* eBay sistem mesajları göster/gizle — iOS tarzı toggle switch (accent: sky/#0ea5e9, pill'lerle uyumlu) */
.msg-systoggle { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: #94a3b8;
    cursor: pointer; user-select: none; line-height: 21px; }
.msg-switch { position: relative; display: inline-block; width: 38px; height: 21px; flex: none; }
.msg-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.msg-slider { position: absolute; inset: 0; background: #334155; border: 1px solid #475569;
    border-radius: 999px; transition: background .25s ease, border-color .25s ease; }
.msg-slider::before { content: ""; position: absolute; width: 15px; height: 15px; left: 3px; top: 2px;
    background: #cbd5e1; border-radius: 50%; transition: transform .25s ease, background .25s ease; }
.msg-switch input:checked + .msg-slider { background: rgba(14,165,233,.85); border-color: rgba(14,165,233,.9); }
.msg-switch input:checked + .msg-slider::before { transform: translateX(17px); background: #f0f9ff; }
.msg-switch input:focus-visible + .msg-slider { box-shadow: 0 0 0 2px rgba(14,165,233,.4); }
.msg-systoggle:hover { color: #cbd5e1; }

.msg-pane { display: flex; gap: 16px; align-items: stretch; height: calc(100vh - 210px); min-height: 440px; }
.msg-list { flex: 0 0 380px; max-width: 42%; overflow-y: auto; background: #0f172a;
    border: 1px solid #1e293b; border-radius: 14px; }
.msg-detail { flex: 1; overflow-y: auto; background: #0f172a; border: 1px solid #1e293b;
    border-radius: 14px; padding: 24px; }

/* Liste satiri */
.msg-item { position: relative; padding: 13px 16px; border-bottom: 1px solid #1a2436;
    cursor: pointer; transition: background .12s ease; }
.msg-item:hover { background: #141e33; }
.msg-item.active { background: #16223c; }
.msg-item.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: #0ea5e9; border-radius: 0 2px 2px 0; }
.msg-item-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.msg-item-top + .msg-item-top { margin-top: 4px; }
.msg-item-sender { font-size: 13.5px; color: #cbd5e1; font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-item-date { font-size: 11px; color: #64748b; flex: 0 0 auto; }
.msg-item-subject { font-size: 12.5px; color: #94a3b8;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-item.unread .msg-item-sender { color: #f1f5f9; font-weight: 700; }
.msg-item.unread .msg-item-subject { color: #cbd5e1; font-weight: 600; }
.msg-item.unread .msg-item-sender::before { content: ""; display: inline-block; width: 7px; height: 7px;
    border-radius: 50%; background: #0ea5e9; margin-right: 7px; vertical-align: middle;
    box-shadow: 0 0 6px rgba(14,165,233,.6); }

.msg-item-actions { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.msg-count { display: inline-block; margin-left: 7px; padding: 0 6px; font-size: 11px; font-weight: 600;
    color: #94a3b8; background: #1a2436; border-radius: 9px; vertical-align: middle; }
.msg-unread-badge { display: inline-block; min-width: 18px; padding: 0 5px; font-size: 11px; font-weight: 700;
    text-align: center; color: #fff; background: #0ea5e9; border-radius: 9px; }

.msg-star { cursor: pointer; color: #475569; font-size: 15px; flex: 0 0 auto; transition: color .12s ease; }
.msg-star:hover { color: #fbbf24; }
.msg-star.on { color: #fbbf24; }

/* Detay */
.msg-d-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.msg-d-subject { font-size: 18px; color: #f1f5f9; font-weight: 700; line-height: 1.3; }
.msg-d-header .msg-star { font-size: 22px; margin-top: 2px; }
.msg-d-meta { font-size: 12.5px; color: #94a3b8; margin-bottom: 4px; }
.msg-d-meta a { color: #38bdf8; text-decoration: none; }
.msg-d-meta a:hover { text-decoration: underline; }
.msg-d-body { margin: 16px 0; padding: 16px 18px; background: #0b1220; border: 1px solid #1e293b;
    border-radius: 10px; color: #e2e8f0; font-size: 14px; line-height: 1.6;
    word-break: break-word; overflow-wrap: anywhere; }
.msg-d-body img { max-width: 100%; height: auto; border-radius: 6px; }
.msg-d-body a { color: #38bdf8; }
.msg-replied-badge { font-size: 11px; color: #34d399; border: 1px solid rgba(16,185,129,.4);
    border-radius: 6px; padding: 2px 9px; margin-left: 6px; }

.msg-reply-wrap { margin-top: 18px; border-top: 1px solid #1e293b; padding-top: 16px; }
.msg-reply-ta { width: 100%; box-sizing: border-box; min-height: 100px; background: #0b1220;
    border: 1px solid #334155; border-radius: 10px; color: #e2e8f0; font-size: 13.5px;
    padding: 12px; resize: vertical; font-family: inherit; }
.msg-reply-ta:focus { outline: none; border-color: #0ea5e9; }
.msg-reply-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.msg-reply-note { font-size: 11.5px; color: #64748b; }
.msg-reply-btn { background: #0ea5e9; color: #012b3a; border: none; border-radius: 8px;
    padding: 8px 20px; font-size: 13.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.msg-reply-btn:hover { background: #38bdf8; }
.msg-reply-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Bos durum (zarif) */
.msg-empty { display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 200px; height: 100%; color: #475569; text-align: center; gap: 10px; padding: 40px 20px; }
.msg-empty-icon { font-size: 42px; opacity: .45; line-height: 1; }
.msg-empty-text { font-size: 14px; color: #64748b; }

/* Baglam karti (listing) */
.msg-ctx-card { display: flex; gap: 12px; align-items: center; background: #0b1220;
    border: 1px solid #1e293b; border-radius: 10px; padding: 10px 12px; margin: 14px 0 6px; }
.msg-ctx-img { width: 56px; height: 56px; flex: 0 0 56px; object-fit: contain; border-radius: 8px;
    background: #0f172a; border: 1px solid #1e293b; }
.msg-ctx-img.ph { display: flex; align-items: center; justify-content: center; font-size: 24px; color: #475569; }
.msg-ctx-info { min-width: 0; }
.msg-ctx-title { font-size: 13.5px; color: #e2e8f0; font-weight: 600; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; }
.msg-ctx-title a { color: #e2e8f0; text-decoration: none; }
.msg-ctx-title a:hover { color: #38bdf8; }
.msg-ctx-sub { font-size: 11.5px; color: #94a3b8; margin-top: 3px; }
.msg-ctx-sub b { color: #34d399; }

/* Sohbet balonlari (gelen = sol, giden cevap = sag) */
.msg-chat { margin: 14px 0; display: flex; flex-direction: column; gap: 12px; }
.msg-bubble { display: flex; gap: 10px; align-items: flex-start; max-width: 85%; }
.msg-bubble.in { align-self: flex-start; }
.msg-bubble.out { align-self: flex-end; flex-direction: row-reverse; }
.msg-bubble.out .msg-avatar { background: linear-gradient(135deg, #22c55e, #16a34a); }
.msg-bubble.out .msg-bubble-body { background: #14321f; border-color: #1f5135;
    border-radius: 14px 4px 14px 14px; }
.msg-avatar { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #6366f1); color: #fff; font-weight: 700;
    font-size: 15px; display: flex; align-items: center; justify-content: center; }
.msg-bubble-body { background: #16223c; border: 1px solid #243352; border-radius: 4px 14px 14px 14px;
    padding: 10px 14px; }
.msg-bubble-text { font-size: 14px; color: #e2e8f0; line-height: 1.55; white-space: pre-wrap;
    word-break: break-word; overflow-wrap: anywhere; }
.msg-bubble-time { font-size: 10.5px; color: #64748b; margin-top: 6px; text-align: right; }

/* Sistem bildirimi (balon degil) */
.msg-notice { margin: 14px 0; }
.msg-notice-tag { font-size: 11px; color: #94a3b8; background: rgba(148,163,184,.1);
    border: 1px solid #334155; border-radius: 6px; padding: 3px 10px; display: inline-block; margin-bottom: 8px; }

/* Responsive: dar ekranda stack */
@media (max-width: 860px) {
    .msg-pane { flex-direction: column; height: auto; }
    .msg-list { flex: 1 1 auto; max-width: 100%; max-height: 46vh; }
    .msg-detail { min-height: 340px; padding: 18px; }
}
