/* ═══════════════════════════════════════════
   AesirStaffSystem — main.css
   Notion-Dark Tema · Tüm bileşenler
   ═══════════════════════════════════════════ */

:root {
  --bg-dark:      #0A0A0A;
  --bg-card:      #111111;
  --bg-card-2:    #161616;
  --bg-hover:     #1C1C1C;
  --border:       #1E1E1E;
  --border-mid:   #2A2A2A;
  --accent:       #D35400;
  --accent-hover: #b84a00;
  --text-1:       #E8E8E8;
  --text-2:       #888888;
  --text-3:       #444444;
  --danger:       #C0392B;
  --accent-dim:   #1a0d02;
  --sidebar-w:    220px;
  --radius:       10px;
  --radius-sm:    6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
button { font-family: inherit; }

body {
  background: var(--bg-dark);
  color: var(--text-1);
  font-family: -apple-system, 'Inter', 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  writing-mode: horizontal-tb;
  overflow-x: hidden;
}

/* ── Scroll Progress Bar ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, #e67e22 100%);
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(211, 84, 0, 0.5);
}

/* ── Layout ── */
.layout-body     { display: flex; min-height: 100vh; }
.main-content    { flex: 1; margin-left: var(--sidebar-w); padding: 2rem 2.5rem; width: calc(100% - var(--sidebar-w)); box-sizing: border-box; }
.main-content--chat { padding: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ── Sidebar ── */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: #0D0D0D;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  z-index: 100;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
}
.logo-icon  { width: 28px; height: 28px; flex-shrink: 0; }
.logo-text  { font-size: 16px; font-weight: 600; color: var(--text-1); letter-spacing: 0.04em; }
.sidebar-section { padding: 14px 8px 4px; }
.sidebar-label   { font-size: 10px; color: var(--text-3); letter-spacing: 0.1em; text-transform: uppercase; padding: 0 8px; display: block; margin-bottom: 4px; }
.sidebar-link {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); text-decoration: none; font-size: 13.5px;
  transition: background 0.12s, color 0.12s;
}
.sidebar-link svg { flex-shrink: 0; opacity: 0.7; }
.sidebar-link:hover           { background: var(--bg-hover); color: var(--text-1); }
.sidebar-link.active          { background: var(--bg-hover); color: var(--text-1); }
.sidebar-link.active svg      { opacity: 1; }
.sidebar-link--danger         { color: #7a3030; }
.sidebar-link--danger:hover   { color: #c0392b; background: #1a0808; }

.sidebar-badge {
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: auto;
  line-height: 1.6;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(231,76,60,0.45);
  flex-shrink: 0;
  animation: sidebarBadgeIn 0.25s ease;
}
@keyframes sidebarBadgeIn {
  from { transform: scale(0.4); opacity: 0; }
  70%  { transform: scale(1.2); }
  to   { transform: scale(1);   opacity: 1; }
}
.sidebar-badge.badge-mention {
  background: #8e44ad;
  box-shadow: 0 1px 4px rgba(142,68,173,0.45);
}
/* Discord tarzı yeni mesaj nokta göstergesi */
.channel-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, #D35400);
  flex-shrink: 0;
  margin-left: 4px;
  transition: transform 0.2s ease;
  box-shadow: 0 0 4px rgba(211,84,0,0.6);
}

/* ── Mention highlight — Discord tarzı ── */
.msg-wrap.mention-highlight {
  position: relative;
  background: rgba(250, 166, 26, 0.05);
  border-radius: 4px;
  margin-left: -8px;
  margin-right: -8px;
  padding-left: 8px;
  padding-right: 8px;
  transition: background 0.2s;
}
.msg-wrap.mention-highlight:hover {
  background: rgba(250, 166, 26, 0.08);
}
.mention-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #FAA61A;
  border-radius: 3px 0 0 3px;
}
/* @mention token stili */
.mention-tag {
  display: inline;
  background: rgba(88, 101, 242, 0.15);
  color: #7289da;
  border-radius: 4px;
  padding: 0 3px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mention-tag:hover {
  background: rgba(88, 101, 242, 0.35);
  color: #a0b0ff;
}
/* Beni etiketleyen mention — daha belirgin */
.mention-tag--me {
  background: rgba(250, 166, 26, 0.2);
  color: #FAA61A;
}
.mention-tag--me:hover {
  background: rgba(250, 166, 26, 0.35);
  color: #ffc04d;
}

/* Mention çan ikonu */
.mention-bell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 4px;
  color: #8E44AD;
  filter: drop-shadow(0 0 3px rgba(142,68,173,0.7));
  transition: transform 0.2s ease, filter 0.2s ease;
}
.mention-bell:hover {
  filter: drop-shadow(0 0 5px rgba(142,68,173,0.9));
}
@keyframes bellRing {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(18deg); }
  30%  { transform: rotate(-16deg); }
  45%  { transform: rotate(12deg); }
  60%  { transform: rotate(-8deg); }
  75%  { transform: rotate(4deg); }
  100% { transform: rotate(0deg); }
}
.mention-bell-ring {
  animation: bellRing 0.6s ease;
}

.sidebar-user {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user-avatar  { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; }
.sidebar-user-initial {
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--bg-hover);
  color: var(--text-2); font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-user-info    { flex: 1; min-width: 0; }
.sidebar-user-name    { display: block; font-size: 13px; font-weight: 500; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-rank    { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Page Header ── */
.page-header  { display: flex; align-items: baseline; gap: 12px; margin-bottom: 1.75rem; flex-wrap: wrap; }
.page-title   { font-size: 22px; font-weight: 600; color: var(--text-1); }
.page-sub     { color: var(--text-3); font-size: 13px; }

/* ── Buttons ── */
.btn-primary {
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 8px 18px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: background 0.15s, transform 0.1s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover  { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.97); }

.btn-sm     { padding: 5px 12px; font-size: 12px; border-radius: var(--radius-sm); cursor: pointer; border: none; transition: all 0.12s; }
.btn-ghost  { background: transparent; color: var(--text-2); border: 1px solid var(--border-mid); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-1); }
.btn-danger-ghost { background: transparent; color: #7a3030; border: 1px solid #2a1010; }
.btn-danger-ghost:hover { background: #1a0808; color: #e05555; }
.btn-icon   { background: none; border: none; cursor: pointer; color: var(--text-3); padding: 4px; border-radius: 4px; display: flex; align-items: center; transition: color 0.12s; }
.btn-icon:hover { color: var(--text-1); }

.btn-emergency {
  background: transparent; color: var(--danger);
  border: 1px solid #3a1010; border-radius: var(--radius-sm);
  padding: 8px 18px; font-size: 13px; font-weight: 500; cursor: pointer;
  white-space: nowrap; transition: background 0.15s;
}
.btn-emergency:hover { background: #1a0808; }

/* ── Forms ── */
.form-group  { margin-bottom: 1rem; }
.form-label  { display: block; font-size: 11px; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 5px; }
.form-input  {
  width: 100%; background: #0D0D0D; border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-1);
  font-size: 13.5px; padding: 8px 12px; outline: none;
  transition: border-color 0.15s; font-family: inherit;
}
.form-input:focus     { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-3); }
textarea.form-input   { resize: vertical; min-height: 80px; }

/* ── File Dropzone ── */
.file-dropzone {
  position: relative;
  width: 100%;
  border: 1.5px dashed var(--border-mid);
  border-radius: var(--radius-sm);
  background: var(--bg-card-2);
  padding: 24px 16px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}
.file-dropzone:hover {
  border-color: var(--accent);
  background: rgba(211, 84, 0, 0.03);
}
.file-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.file-dropzone-icon {
  color: var(--accent);
  opacity: 0.8;
  margin-bottom: 8px;
}
.file-dropzone-text {
  font-size: 13.5px;
  color: var(--text-1);
  font-weight: 500;
  margin-bottom: 4px;
}
.file-dropzone-sub {
  font-size: 12px;
  color: var(--text-3);
}
.file-dropzone-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.file-dropzone-item {
  font-size: 12px;
  color: var(--text-2);
  background: var(--bg-hover);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Custom File Button ── */
.btn-file {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--bg-hover);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.12s ease;
}
.btn-file:hover {
  background: var(--bg-card-2);
  border-color: var(--accent);
  color: var(--text-1);
}
.btn-file input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* ── Attached File Badge ── */
.attached-file-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(211, 84, 0, 0.1);
  border: 1px solid rgba(211, 84, 0, 0.25);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  animation: badgeIn 0.2s ease;
}
@keyframes badgeIn { from { opacity:0; transform:scale(0.95); } to { opacity:1; transform:scale(1); } }

.btn-remove-file {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.12s;
}
.btn-remove-file:hover { opacity: 1; }

/* ── Stats Grid ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 2rem; }
.stat-card  { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.stat-label { display: block; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 6px; }
.stat-value { display: block; font-size: 28px; font-weight: 600; color: var(--text-1); }

/* ── Quick Stats Widgets ── */
.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 2rem;
}
.quick-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
  cursor: default;
}
.quick-stat-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.qsc-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.qsc-content {
  flex: 1;
  min-width: 0;
}
.qsc-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.qsc-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1;
  margin-bottom: 4px;
}
.qsc-sub {
  font-size: 12px;
  color: var(--text-3);
}

/* ── Activity Feed ── */
.activity-feed-section {
  grid-column: 1 / -1;
}
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}
.activity-feed::-webkit-scrollbar {
  width: 5px;
}
.activity-feed::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: 3px;
}
.activity-feed::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.activity-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-mid);
}
.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.activity-content {
  flex: 1;
  min-width: 0;
}
.activity-actor {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 2px;
}
.activity-action {
  font-size: 12px;
  color: var(--text-2);
  font-family: monospace;
}
.activity-time {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
}
.activity-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--text-3);
  font-size: 13px;
}
.activity-load-more {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.activity-load-more:hover {
  background: var(--bg-hover);
  color: var(--text-1);
  border-color: var(--accent);
}

/* ── Dashboard grid ── */
.dashboard-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 2rem; }
.dash-section    { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.section-header  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.section-title   { font-size: 13px; font-weight: 500; color: var(--text-1); }
.section-link    { font-size: 12px; color: var(--accent); text-decoration: none; }
.section-link:hover { text-decoration: underline; }
.log-empty       { color: var(--text-3); font-size: 13px; text-align: center; padding: 1.5rem 0; }

/* ── Log item ── */
.log-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.log-item:last-child { border: none; }
.log-item-action { color: var(--text-2); }
.log-item-actor  { color: var(--accent); }
.log-item-time   { color: var(--text-3); margin-left: auto; white-space: nowrap; }

/* ── Emergency Bar ── */
.emergency-bar { background: #0f0808; border: 1px solid #2a1010; border-radius: var(--radius); padding: 1.25rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }

/* ── Staff Grid ── */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.staff-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; cursor: pointer; transition: border-color 0.12s, background 0.12s;
  position: relative;
}
.staff-card:hover    { border-color: var(--border-mid); background: var(--bg-card-2); }
.staff-avatar-wrap   { margin-bottom: 10px; }
.staff-avatar        { width: 48px; height: 48px; border-radius: 8px; image-rendering: pixelated; }
.staff-avatar-initial { width: 48px; height: 48px; border-radius: 8px; background: var(--bg-hover); color: var(--text-2); font-size: 20px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.staff-name          { font-size: 14px; font-weight: 500; color: var(--text-1); margin-bottom: 4px; }
.staff-rank-badge    { display: inline-block; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 4px; border: 1px solid; margin-bottom: 4px; }
.staff-username      { font-size: 12px; color: var(--text-3); }
.staff-card-id       { position: absolute; top: 10px; right: 10px; font-size: 10px; color: var(--text-3); font-family: monospace; }

/* ── Nexus Drawer — temel stiller (staff-table.css'de genişletildi) ── */
.nexus-loading { color: var(--text-3); font-size: 13px; text-align: center; padding: 2rem; }
.nexus-props   { display: flex; flex-direction: column; }
.nexus-prop    { display: flex; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--border); gap: 12px; }
.nexus-prop:last-child { border: none; }
.nexus-prop-key { font-size: 11px; color: var(--text-3); width: 90px; flex-shrink: 0; }
.nexus-prop-val { font-size: 12.5px; color: var(--text-2); font-family: monospace; word-break: break-all; }

/* Nexus içeriği */
.nexus-profile-top   { display: flex; align-items: center; gap: 14px; margin-bottom: 1.5rem; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.nexus-display-name  { font-size: 17px; font-weight: 700; color: var(--text-1); margin-bottom: 3px; }
.nexus-rank-label    { font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.nexus-username      { font-size: 12px; color: var(--text-3); font-family: monospace; }
.nexus-counter       { background: var(--bg-card-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 18px; font-size: 13px; color: var(--text-2); }
.nexus-counter strong { color: var(--accent); }
.nexus-section-title { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; padding-bottom: 5px; border-bottom: 1px solid var(--border); }

/* Timeline */
.timeline { position: relative; padding-left: 18px; margin-bottom: 20px; }
.timeline::before { content:''; position:absolute; left:5px; top:6px; bottom:0; width:1px; background:var(--border); }
.timeline-item { position: relative; padding: 6px 0; }
.timeline-item::before { content:''; position:absolute; left:-15px; top:11px; width:7px; height:7px; border-radius:50%; background:var(--accent); border:1px solid #111; }
.timeline-rank { font-size: 13px; font-weight: 500; color: var(--text-1); }
.timeline-meta { font-size: 11.5px; color: var(--text-3); }

/* Notes */
.nexus-note { background: var(--bg-card-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; }
.nexus-note-author { font-size: 11px; color: var(--text-3); margin-bottom: 5px; }
.nexus-note-text   { font-size: 13px; color: var(--text-2); line-height: 1.5; }

/* ── Rooms List ── */
.rooms-list { display: flex; flex-direction: column; gap: 8px; }
.room-card  {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.25rem; display: flex; align-items: center; justify-content: space-between;
  text-decoration: none; transition: border-color 0.12s, background 0.12s;
}
.room-card:hover       { border-color: var(--border-mid); background: var(--bg-card-2); }
.room-card-left        { display: flex; align-items: center; gap: 12px; }
.room-title            { font-size: 14px; font-weight: 500; color: var(--text-1); }
.room-desc             { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.room-card-right       { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.room-msg-count        { font-size: 12px; color: var(--text-3); }
.room-id-badge         { font-size: 10px; color: var(--text-3); font-family: monospace; }
.room-status-dot       { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.active, .room-status-dot.status-open   { background: #27AE60; }
.status-dot.inactive, .room-status-dot.status-closed { background: var(--text-3); }

/* ── Kanal aksiyon butonları (hover'da görünür) ── */
.room-card-actions {
  display: flex; align-items: center; gap: 2px;
  opacity: 0; pointer-events: none;
  transition: opacity .15s;
  margin-left: 8px;
}
.room-card:hover .room-card-actions {
  opacity: 1; pointer-events: auto;
}
.room-action-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 7px;
  border: none; outline: none;
  background: #111111 !important;
  color: rgba(255,255,255,.28);
  cursor: pointer; transition: background .12s, color .12s;
  flex-shrink: 0; -webkit-appearance: none; appearance: none;
}
.room-card:hover .room-action-btn { background: #161616 !important; }
.room-action-btn:hover            { background: rgba(255,255,255,.06) !important; color: rgba(255,255,255,.55); }
.room-action-btn--settings:hover  { background: rgba(211,84,0,.15)    !important; color: var(--accent); }
.room-action-btn--danger:hover    { background: rgba(231,76,60,.15)   !important; color: #e74c3c; }

/* ── Log Table ── */
.log-filter-bar   { margin-bottom: 1rem; }
.log-table-wrap   { overflow-x: auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.log-table        { width: 100%; border-collapse: collapse; font-size: 13px; }
.log-table th     { text-align: left; padding: 10px 14px; color: var(--text-3); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); }
.log-table td     { padding: 9px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }
.log-table tr:last-child td { border: none; }
.log-table tr:hover td { background: var(--bg-hover); }
.log-id           { font-family: monospace; font-size: 11px; color: var(--text-3); }
.log-subid        { font-family: monospace; font-size: 11px; color: var(--text-3); display: block; }
.log-date         { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.log-ip           { font-size: 11px; font-family: monospace; color: var(--text-3); }
.log-target-type  { font-size: 10px; background: var(--bg-hover); border-radius: 3px; padding: 1px 5px; color: var(--text-3); margin-right: 4px; }

/* Action badges */
.action-badge  { font-size: 11px; font-family: monospace; padding: 2px 7px; border-radius: 4px; }
.action-login  { background: #0a1a0a; color: #27AE60; }
.action-logout { background: #1a1a0a; color: #888; }
.action-message { background: #0a0a1a; color: #2980B9; }
.action-rank   { background: #1a0a1a; color: #8E44AD; }
.action-user   { background: #0a1a1a; color: #16A085; }
.action-room   { background: #1a1a0a; color: #D35400; }
.action-poll   { background: #0a0a0a; color: #888; }
.action-note   { background: #0a1a0a; color: #27AE60; }
.action-emergency { background: #1a0808; color: #C0392B; }

/* ── Archive ── */
.archive-notice   { background: #1a0808; border: 1px solid #2a1010; border-radius: var(--radius-sm); padding: 10px 14px; color: #c05555; font-size: 13px; margin-bottom: 1.25rem; }
.archive-list     { display: flex; flex-direction: column; gap: 12px; }
.archive-card     { border: 1px solid #3a1010; border-radius: var(--radius); overflow: hidden; }
.archive-card-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 16px; background: #0f0808; border-bottom: 1px solid #2a1010; flex-wrap: wrap; gap: 8px; }
.archive-meta     { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.archive-id       { font-family: monospace; font-size: 11px; color: #7a3030; }
.archive-table    { font-size: 11px; background: #1a0808; color: #c05555; padding: 2px 7px; border-radius: 4px; font-family: monospace; }
.archive-orig     { font-size: 11px; color: #555; }
.archive-orig code { color: #c05555; }
.archive-who      { font-size: 12px; color: #7a3030; }
.archive-deleted-by strong { color: #e05555; }
.archive-deleted-at { display: block; font-size: 11px; color: #555; }
.archive-snapshot { padding: 12px 16px; background: #0A0808; }
.archive-snapshot pre { font-size: 11px; color: #7a5555; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }

/* ── Complaints ── */
.complaints-list  { display: flex; flex-direction: column; gap: 10px; }
.complaint-card   { background: var(--bg-card); border-radius: var(--radius); padding: 1.25rem; }
.complaint-card.is-unread { border: 1px solid #2a2010; }
.complaint-card.is-read   { border: 1px solid var(--border); opacity: 0.6; }
.complaint-meta   { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.complaint-id     { font-family: monospace; font-size: 11px; color: var(--text-3); }
.complaint-date   { font-size: 12px; color: var(--text-3); }
.complaint-badge-new { font-size: 10px; background: #1a1000; color: #D35400; border: 1px solid #2a1800; padding: 1px 6px; border-radius: 4px; }
.complaint-content { font-size: 14px; color: var(--text-2); line-height: 1.7; margin-bottom: 10px; }
.complaint-read-at { font-size: 11px; color: var(--text-3); }

/* ── Admin links ── */
.admin-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 2rem; }
.admin-link-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; text-decoration: none; display: flex; align-items: center; gap: 14px; transition: border-color 0.12s; color: var(--text-1); }
.admin-link-card:hover { border-color: var(--border-mid); }
.admin-link-card svg { color: var(--accent); flex-shrink: 0; }
.admin-link-title { font-size: 14px; font-weight: 500; }
.admin-link-sub   { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ── Rank Tree ── */
.rank-tree { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.rank-row  { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.rank-row:last-child { border: none; }
.rank-color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.rank-row-info  { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rank-row-label { font-weight: 500; font-size: 14px; }
.rank-row-name  { font-size: 12px; color: var(--text-3); font-family: monospace; }
.rank-row-id    { font-size: 10px; color: var(--text-3); font-family: monospace; margin-left: auto; }
.rank-parent-badge { font-size: 11px; color: var(--text-3); font-family: monospace; }

/* ── Rank Pill ── */
.rank-pill { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 4px; }

/* ── Status dot ── */
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.status-dot.online { background: #00d084; box-shadow: 0 0 6px rgba(0,208,132,.6); animation: pulse-online 2s ease-in-out infinite; }
@keyframes pulse-online { 0%,100% { box-shadow: 0 0 4px rgba(0,208,132,.5); } 50% { box-shadow: 0 0 10px rgba(0,208,132,.9); } }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-card    { background: var(--bg-card); border: 1px solid var(--border-mid); border-radius: var(--radius); width: 100%; max-width: 480px; overflow: hidden; }
.modal-header  { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-title   { font-size: 15px; font-weight: 700; color: var(--text-1); flex: 1; display: flex; align-items: center; }
.modal-body    { padding: 20px; }
.modal-footer  { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }
.modal-close-btn { width: 30px; height: 30px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 7px; cursor: pointer; color: var(--text-3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .15s; }
.modal-close-btn:hover { background: rgba(231,76,60,.15); color: #e74c3c; border-color: rgba(231,76,60,.3); }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; gap: 12px; margin-top: 1.25rem; }
.page-btn   { background: var(--bg-card); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); padding: 6px 14px; color: var(--text-2); text-decoration: none; font-size: 13px; transition: background 0.12s; }
.page-btn:hover { background: var(--bg-hover); color: var(--text-1); }
.page-info  { font-size: 13px; color: var(--text-3); }

/* ── Empty State ── */
.empty-state  { text-align: center; padding: 4rem 2rem; }
.empty-icon   { font-size: 40px; margin-bottom: 1rem; opacity: 0.4; }
.empty-title  { font-size: 16px; font-weight: 500; color: var(--text-2); margin-bottom: 0.5rem; }
.empty-sub    { font-size: 13px; color: var(--text-3); }

/* ── Made By Footer ── */
.made-by-footer {
  position: fixed;
  bottom: 16px;
  right: 18px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 7px;
  background: rgba(211, 84, 0, 0.06);
  border: 1px solid rgba(211, 84, 0, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .3s ease, background .2s, border-color .2s;
  pointer-events: none;
  user-select: none;
  cursor: default;
}
.made-by-footer.visible {
  opacity: 1;
  pointer-events: auto;
}
.made-by-footer:hover {
  background: rgba(211, 84, 0, 0.12);
  border-color: rgba(211, 84, 0, 0.28);
}
.made-by-footer-avatars {
  display: flex;
  align-items: center;
}
.made-by-footer-avatars img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(211, 84, 0, 0.3);
  image-rendering: pixelated;
  flex-shrink: 0;
  margin-left: -5px;
  background: #111;
}
.made-by-footer-avatars img:first-child {
  margin-left: 0;
}
.made-by-footer span {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: .04em;
  white-space: nowrap;
  font-weight: 500;
}
.made-by-footer span b {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

/* ── Scrollbar ── */
::-webkit-scrollbar         { width: 6px; height: 6px; }
::-webkit-scrollbar-track   { background: transparent; }
::-webkit-scrollbar-thumb   { background: #222; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #333; }

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-left: 4px solid var(--accent);
  color: var(--text-1);
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}
.toast-icon { color: var(--accent); font-size: 18px; }
.toast.info { border-left-color: #3498db; }
.toast.info .toast-icon { color: #3498db; }
.toast.success { border-left-color: #27ae60; }
.toast.success .toast-icon { color: #27ae60; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
.toast.hide {
  animation: toastOut 0.3s forwards;
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(30px); }
}

/* ═══════════════════════════════════════════
   MOBİL — Hamburger + Sidebar + Layout
   ═══════════════════════════════════════════ */

/* Hamburger butonu — her zaman DOM'da, sadece mobilde görünür */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;
  width: 42px;
  height: 42px;
  background: rgba(17,17,17,0.95);
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #888;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,0.7);
}
.sidebar-overlay.active { display: block; }

@media (max-width: 768px) {
  /* Hamburger göster */
  .sidebar-toggle { display: flex; }

  /* Sidebar: gizli, slide-in */
  .sidebar {
    transform: translateX(-110%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    z-index: 9999;
    width: 260px;
    max-width: 80vw;
    box-shadow: 8px 0 32px rgba(0,0,0,0.6);
  }
  .sidebar.open { transform: translateX(0); }

  /* Layout: sidebar yok, tam genişlik */
  .layout-body { display: block !important; }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 58px 12px 24px 12px !important;
    box-sizing: border-box !important;
    overflow-x: hidden;
  }

  .main-content--chat {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 0 !important;
    padding-top: 48px !important;
    height: 100dvh !important;
    overflow: hidden;
  }

  /* Sayfa başlığı */
  .page-header { margin-bottom: 1rem; gap: 6px; }
  .page-title  { font-size: 17px; }
  .page-sub    { font-size: 11px; }

  /* Grid'ler */
  .stats-grid     { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 1rem; }
  .stat-value     { font-size: 20px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 10px; }
  .staff-grid     { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .staff-card     { padding: 0.875rem; }
  .staff-avatar, .staff-avatar-initial { width: 40px; height: 40px; }
  .staff-name     { font-size: 13px; }
  .admin-links    { grid-template-columns: 1fr; gap: 8px; }
  
  /* Quick Stats - mobilde 2 sütun */
  .quick-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .quick-stat-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    gap: 10px;
  }
  .qsc-icon {
    width: 40px;
    height: 40px;
  }
  .qsc-value {
    font-size: 24px;
  }
  .qsc-label {
    font-size: 10px;
  }
  .qsc-sub {
    font-size: 11px;
  }
  
  /* Activity Feed - mobilde daha kompakt */
  .activity-feed {
    max-height: 300px;
  }
  .activity-item {
    padding: 8px 12px;
    gap: 10px;
  }
  .activity-icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .activity-actor {
    font-size: 12px;
  }
  .activity-action {
    font-size: 11px;
  }
  .activity-time {
    font-size: 10px;
  }

  /* Tablo */
  .log-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .log-table      { min-width: 540px; }

  /* Oda kartları */
  .room-card  { padding: 0.75rem 0.875rem; }
  .room-title { font-size: 13px; }

  /* Modal: bottom sheet */
  .modal-overlay { padding: 0 !important; align-items: flex-end !important; }
  .modal-card {
    max-width: 100% !important;
    border-radius: 18px 18px 0 0 !important;
    max-height: 92dvh;
    overflow-y: auto;
  }

  /* Butonlar */
  .btn-primary { padding: 10px 16px; font-size: 14px; }
  .btn-sm      { padding: 7px 12px; font-size: 12px; }

  /* Form input — iOS zoom engeli */
  .form-input, textarea.form-input, select.form-input {
    font-size: 16px !important;
    padding: 11px 12px;
  }

  /* Made-by gizle */
  .made-by-footer { display: none !important; }

  /* Toast */
  .toast-container { left: 10px; right: 10px; bottom: 12px; }
  .toast { min-width: unset; width: 100%; }

  /* Emergency bar */
  .emergency-bar { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

  /* Rank tree */
  .rank-row { flex-wrap: wrap; gap: 6px; }
  .rank-row-id { margin-left: 0; }
}

@media (max-width: 390px) {
  .staff-grid  { grid-template-columns: 1fr; }
  .main-content { padding: 54px 10px 20px 10px !important; }
  .page-title  { font-size: 15px; }
  
  /* Quick Stats - mobilde tek sütun */
  .quick-stats-grid {
    grid-template-columns: 1fr;
  }
}
