/* ═══════════════════════════════════════════════════════════════
   AMAZON FLEX DASHBOARD - Kraken Style
   ═══════════════════════════════════════════════════════════════ */

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

/* Prevenir zoom y scroll horizontal en móvil - comportamiento app nativa */
html {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
  overscroll-behavior: none;
}

/* Prevenir zoom en inputs (iOS hace zoom en inputs < 16px) */
input, select, textarea {
  font-size: 16px !important;
}

@media (max-width: 1200px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

:root {
  --bg-primary: #111111;
  --bg-secondary: #0a0a0a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-hover: rgba(255, 255, 255, 0.08);
  --bg-input: rgba(255, 255, 255, 0.05);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: #888888;
  --text-muted: #555555;
  --accent-purple: #3a3a3a;
  --accent-green: #00d68f;
  --accent-red: #ff6b6b;
  --accent-blue: #4dabf7;
  --accent-yellow: #ffd43b;
  --accent-orange: #ff9f43;
  --blur-amount: 20px;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.0.0/dist/fonts/geist-mono/GeistMono-Regular.woff2') format('woff2');
  font-weight: 400;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.0.0/dist/fonts/geist-mono/GeistMono-Medium.woff2') format('woff2');
  font-weight: 500;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.0.0/dist/fonts/geist-mono/GeistMono-SemiBold.woff2') format('woff2');
  font-weight: 600;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.0.0/dist/fonts/geist-mono/GeistMono-Bold.woff2') format('woff2');
  font-weight: 700;
}

body {
  font-family: 'Geist Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  font-size: 13px;
  line-height: 1.5;
}

.container {
  display: flex;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR - Kraken Style
   ═══════════════════════════════════════════════════════════════ */

.sidebar {
  width: 200px;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  overflow-x: hidden;
}

/* Clase global para mostrar sidebar en móvil - SIEMPRE tiene prioridad */
.sidebar.sidebar-visible {
  transform: translateX(0) !important;
  display: flex !important;
  visibility: visible !important;
  z-index: 1060 !important;
  background: #111111 !important;
}

/* Clase global para mostrar overlay en móvil */
.mobile-overlay.overlay-visible {
  display: block !important;
  opacity: 1 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0,0,0,0.7) !important;
  z-index: 1050 !important;
}

.logo {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

/* Botón cerrar menú móvil */
.mobile-close-btn {
  display: none;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
}

.mobile-close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

@media (max-width: 1200px) {
  .mobile-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .logo {
    padding: 10px 16px 10px 60px;
    justify-content: center;
  }
}

.logo-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-text .be {
  color: var(--text-secondary);
}

.logo-text .flex {
  color: #9ca3af;
}

.nav-menu {
  flex: 1;
  padding: 8px 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  color: #888888;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 13px;
  font-weight: 500;
  margin: 2px 0;
  border-radius: 8px;
  width: 100%;
  gap: 14px;
  background: transparent;
  border: none;
}

.nav-item:hover {
  color: #aaaaaa;
  background: #2a2a2a;
}

.nav-item.active {
  color: #ffffff;
  background: #2a2a2a;
  border: none;
  border-top: 1px solid #555555;
}

.nav-icon {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  color: var(--text-primary);
}

.nav-label {
  flex: 1;
}

.nav-count {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 28px;
  text-align: center;
  margin-left: auto;
}

.nav-count.increased {
  background: rgba(0, 214, 143, 0.3);
  color: var(--accent-green);
  animation: pulse-green 2s ease-in-out infinite;
}

/* Highlight only the count badge when increased - not the whole button */
.nav-count.increased {
  background: rgba(0, 214, 143, 0.4);
  color: #00ff9f;
  font-weight: 600;
  box-shadow: 0 0 8px rgba(0, 214, 143, 0.5);
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Recent complete entries - NEW badge with pulse */
.new-badge {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 8px;
  border-radius: 10px;
  background: rgba(0, 214, 143, 0.3);
  color: var(--accent-green);
  font-size: 10px;
  font-weight: 600;
  animation: pulse-green 2s ease-in-out infinite;
}

/* Received account badge - RCV in gray */
.rcv-badge {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 8px;
  border-radius: 10px;
  background: rgba(60, 60, 80, 0.5);
  color: #9ca3af;
  font-size: 10px;
  font-weight: 600;
  animation: pulse-gray 2s ease-in-out infinite;
}

@keyframes pulse-gray {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Price needs update badge - $? in red */
.price-badge {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 8px;
  border-radius: 10px;
  background: rgba(255, 107, 107, 0.3);
  color: #ff6b6b;
  font-size: 10px;
  font-weight: 600;
  animation: pulse-red 1.5s ease-in-out infinite;
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 8px 2px rgba(255, 107, 107, 0.3); }
}

.sidebar-footer {
  padding: 16px;
}

/* Info de usuario en sidebar */
.sidebar-user-info {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-user-info .user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-user-info .user-id {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.sidebar-user-info .user-role {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-green);
  margin-top: 4px;
}

.nav-footer-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  gap: 10px;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-footer-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════ */

.main-content {
  flex: 1;
  margin-left: 200px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-primary);
}

/* ═══════════════════════════════════════════════════════════════
   SEARCH BAR - Kraken Style
   ═══════════════════════════════════════════════════════════════ */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  gap: 16px;
  background: var(--bg-primary);
}

/* User info in header - hidden by default, shown when sidebar collapsed */
.header .user-info-header {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.header .user-info-header .user-details {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.header .user-info-header .user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.header .user-info-header .user-id {
  font-size: 11px;
  color: var(--text-secondary);
}

.header .user-info-header .user-role {
  font-size: 10px;
  color: var(--accent-green);
  text-transform: uppercase;
}

.search-container {
  flex: 0 1 500px;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 12px 20px 12px 44px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-shortcut {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.search-clear {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.search-clear:hover {
  opacity: 1;
  color: var(--text-primary);
}

.section-controls .search-clear {
  right: 12px;
}

.search-container {
  position: relative;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.search-result-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: #000;
  flex-shrink: 0;
}

.search-result-text {
  flex: 1;
  color: var(--text-primary);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-city {
  color: var(--text-muted);
  font-size: 12px;
  flex-shrink: 0;
}

.search-no-results {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.user-name-line {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-id {
  font-family: 'Geist Mono', monospace;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 400;
}

.user-role {
  font-size: 11px;
  color: #00d68f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a3a3a 0%, #4a4a4a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════════
   CONTENT AREA
   ═══════════════════════════════════════════════════════════════ */

.content {
  flex: 1;
  padding: 24px;
  overflow-y: scroll;
  height: calc(100vh - 80px);
  -webkit-overflow-scrolling: touch;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   STATS CARDS - Kraken Style
   ═══════════════════════════════════════════════════════════════ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

/* Home Panels Grid - Desktop 4 columnas, Mobile 1 columna */
.home-panels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.home-panel {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.1);
}

.stat-card {
  background: var(--bg-glass);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
}

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

/* Sales Summary Cards - Home Style */
#section-sold .stats-grid .stat-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px 14px;
  transition: all 0.2s ease;
  cursor: default;
}

#section-sold .stats-grid .stat-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

#section-sold .stats-grid .stat-icon {
  font-size: 16px;
  margin-bottom: 4px;
}

#section-sold .stats-grid .stat-label {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

#section-sold .stats-grid .stat-value {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

#section-sold .stats-grid .stat-value#summaryTotalRevenue {
  color: #10b981;
}

.stat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.stat-icon {
  font-size: 20px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-change {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-change.positive {
  color: var(--accent-green);
}

.stat-change.negative {
  color: var(--accent-red);
}

/* ═══════════════════════════════════════════════════════════════
   PANELS GRID - Kraken Style
   ═══════════════════════════════════════════════════════════════ */

.panels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.panel {
  background: var(--bg-glass);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  overflow: hidden;
}

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

.panel-title {
  font-size: 15px;
  font-weight: 600;
}

.panel-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.panel-link {
  font-size: 13px;
  color: #9ca3af;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.panel-link:hover {
  text-decoration: underline;
}

.panel-content {
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}

.panel-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  gap: 12px;
  transition: background 0.15s;
}

.panel-item:hover {
  background: var(--bg-hover);
}

.panel-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.panel-item-info {
  flex: 1;
}

.panel-item-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.panel-item-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.panel-item-chart {
  width: 60px;
  height: 24px;
}

.panel-item-value {
  text-align: right;
}

.panel-item-price {
  font-size: 14px;
  font-weight: 600;
}

.panel-item-change {
  font-size: 12px;
}

.panel-item-change.positive {
  color: var(--accent-green);
}

.panel-item-change.negative {
  color: var(--accent-red);
}

/* ═══════════════════════════════════════════════════════════════
   DATA TABLE - Kraken Style
   ═══════════════════════════════════════════════════════════════ */

.data-section {
  background: var(--bg-glass);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title h3 {
  font-size: 16px;
  font-weight: 600;
}

.section-badge {
  background: rgba(60, 60, 80, 0.4);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.section-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.section-controls input[type="text"],
.section-controls select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 10px 36px 10px 16px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  min-width: 240px;
}

/* Mobile: remove min-width for all inputs and selects */
@media (max-width: 1200px) {
  .section-controls input[type="text"],
  .section-controls select {
    min-width: 0 !important;
    width: 100% !important;
  }
}

.section-controls .input-wrapper {
  position: relative;
  display: inline-block;
}

.section-controls .input-wrapper .search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.section-controls input[type="text"]::placeholder {
  color: var(--text-muted);
}

.section-controls input[type="text"]:focus,
.section-controls select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.region-filter {
  min-width: 140px !important;
  max-width: 160px !important;
  width: 150px !important;
  padding: 10px 16px !important;
  font-size: 13px !important;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px !important;
  color: var(--text-primary) !important;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  padding-right: 32px !important;
}

.region-filter:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.15) !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
}

.region-filter option {
  background: #1a1a1a;
  color: var(--text-primary);
  padding: 8px;
}

/* Bulk Actions */
.bulk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: rgba(60, 60, 80, 0.15);
  border: 1px solid rgba(60, 60, 80, 0.4);
  border-radius: 20px;
  margin-right: 10px;
}

.selected-count {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* Custom styled checkbox for dark theme */
.create-row-check {
  appearance: none;
  -webkit-appearance: none;
  width: 15px !important;
  height: 15px !important;
  border: 1.5px solid #8b8b9a !important;
  border-radius: 3px !important;
  background: #2d2d2d !important;
  cursor: pointer !important;
  position: relative;
  transition: all 0.15s ease;
  vertical-align: middle;
  margin-right: 8px !important;
  flex-shrink: 0;
}

.create-row-check:hover {
  border-color: #aaa !important;
  background: #3a3a3a !important;
}

.create-row-check:checked {
  background: #8b8b9a !important;
  border-color: #8b8b9a !important;
}

.create-row-check:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #1a1a2e;
  font-size: 10px;
  font-weight: bold;
  line-height: 1;
}

.create-row-check:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Action buttons spacing */
.action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-btn.delete-btn {
  background: transparent;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.action-btn.delete-btn:hover {
  opacity: 1;
  background: rgba(255, 100, 100, 0.15);
}

/* Small loading spinner for buttons */
.loading-spinner-small {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Summary filter buttons */
.summary-filter {
  padding: 6px 12px !important;
  font-size: 11px !important;
  background: transparent !important;
  border: 1px solid #444 !important;
  color: #8b8b9a !important;
}

.summary-filter.active {
  background: #3a3a3a !important;
  border-color: #666 !important;
  color: #fff !important;
}

.select-mode-btn {
  background: transparent !important;
  color: #8b8b9a !important;
  padding: 8px 14px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  border: 1px solid #444 !important;
  border-radius: 20px !important;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-mode-btn:hover {
  border-color: #4a4a4a !important;
  color: #9ca3af !important;
}

.select-mode-btn.active {
  background: #3a3a3a !important;
  color: white !important;
  border-color: #3a3a3a !important;
}

.bulk-assign-btn {
  background: linear-gradient(135deg, #3a3a3a, #2d2d2d) !important;
  color: white !important;
  padding: 8px 16px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border: none !important;
  border-radius: 20px !important;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bulk-assign-btn:hover {
  background: linear-gradient(135deg, #4a4a4a, #3a3a3a) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(60, 60, 80, 0.3);
}

.select-50-btn {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: white !important;
  padding: 8px 12px !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 8px;
}

.select-50-btn:hover {
  background: linear-gradient(135deg, #059669, #047857) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.selected-count {
  color: white !important;
  font-weight: 500;
  font-size: 13px;
}

.region-option {
  background: linear-gradient(135deg, rgba(60, 60, 80, 0.15), rgba(60, 60, 80, 0.05)) !important;
  border-left: 3px solid #3a3a3a !important;
}

/* Stop Refresh Button */
.stop-refresh-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  transition: all 0.2s;
}

.stop-refresh-btn:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-1px);
}

/* Refresh Summary Modal */
.refresh-summary-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  z-index: 10000;
  min-width: 400px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.refresh-summary-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
}

.refresh-summary-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.refresh-summary-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
}

.refresh-summary-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.refresh-summary-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.refresh-summary-stat {
  background: var(--bg-secondary);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
}

.refresh-summary-stat .value {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.refresh-summary-stat .label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.refresh-summary-close {
  width: 100%;
  padding: 12px;
  background: #3a3a3a;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.refresh-summary-close:hover {
  background: #4a4a4a;
}

.refresh-summary-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 4px 0 0 0;
}

.refresh-summary-header {
  flex-direction: column;
  text-align: center;
}

.refresh-summary-stat.highlight-72h .value {
  color: #f59e0b;
}

.refresh-summary-stat.highlight-complete .value {
  color: var(--accent-green);
}

.refresh-changes-section {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.refresh-changes-section h4 {
  margin: 0 0 10px 0;
  font-size: 13px;
  color: var(--text-primary);
}

.refresh-changes-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.refresh-changes-section li {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.change-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.change-badge.badge-72h {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.change-badge.badge-complete {
  background: rgba(0, 214, 143, 0.2);
  color: var(--accent-green);
}

.refresh-no-changes {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
  margin-bottom: 16px;
}

.refresh-summary-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.refresh-summary-footer .refresh-summary-close {
  flex: 1;
}

.refresh-errors {
  font-size: 11px;
  color: var(--text-muted);
}

/* Row selection */
.selected-row {
  background: rgba(60, 60, 80, 0.1) !important;
}

.selected-row:hover {
  background: rgba(60, 60, 80, 0.15) !important;
}

/* Processing row (in queue) */
.processing-row {
  background: rgba(251, 191, 36, 0.25) !important;
  border-left: 3px solid #fbbf24 !important;
}

.processing-row td {
  position: relative;
}

.processing-row td:first-child::before {
  content: '⏳';
  margin-right: 6px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.processing-row input[type="checkbox"] {
  pointer-events: none;
  accent-color: #fbbf24 !important;
}

/* Queue indicator */
.queue-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-glass);
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.queue-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(60, 60, 80, 0.4);
  border-top-color: #4a4a4a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.create-row-check,
#createSelectAll,
input[type="checkbox"].create-row-check {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  cursor: pointer !important;
  accent-color: #4a4a4a !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  margin: 0 !important;
  background: #1f1f1f !important;
  border: 1px solid #444 !important;
  border-radius: 3px !important;
}

.create-row-check:checked,
#createSelectAll:checked,
input[type="checkbox"].create-row-check:checked {
  background: #6b7280 !important;
  border-color: #6b7280 !important;
}

.create-row-check:checked::after,
#createSelectAll:checked::after,
input[type="checkbox"].create-row-check:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.create-row-check:disabled,
.complete-row-check:disabled {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
}

/* Complete row checkbox - IDENTICAL to create */
.complete-row-check,
#completeSelectAll,
input[type="checkbox"].complete-row-check {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  cursor: pointer !important;
  accent-color: #4a4a4a !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  margin: 0 !important;
  background: #1f1f1f !important;
  border: 1px solid #444 !important;
  border-radius: 3px !important;
  flex-shrink: 0;
  outline: none !important;
}

.complete-row-check:focus,
.complete-row-check:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.complete-row-check:hover {
  border-color: #666 !important;
  background: #2a2a2a !important;
}

.complete-row-check:checked,
#completeSelectAll:checked,
input[type="checkbox"].complete-row-check:checked {
  background: #6b7280 !important;
  border-color: #6b7280 !important;
}

.complete-row-check:checked::after,
#completeSelectAll:checked::after,
input[type="checkbox"].complete-row-check:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* Force first column visibility */
.data-table th:first-child,
.data-table td:first-child {
  width: 40px !important;
  min-width: 40px !important;
  text-align: center !important;
  padding: 8px !important;
}

.filter-btn {
  background: #2a2a2a;
  border: none;
  border-top: 1px solid #555555;
  border-radius: 8px;
  padding: 10px 16px;
  color: #888888;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: #333333;
  color: #aaaaaa;
}

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

/* Columns auto-fit to content but expand proportionally */
th, td {
  width: 1%;
  white-space: nowrap;
}

thead {
  background: rgba(0, 0, 0, 0.2);
}

th {
  padding: 6px 8px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 10px;
}

tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

tbody tr:last-child {
  border-bottom: none;
}

td {
  padding: 6px 8px;
  color: var(--text-primary);
  font-size: 11px;
}

tbody tr:hover {
  background: var(--bg-hover);
}

.cell-asset {
  display: flex;
  align-items: center;
  gap: 12px;
}

.asset-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

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

.asset-name {
  font-weight: 600;
  font-size: 14px;
}

.asset-symbol {
  font-size: 12px;
  color: var(--text-muted);
}

.asset-badge {
  display: inline-block;
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-green);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-badge.active,
.status-badge.completed,
.status-badge.success {
  background: rgba(0, 214, 143, 0.12);
  color: var(--accent-green);
}

.status-badge.active::before,
.status-badge.completed::before,
.status-badge.success::before {
  background: var(--accent-green);
}

.status-badge.pending,
.status-badge.waiting {
  background: rgba(255, 212, 59, 0.12);
  color: var(--accent-yellow);
}

.status-badge.pending::before,
.status-badge.waiting::before {
  background: var(--accent-yellow);
}

.status-badge.sold,
.status-badge.inactive,
.status-badge.error {
  background: rgba(255, 107, 107, 0.12);
  color: var(--accent-red);
}

.status-badge.sold::before,
.status-badge.inactive::before,
.status-badge.error::before {
  background: var(--accent-red);
}

.status-badge.dead {
  background: rgba(128, 128, 128, 0.2);
  color: #888;
  font-size: 10px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge.dead::before {
  background: #666;
}

.dead-badge {
  background: rgba(128, 128, 128, 0.2) !important;
  color: #888 !important;
}


.dead-row {
  opacity: 0.8;
}

.dead-row:hover {
  opacity: 1;
}

.status-badge.master {
  background: rgba(60, 60, 80, 0.2);
  color: #9ca3af;
}

.status-badge.master::before {
  background: #9ca3af;
}

.status-badge.reseller {
  background: rgba(77, 171, 247, 0.12);
  color: var(--accent-blue);
}

.status-badge.res.membership-badge.active {
  background: var(--success);
  color: white;
}

.membership-badge.inactive {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.status-badge.user {
  background: rgba(139, 139, 154, 0.12);
  color: var(--text-secondary);
}

.status-badge.user::before {
  background: var(--text-secondary);
}

.status-badge.workflow {
  background: rgba(77, 171, 247, 0.12);
  color: var(--accent-blue);
}

.status-badge.workflow::before {
  display: none;
}

/* Verde para sección Complete - cuenta lista para vender */
.status-badge.complete-ready {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-weight: 600;
}

.status-badge.complete-ready::before {
  display: none;
}

.actions-cell {
  white-space: nowrap;
  min-width: 120px;
  text-align: left;
}

/* Action buttons */
.action-btn {
  background: var(--bg-hover);
  border: none;
  width: 24px;
  height: 24px;
  padding: 0;
  cursor: pointer;
  font-size: 12px;
  border-radius: 5px;
  transition: all 0.2s;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 2px;
}

.action-btn:last-child {
  margin-right: 0;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.action-btn.edit:hover {
  color: var(--accent-blue);
}

.action-btn.delete:hover {
  color: var(--accent-red);
  background: rgba(255, 107, 107, 0.1);
}

.action-btn.accept-btn {
  color: #00d68f;
}

.action-btn.accept-btn:hover {
  background: rgba(0, 214, 143, 0.15);
  color: #00ff9f;
}

/* Hide ID column from tables that have ID as first column (NOT Clients table, NOT Emails table) */
#joinlistTable tr td:first-child,
#accountsTable tr td:first-child,
#changesTable tr td:first-child,
#seasonalTable tr td:first-child,
#permanentesTable tr td:first-child,
#hours72Table tr td:first-child,
#createTable tr td:first-child,
#completeTable tr td:first-child,
#section-joinlist .data-table thead th:first-child,
#section-accounts .data-table thead th:first-child,
#section-changes .data-table thead th:first-child,
#section-seasonal .data-table thead th:first-child,
#section-permanentes .data-table thead th:first-child,
#section-hours72 .data-table thead th:first-child,
#section-create .data-table thead th:first-child,
#section-complete .data-table thead th:first-child {
  display: none !important;
}

/* Smooth transitions for table updates - no flash */
.data-table tbody {
  transition: opacity 0.15s ease;
}

.data-table tbody tr {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

/* No data row and loading row - always visible */
.data-table .no-data-row td,
.data-table .loading td {
  display: table-cell !important;
  text-align: center !important;
}

/* Actions column - always visible with fixed width */
.data-table .actions-cell {
  min-width: 200px;
  white-space: nowrap;
  background: transparent;
}

.data-table .actions-cell .action-btn {
  display: inline-flex;
  flex-shrink: 0;
}

/* Status badges - never truncate */
.data-table .status-badge {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

/* Table cells with badges - no truncation */
.data-table td:has(.status-badge) {
  overflow: visible;
  text-overflow: clip;
}

/* Create section uses same action-btn styles as rest of page */

/* ═══════════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════════ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
}

.pagination-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
}

.page-size-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.page-size-selector select {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.page-size-selector select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.2);
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-nav button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s;
}

.pagination-nav button:hover:not(:disabled):not(.active) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.pagination-nav button.active {
  background: linear-gradient(135deg, #3a3a3a, #4a4a4a);
  color: white;
  font-weight: 700;
  border-color: #3a3a3a;
  box-shadow: 0 0 10px rgba(60, 60, 80, 0.5);
  transform: scale(1.1);
}

.pagination-nav button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-dots {
  color: var(--text-secondary);
  padding: 0 4px;
}

.pagination-old {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
}

.pagination button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.pagination button.active {
  background: #3a3a3a;
  color: white;
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════ */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow: hidden;
}

/* Confirm Dialog */
.modal-content.confirm-dialog {
  max-width: 380px;
  padding: 32px;
  text-align: center;
}

.confirm-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.confirm-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.confirm-message {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.confirm-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-buttons .btn {
  min-width: 100px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
}

.btn-danger {
  background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
  color: white;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #ff5252, #e04848);
}

.btn-success {
  background: linear-gradient(135deg, #00d68f, #00c080);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #00c080, #00a870);
}

/* Warehouse search results */
.warehouse-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.warehouse-item {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.warehouse-item:hover {
  background: rgba(60, 60, 80, 0.15);
  border-color: #4a4a4a;
}

.warehouse-item-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.warehouse-item-details {
  font-size: 12px;
  color: var(--text-secondary);
}

.warehouse-item-zip {
  display: inline-block;
  background: rgba(60, 60, 80, 0.3);
  color: #9ca3af;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

/* Modal search input dark theme */
#warehouseSearchInput {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

#warehouseSearchInput:focus {
  outline: none;
  border-color: #4a4a4a;
  box-shadow: 0 0 0 3px rgba(60, 60, 80, 0.2);
}

#warehouseSearchInput::placeholder {
  color: var(--text-secondary);
}

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.close-btn {
  background: var(--bg-hover);
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: all 0.2s;
}

.close-btn:hover {
  background: rgba(255, 107, 107, 0.15);
  color: var(--accent-red);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: 400px;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #4a4a4a;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
}

.btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  border: none;
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.btn-primary {
  background: #3a3a3a;
  color: white;
}

.btn-primary:hover {
  background: #6a5acd;
}

.btn-accent {
  background: #3a3a3a;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-accent:hover {
  background: #6a5acd;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   LOADING STATE
   ═══════════════════════════════════════════════════════════════ */

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 12px;
  padding: 40px;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-top-color: #4a4a4a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS - General Style
   ═══════════════════════════════════════════════════════════════ */

.btn, button:not(.nav-item):not(.user-avatar) {
  background: #2a2a2a;
  border: none;
  border-top: 1px solid #555555;
  border-radius: 8px;
  padding: 10px 16px;
  color: #888888;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover, button:not(.nav-item):not(.user-avatar):hover {
  background: #333333;
  color: #aaaaaa;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

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

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

@media (max-width: 1200px) {
  .sidebar {
    display: none;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .panels-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   NOTIFICATION MODAL
   ═══════════════════════════════════════════════════════════════ */

.notification-modal {
  min-width: 320px;
  max-width: 420px;
}

.notification-modal .modal-header {
  padding: 16px 20px;
}

.notification-modal .modal-body {
  padding: 20px;
}

.notification-modal .notification-message {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  word-break: break-word;
}

.notification-modal .modal-footer {
  padding: 16px 20px;
}

.notification-modal.success .modal-header {
  border-bottom-color: rgba(0, 214, 143, 0.3);
}

.notification-modal.success .modal-header h3 {
  color: var(--accent-green);
}

.notification-modal.error .modal-header {
  border-bottom-color: rgba(255, 107, 107, 0.3);
}

.notification-modal.error .modal-header h3 {
  color: var(--accent-red);
}

.notification-modal.info .modal-header {
  border-bottom-color: rgba(77, 171, 247, 0.3);
}

.notification-modal.info .modal-header h3 {
  color: var(--accent-blue);
}

.notification-modal.warning .modal-header {
  border-bottom-color: rgba(255, 193, 7, 0.3);
}

.notification-modal.warning .modal-header h3 {
  color: #ffc107;
}

.modal-close {
  background: var(--bg-hover);
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 107, 107, 0.15);
  color: var(--accent-red);
}

/* ═══════════════════════════════════════════════════════════════
   ZIP DATE STYLING
   ═══════════════════════════════════════════════════════════════ */

.status-badge.zip-allowed {
  background: rgba(0, 214, 143, 0.12);
  color: var(--accent-green);
}

.status-badge.zip-allowed::before {
  display: none;
}

.status-badge.zip-pending {
  background: rgba(255, 152, 0, 0.12);
  color: #ff9800;
}

.status-badge.zip-pending::before {
  display: none;
}

.status-badge.zip-active {
  background: rgba(156, 39, 176, 0.15);
  color: #ba68c8;
  font-weight: 600;
}

.status-badge.zip-active::before {
  display: none;
}

.status-badge.zip-authorized {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-weight: 600;
}

.status-badge.zip-authorized::before {
  display: none;
}

/* Add Button (+) - estilo 3D sutil como joinlist */
.add-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-color: rgba(255, 255, 255, 0.12);
  border-left-color: rgba(255, 255, 255, 0.10);
  border-bottom-color: rgba(0, 0, 0, 0.3);
  border-right-color: rgba(0, 0, 0, 0.2);
  background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3), inset 1px 1px 1px rgba(255, 255, 255, 0.05);
  color: #888;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  transition: all 0.2s ease;
}

.add-btn:hover {
  background: linear-gradient(145deg, #333333, #252525);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4), inset 1px 1px 1px rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Eye Button (Password Toggle) */
.eye-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border-glass);
  background: var(--bg-glass);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  transition: all 0.2s ease;
}

.eye-btn:hover {
  background: rgba(77, 171, 247, 0.15);
  border-color: var(--accent-blue);
}

.eye-btn.unlocked {
  background: rgba(0, 214, 143, 0.15);
  border-color: var(--accent-green);
}

/* Refresh All Button */
.refresh-all-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.5);
  color: #4caf50;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-left: 6px;
}

.refresh-all-btn:hover {
  background: rgba(76, 175, 80, 0.3);
  border-color: #4caf50;
}

.refresh-all-btn .refresh-icon {
  font-size: 16px;
  font-weight: bold;
  display: inline-block;
  transition: transform 0.2s ease;
}

.refresh-all-btn:hover .refresh-icon {
  transform: rotate(45deg);
}

.refresh-all-btn.loading {
  pointer-events: none;
  background: rgba(255, 193, 7, 0.2);
  border-color: #ffc107;
  color: #ffc107;
}

.refresh-all-btn.loading .refresh-icon {
  animation: spin 1s linear infinite;
}

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

/* Password hidden cell */
.password-hidden {
  color: var(--text-muted);
  letter-spacing: 2px;
}

/* Checkbox styled */
.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-green);
  cursor: pointer;
}

.form-checkbox label {
  color: var(--text-secondary);
  cursor: pointer;
}

/* Quantity Buttons for Request Accounts Modal */
.quantity-btn {
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  background: var(--bg-glass);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quantity-btn:hover {
  background: rgba(0, 214, 143, 0.15);
  border-color: var(--accent-green);
  transform: scale(1.02);
}

.quantity-btn:active {
  transform: scale(0.98);
}

/* ═══════════════════════════════════════════════════════════════
   WAREHOUSE SECTION STYLES
   ═══════════════════════════════════════════════════════════════ */

.warehouse-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  margin: 20px 0;
  padding: 0 15px;
}

.warehouse-stats .stat-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.2s ease;
}

.warehouse-stats .stat-card:hover {
  background: var(--bg-hover);
  border-color: var(--accent-blue);
}

.warehouse-stats .stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.warehouse-stats .stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Reset button style */
.reset-btn {
  min-width: 36px !important;
  width: 36px !important;
  padding: 8px !important;
  font-size: 14px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reset-btn:hover {
  color: var(--accent-red) !important;
}

/* Warehouse section selects - match theme */
#section-warehouse .section-controls select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 13px;
  min-width: 120px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

#section-warehouse .section-controls select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.08);
}

#section-warehouse .section-controls select option {
  background: #1a1a1a;
  color: var(--text-primary);
}

/* Warehouse table - anchos de columnas optimizados para web */
#section-warehouse .data-table {
  table-layout: fixed;
  width: 100%;
}

#section-warehouse .data-table th:nth-child(1),
#section-warehouse .data-table td:nth-child(1) {
  width: 12%;
}

#section-warehouse .data-table th:nth-child(2),
#section-warehouse .data-table td:nth-child(2) {
  width: 35%;
}

#section-warehouse .data-table th:nth-child(3),
#section-warehouse .data-table td:nth-child(3) {
  width: 12%;
}

#section-warehouse .data-table th:nth-child(4),
#section-warehouse .data-table td:nth-child(4) {
  width: 6%;
}

#section-warehouse .data-table th:nth-child(5),
#section-warehouse .data-table td:nth-child(5) {
  width: 8%;
}

#section-warehouse .data-table th:nth-child(6),
#section-warehouse .data-table td:nth-child(6) {
  width: 14%;
}

#section-warehouse .data-table th:nth-child(7),
#section-warehouse .data-table td:nth-child(7) {
  width: 13%;
}

.status-operational {
  color: var(--accent-green);
  font-weight: 500;
}

.status-not-operational {
  color: var(--accent-red);
  font-weight: 500;
}

.onboarding-yes {
  color: var(--accent-green);
}

.onboarding-no {
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   SETTINGS SECTION
   ═══════════════════════════════════════════════════════════════ */

.settings-container {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

.settings-header {
  margin-bottom: 32px;
}

.settings-header h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.settings-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
}

.settings-card-header {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  gap: 16px;
}

.settings-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #00d68f20, #00d68f10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  flex-shrink: 0;
}

.settings-card-icon.manual {
  background: linear-gradient(135deg, rgba(60, 60, 80, 0.2), rgba(60, 60, 80, 0.1));
  color: #9ca3af;
}

.settings-card-icon.auto-accept {
  background: linear-gradient(135deg, #00d68f20, #00d68f10);
  color: #00d68f;
}

.settings-hint {
  font-size: 12px;
  color: #8b8b9a;
  margin-top: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  line-height: 1.5;
}

.settings-card-title {
  flex: 1;
}

.settings-card-title h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.settings-card-title p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #333;
  border-radius: 28px;
  transition: all 0.3s ease;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-green);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

/* Settings Card Body */
.settings-card-body {
  padding: 0 24px 20px;
  border-top: 1px solid var(--border-color);
  margin-top: 0;
  padding-top: 20px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.settings-row:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

.settings-row label {
  color: var(--text-secondary);
  font-size: 14px;
}

.settings-value {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}

/* Time Picker */
.time-picker select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 16px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.time-picker select:hover {
  border-color: var(--accent-green);
}

.time-picker select:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(0, 214, 143, 0.1);
}

/* Action Button */
.settings-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #3a3a3a, #2d2d2d);
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(60, 60, 60, 0.3);
}

.settings-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.settings-action-btn .btn-icon {
  font-size: 18px;
}

/* Email Check Button */
.btn-check-email {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.btn-check-email:hover {
  background: rgba(60, 60, 60, 0.15);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.btn-check-email:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-check-email svg {
  width: 16px;
  height: 16px;
}

/* Location Badges for Email Notifications */
.location-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.location-unknown {
  background: rgba(100, 100, 100, 0.2);
  color: #888;
}

.location-joinlist {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.location-72h {
  background: rgba(249, 115, 22, 0.2);
  color: #f97316;
}

.location-complete {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.location-sold {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
}

.location-dead {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Progress Container */
.refresh-progress-container {
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  background: rgba(60, 60, 60, 0.08);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.progress-status {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}

.progress-count {
  color: var(--text-secondary);
  font-size: 13px;
  font-family: 'Geist Mono', monospace;
}

.progress-bar-wrapper {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3a3a3a, #00d68f);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-details {
  display: flex;
  align-items: center;
  gap: 8px;
}

.current-account {
  color: var(--text-secondary);
  font-size: 12px;
  font-family: 'Geist Mono', monospace;
}

/* Settings Actions */
.settings-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.settings-save-btn {
  background: var(--accent-green);
  border: none;
  border-radius: 10px;
  padding: 14px 32px;
  color: #000;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 214, 143, 0.3);
}

.settings-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Service Status Card */
.settings-card-icon.service {
  background: linear-gradient(135deg, #22c55e20, #22c55e10);
  color: #22c55e;
}

.service-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  background: #1a1a1a;
  font-size: 13px;
  font-weight: 500;
}

.service-status-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #666;
  animation: pulse 2s infinite;
}

.service-status-badge.running .status-dot {
  background: #22c55e;
}

.service-status-badge.down .status-dot {
  background: #ef4444;
  animation: none;
}

.service-status-badge.running .status-text {
  color: #22c55e;
}

.service-status-badge.down .status-text {
  color: #ef4444;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.service-indicator {
  font-size: 13px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 12px;
  background: #1a1a1a;
}

.service-indicator.up {
  color: #22c55e;
  background: #22c55e15;
}

.service-indicator.down {
  color: #ef4444;
  background: #ef444415;
}

/* Mini Service Status Badge */
.service-status-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  background: #1a1a1a;
  font-size: 12px;
  font-weight: 500;
}

.status-dot-mini {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #666;
  animation: pulse 2s infinite;
}

.service-status-mini.running .status-dot-mini {
  background: #22c55e;
}

.service-status-mini.running .status-text-mini {
  color: #22c55e;
}

.service-status-mini.down .status-dot-mini {
  background: #ef4444;
  animation: none;
}

.service-status-mini.down .status-text-mini {
  color: #ef4444;
}

/* ═══════════════════════════════════════════════════════════════
   INLINE REGION SEARCH (Create Table)
   ═══════════════════════════════════════════════════════════════ */
.inline-region-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.inline-search-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: 'Geist Mono', monospace;
  transition: all 0.2s ease;
}

.inline-search-input:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 2px rgba(0, 214, 143, 0.15);
}

.inline-search-input::placeholder {
  color: var(--text-muted);
}

.inline-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  overflow: hidden;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.dropdown-item {
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 12px;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: var(--bg-hover);
}

.dropdown-hint {
  padding: 12px;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
}

.inline-spinner {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
}

.spinner-ring {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════
   ASSIGN REGION BUTTON (Create Table)
   ═══════════════════════════════════════════════════════════════ */
.assign-region-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(0, 214, 143, 0.4);
  border-radius: 6px;
  color: var(--accent-green);
  font-size: 11px;
  font-weight: 500;
  font-family: 'Geist Mono', monospace;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.assign-region-btn:hover {
  background: rgba(0, 214, 143, 0.1);
  border-color: var(--accent-green);
}

.assign-region-btn:disabled {
  cursor: not-allowed;
}

.assign-region-btn.in-progress {
  background: linear-gradient(135deg, #2a2a1a 0%, #1a1a0d 100%);
  border-color: rgba(255, 212, 59, 0.4);
  color: var(--accent-yellow);
  animation: pulse-progress 1.5s ease-in-out infinite;
}

@keyframes pulse-progress {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Re-Login Button */
.relogin-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid #ff6b6b;
  border-radius: 6px;
  color: #ff6b6b;
  font-size: 11px;
  font-weight: 500;
  font-family: 'Geist Mono', monospace;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.relogin-btn:hover {
  background: rgba(255, 107, 107, 0.1);
  border-color: #ff6b6b;
}

.relogin-btn:disabled {
  cursor: not-allowed;
}

.relogin-btn.in-progress {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
  animation: pulse-progress 1.5s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════
   RE-LOGIN MODAL (uses .modal-overlay class, separate from .modal)
   ═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-overlay .relogin-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay .relogin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-overlay .relogin-modal-header h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.modal-overlay .relogin-modal-body {
  padding: 24px;
}

.modal-overlay .relogin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
}

.relogin-form-input {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 14px;
  color: #fff;
  font-size: 13px;
  font-family: 'Geist Mono', monospace;
  width: 100%;
}

.relogin-form-input:focus {
  outline: none;
  border-color: var(--accent-green);
}

.relogin-form-input::placeholder {
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   CLIENT DETAIL MODAL
   ═══════════════════════════════════════════════════════════════ */
.client-detail-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 90%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.client-detail-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
}

.client-detail-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a3a3a, #4a4a4a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  flex-shrink: 0;
}

.client-detail-info {
  flex: 1;
  min-width: 0;
}

.client-detail-info h3 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.client-detail-info p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.client-detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.client-detail-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.client-detail-stats {
  padding: 20px;
}

.client-detail-stats h4 {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.client-detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.client-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}

.client-stat-card.highlight-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
}

.client-stat-card.highlight-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
}

.client-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
}

.client-stat-card.highlight-warning .client-stat-value {
  color: #f59e0b;
}

.client-stat-card.highlight-danger .client-stat-value {
  color: #ef4444;
}

.client-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 6px;
  letter-spacing: 0.5px;
}

.client-detail-actions {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
}

.client-detail-btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.client-detail-btn.primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.client-detail-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.client-detail-btn.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.client-detail-btn.danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.client-detail-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   MY CLIENTS CARDS - ESTILO ADMIN PANEL
   ═══════════════════════════════════════════════════════════════ */

/* Tarjeta de cliente - estilo Admin Panel (mismo color gris) */
.client-card[data-client-id] {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color) !important;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: default;
  box-shadow: none !important;
}

.client-card[data-client-id]:hover {
  border-color: #3a3a3a;
  border-left-color: #3a3a3a !important;
  box-shadow: none !important;
}

.client-card[data-client-id].has-membership {
  border-left: 1px solid var(--border-color) !important;
}

/* Desktop row */
.client-card[data-client-id] .client-row.desktop-only {
  padding: 16px 20px;
  background: transparent;
}

/* Avatar - estilo gris como dashboard */
.client-card[data-client-id] .client-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a3a3a, #4a4a4a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.client-card[data-client-id] .client-identity h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.client-card[data-client-id] .client-meta {
  color: #6b7280;
  font-size: 12px;
}

/* Stat pills - estilo Refresh Button (GRIS SÓLIDO) */
.client-card[data-client-id] .stat-pill {
  background: #2d2d2d !important;
  border: 1px solid #3d3d3d !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  min-width: 70px !important;
  transition: all 0.2s ease;
}

.client-card[data-client-id] .stat-pill:hover {
  background: #3a3a3a !important;
  border-color: #4a4a4a !important;
}

.client-card[data-client-id] .stat-num {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #fff !important;
}

.client-card[data-client-id] .stat-lbl {
  font-size: 9px !important;
  letter-spacing: 0.5px;
  color: #6b7280 !important;
  text-transform: uppercase;
}

/* Botones de acción - estilo 3D sutil como joinlist */
.client-card[data-client-id] .action-icon-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-top-color: rgba(255, 255, 255, 0.10) !important;
  border-left-color: rgba(255, 255, 255, 0.08) !important;
  border-bottom-color: rgba(0, 0, 0, 0.25) !important;
  border-right-color: rgba(0, 0, 0, 0.18) !important;
  border-radius: 8px !important;
  background: linear-gradient(145deg, #2d2d2d, #232323) !important;
  box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.25), inset 1px 1px 1px rgba(255, 255, 255, 0.04) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  font-size: 15px !important;
}

.client-card[data-client-id] .action-icon-btn:hover {
  background: linear-gradient(145deg, #333333, #252525) !important;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4), inset 1px 1px 1px rgba(255, 255, 255, 0.08) !important;
}

.client-card[data-client-id] .action-icon-btn.danger:hover {
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.2), rgba(180, 50, 50, 0.15)) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

/* ═══════════════════════════════════════════════════════════════
   SOLD TABLE - SMOOTH TRANSITIONS
   ═══════════════════════════════════════════════════════════════ */

#soldTable {
  transition: opacity 0.2s ease;
}

#soldTable.loading-fade {
  opacity: 0.5;
}

#soldTable tr {
  transition: all 0.3s ease;
}

#soldTable tr.updated {
  animation: rowHighlight 1s ease;
}

@keyframes rowHighlight {
  0% { background: rgba(16, 185, 129, 0.3); }
  100% { background: transparent; }
}

/* ═══════════════════════════════════════════════════════════════
   MY CLIENTS - MOBILE RESPONSIVE (<1200px)
   ═══════════════════════════════════════════════════════════════ */

.my-client-mobile {
  display: none;
}

@media (max-width: 1200px) {
  /* Ocultar versión desktop */
  .client-card .client-row.desktop-only {
    display: none !important;
  }
  
  /* Mostrar versión móvil - estilo Admin Panel */
  .my-client-mobile {
    display: block;
    padding: 16px;
    background: transparent;
  }
  
  .my-client-mobile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2d2d2d;
  }
  
  /* Avatar móvil - mismo estilo gris que desktop */
  .my-client-mobile .client-avatar {
    background: linear-gradient(135deg, #3a3a3a, #4a4a4a) !important;
  }
  
  .my-client-mobile-info {
    flex: 1;
  }
  
  .my-client-mobile-info h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
  }
  
  .my-client-mobile-info span {
    font-size: 12px;
    color: #6b7280;
  }
  
  .my-client-mobile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
  }
  
  .my-client-stat {
    background: #2d2d2d;
    border: 1px solid #3d3d3d;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
  }
  
  .my-client-stat .stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
  }
  
  .my-client-stat .stat-label {
    display: block;
    font-size: 9px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
  }
  
  .my-client-stat.warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
  }
  
  .my-client-stat.warning .stat-value {
    color: #f59e0b;
  }
  
  .my-client-stat.danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
  }
  
  .my-client-stat.danger .stat-value {
    color: #ef4444;
  }
  
  .my-client-stat.full-width {
    grid-column: span 4;
  }
  
  .my-client-stat.success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
  }
  
  .my-client-stat.success .stat-value {
    color: #10b981;
  }
}

/* Botones de acción móvil - estilo Admin Panel */
.my-client-mobile-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #2d2d2d;
}

.my-client-action-btn {
  flex: 1;
  padding: 10px 12px;
  background: #2d2d2d;
  border: 1px solid #3d3d3d;
  border-radius: 8px;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.my-client-action-btn:hover {
  background: #3a3a3a;
  border-color: #4a4a4a;
  color: #fff;
}

.my-client-action-btn.danger {
  background: #2d2d2d;
  border-color: #3d3d3d;
  color: #9ca3af;
}

.my-client-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}

.my-client-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Pantallas más pequeñas (<600px) */
@media (max-width: 600px) {
  .my-client-mobile-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .my-client-stat.full-width {
    grid-column: span 2;
  }
  
  .my-client-stat .stat-value {
    font-size: 24px;
  }
  
  .my-client-stat .stat-label {
    font-size: 10px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE STYLES
   ═══════════════════════════════════════════════════════════════ */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1100;
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 0;
}

.mobile-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  pointer-events: none;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1050;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active,
.mobile-overlay.menu-open,
.mobile-overlay.overlay-visible {
  display: block !important;
  opacity: 1 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0,0,0,0.7) !important;
  z-index: 1050 !important;
}

/* Table Responsive Wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;
  padding: 0 16px;
}

/* ═══════════════════════════════════════════════════════════════
   TABLET BREAKPOINT (max-width: 1024px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .sidebar {
    width: 180px;
  }
  
  .main-content {
    margin-left: 180px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE BREAKPOINT (max-width: 1200px)
   Sidebar hidden, vertical layout
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  /* Comportamiento app nativa - sin scroll horizontal ni zoom */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    touch-action: pan-y !important;
    overscroll-behavior: none !important;
  }
  
  .container,
  .main-content,
  .content,
  .content-section {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  
  /* Tablas en móvil NO tienen scroll horizontal */
  .table-container {
    overflow-x: hidden !important;
  }
  
  .data-table {
    min-width: unset !important;
    width: 100% !important;
  }
  
  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: flex;
  }
  
  /* Sidebar mobile behavior */
  .sidebar {
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1060;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
  }
  
  .sidebar.active,
  .sidebar.menu-open,
  .sidebar.sidebar-visible {
    transform: translateX(0) !important;
    display: flex !important;
    visibility: visible !important;
  }
  
  /* Main content full width on mobile */
  .main-content {
    margin-left: 0;
    width: 100%;
  }
  
  /* Header adjustments - fixed with blur */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 8px 12px 8px 54px;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    min-height: 56px;
    max-height: 56px;
    background: rgba(17, 17, 17, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  /* Add padding to main content to compensate for fixed header */
  .main-content {
    padding-top: 64px;
  }
  
  .search-container {
    flex: 1;
    max-width: none;
  }
  
  .search-box {
    width: 100%;
  }
  
  .search-box input {
    padding: 8px 12px 8px 32px;
    font-size: 12px;
    border-radius: 20px;
  }
  
  .search-icon {
    left: 10px;
    width: 14px;
    height: 14px;
  }
  
  .search-shortcut {
    display: none !important;
  }
  
  .header-right {
    display: none !important;
  }
  
  /* Stats grid mobile - 2 columnas */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
  
  .stat-card {
    padding: 12px;
  }
  
  .stat-value {
    font-size: 18px;
  }
  
  .stat-label {
    font-size: 10px;
  }
  
  /* Home panels grid mobile - 1 columna */
  .home-panels-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  .home-panel {
    width: 100%;
  }
  
  /* Page header mobile */
  .page-header {
    padding-left: 0;
    margin-bottom: 12px;
  }
  
  .page-title {
    font-size: 18px;
  }
  
  .page-subtitle {
    font-size: 11px;
  }
  
  /* Content padding */
  .content {
    padding: 12px;
  }
  
  /* Table responsive - tarjetas compactas */
  .table-container {
    overflow-x: visible;
  }
  
  .data-table {
    width: 100%;
    border-collapse: collapse;
  }
  
  /* Ocultar headers */
  .data-table thead {
    display: none;
  }
  
  /* Cada fila es una tarjeta con borde recto */
  .data-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 10px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 12px;
    margin-bottom: 10px;
    background: var(--bg-card);
    align-items: center;
  }
  
  /* Todas las celdas */
  .data-table tbody td {
    padding: 2px 0;
    font-size: 11px;
    border: none;
    line-height: 1.4;
  }
  
  /* OCULTAR ID (primera columna) - excepto Dead y Warehouse */
  .data-table tbody td:first-child {
    display: none !important;
  }
  
  #section-dead .data-table tbody td:first-child {
    display: block !important;
  }
  
  /* Fila 1: Nombre (izq) */
  .data-table tbody td:nth-child(3) {
    grid-column: 1;
    grid-row: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* Fila 1: Email (der) - completo */
  .data-table tbody td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    font-size: 10px;
    color: var(--text-secondary);
    text-align: right;
    word-break: break-all;
  }
  
  /* Fila 2: Datos en línea */
  .data-table tbody td:nth-child(4) {
    grid-column: 1;
    grid-row: 2;
    font-size: 10px;
  }
  
  .data-table tbody td:nth-child(5) {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
    font-size: 10px;
  }
  
  /* Fila 3: Status y fechas */
  .data-table tbody td:nth-child(6) {
    grid-column: 1;
    grid-row: 3;
    font-size: 10px;
  }
  
  .data-table tbody td:nth-child(7) {
    grid-column: 2;
    grid-row: 3;
    text-align: right;
    font-size: 10px;
  }
  
  /* Fila 4: Más datos */
  .data-table tbody td:nth-child(8) {
    grid-column: 1;
    grid-row: 4;
    font-size: 10px;
  }
  
  .data-table tbody td:nth-child(9) {
    grid-column: 2;
    grid-row: 4;
    text-align: right;
    font-size: 10px;
  }
  
  /* Badges compactos */
  .data-table .status-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 9px;
    white-space: nowrap;
  }
  
  /* Fechas */
  .data-table .date-badge {
    font-size: 9px;
    padding: 2px 6px;
  }
  
  /* Última celda con acciones - botones extendidos sin línea */
  .data-table tbody td:last-child {
    grid-column: 1 / -1 !important;
    grid-row: 5;
    display: flex !important;
    flex-direction: row !important;
    justify-content: stretch !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 6px;
    margin-top: 10px;
    padding-top: 0;
    border-top: none !important;
  }
  
  /* Botones de acción - extendidos a lo ancho */
  .data-table td:last-child > *,
  .data-table td:last-child .btn-icon,
  .data-table td:last-child .action-btn,
  .data-table td:last-child button,
  .data-table td:last-child .btn {
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    text-align: center !important;
    padding: 10px 4px !important;
    font-size: 15px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  
  /* Botón Assign Region a todo el ancho */
  .data-table td:last-child .btn-primary,
  .data-table td:last-child .btn-assign {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  
  /* Modales centrados en móvil - SOLO cuando están activos */
  .modal.active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
  }
  
  .modal-content {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 0 auto !important;
    width: calc(100% - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
  }
  
  /* Toolbar mobile */
  .table-toolbar {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  
  .toolbar-left,
  .toolbar-right {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .toolbar-btn {
    padding: 6px 10px;
    font-size: 10px;
  }
  
  /* Pagination mobile */
  .pagination {
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }
  
  .pagination-info {
    width: 100%;
    text-align: center;
    order: -1;
    font-size: 10px;
  }
  
  /* Cards section mobile */
  .section-card {
    padding: 12px;
  }
  
  .section-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  
  /* Modal mobile centrado */
  .modal-content,
  .modal-overlay .relogin-modal-content {
    width: 92%;
    max-width: none;
    margin: 0;
    max-height: 85vh;
  }
  
  /* Action buttons in tables */
  .action-btn {
    padding: 5px 8px;
    font-size: 9px;
  }
  
  .assign-region-btn,
  .relogin-btn {
    padding: 5px 8px;
    font-size: 9px;
  }
  
  /* Filter dropdowns */
  .filter-dropdown {
    min-width: 80px;
    font-size: 10px;
    padding: 6px 8px;
  }
  
  /* Settings section mobile */
  .settings-card {
    padding: 12px;
  }
  
  .settings-group {
    flex-direction: column;
    gap: 6px;
  }
  
  /* Recent changes panel */
  .changes-panel {
    padding: 12px;
  }
  
  .change-item {
    padding: 10px 0;
  }
  
  /* ═══ WAREHOUSE RESPONSIVE ═══ */
  .warehouse-stats {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 8px;
    padding: 0 10px 10px;
    -webkit-overflow-scrolling: touch;
  }
  
  .warehouse-stats .stat-card {
    flex: 0 0 auto;
    min-width: 75px;
    padding: 10px 12px;
  }
  
  .warehouse-stats .stat-value {
    font-size: 16px;
  }
  
  .warehouse-stats .stat-label {
    font-size: 8px;
  }
  
  /* Section controls warehouse - full width */
  #section-warehouse .section-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  
  #section-warehouse .section-controls {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }
  
  #section-warehouse .section-controls select,
  #section-warehouse .section-controls input {
    width: 100% !important;
    flex: none !important;
    min-width: 0 !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
  }
  
  #section-warehouse .section-controls button {
    width: 100% !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
  }
  
  /* Warehouse stats - full width horizontal */
  .warehouse-stats {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    gap: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  .warehouse-stats .stat-item {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 8px 4px !important;
    text-align: center !important;
  }
  
  .warehouse-stats .stat-value {
    font-size: 14px !important;
  }
  
  .warehouse-stats .stat-label {
    font-size: 8px !important;
    white-space: nowrap !important;
  }
  
  /* Warehouse table - tarjetas compactas sin scroll */
  #section-warehouse .table-container {
    overflow-x: hidden;
  }
  
  #section-warehouse .data-table {
    min-width: 0;
    width: 100%;
  }
  
  #section-warehouse .data-table thead {
    display: none !important;
  }
  
  #section-warehouse .data-table tbody tr {
    display: block !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0 !important;
    padding: 8px 12px !important;
    margin-bottom: 4px !important;
    background: var(--bg-card) !important;
  }
  
  #section-warehouse .data-table tbody td {
    display: block !important;
    padding: 1px 0 !important;
    border: none !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    text-align: left !important;
    color: var(--text-primary) !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    width: auto !important;
  }
  
  /* Etiquetas */
  #section-warehouse .data-table tbody td::before {
    color: var(--text-secondary) !important;
    font-weight: 400 !important;
  }
  
  /* Region */
  #section-warehouse .data-table tbody td:nth-child(1)::before { content: "Region: " !important; }
  #section-warehouse .data-table tbody td:nth-child(1) { color: #10b981 !important; font-weight: 600 !important; }
  
  /* Warehouse */
  #section-warehouse .data-table tbody td:nth-child(2)::before { content: "Warehouse: " !important; }
  #section-warehouse .data-table tbody td:nth-child(2) { font-weight: 600 !important; }
  
  /* City */
  #section-warehouse .data-table tbody td:nth-child(3)::before { content: "City: " !important; }
  
  /* State */
  #section-warehouse .data-table tbody td:nth-child(4)::before { content: "State: " !important; }
  
  /* Zip */
  #section-warehouse .data-table tbody td:nth-child(5)::before { content: "Zip: " !important; }
  
  /* Status */
  #section-warehouse .data-table tbody td:nth-child(6)::before { content: "Status: " !important; }
  #section-warehouse .data-table tbody td:nth-child(6) { font-weight: 500 !important; }
  
  /* Ocultar Onboarding en móvil */
  #section-warehouse .data-table tbody td:nth-child(7) { display: none !important; }
  
  /* ═══════════════════════════════════════════════════════════════
     DEAD ACCOUNTS SECTION - MOBILE CARD LAYOUT
     ═══════════════════════════════════════════════════════════════ */
  #section-dead .data-table thead {
    display: none !important;
  }
  
  #section-dead .data-table tbody tr {
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 1px 8px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 8px 12px;
    margin-bottom: 2px;
    background: var(--bg-card);
  }
  
  #section-dead .data-table tbody td {
    padding: 1px 0 !important;
    border: none !important;
    font-size: 11px;
    line-height: 1.3;
    width: auto !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
  }
  
  /* Fila 1: Email (izq) - Name (der) */
  #section-dead .data-table tbody td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #fff !important;
    word-break: break-all;
    text-align: left !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  #section-dead .data-table tbody td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: right;
  }
  
  /* Fila 2: Password (izq) - Region (der) */
  #section-dead .data-table tbody td:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    text-align: left;
  }
  
  #section-dead .data-table tbody td:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
    font-size: 10px;
    color: #10b981;
    text-align: right;
  }
  
  /* Fila 3: Reason (ancho completo, rojo) */
  #section-dead .data-table tbody td:nth-child(6) {
    grid-column: 1 / -1;
    grid-row: 3;
    font-size: 10px;
    color: #ef4444;
    text-align: left;
  }
  
  /* Fila 4: From (izq) - Dead At (der) */
  #section-dead .data-table tbody td:nth-child(7) {
    grid-column: 1;
    grid-row: 4;
    font-size: 10px;
    color: var(--text-secondary);
    text-align: left;
  }
  
  #section-dead .data-table tbody td:nth-child(8) {
    grid-column: 2;
    grid-row: 4;
    font-size: 10px;
    color: var(--accent-blue);
    text-align: right;
  }
  
  /* Ocultar Warehouse (no cabe) */
  #section-dead .data-table tbody td:nth-child(5) {
    display: none !important;
  }
  
  /* Fila 5: Actions (ancho completo) */
  #section-dead .data-table tbody td:nth-child(9) {
    grid-column: 1 / -1;
    grid-row: 5;
    display: flex !important;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  
  #section-dead .data-table tbody td:nth-child(9) button,
  #section-dead .data-table tbody td:nth-child(9) .action-btn,
  #section-dead .data-table tbody td:nth-child(9) .btn-icon {
    width: auto !important;
    height: 28px !important;
    padding: 4px 12px !important;
    font-size: 14px !important;
    min-width: 36px;
    flex: 1;
  }
  
  /* Dead section controls */
  #section-dead .section-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  
  #section-dead .section-controls {
    flex-direction: row !important;
    width: 100% !important;
    gap: 8px !important;
  }
  
  #section-dead .section-controls #deadSearch {
    flex: 1;
    padding: 10px 12px !important;
    font-size: 12px !important;
  }
  
  #section-dead .section-controls #refreshDead {
    padding: 10px 16px !important;
    font-size: 11px !important;
    white-space: nowrap;
  }
  
  /* Loading compacto */
  .loading {
    padding: 15px !important;
    gap: 8px !important;
  }
  
  .loading-spinner {
    width: 18px !important;
    height: 18px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SMALL MOBILE BREAKPOINT (max-width: 480px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  /* Stats grid single column on very small screens */
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 12px;
  }
  
  .stat-value {
    font-size: 18px;
  }
  
  /* Header compact */
  .header {
    padding: 10px 12px;
    padding-left: 60px;
  }
  
  .page-header {
    margin-bottom: 16px;
  }
  
  .page-title {
    font-size: 18px;
  }
  
  .page-subtitle {
    font-size: 11px;
  }
  
  /* Content minimal padding */
  .content {
    padding: 12px;
  }
  
  /* Table even more compact */
  .data-table th,
  .data-table td {
    padding: 8px 6px;
    font-size: 10px;
  }
  
  /* Toolbar buttons stack */
  .toolbar-btn {
    flex: 1;
    min-width: calc(50% - 4px);
    text-align: center;
    justify-content: center;
  }
  
  /* Pagination compact */
  .pagination button {
    padding: 6px 10px;
    font-size: 11px;
  }
  
  /* Modal centrado en dispositivos pequeños */
  .modal-content,
  .modal-overlay .relogin-modal-content {
    width: 92%;
    height: auto;
    max-height: 85vh;
    margin: 0;
    border-radius: 12px;
  }
  
  /* Botón cerrar modal más grande y visible */
  .modal-content .close-btn,
  .modal-content .modal-close {
    min-width: 44px;
    min-height: 44px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Nav menu compact */
  .nav-item {
    padding: 10px 14px;
  }
  
  .nav-label {
    font-size: 12px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SUBSCRIPTION STATUS CARDS (Membership & Packages)
   ═══════════════════════════════════════════════════════════════ */

.subscription-status-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.status-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.status-card-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.status-card-header .status-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.active {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-green);
}

.status-badge.inactive {
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
}

.status-badge.master {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #fff;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.status-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.status-value.highlight {
  color: var(--accent-green);
  font-size: 20px;
}

/* Usage Section */
.usage-section {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 20px;
}

.usage-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.usage-bar-container {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.usage-bar {
  flex: 1;
  height: 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  overflow: hidden;
}

.usage-bar-fill {
  height: 100%;
  background: var(--accent-green);
  border-radius: 6px;
  transition: width 0.3s ease;
}

.usage-text {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.usage-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.usage-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.usage-detail-item.total {
  color: var(--text-primary);
  font-weight: 500;
}

.usage-detail-item.remaining {
  color: var(--accent-green);
  font-weight: 600;
}

.usage-icon {
  font-size: 14px;
}

/* Package History */
.package-history-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.package-history-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.package-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.package-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.package-history-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.package-type {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.package-date {
  font-size: 11px;
  color: var(--text-muted);
}

.package-history-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
}

.package-accounts {
  color: var(--accent-blue);
}

.package-used {
  color: var(--text-secondary);
}

.package-remaining {
  color: var(--accent-green);
  font-weight: 500;
}

.package-payment-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.package-payment-status.paid {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-green);
}

.package-payment-status.pending {
  background: rgba(255, 165, 0, 0.15);
  color: var(--accent-orange);
}

.package-payment-status.manual {
  background: rgba(77, 171, 247, 0.15);
  color: var(--accent-blue);
}

.no-packages {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 20px;
}

/* Mobile responsive for status cards */
@media (max-width: 1200px) {
  .subscription-status-card {
    padding: 16px;
  }
  
  .status-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .usage-details {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .package-history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .package-history-stats {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MEMBERSHIPS & PACKAGES SECTION
   ═══════════════════════════════════════════════════════════════ */

.membership-section {
  margin-top: 32px;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
}

.membership-header {
  margin-bottom: 16px;
}

.membership-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.membership-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.membership-description {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: rgba(0, 214, 143, 0.05);
  border-left: 3px solid var(--accent-green);
  border-radius: 0 8px 8px 0;
}

/* Plans Grid - Full Width */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
}

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

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

@media (max-width: 600px) {
  .plans-grid {
    grid-template-columns: 1fr;
  }
}

.plan-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: left;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.plan-card:hover {
  border-color: rgba(255,255,255,0.2);
}

.plan-card.featured {
  border-color: rgba(180, 140, 80, 0.5);
  background: linear-gradient(145deg, rgba(180, 140, 80, 0.15) 0%, var(--bg-card) 50%);
}

.plan-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.plan-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.plan-price {
  font-size: 42px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  line-height: 1;
}

.plan-price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
}

.plan-features {
  list-style: none;
  margin-bottom: 24px;
  flex-grow: 1;
}

.plan-features li {
  color: var(--text-secondary);
  font-size: 13px;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  font-size: 10px;
  color: var(--text-secondary);
}

.plan-btn {
  width: 100%;
  padding: 14px 20px;
  background: rgba(30, 30, 30, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: auto;
}

.plan-btn:hover:not(:disabled) {
  background: rgba(50, 50, 50, 0.9);
  border-color: rgba(255,255,255,0.2);
}

.plan-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.plan-card.featured .plan-btn {
  border-color: rgba(180, 140, 80, 0.4);
}

.plan-card.featured .plan-btn:hover:not(:disabled) {
  border-color: rgba(180, 140, 80, 0.6);
}

/* Packages Grid - Full Width */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
}

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

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

@media (max-width: 600px) {
  .packages-grid {
    grid-template-columns: 1fr;
  }
}

.package-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: left;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.package-card:hover {
  border-color: rgba(255,255,255,0.2);
}

.package-card.featured {
  border-color: rgba(180, 140, 80, 0.5);
  background: linear-gradient(145deg, rgba(180, 140, 80, 0.15) 0%, var(--bg-card) 50%);
}

.package-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.package-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.package-price {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1;
}

.package-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 8px;
}

.package-per {
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 16px;
}

.package-features {
  list-style: none;
  margin-bottom: 24px;
  flex-grow: 1;
}

.package-features li {
  color: var(--text-secondary);
  font-size: 13px;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.package-btn {
  width: 100%;
  padding: 14px 20px;
  background: rgba(30, 30, 30, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: auto;
}

.package-btn:hover:not(:disabled) {
  background: rgba(50, 50, 50, 0.9);
  border-color: rgba(255,255,255,0.2);
}

.package-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.package-card.featured .package-btn {
  border-color: rgba(180, 140, 80, 0.4);
}

.package-card.featured .package-btn:hover:not(:disabled) {
  border-color: rgba(180, 140, 80, 0.6);
}

/* Benefits Bar */
.benefits-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 8px 0;
  margin-bottom: 24px;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.benefit-icon {
  font-size: 16px;
}

.membership-contact {
  text-align: left;
  padding: 16px 0;
  margin-top: 40px;
}

.membership-contact p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 16px;
}

.contact-btn {
  padding: 14px 32px;
  background: transparent;
  border: 2px solid var(--accent-green);
  color: var(--accent-green);
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-btn:hover:not(:disabled) {
  background: var(--accent-green);
  color: #000;
}

.contact-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile Responsive for Membership */
@media (max-width: 1200px) {
  .membership-page {
    padding: 12px;
  }
  
  .membership-page-header h2 {
    font-size: 24px;
  }
  
  .membership-block {
    padding: 20px 16px;
    border-radius: 16px;
  }
  
  .membership-block-header h3 {
    font-size: 18px;
  }
  
  .membership-benefits,
  .benefits-bar {
    gap: 16px;
    padding: 16px;
  }
  
  .benefit-item {
    flex: 1 1 45%;
    font-size: 12px;
  }
  
  .benefits-bar .benefit-item {
    flex: 1 1 45%;
  }
  
  .plans-grid,
  .packages-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .plan-card,
  .package-card {
    padding: 24px 20px;
  }
  
  .plan-accounts {
    font-size: 36px;
  }
  
  .plan-price {
    font-size: 24px;
  }
  
  .package-quantity {
    font-size: 32px;
  }
  
  .package-price {
    font-size: 22px;
  }
  
  .membership-contact {
    padding: 24px 16px;
  }
}

@media (max-width: 480px) {
  .membership-page-header h2 {
    font-size: 20px;
  }
  
  .membership-block {
    padding: 16px 12px;
  }
  
  .benefit-item {
    flex: 1 1 100%;
    justify-content: center;
  }
  
  .plan-features li {
    font-size: 11px;
  }
}

/* ═══════════════════════════════════════════════════════════════ */
/* PAYWALL STYLES */
/* ═══════════════════════════════════════════════════════════════ */

.paywall-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.paywall-content {
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.paywall-content h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.paywall-content > p {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 8px;
}

.paywall-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px !important;
}

.paywall-plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

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

@media (max-width: 500px) {
  .paywall-plans {
    grid-template-columns: 1fr;
  }
}

.paywall-plan {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.paywall-plan:hover {
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-4px);
}

.paywall-plan.featured {
  border-color: rgba(180, 140, 80, 0.5);
  background: linear-gradient(145deg, rgba(180, 140, 80, 0.15) 0%, var(--bg-card) 50%);
}

.paywall-plan-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.paywall-plan-accounts {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.paywall-plan-price {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
}

.paywall-plan-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* Membership Badge */
.membership-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.membership-badge.master {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #fff;
}

.membership-badge.active {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-green);
}

.membership-badge.inactive {
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
}

/* Role badges */
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.role-badge.master {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #1a1a2e;
}

.role-badge.reseller {
  background: var(--primary);
  color: white;
}

.role-badge.user {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* Clients section selects - match warehouse theme */
#section-clients .section-controls select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 13px;
  min-width: 120px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

#section-clients .section-controls select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.08);
}

#section-clients .section-controls select option {
  background: #1a1a1a;
  color: var(--text-primary);
}

/* Action buttons for clients table */
.action-buttons {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #a0a0a0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.action-btn svg {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  stroke: #a0a0a0 !important;
  fill: none !important;
  stroke-width: 2 !important;
}

.action-btn:hover svg {
  stroke: #fff !important;
}

/* ═══════════════════════════════════════════════════════════════
   CLIENTS TABLE MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  /* Clients section controls - full width */
  #section-clients .section-controls {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }
  
  #section-clients .section-controls input,
  #section-clients .section-controls select {
    width: 100% !important;
    flex: none !important;
    min-width: 0 !important;
    font-size: 14px !important;
    padding: 12px 16px !important;
    box-sizing: border-box !important;
  }
  
  #section-clients .section-controls button {
    width: 100% !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
  }
  
  /* Clients section header full width */
  #section-clients .section-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  
  /* Clients table as cards - compact linear design */
  #section-clients .data-table thead {
    display: none !important;
  }
  
  #section-clients .data-table tbody tr {
    display: block !important;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    padding: 10px 12px;
    margin-bottom: 0;
    background: transparent;
  }
  
  #section-clients .data-table tbody td {
    display: inline-block !important;
    padding: 0;
    border: none !important;
    font-size: 13px;
    line-height: 1.3;
  }
  
  /* Column 1: Name + Username - inline */
  #section-clients .data-table tbody td:nth-child(1) {
    display: block !important;
  }
  
  #section-clients .data-table tbody td:nth-child(1) .client-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
  }
  
  #section-clients .data-table tbody td:nth-child(1) .client-username {
    font-size: 12px !important;
    color: var(--text-muted) !important;
    margin-left: 6px;
  }
  
  /* Column 2: Telegram ID - same line */
  #section-clients .data-table tbody td:nth-child(2) {
    display: block !important;
    font-size: 12px;
    color: var(--text-muted);
    margin: 2px 0;
  }
  
  /* Column 3: Role - position top right */
  #section-clients .data-table tbody td:nth-child(3) {
    position: absolute !important;
    top: 10px;
    right: 12px;
  }
  
  /* Column 4: Membership badge - inline */
  #section-clients .data-table tbody td:nth-child(4) {
    display: inline-block !important;
    margin-right: 8px;
  }
  
  /* Column 5: Slots - inline */
  #section-clients .data-table tbody td:nth-child(5) {
    display: inline-block !important;
    margin-right: 8px;
    font-size: 12px;
  }
  
  #section-clients .data-table tbody td:nth-child(5)::before {
    content: "Slots: ";
    color: var(--text-muted);
  }
  
  /* Column 6: Expires - inline */
  #section-clients .data-table tbody td:nth-child(6) {
    display: inline-block !important;
    font-size: 12px;
    color: var(--text-secondary);
  }
  
  #section-clients .data-table tbody td:nth-child(6)::before {
    content: "Exp: ";
    color: var(--text-muted);
  }
  
  /* Column 7: Actions - compact row */
  #section-clients .data-table tbody td:nth-child(7) {
    display: flex !important;
    gap: 6px;
    margin-top: 6px;
  }
  
  #section-clients .data-table tbody td:nth-child(7) .action-buttons {
    display: flex !important;
    gap: 6px;
  }
  
  #section-clients .data-table tbody td:nth-child(7) .action-btn {
    width: 36px;
    height: 36px;
    flex: none;
  }
  
  /* ═══════════════════════════════════════════════════════════════
     CREATE SECTION - MOBILE CARD LAYOUT (compacto como joinlist)
     ═══════════════════════════════════════════════════════════════ */
  #section-create .data-table thead {
    display: none !important;
  }
  
  #section-create .data-table tbody tr {
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 6px 12px;
    margin-bottom: 2px;
    background: var(--bg-card);
  }
  
  #section-create .data-table tbody td {
    padding: 0 !important;
    border: none !important;
    font-size: 11px;
    line-height: 1.2;
    width: auto !important;
    min-width: 0 !important;
  }
  
  /* Hide ID column */
  #section-create .data-table tbody td:nth-child(1) {
    display: none !important;
  }
  
  /* Fila 1: Email (izq) + Date (der) */
  #section-create .data-table tbody td:nth-child(2) {
    display: block !important;
    grid-column: 1;
    grid-row: 1;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
    text-align: left !important;
  }
  
  #section-create .data-table tbody td:nth-child(6) {
    grid-column: 2;
    grid-row: 1;
    font-size: 10px;
    color: var(--accent-blue);
    text-align: right;
  }
  
  /* Fila 2: Nombre (izq) + Password (der) */
  #section-create .data-table tbody td:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
    font-size: 10px;
    color: var(--text-secondary);
    text-align: left;
  }
  
  #section-create .data-table tbody td:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    text-align: right;
  }
  
  /* Fila 3: 2FA (ocultar - redundante) */
  #section-create .data-table tbody td:nth-child(5) {
    display: none !important;
  }
  
  /* Fila 3: Actions (horizontal compacto) */
  #section-create .data-table tbody td:nth-child(7) {
    grid-column: 1 / -1;
    grid-row: 3;
    display: flex !important;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  
  #section-create .data-table tbody td:nth-child(7) button,
  #section-create .data-table tbody td:nth-child(7) .action-btn {
    width: auto !important;
    height: 28px !important;
    padding: 4px 12px !important;
    font-size: 14px !important;
    min-width: 36px;
  }
  
  #section-joinlist .data-table tbody td:nth-child(10) button,
  #section-joinlist .data-table tbody td:nth-child(10) .action-btn {
    width: auto !important;
    height: 28px !important;
    padding: 4px 12px !important;
    font-size: 14px !important;
    min-width: 36px;
  }
  
  /* Create section header - reorganizar para móvil */
  #section-create .section-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  
  #section-create .section-controls {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }
  
  #section-create .section-controls .bulk-actions {
    width: 100%;
    order: 1;
  }
  
  #section-create .section-controls #createSearch {
    width: 100% !important;
    order: 2;
    padding: 10px 12px;
    font-size: 13px;
  }
  
  #section-create .section-controls #refreshCreate {
    width: 100% !important;
    order: 3;
    padding: 10px 12px;
    font-size: 13px;
    text-align: center;
  }
  
  /* ═══════════════════════════════════════════════════════════════
     JOINLIST SECTION - MOBILE CARD LAYOUT
     ═══════════════════════════════════════════════════════════════ */
  #section-joinlist .data-table thead {
    display: none !important;
  }
  
  #section-joinlist .data-table tbody tr {
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 1px 8px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 8px 12px;
    margin-bottom: 2px;
    background: var(--bg-card);
  }
  
  #section-joinlist .data-table tbody td {
    padding: 1px 0 !important;
    border: none !important;
    font-size: 11px;
    line-height: 1.3;
    width: auto !important;
    min-width: 0 !important;
  }
  
  /* Ocultar: user_id (1) y created_at (9) */
  #section-joinlist .data-table tbody td:nth-child(1),
  #section-joinlist .data-table tbody td:nth-child(9) {
    display: none !important;
  }
  
  /* Fila 1: Email (izq) */
  #section-joinlist .data-table tbody td:nth-child(2) {
    display: block !important;
    grid-column: 1;
    grid-row: 1;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
    text-align: left !important;
  }
  
  /* Fila 1: Region (der) */
  #section-joinlist .data-table tbody td:nth-child(5) {
    grid-column: 2;
    grid-row: 1;
    font-size: 11px;
    color: #10b981;
    text-align: right;
  }
  
  /* Fila 2: Nombre (izq) */
  #section-joinlist .data-table tbody td:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: left;
  }
  
  /* Fila 2: Password (der) */
  #section-joinlist .data-table tbody td:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    text-align: right;
  }
  
  /* Fila 3: Warehouse (ancho completo) */
  #section-joinlist .data-table tbody td:nth-child(7) {
    grid-column: 1 / -1;
    grid-row: 3;
    font-size: 10px;
    color: var(--text-secondary);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* Fila 4: Workflow status (izq) */
  #section-joinlist .data-table tbody td:nth-child(6) {
    grid-column: 1;
    grid-row: 4;
    font-size: 10px;
    text-align: left;
  }
  
  /* Fila 4: Zip update date (der) */
  #section-joinlist .data-table tbody td:nth-child(8) {
    grid-column: 2;
    grid-row: 4;
    font-size: 10px;
    color: var(--accent-blue);
    text-align: right;
  }
  
  /* Fila 5: Actions (ancho completo) */
  #section-joinlist .data-table tbody td:nth-child(10) {
    grid-column: 1 / -1;
    grid-row: 5;
    display: flex !important;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  
  
  /* Joinlist section header - igual que Create */
  #section-joinlist .section-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  
  #section-joinlist .section-controls {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }
  
  #section-joinlist .section-controls #joinlistRegionFilter,
  #section-joinlist .section-controls .region-filter {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
  }
  
  #section-joinlist .section-controls #joinlistSearch {
    width: calc(100vw - 63px) !important;
    max-width: calc(100vw - 63px) !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
  }
  
  #section-joinlist .section-controls #refreshJoinlist {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  /* ═══════════════════════════════════════════════════════════════
     72 HOURS SECTION - MOBILE LAYOUT
     ═══════════════════════════════════════════════════════════════ */
  #section-hours72 .section-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #section-hours72 .section-controls {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  #section-hours72 .section-controls #hours72RegionFilter,
  #section-hours72 .section-controls .region-filter {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
  }

  #section-hours72 .section-controls #hours72Search {
    width: calc(100vw - 63px) !important;
    max-width: calc(100vw - 63px) !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
  }

  #section-hours72 .section-controls #refreshHours72 {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  /* 72 Hours Table - Card Layout */
  #section-hours72 .data-table thead {
    display: none !important;
  }

  #section-hours72 .data-table tbody tr {
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 1px 8px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 8px 12px;
    margin-bottom: 2px;
    background: var(--bg-card);
  }

  #section-hours72 .data-table tbody td {
    padding: 1px 0 !important;
    border: none !important;
    font-size: 11px;
    line-height: 1.3;
    width: auto !important;
    min-width: 0 !important;
  }

  /* Ocultar: ID (1) y Moved At (9) */
  #section-hours72 .data-table tbody td:nth-child(1),
  #section-hours72 .data-table tbody td:nth-child(9) {
    display: none !important;
  }

  /* Fila 1: Email (izq) */
  #section-hours72 .data-table tbody td:nth-child(2) {
    display: block !important;
    grid-column: 1;
    grid-row: 1;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
    text-align: left !important;
  }

  /* Fila 1: Region (der) */
  #section-hours72 .data-table tbody td:nth-child(5) {
    grid-column: 2;
    grid-row: 1;
    font-size: 11px;
    color: #10b981;
    text-align: right;
  }

  /* Fila 2: Nombre (izq) */
  #section-hours72 .data-table tbody td:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: left;
  }

  /* Fila 2: Password (der) - ocultar */
  #section-hours72 .data-table tbody td:nth-child(4) {
    display: none !important;
  }

  /* Fila 3: Warehouse (ancho completo) */
  #section-hours72 .data-table tbody td:nth-child(7) {
    grid-column: 1 / -1;
    grid-row: 3;
    font-size: 10px;
    color: var(--text-secondary);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Fila 4: Workflow (izq) */
  #section-hours72 .data-table tbody td:nth-child(6) {
    grid-column: 1;
    grid-row: 4;
    font-size: 10px;
    text-align: left;
  }

  /* Fila 4: Zip Update (der) */
  #section-hours72 .data-table tbody td:nth-child(8) {
    grid-column: 2;
    grid-row: 4;
    font-size: 10px;
    color: var(--accent-blue);
    text-align: right;
  }

  /* Fila 5: Actions (ancho completo) */
  #section-hours72 .data-table tbody td:nth-child(10) {
    grid-column: 1 / -1;
    grid-row: 5;
    display: flex !important;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  /* ═══════════════════════════════════════════════════════════════
     COMPLETE SECTION - MOBILE LAYOUT
     ═══════════════════════════════════════════════════════════════ */
  
  /* Bulk actions - Sell Selected full width */
  #section-complete .bulk-actions {
    display: flex !important;
    width: 100% !important;
    gap: 10px !important;
    align-items: center !important;
  }
  
  #section-complete .bulk-actions #bulkSellBtn {
    flex: 1 !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
  }
  
  /* Complete checkbox - FORCE same style as Create */
  #section-complete .complete-row-check,
  #section-complete input[type="checkbox"].complete-row-check {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background: #1f1f1f !important;
    border: 1px solid #444 !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
  }
  
  #section-complete .complete-row-check:checked,
  #section-complete input[type="checkbox"].complete-row-check:checked {
    background: #6b7280 !important;
    border-color: #6b7280 !important;
  }
  
  #section-complete .complete-row-check:checked::after,
  #section-complete input[type="checkbox"].complete-row-check:checked::after {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: bold !important;
    line-height: 1 !important;
  }

  #section-complete .section-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #section-complete .section-controls {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  #section-complete .section-controls #completeRegionFilter,
  #section-complete .section-controls .region-filter {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
  }

  #section-complete .section-controls #completeSearch {
    width: calc(100vw - 63px) !important;
    max-width: calc(100vw - 63px) !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
  }

  #section-complete .section-controls #refreshComplete {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  /* Complete Table - Card Layout */
  #section-complete .data-table thead {
    display: none !important;
  }

  #section-complete .data-table tbody tr {
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 1px 8px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 8px 12px;
    margin-bottom: 2px;
    background: var(--bg-card);
  }

  #section-complete .data-table tbody td {
    padding: 1px 0 !important;
    border: none !important;
    font-size: 11px;
    line-height: 1.3;
    width: auto !important;
    min-width: 0 !important;
  }

  /* Ocultar: ID (1) */
  #section-complete .data-table tbody td:nth-child(1) {
    display: none !important;
  }

  /* Fila 1: Email (izq) */
  #section-complete .data-table tbody td:nth-child(2) {
    display: block !important;
    grid-column: 1;
    grid-row: 1;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
    text-align: left !important;
  }

  /* Fila 1: Region (der) */
  #section-complete .data-table tbody td:nth-child(5) {
    grid-column: 2;
    grid-row: 1;
    font-size: 11px;
    color: #10b981;
    text-align: right;
  }

  /* Fila 2: Nombre (izq) */
  #section-complete .data-table tbody td:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: left;
  }

  /* Fila 2: Password (der) - ocultar */
  #section-complete .data-table tbody td:nth-child(4) {
    display: none !important;
  }

  /* Fila 3: Warehouse (ancho completo) */
  #section-complete .data-table tbody td:nth-child(7) {
    grid-column: 1 / -1;
    grid-row: 3;
    font-size: 10px;
    color: var(--text-secondary);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Fila 4: Workflow (izq) */
  #section-complete .data-table tbody td:nth-child(6) {
    grid-column: 1;
    grid-row: 4;
    font-size: 10px;
    text-align: left;
  }

  /* Fila 4: Zip Update (der) */
  #section-complete .data-table tbody td:nth-child(8) {
    grid-column: 2;
    grid-row: 4;
    font-size: 10px;
    color: var(--accent-blue);
    text-align: right;
  }

  /* Fila 5: Actions (ancho completo) */
  #section-complete .data-table tbody td:nth-child(9) {
    grid-column: 1 / -1;
    grid-row: 5;
    display: flex !important;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  /* ═══════════════════════════════════════════════════════════════
     SOLD SECTION - MOBILE LAYOUT
     ═══════════════════════════════════════════════════════════════ */
  
  /* Sales Summary Controls - Mobile */
  #section-sold .data-section:first-of-type .section-controls {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
  }

  /* Today, This Week, All Time en una fila (flex: 1 para dividir espacio) */
  #section-sold .data-section:first-of-type .section-controls .filter-btn.summary-filter[data-period="today"],
  #section-sold .data-section:first-of-type .section-controls .filter-btn.summary-filter[data-period="week"],
  #section-sold .data-section:first-of-type .section-controls .filter-btn.summary-filter[data-period="all"] {
    flex: 1 1 30% !important;
    order: 1 !important;
    text-align: center !important;
    padding: 8px 6px !important;
    min-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
  }

  #section-sold .data-section:first-of-type .section-controls .filter-btn.summary-filter[data-period="week"] {
    order: 2 !important;
  }

  #section-sold .data-section:first-of-type .section-controls .filter-btn.summary-filter[data-period="all"] {
    order: 3 !important;
  }

  /* Select Month en línea completa abajo */
  #section-sold .data-section:first-of-type .section-controls #soldMonthFilter {
    flex: 1 1 100% !important;
    order: 4 !important;
    width: 100% !important;
    min-width: 100% !important;
  }

  /* Stats Grid - Estilo Home Cards */
  #section-sold .stats-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    padding: 0 12px !important;
  }

  #section-sold .stats-grid .stat-card {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  /* 4 cuadros en grid 2x2 */
  #section-sold .stats-grid .stat-card:nth-child(n) {
    grid-column: auto;
  }

  #section-sold .stats-grid .stat-icon {
    font-size: 16px !important;
    margin-bottom: 2px !important;
  }

  #section-sold .stats-grid .stat-label {
    font-size: 9px !important;
    color: rgba(255,255,255,0.5) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
  }

  #section-sold .stats-grid .stat-value {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #fff !important;
  }

  #section-sold .stats-grid .stat-value#summaryTotalRevenue {
    color: #10b981 !important;
  }

  /* Sold Table Section Header */
  #section-sold .section-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #section-sold .data-section:last-of-type .section-controls {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  #section-sold .section-controls #soldSearch {
    width: calc(100vw - 63px) !important;
    max-width: calc(100vw - 63px) !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
  }

  #section-sold .section-controls #refreshSold {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  #section-sold .section-controls #moveCheckBtn {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  /* Sold Table - Card Layout */
  #section-sold .data-table thead {
    display: none !important;
  }

  #section-sold .data-table tbody tr {
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 1px 8px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 8px 12px;
    margin-bottom: 2px;
    background: var(--bg-card);
  }

  #section-sold .data-table tbody td {
    padding: 1px 0 !important;
    border: none !important;
    font-size: 11px;
    line-height: 1.3;
    width: auto !important;
    min-width: 0 !important;
  }

  /* Fila 1: Email (izq) */
  #section-sold .data-table tbody td:nth-child(1) {
    display: block !important;
    grid-column: 1;
    grid-row: 1;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
    text-align: left !important;
  }

  /* Fila 1: Name (der) */
  #section-sold .data-table tbody td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: right;
  }

  /* Fila 2: Region (izq) */
  #section-sold .data-table tbody td:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
    font-size: 11px;
    color: #10b981;
    text-align: left;
  }

  /* Fila 2: Sold To (der) */
  #section-sold .data-table tbody td:nth-child(5) {
    grid-column: 2;
    grid-row: 2;
    font-size: 11px;
    color: var(--accent-blue);
    text-align: right;
  }

  /* Fila 3: Warehouse (ancho completo) */
  #section-sold .data-table tbody td:nth-child(4) {
    grid-column: 1 / -1;
    grid-row: 3;
    font-size: 10px;
    color: var(--text-secondary);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Fila 4: Amount (izq) */
  #section-sold .data-table tbody td:nth-child(6) {
    grid-column: 1;
    grid-row: 4;
    font-size: 12px;
    font-weight: 600;
    color: #10b981;
    text-align: left;
  }

  /* Fila 4: Sold Date (der) */
  #section-sold .data-table tbody td:nth-child(7) {
    grid-column: 2;
    grid-row: 4;
    font-size: 10px;
    color: var(--text-secondary);
    text-align: right;
  }

  /* Fila 5: Actions (ancho completo) */
  #section-sold .data-table tbody td:nth-child(8) {
    grid-column: 1 / -1;
    grid-row: 5;
    display: flex !important;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
}

/* ═══════════════════════════════════════════════════════════════
   DESKTOP SMALL / TABLET (1201px - 1600px)
   Sidebar with icons only, compact tables
   ═══════════════════════════════════════════════════════════════ */

@media (min-width: 1201px) and (max-width: 1600px) {
  /* Sidebar collapses to icons only */
  .sidebar {
    width: 70px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }
  
  .sidebar .nav-item span,
  .sidebar .logo-text,
  .sidebar .user-name,
  .sidebar .user-id,
  .sidebar .user-role,
  .sidebar .sidebar-footer .nav-item span,
  .sidebar .sidebar-footer .nav-footer-item span,
  .sidebar .sidebar-user-info {
    display: none !important;
  }
  
  /* Footer items as icons only */
  .sidebar .nav-footer-item {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    margin: 4px auto;
    padding: 0;
    border-radius: 8px;
  }
  
  .sidebar .nav-footer-item svg {
    margin: 0;
  }
  
  /* Hide user profile section in sidebar when collapsed */
  .sidebar .user-profile {
    display: none;
  }
  
  .sidebar .nav-item {
    justify-content: center;
    padding: 0;
    width: 44px;
    height: 44px;
    margin: 4px auto;
    border-radius: 8px;
    position: relative;
  }
  
  .sidebar .nav-item svg,
  .sidebar .nav-item i {
    margin: 0;
  }
  
  .sidebar .nav-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 9px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
  }
  
  /* Navigation scrollable area */
  .sidebar .nav-menu {
    flex: 1;
    overflow-y: auto;
  }
  
  /* Footer with logout and help - always visible at bottom */
  .sidebar .sidebar-footer {
    margin-top: auto;
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
  }
  
  .sidebar .sidebar-footer .nav-item {
    width: 44px;
    height: 44px;
    margin: 4px auto;
  }
  
  /* Show user info in header when sidebar is collapsed */
  .header .user-info-header {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    padding-right: 15px;
  }
  
  .header .user-info-header .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #3a3a3a;
  }
  
  .header .user-info-header .user-details {
    display: flex;
    flex-direction: column;
  }
  
  .header .user-info-header .user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
  }
  
  .header .user-info-header .user-role {
    font-size: 10px;
    color: var(--accent-green);
    text-transform: uppercase;
  }
  
  /* Main content adjusts */
  .main-content {
    margin-left: 70px;
    width: calc(100% - 70px);
  }
  
  /* Table container scrolls horizontally */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .data-table {
    width: 100%;
    min-width: 0;
  }
  
  /* Stats cards wrap */
  .stats-row,
  .stat-cards {
    flex-wrap: wrap;
  }
  
  .stat-card,
  .stat-item {
    flex: 1 1 45%;
    min-width: 150px;
  }
  
  /* Section header stacks */
  .section-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  
  .section-controls {
    width: 100%;
  }
  
  .section-controls input {
    flex: 1;
  }
  
  /* ═══════════════════════════════════════════════════════════════
     ALL TABLES - Compact mode for 769px-1600px
     ═══════════════════════════════════════════════════════════════ */
  
  /* Table container - NO horizontal scroll */
  .table-container {
    overflow-x: hidden !important;
  }
  
  .data-table {
    width: 100% !important;
    table-layout: auto !important;
  }
  
  /* All tables - compact cells */
  .data-table th,
  .data-table td {
    padding: 4px 6px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    width: auto !important;
  }
  
  /* Email column (usually 1st) - truncate */
  .data-table td:nth-child(1) {
    max-width: 180px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  
  /* Name column (usually 2nd) - truncate */
  .data-table td:nth-child(2) {
    max-width: 100px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  
  /* Password column (usually 3rd) - truncate */
  .data-table td:nth-child(3) {
    max-width: 80px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  
  /* Region column (usually 4th) - truncate */
  .data-table td:nth-child(4) {
    max-width: 140px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  
  /* CREATED column - keep visible, compact format */
  .data-table td[data-label="Created"],
  .data-table td:last-child {
    white-space: nowrap !important;
  }
  
  /* Reduce main content padding */
  .main-content {
    padding: 15px;
  }
  
  /* Search inputs expand */
  .section-controls {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .section-controls input[type="text"] {
    flex: 1 1 auto;
    min-width: 200px;
  }
  
  /* Joinlist controls - search expands like Create and 72h */
  #section-joinlist .section-controls {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
  }
  
  #section-joinlist .section-controls #joinlistRegionFilter {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 140px !important;
    min-width: 0 !important;
  }
  
  #section-joinlist .section-controls #joinlistSearch {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 10px 16px !important;
  }
  
  #section-joinlist .section-controls #refreshJoinlist {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 10px 16px !important;
    white-space: nowrap !important;
  }
  
  /* ═══════════════════════════════════════════════════════════════
     DEAD TABLE - Compact mode for 1201px-1600px
     ═══════════════════════════════════════════════════════════════ */
  #section-dead .data-table {
    table-layout: fixed !important;
    width: 100% !important;
  }
  
  #section-dead .data-table th,
  #section-dead .data-table td {
    padding: 4px 6px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  
  /* Email - 18% */
  #section-dead .data-table th:nth-child(1),
  #section-dead .data-table td:nth-child(1) {
    width: 18% !important;
    text-align: left !important;
  }
  
  /* Name - 13% */
  #section-dead .data-table th:nth-child(2),
  #section-dead .data-table td:nth-child(2) {
    width: 13% !important;
  }
  
  /* Password - 7% */
  #section-dead .data-table th:nth-child(3),
  #section-dead .data-table td:nth-child(3) {
    width: 7% !important;
  }
  
  /* Region - 5% */
  #section-dead .data-table th:nth-child(4),
  #section-dead .data-table td:nth-child(4) {
    width: 5% !important;
  }
  
  /* Warehouse - HIDE */
  #section-dead .data-table th:nth-child(5),
  #section-dead .data-table td:nth-child(5) {
    display: none !important;
    width: 0 !important;
  }
  
  /* Reason - 18% */
  #section-dead .data-table th:nth-child(6),
  #section-dead .data-table td:nth-child(6) {
    width: 18% !important;
  }
  
  /* From - 7% */
  #section-dead .data-table th:nth-child(7),
  #section-dead .data-table td:nth-child(7) {
    width: 7% !important;
  }
  
  /* Dead At - 10% */
  #section-dead .data-table th:nth-child(8),
  #section-dead .data-table td:nth-child(8) {
    width: 10% !important;
  }
  
  /* Actions - 15% */
  #section-dead .data-table th:nth-child(9),
  #section-dead .data-table td:nth-child(9) {
    width: 15% !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   DESKTOP LARGE (> 1600px) - Table scrollable
   ═══════════════════════════════════════════════════════════════ */

@media (min-width: 1601px) {
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .data-table {
    width: 100%;
    min-width: 0;
  }
  
  /* Dead table - balanced columns on large screens */
  #section-dead .data-table {
    table-layout: fixed !important;
    width: 100% !important;
  }
  
  #section-dead .data-table th,
  #section-dead .data-table td {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    text-align: left !important;
  }
  
  /* Email - 15% */
  #section-dead .data-table th:nth-child(1),
  #section-dead .data-table td:nth-child(1) { width: 15% !important; }
  
  /* Name - 10% */
  #section-dead .data-table th:nth-child(2),
  #section-dead .data-table td:nth-child(2) { width: 10% !important; }
  
  /* Password - 8% */
  #section-dead .data-table th:nth-child(3),
  #section-dead .data-table td:nth-child(3) { width: 8% !important; }
  
  /* Region - 8% */
  #section-dead .data-table th:nth-child(4),
  #section-dead .data-table td:nth-child(4) { width: 8% !important; }
  
  /* Warehouse - 12% */
  #section-dead .data-table th:nth-child(5),
  #section-dead .data-table td:nth-child(5) { width: 12% !important; }
  
  /* Reason - 15% */
  #section-dead .data-table th:nth-child(6),
  #section-dead .data-table td:nth-child(6) { width: 15% !important; }
  
  /* From - 8% */
  #section-dead .data-table th:nth-child(7),
  #section-dead .data-table td:nth-child(7) { width: 8% !important; }
  
  /* Dead At - 10% */
  #section-dead .data-table th:nth-child(8),
  #section-dead .data-table td:nth-child(8) { width: 10% !important; }
  
  /* Actions - 14% */
  #section-dead .data-table th:nth-child(9),
  #section-dead .data-table td:nth-child(9) { width: 14% !important; }
}

/* Actions column - compact */
.data-table .actions-cell {
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

.data-table .actions-cell .action-buttons {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 2px;
}

.data-table .actions-cell .action-btn {
  min-width: 24px !important;
  width: 24px !important;
  height: 24px !important;
  flex-shrink: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════
   CLIENT MANAGEMENT CARDS
   ═══════════════════════════════════════════════════════════════ */

/* Base - Móviles */
.clients-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

/* Ocultar elementos desktop en móvil */
.desktop-only { display: none; }
.mobile-only { display: block; }

/* Mobile: estilos de stats con colores */
.client-stat.complete-stat {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}
.client-stat.complete-stat .client-stat-value {
  color: #10b981;
}
.client-stat.muted-stat .client-stat-value {
  color: var(--text-secondary);
}
.client-stat.creating-stat {
  background: rgba(77, 171, 247, 0.1);
  border-color: rgba(77, 171, 247, 0.3);
}
.client-stat.creating-stat .client-stat-value {
  color: var(--accent-blue);
}

/* Mobile: membership values con colores */
.client-membership-value.active {
  color: var(--accent-green) !important;
}
.client-membership-value.slots {
  color: var(--accent-green) !important;
}

/* Desktop: vista horizontal tipo tabla */
@media (min-width: 1201px) {
  .clients-grid {
    gap: 6px;
    padding: 12px 16px;
  }
  
  /* Mostrar desktop, ocultar móvil */
  .desktop-only { display: flex; }
  .mobile-only { display: none !important; }
  
  .client-card {
    width: 100%;
    border-radius: 12px;
    padding: 0;
  }
  
  .client-card.has-membership {
    border-left: 3px solid var(--accent-green);
  }
  
  .client-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    flex-wrap: nowrap;
  }
  
  .client-main-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
    flex-shrink: 0;
  }
  
  .client-avatar {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  
  .client-identity h4 {
    font-size: 15px;
    margin-bottom: 2px;
  }
  
  .client-identity .client-meta {
    font-size: 12px;
    display: block;
  }
  
  .client-badges-inline {
    display: flex;
    gap: 6px;
    margin-left: 8px;
  }
  
  /* Stats inline pills */
  .client-stats-inline {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
  }
  
  .stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #2d2d2d;
    border: 1px solid #3d3d3d;
    border-radius: 8px;
    padding: 12px 16px;
    min-width: 70px;
  }
  
  .stat-pill .stat-num {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
  }
  
  .stat-pill .stat-lbl {
    font-size: 9px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .stat-pill.highlight {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
  }
  
  .stat-pill.highlight .stat-num {
    color: #10b981;
  }
  
  .stat-pill.muted .stat-num {
    color: var(--text-secondary);
  }
  
  .stat-pill.creating {
    background: rgba(77, 171, 247, 0.1);
    border-color: rgba(77, 171, 247, 0.3);
  }
  
  .stat-pill.creating .stat-num {
    color: var(--accent-blue);
  }
  
  /* Membership inline */
  .client-membership-inline {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 140px;
    flex-shrink: 0;
  }
  
  .membership-info-row {
    display: flex;
    gap: 6px;
    font-size: 11px;
  }
  
  .mem-label {
    color: var(--text-secondary);
  }
  
  .mem-value {
    color: var(--text-primary);
    font-weight: 500;
  }
  
  .mem-value.active {
    color: var(--accent-green);
  }
  
  .mem-value.slots {
    color: var(--accent-green);
    font-weight: 600;
  }
  
  /* Packages inline */
  .client-packages-inline {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 120px;
  }
  
  .client-packages-inline .client-package-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 10px;
    display: flex;
    gap: 6px;
  }
  
  /* Actions inline */
  .client-actions-inline {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
  }
  
  .action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.12);
    border-left-color: rgba(255, 255, 255, 0.10);
    border-bottom-color: rgba(0, 0, 0, 0.3);
    border-right-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3), inset 1px 1px 1px rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
  }
  
  .action-icon-btn:hover {
    background: linear-gradient(145deg, #333333, #252525);
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4), inset 1px 1px 1px rgba(255, 255, 255, 0.08);
  }
  
  .action-icon-btn.success:hover {
    border-color: var(--accent-green);
    background: rgba(0, 214, 143, 0.1);
  }
}

.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.client-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.client-card:hover {
  border-color: #3a3a3a;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.client-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.client-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a3a3a, #4a4a4a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.client-details h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.client-details .client-meta {
  font-size: 11px;
  color: var(--text-secondary);
}

.client-badges {
  display: flex;
  gap: 6px;
  align-items: center;
}

.client-card-body {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.client-card.expanded .client-card-body {
  max-height: 600px;
  padding: 16px;
}

.client-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.client-stat {
  background: var(--bg-input);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.client-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.client-stat-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 2px;
}

.client-section {
  margin-bottom: 12px;
}

.client-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.client-membership-info {
  background: var(--bg-input);
  border-radius: 8px;
  padding: 12px;
}

.client-membership-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.client-membership-row:last-child {
  margin-bottom: 0;
}

.client-membership-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.client-membership-value {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
}

.client-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.client-action-btn {
  flex: 1;
  min-width: 100px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.client-action-btn:hover {
  background: #252525;
  border-color: #3a3a3a;
}

.client-action-btn.danger {
  border-color: rgba(255, 107, 107, 0.3);
  color: #ff6b6b;
}

.client-action-btn.danger:hover {
  background: rgba(255, 107, 107, 0.1);
}

.client-action-btn.success {
  border-color: rgba(0, 214, 143, 0.3);
  color: var(--accent-green);
}

.client-action-btn.success:hover {
  background: rgba(0, 214, 143, 0.1);
}

.client-action-btn.warning {
  border-color: rgba(255, 193, 7, 0.3);
  color: #ffc107;
}

.client-action-btn.warning:hover {
  background: rgba(255, 193, 7, 0.1);
}

.expand-icon {
  transition: transform 0.3s ease;
  font-size: 12px;
  color: var(--text-secondary);
}

.client-card.expanded .expand-icon {
  transform: rotate(180deg);
}

.client-usage-bar {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.client-usage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), #00ff9f);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.client-packages-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.client-package-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg-input);
  border-radius: 6px;
  font-size: 12px;
}

.client-package-name {
  color: var(--text-primary);
  font-weight: 500;
}

.client-package-slots {
  color: var(--accent-green);
}

/* ═══════════════════════════════════════════════════════════════
   SECTION INTRO - Títulos y descripciones de sección
   Matches .page-header style from Home/Dashboard
   ═══════════════════════════════════════════════════════════════ */

.section-intro {
  margin-bottom: 24px;
}

.section-intro h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.section-intro p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 1200px) {
  .section-intro {
    margin-bottom: 12px;
  }
  
  .section-intro h2 {
    font-size: 18px;
  }
  
  .section-intro p {
    font-size: 11px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   PLATFORM UPDATES SECTION
   ═══════════════════════════════════════════════════════════════ */

.platform-updates {
  background: var(--bg-input);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 20px;
  margin-top: 24px;
  margin-bottom: 24px;
  position: relative;
}

.platform-updates .close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.platform-updates .close-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.1);
}

.updates-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.updates-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.updates-version {
  font-size: 12px;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
  margin-right: 30px;
}

.updates-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.update-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.update-item:hover {
  background: rgba(60, 60, 60, 0.15);
  transform: translateY(-2px);
}

.update-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.update-info {
  flex: 1;
}

.update-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.update-desc {
  font-size: 12px;
  color: #b8b8c8;
  line-height: 1.4;
}

@media (max-width: 1200px) {
  .updates-content {
    grid-template-columns: 1fr;
  }
  
  .updates-header {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════════════
   EMAIL NOTIFICATIONS (72h ASAP)
   ═══════════════════════════════════════════════════════════════ */

.email-notifications-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.email-notification-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.email-notification-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-glass);
}

.email-notification-item.unread {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
}

.email-notification-item.unread::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #3b82f6;
  border-radius: 50%;
  flex-shrink: 0;
}

.email-notif-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.email-notif-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.email-notif-email {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.email-notif-subject {
  font-size: 12px;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.email-notif-preview {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-notif-date {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.email-notifications-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.email-notifications-empty svg {
  margin-bottom: 12px;
  opacity: 0.5;
}

/* Nav indicator for new emails */
.nav-new-indicator {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  position: absolute;
  top: 8px;
  right: 8px;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

/* Unread row style */
.row-unread {
  background: rgba(59, 130, 246, 0.15) !important;
}

.row-unread:hover {
  background: rgba(59, 130, 246, 0.25) !important;
}

/* Email table column widths - 6 columns: Email, Region, Location, Subject, Date, Actions */
#emailsTable {
  table-layout: auto;
  width: 100%;
}

#emailsTable th:nth-child(1),
#emailsTable td:nth-child(1) { width: 200px; min-width: 200px; white-space: nowrap; } /* Email */

#emailsTable th:nth-child(2),
#emailsTable td:nth-child(2) { width: 100px; min-width: 100px; } /* Region */

#emailsTable th:nth-child(3),
#emailsTable td:nth-child(3) { width: 90px; min-width: 90px; } /* Location */

#emailsTable th:nth-child(4),
#emailsTable td:nth-child(4) { width: auto; } /* Subject - takes remaining space */

#emailsTable th:nth-child(5),
#emailsTable td:nth-child(5) { width: 160px; min-width: 160px; white-space: nowrap; } /* Date */

#emailsTable th:nth-child(6),
#emailsTable td:nth-child(6) { width: 60px; min-width: 60px; text-align: center; } /* Actions */

/* Region badge style */
#emailsTable .region-badge {
  color: #10b981;
  font-weight: 500;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 4px;
  padding: 3px 8px;
  display: inline-block;
  white-space: nowrap;
  font-size: 11px;
}

/* Web: Email en blanco, Subject/Date en gris */
#emailsTable tbody td:nth-child(1) {
  color: #fff;
  font-weight: 500;
}

#emailsTable tbody td:nth-child(4),
#emailsTable tbody td:nth-child(5) {
  color: rgba(255,255,255,0.6);
}

#emailsTable td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#emailsTable .actions-cell {
  text-align: center;
  padding: 4px !important;
}

/* ═══════════════════════════════════════════════════════════════
   EMAILS TABLE - MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  #emailsTable {
    table-layout: auto;
  }
  
  #emailsTable thead {
    display: none;
  }
  
  #emailsTable tbody tr {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto auto auto auto;
    gap: 2px 8px;
    border: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-radius: 0;
    padding: 8px 12px;
    margin-bottom: 0;
    background: var(--bg-card);
  }
  
  #emailsTable tbody tr td {
    border: none !important;
    border-bottom: none !important;
    border-top: none !important;
    box-shadow: none !important;
    outline: none !important;
  }
  
  #emailsTable tbody tr td:nth-child(6),
  #emailsTable tbody tr td.actions-cell {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    background: transparent !important;
  }
  
  #emailsTable tbody tr::after,
  #emailsTable tbody tr::before {
    display: none !important;
  }
  
  /* Override data-table styles for emails */
  #emailsTable.data-table tbody td:last-child {
    margin-top: 0 !important;
    padding-top: 4px !important;
    border-top: none !important;
    flex-direction: row !important;
    justify-content: center !important;
  }
  
  #emailsTable tbody,
  #emailsTable tbody tr,
  #emailsTable tbody td {
    border-collapse: collapse !important;
  }
  
  /* Force NO borders anywhere in emails table rows */
  #emailsTable tbody tr {
    border-bottom: none !important;
  }
  
  #emailsTable tbody tr + tr {
    border-top: none !important;
  }
  
  #emailsTable td {
    padding: 1px 0;
    font-size: 11px;
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    width: auto !important;
    line-height: 1.3;
  }
  
  /* Fila 1: Email (izq) */
  #emailsTable td:nth-child(1) {
    display: block !important;
    grid-column: 1;
    grid-row: 1;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
    padding: 0 !important;
    text-align: left !important;
  }
  
  /* Fila 1: Region (centro) */
  #emailsTable td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    text-align: center;
    align-self: center;
    padding: 0 !important;
  }
  
  /* Fila 1: Location (der) */
  #emailsTable td:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
    text-align: right;
    align-self: center;
    padding: 0 !important;
  }
  
  #emailsTable .region-badge,
  #emailsTable .location-badge {
    font-size: 9px;
    padding: 2px 6px !important;
  }
  
  /* Fila 2: Subject (full width) */
  #emailsTable td:nth-child(4) {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: left;
  }
  
  /* Fila 3: Date (full width) */
  #emailsTable td:nth-child(5) {
    grid-column: 1 / -1;
    grid-row: 3;
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    text-align: left;
    margin-top: 4px;
    padding-bottom: 4px !important;
  }
  
  /* Fila 4: Actions (full width, centered) */
  #emailsTable td:nth-child(6) {
    grid-column: 1 / -1;
    grid-row: 4;
    text-align: center;
    align-self: center;
    border-top: none !important;
    padding-top: 4px !important;
  }
  
  #emailsTable td:nth-child(6) .action-btn {
    margin: 0 auto;
  }
  
  /* Emails section header - reorganizar para móvil */
  #section-gmail .section-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  
  #section-gmail .section-controls {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }
  
  #section-gmail .section-controls .filter-btn {
    width: 100% !important;
    padding: 10px 12px;
    font-size: 13px;
    text-align: center;
  }
}
