/* =========================================================
   Hipa Dating App — Admin Panel Stylesheet
   Brand: Hipa — Modern Dark Luxury Aesthetic matching Website
   ========================================================= */

.admin-layout {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  background: #090514;
  background-image: 
    radial-gradient(at 0% 0%, rgba(255, 0, 127, 0.16) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(121, 40, 202, 0.2) 0px, transparent 50%);
  color: var(--text-main);
  position: relative;
  overflow-x: hidden;
}

.admin-sidebar {
  width: 270px;
  background: rgba(14, 7, 26, 0.9);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-right: 1px solid rgba(255, 0, 127, 0.18);
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 24px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}

.admin-brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ff007f 0%, #ff2a85 50%, #7928ca 100%);
  box-shadow: 0 4px 18px rgba(255, 0, 127, 0.45);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #ffffff;
  flex-shrink: 0;
}

.admin-brand-title {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #ffffff 40%, #ff8bb8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.admin-nav-item:hover {
  background: rgba(255, 0, 127, 0.08);
  color: #ffffff;
  transform: translateX(2px);
}

.admin-nav-item.active {
  background: linear-gradient(90deg, rgba(255, 0, 127, 0.22) 0%, rgba(121, 40, 202, 0.15) 100%);
  color: #ffffff;
  border-left: 3px solid var(--accent-pink);
  box-shadow: inset 0 0 14px rgba(255, 0, 127, 0.15);
}

.admin-nav-badge {
  margin-left: auto;
  background: linear-gradient(135deg, #ff007f, #a855f7);
  box-shadow: 0 2px 8px rgba(255, 0, 127, 0.4);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.admin-main {
  flex: 1;
  padding: 30px 40px;
  overflow-y: auto;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.kpi-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(20, 10, 36, 0.65);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 0, 127, 0.4);
  box-shadow: 0 14px 40px rgba(255, 0, 127, 0.25);
}

.kpi-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}

.kpi-val {
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 50%, #ff8bb8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.kpi-sub {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  gap: 4px;
}
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Glass Table */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border-subtle);
  background: var(--glass-bg-subtle);
  backdrop-filter: var(--glass-blur);
  margin-bottom: 24px;
}

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

.glass-table th {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.glass-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: middle;
}

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

/* Status Badges */
.badge-status {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-block;
}

.badge-active { background: rgba(46, 230, 166, 0.2); color: #2ee6a6; border: 1px solid rgba(46, 230, 166, 0.4); }
.badge-banned { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-pending { background: rgba(255, 209, 102, 0.2); color: #ffd166; border: 1px solid rgba(255, 209, 102, 0.4); }

/* Verification Side-by-Side */
.verify-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.verify-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.verify-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.verify-photo-box {
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: #150d2c;
}

.verify-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.verify-photo-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.65);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* =========================================================
   API & Gateway Hub Styles
   ========================================================= */
.api-hub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.api-tab-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.api-tab-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.api-tab-btn.active {
  background: linear-gradient(135deg, #7928ca, #ff0080);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(255, 0, 128, 0.3);
}

.gateway-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.gateway-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: var(--transition-smooth);
}

.gateway-card.active-gateway {
  border-color: #2ee6a6;
  box-shadow: 0 0 16px rgba(46, 230, 166, 0.2);
}

.gateway-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gateway-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gateway-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: rgba(255, 255, 255, 0.1);
}

.gateway-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.status-active {
  background: rgba(46, 230, 166, 0.2);
  color: #2ee6a6;
  border: 1px solid rgba(46, 230, 166, 0.4);
}

.status-idle {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.status-test {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.input-with-action {
  display: flex;
  position: relative;
  align-items: center;
}

.input-with-action .glass-input {
  padding-right: 42px;
}

.input-action-btn {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.input-action-btn:hover {
  color: #ffffff;
}

.test-result-box {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  display: none;
  animation: fadeIn 0.3s ease;
}

.test-result-box.success {
  display: block;
  background: rgba(46, 230, 166, 0.15);
  border: 1px solid rgba(46, 230, 166, 0.35);
  color: #2ee6a6;
}

.test-result-box.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

.test-result-box.loading {
  display: block;
  background: rgba(124, 92, 255, 0.15);
  border: 1px solid rgba(124, 92, 255, 0.35);
  color: #c4b5fd;
}

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

@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .admin-main {
    padding: 18px;
  }
}

/* =========================================================
   Custom APIs Badges & Switches
   ========================================================= */
.badge-method {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  display: inline-block;
}
.badge-method-post {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}
.badge-method-get {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}
.badge-method-put {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.badge-method-delete {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.switch-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}
.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.2s;
  border-radius: 24px;
}
.slider-round:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}
.switch-toggle input:checked + .slider-round {
  background: linear-gradient(135deg, #10b981, #059669);
}
.switch-toggle input:checked + .slider-round:before {
  transform: translateX(20px);
}
