/* ==========================================================================
   KeyAuth VPS Dashboard Design System - Obsidian & Neon Cyber Aesthetic
   ========================================================================== */

:root {
  --bg-dark: #090a10;
  --bg-sidebar: #0e111a;
  --bg-card: rgba(20, 24, 38, 0.75);
  --bg-card-hover: rgba(28, 34, 53, 0.85);
  --bg-glass: rgba(18, 22, 34, 0.65);
  --bg-input: rgba(12, 15, 24, 0.85);

  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.35);

  --accent-cyan: #00f2fe;
  --accent-cyan-glow: rgba(0, 242, 254, 0.25);
  --accent-purple: #9b51e0;
  --accent-purple-glow: rgba(155, 81, 224, 0.25);
  --accent-green: #00ff88;
  --accent-red: #ff4757;
  --accent-yellow: #ffa502;
  --accent-blue: #5865F2; /* Discord blurple */

  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 25px rgba(0, 242, 254, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(155, 81, 224, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 242, 254, 0.06) 0%, transparent 45%);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 242, 254, 0.4);
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
}

.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #000;
  box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.brand-text h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  padding: 20px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
}

.nav-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  transition: var(--transition);
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: var(--text-primary);
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.25);
}

.nav-item.active i {
  color: var(--accent-cyan);
  text-shadow: 0 0 10px var(--accent-cyan);
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-weight: 600;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.admin-profile {
  display: none !important;
}

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover {
  color: var(--accent-red);
  background: rgba(255, 71, 87, 0.08);
  border-color: rgba(255, 71, 87, 0.2);
}

.btn-logout i {
  font-size: 15px;
  width: 20px;
  text-align: center;
}

.avatar {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 15px;
}

.admin-info {
  display: flex;
  flex-direction: column;
}

.admin-name {
  font-size: 13px;
  font-weight: 600;
}

.admin-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* Main Content */
.main-content {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Topbar */
.topbar {
  height: 68px;
  padding: 0 32px;
  border-radius: 0;
  border-bottom: 1px solid var(--border-color);
  border-top: none;
  border-left: none;
  border-right: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.server-host-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-secondary);
}

.server-host-badge strong {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.bot-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(88, 101, 242, 0.12);
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: #7289da;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-online {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.dot-offline {
  background: var(--text-muted);
}

/* Viewport and Views */
.tab-viewport {
  padding: 32px;
  flex: 1;
}

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

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

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

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.view-header h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.text-muted {
  color: var(--text-muted);
  font-size: 13px;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.metric-card {
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.14);
}

.metric-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.metric-icon.cyan {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.25);
}

.metric-icon.purple {
  background: rgba(155, 81, 224, 0.12);
  color: var(--accent-purple);
  border: 1px solid rgba(155, 81, 224, 0.25);
}

.metric-icon.green {
  background: rgba(0, 255, 136, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(0, 255, 136, 0.25);
}

.metric-icon.red {
  background: rgba(255, 71, 87, 0.12);
  color: var(--accent-red);
  border: 1px solid rgba(255, 71, 87, 0.25);
}

.metric-icon.orange {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.metric-icon.blue {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

/* Fallback for stat-grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.metric-data {
  display: flex;
  flex-direction: column;
}

.metric-title {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  margin: 4px 0;
}

.metric-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Dashboard Grids */
.dashboard-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 24px;
}

.content-card {
  overflow: hidden;
}

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

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-body {
  padding: 24px;
}

/* Chart Container */
.chart-container {
  padding: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 220px;
  gap: 14px;
}

.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 8px;
}

.chart-bars {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  justify-content: center;
}

.chart-bar {
  width: 14px;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.5s ease;
}

.chart-bar.creations {
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan-glow);
}

.chart-bar.redemptions {
  background: var(--accent-purple);
  box-shadow: 0 0 10px var(--accent-purple-glow);
}

.chart-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* Quick Actions */
.quick-actions-list {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.quick-action-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.icon-wrap.cyan { background: rgba(0, 242, 254, 0.15); color: var(--accent-cyan); }
.icon-wrap.purple { background: rgba(155, 81, 224, 0.15); color: var(--accent-purple); }
.icon-wrap.blue { background: rgba(88, 101, 242, 0.15); color: #7289da; }
.icon-wrap.green { background: rgba(0, 255, 136, 0.15); color: var(--accent-green); }

.quick-action-btn p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.quick-action-btn .arrow {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}

/* Tables & Toolbars */
.table-toolbar {
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.search-input-wrap input {
  padding-left: 38px;
}

.filters-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-container {
  overflow-x: auto;
  margin-bottom: 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.data-table th {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table td:first-child,
.data-table td:last-child {
  white-space: nowrap;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

/* Badges & Status */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-pulse {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.badge-success, .badge-active {
  background: rgba(0, 255, 136, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(0, 255, 136, 0.25);
}

.badge-unused {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.25);
}

.badge-expired {
  background: rgba(255, 165, 2, 0.12);
  color: var(--accent-yellow);
  border: 1px solid rgba(255, 165, 2, 0.25);
}

.badge-banned {
  background: rgba(255, 71, 87, 0.12);
  color: var(--accent-red);
  border: 1px solid rgba(255, 71, 87, 0.25);
}

.badge-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #00a8ff);
  color: #000;
  box-shadow: 0 4px 14px var(--accent-cyan-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--accent-purple);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-purple-glow);
}

.btn-secondary:hover {
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: rgba(255, 71, 87, 0.15);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: var(--accent-red);
}

.btn-danger:hover {
  background: var(--accent-red);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: var(--radius-sm);
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-icon:hover {
  color: var(--accent-red);
  background: rgba(255, 71, 87, 0.1);
}

.btn-block {
  width: 100%;
}

.btn-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group small.text-muted {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 13px;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}

.form-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.col-6 {
  flex: 1;
}

.input-group {
  display: flex;
  gap: 8px;
}

.code-font {
  font-family: var(--font-mono);
  font-size: 12px;
}

.key-code {
  font-family: var(--font-mono);
  background: rgba(0, 242, 254, 0.08);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  color: var(--accent-cyan);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.key-code i {
  cursor: pointer;
  opacity: 0.7;
}

.key-code i:hover {
  opacity: 1;
}

/* Preset Buttons */
.preset-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.btn-preset {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-preset.active, .btn-preset:hover {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-card {
  width: 100%;
  max-width: 520px;
  background: #111420;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 242, 254, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: modalPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-close:hover {
  color: var(--text-primary);
}

.modal-card form,
#form-create-keys,
#form-create-user,
#form-create-app,
#form-edit-app,
#form-reset-user-password {
  padding: 20px 24px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Auth Login Card */
.auth-card {
  max-width: 400px;
  padding: 36px 30px;
}

.auth-header {
  text-align: center;
  margin-bottom: 26px;
}

.auth-header .brand-logo {
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #000;
  margin-bottom: 14px;
  box-shadow: 0 0 25px var(--accent-cyan-glow);
}

.auth-header h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
}

.auth-default-hint {
  margin-top: 18px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.auth-default-hint code {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* VPS Backend Live Connection Pill */
.vps-status-pill {
  margin-top: 14px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  transition: var(--transition);
  cursor: pointer;
}

.vps-status-pill.online {
  border-color: rgba(0, 255, 136, 0.35);
  background: rgba(0, 255, 136, 0.08);
  color: var(--accent-green);
}

.vps-status-pill.offline {
  border-color: rgba(255, 71, 87, 0.45);
  background: rgba(255, 71, 87, 0.12);
  color: #ff6b81;
}

.vps-status-pill.checking {
  border-color: rgba(0, 242, 254, 0.35);
  background: rgba(0, 242, 254, 0.08);
  color: var(--accent-cyan);
}

.vps-retry-link {
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
  margin-left: 4px;
  color: #fff;
}

.vps-retry-link:hover {
  color: var(--accent-cyan);
}

/* Code & SDK Display */
.sdk-tabs {
  display: flex;
  gap: 6px;
}

.sdk-tab {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.sdk-tab:hover {
  color: var(--text-primary);
}

.sdk-tab.active {
  background: rgba(0, 242, 254, 0.1);
  border-color: rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
}

.sdk-mode-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.sdk-mode-tab {
  padding: 6px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sdk-mode-tab:hover {
  color: var(--text-primary);
}

.sdk-mode-tab.active {
  background: var(--accent-purple);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-purple-glow);
}

.code-block {
  background: #0b0d14;
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #e2e8f0;
  overflow-x: auto;
  max-height: 550px;
  margin: 0;
}

/* Info Alert & Pill List */
.info-alert {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-primary);
}

.info-alert i {
  color: var(--accent-cyan);
  font-size: 16px;
  margin-top: 2px;
}

.permission-list {
  margin-top: 6px;
  padding-left: 20px;
  font-size: 12px;
  color: var(--text-secondary);
}

.command-pills {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.command-item {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.command-item code {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
}

.command-item span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Toast Container */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: #151824;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  animation: slideIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 280px;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left: 4px solid var(--accent-green); }
.toast.error { border-left: 4px solid var(--accent-red); }
.toast.info { border-left: 4px solid var(--accent-cyan); }

/* Utilities */
.text-center { text-align: center; }
.text-success { color: var(--accent-green) !important; }
.py-4 { padding-top: 24px; padding-bottom: 24px; }
.p-3 { padding: 16px; }
.p-0 { padding: 0 !important; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 14px; }
.mb-4 { margin-bottom: 20px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 14px; }
.mt-4 { margin-top: 20px; }

/* Topbar Active Application Selector */
.topbar-app-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.topbar-app-select-wrap select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  padding: 2px 6px;
}

.topbar-app-select-wrap select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* Applications Cards & Badges */
.app-secret-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
}

.app-secret-wrap span {
  letter-spacing: 0.5px;
}

.badge-active-app {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

/* Discord Bot Environment Details */
.bot-env-details-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bot-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.bot-detail-row .detail-label {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.bot-detail-row .detail-value {
  color: var(--text-primary);
}

/* SDK Application Selector & Credentials Configuration Card */
.sdk-app-config-card {
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
  padding: 1.25rem;
}

.sdk-app-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sdk-app-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sdk-app-picker label {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sdk-app-select-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sdk-select-input {
  min-width: 240px;
  height: 38px;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-sm);
  padding: 0 12px;
}

.sdk-select-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.sdk-app-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sdk-credentials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 1rem;
}

.sdk-cred-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sdk-cred-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sdk-cred-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  word-break: break-all;
}

.sdk-secret-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cursor-pointer {
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.cursor-pointer:hover {
  opacity: 0.8;
  transform: scale(1.1);
}

.sdk-help-callout {
  margin-top: 1rem;
  padding: 12px 14px;
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sdk-help-icon {
  font-size: 1.25rem;
  padding-top: 2px;
}

.sdk-help-text {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.5;
}

.sdk-help-text strong {
  color: #4ade80;
  display: block;
  margin-bottom: 2px;
}

.sdk-help-text p {
  margin: 0;
}

.sdk-help-text code {
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 5px;
  border-radius: 4px;
  color: #38bdf8;
  font-family: 'JetBrains Mono', monospace;
}

/* Badge for application tags in tables */
.badge-app-tag {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.28);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .sidebar {
    width: 70px;
  }
  .brand-text, .nav-item span, .nav-badge, .admin-info, .btn-logout span {
    display: none;
  }
  .main-content {
    margin-left: 70px;
  }
  .dashboard-grid-2 {
    grid-template-columns: 1fr;
  }
  .topbar-app-select-wrap {
    display: none;
  }
}
