/* =========================================================
   BC Social — Stil dosyası
   1. Temel  2. Yerleşim  3. Butonlar & formlar  4. Kartlar
   5. Takvim  6. Firmalar & ekip  7. Pencere  8. Duyarlı tasarım
   ========================================================= */

/* ---------- 1. Temel ---------- */
:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e7e9f2;
  --accent: #5b50f0;
  --accent-soft: #eeedfe;
  --sidebar: #12122b;
  --sidebar-2: #1e1e40;
  --good: #059669;
  --warn: #d97706;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .05);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 8px; }

/* ---------- 2. Yerleşim ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--sidebar);
  color: #fff;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #7c6cff, #e05ab5);
  font-weight: 700; letter-spacing: .02em;
}
.brand strong { display: block; font-size: 16px; }
.brand small { color: #a5a7c9; }

.viewer { display: grid; gap: 6px; padding: 0 6px; }
.viewer span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #8f92b8; font-weight: 600; }
.viewer select {
  background: var(--sidebar-2); color: #fff; border-color: #2e2e5a;
}

#nav { display: grid; gap: 4px; }
#nav button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: transparent; color: #c9cbe6;
  border: 0; border-radius: 10px;
  padding: 10px 12px; font: inherit; font-weight: 500;
  cursor: pointer;
}
#nav button:hover { background: var(--sidebar-2); color: #fff; }
#nav button.active { background: var(--accent); color: #fff; }

/* Personel not defteri */
.notepad { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px 6px 0; border-top: 1px solid #26264d; }
.notepad-head { display: flex; justify-content: space-between; align-items: center; }
.notepad-head h3 { font-size: 14px; }
.notepad-add { border: 0; background: var(--accent); color: #fff; font: inherit; font-size: 12px; font-weight: 600; border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.notepad-list { flex: 1; min-height: 0; overflow-y: auto; display: grid; gap: 8px; align-content: start; padding-right: 2px; }
.note-card { background: #fef9c3; border-radius: 10px; padding: 8px; color: #3f3a1a; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.note-card textarea {
  background: transparent; border: 0; padding: 2px; color: inherit;
  font-size: 13px; line-height: 1.45; resize: vertical; min-height: 58px;
}
.note-card textarea:focus { box-shadow: none; }
.note-foot { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #857b3c; }
.note-foot button { border: 0; background: none; color: #a15c07; font: inherit; font-weight: 600; cursor: pointer; padding: 2px 4px; }
.note-foot button:hover { color: var(--danger); }
.notepad-empty { font-size: 12px; color: #8f92b8; line-height: 1.5; }
.notepad:not(.hidden) ~ .sidebar-note { margin-top: 0; }

.backup { margin-top: auto; padding: 14px 6px 0; border-top: 1px solid #26264d; }
.backup h3 { margin: 0 0 8px; font-size: 11px; font-weight: 600; color: #8f92b8; text-transform: uppercase; letter-spacing: .06em; }
.backup-actions { display: flex; gap: 6px; }
.backup-actions .btn { flex: 1; }
.backup-actions .btn:disabled { opacity: .6; cursor: progress; }
.backup-check { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: #a5a7c9; }
.backup-check input { width: auto; margin: 0; }
.sidebar-note { font-size: 11px; color: #6d7099; padding: 0 6px; }
.backup:not(.hidden) + .sidebar-note { margin-top: 0; }
.backup.hidden + .sidebar-note { margin-top: auto; }

main { flex: 1; min-width: 0; padding: 28px 32px 48px; max-width: 1360px; margin: 0 auto; }

.page-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 22px;
}
.page-head h1 { font-size: 26px; font-weight: 700; }
.page-head p { margin-top: 2px; }

/* ---------- 3. Butonlar & formlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--accent);
  background: var(--accent); color: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  font: inherit; font-weight: 600;
  cursor: pointer;
  transition: filter .15s, background .15s;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 9px; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.ghost-dark { background: transparent; color: #fff; border-color: #3a3a6a; }
.btn.good { background: var(--good); border-color: var(--good); }
.btn.danger { background: #fff; color: var(--danger); border-color: #f6c9c9; }
.btn.danger:hover { background: #fef2f2; filter: none; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 20px; line-height: 1; color: var(--text);
  cursor: pointer; display: grid; place-items: center;
}
.icon-btn:hover { background: var(--surface-2); }

input, select, textarea {
  width: 100%;
  font: inherit; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.sm { width: auto; padding: 7px 10px; font-size: 13px; }
textarea { resize: vertical; }
input[type=file] { padding: 8px; background: var(--surface-2); }

.form { display: grid; gap: 14px; }
.form label, .field-label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: #334155; }
.form label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.form label.check input { width: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin: 0; display: grid; gap: 12px; }
legend { padding: 0 6px; font-weight: 700; font-size: 13px; color: var(--accent); }

.svc-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.form .svc-option {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 6px 6px 6px 10px; font-weight: 500; cursor: pointer;
}
.svc-option.on { border-color: var(--accent); background: var(--accent-soft); }
.svc-option input[type=checkbox] { width: auto; }
.svc-option span { flex: 1; }
.svc-option input[type=number] { width: 70px; padding: 6px 8px; }
.svc-option input[type=number]:disabled { background: transparent; border-color: transparent; }

/* Yetki anahtarları */
.perm-list { display: grid; gap: 8px; }
.form label.perm {
  position: relative; display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-weight: 500;
}
.form label.perm:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.perm input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { flex-shrink: 0; width: 36px; height: 20px; border-radius: 99px; background: #cbd5e1; position: relative; transition: background .15s; margin-top: 2px; }
.switch-ui::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.perm input:checked + .switch-ui { background: var(--accent); }
.perm input:checked + .switch-ui::after { transform: translateX(16px); }
.perm input:focus-visible + .switch-ui { box-shadow: 0 0 0 3px var(--accent-soft); }
.perm-text { display: grid; gap: 2px; }
.perm-text strong { font-size: 13px; color: var(--text); }
.perm-text span { font-size: 12px; color: var(--muted); font-weight: 400; }

.perm-chips { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.perm-chips span { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: #ecfdf5; color: #047857; }
.perm-chips span.none { background: var(--surface-2); color: var(--muted); }

.locked-field { display: grid; gap: 6px; }
.locked-value { display: flex; align-items: center; gap: 8px; border: 1px dashed var(--border); border-radius: 10px; padding: 8px 12px; background: var(--surface-2); font-weight: 600; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--c); cursor: pointer; }
.swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.swatch:has(input:checked) { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c); }

/* ---------- 4. Kartlar ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 18px;
}
.card-title { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.count { background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 1px 9px; font-size: 13px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
  display: grid; gap: 2px;
}
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat strong { font-size: 24px; font-weight: 700; }
.stat-hint { font-size: 12px; color: var(--muted); }
.stat.danger strong { color: var(--danger); }
.stat.warn strong { color: var(--warn); }

.notice { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.notice.danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); display: grid; gap: 14px; justify-items: center; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 99px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-todo   { background: #f1f5f9; color: #475569; }
.s-doing  { background: #e0f2fe; color: #0369a1; }
.s-review { background: #fef3c7; color: #b45309; }
.s-revise { background: #fee2e2; color: #b91c1c; }
.s-done   { background: #d1fae5; color: #047857; }

.pill { background: var(--accent); color: #fff; border-radius: 99px; padding: 1px 8px; font-size: 11px; font-weight: 600; vertical-align: middle; }

.avatar {
  --c: #94a3b8;
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-grid; place-items: center; flex-shrink: 0;
  background: var(--c); color: #fff;
  font-size: 12px; font-weight: 700;
}
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.xs { width: 18px; height: 18px; font-size: 8px; box-shadow: 0 0 0 2px #fff; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.avatar.empty { background: #e2e8f0; color: #64748b; }

/* Görev satırı (listeler) */
.task-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--s-bg, var(--surface)); border: 1px solid var(--s-border, var(--border)); border-radius: 11px;
  padding: 10px 12px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  transition: filter .15s, box-shadow .15s;
}
.task-row:hover { filter: brightness(.98) saturate(1.1); box-shadow: var(--shadow); }
.task-row.late { outline: 2px dashed var(--danger); outline-offset: -2px; }
.task-bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--s, #94a3b8); flex-shrink: 0; }
.task-row .badge { background: #fff; }
.task-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.task-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-main .muted { font-size: 12px; }
.task-side { display: flex; align-items: center; gap: 8px; }
.late-text { color: var(--danger); }

/* ---------- 5. Takvim ---------- */
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav h2 { font-size: 18px; min-width: 150px; text-align: center; }
.cal-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.segmented button { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); padding: 5px 12px; border-radius: 7px; cursor: pointer; }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }

.calendar { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.day {
  min-height: 118px; padding: 6px;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.cal-grid .day:nth-child(7n) { border-right: 0; }
.day.out { background: var(--surface-2); }
.day.addable { cursor: pointer; }
.day.addable:hover { background: #fafaff; }
.day-head { display: flex; justify-content: space-between; align-items: center; }
.day-num { font-size: 12px; font-weight: 600; color: #475569; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.day.today .day-num { background: var(--accent); color: #fff; }
.day-add {
  opacity: 0; width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center; font-weight: 700;
  color: var(--accent); background: var(--accent-soft); transition: opacity .15s;
}
.day.addable:hover .day-add { opacity: 1; }
.day-tasks { display: grid; gap: 4px; }

/* Durum renkleri: her durum için koyu (--s) ve açık (--s-bg) ton.
   Görev kutusunun tamamı bu renkle boyanır. */
.st-todo   { --s: #64748b; --s-bg: #eef1f5; --s-border: #d5dbe4; }
.st-doing  { --s: #0284c7; --s-bg: #e0f2fe; --s-border: #9fd6f5; }
.st-review { --s: #d97706; --s-bg: #fef3c7; --s-border: #f8d77a; }
.st-revise { --s: #dc2626; --s-bg: #fee2e2; --s-border: #f8b4b4; }
.st-done   { --s: #059669; --s-bg: #d1fae5; --s-border: #92e3c0; }

.chip {
  display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0;
  text-align: left; font: inherit; color: var(--text); cursor: pointer;
  background: var(--s-bg); border: 1px solid var(--s-border); border-left: 4px solid var(--s);
  border-radius: 7px; padding: 4px 6px;
  transition: filter .15s, transform .1s;
}
.chip:hover { filter: brightness(.97) saturate(1.1); }
.chip:active { transform: scale(.98); }
.chip-body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.chip-title { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-meta { font-size: 11px; color: color-mix(in srgb, var(--s) 70%, #334155); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.st-done .chip-title { text-decoration: line-through; opacity: .75; }
.chip.late { outline: 2px dashed var(--danger); outline-offset: -2px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-item i { width: 14px; height: 14px; border-radius: 4px; background: var(--s-bg); border: 1px solid var(--s-border); border-left: 3px solid var(--s); }
.legend-item.late-key i { background: #fff; border: 2px dashed var(--danger); }
.more { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--accent); text-align: left; padding: 2px 4px; cursor: pointer; }

.day-groups { display: grid; gap: 16px; }
.day-group header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.day-group h3 { font-size: 14px; }
.day-group { display: grid; gap: 6px; }
.day-group.today h3 { color: var(--accent); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.split .card { margin-bottom: 0; }
.side-list h3 { font-size: 15px; margin-bottom: 12px; }
.side-item { display: grid; gap: 4px; margin-bottom: 10px; }
.side-date { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.side-list .task-side .badge { display: none; }

/* Müşteri onay kartları */
.approve-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.approve-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: grid; background: var(--surface); }
.approve-card .media { border-radius: 0; max-height: 260px; }
.approve-body { padding: 12px; display: grid; gap: 6px; }

/* Instagram önizlemesi */
.social-block { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.detail .social-block:not(:has(.caption-editor)) { grid-template-columns: 1fr; justify-items: center; }
.caption-editor { display: grid; gap: 6px; }
.caption-editor label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: #334155; }
.caption-editor textarea { min-height: 180px; line-height: 1.5; }
.caption-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.ig {
  width: 100%; max-width: 320px;
  background: #fff; border: 1px solid #dbdbdb; border-radius: 12px; overflow: hidden;
  font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; font-size: 13px; color: #262626;
}
.ig-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.ig-head strong { font-size: 13px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-avatar { width: 32px; height: 32px; border-radius: 50%; padding: 2px; background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7); flex-shrink: 0; }
.ig-avatar span { width: 100%; height: 100%; border-radius: 50%; border: 2px solid #fff; background: #efefef; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #555; }
.ig-kind { font-size: 11px; color: #8e8e8e; }
.ig-media { background: #000; display: grid; place-items: center; overflow: hidden; }
.ig-media.square { aspect-ratio: 4 / 5; }
.ig-media.tall { aspect-ratio: 9 / 14; }
.ig-media img, .ig-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-media:has(.ig-placeholder) { background: #f4f4f5; }
.ig-placeholder { display: grid; gap: 6px; place-items: center; color: #a8a8a8; font-size: 12px; text-align: center; padding: 20px; }
.ig-placeholder span { font-size: 30px; }
.ig-actions { display: flex; gap: 14px; padding: 10px 12px 4px; }
.ig-actions svg { width: 23px; height: 23px; fill: none; stroke: #262626; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.ig-spacer { flex: 1; }
.ig-caption { padding: 4px 12px 14px; white-space: pre-wrap; word-break: break-word; line-height: 1.4; max-height: 220px; overflow-y: auto; }
.ig-caption strong { font-weight: 600; }
.ig-tag { color: #00376b; }
.ig-empty { color: #a8a8a8; font-style: italic; }
.approve-card .ig { max-width: none; border: 0; border-radius: 0; border-bottom: 1px solid var(--border); }

.media { width: 100%; max-height: 360px; object-fit: contain; background: #0f172a; border-radius: 10px; display: block; }

/* ---------- 6. Firmalar & ekip ---------- */
.firm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.firm-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; display: grid; gap: 10px; align-content: start;
}
.firm-card.inactive { opacity: .65; }
.firm-card header { display: flex; align-items: center; gap: 12px; }
.firm-logo {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
}
.firm-name { flex: 1; min-width: 0; display: grid; }
.firm-name h3 { font-size: 16px; }
.firm-name .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.firm-fee strong { font-size: 22px; }
.firm-fee span { color: var(--muted); margin-left: 4px; }
.firm-services { display: flex; flex-wrap: wrap; gap: 6px; }
.svc { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 3px 8px; font-size: 12px; }
.svc b { color: var(--accent); margin-left: 2px; }
.svc.full { background: #ecfdf5; border-color: #a7f3d0; }
.svc.full b { color: var(--good); }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress div { height: 100%; background: linear-gradient(90deg, var(--accent), #8b7dff); border-radius: 99px; }
.firm-card footer, .person-card footer { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.person-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 18px 18px;
  display: grid; justify-items: center; gap: 6px; text-align: center;
}
.person-card h3 { font-size: 16px; margin-top: 6px; }
.role { font-size: 12px; color: var(--accent); background: var(--accent-soft); padding: 2px 10px; border-radius: 99px; font-weight: 600; }
.person-stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; margin: 10px 0 4px; border-top: 1px solid var(--border); padding-top: 12px; }
.person-stats div { display: grid; }
.person-stats strong { font-size: 18px; }
.person-stats span { font-size: 11px; color: var(--muted); }
.person-stats .danger strong { color: var(--danger); }
.person-card footer { justify-content: center; }

/* ---------- 7. Pencere ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px;
  overflow-y: auto;
}
.panel {
  width: min(560px, 100%);
  background: var(--surface); border-radius: 18px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .25);
  padding: 22px;
  animation: pop .16s ease-out;
}
.panel.wide { width: min(760px, 100%); }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.modal-head h2 { font-size: 19px; }
.modal-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }

.detail { display: grid; gap: 14px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; color: #334155; }
.detail-meta .who { display: inline-flex; align-items: center; gap: 6px; }
.detail-desc { white-space: pre-wrap; background: var(--surface-2); border-radius: 10px; padding: 12px; }
.upload { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }

.notes { display: grid; gap: 8px; }
.notes h4 { font-size: 13px; }
.note { border-left: 3px solid #fca5a5; background: #fef2f2; border-radius: 0 8px 8px 0; padding: 8px 10px; }
.note p { margin-top: 2px; white-space: pre-wrap; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #0f172a; color: #fff; border-radius: 10px;
  padding: 10px 16px; font-weight: 600; font-size: 13px;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 8. Duyarlı tasarım ---------- */
@media (max-width: 1280px) {
  .split { grid-template-columns: 1fr; }
  .split .side-list { order: -1; }
}

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar {
    width: auto; height: auto; position: static;
    padding: 14px 16px; gap: 12px;
  }
  .brand { padding: 0; }
  .viewer { padding: 0; }
  #nav { display: flex; gap: 6px; overflow-x: auto; }
  #nav button { width: auto; white-space: nowrap; }
  .backup { margin-top: 0; padding: 12px 0 0; }
  .notepad { padding: 12px 0 0; flex: none; }
  .notepad-list { max-height: 260px; }
  .sidebar-note { display: none; }
  main { padding: 18px 16px 40px; }
}

@media (max-width: 760px) {
  .page-head { flex-wrap: wrap; }
  .page-head h1 { font-size: 22px; }
  .page-head .btn { width: 100%; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .social-block { grid-template-columns: 1fr; justify-items: center; }
  .caption-editor { width: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cal-toolbar { flex-direction: column; align-items: stretch; }
  .cal-nav { justify-content: space-between; }
  .cal-nav h2 { min-width: 0; }
  .day { min-height: 74px; padding: 3px; }
  .chip-meta { display: none; }
  .card { padding: 14px; }
  .modal { padding: 0; place-items: end stretch; }
  .panel, .panel.wide { width: 100%; border-radius: 18px 18px 0 0; max-height: 92vh; overflow-y: auto; }
  .task-side .badge { display: none; }
}

/* ---------- 9. Giriş ekranı ve hesap ---------- */
.auth {
  position: fixed; inset: 0; z-index: 80;
  display: none; place-items: center; padding: 20px;
  background: radial-gradient(1200px 600px at 10% -10%, #2a2470 0%, transparent 60%),
              radial-gradient(900px 500px at 110% 110%, #5b1f5b 0%, transparent 60%),
              var(--sidebar);
}
body.booting .auth, body.signed-out .auth { display: grid; }
body.booting .app, body.signed-out .app { display: none; }
.auth-card {
  width: min(400px, 100%); background: var(--surface); border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35); padding: 28px;
  display: grid; gap: 20px;
}
.auth-brand strong { color: var(--text); }
.auth-brand small { color: var(--muted); }
.auth-card h1 { font-size: 22px; }
.auth-card .btn[type=submit] { width: 100%; padding: 12px; }
.auth-loading { color: var(--muted); text-align: center; padding: 20px 0; }
.auth-error { color: var(--danger); background: #fef2f2; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.auth-hint { text-align: center; }
#noAccess { display: grid; gap: 12px; }
#noAccess.hidden { display: none; }

/* Kenar çubuğunun altı: giriş yapan kişi */
.me { border-top: 1px solid #26264d; padding: 12px 6px 0; display: grid; gap: 8px; }
.me { margin-top: auto; }
.backup:not(.hidden) ~ .me, .notepad:not(.hidden) ~ .backup ~ .me { margin-top: 0; }
.me-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me-text { display: grid; min-width: 0; }
.me-text strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text span { font-size: 11px; color: #8f92b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-actions { display: flex; gap: 6px; }
.me-actions button {
  flex: 1; border: 1px solid #2e2e5a; background: transparent; color: #c9cbe6;
  font: inherit; font-size: 12px; border-radius: 8px; padding: 6px 8px; cursor: pointer;
}
.me-actions button:hover { background: var(--sidebar-2); color: #fff; }
.avatar.admin { background: linear-gradient(135deg, #7c6cff, #e05ab5); }

/* Kaydediliyor göstergesi */
.sync-dot {
  position: fixed; top: 14px; right: 16px; z-index: 70;
  width: 10px; height: 10px; border-radius: 50%; background: var(--warn);
  opacity: 0; transition: opacity .2s; pointer-events: none;
  animation: pulse 1s ease-in-out infinite;
}
body.syncing .sync-dot { opacity: 1; }
@keyframes pulse { 50% { transform: scale(.6); } }

/* Eski veriyi buluta aktarma bildirimi */
#localDataBanner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--accent-soft); border-color: #cfcaff; color: var(--text); }
#localDataBanner.hidden { display: none; }
.banner-text { display: grid; gap: 2px; }
.banner-text span { font-size: 13px; color: var(--muted); }

/* Personel hesabı */
.account-box.highlight { border-color: var(--accent); background: #fbfaff; }
.acc-status { font-size: 13px; color: var(--muted); }
.acc-status.ok { color: var(--good); }
.acc-status.ok strong { color: var(--text); }
.pass-row { display: flex; gap: 6px; }
.pass-row input { flex: 1; }
.acc-actions { justify-content: flex-end; }
.acc-line { font-size: 12px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-line.ok { color: var(--good); }
.credentials {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; font-size: 13px; font-family: ui-monospace, Consolas, monospace;
}
label.loading { opacity: .6; pointer-events: none; }
label.loading::after { content: ' — yükleniyor…'; font-weight: 400; color: var(--muted); }

@media (max-width: 900px) {
  .me { padding: 12px 0 0; }
}
