/**
 * ═══════════════════════════════════════════════════════════
 *   ADREON KIDS — Payment & Subscription UI Styles
 *   Modals · Premium locks · Upgrade popup · Payment forms
 *   Demo payment · Success/failure screens · Admin UI
 * ═══════════════════════════════════════════════════════════
 */

/* ══════════════════════════════════════════════════════════
   BASE MODAL SYSTEM
══════════════════════════════════════════════════════════ */
.ak-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 30, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: overlayFadeIn 0.25s ease;
}

.ak-modal-overlay.closing {
  animation: overlayFadeOut 0.3s ease forwards;
}

@keyframes overlayFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlayFadeOut { from { opacity: 1; } to { opacity: 0; } }

.ak-modal {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 80px rgba(108, 60, 225, 0.25);
  animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.ak-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f0f0f5;
  color: #666;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  z-index: 10;
}
.ak-modal-close:hover { background: #e0e0ea; color: #333; }

/* ══════════════════════════════════════════════════════════
   UPGRADE POPUP
══════════════════════════════════════════════════════════ */
.upgrade-modal { max-width: 600px; }

.upgrade-modal-header { text-align: center; margin-bottom: 24px; }
.upgrade-modal-emoji  { font-size: 3rem; margin-bottom: 8px; }
.upgrade-modal-title  { font-size: 1.6rem; font-weight: 800; color: #1a1a2e; margin-bottom: 8px; }
.upgrade-modal-subtitle { color: #666; font-size: 0.95rem; }

/* Plan toggle */
.upgrade-plan-toggle {
  display: flex;
  background: #f0f0f8;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}
.plan-toggle-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 9px;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.plan-toggle-btn.active {
  background: #fff;
  color: #6C3CE1;
  box-shadow: 0 2px 8px rgba(108, 60, 225, 0.15);
}
.plan-toggle-badge {
  background: #FF6B6B;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

/* Plan cards grid */
.upgrade-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 540px) {
  .upgrade-plans-grid { grid-template-columns: 1fr; }
}

.upgrade-plan-card {
  border: 2px solid #e8e8f0;
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  background: #fafafa;
}
.upgrade-plan-card:hover { border-color: #6C3CE1; background: #f8f7ff; }
.upgrade-plan-card.selected { border-color: #6C3CE1; background: #f0ecff; }
.upgrade-plan-card.best-value { border-color: #6C3CE1; }

.plan-best-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #6C3CE1, #FF6B6B);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.plan-card-name  { font-size: 0.8rem; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.plan-price-amount { font-size: 1.4rem; font-weight: 800; color: #1a1a2e; }
.plan-price-period { font-size: 0.8rem; color: #888; }

.plan-card-features {
  list-style: none;
  margin: 10px 0;
  padding: 0;
  font-size: 0.78rem;
  color: #555;
  line-height: 1.8;
}

.plan-select-btn {
  width: 100%;
  padding: 8px;
  border: 2px solid #6C3CE1;
  border-radius: 8px;
  background: transparent;
  color: #6C3CE1;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}
.plan-select-btn.selected,
.plan-select-btn:hover { background: #6C3CE1; color: #fff; }

.plan-current-badge {
  text-align: center;
  font-size: 0.75rem;
  color: #888;
  margin-top: 8px;
  padding: 6px;
  background: #f0f0f5;
  border-radius: 6px;
}

/* CTA area */
.upgrade-cta-area { margin-bottom: 16px; }
.upgrade-proceed-btn {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 14px;
  background: linear-gradient(135deg, #6C3CE1, #9B59B6);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(108, 60, 225, 0.35);
}
.upgrade-proceed-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(108, 60, 225, 0.45); }

.upgrade-secure-note {
  text-align: center;
  font-size: 0.78rem;
  color: #888;
  margin-top: 8px;
}

.upgrade-features-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  font-size: 0.78rem;
  color: #555;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

/* ══════════════════════════════════════════════════════════
   PREMIUM LOCK OVERLAYS
══════════════════════════════════════════════════════════ */
.premium-locked { overflow: hidden; }

.premium-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(108, 60, 225, 0.85);
  backdrop-filter: blur(3px);
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity 0.3s;
}

.premium-lock-content { text-align: center; color: #fff; padding: 16px; }
.premium-lock-icon    { font-size: 2rem; margin-bottom: 6px; }
.premium-lock-text    { font-size: 0.85rem; font-weight: 700; margin-bottom: 10px; }

.btn-premium-sm {
  padding: 6px 16px;
  background: #fff;
  color: #6C3CE1;
  border: none;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-premium-sm:hover { background: #f0ecff; transform: scale(1.05); }

/* Premium badge on cards */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #6C3CE1, #9B59B6);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════════════════════
   DEMO PAYMENT MODAL
══════════════════════════════════════════════════════════ */
.demo-payment-modal { max-width: 440px; padding: 0; overflow: hidden; }

.demo-payment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
}
.demo-rzp-logo { display: flex; align-items: center; gap: 8px; }
.demo-badge {
  background: #FF6B6B;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.demo-payment-body { padding: 20px; }

.demo-merchant-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}
.demo-merchant-logo { font-size: 2rem; }
.demo-merchant-name { font-weight: 700; font-size: 1rem; }
.demo-order-desc    { font-size: 0.8rem; color: #888; }

.demo-amount-display { text-align: center; margin-bottom: 20px; }
.demo-amount-label   { font-size: 0.75rem; color: #888; text-transform: uppercase; letter-spacing: 1px; }
.demo-amount-value   { font-size: 2rem; font-weight: 800; color: #1a1a2e; margin: 4px 0; }
.demo-amount-breakdown { font-size: 0.75rem; color: #888; }

.demo-payment-methods {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.demo-method-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}
.demo-method-tab.active { border-color: #6C3CE1; background: #f0ecff; color: #6C3CE1; font-weight: 600; }

.demo-card-form { margin-bottom: 16px; }
.demo-field { margin-bottom: 12px; }
.demo-field label { display: block; font-size: 0.75rem; font-weight: 600; color: #555; margin-bottom: 4px; }
.demo-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #f8f8f8;
  color: #333;
}
.demo-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.demo-pay-note {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.75rem;
  color: #795548;
  margin-bottom: 16px;
  line-height: 1.5;
}

.demo-pay-btn  { width: 100%; margin-bottom: 8px; padding: 14px; font-size: 0.95rem; }
.demo-fail-btn { width: 100%; padding: 10px; font-size: 0.85rem; }

/* ══════════════════════════════════════════════════════════
   PAYMENT LOADER
══════════════════════════════════════════════════════════ */
.payment-loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 30, 0.6);
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.payment-loader-box {
  background: #fff;
  border-radius: 16px;
  padding: 32px 40px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
}
.payment-loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f0ecff;
  border-top-color: #6C3CE1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.payment-loader-box p { color: #555; font-size: 0.9rem; }

/* ══════════════════════════════════════════════════════════
   PAYMENT SUCCESS MODAL
══════════════════════════════════════════════════════════ */
.payment-success-modal { text-align: center; max-width: 480px; }

/* Animated checkmark */
.payment-success-animation { margin-bottom: 20px; }
.success-checkmark { width: 80px; height: 80px; margin: 0 auto; }
.check-icon {
  width: 80px;
  height: 80px;
  position: relative;
  border-radius: 50%;
  box-sizing: content-box;
  border: 4px solid #4CAF50;
}
.check-icon::before {
  top: 3px;
  left: -2px;
  width: 30px;
  transform-origin: 100% 50%;
  border-radius: 100px 0 0 100px;
}
.check-icon::after {
  top: 0;
  left: 30px;
  width: 60px;
  transform-origin: 0 50%;
  border-radius: 0 100px 100px 0;
  animation: rotate-circle 4.25s ease-in;
}
.check-icon::before, .check-icon::after {
  content: '';
  height: 100px;
  position: absolute;
  background: #fff;
  transform: rotate(-45deg);
}
.icon-line {
  height: 5px;
  background-color: #4CAF50;
  display: block;
  border-radius: 2px;
  position: absolute;
  z-index: 10;
}
.icon-line.line-tip {
  top: 46px;
  left: 14px;
  width: 25px;
  transform: rotate(45deg);
  animation: icon-line-tip 0.75s;
}
.icon-line.line-long {
  top: 38px;
  right: 8px;
  width: 47px;
  transform: rotate(-45deg);
  animation: icon-line-long 0.75s;
}
.icon-circle {
  top: -4px;
  left: -4px;
  z-index: 10;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  position: absolute;
  box-sizing: content-box;
  border: 4px solid rgba(76, 175, 80, 0.5);
}
.icon-fix {
  top: 8px;
  width: 5px;
  left: 26px;
  z-index: 1;
  height: 85px;
  position: absolute;
  transform: rotate(-45deg);
  background-color: #fff;
}
@keyframes icon-line-tip {
  0%   { width: 0; left: 1px;  top: 19px; }
  54%  { width: 0; left: 1px;  top: 19px; }
  70%  { width: 50px; left: -8px; top: 37px; }
  84%  { width: 17px; left: 21px; top: 48px; }
  100% { width: 25px; left: 14px; top: 46px; }
}
@keyframes icon-line-long {
  0%   { width: 0; right: 46px; top: 54px; }
  65%  { width: 0; right: 46px; top: 54px; }
  84%  { width: 55px; right: 0px; top: 35px; }
  100% { width: 47px; right: 8px; top: 38px; }
}

.payment-success-title    { font-size: 1.6rem; font-weight: 800; color: #1a1a2e; margin-bottom: 8px; }
.payment-success-subtitle { color: #555; margin-bottom: 20px; }

.payment-success-details {
  background: #f8f7ff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
}
.success-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid #eee;
}
.success-detail-row:last-child { border-bottom: none; }
.success-detail-val  { font-weight: 600; color: #333; font-size: 0.8rem; word-break: break-all; }
.success-amount      { color: #4CAF50; font-size: 1rem !important; }

.payment-success-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.payment-success-actions .btn { flex: 1; min-width: 140px; }

.payment-success-email {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 16px;
}

.payment-success-close {
  background: none;
  border: none;
  color: #6C3CE1;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
  transition: opacity 0.2s;
}
.payment-success-close:hover { opacity: 0.7; }

/* ══════════════════════════════════════════════════════════
   PAYMENT FAILURE MODAL
══════════════════════════════════════════════════════════ */
.payment-failure-modal { text-align: center; max-width: 400px; }
.payment-failure-icon  { font-size: 3.5rem; margin-bottom: 12px; }
.payment-failure-title { font-size: 1.4rem; font-weight: 800; color: #1a1a2e; margin-bottom: 8px; }
.payment-failure-msg   { color: #666; margin-bottom: 20px; font-size: 0.9rem; }
.payment-failure-actions { display: flex; gap: 12px; margin-bottom: 16px; }
.payment-failure-actions .btn { flex: 1; }
.payment-failure-note  { font-size: 0.78rem; color: #888; }

/* ══════════════════════════════════════════════════════════
   AUTH MODAL (Login / Register)
══════════════════════════════════════════════════════════ */
.auth-modal { max-width: 440px; }
.auth-modal-header { text-align: center; margin-bottom: 24px; }
.auth-modal-logo   { font-size: 2rem; margin-bottom: 8px; }
.auth-modal-title  { font-size: 1.4rem; font-weight: 800; color: #1a1a2e; }
.auth-modal-subtitle { color: #888; font-size: 0.85rem; margin-top: 4px; }

.auth-tabs {
  display: flex;
  background: #f0f0f8;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-tab.active { background: #fff; color: #6C3CE1; box-shadow: 0 2px 8px rgba(108,60,225,0.12); }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-field label { font-size: 0.8rem; font-weight: 600; color: #555; }
.auth-input {
  padding: 12px 14px;
  border: 2px solid #e8e8f0;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  outline: none;
}
.auth-input:focus { border-color: #6C3CE1; }
.auth-input.error { border-color: #FF6B6B; }

.auth-error {
  background: #fff0f0;
  border: 1px solid #ffcdd2;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.82rem;
  color: #c62828;
  display: none;
}
.auth-error.visible { display: block; }

.auth-submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #6C3CE1, #9B59B6);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}
.auth-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(108,60,225,0.3); }
.auth-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ccc;
  font-size: 0.8rem;
  margin: 4px 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #eee;
}

.auth-switch {
  text-align: center;
  font-size: 0.85rem;
  color: #888;
  margin-top: 8px;
}
.auth-switch a { color: #6C3CE1; font-weight: 600; cursor: pointer; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
══════════════════════════════════════════════════════════ */
.ak-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.ak-toast {
  background: #fff;
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 280px;
  max-width: 360px;
  pointer-events: all;
  animation: toastSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-left: 4px solid #6C3CE1;
}
.ak-toast.removing { animation: toastSlideOut 0.3s ease forwards; }

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

.ak-toast-icon  { font-size: 1.3rem; flex-shrink: 0; }
.ak-toast-body  { flex: 1; }
.ak-toast-title { font-weight: 700; font-size: 0.9rem; color: #1a1a2e; }
.ak-toast-msg   { font-size: 0.8rem; color: #666; margin-top: 2px; }

/* ══════════════════════════════════════════════════════════
   SUBSCRIPTION PAGE STYLES
══════════════════════════════════════════════════════════ */
.sub-page { min-height: 100vh; background: #f8f7ff; padding: 80px 0 60px; }
.sub-container { max-width: 900px; margin: 0 auto; padding: 0 24px; }

.sub-page-header { margin-bottom: 32px; }
.sub-page-title  { font-size: 2rem; font-weight: 800; color: #1a1a2e; }
.sub-page-sub    { color: #666; margin-top: 4px; }

/* Current plan card */
.sub-plan-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(108,60,225,0.08);
  border: 2px solid transparent;
}
.sub-plan-card.premium { border-color: #6C3CE1; }

.sub-plan-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.sub-plan-name   { font-size: 1.3rem; font-weight: 800; color: #1a1a2e; }
.sub-plan-badge  {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}
.sub-plan-badge.active   { background: #d4edda; color: #155724; }
.sub-plan-badge.free     { background: #f0f0f5; color: #666; }
.sub-plan-badge.expired  { background: #fdecea; color: #c62828; }
.sub-plan-badge.cancelled{ background: #fff3e0; color: #e65100; }

.sub-plan-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 20px; }
.sub-detail-item  { }
.sub-detail-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #888; margin-bottom: 4px; }
.sub-detail-value { font-size: 0.95rem; font-weight: 600; color: #1a1a2e; }

.sub-days-bar { margin-bottom: 20px; }
.sub-days-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: #888; margin-bottom: 6px; }
.sub-days-track { height: 8px; background: #f0f0f5; border-radius: 4px; overflow: hidden; }
.sub-days-fill  { height: 100%; background: linear-gradient(90deg, #6C3CE1, #9B59B6); border-radius: 4px; transition: width 0.6s ease; }

.sub-plan-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Payment history */
.sub-history-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(108,60,225,0.08);
}
.sub-history-title { font-size: 1.1rem; font-weight: 700; color: #1a1a2e; margin-bottom: 20px; }

.sub-history-table { width: 100%; border-collapse: collapse; }
.sub-history-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  padding: 8px 12px;
  border-bottom: 2px solid #f0f0f5;
}
.sub-history-table td {
  padding: 12px;
  font-size: 0.85rem;
  border-bottom: 1px solid #f5f5f8;
  color: #333;
}
.sub-history-table tr:last-child td { border-bottom: none; }
.sub-history-table tr:hover td { background: #fafafa; }

.payment-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}
.payment-status-badge.success { background: #d4edda; color: #155724; }
.payment-status-badge.failed  { background: #fdecea; color: #c62828; }
.payment-status-badge.pending { background: #fff3e0; color: #e65100; }

.sub-empty-state { text-align: center; padding: 40px; color: #888; }
.sub-empty-icon  { font-size: 3rem; margin-bottom: 12px; }

/* Upgrade CTA banner */
.sub-upgrade-banner {
  background: linear-gradient(135deg, #6C3CE1, #9B59B6);
  border-radius: 20px;
  padding: 28px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.sub-upgrade-text h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 4px; }
.sub-upgrade-text p  { font-size: 0.85rem; opacity: 0.85; }
.btn-upgrade-white {
  background: #fff;
  color: #6C3CE1;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-upgrade-white:hover { transform: scale(1.05); }

/* ══════════════════════════════════════════════════════════
   ADMIN DASHBOARD STYLES
══════════════════════════════════════════════════════════ */
.admin-page { min-height: 100vh; background: #f0f0f8; }

.admin-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 240px;
  background: #1a1a2e;
  padding: 24px 0;
  z-index: 100;
  overflow-y: auto;
}
.admin-logo {
  padding: 0 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 16px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}
.admin-logo span { color: #6C3CE1; }

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.admin-nav-item:hover { color: #fff; background: rgba(255,255,255,0.05); }
.admin-nav-item.active { color: #fff; background: rgba(108,60,225,0.2); border-left-color: #6C3CE1; }
.admin-nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }

.admin-main {
  margin-left: 240px;
  padding: 32px;
  min-height: 100vh;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-page-title { font-size: 1.5rem; font-weight: 800; color: #1a1a2e; }
.admin-topbar-actions { display: flex; gap: 10px; }

/* Metric cards */
.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.admin-metric-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}
.admin-metric-card:hover { transform: translateY(-2px); }
.admin-metric-icon  { font-size: 1.5rem; margin-bottom: 10px; }
.admin-metric-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #888; margin-bottom: 4px; }
.admin-metric-value { font-size: 1.6rem; font-weight: 800; color: #1a1a2e; }
.admin-metric-sub   { font-size: 0.75rem; color: #888; margin-top: 4px; }
.admin-metric-growth { font-size: 0.75rem; font-weight: 700; margin-top: 4px; }
.admin-metric-growth.up   { color: #4CAF50; }
.admin-metric-growth.down { color: #FF6B6B; }

/* Chart area */
.admin-chart-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 24px;
}
.admin-chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.admin-chart-title  { font-size: 1rem; font-weight: 700; color: #1a1a2e; }

/* Bar chart */
.admin-bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 160px; }
.admin-bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.admin-bar {
  width: 100%;
  background: linear-gradient(180deg, #6C3CE1, #9B59B6);
  border-radius: 6px 6px 0 0;
  min-height: 4px;
  transition: height 0.6s ease;
  position: relative;
}
.admin-bar:hover::after {
  content: attr(data-value);
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  color: #fff;
  font-size: 0.7rem;
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.admin-bar-label { font-size: 0.65rem; color: #888; text-align: center; }

/* Data table */
.admin-table-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 24px;
  overflow-x: auto;
}
.admin-table-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.admin-table-title  { font-size: 1rem; font-weight: 700; color: #1a1a2e; }

.admin-search {
  padding: 8px 14px;
  border: 2px solid #e8e8f0;
  border-radius: 10px;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
  width: 220px;
}
.admin-search:focus { border-color: #6C3CE1; }

.admin-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.admin-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  padding: 10px 12px;
  border-bottom: 2px solid #f0f0f5;
  white-space: nowrap;
}
.admin-table td {
  padding: 12px;
  font-size: 0.85rem;
  border-bottom: 1px solid #f5f5f8;
  color: #333;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafafa; }

.admin-user-cell { display: flex; align-items: center; gap: 10px; }
.admin-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6C3CE1, #9B59B6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}
.admin-user-name  { font-weight: 600; font-size: 0.88rem; }
.admin-user-email { font-size: 0.75rem; color: #888; }

.admin-plan-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}
.admin-plan-badge.free     { background: #f0f0f5; color: #666; }
.admin-plan-badge.monthly  { background: #e3f2fd; color: #1565c0; }
.admin-plan-badge.yearly   { background: #f3e5f5; color: #6a1b9a; }
.admin-plan-badge.expired  { background: #fdecea; color: #c62828; }

.admin-action-btn {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid #e8e8f0;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: #555;
}
.admin-action-btn:hover { border-color: #6C3CE1; color: #6C3CE1; }
.admin-action-btn.danger:hover { border-color: #FF6B6B; color: #FF6B6B; }

/* Tabs */
.admin-tabs { display: flex; gap: 4px; background: #f0f0f8; border-radius: 12px; padding: 4px; margin-bottom: 24px; }
.admin-tab  {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 9px;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.admin-tab.active { background: #fff; color: #6C3CE1; box-shadow: 0 2px 8px rgba(108,60,225,0.12); }

/* Responsive admin */
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; padding: 16px; }
  .admin-metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════════════════
   UTILITY BUTTONS
══════════════════════════════════════════════════════════ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: 10px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; border: none; text-decoration: none; }
.btn-primary  { background: #6C3CE1; color: #fff; }
.btn-primary:hover  { background: #5a2fd4; transform: translateY(-1px); }
.btn-outline  { background: transparent; color: #6C3CE1; border: 2px solid #6C3CE1; }
.btn-outline:hover  { background: #f0ecff; }
.btn-ghost    { background: #f0f0f5; color: #555; }
.btn-ghost:hover    { background: #e8e8f0; }
.btn-danger   { background: #fdecea; color: #c62828; }
.btn-danger:hover   { background: #ffcdd2; }
.btn-premium  { background: linear-gradient(135deg, #6C3CE1, #9B59B6); color: #fff; box-shadow: 0 4px 16px rgba(108,60,225,0.3); }
.btn-premium:hover  { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(108,60,225,0.4); }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }