/* ==========================================================================
   AZERION.UZ — WOTLK 3.3.5a PLAYER ACCOUNT PORTAL DESIGN SYSTEM
   Visual Identity: Northrend Atmosphere, Deep Navy, Icy Blue & Frost
   Consistent with the Azerion.uz Homepage
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800;900&family=Cinzel+Decorative:wght@700;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Core Cold Northrend Palette */
  --bg-main: #050B14;
  --bg-secondary: #07111D;
  --bg-tertiary: #081522;
  --bg-card: #0B1724;
  --bg-card-hover: #0E1C2A;
  --bg-card-alt: rgba(11, 23, 36, 0.9);

  /* Cold Metallic & Frost Borders */
  --border-cold: #145B78;
  --border-cold-hover: #1C6F92;
  --border-subtle: rgba(20, 91, 120, 0.45);
  --border-highlight: rgba(86, 200, 255, 0.35);

  /* Primary Azerion Cold Accents */
  --accent-primary: #168FC7;
  --accent-ice: #56C8FF;
  --accent-frost: #B9EFFF;
  --accent-glow: rgba(86, 200, 255, 0.22);
  --accent-glow-strong: rgba(86, 200, 255, 0.45);

  /* Text Colors */
  --text-primary: #E6F7FF;
  --text-secondary: #9BAEBB;
  --text-muted: #6B8294;
  --text-dark: #050B14;

  /* Secondary Gold Accents (Rank 1, Achievements, Legendaries only) */
  --gold-primary: #D4AF37;
  --gold-light: #FCE7A1;
  --gold-dark: #8B6B32;
  --gold-glow: rgba(212, 175, 55, 0.35);

  /* WoW Quality Colors (WotLK Standard) */
  --q-poor: #9d9d9d;
  --q-common: #ffffff;
  --q-uncommon: #1eff00;
  --q-rare: #0070dd;
  --q-epic: #a335ee;
  --q-legendary: #ff8000;
  --q-artifact: #e6cc80;
  --q-heirloom: #e6cc80;

  /* Typography */
  --font-serif: 'Cinzel', 'Cinzel Decorative', Georgia, serif;
  --font-serif-title: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout & Sizing */
  --sidebar-width: 275px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg-main);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-secondary);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Typography Helpers */
h1, h2, h3, h4, .font-fantasy {
  font-family: var(--font-serif);
  color: var(--text-primary);
  letter-spacing: 0.04em;
  font-weight: 700;
}

/* Cold Northrend Gradient Typography */
.frost-gradient-text, .gold-gradient-text {
  background: linear-gradient(135deg, #FFFFFF 0%, var(--accent-frost) 45%, var(--accent-ice) 75%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Specific Gold Accent Typography for Select Rewards / Rank 1 */
.gold-accent-text {
  background: linear-gradient(135deg, #FFF8D1 0%, var(--gold-light) 40%, var(--gold-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-cold);
  border-radius: 3px;
  border: 1px solid rgba(86, 200, 255, 0.2);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-ice);
}

/* ==========================================================================
   PORTAL ATMOSPHERIC BACKGROUND & CANVAS
   ========================================================================== */
.portal-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
}

.portal-bg-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/portal-bg.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 0;
  filter: brightness(0.42) saturate(1.1) hue-rotate(5deg);
  pointer-events: none;
}

.portal-bg-vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, rgba(5, 11, 20, 0.35) 0%, rgba(5, 11, 20, 0.88) 65%, #050B14 100%);
  z-index: 0;
  pointer-events: none;
}

.portal-mist-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 11, 20, 0.25) 0%, rgba(7, 17, 29, 0.6) 50%, rgba(5, 11, 20, 0.98) 100%);
  z-index: 0;
  pointer-events: none;
}

/* ==========================================================================
   COLD NORTHREND BUTTONS (AzerionButton)
   ========================================================================== */
.btn-azerion-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #FFFFFF;
  background: linear-gradient(180deg, #168FC7 0%, #0E6894 40%, #094766 100%);
  border: 1px solid var(--accent-ice);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 16px rgba(22, 143, 199, 0.35);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.btn-azerion-primary:hover {
  background: linear-gradient(180deg, #56C8FF 0%, #168FC7 40%, #0E6894 100%);
  border-color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.8), 0 0 25px rgba(86, 200, 255, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.6);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-azerion-primary:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.btn-azerion-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-frost);
  background: rgba(14, 28, 42, 0.85);
  border: 1px solid var(--border-cold-hover);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), inset 0 0 8px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  user-select: none;
}

.btn-azerion-secondary:hover {
  background: rgba(20, 42, 64, 0.95);
  border-color: var(--accent-ice);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7), 0 0 16px rgba(86, 200, 255, 0.25);
  transform: translateY(-1px);
}

.btn-azerion-secondary:active {
  transform: translateY(1px);
}

.btn-azerion-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-azerion-ghost:hover {
  color: var(--text-primary);
  background: rgba(22, 143, 199, 0.12);
  border-color: rgba(28, 111, 146, 0.4);
}

/* ==========================================================================
   COLD NAVY CARDS & SURFACES (AzerionCard)
   ========================================================================== */
.azerion-card {
  background: var(--bg-card);
  border: 1px solid var(--border-cold);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7), inset 0 0 16px rgba(5, 11, 20, 0.75);
  position: relative;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.azerion-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(86, 200, 255, 0.35) 50%, transparent 100%);
  pointer-events: none;
}

.azerion-card-interactive:hover {
  border-color: var(--border-cold-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.85), 0 0 18px rgba(86, 200, 255, 0.18);
  transform: translateY(-2px);
}

/* Cold Metallic Corner Accents */
.azerion-card-corners {
  position: relative;
}
.azerion-card-corners::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  pointer-events: none;
  background: 
    linear-gradient(to right, var(--accent-ice) 8px, transparent 8px) top left,
    linear-gradient(to bottom, var(--accent-ice) 8px, transparent 8px) top left,
    linear-gradient(to left, var(--accent-ice) 8px, transparent 8px) top right,
    linear-gradient(to bottom, var(--accent-ice) 8px, transparent 8px) top right,
    linear-gradient(to right, var(--accent-ice) 8px, transparent 8px) bottom left,
    linear-gradient(to top, var(--accent-ice) 8px, transparent 8px) bottom left,
    linear-gradient(to left, var(--accent-ice) 8px, transparent 8px) bottom right,
    linear-gradient(to top, var(--accent-ice) 8px, transparent 8px) bottom right;
  background-size: 8px 8px;
  background-repeat: no-repeat;
  opacity: 0.45;
}

/* ==========================================================================
   INPUTS & FORMS (AzerionInput)
   ========================================================================== */
.azerion-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  text-align: left;
  width: 100%;
}

.azerion-label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.azerion-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 16px; /* 16px prevents iOS Safari auto-zoom */
  color: var(--text-primary);
  background: rgba(7, 17, 29, 0.92);
  border: 1px solid var(--border-cold);
  border-radius: var(--radius-sm);
  outline: none;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.7);
  transition: var(--transition);
}

.azerion-input:focus {
  border-color: var(--accent-ice);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8), 0 0 12px rgba(86, 200, 255, 0.28);
  background: rgba(14, 28, 42, 0.95);
}

.azerion-input::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

.azerion-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
}

.azerion-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  background: rgba(7, 17, 29, 0.95);
  border: 1px solid var(--border-cold);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  outline: none;
  transition: var(--transition);
  flex-shrink: 0;
}

.azerion-checkbox:checked {
  background: var(--accent-primary);
  border-color: var(--accent-ice);
  box-shadow: 0 0 8px rgba(86, 200, 255, 0.5);
}

.azerion-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #FFFFFF;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Keyboard Focus Accessibility */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-ice) !important;
  outline-offset: 2px !important;
}

/* ==========================================================================
   TABS SYSTEM (AzerionTabs)
   ========================================================================== */
.azerion-tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-cold);
  padding-bottom: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.azerion-tabs-nav::-webkit-scrollbar {
  display: none;
}

.azerion-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
}

.azerion-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(22, 143, 199, 0.1);
}

.azerion-tab-btn.active {
  color: var(--accent-frost);
  background: var(--bg-card-hover);
  border-color: var(--border-cold);
  border-bottom-color: transparent;
}

.azerion-tab-btn.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-ice);
  box-shadow: 0 0 8px rgba(86, 200, 255, 0.7);
}

/* ==========================================================================
   ENTRANCE VIEW (LOGIN / REGISTER)
   ========================================================================== */
.portal-entrance-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 10;
  width: 100%;
}

.entrance-card {
  width: 100%;
  max-width: 480px;
  background: rgba(11, 23, 36, 0.95);
  border: 1px solid var(--border-cold-hover);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.95), inset 0 0 35px rgba(5, 11, 20, 0.85), 0 0 30px rgba(22, 143, 199, 0.2);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  text-align: center;
  position: relative;
}

.entrance-logo-wrap {
  margin-bottom: 1.25rem;
}

.entrance-logo {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(0, 210, 255, 0.5));
}

.entrance-title {
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  margin-bottom: 0.25rem;
  letter-spacing: 0.08em;
}

.entrance-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.entrance-tabs {
  display: flex;
  background: rgba(5, 11, 20, 0.85);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
  margin-bottom: 1.75rem;
  border: 1px solid var(--border-cold);
}

.entrance-tab-btn {
  flex: 1;
  padding: 0.65rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: var(--transition);
}

.entrance-tab-btn.active {
  background: var(--bg-card-hover);
  color: var(--accent-frost);
  border: 1px solid rgba(86, 200, 255, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 0 10px rgba(86, 200, 255, 0.2);
}

/* ==========================================================================
   PORTAL MAIN DASHBOARD LAYOUT
   ========================================================================== */
.portal-app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 10;
  width: 100%;
}

@media (min-width: 1025px) {
  .portal-app-layout {
    flex-direction: row;
  }
}

/* LEFT SIDEBAR (AzerionSidebar) */
.portal-sidebar {
  width: var(--sidebar-width);
  background: rgba(7, 17, 29, 0.97);
  border-right: 1px solid var(--border-cold);
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  padding: 1.75rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.sidebar-brand-logo {
  max-width: 140px;
  height: auto;
  filter: drop-shadow(0 0 15px rgba(0, 210, 255, 0.45));
  margin-bottom: 0.5rem;
}

.sidebar-server-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(5, 11, 20, 0.85);
  border: 1px solid var(--border-cold);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-ice);
  text-transform: uppercase;
}

.sidebar-server-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.sidebar-nav {
  padding: 1.5rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow-y: auto;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  width: 100%;
  text-align: left;
}

.sidebar-nav-item:hover {
  background: rgba(14, 28, 42, 0.8);
  border-color: var(--border-cold-hover);
  color: var(--text-primary);
  transform: translateX(3px);
}

.sidebar-nav-item.active {
  background: linear-gradient(90deg, rgba(22, 143, 199, 0.22) 0%, rgba(11, 23, 36, 0.85) 100%);
  border-color: var(--border-cold-hover);
  color: var(--accent-frost);
  box-shadow: inset 3px 0 0 var(--accent-ice), 0 2px 8px rgba(0, 0, 0, 0.5);
}

.sidebar-nav-icon {
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}

/* USER PROFILE CARD AT BOTTOM OF SIDEBAR */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(5, 11, 20, 0.9);
}

.user-profile-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-cold);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.user-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-cold-hover);
  flex-shrink: 0;
  background: #050B14;
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 6px #22c55e;
  border: 1px solid #050B14;
}

.user-info-text {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #22c55e;
  text-transform: uppercase;
}

.btn-logout {
  width: 100%;
  padding: 0.55rem;
  background: rgba(14, 28, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-logout:hover {
  background: rgba(180, 40, 40, 0.2);
  border-color: rgba(220, 50, 50, 0.45);
  color: #f87171;
}

/* MAIN CONTENT CONTAINER */
.portal-main-container {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  padding: 2.25rem 2.5rem 4rem;
  position: relative;
  max-width: 100%;
}

/* MOBILE TOPBAR */
.portal-mobile-topbar {
  display: none;
  width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(7, 17, 29, 0.96);
  border-bottom: 1px solid var(--border-cold);
  padding: 0 1.25rem;
  align-items: center;
  justify-content: space-between;
  z-index: 90;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.mobile-menu-btn {
  background: transparent;
  border: 1px solid var(--border-cold);
  color: var(--accent-ice);
  min-width: 44px;
  min-height: 44px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-menu-btn:hover {
  background: rgba(22, 143, 199, 0.15);
  border-color: var(--accent-ice);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 95;
  backdrop-filter: blur(5px);
}

/* ==========================================================================
   SECTION HEADER (SectionHeader)
   ========================================================================== */
.section-header-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header-wrap::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 140px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-ice) 0%, transparent 100%);
}

.section-title {
  font-size: clamp(1.5rem, 3.5vw, 1.95rem);
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==========================================================================
   ACCOUNT DASHBOARD: STAT CARDS (StatCard)
   ========================================================================== */
.dashboard-welcome-banner {
  background: linear-gradient(135deg, rgba(14, 28, 42, 0.95) 0%, rgba(7, 17, 29, 0.92) 100%);
  border: 1px solid var(--border-cold);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 0 25px rgba(22, 143, 199, 0.12);
}

.dashboard-welcome-banner::before {
  content: '';
  position: absolute;
  right: -50px;
  top: -50px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(86, 200, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-heading {
  font-size: clamp(1.25rem, 3.2vw, 1.85rem);
  line-height: 1.25;
  margin-bottom: 0.35rem;
  word-break: normal;
  overflow-wrap: break-word;
}

.welcome-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.25rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-cold);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}

.stat-card:hover {
  border-color: var(--accent-ice);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 20px rgba(86, 200, 255, 0.2);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.stat-card-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-card-icon {
  font-size: 1.35rem;
  opacity: 0.9;
}

.stat-card-value {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 1.95rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 0.35rem;
  word-break: break-word;
}

.stat-card-subtext {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* QUICK ACTIONS GRID */
.quick-actions-card {
  margin-bottom: 2.25rem;
  padding: 1.5rem 1.75rem;
}

.quick-actions-title {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  background: rgba(7, 17, 29, 0.85);
  border: 1px solid var(--border-cold);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  user-select: none;
}

.quick-action-btn:hover {
  background: rgba(14, 28, 42, 0.95);
  border-color: var(--accent-ice);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7), 0 0 16px rgba(86, 200, 255, 0.25);
  transform: translateY(-1px);
}

/* RECENT ACTIVITY TIMELINE */
.activity-card {
  padding: 1.75rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-cold);
  border-radius: var(--radius-sm);
}

.activity-title {
  font-size: 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #E6F7FF;
  font-family: var(--font-fantasy);
  font-weight: 700;
}

.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  padding-left: 2rem;
}

.activity-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 12px;
  width: 2px;
  background: #0284c7;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.45);
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #050B14;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
  z-index: 2;
}

.timeline-date {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #38bdf8;
  margin-bottom: 0.25rem;
}

.timeline-text {
  font-size: 0.95rem;
  color: #E6F7FF;
  font-weight: 700;
  margin-bottom: 0.2rem;
  line-height: 1.35;
}

.timeline-meta {
  font-size: 0.82rem;
  color: #9BAEBB;
  line-height: 1.4;
}

/* ==========================================================================
   MY CHARACTERS (CharacterCard)
   ========================================================================== */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.5rem;
}

.character-card {
  background: var(--bg-card);
  border: 1px solid var(--border-cold);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.character-card:hover {
  border-color: var(--border-cold-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.85), 0 0 22px rgba(86, 200, 255, 0.2);
}

.character-card-visual {
  height: 160px;
  background-size: cover;
  background-position: center top;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}

.character-visual-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 11, 20, 0.15) 0%, rgba(7, 17, 29, 0.8) 70%, var(--bg-card) 100%);
  pointer-events: none;
}

.character-class-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(5, 11, 20, 0.88);
  border: 1px solid var(--border-cold);
  padding: 0.25rem 0.65rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.character-status-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(5, 11, 20, 0.88);
  border: 1px solid rgba(86, 200, 255, 0.2);
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-dot-online {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.status-dot-offline {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6b7280;
}

.character-header-info {
  position: relative;
  z-index: 2;
}

.character-level-race {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-frost);
}

.character-card-name {
  font-size: 1.4rem;
  line-height: 1.2;
}

.character-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.character-stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  background: rgba(7, 17, 29, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

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

.stat-item-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.stat-item-value {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.character-card-guild {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.character-card-actions {
  margin-top: auto;
  padding-top: 0.5rem;
}

/* ==========================================================================
   CHARACTER DETAILS MODAL (AzerionModal & Gear Sheet)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 13, 0.88);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: var(--bg-secondary);
  border: 1px solid var(--border-cold-hover);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.95), inset 0 0 30px rgba(5, 11, 20, 0.85), 0 0 35px rgba(22, 143, 199, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem 1.75rem;
  background: rgba(7, 17, 29, 0.95);
  border-bottom: 1px solid var(--border-cold);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
}

.modal-close-btn:hover {
  color: var(--accent-ice);
  transform: scale(1.1);
}

.modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

/* CHARACTER DETAILS: GEAR SLOTS & TALENTS */
.char-details-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-cold);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.char-details-portrait {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  border: 2px solid var(--border-cold-hover);
  overflow: hidden;
  flex-shrink: 0;
}

.char-details-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.char-summary-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.gear-slots-container {
  margin-bottom: 1.75rem;
}

.gear-slots-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gear-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.gear-slot-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(7, 17, 29, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  transition: var(--transition);
}

.gear-slot-card:hover {
  border-color: var(--accent-ice);
  background: rgba(14, 28, 42, 0.95);
  box-shadow: 0 0 14px rgba(86, 200, 255, 0.22);
}

.gear-slot-icon {
  width: 36px;
  height: 36px;
  border-radius: 3px;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  background: #050B14;
}

.gear-slot-info {
  flex: 1;
  min-width: 0;
}

.gear-slot-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gear-slot-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* TALENT SPEC DISPLAY */
.talents-section {
  background: rgba(7, 17, 29, 0.65);
  border: 1px solid var(--border-cold);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.talents-header {
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
}

.talent-trees-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.talent-tree-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.talent-tree-card.active-spec {
  border-color: var(--accent-ice);
  box-shadow: 0 0 18px rgba(86, 200, 255, 0.28);
  background: rgba(14, 34, 52, 0.95);
}

.talent-tree-name {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.talent-tree-points {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-frost);
}

.talent-active-tag {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #22c55e;
}

/* ==========================================================================
   RANKINGS (RankingTable)
   ========================================================================== */
.rankings-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.rankings-search-input {
  max-width: 300px;
  width: 100%;
}

.rankings-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-cold);
  border-radius: var(--radius-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  width: 100%;
}

.azerion-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.azerion-table th {
  background: rgba(7, 17, 29, 0.95);
  padding: 0.85rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-cold);
  white-space: nowrap;
}

.azerion-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}

.azerion-table tr:hover td {
  background: rgba(22, 143, 199, 0.12);
  color: var(--text-primary);
}

/* Rankings Top 3 Badges (Gold, Silver, Bronze for Rank 1-3) */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.85rem;
}

.rank-1 {
  background: linear-gradient(135deg, #FFF8D1 0%, #D4AF37 50%, #8B6B32 100%);
  color: #050B14;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.6);
  border: 1px solid #FFF8D1;
}

.rank-2 {
  background: linear-gradient(135deg, #FFFFFF 0%, #D1D5DB 50%, #9CA3AF 100%);
  color: #050B14;
  box-shadow: 0 0 10px rgba(209, 213, 219, 0.5);
  border: 1px solid #FFFFFF;
}

.rank-3 {
  background: linear-gradient(135deg, #E29B64 0%, #8B5A2B 50%, #5A391A 100%);
  color: #FFF8D1;
  box-shadow: 0 0 10px rgba(139, 90, 43, 0.5);
  border: 1px solid #E29B64;
}

.rank-other {
  background: rgba(7, 17, 29, 0.85);
  border: 1px solid var(--border-cold);
  color: var(--text-muted);
}

.table-player-name {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   MY GUILD (GuildCard)
   ========================================================================== */
.guild-hero-banner {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: linear-gradient(135deg, rgba(14, 28, 42, 0.95) 0%, rgba(7, 17, 29, 0.92) 100%);
  border: 1px solid var(--border-cold-hover);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 30px rgba(22, 143, 199, 0.15);
}

.guild-emblem-wrap {
  width: 110px;
  height: 110px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--accent-ice);
  box-shadow: 0 0 25px rgba(86, 200, 255, 0.4);
  flex-shrink: 0;
  background: #050B14;
}

.guild-emblem-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guild-hero-details {
  flex: 1;
}

.guild-hero-name {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 0.25rem;
  letter-spacing: 0.06em;
}

.guild-hero-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

/* GUILD PROGRESSION BAR */
.guild-progression-wrap {
  margin-top: 1rem;
  max-width: 500px;
}

.progression-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--accent-frost);
}

.progression-bar-bg {
  height: 10px;
  background: rgba(5, 11, 20, 0.9);
  border: 1px solid var(--border-cold);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.progression-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #094766 0%, #168FC7 50%, #56C8FF 100%);
  box-shadow: 0 0 12px rgba(86, 200, 255, 0.7);
  border-radius: 9999px;
  transition: width 0.8s ease;
}

/* GUILD STATS ROW */
.guild-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

/* ==========================================================================
   ACCOUNT SETTINGS
   ========================================================================== */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.settings-card {
  padding: 1.75rem 2rem;
}

.settings-card-title {
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.account-status-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

.account-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #22c55e;
  color: #050B14;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 9999;
  pointer-events: none;
  max-width: calc(100vw - 2rem);
}

.azerion-toast {
  background: var(--bg-card);
  border: 1px solid var(--accent-ice);
  color: var(--text-primary);
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85), 0 0 16px rgba(86, 200, 255, 0.25);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  animation: slideInToast 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: auto;
}

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

/* ==========================================================================
   CLEAN RESPONSIVE MEDIA QUERIES
   Breakpoints:
   - Mobile Phones: 320px – 480px
   - Large Mobile:  481px – 767px
   - Tablets:       768px – 1024px
   - Desktop:       1025px and above (Default layout)
   ========================================================================== */

/* 1. TABLET & BELOW (<= 1024px) */
@media (max-width: 1024px) {
  .portal-app-layout {
    flex-direction: column !important;
    width: 100%;
  }
  .portal-sidebar {
    transform: translateX(-100%);
  }
  .portal-sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar-backdrop.mobile-open {
    display: block;
  }
  .portal-mobile-topbar {
    display: flex !important;
    width: 100% !important;
    flex-shrink: 0;
  }
  .portal-main-container {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 1.75rem 1.5rem 3.5rem;
    box-sizing: border-box;
  }
  .stat-cards-grid, .guild-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
  .quick-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .char-summary-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 2. LARGE MOBILE & BELOW (<= 767px) */
@media (max-width: 767px) {
  .portal-app-layout {
    flex-direction: column !important;
  }
  .portal-mobile-topbar {
    display: flex !important;
    width: 100% !important;
  }
  .portal-main-container {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 1.25rem 1rem 3rem;
  }
  .guild-hero-banner {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }
  .guild-hero-meta {
    justify-content: center;
    gap: 0.75rem;
  }
  .guild-progression-wrap {
    margin: 1rem auto 0;
    width: 100%;
  }
  .char-details-hero {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .char-details-hero .text-right {
    text-align: center;
    align-items: center;
    margin-top: 0.5rem;
  }
  .gear-grid {
    grid-template-columns: 1fr;
  }
  .talent-trees-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .characters-grid {
    grid-template-columns: 1fr;
  }
  .rankings-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }
  .rankings-search-input {
    max-width: 100%;
    width: 100%;
  }
  .rankings-search-input input {
    width: 100%;
  }
}

/* 3. SMALL MOBILE PHONES (320px – 480px) */
@media (max-width: 480px) {
  .portal-app-layout {
    flex-direction: column !important;
  }
  .portal-sidebar {
    width: min(var(--sidebar-width), 85vw);
  }
  .portal-mobile-topbar {
    display: flex !important;
    width: 100% !important;
    padding: 0 0.85rem;
  }
  .portal-main-container {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem 0.65rem 2.5rem;
  }
  .dashboard-welcome-banner {
    padding: 1.25rem 1rem;
    margin-bottom: 1.25rem;
  }
  .welcome-heading {
    font-size: 1.3rem;
  }
  .stat-cards-grid, .guild-stats-grid, .quick-actions-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .stat-card {
    padding: 1.1rem 1rem;
  }
  .stat-card-value {
    font-size: 1.55rem;
  }
  .quick-actions-card, .activity-card, .settings-card {
    padding: 1.25rem 1rem;
  }
  .entrance-card {
    padding: 1.5rem 1rem;
    max-width: 100%;
    margin: 0 0.5rem;
  }
  .entrance-title {
    font-size: 1.45rem;
  }
  .modal-overlay {
    padding: 0.5rem;
  }
  .modal-container {
    max-height: calc(100vh - 1rem);
    width: 100%;
    border-radius: var(--radius-sm);
  }
  .modal-header {
    padding: 0.85rem 1rem;
  }
  .modal-title {
    font-size: 1.1rem;
  }
  .modal-body {
    padding: 0.85rem 0.75rem;
  }
  .char-summary-stats {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .char-details-hero {
    padding: 1rem;
  }
  .char-details-portrait {
    width: 60px;
    height: 60px;
  }
  .azerion-tab-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.75rem;
  }
  .azerion-table {
    min-width: 500px;
  }
  .azerion-table th, .azerion-table td {
    padding: 0.65rem 0.75rem;
    font-size: 0.8rem;
  }
  .toast-container {
    right: 1rem;
    bottom: 1rem;
  }
}

/* ==================== WARCRAFT FROST DIVIDERS ==================== */
.ice-divider {
  display: block;
  width: 100%;
  height: 17px;
  margin: 1.5rem 0 1rem 0;
  background-image: url('/assets/images/ice-divider.png');
  background-repeat: repeat-x;
  background-position: center top;
  background-size: 1024px 17px;
  pointer-events: none;
  position: relative;
  z-index: 10;
  opacity: 1;
  filter: drop-shadow(0 2px 6px rgba(6, 182, 212, 0.4));
}

.ice-divider-sm {
  width: 100%;
  height: 17px;
  margin: 1rem 0;
  background-repeat: repeat-x;
  background-size: 1024px 17px;
}

/* ==========================================================================
   AZERION COINS TOP-UP & WOW 3.3.5a ITEM ICON SYSTEM FOUNDATION
   ========================================================================== */

/* 1. Reusable WoW 3.3.5a Item Icon Component */
.wow-item-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #060c16;
  border-radius: 4px;
  overflow: hidden;
  user-select: none;
  border: 1.5px solid #145b78;
  flex-shrink: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.wow-item-icon:hover {
  transform: scale(1.05);
}

.wow-item-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wow-item-icon-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.6);
}

/* Sizing */
.wow-item-icon--small {
  width: 32px;
  height: 32px;
  border-width: 1.5px;
}

.wow-item-icon--medium {
  width: 44px;
  height: 44px;
  border-width: 2px;
}

.wow-item-icon--large {
  width: 56px;
  height: 56px;
  border-width: 2px;
}

/* Authentic WotLK Quality Border Colors & Ambient Glow */
.wow-item-icon.quality-poor {
  border-color: #9d9d9d;
}

.wow-item-icon.quality-common {
  border-color: #ffffff;
}

.wow-item-icon.quality-uncommon {
  border-color: #1eff00;
  box-shadow: 0 0 6px rgba(30, 255, 0, 0.35);
}

.wow-item-icon.quality-rare {
  border-color: #0070dd;
  box-shadow: 0 0 8px rgba(0, 112, 221, 0.45);
}

.wow-item-icon.quality-epic {
  border-color: #a335ee;
  box-shadow: 0 0 10px rgba(163, 53, 238, 0.5);
}

.wow-item-icon.quality-legendary {
  border-color: #ff8000;
  box-shadow: 0 0 12px rgba(255, 128, 0, 0.55);
}

.wow-item-icon.quality-artifact {
  border-color: #e6cc80;
  box-shadow: 0 0 12px rgba(230, 204, 128, 0.55);
}

.wow-item-icon.quality-heirloom {
  border-color: #00ccff;
  box-shadow: 0 0 10px rgba(0, 204, 255, 0.45);
}

/* 2. Coins Balance Hero Card */
.coins-balance-hero {
  background: radial-gradient(circle at 15% 50%, rgba(22, 143, 199, 0.12) 0%, rgba(7, 17, 29, 0.96) 100%), var(--bg-card);
  border: 1px solid var(--border-cold-hover);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), inset 0 0 25px rgba(20, 91, 120, 0.2);
}

.coins-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.coins-hero-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.coins-emblem-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle, #0e2236 0%, #050b14 100%);
  border: 2px solid var(--accent-ice);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(86, 200, 255, 0.35), inset 0 0 15px rgba(20, 91, 120, 0.6);
  flex-shrink: 0;
}

.coins-emblem-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px dashed rgba(86, 200, 255, 0.4);
  animation: spinSlow 30s linear infinite;
  pointer-events: none;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.coins-emblem-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

.coins-badge-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--accent-ice);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.coins-balance-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.coins-balance-val {
  font-size: 2.4rem;
  line-height: 1.15;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.02em;
}

.coins-currency-symbol {
  font-size: 1.8rem;
  -webkit-text-fill-color: initial;
}

.coins-hero-right {
  max-width: 380px;
}

.coins-hero-hint-box {
  background: rgba(5, 11, 20, 0.6);
  border: 1px solid rgba(20, 91, 120, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
}

/* 3. Packages Grid & Cards */
.package-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.75rem 1.25rem 1.25rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-cold);
  transition: var(--transition);
  height: 100%;
}

.package-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-ice);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(86, 200, 255, 0.25);
}

.package-card-popular {
  border-color: rgba(86, 200, 255, 0.65);
  box-shadow: 0 0 22px rgba(86, 200, 255, 0.18);
  background: linear-gradient(180deg, rgba(22, 143, 199, 0.08) 0%, var(--bg-card) 60%);
}

.package-card-best {
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow: 0 0 22px rgba(212, 175, 55, 0.15);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.08) 0%, var(--bg-card) 60%);
}

.package-badge-tag {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.15rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  z-index: 2;
}

.package-badge-popular {
  background: var(--accent-primary);
  color: #ffffff;
  border: 1px solid var(--accent-ice);
  box-shadow: 0 0 12px rgba(86, 200, 255, 0.4);
}

.package-badge-bonus {
  background: #1c2a38;
  color: var(--gold-light);
  border: 1px solid var(--gold-primary);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
}

.package-icon-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #081522;
  border: 1.5px solid rgba(20, 91, 120, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.package-coin-symbol {
  font-size: 1.8rem;
  position: relative;
  z-index: 1;
}

.package-coin-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(86, 200, 255, 0.25) 0%, transparent 70%);
}

.package-coins-amount {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.package-bonus-pill {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-frost);
  background: rgba(22, 143, 199, 0.15);
  border: 1px solid rgba(86, 200, 255, 0.3);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.package-price-wrap {
  margin-bottom: 0.5rem;
}

.package-price-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: 0.02em;
}

/* 4. Top-Up Modal */
.topup-modal-container {
  border-color: var(--accent-ice);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.95), 0 0 35px rgba(86, 200, 255, 0.25);
}

.topup-modal-details {
  padding: 0.5rem 0;
}

.topup-modal-alert {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  transition: all 0.3s ease;
}

/* 5. Shop Preview Container */
.shop-preview-item {
  background: rgba(7, 17, 29, 0.85);
  border: 1px solid rgba(20, 91, 120, 0.4);
  transition: var(--transition);
}

.shop-preview-item:hover {
  border-color: var(--accent-ice);
  background: rgba(14, 28, 42, 0.95);
}

/* 6. Responsive Adjustments */
@media (max-width: 640px) {
  .coins-hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .coins-hero-right {
    max-width: 100%;
    width: 100%;
  }
  .coins-balance-val {
    font-size: 2rem;
  }
  .package-card {
    padding: 1.5rem 1rem 1.25rem 1rem;
  }
}

/* ==========================================================================
   7. AZERION SHOP STYLES
   ========================================================================== */

.shop-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 840px) {
  .shop-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.shop-tabs-container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.shop-tab-btn {
  background: rgba(7, 17, 29, 0.85);
  border: 1px solid var(--border-cold);
  color: var(--text-muted);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.shop-tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  background: rgba(14, 28, 42, 0.95);
}

.shop-tab-btn.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(22, 143, 199, 0.45) 0%, rgba(9, 21, 35, 0.95) 100%);
  border-color: var(--accent-ice);
  box-shadow: 0 0 14px rgba(86, 200, 255, 0.35);
}

.shop-search-wrap {
  position: relative;
  min-width: 260px;
}

.shop-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

.shop-search-input {
  padding-left: 2.35rem !important;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.1rem;
}

@media (min-width: 640px) {
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .shop-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.shop-item-card {
  min-height: 180px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.shop-item-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-ice);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 20px rgba(86, 200, 255, 0.2);
}

.shop-balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(7, 17, 29, 0.9);
  border: 1px solid rgba(86, 200, 255, 0.35);
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition);
}

.shop-balance-pill:hover {
  border-color: var(--accent-ice);
  box-shadow: 0 0 14px rgba(86, 200, 255, 0.3);
  transform: translateY(-1px);
}

.shop-modal-container {
  max-width: 520px;
}

