/* Active Intercom v2 — Modern, ferah, okunakli
   Plus Jakarta Sans, yuksek kontrast, generous spacing
*/

:root {
  /* Renk paleti - koyu zemin, yumuşak ama net */
  --bg-app: #0f1115;
  --bg-elev-1: #181b22;
  --bg-elev-2: #20242d;
  --bg-elev-3: #2a2f3a;
  --bg-input: #0a0c10;

  --border: #2d3340;
  --border-strong: #3d4555;

  --text: #f5f6f8;
  --text-soft: #b4bac7;
  --text-mute: #6f7686;

  /* Aksan */
  --accent: #4f8eff;
  --accent-hover: #639aff;
  --accent-soft: #4f8eff22;

  --success: #1ed984;
  --success-soft: #1ed98422;
  --warning: #ffb020;
  --warning-soft: #ffb02022;
  --danger: #ff4757;
  --danger-soft: #ff475722;

  /* Roller */
  --role-admin: #ff4757;
  --role-director: #ffb020;
  --role-operator: #4f8eff;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.4);

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  background: var(--bg-app);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

button {
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
}

.screen {
  display: none;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
}
.screen.active { display: flex; }

/* ═══════════════════════════════════════════════════
   GIRIS EKRANI
   ═══════════════════════════════════════════════════ */
#loginScreen {
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, #1a2030 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%, #1a1a30 0%, transparent 70%),
    var(--bg-app);
  padding: 24px;
  overflow-y: auto;
}

.login-wrap {
  width: 100%;
  max-width: 420px;
}

.login-brand {
  text-align: center;
  margin-bottom: 40px;
}

.brand-logo {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 24px;
  padding: 14px 18px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.brand-logo span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--role-admin);
  box-shadow: 0 0 12px var(--role-admin);
}
.brand-logo span:nth-child(2) {
  background: var(--role-director);
  box-shadow: 0 0 12px var(--role-director);
  animation: pulse-soft 2s ease-in-out infinite;
}
.brand-logo span:nth-child(3) {
  background: var(--success);
  box-shadow: 0 0 12px var(--success);
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.login-brand h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.login-brand p {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-mute);
}

.login-form {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-lg);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.01em;
}

.field input {
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 14px 16px;
  font-size: 17px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.field input::placeholder { color: var(--text-mute); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  transition: background 0.12s, transform 0.06s, box-shadow 0.12s;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 14px rgba(79, 142, 255, 0.35);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-lg {
  padding: 16px 24px;
  font-size: 17px;
  border-radius: var(--radius);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--bg-elev-2);
  color: var(--text-soft);
  border-radius: var(--radius);
}
.btn-icon:hover {
  background: var(--bg-elev-3);
  color: var(--text);
}

.btn-danger-soft {
  background: var(--danger-soft);
  color: var(--danger);
}
.btn-danger-soft:hover {
  background: var(--danger);
  color: white;
}

.btn-ghost {
  background: var(--bg-elev-2);
  color: var(--text);
}
.btn-ghost:hover { background: var(--bg-elev-3); }

.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover { background: #ff5e6c; }

.login-error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  display: none;
  text-align: center;
}
.login-error.visible { display: block; }

.login-hint {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mute);
}
.login-hint strong {
  color: var(--text-soft);
  background: var(--bg-elev-1);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-weight: 700;
  display: inline-block;
}

/* ═══════════════════════════════════════════════════
   ANA EKRAN - INTERCOM
   ═══════════════════════════════════════════════════ */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-elev-1);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  flex-shrink: 0;
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.me-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 6px 12px 6px 6px;
  background: var(--bg-elev-2);
  border-radius: 999px;
  border: 1px solid var(--border);
}

.me-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.me-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.me-name {
  font-size: 14px;
  font-weight: 700;
}

.me-fn {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mute);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.topbar-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.topbar-spacer { flex: 1; }

/* Master bar */
.masterbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-app);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.master-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--success-soft);
  color: var(--success);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  border: 1px solid transparent;
}

.master-btn.muted {
  background: var(--danger-soft);
  color: var(--danger);
}
.master-btn.muted span:last-child::before {
  content: 'Mikrofon Kapalı';
  display: inline;
}
.master-btn.muted span:last-child {
  font-size: 0;
}
.master-btn.muted span:last-child::before {
  font-size: 14px;
}

.vu-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elev-1);
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.vu-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mute);
}

.vu-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
}

.vu-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--success), var(--warning) 75%, var(--danger));
  transition: width 0.05s;
  border-radius: inherit;
}

.conn-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
}

.conn-status .conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.conn-status.offline .conn-dot {
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
}

/* Kanal kartlari */
.channels {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding: 16px;
  overflow-y: auto;
  align-content: start;
}

.channel-card {
  background: var(--bg-elev-1);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  position: relative;
}

.channel-card.tx-active {
  border-color: var(--success);
  box-shadow: 0 0 0 4px var(--success-soft);
}

.channel-card.rx-active::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--warning);
  pointer-events: none;
  animation: rx-pulse 1.5s ease-in-out infinite;
}

@keyframes rx-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.ch-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ch-color {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.ch-name {
  flex: 1;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.ch-badge {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-soft);
  min-width: 28px;
  text-align: center;
}

.ch-users {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 36px;
  max-height: 200px;
  overflow-y: auto;
}

.ch-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-elev-2);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.ch-user.talking {
  background: var(--success-soft);
  border-left-color: var(--success);
}

.ch-user.is-me {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}
.ch-user.is-me.talking {
  background: var(--success-soft);
  border-left-color: var(--success);
}

.ch-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.ch-user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.ch-user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-user-fn {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-user.talking .ch-user-fn,
.ch-user.is-me .ch-user-fn {
  color: var(--text-soft);
}

.ch-user-mic {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--text-mute);
  flex-shrink: 0;
}
.ch-user.talking .ch-user-mic { color: var(--success); }

.ch-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.btn-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 12px;
  background: var(--bg-elev-2);
  border: 2px solid var(--border);
  color: var(--text-soft);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.12s;
}

.btn-toggle:hover {
  background: var(--bg-elev-3);
}

.btn-toggle.ch-listen.active {
  background: var(--warning-soft);
  border-color: var(--warning);
  color: var(--warning);
}

.btn-toggle.ch-talk.active {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
}

.ch-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-mute);
}

.vol-slider {
  flex: 1;
  height: 6px;
  background: var(--bg-input);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: var(--shadow);
}
.vol-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: var(--shadow);
}

.vol-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-soft);
  min-width: 26px;
  text-align: right;
}

/* PTT mega buton */
.ptt-bar {
  flex-shrink: 0;
  padding: 16px;
  background: var(--bg-elev-1);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ptt-mega {
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px 24px;
  background: linear-gradient(180deg, var(--danger) 0%, #d63a47 100%);
  color: white;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.005em;
  box-shadow:
    0 4px 14px rgba(255, 71, 87, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.06s;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.ptt-mega .ptt-text {
  text-align: left;
  line-height: 1.2;
  font-weight: 700;
}
.ptt-mega .ptt-text strong {
  font-size: 19px;
  font-weight: 800;
}

.ptt-mega:active,
.ptt-mega.active {
  background: linear-gradient(180deg, var(--success) 0%, #18b76e 100%);
  transform: scale(0.98);
  box-shadow:
    0 2px 8px rgba(30, 217, 132, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ptt-mega.active .ptt-text strong::after {
  /* "BASILI TUT" yerine "KONUSUYORSUNUZ" gostermek istersek */
}

.ptt-hint {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mute);
}

.ptt-hint kbd {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-family: monospace;
  font-weight: 700;
  color: var(--text-soft);
}

/* ═══════════════════════════════════════════════════
   ADMIN PANEL
   ═══════════════════════════════════════════════════ */
.tab-bar {
  display: flex;
  background: var(--bg-elev-1);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  gap: 4px;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }

.tab-btn {
  background: none;
  color: var(--text-mute);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.tab-btn:hover {
  color: var(--text-soft);
}

.tab-pane {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
}
.tab-pane.active { display: block; }

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.pane-header h3 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.user-list, .channel-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-row, .channel-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.user-row .user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}

.user-row .user-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.user-row .user-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-row .user-name {
  font-size: 16px;
  font-weight: 800;
}

.user-row .user-username {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mute);
}

.user-row .user-fn {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-top: 2px;
}

.role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid;
}
.role-badge.admin { color: var(--role-admin); border-color: var(--role-admin); background: rgba(255,71,87,0.1); }
.role-badge.director { color: var(--role-director); border-color: var(--role-director); background: rgba(255,176,32,0.1); }
.role-badge.operator { color: var(--role-operator); border-color: var(--role-operator); background: rgba(79,142,255,0.1); }

.user-row .user-actions, .channel-row .channel-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.channel-row .channel-color {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  flex-shrink: 0;
}

.channel-row .channel-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.channel-row .channel-name {
  font-size: 16px;
  font-weight: 800;
}

.channel-row .channel-id {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mute);
  font-family: monospace;
}

/* Form */
.form-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
}

.form-msg {
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
  border-radius: var(--radius);
  display: none;
  text-align: center;
}
.form-msg.success {
  display: block;
  background: var(--success-soft);
  color: var(--success);
}
.form-msg.error {
  display: block;
  background: var(--danger-soft);
  color: var(--danger);
}

/* Modal */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.visible {
  display: flex;
}

.modal-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 800;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.color-picker-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform 0.1s;
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.selected {
  border-color: white;
  box-shadow: 0 0 0 2px var(--accent);
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 8px;
}

.select-row {
  display: flex;
  gap: 8px;
}
.select-row .role-opt {
  flex: 1;
  background: var(--bg-elev-2);
  border: 2px solid var(--border);
  padding: 12px;
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
  transition: all 0.12s;
}
.select-row .role-opt.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* Toast */
.toast-stack {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.25s ease-out;
  pointer-events: all;
}
.toast.success { border-color: var(--success); color: var(--success); }
.toast.error { border-color: var(--danger); color: var(--danger); }

@keyframes toast-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Mobil */
@media (max-width: 720px) {
  .channels {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 10px;
  }
  .topbar {
    padding: 10px 12px;
    gap: 8px;
  }
  .me-card .me-info { display: none; }
  .me-card { padding: 4px; }
  .me-avatar { width: 38px; height: 38px; }
  .masterbar {
    padding: 10px 12px;
    gap: 8px;
  }
  .master-btn span:last-child { display: none; }
  .ch-name { font-size: 18px; }
  .ptt-bar { padding: 12px; }
  .ptt-mega { padding: 16px; }
  .pane-header h3 { font-size: 18px; }
  .user-row, .channel-row {
    padding: 12px;
    gap: 10px;
  }
  .user-row .user-actions, .channel-row .channel-actions {
    flex-direction: column;
  }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-mute); }

/* ═══════════════════════════════════════════════════
   BUZZ - Çağrı sistemi
   ═══════════════════════════════════════════════════ */

/* Kanal kartındaki "Çağır" butonu */
.btn-buzz {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--bg-elev-2);
  border: 2px solid var(--border);
  color: var(--text-soft);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.12s;
  cursor: pointer;
}

.btn-buzz:hover {
  background: var(--warning-soft);
  border-color: var(--warning);
  color: var(--warning);
}

.btn-buzz:active {
  transform: scale(0.94);
  background: var(--warning);
  color: #fff;
}

/* Cooldown - basıldıktan sonra 2 saniye */
.btn-buzz.cooldown {
  opacity: 0.4;
  pointer-events: none;
}

/* Kullanıcı satırındaki küçük çağrı ikonu */
.ch-user-buzz {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-mute);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.12s;
  margin-left: 4px;
}

.ch-user-buzz:hover {
  background: var(--warning-soft);
  border-color: var(--warning);
  color: var(--warning);
}

.ch-user-buzz:active {
  transform: scale(0.9);
}

.ch-user-buzz.cooldown {
  opacity: 0.3;
  pointer-events: none;
}

/* Çağrı alındığında - kanal kartı sallanır + kırmızı çerçeve */
@keyframes buzz-shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
  20%, 40%, 60%, 80% { transform: translateX(6px); }
}

@keyframes buzz-flash {
  0%, 100% {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px var(--danger-soft), 0 0 30px rgba(255,71,87,0.4);
  }
  50% {
    border-color: #fff;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.3), 0 0 40px rgba(255,71,87,0.6);
  }
}

.channel-card.buzz-active {
  animation:
    buzz-shake 0.5s ease-in-out 0s 2,
    buzz-flash 0.4s ease-in-out 0s 6;
  border-width: 3px !important;
  z-index: 10;
}

/* Üst banner bildirimi */
.buzz-banner {
  position: fixed;
  top: env(safe-area-inset-top, 0);
  left: 0;
  right: 0;
  z-index: 9000;
  background: linear-gradient(180deg, var(--danger) 0%, #d63a47 100%);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 20px rgba(255,71,87,0.5);
  transform: translateY(-100%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: 700;
}

.buzz-banner.visible {
  transform: translateY(0);
}

.buzz-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  animation: buzz-bell-ring 0.6s ease-in-out infinite;
}

@keyframes buzz-bell-ring {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-15deg); }
  40% { transform: rotate(15deg); }
  60% { transform: rotate(-10deg); }
  80% { transform: rotate(10deg); }
}

.buzz-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.buzz-banner-title {
  font-size: 16px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buzz-banner-sub {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buzz-banner-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.buzz-banner-close:hover {
  background: rgba(255,255,255,0.35);
}

/* Mobil için buzz */
@media (max-width: 720px) {
  .ch-actions {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
  }
  .btn-buzz {
    padding: 10px 4px;
    font-size: 12px;
  }
  .btn-buzz svg {
    width: 16px;
    height: 16px;
  }
  .buzz-banner {
    padding: 12px 14px;
    gap: 10px;
  }
  .buzz-banner-icon {
    width: 36px;
    height: 36px;
  }
  .buzz-banner-title { font-size: 14px; }
  .buzz-banner-sub { font-size: 12px; }
}
