/* ==========================================================================
   THE AMERICAN GIRL™ — EXECUTIVE SAAS ADMIN PORTAL
   Ultra-Premium Dark Theme • Linear/Vercel/Stripe Aesthetic • Bespoke Craft
   ========================================================================== */

:root {
  --admin-bg: #070A10;
  --admin-sidebar-bg: #0B0F17;
  --admin-sidebar-border: rgba(255, 255, 255, 0.06);
  --admin-card-bg: #0F1522;
  --admin-card-header: #141C2E;
  --admin-card-border: rgba(255, 255, 255, 0.07);
  --admin-card-hover-border: rgba(229, 195, 88, 0.35);
  --admin-input-bg: #080C14;
  --admin-input-border: rgba(255, 255, 255, 0.1);
  --admin-input-focus: #E5C358;
  
  --gold-accent: #E5C358;
  --gold-light: #F7E5A0;
  --gold-gradient: linear-gradient(135deg, #F5DC7C 0%, #D4AF37 55%, #A87E17 100%);
  --gold-glow: rgba(229, 195, 88, 0.18);
  --coral-accent: #FF5A5F;
  --blue-accent: #38BDF8;
  --green-accent: #10B981;
  --purple-accent: #A855F7;
  
  --text-white: #FFFFFF;
  --text-light: #F1F5F9;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--admin-bg);
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--admin-bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(229, 195, 88, 0.35);
}

/* ==========================================================================
   1. AUTHENTICATION GATE SCREEN
   ========================================================================== */
.admin-auth-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 15%, #18233C 0%, #06090F 85%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 24px;
}

.admin-auth-card {
  background: rgba(15, 21, 34, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(229, 195, 88, 0.25);
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.9), 0 0 50px rgba(229, 195, 88, 0.08);
  border-radius: 22px;
  width: 100%;
  max-width: 440px;
  padding: 44px 38px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.admin-auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold-gradient);
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229, 195, 88, 0.08);
  color: var(--gold-accent);
  border: 1px solid rgba(229, 195, 88, 0.25);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.auth-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  color: var(--text-white);
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 26px;
  line-height: 1.4;
}

.auth-error {
  display: none;
  background: rgba(255, 90, 95, 0.1);
  border: 1px solid rgba(255, 90, 95, 0.35);
  color: #FFA5A8;
  padding: 11px 15px;
  border-radius: 10px;
  font-size: 0.82rem;
  margin-bottom: 20px;
  text-align: left;
}

.auth-error.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.auth-group {
  text-align: left;
  margin-bottom: 18px;
}

.auth-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  color: var(--text-subtle);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.auth-input {
  width: 100%;
  background: var(--admin-input-bg);
  border: 1px solid var(--admin-input-border);
  color: var(--text-white);
  font-size: 0.92rem;
  padding: 12px 14px 12px 42px;
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease;
}

.auth-input:focus {
  border-color: var(--gold-accent);
  box-shadow: 0 0 0 3px rgba(229, 195, 88, 0.18);
}

.auth-eye-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  display: flex;
  align-items: center;
}

.auth-submit-btn {
  width: 100%;
  background: var(--gold-gradient);
  color: #0A0E1A;
  border: none;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 13px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  box-shadow: 0 4px 16px rgba(229, 195, 88, 0.25);
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(229, 195, 88, 0.4);
}

/* ==========================================================================
   2. STANDALONE ADMIN PORTAL LAYOUT
   ========================================================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.admin-sidebar {
  width: 280px;
  background: var(--admin-sidebar-bg);
  border-right: 1px solid var(--admin-sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-sidebar-header {
  padding: 22px 20px;
  border-bottom: 1px solid var(--admin-sidebar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.sidebar-brand-logo {
  width: 38px;
  height: 38px;
  background: var(--gold-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #0A0E1A;
  font-size: 0.95rem;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 14px rgba(229, 195, 88, 0.25);
}

.sidebar-brand-text h3 {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.2;
  letter-spacing: 0.3px;
}

.sidebar-brand-text span {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gold-accent);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.sidebar-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-accent);
  box-shadow: 0 0 10px var(--green-accent);
  margin-right: 2px;
}

/* SIDEBAR NAV MENU */
.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

.sidebar-section-title {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-subtle);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 14px 14px 6px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2px;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
}

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

.sidebar-nav-item.active {
  background: linear-gradient(90deg, rgba(229, 195, 88, 0.14) 0%, rgba(229, 195, 88, 0.02) 100%);
  color: var(--gold-accent);
  border-left: 3px solid var(--gold-accent);
  font-weight: 700;
}

.sidebar-nav-label {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  opacity: 0.85;
}

.sidebar-nav-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-light);
}

.sidebar-nav-badge.badge-green {
  background: rgba(16, 185, 129, 0.14);
  color: var(--green-accent);
}

.sidebar-nav-badge.badge-gold {
  background: rgba(229, 195, 88, 0.14);
  color: var(--gold-accent);
}

/* SIDEBAR FOOTER (USER CARD) */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--admin-sidebar-border);
  background: rgba(8, 12, 20, 0.75);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 5;
  box-sizing: border-box;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 10px;
  border-radius: 12px;
  transition: all 0.2s ease;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

.sidebar-user-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(229, 195, 88, 0.2);
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #0A0E1A;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  box-shadow: 0 0 10px rgba(229, 195, 88, 0.25);
  flex-shrink: 0;
}

.sidebar-user-details {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.sidebar-user-details h4 {
  font-size: 0.74rem;
  color: var(--text-white);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 135px;
  display: block;
  line-height: 1.25;
}

.sidebar-user-details p {
  font-size: 0.65rem;
  color: var(--green-accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.sidebar-logout-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: rgba(255, 90, 95, 0.08);
  border: 1px solid rgba(255, 90, 95, 0.2);
  color: var(--coral-accent);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.sidebar-logout-btn:hover {
  background: rgba(255, 90, 95, 0.22);
  border-color: rgba(255, 90, 95, 0.45);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(255, 90, 95, 0.25);
  transform: scale(1.04);
}

/* ==========================================================================
   3. MAIN CONTENT WRAPPER
   ========================================================================== */
.admin-main {
  flex: 1;
  margin-left: 280px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* TOPBAR */
.admin-topbar {
  height: 64px;
  background: rgba(11, 15, 23, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--admin-sidebar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
}

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

.topbar-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--admin-sidebar-border);
  color: var(--text-white);
  font-size: 1.1rem;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.topbar-breadcrumb span {
  color: var(--text-white);
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gateway-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
}

.pill-stripe {
  background: rgba(99, 91, 255, 0.1);
  border: 1px solid rgba(99, 91, 255, 0.28);
  color: #A39BFF;
}

.pill-paypal {
  background: rgba(0, 112, 186, 0.1);
  border: 1px solid rgba(0, 112, 186, 0.28);
  color: #60B7FF;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-light);
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.topbar-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-white);
}

.topbar-btn-gold {
  background: rgba(229, 195, 88, 0.12);
  border-color: rgba(229, 195, 88, 0.28);
  color: var(--gold-accent);
}

.topbar-btn-gold:hover {
  background: var(--gold-accent);
  color: #0A0E1A;
}

/* ==========================================================================
   4. CONTENT BODY & TAB PANES
   ========================================================================== */
.admin-body {
  flex: 1;
  padding: 32px;
  max-width: 1400px;
  width: 100%;
}

.admin-pane {
  display: none;
  animation: fadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.pane-header {
  margin-bottom: 26px;
}

.pane-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.5px;
}

.pane-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   5. KPI STATS CARDS
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.kpi-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, rgba(255, 255, 255, 0) 100%), var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  border-radius: 16px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--admin-card-hover-border);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6), 0 0 20px var(--gold-glow);
}

.kpi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

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

.kpi-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.icon-revenue { background: rgba(229, 195, 88, 0.12); color: var(--gold-accent); }
.icon-orders { background: rgba(56, 189, 248, 0.12); color: var(--blue-accent); }
.icon-leads { background: rgba(16, 185, 129, 0.12); color: var(--green-accent); }
.icon-students { background: rgba(168, 85, 247, 0.12); color: var(--purple-accent); }

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.kpi-subtext {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.kpi-trend-up {
  color: var(--green-accent);
  font-weight: 700;
}

/* ==========================================================================
   6. CARDS, FORMS & INPUTS
   ========================================================================== */
.admin-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  border-radius: 16px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

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

.admin-card-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-card-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.admin-card-body {
  padding: 24px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--admin-input-bg);
  border: 1px solid var(--admin-input-border);
  color: var(--text-white);
  font-size: 0.88rem;
  padding: 10px 14px;
  border-radius: 8px;
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--gold-accent);
  box-shadow: 0 0 0 3px rgba(229, 195, 88, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 85px;
}

.form-input-help {
  font-size: 0.72rem;
  color: var(--text-subtle);
  margin-top: 4px;
}

/* TOGGLE SWITCH */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: 34px;
  transition: .25s ease;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .25s ease;
}

input:checked + .slider-round {
  background-color: var(--gold-accent);
}

input:checked + .slider-round:before {
  transform: translateX(20px);
  background-color: #070A10;
}

/* ACTION BUTTONS */
.btn-primary {
  background: var(--gold-gradient);
  color: #070A10;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(229, 195, 88, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(229, 195, 88, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  font-weight: 600;
  font-size: 0.84rem;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

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

.btn-danger {
  background: rgba(255, 90, 95, 0.1);
  border: 1px solid rgba(255, 90, 95, 0.3);
  color: var(--coral-accent);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

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

/* ==========================================================================
   7. DATA TABLES
   ========================================================================== */
.table-wrapper {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th {
  background: rgba(8, 12, 20, 0.5);
  padding: 12px 18px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--admin-card-border);
}

.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  color: var(--text-light);
  vertical-align: middle;
}

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

.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}

.tag-stripe { background: rgba(99, 91, 255, 0.12); color: #A39BFF; }
.tag-paypal { background: rgba(0, 112, 186, 0.12); color: #60B7FF; }
.tag-wire { background: rgba(229, 195, 88, 0.12); color: var(--gold-accent); }
.tag-completed { background: rgba(16, 185, 129, 0.12); color: var(--green-accent); }
.tag-refunded { background: rgba(255, 90, 95, 0.12); color: var(--coral-accent); }

/* ==========================================================================
   8. MODALS & TOAST NOTIFICATION
   ========================================================================== */
.admin-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-modal-overlay.active {
  display: flex;
}

.admin-modal {
  background: var(--admin-card-bg);
  border: 1px solid rgba(229, 195, 88, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  border-radius: 18px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

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

.admin-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.admin-modal-close:hover {
  color: var(--text-white);
}

.admin-modal-body {
  padding: 24px;
}

/* FLOATING TOAST */
.admin-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #141C2E;
  border: 1px solid var(--gold-accent);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 20px var(--gold-glow);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 999999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* SUB-TABS NAVIGATION (LUXURY SEGMENTED CONTROL) */
.subtabs-wrapper {
  margin-bottom: 24px;
}

.subtabs-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 21, 34, 0.75);
  border: 1px solid var(--admin-card-border);
  padding: 6px;
  border-radius: 14px;
  backdrop-filter: blur(16px);
  max-width: 100%;
  overflow-x: auto;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
}

.subtab-btn:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.04);
}

.subtab-btn.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border-color: rgba(229, 195, 88, 0.35);
  color: var(--text-white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 16px rgba(229, 195, 88, 0.08);
}

.subtab-icon-badge {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: -0.5px;
}

.subtab-icon-badge.stripe {
  background: #635BFF;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(99, 91, 255, 0.35);
}

.subtab-icon-badge.paypal {
  background: #0070BA;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 112, 186, 0.35);
}

.subtab-icon-badge.wire {
  background: #059669;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
}

.subtab-title {
  font-weight: 600;
}

.subtab-status-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  transition: all 0.2s;
}

.subtab-status-pill.pill-active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-accent);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.subtab-status-pill.pill-test {
  background: rgba(229, 195, 88, 0.15);
  color: var(--gold-accent);
  border: 1px solid rgba(229, 195, 88, 0.3);
}

/* ENVIRONMENT MODE LUXURY CARD */
.env-mode-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 22px;
  gap: 15px;
  flex-wrap: wrap;
}

.env-mode-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.env-mode-title {
  color: var(--text-white);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.env-mode-status {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.env-mode-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.env-label-test {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.env-label-live {
  font-size: 0.78rem;
  color: var(--green-accent);
  font-weight: 700;
}

.gateway-subtab-pane {
  animation: fadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }
  .topbar-menu-toggle {
    display: block;
  }
  .form-grid-2, .form-grid-3 {
    grid-template-columns: 1fr;
  }
}
