/* Admin Panel Styles */

.admin-body {
  display: flex;
  min-height: 100vh;
  background: #f5f5f7;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1d1d1f;
}

/* Sidebar */
.admin-sidebar {
  width: 240px;
  background: #1d1d1f;
  color: #f5f5f7;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.admin-sidebar-header {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #333;
  font-size: 1.125rem;
  font-weight: 700;
}

.admin-nav {
  flex: 1;
  padding: 12px 8px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #999;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.15s;
  margin-bottom: 2px;
}

.admin-nav-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.admin-nav-link:hover {
  background: #333;
  color: #f5f5f7;
}

.admin-nav-link.active {
  background: #0071e3;
  color: #fff;
}

.admin-sidebar-footer {
  padding: 12px;
  border-top: 1px solid #333;
}

.admin-token-input input {
  background: #2d2d2f;
  color: #f5f5f7;
  border: 1px solid #444;
  width: 100%;
  box-sizing: border-box;
}

/* Main area */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-header {
  background: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5e5e7;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-header-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.admin-header-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: #fce8e8;
  color: #c41e3a;
}

.admin-header-status.connected {
  background: #e8f5e9;
  color: #2e7d32;
}

.admin-content {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

/* Cards */
.admin-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e5e7;
  margin-bottom: 16px;
}

.admin-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e5e7;
  font-weight: 600;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-card-body {
  padding: 20px;
  overflow-x: auto;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-box {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e5e7;
  padding: 20px;
}

.stat-box-label {
  font-size: 0.8125rem;
  color: #6e6e73;
  font-weight: 500;
  margin-bottom: 4px;
}

.stat-box-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1d1d1f;
}

.stat-box-sub {
  font-size: 0.8125rem;
  color: #6e6e73;
  margin-top: 4px;
}

/* Tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.admin-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  color: #6e6e73;
  border-bottom: 1px solid #e5e5e7;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f2;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: #fafafa;
}

.admin-table .mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-active {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-pending {
  background: #fff8e1;
  color: #f57f17;
}

.badge-inactive {
  background: #fce8e8;
  color: #c41e3a;
}

/* Buttons */
.btn-xs {
  padding: 4px 10px;
  font-size: 0.75rem;
}

/* Toast */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 8px;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 300ms ease;
  pointer-events: none;
}

.admin-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.admin-toast.success { background: #2e7d32; }
.admin-toast.error { background: #c41e3a; }
.admin-toast.info { background: #1565c0; }

/* Form compact */
.form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-compact .form-input,
.form-compact .form-select {
  padding: 8px 12px;
  font-size: 0.8125rem;
}

/* Status indicator */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-dot.active { background: #2e7d32; }
.status-dot.pending { background: #f57f17; }
.status-dot.disabled { background: #c41e3a; }

/* Provider key display */
.key-masked {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  color: #6e6e73;
}
