/* The Artifics AI Ofisi · arayüz kromu
   Tek tema (koyu), tek vurgu (Artifics altını #c8a24a), yarıçap sistemi: paneller 14px, butonlar 10px, çipler tam yuvarlak. */

:root {
  --bg: #0b0d12;
  --surface: rgba(17, 20, 27, 0.86);
  --surface-solid: #11141b;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0f4;
  --muted: rgba(238, 240, 244, 0.62);
  --accent: #c8a24a;
  --accent-ink: #14161c;
  --ok: #5fcf8a;
  --err: #ff6b6b;
  --work: #9fb3d9;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --r-panel: 14px;
  --r-btn: 10px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --pixel: "Pixelify Sans", "Geist", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); overflow: hidden; -webkit-font-smoothing: antialiased; }
.office { position: relative; width: 100%; height: 100dvh; overflow: hidden; touch-action: none; user-select: none; }
#office-canvas { position: absolute; inset: 0; display: block; image-rendering: pixelated; cursor: grab; }
#office-canvas.is-dragging { cursor: grabbing; }
.is-coop.office, .is-coop .office, .is-coop #office-canvas { touch-action: pan-x pan-y; }
.coop-hint { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(6, 8, 14, 0.5); color: #fff; font-size: 15px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.coop-hint.on { opacity: 1; }

/* ---------- ortak ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: 500 13px/1 var(--font); cursor: pointer;
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-icon { width: 34px; padding: 0; justify-content: center; }
.btn i { font-size: 16px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: rgba(30, 34, 44, 0.92); border-color: var(--line-strong); }
  .btn-primary:hover { background: #d6b25c; }
}

/* ---------- üst bar ---------- */
.hud-top {
  position: absolute; top: 12px; left: 16px; right: 16px; z-index: 3;
  display: flex; align-items: center; gap: 12px; pointer-events: none;
}
.hud-top > * { pointer-events: auto; }
.brand {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px;
  border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.brand-mark { height: 14px; width: auto; display: block; }
.brand-sep { width: 1px; height: 16px; background: var(--line-strong); }
.brand-title { font: 600 13px/1 var(--pixel); letter-spacing: 0.02em; color: var(--muted); }
.status { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--font); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.status-pill[data-state="live"] .status-dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(95, 207, 138, 0.6); animation: pulse 2s var(--ease-out) infinite; }
.status-pill[data-state="demo"] .status-dot { background: var(--accent); }
.status-pill[data-state="offline"] .status-dot { background: var(--err); }
.status-count { font: 500 12px/1 var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(95, 207, 138, 0.55); } 70% { box-shadow: 0 0 0 7px rgba(95, 207, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(95, 207, 138, 0); } }
.clock-badge { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font: 600 12px/1 var(--font); font-variant-numeric: tabular-nums; pointer-events: auto; }
.clock-badge i { font-size: 15px; color: var(--accent); }
.clock-weather { color: var(--muted); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-muted { --c: #9aa3ad; }
.tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.zoom { display: flex; gap: 4px; }
.lang { font: 700 11px/1 var(--font); letter-spacing: 0.04em; }

.search { position: relative; }
.search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 15px; pointer-events: none; }
.search input {
  width: 200px; height: 34px; padding: 0 12px 0 32px; border-radius: var(--r-btn);
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 500 13px var(--font);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: width 220ms var(--ease-out), border-color 160ms ease;
}
.search input::placeholder { color: rgba(238, 240, 244, 0.5); }
.search input:focus { width: 240px; border-color: var(--line-strong); }
.search-list {
  position: absolute; top: 40px; left: 0; right: 0; margin: 0; padding: 4px; list-style: none;
  background: var(--surface-solid); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); transform-origin: top center;
  animation: pop 160ms var(--ease-out);
}
.search-list li { display: grid; grid-template-columns: 10px auto 1fr; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.search-list li small { color: var(--muted); font-size: 11px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-list li[aria-selected="true"], .search-list li:hover { background: rgba(255, 255, 255, 0.07); }
.sw { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
@keyframes pop { from { opacity: 0; transform: scale(0.97) translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- minimap ---------- */
.minimap {
  position: absolute; left: 16px; bottom: 16px; z-index: 2; padding: 6px;
  border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.minimap canvas { display: block; border-radius: 8px; cursor: crosshair; image-rendering: pixelated; }

/* ---------- akış ---------- */
.feed {
  position: absolute; right: 16px; bottom: 16px; z-index: 2; width: 320px;
  border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: hidden;
  transition: transform 260ms var(--ease-drawer), opacity 200ms ease;
}
.feed-head { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; cursor: pointer; font: 600 12px/1 var(--pixel); letter-spacing: 0.03em; color: var(--muted); }
.feed-head i { transition: transform 200ms var(--ease-out); }
.feed.is-collapsed .feed-head i { transform: rotate(180deg); }
.feed.is-collapsed .feed-list { display: none; }
.feed-list { list-style: none; margin: 0; padding: 0 6px 6px; max-height: 236px; overflow-y: auto; scrollbar-width: thin; }
.feed.is-empty .feed-list::before { content: attr(data-empty); }
.feed.is-empty .feed-list { padding: 4px 12px 12px; color: var(--muted); font-size: 12px; }
.feed.is-empty .feed-list::before { content: none; }
.feed.is-empty .feed-list:empty::after { content: ""; }
.feed-item { display: grid; grid-template-columns: 16px 1fr auto; gap: 8px; align-items: start; padding: 6px 6px; border-radius: 8px; font-size: 12px; line-height: 1.4; animation: feedIn 240ms var(--ease-out); }
.feed-item i { font-size: 14px; margin-top: 1px; color: var(--muted); }
.feed-item b { font-weight: 600; cursor: pointer; }
.feed-item b:hover { text-decoration: underline; text-underline-offset: 2px; }
.feed-item small { color: var(--muted); font-variant-numeric: tabular-nums; }
.feed-item time { color: rgba(238, 240, 244, 0.4); font-size: 11px; font-variant-numeric: tabular-nums; }
.feed-item.k-work i { color: var(--work); }
.feed-item.k-ok i { color: var(--ok); }
.feed-item.k-err i { color: var(--err); }
.feed-item.k-game i { color: var(--accent); }
@keyframes feedIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- ajan paneli ---------- */
.has-panel .feed .feed-list { display: none; }
.has-panel .feed { width: 320px; }
.panel {
  position: absolute; top: 64px; right: 16px; z-index: 4; width: 320px; max-height: calc(100dvh - 64px - 16px - 58px);
  min-height: 0; overflow-y: auto; padding: 16px; border-radius: var(--r-panel);
  background: var(--surface-solid); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateX(16px); pointer-events: none;
  transition: transform 240ms var(--ease-out), opacity 180ms ease;
}
.panel.is-open { opacity: 1; transform: none; pointer-events: auto; }
.panel-head { display: grid; grid-template-columns: 72px 1fr 34px; gap: 12px; align-items: start; }
.panel-pic { width: 72px; height: 92px; border-radius: 12px; background: radial-gradient(circle at 50% 30%, #262b38, #171a22 70%); display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); }
.panel-pic canvas { width: 43px; height: 90px; image-rendering: pixelated; margin-top: 8px; }
.panel-pic i { font-size: 34px; color: var(--accent); }
.panel-meta h2 { margin: 6px 0 2px; font: 700 18px/1.15 var(--font); letter-spacing: -0.01em; }
.panel-meta .role { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border-radius: 999px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); font: 600 11px/1 var(--font); }
.bio { margin: 14px 0 10px; font-size: 13px; line-height: 1.55; color: rgba(238, 240, 244, 0.86); max-width: 65ch; }
.now { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 9px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.4; }
.now b { font-weight: 600; }
.now em { font-style: normal; color: #ff8a3d; font-weight: 700; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.dot-work { background: var(--ok); }
.dot-idle { background: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 4px; }
.stats div { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); }
.stats b { display: block; font: 700 16px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: 11px; }
.panel h3 { margin: 14px 0 6px; font: 600 11px/1 var(--pixel); letter-spacing: 0.04em; color: var(--muted); }
.recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.recent li { padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); font-size: 12.5px; line-height: 1.4; border-left: 2px solid var(--line-strong); }
.recent li.tone-work { border-left-color: var(--work); }
.recent li.tone-ok { border-left-color: var(--ok); }
.recent li.tone-error { border-left-color: var(--err); }
.recent li.tone-cf { border-left-color: #f6a04a; }
.recent li.muted { color: var(--muted); border-left-color: transparent; }
.follow { margin-top: 14px; width: 100%; justify-content: center; height: 38px; }

/* ---------- ipucu ---------- */
.tip {
  position: absolute; z-index: 5; width: 246px; padding: 10px 12px; border-radius: 10px;
  background: rgba(17, 20, 27, 0.95); border: 1px solid var(--line); color: var(--text);
  font-size: 12px; line-height: 1.45; pointer-events: none; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: pop 125ms var(--ease-out);
}
.tip strong { font-size: 13px; }
.tip .role { color: var(--muted); margin: 2px 0 6px; }
.tip-now { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); color: var(--accent); }
.hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1; padding: 6px 12px; border-radius: 999px; background: rgba(11, 13, 18, 0.6); color: rgba(238, 240, 244, 0.55); font-size: 11.5px; white-space: nowrap; pointer-events: none; }

/* ---------- gömülü mod ---------- */
.is-embed .minimap, .is-embed .feed, .is-embed .hint { display: none; }
/* Gomulu ofiste ust bar gizli; yalniz yakinlastir/uzaklastir/sigdir sag altta kalir. */
.is-embed .hud-top { top: auto; left: auto; right: 12px; bottom: 12px; padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; width: auto; }
.is-embed .hud-top > :not(.tools), .is-embed .hud-top .tools > :not(.zoom) { display: none !important; }
.is-embed .hud-top .zoom { background: rgba(11,13,18,.72); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 4px; }

/* ---------- dar ekran ---------- */
@media (max-width: 1100px) { .hint { display: none; } }
@media (max-width: 860px) {
  .status-count, .brand-sep, .brand-title, .clock-weather { display: none; }
  .search input { width: 140px; } .search input:focus { width: 170px; }
  .feed { width: 280px; }
}
@media (max-width: 640px) {
  .clock-badge { display: none; }
  .hud-top { top: 8px; left: 12px; right: 12px; gap: 8px; flex-wrap: wrap; }
  .tools { margin-left: 0; width: 100%; }
  .search { flex: 1; } .search input, .search input:focus { width: 100%; }
  .btn[data-act="time"] span { display: none; }
  .btn[data-act="time"] { width: 34px; padding: 0; justify-content: center; }
  .minimap { display: none; }
  .feed { left: 12px; right: 12px; width: auto; bottom: 12px; }
  .feed-list { max-height: 140px; }
  .panel { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 70dvh; border-radius: 18px 18px 0 0; transform: translateY(100%); transition: transform 320ms var(--ease-drawer), opacity 200ms ease; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .panel.is-open { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
  .panel, .feed, .search input { transition: opacity 150ms ease !important; transform: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .btn, .brand, .status, .search input, .minimap, .feed { background: var(--surface-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
