/* ========================================================================== */
/* ADMIN DASHBOARD STYLES — MUHAMMAD SHEHZAD AI STUDIO                       */
/* ========================================================================== */

body.admin-body {
  background: #080c14;
  color: #f1f5f9;
  font-family: 'Plus Jakarta Sans', sans-serif;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.admin-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Admin Login Wrap */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 20%, rgba(255, 42, 75, 0.12) 0%, transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(147, 51, 234, 0.1) 0%, transparent 50%),
              #080c14;
}

.admin-login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(255, 42, 75, 0.2);
}

.admin-logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.admin-login-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.admin-login-desc {
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 22px;
}

/* Admin Top Bar */
.admin-topbar {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

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

.admin-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
}

.brand-sub {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* KPI Stats */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition-fast);
}

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

.stat-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-icon-wrap.bg-blue { background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); }
.stat-icon-wrap.bg-emerald { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); }
.stat-icon-wrap.bg-amber { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); }
.stat-icon-wrap.bg-rose { background: rgba(255, 42, 75, 0.15); border: 1px solid rgba(255, 42, 75, 0.3); }

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

.stat-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

/* Panel Card */
.admin-panel-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.panel-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.panel-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.panel-subtitle {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Filter Bar */
.admin-filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

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

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: var(--text-dim);
}

.admin-search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 10px 14px 10px 38px;
  color: #ffffff;
  font-size: 0.88rem;
  outline: none;
  transition: all var(--transition-fast);
}

.admin-search-input:focus {
  border-color: #ff2a4b;
  box-shadow: 0 0 14px rgba(255, 42, 75, 0.25);
}

.admin-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #ffffff;
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
}

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

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.86rem;
}

.admin-table th {
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-dim);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

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

.user-cell-title {
  font-weight: 700;
  color: #ffffff;
}

.user-cell-sub {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.user-phone-link {
  color: #34d399;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.user-phone-link:hover {
  text-decoration: underline;
}

/* Quota Mini Bar */
.mini-progress-bar {
  width: 120px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}

.mini-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  transition: width 0.3s ease;
}

.mini-progress-fill.warn {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

/* Plan Badges in Table */
.plan-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
}

.plan-pill.pending {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.6);
  color: #fbbf24;
}

.plan-pill.demo {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.plan-pill.starter {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.plan-pill.pro {
  background: rgba(255, 42, 75, 0.15);
  border: 1px solid rgba(255, 42, 75, 0.4);
  color: #ff5c7c;
}

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

.plan-pill.custom {
  background: rgba(147, 51, 234, 0.15);
  border: 1px solid rgba(147, 51, 234, 0.4);
  color: #c084fc;
}

.table-action-btns {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.btn-icon-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon-action:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-icon-action.btn-action-activate {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-weight: 700;
}

.btn-icon-action.btn-action-activate:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
}

.btn-icon-action.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

@media (max-width: 900px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }
  .topbar-actions .btn span {
    font-size: 0.78rem;
  }
}

