/* ── Owner Command Center Cyberpunk / SaaS Styles ── */

.owner-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* Header & Status Bar */
.owner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.owner-title-group h1 {
  font-size: 1.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}

.owner-badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.35);
  font-weight: 700;
}

.owner-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Stat Cards Grid */
.owner-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary-gradient);
}

.stat-card.emerald::before { background: linear-gradient(90deg, #10b981, #06b6d4); }
.stat-card.amber::before { background: linear-gradient(90deg, #f59e0b, #ec4899); }
.stat-card.rose::before { background: linear-gradient(90deg, #ef4444, #f43f5e); }
.stat-card.purple::before { background: linear-gradient(90deg, #8b5cf6, #d946ef); }

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.stat-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 6px;
}

/* Tabs Navigation */
.owner-nav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  overflow-x: auto;
}

.owner-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.owner-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.owner-tab-btn.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.2);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── CODE VAULT (Watch Every Main Bot's Codes) ── */
.code-vault-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  min-height: 650px;
}

@media (max-width: 960px) {
  .code-vault-layout {
    grid-template-columns: 1fr;
  }
}

.vault-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.vault-sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 13, 20, 0.5);
}

.vault-sidebar-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-selector {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
}

.template-selector:focus {
  border-color: var(--primary);
}

.file-tree-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  max-height: 550px;
}

.file-tree-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2px;
  word-break: break-all;
}

.file-tree-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.file-tree-item.active {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border-left: 3px solid var(--primary);
  font-weight: 600;
}

.file-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.file-size-tag {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-left: auto;
  flex-shrink: 0;
}

/* Code Viewer Area */
.vault-editor {
  background: #0d111b;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.vault-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(18, 24, 38, 0.8);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 12px;
}

.file-info-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-breadcrumb {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.88rem;
  color: #e2e8f0;
  font-weight: 600;
}

.badge-tag {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-editor-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 6px 12px;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-editor-action:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.code-display-wrapper {
  position: relative;
  flex: 1;
  max-height: 580px;
  overflow: auto;
  background: #0b0f19;
}

.code-pre {
  margin: 0;
  padding: 18px 20px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #e2e8f0;
  tab-size: 2;
  white-space: pre;
}

.code-line-numbers {
  user-select: none;
  color: #475569;
  text-align: right;
  padding-right: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  margin-right: 18px;
  display: inline-block;
}

/* ── Tables & Lists ── */
.owner-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.card-header-bar {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.owner-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.owner-table th {
  padding: 14px 20px;
  background: rgba(10, 13, 20, 0.4);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border-color);
}

.owner-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  vertical-align: middle;
}

.owner-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.status-pill.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill.suspended {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-pill.banned {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.4);
}

.status-pill.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Action Buttons */
.action-btn-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-action {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-action:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

.btn-action.danger {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-action.danger:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.btn-action.success {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.btn-action.success:hover {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

/* Lock Screen Modal */
.lock-screen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 15, 0.92);
  backdrop-filter: blur(16px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lock-card {
  background: #111726;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(99, 102, 241, 0.15);
}

.lock-icon-wrap {
  width: 64px;
  height: 64px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 20px;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.lock-input {
  width: 100%;
  background: rgba(10, 13, 20, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  margin-bottom: 20px;
  outline: none;
  transition: var(--transition);
}

.lock-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.35);
}
