#btnRoomOwnerSettings {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text, #1e293b);
  cursor: pointer;
}

#btnRoomOwnerSettings:hover {
  background: var(--bg-light, #f5f7fa);
  color: var(--accent, #6366f1);
}

.room-owner-overlay {
  position: fixed;
  inset: 0;
  z-index: 26000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 12px 12px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  animation: chipFadeIn 0.2s ease;
}

@media (min-width: 640px) {
  .room-owner-overlay {
    align-items: center;
    padding: 16px;
  }
}

.room-owner-panel {
  position: relative;
  width: min(480px, 100%);
  max-height: min(88vh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--bg-white, #fff);
  color: var(--text, #1e293b);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

@media (min-width: 640px) {
  .room-owner-panel {
    border-radius: 16px;
    animation: chipSlideUp 0.25s ease;
  }
}

.room-owner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  background: var(--bg-white, #fff);
}

.room-owner-header h3 {
  margin: 0;
  font-size: 17px;
}

.room-owner-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 50%;
  background: var(--bg-light, #f5f7fa);
  color: var(--text-dark, #1e293b);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.room-owner-close:hover {
  background: var(--bg-white, #fff);
  color: var(--accent, #6366f1);
  border-color: var(--accent, #6366f1);
}

.room-owner-close-x {
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
}

.room-owner-close .icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.room-owner-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  background: var(--bg-light, #f5f7fa);
}

.room-owner-tab {
  flex: 1;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--mid, #64748b);
  cursor: pointer;
}

.room-owner-tab.active {
  background: var(--bg-white, #fff);
  color: var(--accent, #6366f1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.room-owner-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  background: var(--bg-white, #fff);
}

.room-owner-vault-balance {
  text-align: center;
  padding: 16px 12px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.1));
}

.room-owner-vault-balance .label {
  font-size: 12px;
  color: var(--mid, #64748b);
  margin-bottom: 4px;
}

.room-owner-vault-balance .amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent, #6366f1);
}

.room-owner-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--mid, #64748b);
  margin-bottom: 4px;
}

.room-owner-form input,
.room-owner-form select {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-white, #fff);
  color: var(--text, #1e293b);
}

.room-owner-transfer-btn {
  width: 100%;
  margin-top: 4px;
  padding: 11px;
  border: none;
  border-radius: 10px;
  background: var(--accent, #6366f1);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.room-owner-transfer-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.room-owner-ledger {
  margin-top: 16px;
}

.room-owner-ledger h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--mid, #64748b);
}

.room-owner-ledger-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border, #e2e8f0);
  font-size: 12px;
}

.room-owner-ledger-item .amt-pos {
  color: #16a34a;
  font-weight: 600;
}

.room-owner-ledger-item .amt-neg {
  color: #dc2626;
  font-weight: 600;
}

.room-owner-hint {
  font-size: 12px;
  color: var(--mid, #64748b);
  margin-bottom: 12px;
  line-height: 1.4;
}

.room-owner-msg {
  font-size: 13px;
  margin-top: 8px;
}

.room-owner-msg.error {
  color: #dc2626;
}

.room-owner-msg.ok {
  color: #16a34a;
}

.room-owner-search-wrap {
  position: relative;
  margin-bottom: 10px;
}

.room-owner-search-wrap input[type='search'] {
  width: 100%;
  margin-bottom: 0;
  padding: 10px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  font-size: 14px;
}

.room-owner-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5;
  max-height: 200px;
  overflow-y: auto;
  background: var(--bg-white, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.room-owner-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--border, #e2e8f0);
  background: transparent;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  color: var(--text, #1e293b);
}

.room-owner-search-item:last-child {
  border-bottom: none;
}

.room-owner-search-item:hover {
  background: var(--bg-light, #f5f7fa);
}

.room-owner-search-item-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.room-owner-search-empty {
  padding: 12px;
  font-size: 13px;
  color: var(--mid, #64748b);
  text-align: center;
}

.room-owner-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--bg-light, #f5f7fa);
  border: 1px solid var(--border, #e2e8f0);
}

.room-owner-selected.empty {
  color: var(--mid, #64748b);
  font-size: 13px;
  justify-content: center;
}

.room-owner-selected-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.room-owner-selected-name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
}

.room-owner-selected-clear {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--mid, #64748b);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.room-owner-selected-clear:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #dc2626;
}

.room-owner-confirm-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
  border-radius: inherit;
  pointer-events: auto;
}

/* Onay katmanı panel overflow / tıklama sorunlarını önlemek için body'de */
.room-owner-confirm-layer--portal {
  position: fixed;
  inset: 0;
  z-index: 27001;
  border-radius: 0;
}

.room-owner-confirm-status {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.room-owner-confirm-status.info {
  background: #eff6ff;
  color: #1d4ed8;
}

.room-owner-confirm-status.error {
  background: #fef2f2;
  color: #b91c1c;
}

.room-owner-confirm-status.ok {
  background: #ecfdf5;
  color: #047857;
}

.room-owner-confirm {
  width: min(100%, 360px);
  padding: 18px 16px;
  background: var(--bg-white, #fff);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.room-owner-confirm h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.room-owner-confirm-main {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
}

.room-owner-confirm-meta {
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--mid, #64748b);
  line-height: 1.4;
}

.room-owner-confirm-warn {
  margin: 0 0 14px;
  font-size: 12px;
  color: #b45309;
  background: #fffbeb;
  padding: 8px 10px;
  border-radius: 8px;
}

.room-owner-confirm-actions {
  display: flex;
  gap: 8px;
}

.room-owner-confirm-cancel,
.room-owner-confirm-ok {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border, #e2e8f0);
}

.room-owner-confirm-cancel {
  background: var(--bg-white, #fff);
  color: var(--text, #1e293b);
}

.room-owner-confirm-ok {
  background: var(--accent, #6366f1);
  border-color: var(--accent, #6366f1);
  color: #fff;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.room-owner-confirm-ok:hover {
  filter: brightness(1.05);
}
