/* ============================================
   GLOBALEXCHANGE — Global Styles
   ============================================ */

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  outline: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-md); }
h6 { font-size: var(--font-size-base); }

p {
  margin-bottom: var(--space-3);
  color: var(--color-text-secondary);
}

strong { font-weight: var(--font-weight-semibold); }

small { font-size: var(--font-size-sm); }

hr {
  border: none;
  border-top: 1px solid var(--color-border-light);
  margin: var(--space-4) 0;
}

::selection {
  background-color: var(--color-primary);
  color: var(--color-white);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--color-border-dark);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary);
}

/* ── Layout Principal ── */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout autenticado: sidebar + content */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-white);
  border-right: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: var(--z-sticky);
  transition: width var(--transition-base);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: var(--space-5) var(--space-5);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--header-height);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  text-decoration: none;
}

.sidebar-logo svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.sidebar-logo span {
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-3) 0;
}

.sidebar-section {
  padding: var(--space-2) var(--space-4);
}

.sidebar-section-title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-fast);
  text-decoration: none;
  position: relative;
  margin-bottom: 2px;
}

.sidebar-link:hover {
  background: var(--color-bg);
  color: var(--color-text);
  text-decoration: none;
}

.sidebar-link.active {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
}

.sidebar-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-link.active svg {
  opacity: 1;
}

.sidebar-link .badge {
  margin-left: auto;
}

.sidebar-footer {
  padding: var(--space-4);
  border-top: 1px solid var(--color-border-light);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sidebar-user:hover {
  background: var(--color-bg);
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-primary-bg);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Header ── */
.top-header {
  height: var(--header-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.top-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.top-header-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.top-header-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
}

.top-header-breadcrumb a {
  color: var(--color-text-tertiary);
}
.top-header-breadcrumb a:hover {
  color: var(--color-primary);
}

.top-header-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  position: relative;
}

.header-icon-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.header-icon-btn svg {
  width: 20px;
  height: 20px;
}

.header-notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--color-danger);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-white);
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
}

/* ── Page Content ── */
.page-content {
  flex: 1;
  padding: var(--space-6);
  max-width: var(--content-max-width);
  width: 100%;
  margin: 0 auto;
}

.page-header {
  margin-bottom: var(--space-6);
}

.page-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.page-subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
}

/* ── Auth Layout (sin sidebar) ── */
.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, #0D47A1 100%);
  padding: var(--space-4);
}

.auth-container {
  width: 100%;
  max-width: 440px;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  padding: var(--space-10) var(--space-8);
}

.auth-logo {
  text-align: center;
  margin-bottom: var(--space-8);
}

.auth-logo svg {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-3);
}

.auth-logo h1 {
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
}

.auth-logo p {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  margin-top: var(--space-1);
}

/* ── Utility Classes ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-primary { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }

.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-md { font-size: var(--font-size-md); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mr-2 { margin-right: var(--space-2); }
.mr-3 { margin-right: var(--space-3); }
.ml-2 { margin-left: var(--space-2); }
.ml-auto { margin-left: auto; }

.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.flex-1 { flex: 1; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none !important; }
.visible { display: block; }

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.relative { position: relative; }

.cursor-pointer { cursor: pointer; }

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fadeIn { animation: fadeIn var(--transition-base); }
.animate-fadeInUp { animation: fadeInUp var(--transition-base); }
.animate-fadeInDown { animation: fadeInDown var(--transition-base); }
.animate-scaleIn { animation: scaleIn var(--transition-base); }
.animate-spin { animation: spin 1s linear infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

/* ══════════════════════════════════════════
   DASHBOARD LAYOUT (sidebar + main)
   ══════════════════════════════════════════ */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background: var(--color-bg);
}

/* ══════════════════════════════════════════
   SIDEBAR PRO — Light Professional Design
   ══════════════════════════════════════════ */

.sidebar.sidebar-pro {
  width: var(--sidebar-width);
  background: var(--color-white);
  border-right: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: var(--z-sticky);
  transition: width var(--transition-base), transform var(--transition-base);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 1px 0 12px rgba(0, 0, 0, 0.04);
}

.sidebar-pro::-webkit-scrollbar {
  width: 4px;
}
.sidebar-pro::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-pro::-webkit-scrollbar-thumb {
  background: var(--color-border-dark);
  border-radius: var(--radius-full);
}

/* Sidebar Header */
.sidebar-pro .sidebar-header {
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-border-light);
  min-height: var(--header-height);
  display: flex;
  align-items: center;
}

.sidebar-pro .sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary) 0%, #2196F3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.sidebar-logo-icon svg {
  width: 22px;
  height: 22px;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-logo-name {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.sidebar-logo-version {
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-disabled);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Sidebar Sections */
.sidebar-pro .sidebar-section {
  padding: var(--space-2) 0;
}

.sidebar-pro .sidebar-section-title {
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-disabled);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--space-3) var(--space-5) var(--space-2);
  margin: 0;
}

/* Sidebar Nav Items */
.sidebar-pro .sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-4);
  margin: 1px var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
  white-space: nowrap;
  border: 1px solid transparent;
}

.sidebar-pro .sidebar-nav-item:hover {
  background: var(--color-bg);
  color: var(--color-text);
  text-decoration: none;
  border-color: var(--color-border-light);
}

.sidebar-pro .sidebar-nav-item.active {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
  border-color: rgba(26, 115, 232, 0.15);
  box-shadow: 0 1px 4px rgba(26, 115, 232, 0.08);
}

.sidebar-pro .sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: linear-gradient(180deg, var(--color-primary) 0%, #42A5F5 100%);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.sidebar-pro .sidebar-nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-pro .sidebar-nav-icon svg {
  width: 18px;
  height: 18px;
}

.sidebar-pro .sidebar-nav-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Badge */
.sidebar-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  background: var(--color-danger);
  color: white;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 2px 6px rgba(234, 67, 53, 0.3);
}

/* Sidebar Footer */
.sidebar-pro .sidebar-footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border-light);
  margin-top: auto;
}

.sidebar-status-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-2);
  margin-bottom: var(--space-3);
  background: rgba(15, 157, 88, 0.08);
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 157, 88, 0.12);
}

.sidebar-status-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-success);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(15, 157, 88, 0.4);
}

.sidebar-status-text {
  font-size: 11px;
  color: rgba(15, 157, 88, 0.8);
  font-weight: var(--font-weight-medium);
}

.sidebar-pro .sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s ease;
}

.sidebar-pro .sidebar-user:hover {
  background: var(--color-bg);
}

.sidebar-user-avatar-pro {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary) 0%, #42A5F5 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xs);
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.25);
}

.sidebar-online-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-success);
  border: 2px solid var(--color-white);
  box-shadow: 0 0 4px rgba(15, 157, 88, 0.4);
}

.sidebar-pro .sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-pro .sidebar-user-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.sidebar-pro .sidebar-user-email {
  font-size: 11px;
  color: var(--color-text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* ══════════════════════════════════════════
   TOPBAR PRO — Advanced Header
   ══════════════════════════════════════════ */

.topbar.topbar-pro {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-5);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  gap: var(--space-4);
}

/* Topbar Left */
.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}

.topbar-menu-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.topbar-menu-btn svg {
  width: 20px;
  height: 20px;
}

.topbar-menu-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

/* Topbar Balance Widget */
.topbar-balance-widget {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 6px var(--space-4) 6px var(--space-3);
  background: none;
  border: none;
  border-radius: 0;
  cursor: default;
  min-width: 0;
}

.topbar-balance-info {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.2;
  min-width: 0;
}

.topbar-balance-title {
  font-size: 9px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.topbar-balance-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.topbar-balance-coin {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-balance-coin svg {
  width: 16px;
  height: 16px;
}

.topbar-balance-coin-sm {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
}

.topbar-balance-coin-sm svg {
  width: 13px;
  height: 13px;
}

.topbar-balance-amount {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.topbar-balance-secondary {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-balance-usd {
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-tertiary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Topbar Right */
.topbar-pro .topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* Live Indicator */
.topbar-live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(15, 157, 88, 0.08);
  border: 1px solid rgba(15, 157, 88, 0.15);
  border-radius: var(--radius-full);
}

.topbar-live-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-success);
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 4px rgba(15, 157, 88, 0.4);
}

.topbar-live-label {
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-success);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Action Buttons */
.topbar-action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

.topbar-action-btn svg {
  width: 19px;
  height: 19px;
}

.topbar-action-btn:hover {
  background: var(--color-bg);
  color: var(--color-primary);
  text-decoration: none;
}

.topbar-action-btn .notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--color-danger);
  color: white;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-white);
  line-height: 1;
  box-shadow: 0 2px 4px rgba(234, 67, 53, 0.25);
}

/* Separator */
.topbar-separator {
  width: 1px;
  height: 28px;
  background: var(--color-border-light);
  margin: 0 var(--space-1);
}

/* Topbar User Pro */
.topbar-user-pro {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 5px 8px 5px 5px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  border: 1px solid transparent;
}

.topbar-user-pro:hover {
  background: var(--color-bg);
  border-color: var(--color-border-light);
}

.topbar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary) 0%, #42A5F5 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xs);
  flex-shrink: 0;
}

.topbar-user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.topbar-user-pro .topbar-user-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-user-role {
  font-size: 10px;
  color: var(--color-success);
  font-weight: var(--font-weight-medium);
}

.topbar-user-chevron {
  width: 16px;
  height: 16px;
  color: var(--color-text-tertiary);
  display: flex;
  align-items: center;
  transition: transform var(--transition-fast);
}

.topbar-user-chevron svg {
  width: 14px;
  height: 14px;
}

/* ── User Menu Pro ── */
.user-menu.user-menu-pro {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  z-index: var(--z-dropdown);
  padding: 0;
  animation: fadeInDown 0.15s ease;
  overflow: hidden;
}

.user-menu-pro .user-menu-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
}

.user-menu-pro .user-menu-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary) 0%, #42A5F5 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  flex-shrink: 0;
}

.user-menu-pro .user-menu-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-menu-pro .user-menu-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  display: block;
}

.user-menu-pro .user-menu-email {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-pro .user-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-4);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-fast);
  text-decoration: none;
  cursor: pointer;
}

.user-menu-pro .user-menu-item:hover {
  background: var(--color-bg);
  color: var(--color-text);
  text-decoration: none;
}

.user-menu-item-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.7;
}

.user-menu-item-icon svg {
  width: 16px;
  height: 16px;
}

.user-menu-item-danger {
  color: var(--color-danger) !important;
}

.user-menu-item-danger:hover {
  background: var(--color-danger-bg) !important;
  color: var(--color-danger-dark) !important;
}

.user-menu-item-danger .user-menu-item-icon {
  opacity: 1;
}

.user-menu-pro .user-menu-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: var(--space-1) 0;
}

/* ── Sidebar Toggle (mobile) ── */
.sidebar-toggle {
  display: none;
}

/* ── Notification Badge (legacy) ── */
.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--color-danger);
  color: white;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-white);
  line-height: 1;
}

/* ── Stat Cards (dashboard) ── */
.stat-card {
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  transition: box-shadow var(--transition-fast);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--color-primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  font-weight: var(--font-weight-medium);
}

.stat-value {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

/* ── Loading Spinner ── */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-border-light);
  border-top-color: var(--color-primary);
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

/* ── Page Loading ── */
.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  flex-direction: column;
  gap: var(--space-4);
}

.page-loading p {
  color: var(--color-text-tertiary);
  font-size: var(--font-size-sm);
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  color: var(--color-text-disabled);
  margin: 0 auto var(--space-4);
}

.empty-state h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

.empty-state p {
  color: var(--color-text-tertiary);
  max-width: 400px;
  margin: 0 auto var(--space-6);
}
