/* Rol bazlı görünürlük: app.js body'ye "no-perm-<yetki>" sınıfı ekler; data-perm="<yetki>" taşıyan öğeler
   (sonradan JS ile çizilenler dahil) gizlenir. */
.no-perm-campaigns [data-perm="campaigns"],
.no-perm-settings [data-perm="settings"],
.no-perm-import [data-perm="import"],
.no-perm-users [data-perm="users"],
.no-perm-teamReports [data-perm="teamReports"],
.no-perm-deleteRecords [data-perm="deleteRecords"] { display: none !important; }
/* Kişi / firma penceresindeki "Sil" düğmesi (yalnızca SuperUser) sola yaslanır. */
.record-delete { margin-right: auto; font-size: 12px; }
/* Ayarlar → Silinen kayıtlar (Gizli telefon hatları kartıyla aynı düzen) */
.dr-panel .panel-heading.padded { align-items: center; margin-bottom: 0; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.dr-panel .panel-heading h2 { margin-bottom: 6px; }
.dr-panel .panel-heading .muted { max-width: 620px; margin: 0; line-height: 1.55; }
.dr-panel .result-count { align-self: flex-start; padding: 4px 10px; border-radius: 999px; color: var(--purple); background: #f0efff; font-weight: 700; }
.dr-panel .result-count:empty { display: none; }
.dr-toolbar { padding: 14px 24px; border-bottom: 1px solid var(--line); }
.dr-toolbar .search-box { max-width: 360px; }
.dr-table { table-layout: fixed; width: 100%; }
.dr-table th, .dr-table td { padding-top: 13px; padding-bottom: 13px; vertical-align: middle; }
.dr-table th:first-child, .dr-table td:first-child { width: 92px; padding-left: 24px; }
.dr-table th:last-child, .dr-table td:last-child { width: 130px; padding-right: 24px; text-align: right; }
.dr-table .dr-who { width: 210px; }
.dr-table code { padding: 2px 6px; border-radius: 5px; color: #4d5165; background: #f4f5f8; font-size: 11px; }
.dr-table .dr-who span { display: block; overflow: hidden; text-overflow: ellipsis; color: #4d5165; white-space: nowrap; }
.dr-table .dr-who small { display: block; margin-top: 3px; color: #9a9dad; font-size: 11px; }
.dr-table .button { padding: 6px 11px; font-size: 12px; }
.dr-panel .empty-state { padding: 28px 24px; }

/* Kişi kartında "Toplantı planla" da solda: sil düğmesi onun yanında durur. */
.record-delete:has(+ .cd-schedule) { margin-right: 8px; }

/* Raporlar → Kullanıcı aktivitesi */
.ua-metrics { grid-template-columns: repeat(5,minmax(0,1fr)); }
.ua-table th.num, .ua-table td.num { text-align: right; }
.ua-table th.sortable { cursor: pointer; user-select: none; }
.ua-table th.sortable.sorted::after { content: ' ↓'; }
.ua-table th.sortable.sorted[data-dir="asc"]::after { content: ' ↑'; }
.ua-table td.num small { display: block; color: #9a9db0; font-size: 10px; font-weight: 500; }
.ua-table td.zero { color: #c3c5d1; }
.ua-table tfoot td { border-top: 2px solid #e7e8ef; font-weight: 700; color: #2c3044; }
.ua-user b { display: block; color: #2c3044; }
.ua-user small { color: #8b8fa3; }
.ua-tag { margin-left: 6px; padding: 1px 6px; border-radius: 10px; font-size: 10px; font-weight: 700; color: #6d7186; background: #f0f1f6; }
.ua-bar { height: 4px; margin-top: 6px; border-radius: 3px; background: #f0f1f6; max-width: 180px; }
.ua-bar i { display: block; height: 100%; border-radius: 3px; background: #7a6cf0; }
.ua-toggle { display: flex; align-items: center; gap: 6px; color: #6d7186; font-size: 12px; white-space: nowrap; }
.ua-notes { margin: 12px 4px 0; line-height: 1.5; }
@media (max-width: 1200px) { .ua-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 900px) { .ua-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } }
/* Salt okunur kampanya düzenleyicisi (Employee) */
.readonly-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; color: #55596c; background: #f3f2fb; font-size: 13px; }

/* Microsoft ile giriş */
.microsoft-button { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; color: #2c3044; font-size: 14px; }
.microsoft-button:hover { color: #2c3044; border-color: #8a8fa3; background: #f7f7fa; }
.ms-logo { display: grid; grid-template-columns: 9px 9px; gap: 2px; }
.ms-logo i { display: block; width: 9px; height: 9px; }
.ms-logo i:nth-child(1) { background: #f25022; }
.ms-logo i:nth-child(2) { background: #7fba00; }
.ms-logo i:nth-child(3) { background: #00a4ef; }
.ms-logo i:nth-child(4) { background: #ffb900; }
.login-card .form-error:empty { display: none; }
.login-card .form-error { margin: 0 0 12px; }

/* Üst menü */
.user-ident { display: flex; flex-direction: column; line-height: 1.2; }
.user-role { color: #9a9db0; font-size: 10px; font-weight: 600; }
.user-profile-link { display: flex; align-items: center; gap: 9px; padding: 3px 8px 3px 3px; border-radius: 20px; color: inherit; text-decoration: none; }
.user-profile-link:hover { background: #f3f2fb; color: inherit; }
.avatar { overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.has-photo { background: #f0f1f6; }
.avatar.small { width: 28px; height: 28px; font-size: 12px; }

/* Kullanıcılar sayfası */
.users-grid { margin-top: 18px; }
.user-cell-inner { display: flex; align-items: center; gap: 10px; }
.user-cell b { display: block; color: #2c3044; }
.user-cell small { display: block; color: #8b8fa3; }

/* Profil sayfası */
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.profile-photo { display: grid; place-items: center; width: 88px; height: 88px; flex: none; overflow: hidden; border-radius: 50%;
  color: #6253d1; background: #e9e6ff; font-size: 34px; font-weight: 700; box-shadow: 0 0 0 4px #fff, 0 0 0 5px #e7e8ef; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-ident h2 { margin: 0 0 2px; }
.profile-ident .status-pill { margin-top: 8px; display: inline-block; }
.profile-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; }
.profile-facts dt { color: #8b8fa3; }
.profile-facts dd { margin: 0; color: #2c3044; }
#profilePhotoInfo.error, .error-text { color: #a23b48; }
.user-you { margin-left: 6px; padding: 2px 6px; border-radius: 10px; color: #6253d1; background: #efedff; font-size: 10px; font-weight: 700; }
.user-role-select { min-width: 190px; }
.user-status { display: inline-block; padding: 3px 9px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.user-status.active { color: #24966a; background: #eaf8f1; }
.user-status.invited { color: #9a6a00; background: #fff5dc; }
.user-status.disabled { color: #a23b48; background: #fdecee; }
.user-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.status-pill.warning { color: #9a6a00; background: #fff5dc; }
.status-pill.danger { color: #a23b48; background: #fdecee; }
#graphPermissionInfo { margin: 6px 0 4px; }
#graphPermissionInfo code { font-size: 11px; }
