:root {
  --bg: #070b16; --panel: rgba(15, 22, 40, .78); --line: rgba(148, 163, 184, .14);
  --text: #e2e8f0; --mute: #94a3b8; --ok: #22c55e; --warn: #f59e0b; --bad: #ef4444;
  --acc: #38bdf8; --acc2: #a78bfa;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; }
.hidden { display: none !important; }
.mute { color: var(--mute); }
.bg { position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 600px at 0% -10%, rgba(167, 139, 250, .18), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(56, 189, 248, .14), transparent 60%); }

.logo { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; color: #0b1020; flex: none;
  background: linear-gradient(135deg, var(--acc), var(--acc2)); box-shadow: 0 10px 30px rgba(167, 139, 250, .35); }
h1 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.glass { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); backdrop-filter: blur(16px); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 11px; border: 1px solid var(--line); background: rgba(148, 163, 184, .08);
  color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: rgba(148, 163, 184, .16); }
.btn.primary { background: linear-gradient(135deg, var(--acc), #6366f1); border-color: transparent; color: #fff; box-shadow: 0 8px 24px rgba(56, 189, 248, .25); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .6; cursor: wait; }
input, textarea { font: inherit; color: var(--text); background: rgba(2, 6, 23, .55); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; outline: none; }
input:focus, textarea:focus { border-color: var(--acc); }

/* Giriş */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: min(380px, 100%); padding: 32px 28px; display: flex; flex-direction: column; gap: 14px; }
.login h1 { margin-top: 6px; }
.login p { margin: -8px 0 6px; font-size: 13px; }
.login label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--mute); }
.login .btn { justify-content: center; padding: 12px; margin-top: 6px; }
.err { color: #fca5a5; font-size: 13px; min-height: 18px; }

/* Uygulama */
.top { max-width: 1500px; margin: 0 auto; padding: 22px 24px 10px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand p { margin: 2px 0 0; font-size: 12px; }
.right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.save { font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 999px; }
.save.ok { color: var(--ok); background: rgba(34, 197, 94, .1); }
.save.busy { color: var(--warn); background: rgba(245, 158, 11, .1); }
.save.fail { color: var(--bad); background: rgba(239, 68, 68, .12); }

main { max-width: 1500px; margin: 0 auto; padding: 8px 24px 24px; display: flex; flex-direction: column; gap: 12px; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.tabs button { padding: 8px 16px; border: 0; border-radius: 9px; background: transparent; color: var(--mute); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.tabs button.on { background: rgba(56, 189, 248, .16); color: #fff; }
.stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat { font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#q { width: 220px; padding: 8px 12px; font-size: 13px; }
.hint { color: var(--mute); font-size: 12px; }

.sheet { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.del { width: 28px; height: 28px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--mute); cursor: pointer; font-size: 14px; }
.del:hover { color: var(--bad); border-color: rgba(239, 68, 68, .4); background: rgba(239, 68, 68, .1); }

/* Excel benzeri tablo */
.tabulator { background: transparent; border: 0; font-size: 13px; font-family: inherit; }
.tabulator .tabulator-header { background: rgba(2, 6, 23, .8); border-bottom: 1px solid var(--line); color: var(--mute); }
.tabulator .tabulator-header .tabulator-col { background: transparent; border-right: 1px solid var(--line); }
.tabulator .tabulator-tableholder, .tabulator .tabulator-tableholder .tabulator-table { background: transparent; color: var(--text); }
.tabulator-row { background: transparent; border-bottom: 1px solid var(--line); min-height: 36px; }
.tabulator-row.tabulator-row-even { background: rgba(148, 163, 184, .03); }
.tabulator-row.tabulator-selectable:hover { background: rgba(56, 189, 248, .06); }
.tabulator-row .tabulator-cell { border-right: 1px solid var(--line); padding: 8px 10px; }
.tabulator-row .tabulator-cell.tabulator-editable { cursor: cell; }
.tabulator-row .tabulator-cell.tabulator-editing { border: 2px solid var(--acc); padding: 0; background: #0b1224; }
.tabulator-row .tabulator-cell.tabulator-editing input { color: var(--text); padding: 8px 10px !important; }
.tabulator-row .tabulator-row-header, .tabulator .tabulator-header .tabulator-row-header { color: var(--mute); background: rgba(2, 6, 23, .45); font-variant-numeric: tabular-nums; }
.tabulator-row.saved { animation: saved 1.2s ease; }
.tabulator-row.row-err { box-shadow: inset 3px 0 0 var(--bad); background: rgba(239, 68, 68, .07); }
@keyframes saved { from { background: rgba(34, 197, 94, .22); } to { background: transparent; } }
.tabulator .tabulator-placeholder .tabulator-placeholder-contents { color: var(--mute); font-size: 14px; font-weight: 500; }
.tabulator-edit-list { background: #0f172a; border: 1px solid var(--line); color: var(--text); border-radius: 10px; }
.tabulator-edit-list .tabulator-edit-list-item { color: var(--text); padding: 8px 10px; }
.tabulator-edit-list .tabulator-edit-list-item.active, .tabulator-edit-list .tabulator-edit-list-item:hover { background: rgba(56, 189, 248, .2); color: #fff; }
.mono { font-family: "JetBrains Mono", monospace; font-weight: 600; }

/* Yapıştırma penceresi */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(2, 6, 23, .65); }
.dlg { width: min(760px, 100%); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.dlg h2 { margin: 0; font-size: 18px; }
.dlg p { margin: 0; font-size: 13px; line-height: 1.5; }
.dlg textarea { min-height: 260px; resize: vertical; font-family: "JetBrains Mono", monospace; font-size: 12px; white-space: pre; tab-size: 18; }
.dlg .row { display: flex; justify-content: flex-end; gap: 8px; }
#pasteInfo.bad { color: #fca5a5; }

#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { padding: 11px 14px; border-radius: 12px; font-size: 13px; font-weight: 500; background: #0f172a; border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0, 0, 0, .4); animation: in .2s ease; }
.toast.err { border-color: rgba(239, 68, 68, .5); color: #fecaca; }
.toast.ok { border-color: rgba(34, 197, 94, .45); }
@keyframes in { from { transform: translateY(8px); opacity: 0; } }

@media (max-width: 760px) {
  .top, main { padding-left: 16px; padding-right: 16px; }
  .hint { display: none; }
  #q { flex: 1; width: auto; }
}

/* Ziyaretçiler */
.save.live { color: var(--ok); background: rgba(34, 197, 94, .1); }
#visitsView { display: flex; flex-direction: column; gap: 12px; }
.vcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.vcard { padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 14px; background: var(--panel); }
.vcard span { display: block; color: var(--mute); font-size: 12px; font-weight: 600; }
.vcard b { font-size: 28px; font-variant-numeric: tabular-nums; }
.sheet.pad { padding: 14px 16px; }
.sheet.pad h3 { margin: 0 0 10px; font-size: 14px; }
.olist { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.ochip { padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(2, 6, 23, .4); }
