/* Owner console — Rust CE RCON log stream + command entry */

.owner-console {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  font-family: var(--font-body);
  overflow: hidden;
}

/* Header */
.owner-console__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.owner-console__header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 212, 238, 0.18) 0%, rgba(168, 85, 247, 0.12) 100%);
  border: 1px solid rgba(0, 212, 238, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.owner-console__header-info {
  flex: 1;
  min-width: 0;
}

.owner-console__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.owner-console__server-name {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.owner-console__status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.owner-console__status-pill--live {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.owner-console__status-pill--demo {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

.owner-console__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: console-blink 1.8s ease-in-out infinite;
}

@keyframes console-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Tabs */
.owner-console__tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
  padding: 0 8px;
}

.owner-console__tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  color: inherit;
  opacity: 0.55;
}

.owner-console__tab.is-active {
  color: #3ee8ff;
  border-bottom-color: #3ee8ff;
  opacity: 1;
}

/* Log pane */
.owner-console__log {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0 8px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

.owner-console__log-entry {
  display: flex;
  gap: 10px;
  padding: 2px 16px;
  transition: background 0.1s;
}

.owner-console__log-entry:hover {
  background: rgba(255, 255, 255, 0.03);
}

.owner-console__log-time {
  color: rgba(255, 255, 255, 0.28);
  white-space: nowrap;
  flex-shrink: 0;
}

.owner-console__log-badge {
  display: inline-block;
  min-width: 52px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  flex-shrink: 0;
  line-height: 18px;
}

.owner-console__log-badge--join  { background: rgba(34, 197, 94, 0.15);  color: #4ade80; }
.owner-console__log-badge--leave { background: rgba(255, 255, 255, 0.07); color: rgba(255,255,255,0.45); }
.owner-console__log-badge--kick  { background: rgba(245, 158, 11, 0.15);  color: #fbbf24; }
.owner-console__log-badge--ban   { background: rgba(239, 68, 68, 0.15);   color: #f87171; }
.owner-console__log-badge--say   { background: rgba(62, 232, 255, 0.1);   color: #3ee8ff; }
.owner-console__log-badge--wipe  { background: rgba(168, 85, 247, 0.15);  color: #c084fc; }
.owner-console__log-badge--info  { background: rgba(255, 255, 255, 0.06); color: rgba(255,255,255,0.5); }
.owner-console__log-badge--cmd   { background: rgba(62, 232, 255, 0.18);  color: #3ee8ff; }
.owner-console__log-badge--error { background: rgba(239, 68, 68, 0.18);   color: #f87171; }

.owner-console__log-text {
  color: rgba(255, 255, 255, 0.82);
  flex: 1;
  word-break: break-word;
}

.owner-console__log-text--dim {
  color: rgba(255, 255, 255, 0.38);
}

.owner-console__log-entry--cmd .owner-console__log-text {
  color: #3ee8ff;
}

.owner-console__log-entry--error .owner-console__log-text {
  color: #f87171;
}

.owner-console__log-entry--wipe .owner-console__log-text {
  color: #c084fc;
}

/* Auto-scroll toggle */
.owner-console__log-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 4px 16px 8px;
  gap: 8px;
  flex-shrink: 0;
}

.owner-console__autoscroll-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  transition: border-color 0.2s, background 0.2s;
}

.owner-console__autoscroll-btn.is-on {
  border-color: rgba(62, 232, 255, 0.3);
  background: rgba(62, 232, 255, 0.08);
  color: #3ee8ff;
}

/* Command input */
.owner-console__input-row {
  display: flex;
  gap: 8px;
  padding: 10px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.owner-console__input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s, background 0.2s;
}

.owner-console__input-wrap:focus-within {
  border-color: rgba(62, 232, 255, 0.35);
  background: rgba(62, 232, 255, 0.04);
}

.owner-console__prompt {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 14px;
  color: #3ee8ff;
  flex-shrink: 0;
  user-select: none;
}

.owner-console__input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  min-width: 0;
}

.owner-console__input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.owner-console__send-btn {
  padding: 10px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 212, 238, 0.2) 0%, rgba(168, 85, 247, 0.15) 100%);
  border: 1px solid rgba(62, 232, 255, 0.3);
  color: #3ee8ff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  flex-shrink: 0;
}

.owner-console__send-btn:hover {
  border-color: rgba(62, 232, 255, 0.6);
  background: linear-gradient(135deg, rgba(0, 212, 238, 0.3) 0%, rgba(168, 85, 247, 0.2) 100%);
}

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

/* Command hints */
.owner-console__hints {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 16px 12px;
  flex-shrink: 0;
}

.owner-console__hint-chip {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.owner-console__hint-chip:hover {
  border-color: rgba(62, 232, 255, 0.3);
  color: #3ee8ff;
  background: rgba(62, 232, 255, 0.06);
}

/* RCON connect banner */
.owner-console__rcon-banner {
  margin: 12px 16px 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.owner-console__rcon-banner.is-connected {
  background: rgba(34, 197, 94, 0.07);
  border-color: rgba(34, 197, 94, 0.2);
}

.owner-console__rcon-banner-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.owner-console__rcon-banner-text {
  flex: 1;
  min-width: 0;
}

.owner-console__rcon-banner-text strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.owner-console__rcon-banner-text span {
  font-size: 12px;
  color: var(--text-secondary);
}

.owner-console__rcon-connect-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.owner-console__rcon-connect-btn:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.5);
}

/* Players tab */
.owner-console__players {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.owner-console__player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  transition: background 0.1s;
  cursor: default;
}

.owner-console__player-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.owner-console__player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.owner-console__player-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-console__player-ping {
  font-size: 12px;
  font-family: 'SF Mono', monospace;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.owner-console__player-ping--good { color: #4ade80; }
.owner-console__player-ping--ok   { color: #fbbf24; }
.owner-console__player-ping--high { color: #f87171; }

.owner-console__player-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.owner-console__player-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.owner-console__player-btn:hover {
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.07);
}

.owner-console__player-btn--ban:hover {
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  background: rgba(239, 68, 68, 0.07);
}

.owner-console__empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-secondary);
  font-size: 14px;
}
