/* Takip — panel üstü ek stiller (mirago panel.css üzerine) */
:root { --sidebar-w: 244px; }

/* ---- giriş ekranı ---- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; position: relative; z-index: 1; }
.login-card { width: 100%; max-width: 410px; background: #080d1c; border: 1px solid var(--border); border-radius: 18px; padding: 30px 28px; box-shadow: 0 30px 70px rgba(0,0,0,.55); }
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.login-brand img { width: 40px; height: 40px; border-radius: 11px; }
.login-brand b { display: block; font-family: var(--font-display); font-size: 17px; letter-spacing: -.4px; }
.login-brand span { display: block; font-size: 10.5px; letter-spacing: 1.6px; color: var(--muted-2); text-transform: uppercase; }
.login-card h1 { font-size: 19px; margin-bottom: 6px; }
.login-card .lead { font-size: 12.5px; color: var(--muted); margin-bottom: 20px; }
.login-foot { margin-top: 18px; font-size: 11.5px; color: var(--muted-2); text-align: center; }

/* ---- yardım kartı ---- */
.help-card { display: flex; gap: 11px; padding: 13px 15px; border: 1px solid rgba(99,102,241,.28);
  background: rgba(79,70,229,.09); border-radius: 12px; margin-bottom: 16px; }
.help-card .icon { color: #93c5fd; margin-top: 2px; }
.help-card > div > b:first-child { display: block; font-size: 12.5px; margin-bottom: 3px; }
.help-card p { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ---- sohbet (ticket) ---- */
.chat { display: flex; flex-direction: column; gap: 14px; }
.chat-item { display: flex; gap: 11px; }
.chat-item.mine { flex-direction: row-reverse; }
.chat-avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 12px;
  font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); flex: 0 0 auto; }
.chat-item.mine .chat-avatar { background: rgba(79,70,229,.22); border-color: rgba(99,102,241,.4); color: #c7d2fe; }
.chat-body { max-width: 74%; }
.chat-head { font-size: 11px; color: var(--muted-2); margin-bottom: 5px; display: flex; gap: 8px; align-items: center; }
.chat-bubble { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
  font-size: 13px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.chat-item.mine .chat-bubble { background: rgba(79,70,229,.14); border-color: rgba(99,102,241,.32); }
.chat-bubble.internal { background: rgba(251,191,36,.10); border-color: rgba(251,191,36,.32); }
.chat-files { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.chat-file { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; padding: 5px 9px;
  border: 1px solid var(--border-2); border-radius: 8px; color: var(--text-soft); background: rgba(255,255,255,.03); }
.chat-file:hover { border-color: rgba(99,102,241,.5); color: #c7d2fe; }
.chat-file img { width: 100%; border-radius: 8px; }
.chat-compose textarea { min-height: 96px; }
.chat-thumb { max-width: 220px; border-radius: 10px; border: 1px solid var(--border); margin-top: 8px; }

/* ---- kasa ---- */
.vault-locked { display: grid; place-items: center; text-align: center; padding: 44px 20px; gap: 8px; }
.vault-locked .icon { width: 42px; height: 42px; color: var(--muted); }
.secret { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; letter-spacing: .4px;
  background: rgba(255,255,255,.04); padding: 4px 8px; border-radius: 7px; border: 1px solid var(--border); }
.secret.hidden { color: var(--muted-2); letter-spacing: 2px; }

/* ---- tablo ufak dokunuşlar ---- */
.data-table td.num, .data-table th.num { text-align: right; white-space: nowrap; }
.pos { color: #34d399; } .neg { color: #f87171; }
.tabs { gap: 4px; }
.mini-note { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; }
.code-block { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; line-height: 1.7;
  background: #04070f; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  white-space: pre-wrap; word-break: break-word; color: #c8d4e6; }
.note-body { white-space: pre-wrap; font-size: 13px; line-height: 1.7; color: var(--text-soft); }
.attach-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

/* ---- mobil ---- */
@media (max-width: 900px) {
  .panel-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; transform: translateX(-100%); transition: transform .22s; }
  .panel-sidebar.open { transform: none; }
  .chat-body { max-width: 88%; }
}

/* ---- yanıt formu (panel.css .chat-compose flex satırını düzeltir) ---- */
.chat-compose { display: block; border: 0; padding: 18px 0 0; background: none; }
.chat-compose .field { margin-bottom: 10px; }
.chat-compose .textarea { min-height: 108px; max-height: none; }
.chat-compose .check-row { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0 14px; font-size: 11.5px; }
.chat-compose .btn { width: 100%; }

/* dar kartlarda tablo yatay kaydırma çubuğu göstermesin */
.grid-2 .data-table, .grid-2-1 .data-table { min-width: 0; }

/* Şifre kasası — adres/URL bağlantısı */
.vault-link { color: var(--accent, #3b82f6); text-decoration: none; border-bottom: 1px dashed currentColor; word-break: break-all; }
.vault-link:hover { border-bottom-style: solid; }
.vault-link .ext { font-size: 10px; margin-left: 3px; opacity: .7; }

/* ================= sohbet ekleri (v1.1.0) ================= */
.chat-bubble .chat-text { word-break: break-word; }
.chat-atts { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.chat-bubble .chat-atts:first-child { margin-top: 0; }
.att-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.att-img { position: relative; display: block; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: rgba(0,0,0,.18); line-height: 0; }
.att-img img { display: block; max-width: 210px; max-height: 160px; width: auto; height: auto; object-fit: cover; transition: opacity .15s; }
.att-img:hover img { opacity: .88; }
.att-img-cap { position: absolute; left: 0; right: 0; bottom: 0; line-height: 1.3; font-size: 10px; padding: 3px 7px;
  color: #e7edf7; background: linear-gradient(to top, rgba(6,10,20,.82), rgba(6,10,20,0)); }
.att-files { display: flex; flex-wrap: wrap; gap: 7px; }
.att-file { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2, rgba(255,255,255,.04)); text-decoration: none; max-width: 100%; }
.att-file:hover { border-color: rgba(99,102,241,.5); }
.att-badge { flex: 0 0 auto; min-width: 38px; height: 30px; padding: 0 6px; border-radius: 7px; display: grid; place-items: center;
  font-size: 9.5px; font-weight: 700; letter-spacing: .04em; color: #fff; background: #475069; }
.att-meta { display: flex; flex-direction: column; min-width: 0; }
.att-meta b { font-size: 12px; font-weight: 600; color: var(--text, #e7edf7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.att-meta i { font-size: 10.5px; font-style: normal; color: var(--muted-2); }
.att-file.kind-image  .att-badge { background: #2563eb; }
.att-file.kind-pdf    .att-badge { background: #dc2626; }
.att-file.kind-doc    .att-badge { background: #1d4ed8; }
.att-file.kind-sheet  .att-badge { background: #15803d; }
.att-file.kind-slide  .att-badge { background: #c2410c; }
.att-file.kind-archive .att-badge { background: #7c3aed; }
.att-file.kind-code   .att-badge { background: #0f766e; }
.att-file.kind-text   .att-badge { background: #475569; }

/* ---- sürükle-bırak kutusu ---- */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 20px 16px; border: 1.5px dashed rgba(99,102,241,.38); border-radius: 12px; cursor: pointer;
  background: rgba(79,70,229,.05); text-align: center; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone:focus-visible { border-color: rgba(99,102,241,.7); background: rgba(79,70,229,.09); outline: none; }
.dropzone.drag { border-color: #6366f1; background: rgba(79,70,229,.16); }
.dropzone .dz-ico { color: #a5b4fc; display: block; margin-bottom: 2px; }
.dropzone b { font-size: 12.5px; color: var(--text, #e7edf7); font-weight: 600; }
.dropzone > span { font-size: 11px; color: var(--muted-2); }
.dropzone u { text-decoration-style: dotted; }
.dropzone kbd { font-family: inherit; font-size: 10px; padding: 1px 5px; border-radius: 4px;
  border: 1px solid var(--border); background: rgba(255,255,255,.06); color: var(--text, #e7edf7); }
.dropzone .dz-plus { margin: 0 2px; opacity: .6; }

/* ---- seçilen dosya çipleri ---- */
.attach-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.attach-list:empty { margin-top: 0; }
.achip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 5px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2, rgba(255,255,255,.04)); max-width: 240px; }
.achip img { width: 34px; height: 34px; object-fit: cover; border-radius: 7px; }
.achip-badge { width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center; font-size: 9px;
  font-weight: 700; letter-spacing: .03em; color: #fff; background: #475069; }
.achip-meta { display: flex; flex-direction: column; min-width: 0; }
.achip-meta b { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.achip-meta i { font-size: 10px; font-style: normal; color: var(--muted-2); }
.achip-x { border: 0; background: transparent; color: var(--muted-2); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 3px; }
.achip-x:hover { color: #f87171; }
.attach-error { margin-top: 8px; font-size: 11.5px; color: #fca5a5; }
.attach-foot { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 8px; font-size: 10.5px; line-height: 1.5; }
.attach-foot .muted { color: var(--muted-2); }
.attach-count { color: #a5b4fc; font-weight: 600; }
.btn.is-loading { opacity: .6; pointer-events: none; }

/* ---- müşteri görünümü şeridi ---- */
.viewas-bar { display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin-bottom: 16px;
  border-radius: 12px; border: 1px solid rgba(251,191,36,.38); background: rgba(251,191,36,.12); color: #fde68a; }
.viewas-bar .viewas-text { flex: 1; min-width: 0; font-size: 12px; display: flex; flex-direction: column; gap: 1px; }
.viewas-bar .viewas-text b { color: #fde68a; }
.viewas-bar .viewas-text span { font-size: 11px; color: #d6c79a; }
.viewas-bar .btn { flex: 0 0 auto; }
@media (max-width: 720px) { .viewas-bar { flex-wrap: wrap; } .viewas-bar .btn { width: 100%; } }
