* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: system-ui, "Segoe UI", sans-serif; background: #0f172a; color: #e2e8f0; }
.hidden { display: none !important; }
.center { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; }
.card { background: #1e293b; border: 1px solid #334155; border-radius: 12px; padding: 28px; width: 340px; display: flex; flex-direction: column; gap: 14px; }
.card.wide { width: 520px; }
h1 { margin: 0; font-size: 22px; }
h2 { margin: 12px 0 0; font-size: 15px; color: #94a3b8; font-weight: 600; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #94a3b8; }
input { background: #0f172a; border: 1px solid #334155; border-radius: 8px; color: #e2e8f0; padding: 10px 12px; font-size: 15px; }
input:focus { outline: 2px solid #3b82f6; border-color: transparent; }
button { background: #2563eb; color: #fff; border: 0; border-radius: 8px; padding: 10px 14px; font-size: 14px; cursor: pointer; }
button:hover { background: #1d4ed8; }
button.danger { background: #dc2626; }
button.danger:hover { background: #b91c1c; }
button.link { background: none; color: #94a3b8; padding: 4px; }
button.small { padding: 6px 10px; font-size: 13px; }
.muted { color: #94a3b8; font-size: 13px; }
.error { color: #f87171; font-size: 13px; min-height: 1em; margin: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
#connect-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.devices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.devices li { display: flex; align-items: center; gap: 10px; background: #0f172a; border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.devices .id { font-variant-numeric: tabular-nums; font-weight: 600; }
.devices .busy { color: #fbbf24; font-size: 12px; }
#session-view { position: fixed; inset: 0; display: flex; flex-direction: column; background: #000; }
.toolbar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: #1e293b; border-bottom: 1px solid #334155; }
.toolbar button { padding: 6px 12px; font-size: 13px; }
.check { flex-direction: row; align-items: center; gap: 6px; }
button.toggle { background: #334155; }
button.toggle:hover { background: #475569; }
button.toggle.on { background: #16a34a; }
button.toggle.on:hover { background: #15803d; }
button.toggle:disabled { opacity: .5; cursor: not-allowed; }
.badge { font-size: 12px; background: #854d0e; color: #fef3c7; border-radius: 999px; padding: 3px 10px; }
.monitors { display: inline-flex; gap: 2px; background: #0f172a; border: 1px solid #334155; border-radius: 8px; padding: 2px; }
.monitors button { background: none; color: #cbd5e1; padding: 4px 10px; min-width: 32px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.monitors button:hover { background: #1e3a8a; }
.monitors button.active { background: #2563eb; color: #fff; }
.monitors button.primary::after { content: "★"; font-size: 9px; margin-left: 3px; vertical-align: super; opacity: .7; }
.stage { flex: 1; min-height: 0; display: flex; position: relative; }
.drop-hint { display: none; position: absolute; inset: 16px; border: 3px dashed #3b82f6; border-radius: 16px; background: rgba(15, 23, 42, .75); color: #bfdbfe; font-size: 22px; align-items: center; justify-content: center; pointer-events: none; }
.stage.dragover .drop-hint { display: flex; }
.transfers-panel { position: absolute; right: 12px; bottom: 12px; width: 340px; max-height: 60%; display: flex; flex-direction: column; gap: 8px; background: #0f172a; border: 1px solid #334155; border-radius: 12px; padding: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.transfers-panel header { font-size: 14px; }
.transfers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.transfer { background: #1e293b; border: 1px solid #334155; border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.transfer-top { display: flex; align-items: center; gap: 6px; }
.transfer-dir { color: #60a5fa; font-weight: 700; }
.transfer-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer-btn { background: none; color: #60a5fa; padding: 2px 6px; font-size: 12px; }
.transfer-btn:hover { background: #1e3a8a; }
.transfer-bar { height: 4px; background: #334155; border-radius: 2px; margin: 6px 0 4px; overflow: hidden; }
.transfer-bar > div { height: 100%; width: 0; background: #3b82f6; }
.transfer.ok .transfer-bar > div { background: #22c55e; }
.transfer.failed .transfer-bar > div { background: #ef4444; }
.transfer-info { color: #94a3b8; }
.transfer.failed .transfer-info { color: #f87171; }
.chat { background: #0f172a; border: 1px solid #334155; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-panel { position: absolute; left: 12px; bottom: 12px; width: 340px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.chat-head { font-size: 14px; }
.chat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; height: 260px; overflow-y: auto; }
.chat-list:empty::before { content: "Henüz mesaj yok"; color: #64748b; font-size: 12px; margin: auto; }
.chat-msg { max-width: 85%; padding: 6px 10px; border-radius: 10px; font-size: 13px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg.me { align-self: flex-end; background: #2563eb; color: #fff; border-bottom-right-radius: 3px; }
.chat-msg.them { align-self: flex-start; background: #334155; color: #e2e8f0; border-bottom-left-radius: 3px; }
.chat-meta { display: block; font-size: 10px; opacity: .7; margin-bottom: 2px; }
.chat-form { display: flex; gap: 6px; }
.chat-form input { flex: 1; min-width: 0; padding: 8px 10px; font-size: 13px; }
.chat-form button { padding: 8px 12px; font-size: 13px; }
.unread { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.toast { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: #1e293b; border: 1px solid #334155; border-radius: 10px; padding: 8px 14px; font-size: 13px; display: flex; gap: 10px; align-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.toast button { padding: 4px 10px; font-size: 12px; }
#remote { width: 100%; height: 100%; object-fit: contain; outline: none; cursor: default; background: #000; }
