.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--surface-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--panel-border);
  display: flex !important;
  flex-direction: column !important;
  height: 100vh;
  padding: 0; /* Remove padding from sidebar itself */
  transition: transform var(--transition-smooth), width var(--transition-smooth);
  overflow-x: hidden;
  box-sizing: border-box;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--ai-color));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-heading);
  color: white;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-text span {
  color: var(--primary);
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  display: block; /* Use block to ensure stacking */
  overflow-y: auto;
  padding: 0 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-nav ul {
  list-style: none;
  display: block;
  padding: 0;
  margin: 0;
  width: 100%;
}

.sidebar-nav li {
  display: block;
  width: 100%;
  margin-bottom: 0.25rem;
}

.nav-subtitle {
  display: block;
  width: 100%;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin: 2rem 0 0.75rem 0.5rem;
  opacity: 0.5;
  text-align: left;
}

.mt-6 {
  margin-top: 1.5rem;
}

.nav-link {
  display: flex !important;
  width: 100% !important;
  align-items: center;
  gap: 12px;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  position: relative;
  box-sizing: border-box;
  text-decoration: none;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.nav-link.active {
  background: var(--primary-glow);
  color: var(--primary);
}

.active-indicator {
  position: absolute;
  left: -1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px var(--primary);
}

.nav-icon {
  opacity: 0.8;
}

.nav-link.active .nav-icon {
  opacity: 1;
}

/* Dropdown Sub-menu */
.nav-dropdown {
  display: flex;
  flex-direction: column;
}

.nav-dropdown .nav-link {
  width: 100%;
  justify-content: flex-start;
  cursor: pointer;
}

.dropdown-arrow {
  margin-left: auto;
  opacity: 0.5;
  transition: transform var(--transition-smooth);
}

.nav-dropdown.open .dropdown-arrow {
  transform: rotate(0deg);
}

.sub-nav {
  margin-left: 1.5rem;
  margin-top: 0.25rem;
  padding-left: 0.5rem;
  /* border-left: 1.5px solid rgba(255, 255, 255, 0.05); */
  display: none;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-dropdown.open .sub-nav {
  display: flex;
  animation: slideDown 0.3s ease-out forwards;
}

.sub-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 400;
  transition: all var(--transition-fast);
}

.sub-nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.sub-nav-link.active {
  color: var(--primary);
  font-weight: 500;
  background: rgba(59, 130, 246, 0.05);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-link {

  color: #c4b5fd;
}
.ai-link:hover {
  background: var(--ai-glow);
  color: #ddd6fe;
}
.ai-link .nav-icon {
  color: var(--ai-color);
}

.badge-new {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--ai-color), #c084fc);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-full);
  color: white;
  box-shadow: 0 2px 8px var(--ai-glow);
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--panel-border);
}

.footer-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.logout-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #ef4444 !important;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s ease;
  cursor: pointer;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.user-profile:hover {
  background: rgba(255, 255, 255, 0.06);
  opacity: 1;
}

.avatar {
  width: 32px;
  height: 32px;
  background: var(--surface-hover);
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid var(--panel-border);
  flex-shrink: 0;
}

.dropdown-arrow.open {
  transform: rotate(180deg);
}

.dropdown-arrow {
  margin-left: auto;
  transition: transform 0.3s ease;
  opacity: 0.5;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    height: 100vh;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 20px 0 50px rgba(0,0,0,0.6);
    background: #0a0a0a;
    width: 280px;
  }

  .sidebar.mobile-active {
    transform: translateX(0);
  }
  .active-indicator {
    left: 8px;
    height: 30px;
    width: 3px;
  }

  .sidebar-nav {
    padding-bottom: 2rem;
  }
}

/* Specific fix for tablets in landscape where it shouldn't be hidden */
@media (min-width: 1025px) and (max-width: 1366px) {
  .sidebar {
    width: 240px;
  }
  .nav-link {
    font-size: 0.9rem;
    gap: 10px;
  }
  .nav-subtitle {
    padding-left: 2.5rem;
  }
}
.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-content {
  width: 100%;
  max-width: 500px;
  background: var(--surface-color);
  padding: 0;
  animation: modalSlideUp var(--transition-smooth) forwards;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  margin: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-sizing: border-box;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--panel-border);
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: 1.25rem;
  margin: 0;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
}

/* Animations */
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Form Styles inside Modal (these match settings forms) */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--panel-border);
}
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.search-container {
  width: 100%;
  max-width: 650px;
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--panel-border);
}

[data-theme='light'] .search-container {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  background: #ffffff;
}

.search-header {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  border-bottom: 1px solid var(--panel-border);
}

.search-icon-main {
  color: var(--primary);
  opacity: 0.8;
}

.search-header input {
  flex: 1;
  background: transparent;
  border: none;
  height: 100%;
  font-size: 1.1rem;
  color: var(--text-main);
  outline: none;
}

.search-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
  font-size: 0.75rem;
}

.search-hint kbd {
  background: var(--surface-hover);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--panel-border);
  font-family: sans-serif;
  font-weight: 600;
}

.search-body {
  max-height: 450px;
  overflow-y: auto;
  padding: 0.5rem;
}

.search-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 1rem;
  color: var(--text-muted);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--panel-border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: rotate 0.8s linear infinite;
}

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

.search-section {
  padding-bottom: 0.5rem;
}

.section-title {
  padding: 0.75rem 1rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  gap: 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.1s ease;
  margin: 0 0.5rem;
}

.search-item.selected {
  background: var(--surface-hover);
  border: 1px solid var(--panel-border);
}

[data-theme='light'] .search-item.selected {
  background: #f1f5f9;
}

.item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.item-icon.action { background: rgba(59, 130, 246, 0.1); color: var(--primary); }
.item-icon.product { background: var(--surface-hover); }
.item-icon.client { background: rgba(21, 128, 61, 0.1); color: var(--success); }

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

.item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.item-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

.item-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.item-badge {
  padding: 2px 8px;
  background: var(--panel-border);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.item-arrow {
  opacity: 0;
  transition: opacity 0.1s;
}

.search-item.selected .item-arrow {
  opacity: 0.5;
}

.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  gap: 1.5rem;
  color: var(--text-muted);
}

.search-footer {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: var(--surface-hover);
  border-top: 1px solid var(--panel-border);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.footer-keys {
  display: flex;
  gap: 1.5rem;
}

.key-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.key-item kbd {
  background: var(--surface-color);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--panel-border);
  font-weight: 600;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.animate-slide-up {
  animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--panel-border);
  border-radius: 10px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  margin-bottom: 2rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.mobile-menu-btn:hover {
  background: rgba(255,255,255,0.05);
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 1.25rem;
  width: 400px;
  border-radius: var(--radius-full);
}

.search-icon {
  color: var(--text-muted);
}

.topbar-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  width: 100%;
  font-size: 0.95rem;
  font-family: var(--font-body);
}

.topbar-search input::-moz-placeholder {
  color: var(--text-dim);
}

.topbar-search input::placeholder {
  color: var(--text-dim);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.divider {
  width: 1px;
  height: 24px;
  background: var(--panel-border);
}

.action-icon {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
}

.action-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.notification-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: white;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px var(--danger);
  border: 2px solid var(--surface-color);
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.gap-2 {
  gap: 0.5rem;
}

@keyframes pulseSubtle {
  0% { box-shadow: 0 0 0 0 var(--ai-glow); }
  70% { box-shadow: 0 0 0 6px rgba(139, 92, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

.animate-pulse-subtle {
  animation: pulseSubtle 3s infinite;
}

/* Notifications Dropdown Pro */
.notifications-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 360px;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  animation: dropdownFade 0.2s ease-out;
}

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

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.dropdown-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

.notifications-list {
  overflow-y: auto;
  padding: 0.5rem;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  margin-bottom: 0.25rem;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notification-item.read {
  opacity: 0.6;
}

.notification-item::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 1;
}

.notification-item.read::before {
  opacity: 0;
}

.notification-icon-bg {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-icon-bg.goal_achieved { background: rgba(21, 128, 61, 0.15); color: #15803d; }
.notification-icon-bg.out-of-stock { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.notification-icon-bg.low-stock { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.notification-icon-bg.info { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

.notification-info {
  flex: 1;
}

.notif-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 2px 0;
}

.notif-msg {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.4;
}

.notif-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.notification-item:hover .notif-actions {
  opacity: 1;
}

.btn-notif-check, .btn-notif-del {
  padding: 4px;
  border-radius: 4px;
  color: var(--text-dim);
  transition: all 0.2s;
}

.btn-notif-check:hover { background: rgba(21, 128, 61, 0.1); color: var(--success); }
.btn-notif-del:hover { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

.notification-empty {
  padding: 3rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-dim);
}

.notification-empty p {
  font-size: 0.85rem;
}

@media (max-width: 1024px) {
  .mobile-menu-btn {
    display: block;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .topbar-search {
    display: none;
  }
  
  .topbar-actions span {
    display: none;
  }
  
  .topbar-actions .btn-primary, .topbar-actions .btn-ai {
    padding: 0.5rem;
  }

  .notifications-dropdown {
    width: 280px;
    right: -10px;
  }
}

.main-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.05), transparent 40%),
              radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.05), transparent 40%);
}

.main-content {
  flex: 1;
  padding: 0 2rem 2rem 2rem;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 40;
  opacity: 0;
  animation: fadeInBackdrop 0.3s forwards;
}

@keyframes fadeInBackdrop {
  to { opacity: 1; }
}

@media (max-width: 1024px) {
  .main-content {
    padding: 0 1rem 1rem 1rem;
  }
}
.skeleton-loader {
  position: relative;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.05);
}

.skeleton-loader::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 20%,
    rgba(255, 255, 255, 0.1) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skeleton-card-wrapper {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

.skeleton-row-wrapper {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  align-items: center;
}

.skeleton-row-wrapper > div {
  flex: 1;
}
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

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

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.metric-card {
  padding: 1.5rem;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.metric-title {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.metric-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
}

.metric-trend.positive {
  color: var(--success);
  background: var(--success-glow);
}

.metric-trend.negative {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.15);
}

.metric-value {
  font-size: 2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.metric-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.chart-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

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

.card-header h3 {
  font-size: 1.1rem;
}

.chart-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  outline: none;
}

.chart-container {
  flex: 1;
  min-height: 250px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.recent-sales, .ai-insights {
  padding: 1.5rem;
}

.btn-text {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-text:hover {
  text-decoration: underline;
}

.sales-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sale-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  transition: background var(--transition-fast);
}

.sale-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

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

.sale-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.sale-name {
  font-weight: 500;
  font-size: 0.95rem;
}

.sale-time {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.sale-amount {
  font-weight: 600;
  color: var(--success);
}

.insights-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.insight-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.insight-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.insight-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}

.bg-success { background: var(--success); }
.bg-warning { background: #f59e0b; }
.bg-info { background: var(--primary); }

.inline { display: inline-block; }
.mr-2 { margin-right: 0.5rem; vertical-align: text-bottom; }

/* Rankings Styles */
.rankings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.ranking-card {
  padding: 1.5rem;
}

.ranking-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ranking-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.ranking-row:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
}

.ranking-row.header {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 0.5rem;
}

.ranking-row .name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-row .qty, .ranking-row .amount, .ranking-row .profit {
  text-align: right;
  font-family: var(--font-body);
}

.ranking-row .profit {
  font-weight: 600;
  color: var(--success);
}

.empty-text {
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.9rem;
}

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

@media (max-width: 1024px) {
  .charts-grid, .bottom-grid, .rankings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .metric-value {
    font-size: 1.5rem;
  }
  
  .chart-container {
    height: 300px;
    width: 100%;
    position: relative;
  }

  .empty-chart-msg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border: 1px dashed var(--panel-border);
  }

  .card-header-flex {
    flex-direction: column;
    gap: 1rem;
  }
  
  .chart-filters {
    width: 100%;
    overflow-x: auto;
  }
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.card-subtitle-small {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

.chart-filters {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
}

.filter-btn {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: calc(var(--radius-md) - 2px);
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
  color: var(--text-main);
  background: rgba(139, 92, 246, 0.1);
}

.filter-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.card-mini-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 1px 4px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  max-width: 100px;
}

.card-mini-select:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: var(--primary);
}

.card-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-mini {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.card-mini-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 8px 12px 8px 32px;
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

.card-mini-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}
.clientes-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 2rem;
}

.clientes-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.page-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

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

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

.gap-2 {
  gap: 0.5rem;
}

.crm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-title {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-main);
  font-family: var(--font-heading);
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.stat-trend.success {
  color: var(--success);
}

/* CRM Main Panel */
.main-crm-panel {
  padding: 0;
  overflow: hidden;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--panel-border);
}

.search-bar {
  flex: 1;
  max-width: 400px;
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0 1rem;
  transition: all var(--transition-fast);
}

.search-bar:focus-within {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 1px var(--primary-glow);
}

.search-icon {
  color: var(--text-dim);
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 0.75rem 0.75rem;
  outline: none;
  font-size: 0.9rem;
}

.search-bar input::-moz-placeholder {
  color: var(--text-dim);
}

.search-bar input::placeholder {
  color: var(--text-dim);
}

/* Table Styles */
.table-responsive {
  overflow-x: auto;
}

.crm-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.crm-table th {
  padding: 1rem 1.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.02);
}

.crm-table td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--panel-border);
  transition: background var(--transition-fast);
}

.crm-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.table-row-hover {
  cursor: pointer;
  transition: background var(--transition-fast);
}

.table-row-hover:hover td {
  background: rgba(255, 255, 255, 0.05) !important;
}

.crm-table tbody tr:last-child td {
  border-bottom: none;
}

/* Cells formatting */
.company-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.company-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.2);
  overflow: hidden;
  flex-shrink: 0;
}

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

.company-name {
  font-weight: 500;
  font-size: 1rem;
}

.contact-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-name {
  font-weight: 500;
}

.contact-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-activo {
  background: rgba(21, 128, 61, 0.1);
  color: var(--success);
  border: 1px solid rgba(21, 128, 61, 0.2);
}

.status-inactivo {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-pendiente {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.spent-amount {
  font-weight: 600;
  font-family: var(--font-heading);
}

/* btn-icon styles moved to index.css for global consistency */

/* New Client Form Styles */
.add-client-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0.5rem 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.form-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px var(--primary-glow);
}

select.form-input {
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--panel-border);
}

/* Image Upload Styles (Similar to Inventory) */
.image-upload-wrapper {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.image-preview-container {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: rgba(255, 255, 255, 0.02);
}

.image-preview-container img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.remove-image-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(239, 68, 68, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.file-input-custom {
  position: relative;
  display: inline-block;
  width: 100%;
}

.file-input-custom input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-input-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.85rem;
  transition: all 0.3s;
}

.file-input-custom:hover .file-input-label {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}


.product-selector {
  position: relative;
  width: 100%;
}

.selector-input-container {
  display: flex;
  align-items: center;
  background: var(--surface-color);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  padding: 0 0.5rem;
  height: 36px;
  cursor: text;
  transition: border-color var(--transition-fast);
}

.selector-input-container:focus-within {
  border-color: var(--primary-color);
}

.selector-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.selector-icon-img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  -o-object-fit: cover;
     object-fit: cover;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.selector-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  font-size: 0.9rem;
  width: 100%; /* Important for small widths */
}

.selector-chevron {
  color: var(--text-muted);
  flex-shrink: 0;
  cursor: pointer;
}

.selector-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  background: var(--bg-color);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.selector-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.selector-empty {
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.selector-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background var(--transition-fast);
}

.selector-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

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

.item-img-container {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  overflow: hidden;
  flex-shrink: 0;
}

.item-img-container img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.item-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.item-name {
  font-size: 0.9rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-stock {
  font-size: 0.75rem;
  color: var(--success);
}

.item-stock.out {
  color: var(--danger);
}
.ventas-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 2rem;
}

.ventas-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.ventas-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.stat-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-meta.success {
  color: var(--success);
}

.pipeline-board {
  display: flex;
  gap: 1.5rem;
  flex: 1;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.pipeline-column {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  overflow: hidden;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 1rem;
}

.column-title {
  color: var(--text-main);
  font-size: 1.1rem;
}

.column-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.column-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  flex: 1;
  padding-right: 0.5rem;
}

.deal-card {
  background: var(--surface-hover);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: grab;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.deal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.deal-card h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
}

.deal-value {
  font-size: 1.25rem;
  font-weight: 600;
  font-family: var(--font-heading);
  margin-bottom: 0.75rem;
}

.deal-value.success {
  color: var(--success);
}

.deal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--panel-border);
  padding-top: 0.75rem;
}

.deal-prob {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.deal-prob.success {
  background: rgba(21, 128, 61, 0.1);
  color: var(--success);
}

.deal-negotiating {
  -o-border-image: linear-gradient(to right, rgba(139, 92, 246, 0.3), rgba(255, 255, 255, 0.05)) 1;
     border-image: linear-gradient(to right, rgba(139, 92, 246, 0.3), rgba(255, 255, 255, 0.05)) 1;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, var(--surface-hover) 100%);
}

.deal-won {
  background: linear-gradient(135deg, rgba(21, 128, 61, 0.05) 0%, var(--surface-hover) 100%);
  border-left: 3px solid var(--success);
}

/* Modal Form Styles */
.modal-overlay.large-modal .modal-content {
  max-width: 900px;
  width: 95%;
}

.invoice-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.invoice-header-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
  box-sizing: border-box;
  width: 100%;
}

.invoice-header-grid .form-group {
  margin-bottom: 0;
}

.invoice-items-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.invoice-items-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  /* overflow: hidden; Removed to allow dropdowns to pop out */
}

.invoice-items-table th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: left;
  padding: 0.75rem;
}

.invoice-items-table td {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.invoice-items-table input,
.invoice-items-table select {
  width: 100%;
  background: var(--surface-color);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.invoice-items-table input:focus {
  border-color: var(--primary);
  outline: none;
}

.invoice-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.invoice-notes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.invoice-summary {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-sizing: border-box;
  width: 100%;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.summary-row.total {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.summary-row input {
  width: 80px;
  text-align: right;
}

/* .btn-danger-icon replaced by .btn-icon delete globally */

/* --- Premium Receipt / Comprobante A4 Styles --- */
.receipt-container {
  padding: 2rem;
  overflow-x: auto;
  background: var(--surface-color);
}

.receipt-a4 {
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  background: #ffffff;
  color: #1e293b;
  padding: 0;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

.receipt-banner-stripe {
  height: 8px;
  background: linear-gradient(90deg, var(--primary) 0%, #6366f1 100%);
  width: 100%;
}

.receipt-header-modern {
  display: flex;
  justify-content: space-between;
  padding: 40px 50px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.receipt-logo-pro {
  margin-bottom: 1rem;
}

.receipt-logo-pro img {
  height: 70px;
  width: auto;
  -o-object-fit: contain;
     object-fit: contain;
}

.logo-placeholder-pro {
  width: 70px;
  height: 70px;
  background: #1e293b;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  border-radius: 12px;
}

.company-name-pro {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.025em;
}

.company-contact-pro p {
  margin: 2px 0;
  font-size: 0.85rem;
  color: #64748b;
}

.receipt-type-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid #0f172a;
  padding: 5px 15px;
  background: white;
  margin-bottom: 1.5rem;
}

.type-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: #64748b;
}

.type-letter {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0f172a;
}

.receipt-meta-pro {
  text-align: right;
}

.meta-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 4px;
}

.meta-row .label {
  color: #64748b;
  font-size: 0.85rem;
}

.meta-row .value {
  color: #0f172a;
  font-weight: 700;
  font-size: 0.85rem;
}

.receipt-client-panel {
  padding: 30px 50px;
}

.section-title-pro {
  font-size: 0.75rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.05em;
  margin-bottom: 15px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}

.client-grid-pro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.data-item {
  margin-bottom: 10px;
}

.data-item .label {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 2px;
}

.data-item .value {
  display: block;
  font-size: 0.95rem;
  color: #1e293b;
  font-weight: 500;
}

.data-item .value.highlight {
  font-weight: 700;
  font-size: 1.1rem;
  color: #0f172a;
}

.receipt-table-pro {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 30px 0;
}

.receipt-table-pro th {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.receipt-table-pro th:first-child { padding-left: 50px; }
.receipt-table-pro th:last-child { padding-right: 50px; }

.receipt-table-pro td {
  padding: 15px 15px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.95rem;
}

.receipt-table-pro tr:nth-child(even) {
  background: #f8fafc;
}

.receipt-table-pro td:first-child { padding-left: 50px; }
.receipt-table-pro td:last-child { padding-right: 50px; }

.item-name {
  font-weight: 600;
  color: #0f172a;
}

.semibold { font-weight: 600; }

.receipt-footer-pro {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 20px 50px 40px 50px;
}

.notes-box-pro {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #e2e8f0;
  margin-bottom: 20px;
}

.notes-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  color: #64748b;
  margin-bottom: 8px;
}

.notes-box-pro p {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
}

.legal-disclaimer-pro {
  font-size: 0.75rem;
  color: #94a3b8;
  font-style: italic;
  line-height: 1.4;
}

.totals-container-pro {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.total-row-pro {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: #475569;
}

.total-row-pro.discount {
  color: #ef4444;
  font-weight: 600;
}

.total-row-pro.main-total {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px solid #0f172a;
  color: #0f172a;
}

.total-label {
  font-weight: 800;
  font-size: 1.1rem;
}

.total-amount {
  font-weight: 800;
  font-size: 1.5rem;
}

.receipt-bottom-bar {
  background: #0f172a;
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* Printing logic */
@media print {
  body {
    visibility: hidden;
    background: white !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  #printable-receipt, #printable-receipt * {
    visibility: visible;
  }
  
  #printable-receipt {
    position: fixed;
    left: 0;
    top: 0;
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 0;
    z-index: 9999;
  }

  .receipt-a4 {
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
    border: none !important;
  }

  .receipt-banner-stripe {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .receipt-table-pro th {
    background: #0f172a !important;
    color: white !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .receipt-header-modern {
    background: #f8fafc !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .no-print {
    display: none !important;
  }
}

.inventario-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 2rem;
}

.inventario-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.critical-badge-small {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.05);
}

.critical-badge-small:hover {
  background: rgba(239, 68, 68, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.critical-badge-small.active {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

/* Toolbar & Search Bar Fix */
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--panel-border);
}

.search-bar {
  flex: 1;
  max-width: 500px;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0 1rem;
  transition: all var(--transition-fast);
}

.search-bar:focus-within {
  border-color: var(--primary);
  background: var(--surface-hover);
  box-shadow: 0 0 0 1px var(--primary-glow);
}

.search-icon {
  color: var(--text-dim);
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 0.75rem 0.75rem;
  outline: none;
  font-size: 0.95rem;
}

.search-bar input::-moz-placeholder {
  color: var(--text-dim);
}

.search-bar input::placeholder {
  color: var(--text-dim);
}

/* Light Mode Specific Overrides for Search */
[data-theme='light'] .search-bar {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
}

[data-theme='light'] .search-bar input {
  color: #0f172a !important; /* Slate 900 */
}

[data-theme='light'] .search-bar input::-moz-placeholder {
  color: #64748b; /* Slate 500 */
}

[data-theme='light'] .search-bar input::placeholder {
  color: #64748b; /* Slate 500 */
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.warning-card {
  border-color: rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, var(--surface-color) 100%);
}

.stat-value.error {
  color: var(--danger);
}

.stat-meta.error {
  color: var(--danger);
}

/* Inventory Table specific */
.product-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.product-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  overflow: hidden;
  border: 1px solid var(--panel-border-soft);
}

.product-img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.image-upload-wrapper {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.image-preview-container {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: var(--surface-soft);
}

.image-preview-container img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.remove-image-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(239, 68, 68, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.remove-image-btn:hover {
  background: var(--danger);
  transform: scale(1.1);
}

.file-input-custom {
  position: relative;
  display: inline-block;
  width: 100%;
}

.file-input-custom input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-input-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--surface-soft);
  border: 1px solid var(--panel-border-soft);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.85rem;
  transition: all 0.3s;
}

.file-input-custom:hover .file-input-label {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

.product-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.product-name {
  font-weight: 500;
  font-size: 0.95rem;
}

.product-sku {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.category-tag {
  background: var(--surface-soft);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px solid var(--panel-border-soft);
}

.stock-amount {
  font-weight: 600;
}

.stock-amount.success { color: var(--success); }
.stock-amount.warning { color: #f59e0b; }
.stock-amount.error { color: var(--danger); }

/* Reuse CRM table and badge classes by prefixing or sharing */
.status-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* btn-icon styles moved to index.css for global consistency */

/* Product View Modal */
.modal-form.product-form-fit {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: 75vh;
  overflow-y: auto;
  padding: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}

.modal-form.product-form-fit::-webkit-scrollbar {
  width: 6px;
}

.modal-form.product-form-fit::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 10px;
}

.product-view-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.product-view-image-container {
  width: 100%;
  height: 250px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-view-image-container img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}

.product-view-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .product-view-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.view-card {
  background: var(--surface-soft);
  border: 1px solid var(--panel-border-soft);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.view-card h5 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.view-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.view-row span {
  color: var(--text-dim);
}

.view-row strong {
  font-weight: 500;
  color: var(--text-main);
  text-align: right;
}

.table-row-hover:hover {
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.2s ease;
}

/* Product Form Improvements */
.product-form-fit {
  max-width: 100%;
  overflow-x: hidden;
  padding: 0.5rem;
}

.row-group {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  width: 100%;
}

.row-group .form-group {
  flex: 1;
  min-width: 0; /* Prevents flex children from overflowing */
}

/* --- Premium Variants Section --- */
.variants-toggle-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(var(--primary-rgb), 0.03);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 1rem;
}

.variants-toggle-header:hover {
  background: rgba(var(--primary-rgb), 0.06);
  border-color: var(--primary);
}

.variants-toggle-header.active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0;
  background: var(--surface-hover);
}

.variants-config-card {
  background: var(--surface-color);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.variant-opt-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  background: var(--surface-hover);
  border-radius: 8px;
  margin-bottom: 0.8rem;
}

.variant-chip {
  display: inline-flex;
  padding: 2px 8px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 4px;
}

.variant-table-premium {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.variant-table-premium th {
  padding: 12px 1rem;
  background: var(--surface-hover);
  text-align: left;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
  border-bottom: 1px solid var(--panel-border);
}

.variant-group-row {
  cursor: pointer;
  background: var(--surface-color);
}

.variant-group-row:hover {
  background: var(--surface-hover);
}

.variant-child-row {
  background: rgba(var(--primary-rgb), 0.02);
}

.variant-img-slot {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  position: relative;
}

.variant-img-slot img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.variant-img-slot:hover .image-overlay {
  opacity: 1;
}

.variant-input-group {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  padding: 0 8px;
  width: 100%;
}

.variant-input-group input {
  border: none;
  background: transparent;
  width: 100%;
  padding: 6px 4px;
  font-size: 0.85rem;
  text-align: right;
}

.variant-input-group span {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.variants-footer-summary {
  margin-top: 1rem;
  padding: 1rem;
  border-top: 1px solid var(--panel-border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
}


@media (max-width: 600px) {
  .row-group {
    flex-direction: column;
    gap: 1rem;
  }
}

.margin-indicator-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.indicator-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.indicator-col .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.indicator-col .value {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

.value.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  width: -moz-fit-content;
  width: fit-content;
  font-size: 0.85rem;
}

.value.success {
  color: var(--success);
}

.value.success.badge {
  background: var(--success-glow);
}

.value.error {
  color: var(--danger);
}

.value.error.badge {
  background: rgba(239, 68, 68, 0.1);
}

/* Modals extra anchos */
.wide-modal .modal-content {
  max-width: 800px;
  width: 90%;
}

/* Toggle Switch Premium para variantes */
.variants-toggle-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  cursor: pointer;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.variants-toggle-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.variants-toggle-header.active {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15) 0%, rgba(var(--primary-rgb), 0.05) 100%);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.toggle-switch {
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-knob {
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.variants-toggle-header.active .toggle-switch {
  background: var(--primary);
}

.variants-toggle-header.active .toggle-knob {
  transform: translateX(20px);
}

.variants-toggle-text {
  font-weight: 500;
  color: var(--text-main);
  font-size: 0.95rem;
}

/* Glass panel for variants config */
.variants-config {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
}

.variants-config h4 {
  font-size: 1rem;
}

.variants-table-container th {
  background: rgba(0,0,0,0.2);
  padding: 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.variants-table-container td {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

/* Margin Indicator Compact */
.margin-indicator-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  border: 1px dashed rgba(255,255,255,0.1);
  margin-top: 1.6rem; /* Alinear con los inputs */
  height: -moz-fit-content;
  height: fit-content;
}

.margin-indicator-compact .col {
  display: flex;
  flex-direction: column;
}

.margin-indicator-compact label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

/* ==========================================================================
   PREMIUM PRODUCT FORM SYSTEM
   ========================================================================== */

.premium-form-wrapper {
  color: var(--text-main);
}

.premium-form-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header de Sección */
.form-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-text h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.section-text p {
  font-size: 0.75rem;
  opacity: 0.5;
  margin: 0;
}

/* Main Grid */
.premium-grid-main {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
}

@media (max-width: 900px) {
  .premium-grid-main {
    grid-template-columns: 1fr;
  }
}

.premium-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Field Groups */
.premium-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.premium-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.premium-input-wrapper {
  position: relative;
}

.premium-input, 
.premium-select {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.premium-input:focus, 
.premium-select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.premium-input.warning {
  border-color: rgba(245, 158, 11, 0.3);
}

.premium-input.warning:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.premium-row {
  display: flex;
  gap: 1rem;
}

/* Currency Input */
.premium-currency-input {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.premium-currency-input span {
  padding: 0 1rem;
  color: var(--text-muted);
  font-weight: 600;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-currency-input input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.8rem;
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

.premium-currency-input.highlighted {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.05);
}

.premium-currency-input.highlighted span {
  color: var(--primary);
}

/* Multimedia Card */
.premium-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 1.25rem;
}

.premium-dropzone {
  width: 100%;
  height: 220px;
  background: rgba(0, 0, 0, 0.2);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.premium-dropzone.has-image {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.05);
}

.premium-dropzone:hover:not(.has-image) {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.02);
}

.dropzone-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
}

.dropzone-placeholder .icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.dropzone-placeholder .main-text {
  font-size: 0.85rem;
  font-weight: 600;
}

.dropzone-placeholder .sub-text {
  font-size: 0.7rem;
  opacity: 0.4;
}

.dropzone-placeholder input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-overlay-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.image-overlay-wrapper img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}

.image-actions {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.image-overlay-wrapper:hover .image-actions {
  opacity: 1;
}

.image-actions .action-btn.delete {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ef4444;
  color: white;
  border: none;
  cursor: pointer;
}

.change-hint {
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
}

.image-overlay-wrapper input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Quick Add Bubbles */
.quick-add-bubble {
  background: #1e293b;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  margin-top: 0.5rem;
}

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

.bubble-header span {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
}

.bubble-content {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.bubble-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  color: white;
  font-size: 0.85rem;
}

.bubble-btn {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.quick-img-upload {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.quick-img-upload img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.quick-img-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Logistics Grid */
.premium-grid-logistics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.input-hint {
  font-size: 0.65rem;
  opacity: 0.4;
  margin-top: 0.4rem;
  font-style: italic;
}

/* Variants Module */
.variants-toggle-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.variants-toggle-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.variants-toggle-card.active {
  background: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.2);
}

.toggle-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.02);
}

.status-dot.on {
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.toggle-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.toggle-info p {
  font-size: 0.75rem;
  opacity: 0.5;
  margin: 0;
}

.premium-switch {
  width: 48px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  position: relative;
  transition: all 0.3s ease;
}

.premium-switch.on {
  background: var(--primary);
}

.switch-knob {
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.premium-switch.on .switch-knob {
  left: 27px;
}

/* Manager area */
.variants-content-area {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.manager-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.option-pill {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  overflow: hidden;
}

.pill-main {
  padding: 0.5rem 1rem;
  display: flex;
  gap: 0.5rem;
  cursor: pointer;
}

.pill-main:hover {
  background: rgba(255, 255, 255, 0.03);
}

.pill-name {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.75rem;
}

.pill-values {
  font-size: 0.75rem;
  opacity: 0.8;
}

.pill-delete {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.add-option-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-option-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

/* Option Editor Overlay */
.option-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.option-editor-card {
  width: 100%;
  max-width: 400px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.editor-header h5 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.editor-body label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.editor-footer {
  margin-top: 2rem;
}

/* Data Grid for Variants */
.grid-table-container {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.premium-data-table {
  width: 100%;
  border-collapse: collapse;
}

.premium-data-table th {
  padding: 1rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-data-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.mini-currency-input {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 0.5rem;
}

.mini-currency-input span {
  font-size: 0.75rem;
  opacity: 0.5;
}

.mini-currency-input input {
  width: 100%;
  background: transparent;
  border: none;
  padding: 0.4rem;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
}

.mini-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  color: white;
  font-size: 0.85rem;
  text-align: center;
}

.mini-image-upload {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.mini-image-upload img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.mini-image-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ==========================================================================
   PREMIUM INVENTORY TABLE
   ========================================================================== */

.premium-table-container {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  overflow-x: auto;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
  margin-top: 1rem;
}

.premium-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  display: table !important; /* Forzar comportamiento de tabla */
}

.premium-table thead {
  display: table-header-group !important;
  background: rgba(255, 255, 255, 0.02);
}

.premium-table th, .premium-table td {
  padding: 1.25rem 1rem;
  vertical-align: middle;
  display: table-cell !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.premium-table th {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  background: rgba(255, 255, 255, 0.01);
}

.premium-table th:first-child, 
.premium-table td:first-child {
  padding-left: 2rem;
  width: 40%;
}

.premium-table th:last-child, 
.premium-table td:last-child {
  padding-right: 2rem;
  text-align: right;
}

.premium-table tr {
  display: table-row !important;
}

.premium-row {
  transition: all 0.2s ease;
}

.premium-row:hover {
  background: rgba(255, 255, 255, 0.02);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.premium-row.is-inactive {
  opacity: 0.5;
  filter: grayscale(1);
}

/* Product Cell */
.premium-product-cell {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.5rem 0;
}

.image-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.image-box img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.image-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 900;
  color: white;
}

.image-badge.danger { background: #ef4444; }
.image-badge.warning { background: #f59e0b; }

.product-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.product-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.product-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meta-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.meta-tag.variants {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Classification Cell */
.classification-cell {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-main);
}

.category-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Stock Visual Cell */
.stock-visual-cell {
  width: 120px;
}

.stock-values {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.4rem;
}

.main-stock {
  font-weight: 800;
  font-size: 1rem;
}

.min-stock-ref {
  font-size: 0.75rem;
  opacity: 0.4;
}

.stock-progress-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.stock-progress-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Price Cell */
.price-cell {
  display: flex;
  flex-direction: column;
}

.selling-price {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

/* Badge Premium */
.premium-badge {
  padding: 0.35rem 0.75rem !important;
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  border-radius: 30px !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Actions */
.premium-actions-group {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.action-circle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-circle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: scale(1.1);
}

.action-circle-btn.primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.action-circle-btn.danger:hover {
  background: #ef4444;
  border-color: #ef4444;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* Empty State */
/* ==========================================================================
   PREMIUM TOOLBAR & CONTROLS
   ========================================================================== */

.premium-toolbar {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.01);
}

.critical-stock-alert {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 0.8rem 1.25rem;
  border-radius: 12px;
  color: #f87171;
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.close-alert-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-alert-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.toolbar-actions-row {
  display: flex;
  gap: 1rem;
}

@media (max-width: 640px) {
  .toolbar-actions-row {
    flex-direction: column;
  }
}

.premium-search-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.premium-search-container .search-icon {
  position: absolute;
  left: 1.25rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s ease;
}

.premium-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0.9rem 1rem 0.9rem 3.25rem;
  color: white;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.premium-search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.premium-search-input:focus + .search-icon {
  color: var(--primary);
}

.clear-search {
  position: absolute;
  right: 1rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Filter Button */
.filter-dropdown-wrapper {
  position: relative;
}

.premium-filter-btn {
  height: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.premium-filter-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.premium-filter-btn.has-active {
  background: rgba(59, 130, 246, 0.05);
  border-color: var(--primary);
  color: white;
}

.btn-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.active-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid #0f172a;
  box-shadow: 0 0 10px var(--primary);
}

/* Dropdown */
.premium-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 260px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0.75rem;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.dropdown-header {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  letter-spacing: 0.1em;
}

.dropdown-opt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropdown-opt:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.dropdown-opt.selected {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 0.5rem 0;
}

/* ==========================================================================
   PREMIUM PAGINATION
   ========================================================================== */

.premium-pagination {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.01);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 640px) {
  .premium-pagination {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.total-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.page-size-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-size-selector label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.page-size-selector select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.5rem 1rem;
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

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

.page-indicator {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.page-indicator span {
  color: white;
  font-weight: 800;
  background: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  margin: 0 0.25rem;
}

/* ==========================================================================
   PREMIUM HEADER & ACTIONS
   ========================================================================== */

.premium-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

@media (max-width: 1024px) {
  .premium-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }
}

.header-main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-icon-box {
  width: 64px;
  height: 64px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}

.header-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0 0;
}

.premium-critical-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid rgba(239, 68, 68, 0.2);
  transition: all 0.2s ease;
}

.premium-critical-badge.active {
  background: #ef4444;
  color: white;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 640px) {
  .header-actions {
    flex-direction: column-reverse;
  }
  .secondary-actions {
    width: 100%;
    justify-content: space-between;
  }
}

.secondary-actions {
  display: flex;
  gap: 0.75rem;
}

.premium-btn-outline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.premium-btn-primary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, var(--primary), #2563eb);
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.75rem;
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.premium-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* ==========================================================================
   PREMIUM STATS GRID
   ========================================================================== */

.premium-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.premium-stat-card {
  position: relative;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 1.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.premium-stat-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.4);
}

.card-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  position: relative;
  z-index: 2;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.cost { background: rgba(59, 130, 246, 0.1); color: var(--primary); }
.stat-icon.value { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.stat-icon.profit { background: rgba(16, 185, 129, 0.1); color: var(--success); }

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

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

.stat-data .value {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  margin: 0.25rem 0;
  letter-spacing: -0.02em;
}

.stat-data .value.highlight {
  color: #a78bfa;
}

.stat-data .value.success {
  color: #34d399;
}

.stat-data .desc {
  font-size: 0.7rem;
  opacity: 0.4;
}

/* Card Glow Effect */
.card-glow {
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.05;
  z-index: 1;
}

.card-glow.cost { background: var(--primary); }
.card-glow.value { background: #8b5cf6; }
.card-glow.profit { background: var(--success); }
.finanzas-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 3rem;
}

.finanzas-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.finanzas-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.stat-title {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.stat-trend.success { color: var(--success); }
.stat-trend.danger { color: var(--danger); }

.balance-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.finanzas-tabs {
  display: flex;
  gap: 1rem;
  padding: 0.5rem;
  background: var(--surface-hover);
  border-radius: var(--radius-lg);
  width: -moz-fit-content;
  width: fit-content;
  margin-bottom: 1rem;
}

.tab-btn {
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: transparent;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: white;
  background: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.finanzas-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.finance-table {
  width: 100%;
  border-collapse: collapse;
}

.finance-table th {
  text-align: left;
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--panel-border);
  font-weight: 600;
}

.finance-table td {
  padding: 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.tag {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-ingreso { background: rgba(21, 128, 61, 0.1); color: #15803d; }
.tag-egreso { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.iva-badge {
  font-family: monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.filter-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.month-selector {
  background: var(--surface-color);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  outline: none;
}

.accounting-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.summary-box {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
}

.summary-box .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.4rem;
}

.summary-box .value {
  font-size: 1.2rem;
  font-weight: 600;
}

.bg-check {
  background: rgba(21, 128, 61, 0.05) !important;
  border-color: rgba(21, 128, 61, 0.2) !important;
}

@media (max-width: 768px) {
  .finanzas-header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .finanzas-tabs {
    width: 100%;
    overflow-x: auto;
  }
}

.ai-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  height: calc(100vh - 4rem); /* Fill available space */
}

.text-ai {
  color: var(--ai-color);
}

.chat-interface {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  padding: 0;
}

.chat-messages {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.message-bubble {
  display: flex;
  gap: 1rem;
  max-width: 80%;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-bubble {
  align-self: flex-start;
}

.ai-bubble .message-avatar {
  background: linear-gradient(135deg, var(--ai-color), #c084fc);
  color: white;
}

.ai-bubble .message-content {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  border-radius: 0 16px 16px 16px;
}

.user-bubble {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.user-bubble .message-avatar {
  background: var(--primary);
  color: white;
}

.user-bubble .message-content {
  background: var(--primary);
  color: white;
  border-radius: 16px 0 16px 16px;
}

.message-content {
  padding: 1rem 1.25rem;
  line-height: 1.6;
  font-size: 0.95rem;
  overflow-wrap: break-word;
}

.message-content h1, 
.message-content h2, 
.message-content h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: var(--ai-color);
  font-weight: 700;
}

.message-content h3 { font-size: 1.1rem; }

.message-content p {
  margin-bottom: 0.75rem;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.message-content ul, 
.message-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.message-content li {
  margin-bottom: 0.4rem;
}

.message-content strong {
  font-weight: 700;
  color: inherit;
}

.message-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.85rem;
}

.message-content th, 
.message-content td {
  border: 1px solid var(--panel-border);
  padding: 0.5rem;
  text-align: left;
}

.message-content th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 1.25rem !important;
}

.typing-indicator span {
  display: block;
  width: 6px;
  height: 6px;
  background-color: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Chat Input Area */
.chat-input-area {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--surface-hover);
  border-top: 1px solid var(--panel-border);
}

.chat-input-area input {
  flex: 1;
  background: var(--bg-color);
  border: 1px solid var(--panel-border);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition: all var(--transition-fast);
}

.chat-input-area input:focus {
  border-color: var(--ai-color);
  box-shadow: 0 0 0 1px var(--ai-glow);
}

.chat-input-area button {
  padding: 0.8rem;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  display: flex;
}

.chat-input-area button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
.settings-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  height: 100%;
}

.settings-header {
  margin-bottom: 1rem;
}

.settings-layout {
  display: flex;
  gap: 2rem;
  flex: 1;
  min-height: 550px;
}

.settings-sidebar {
  width: 250px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.settings-sidebar::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 2rem;
}

.settings-tab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  text-align: left;
}

.settings-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.settings-tab.active {
  background: var(--primary-glow);
  color: var(--primary);
}

.tab-icon {
  opacity: 0.8;
}

.settings-tab.active .tab-icon {
  opacity: 1;
}

.settings-content {
  flex: 1;
  padding: 2.5rem;
  overflow-y: auto;
}

.settings-section h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 600px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.row-group {
  flex-direction: row;
  align-items: center;
}

.form-group label {
  font-weight: 500;
  font-size: 0.9rem;
}

.form-input, .form-select {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--surface-color);
}

.form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input-help {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Avatar Group elements */
.avatar-group {
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--ai-color));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

.avatar-actions {
  display: flex;
  gap: 1rem;
}

.form-actions {
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--panel-border);
  display: flex;
  justify-content: flex-end;
}

/* Theme Options */
.theme-selector {
  display: flex;
  gap: 1.5rem;
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.theme-preview {
  width: 100px;
  height: 70px;
  border-radius: var(--radius-md);
  border: 2px solid var(--panel-border);
  transition: all var(--transition-fast);
}

.theme-option:hover .theme-preview {
  border-color: rgba(255, 255, 255, 0.3);
}

.theme-option.active .theme-preview {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.light-theme {
  background: #f3f4f6;
}

.dark-theme {
  background: #111111;
}

.system-theme {
  background: linear-gradient(135deg, #f3f4f6 50%, #111111 50%);
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-select {
  min-width: 150px;
}

.mt-6 {
  margin-top: 1.5rem;
}

.center-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

/* --- Premium Notifications Redesign --- */
.notif-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.notif-card-pro {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-fast);
}

.notif-card-header {
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.notif-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-main);
}

.notif-icon-category {
  color: var(--primary);
  opacity: 0.8;
}

.notif-items-container {
  display: flex;
  flex-direction: column;
}

.notif-item-pro {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

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

.notif-item-pro:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notif-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon-box.warn { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.notif-icon-box.danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.notif-icon-box.success { background: rgba(21, 128, 61, 0.1); color: #15803d; }
.notif-icon-box.info { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.notif-icon-box.spark { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.notif-icon-box.default { background: rgba(100, 116, 139, 0.1); color: #64748b; }

.notif-text {
  flex: 1;
}

.notif-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.notif-text p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Modern Switch Pro */
.notif-switch-pro {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.slider-pro {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
  border: 1px solid var(--panel-border);
}

.slider-pro:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
}

.notif-switch-pro input:checked + .slider-pro {
  background-color: var(--primary);
  border-color: var(--primary);
}

.notif-switch-pro input:focus + .slider-pro {
  box-shadow: 0 0 1px var(--primary);
}

.notif-switch-pro input:checked + .slider-pro:before {
  transform: translateX(20px);
}

.slider-pro.round {
  border-radius: 34px;
}

.slider-pro.round:before {
  border-radius: 50%;
}

/* Profile Specific Styles */
.profile-avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  border: 3px solid var(--panel-border);
  box-shadow: var(--shadow-md);
}

.avatar-edit-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--surface-color);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.avatar-edit-btn:hover {
  transform: scale(1.1);
  background: var(--primary-dark, #15803d);
}

.avatar-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}
.recordatorios-page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 2rem;
}

.recordatorios-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.header-stats-pro {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  gap: 1.5rem;
}

.stat-pro {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-pro .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.stat-pro .value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.divider-v {
  width: 1px;
  height: 24px;
  background: var(--panel-border);
}

/* Grid Layout */
.reminders-grid-pro {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1100px) {
  .reminders-grid-pro {
    grid-template-columns: 1fr;
  }
}

/* Management Desktop - New Premium Layout */
.management-desktop {
  display: flex;
  min-height: 700px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-xl);
}

@media (max-width: 1024px) {
  .management-desktop {
    flex-direction: column;
    min-height: auto;
  }
}

/* Management Sidebar */
.management-sidebar {
  width: 280px;
  background: rgba(255, 255, 255, 0.01);
  border-right: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

@media (max-width: 1024px) {
  .management-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--panel-border);
    padding: 1rem;
  }
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

@media (max-width: 1024px) {
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  color: var(--text-dim);
  text-align: left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

@media (max-width: 1024px) {
  .nav-item {
    min-width: 160px;
  }
}

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

.nav-item.active {
  background: rgba(var(--primary-rgb), 0.08);
  border-color: rgba(var(--primary-rgb), 0.2);
  color: var(--primary);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.nav-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.nav-icon-wrapper.goals { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.nav-icon-wrapper.notes { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.nav-icon-wrapper.birthdays { background: rgba(236, 72, 153, 0.1); color: #ec4899; }

.active .nav-icon-wrapper {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

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

.nav-label {
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-count {
  font-size: 0.75rem;
  opacity: 0.6;
}

.sidebar-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--panel-border);
}

.btn-add-quick {
  width: 100%;
  padding: 0.85rem;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-add-quick:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* Content Area */
.management-content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.05);
}

.content-header-pro {
  padding: 2rem;
  border-bottom: 1px solid var(--panel-border);
}

.content-header-pro h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.content-header-pro p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.content-scroll-container {
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
}

/* View Specific Grids */
.goals-view-pro {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.notes-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.birthday-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Birthday Premium Card */
.bday-card-pro {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all 0.3s;
}

.bday-card-pro:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-4px);
}

.bday-card-pro.is-today {
  border-color: #ec4899;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.05) 0%, transparent 100%);
}

.bday-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar-pro {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--panel-border);
}

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

.user-text h4 {
  font-size: 1rem;
  font-weight: 600;
}

.user-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.bday-badge-pro {
  background: #ec4899;
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}

.bday-action-btn {
  width: 100%;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(37, 211, 102, 0.1);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.bday-action-btn:hover {
  background: #25d366;
  color: white;
}

.is-today .bday-action-btn {
  background: #25d366;
  color: white;
}

/* Empty State Pro */
.empty-state-pro {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state-pro h3 {
  color: var(--text-main);
  margin-top: 1rem;
}

.reminders-grid-pro.single-column {
  grid-template-columns: 1fr;
  max-width: 900px;
  margin: 0 auto;
}

/* Tabs System */
.tabs-container-pro {
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-container-pro::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  color: var(--text-dim);
  text-align: left;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.tab-btn.active {
  background: rgba(var(--primary-rgb), 0.05);
  border-color: rgba(var(--primary-rgb), 0.15);
  color: var(--primary);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.tab-text {
  display: flex;
  flex-direction: column;
}

.tab-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.tab-desc {
  font-size: 0.75rem;
  opacity: 0.6;
}

.tab-indicator {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 -2px 10px var(--primary-glow);
}

.column-pro {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.column-pro-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.title-area h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.title-area p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.icon-target { color: #8b5cf6; }
.icon-bell { color: #f59e0b; }
.icon-birthday { color: #ec4899; } /* Rosa para cumpleaños */

.btn-add-pro {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-add-pro:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* List and Cards */
.list-container-pro {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reminder-card-pro {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.reminder-card-pro:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.reminder-card-pro.completed {
  background: rgba(21, 128, 61, 0.02);
  border-color: rgba(21, 128, 61, 0.1);
}

/* Priority Left Borders */
.priority-alta { border-left: 4px solid #ef4444; }
.priority-media { border-left: 4px solid #f59e0b; }
.priority-baja { border-left: 4px solid #3b82f6; }

.card-pro-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.card-pro-main {
  display: flex;
  gap: 1rem;
  flex: 1;
}

.custom-checkbox-pro {
  width: 22px;
  height: 22px;
  border: 2px solid var(--panel-border);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-top: 2px;
  background: rgba(255, 255, 255, 0.02);
}

.custom-checkbox-pro:hover {
  border-color: var(--primary);
}

.completed .custom-checkbox-pro {
  border-color: var(--success);
  background: rgba(21, 128, 61, 0.1);
}

.card-pro-text .title {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.completed .title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.card-pro-text .desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.4;
}

.card-pro-actions {
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.reminder-card-pro:hover .card-pro-actions {
  opacity: 1;
}

/* Progress Section */
.progress-section {
  margin: 1.25rem 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.progress-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-values {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-align: right;
}

/* Card Footer */
.card-pro-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: auto;
}

.priority-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.priority-badge.alta { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.priority-badge.media { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.priority-badge.baja { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }

.achievement-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 600;
}

/* Modal Form */
.pro-modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input, .form-group textarea, .form-group select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-size: 0.95rem;
  transition: all 0.2s;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.modal-actions-pro {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-dim);
  background: rgba(255,255,255,0.01);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--panel-border);
}

.title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auto-badge {
  font-size: 0.65rem;
  background: var(--primary-glow);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.type-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 12px;
  color: var(--text-main);
  font-weight: 500;
}

.goal-type-select {
  border-color: rgba(var(--primary-rgb), 0.3) !important;
  background: rgba(var(--primary-rgb), 0.05) !important;
  font-weight: 500;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: -0.25rem;
}

.date-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.date-badge.overdue {
  color: #ef4444;
}

/* Header Performance */
.header-performance-pro {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.8rem 1.5rem;
  min-width: 320px;
}

.performance-info {
  flex: 1;
}

.performance-text {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

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

.performance-text .value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.global-progress-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.global-progress-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.3);
  transition: width 0.8s ease-out;
}

.header-stats-mini {
  display: flex;
  gap: 1.25rem;
}

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

.mini-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  color: var(--text-dim);
}

.mini-value {
  font-size: 0.95rem;
  font-weight: 600;
}

.mini-value.success { color: var(--success); }

/* Progress Enhancements */
.progress-percent {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.progress-percent.completed {
  color: var(--success);
}

.gold-glow {
  background: linear-gradient(90deg, #f59e0b, #fbbf24) !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

/* Birthday Specific Styles */
.birthday-card {
  border-left: 4px solid #ec4899;
}

.birthday-card.is-today {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.05) 0%, rgba(255, 255, 255, 0.03) 100%);
  border-color: rgba(236, 72, 153, 0.3);
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.1);
}

.today-badge {
  background: #ec4899;
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  animation: pulse-pink 2s infinite;
}

@keyframes pulse-pink {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(236, 72, 153, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); }
}

.item-avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--panel-border);
}

.item-avatar-mini img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.btn-send-greeting {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.6rem;
  border-radius: 8px;
  background: rgba(37, 211, 102, 0.1); /* Color WhatsApp */
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-send-greeting:hover {
  background: #25d366;
  color: white;
  transform: translateY(-2px);
}

.btn-send-greeting.active {
  background: #25d366;
  color: white;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.birthday-grid-focused {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.admin-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Stats Cards */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.users { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-icon.revenue { background: rgba(21, 128, 61, 0.1); color: #15803d; }
.stat-icon.plan { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.stat-icon.pro { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

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

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Content Area */
.admin-content {
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.search-bar {
    position: relative;
    width: 350px;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    color: var(--text-muted);
}

.search-bar input {
    background: none;
    border: none;
    color: white;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.admin-table th {
    text-align: left;
    padding: 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    font-weight: 600;
}

.admin-table td {
    padding: 1.25rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.95rem;
}

.admin-table tr td:first-child { border-radius: 12px 0 0 12px; }
.admin-table tr td:last-child { border-radius: 0 12px 12px 0; }

.user-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
}

/* Badges */
.plan-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.plan-badge.emprendedor { background: rgba(156, 163, 175, 0.1); color: #9ca3af; border: 1px solid rgba(156, 163, 175, 0.2); }
.plan-badge.negocio { background: rgba(59, 130, 246, 0.1); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.2); }
.plan-badge.empresa { background: rgba(21, 128, 61, 0.1); color: #15803d; border: 1px solid rgba(21, 128, 61, 0.2); }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.status-badge.activo { color: #15803d; }

/* Modal Styles */
.plan-edit-modal {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.plan-options {
    display: grid;
    gap: 1rem;
}

.plan-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.plan-option.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.plan-option input {
    display: none;
}

.plan-option-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.plan-name {
    font-weight: 600;
    color: white;
}

.plan-price {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.admin-loading {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, rgba(59, 130, 246, 0.15), transparent 40%),
              radial-gradient(circle at bottom, rgba(139, 92, 246, 0.15), transparent 40%);
}

.login-box {
  width: 100%;
  max-width: 400px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.login-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--text-muted);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon svg {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
}

.input-with-icon .form-input {
  width: 100%;
  padding-left: 2.75rem;
}

.form-input.with-password-toggle {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color var(--transition-fast);
}

.password-toggle:hover {
  color: white;
}

.login-btn {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.login-error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 1rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.login-footer {
  text-align: center;
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--panel-border);
}

.btn-link {
  color: var(--primary);
  text-decoration: underline;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.btn-link:hover {
  color: #60a5fa;
}

.terms-container {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.checkbox-label input {
  margin-top: 0.2rem;
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-text {
  line-height: 1.4;
}

.btn-link-inline {
  background: transparent;
  border: none;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.btn-link-inline:hover {
  color: #60a5fa;
}

.terms-text-content {
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.6;
}

.terms-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.terms-list li strong {
  color: var(--primary);
}

.mb-4 { margin-bottom: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.w-full { width: 100%; }
.catalogo-publico-container {
  min-height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-main);
  padding: 2rem 1rem;
  font-family: var(--font-body);
}

.catalogo-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  border: 1px solid var(--panel-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.catalogo-company-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  margin: 0 auto 1.5rem auto;
  display: block;
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-smooth);
}

.catalogo-company-logo:hover {
  transform: scale(1.05);
}

.catalogo-title {
  font-size: 2.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff, var(--text-dim));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.catalogo-search-bar {
  max-width: 600px;
  margin: 0 auto 3rem auto;
  position: relative;
  display: flex;
  align-items: center;
}

.catalogo-search-bar .search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-dim);
}

.catalogo-search-bar input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  font-size: 1rem;
  transition: all var(--transition-smooth);
}

.catalogo-search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Categorías Premium */
.catalogo-categories-wrapper {
  max-width: 800px;
  margin: 0 auto 2rem auto;
  overflow: hidden;
  position: relative;
}

.catalogo-categories {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  -webkit-overflow-scrolling: touch;
}

.catalogo-categories::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.category-pill {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  transform: translateY(-2px);
}

.category-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.catalogo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card-public {
  background: var(--surface-color);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.product-card-public:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.15);
}

.product-card-public .product-image {
  width: 100%;
  height: 200px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-card-public .product-image img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.product-card-public .product-image .fallback-icon {
  color: rgba(255, 255, 255, 0.1);
}

.product-card-public .product-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-public .product-brand {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.product-card-public .product-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.product-card-public .product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.public-tag {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  color: var(--text-dim);
}

.product-card-public .product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
}

.product-card-public .product-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.stock-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
}

.stock-badge.in-stock {
  background: rgba(21, 128, 61, 0.1);
  color: #15803d;
  border: 1px solid rgba(21, 128, 61, 0.2);
}

.stock-badge.out-of-stock {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.empty-state-public {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-dim);
}

.empty-state-public .icon {
  margin-bottom: 1rem;
  opacity: 0.5;
}

.public-modal-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.public-modal-image-container {
  width: 100%;
  max-height: 400px;
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.public-modal-image {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}

.public-modal-image-container .fallback-icon {
  color: rgba(255, 255, 255, 0.1);
  padding: 3rem;
}

.public-modal-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.public-modal-brand {
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.public-modal-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.public-modal-price {
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-main);
  margin: 0.5rem 0;
}

.public-modal-description {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 1rem;
  background: rgba(255,255,255,0.03);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.05);
}

.public-modal-properties {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.public-modal-property {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.05);
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-md);
  flex: 1;
  min-width: 120px;
}

.public-modal-property-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}

.public-modal-property-value {
  font-weight: 600;
  color: var(--text-main);
}

@media (max-width: 768px) {
  .catalogo-title {
    font-size: 2rem;
  }
  .catalogo-publico-container {
    padding: 1rem;
  }
}

.otros-ingresos-container {
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

.oi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--panel-border);
}

.oi-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.balance-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.balance-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), #a855f7, #ec4899);
}

.stat-card {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.stat-title {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 2.2rem;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
}

.stat-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.success { color: #15803d; }
.danger { color: #ef4444; }
.text-gradient {
  background: linear-gradient(135deg, #fff, var(--text-dim));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.fw-bold { font-weight: bold; }

.main-panel {
  padding: 0;
}

.oi-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

.oi-table {
  width: 100%;
  border-collapse: collapse;
}

.oi-table th {
  text-align: left;
  padding: 1rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--panel-border);
}

.oi-table td {
  padding: 1.2rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}

.oi-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

.oi-avatar-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(21, 128, 61, 0.1);
  color: #15803d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-main);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .oi-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  
  .form-row {
    flex-direction: column;
  }
}

.ventas-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 2rem;
}

.ventas-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.ventas-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.stat-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-meta.success {
  color: var(--success);
}

.pipeline-board {
  display: flex;
  gap: 1.5rem;
  flex: 1;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.pipeline-column {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  overflow: hidden;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 1rem;
}

.column-title {
  color: var(--text-main);
  font-size: 1.1rem;
}

.column-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.column-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  flex: 1;
  padding-right: 0.5rem;
}

.deal-card {
  background: var(--surface-hover);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: grab;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.deal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.deal-card h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
}

.deal-value {
  font-size: 1.25rem;
  font-weight: 600;
  font-family: var(--font-heading);
  margin-bottom: 0.75rem;
}

.deal-value.success {
  color: var(--success);
}

.deal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--panel-border);
  padding-top: 0.75rem;
}

.deal-prob {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.deal-prob.success {
  background: rgba(21, 128, 61, 0.1);
  color: var(--success);
}

.deal-negotiating {
  -o-border-image: linear-gradient(to right, rgba(139, 92, 246, 0.3), rgba(255, 255, 255, 0.05)) 1;
     border-image: linear-gradient(to right, rgba(139, 92, 246, 0.3), rgba(255, 255, 255, 0.05)) 1;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, var(--surface-hover) 100%);
}

.deal-won {
  background: linear-gradient(135deg, rgba(21, 128, 61, 0.05) 0%, var(--surface-hover) 100%);
  border-left: 3px solid var(--success);
}

/* Modal Form Styles */

.modal-overlay.large-modal .modal-content {
  max-width: 900px;
  width: 95%;
}

.invoice-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.invoice-header-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
  box-sizing: border-box;
  width: 100%;
}

.invoice-header-grid .form-group {
  margin-bottom: 0;
}

.invoice-items-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.invoice-items-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  /* overflow: hidden; Removed to allow dropdowns to pop out */
}

.invoice-items-table th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: left;
  padding: 0.75rem;
}

.invoice-items-table td {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.invoice-items-table input,
.invoice-items-table select {
  width: 100%;
  background: var(--surface-color);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.invoice-items-table input:focus {
  border-color: var(--primary);
  outline: none;
}

.invoice-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.invoice-notes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.invoice-summary {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-sizing: border-box;
  width: 100%;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.summary-row.total {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.summary-row input {
  width: 80px;
  text-align: right;
}

/* .btn-danger-icon replaced by .btn-icon delete globally */

/* --- Premium Receipt / Comprobante A4 Styles --- */

.receipt-container {
  padding: 2rem;
  overflow-x: auto;
  background: var(--surface-color);
}

.receipt-a4 {
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  background: #ffffff;
  color: #1e293b;
  padding: 0;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

.receipt-banner-stripe {
  height: 8px;
  background: linear-gradient(90deg, var(--primary) 0%, #6366f1 100%);
  width: 100%;
}

.receipt-header-modern {
  display: flex;
  justify-content: space-between;
  padding: 40px 50px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.receipt-logo-pro {
  margin-bottom: 1rem;
}

.receipt-logo-pro img {
  height: 70px;
  width: auto;
  -o-object-fit: contain;
     object-fit: contain;
}

.logo-placeholder-pro {
  width: 70px;
  height: 70px;
  background: #1e293b;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  border-radius: 12px;
}

.company-name-pro {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.025em;
}

.company-contact-pro p {
  margin: 2px 0;
  font-size: 0.85rem;
  color: #64748b;
}

.receipt-type-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid #0f172a;
  padding: 5px 15px;
  background: white;
  margin-bottom: 1.5rem;
}

.type-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: #64748b;
}

.type-letter {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0f172a;
}

.receipt-meta-pro {
  text-align: right;
}

.meta-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 4px;
}

.meta-row .label {
  color: #64748b;
  font-size: 0.85rem;
}

.meta-row .value {
  color: #0f172a;
  font-weight: 700;
  font-size: 0.85rem;
}

.receipt-client-panel {
  padding: 30px 50px;
}

.section-title-pro {
  font-size: 0.75rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.05em;
  margin-bottom: 15px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}

.client-grid-pro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.data-item {
  margin-bottom: 10px;
}

.data-item .label {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 2px;
}

.data-item .value {
  display: block;
  font-size: 0.95rem;
  color: #1e293b;
  font-weight: 500;
}

.data-item .value.highlight {
  font-weight: 700;
  font-size: 1.1rem;
  color: #0f172a;
}

.receipt-table-pro {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 30px 0;
}

.receipt-table-pro th {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.receipt-table-pro th:first-child { padding-left: 50px; }

.receipt-table-pro th:last-child { padding-right: 50px; }

.receipt-table-pro td {
  padding: 15px 15px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.95rem;
}

.receipt-table-pro tr:nth-child(even) {
  background: #f8fafc;
}

.receipt-table-pro td:first-child { padding-left: 50px; }

.receipt-table-pro td:last-child { padding-right: 50px; }

.item-name {
  font-weight: 600;
  color: #0f172a;
}

.semibold { font-weight: 600; }

.receipt-footer-pro {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 20px 50px 40px 50px;
}

.notes-box-pro {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #e2e8f0;
  margin-bottom: 20px;
}

.notes-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  color: #64748b;
  margin-bottom: 8px;
}

.notes-box-pro p {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
}

.legal-disclaimer-pro {
  font-size: 0.75rem;
  color: #94a3b8;
  font-style: italic;
  line-height: 1.4;
}

.totals-container-pro {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.total-row-pro {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: #475569;
}

.total-row-pro.discount {
  color: #ef4444;
  font-weight: 600;
}

.total-row-pro.main-total {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px solid #0f172a;
  color: #0f172a;
}

.total-label {
  font-weight: 800;
  font-size: 1.1rem;
}

.total-amount {
  font-weight: 800;
  font-size: 1.5rem;
}

.receipt-bottom-bar {
  background: #0f172a;
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* Printing logic */

@media print {
  body {
    visibility: hidden;
    background: white !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  #printable-receipt, #printable-receipt * {
    visibility: visible;
  }
  
  #printable-receipt {
    position: fixed;
    left: 0;
    top: 0;
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 0;
    z-index: 9999;
  }

  .receipt-a4 {
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
    border: none !important;
  }

  .receipt-banner-stripe {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .receipt-table-pro th {
    background: #0f172a !important;
    color: white !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .receipt-header-modern {
    background: #f8fafc !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .no-print {
    display: none !important;
  }
}

.presupuesto-container {
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

.quote-table th, .quote-table td {
  vertical-align: middle;
}

.quote-status {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}

.quote-status.draft {
  background: rgba(156, 163, 175, 0.1);
  color: #9ca3af;
  border-color: rgba(156, 163, 175, 0.2);
}

.quote-status.sent {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.2);
}

.quote-status.approved {
  background: rgba(21, 128, 61, 0.1);
  color: #15803d;
  border-color: rgba(21, 128, 61, 0.2);
}

.quote-status.rejected {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.quote-status.converted {
  background: linear-gradient(135deg, rgba(21, 128, 61, 0.2), rgba(59, 130, 246, 0.2));
  color: #34d399;
  border: 1px solid rgba(21, 128, 61, 0.3);
  box-shadow: 0 0 10px rgba(21, 128, 61, 0.1);
}

@media (max-width: 768px) {
  .presupuesto-container {
    padding: 1rem;
  }
}

.ventas-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 2rem;
}

.ventas-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.ventas-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.stat-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-meta.success {
  color: var(--success);
}

.pipeline-board {
  display: flex;
  gap: 1.5rem;
  flex: 1;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.pipeline-column {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  overflow: hidden;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 1rem;
}

.column-title {
  color: var(--text-main);
  font-size: 1.1rem;
}

.column-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.column-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  flex: 1;
  padding-right: 0.5rem;
}

.deal-card {
  background: var(--surface-hover);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: grab;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.deal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.deal-card h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
}

.deal-value {
  font-size: 1.25rem;
  font-weight: 600;
  font-family: var(--font-heading);
  margin-bottom: 0.75rem;
}

.deal-value.success {
  color: var(--success);
}

.deal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--panel-border);
  padding-top: 0.75rem;
}

.deal-prob {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.deal-prob.success {
  background: rgba(21, 128, 61, 0.1);
  color: var(--success);
}

.deal-negotiating {
  -o-border-image: linear-gradient(to right, rgba(139, 92, 246, 0.3), rgba(255, 255, 255, 0.05)) 1;
     border-image: linear-gradient(to right, rgba(139, 92, 246, 0.3), rgba(255, 255, 255, 0.05)) 1;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, var(--surface-hover) 100%);
}

.deal-won {
  background: linear-gradient(135deg, rgba(21, 128, 61, 0.05) 0%, var(--surface-hover) 100%);
  border-left: 3px solid var(--success);
}

/* Modal Form Styles */

.modal-overlay.large-modal .modal-content {
  max-width: 900px;
  width: 95%;
}

.invoice-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.invoice-header-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
  box-sizing: border-box;
  width: 100%;
}

.invoice-header-grid .form-group {
  margin-bottom: 0;
}

.invoice-items-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.invoice-items-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  /* overflow: hidden; Removed to allow dropdowns to pop out */
}

.invoice-items-table th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: left;
  padding: 0.75rem;
}

.invoice-items-table td {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.invoice-items-table input,
.invoice-items-table select {
  width: 100%;
  background: var(--surface-color);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.invoice-items-table input:focus {
  border-color: var(--primary);
  outline: none;
}

.invoice-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.invoice-notes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.invoice-summary {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-sizing: border-box;
  width: 100%;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.summary-row.total {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.summary-row input {
  width: 80px;
  text-align: right;
}

/* .btn-danger-icon replaced by .btn-icon delete globally */

/* --- Premium Receipt / Comprobante A4 Styles --- */

.receipt-container {
  padding: 2rem;
  overflow-x: auto;
  background: var(--surface-color);
}

.receipt-a4 {
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  background: #ffffff;
  color: #1e293b;
  padding: 0;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

.receipt-banner-stripe {
  height: 8px;
  background: linear-gradient(90deg, var(--primary) 0%, #6366f1 100%);
  width: 100%;
}

.receipt-header-modern {
  display: flex;
  justify-content: space-between;
  padding: 40px 50px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.receipt-logo-pro {
  margin-bottom: 1rem;
}

.receipt-logo-pro img {
  height: 70px;
  width: auto;
  -o-object-fit: contain;
     object-fit: contain;
}

.logo-placeholder-pro {
  width: 70px;
  height: 70px;
  background: #1e293b;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  border-radius: 12px;
}

.company-name-pro {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.025em;
}

.company-contact-pro p {
  margin: 2px 0;
  font-size: 0.85rem;
  color: #64748b;
}

.receipt-type-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid #0f172a;
  padding: 5px 15px;
  background: white;
  margin-bottom: 1.5rem;
}

.type-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: #64748b;
}

.type-letter {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0f172a;
}

.receipt-meta-pro {
  text-align: right;
}

.meta-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 4px;
}

.meta-row .label {
  color: #64748b;
  font-size: 0.85rem;
}

.meta-row .value {
  color: #0f172a;
  font-weight: 700;
  font-size: 0.85rem;
}

.receipt-client-panel {
  padding: 30px 50px;
}

.section-title-pro {
  font-size: 0.75rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.05em;
  margin-bottom: 15px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}

.client-grid-pro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.data-item {
  margin-bottom: 10px;
}

.data-item .label {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 2px;
}

.data-item .value {
  display: block;
  font-size: 0.95rem;
  color: #1e293b;
  font-weight: 500;
}

.data-item .value.highlight {
  font-weight: 700;
  font-size: 1.1rem;
  color: #0f172a;
}

.receipt-table-pro {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 30px 0;
}

.receipt-table-pro th {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.receipt-table-pro th:first-child { padding-left: 50px; }

.receipt-table-pro th:last-child { padding-right: 50px; }

.receipt-table-pro td {
  padding: 15px 15px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.95rem;
}

.receipt-table-pro tr:nth-child(even) {
  background: #f8fafc;
}

.receipt-table-pro td:first-child { padding-left: 50px; }

.receipt-table-pro td:last-child { padding-right: 50px; }

.item-name {
  font-weight: 600;
  color: #0f172a;
}

.semibold { font-weight: 600; }

.receipt-footer-pro {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 20px 50px 40px 50px;
}

.notes-box-pro {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #e2e8f0;
  margin-bottom: 20px;
}

.notes-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  color: #64748b;
  margin-bottom: 8px;
}

.notes-box-pro p {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
}

.legal-disclaimer-pro {
  font-size: 0.75rem;
  color: #94a3b8;
  font-style: italic;
  line-height: 1.4;
}

.totals-container-pro {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.total-row-pro {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: #475569;
}

.total-row-pro.discount {
  color: #ef4444;
  font-weight: 600;
}

.total-row-pro.main-total {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px solid #0f172a;
  color: #0f172a;
}

.total-label {
  font-weight: 800;
  font-size: 1.1rem;
}

.total-amount {
  font-weight: 800;
  font-size: 1.5rem;
}

.receipt-bottom-bar {
  background: #0f172a;
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* Printing logic */

@media print {
  body {
    visibility: hidden;
    background: white !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  #printable-receipt, #printable-receipt * {
    visibility: visible;
  }
  
  #printable-receipt {
    position: fixed;
    left: 0;
    top: 0;
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 0;
    z-index: 9999;
  }

  .receipt-a4 {
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
    border: none !important;
  }

  .receipt-banner-stripe {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .receipt-table-pro th {
    background: #0f172a !important;
    color: white !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .receipt-header-modern {
    background: #f8fafc !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .no-print {
    display: none !important;
  }
}

.compras-container {
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

.purchases-table th, .purchases-table td {
  vertical-align: middle;
}

/* global button styles moved to index.css */

@media (max-width: 768px) {
  .compras-container {
    padding: 1rem;
  }
}
.gastos-container {
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

.gastos-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--panel-border);
}

.gastos-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.balance-card.expense-card::before {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.gastos-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

.gastos-table {
  width: 100%;
  border-collapse: collapse;
}

.gastos-table th {
  text-align: left;
  padding: 1rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--panel-border);
}

.gastos-table td {
  padding: 1.2rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}

.gastos-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

.gastos-avatar-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* btn-danger styles moved to index.css for global consistency */

.category-tag.danger-tag {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

@media (max-width: 768px) {
  .gastos-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
}
.premium-success-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
  position: relative;
  overflow: hidden;
  padding: 2rem;
  color: #fff;
  font-family: 'Poppins', sans-serif;
}

.premium-background-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  animation: pulse-glow 8s infinite alternate ease-in-out;
}

@keyframes pulse-glow {
  from { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  to { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.premium-success-card {
  position: relative;
  z-index: 10;
  max-width: 600px;
  width: 100%;
  padding: 4rem 3rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: card-appear 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes card-appear {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.premium-logo-large {
  width: 180px;
  height: auto;
  margin: 0 auto 3rem;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
  animation: logo-float 4s infinite ease-in-out;
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.premium-success-card h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(to bottom, #fff, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.premium-success-card p {
  font-size: 1.125rem;
  color: #9ca3af;
  margin-bottom: 3rem;
  line-height: 1.6;
}

.btn-premium-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 3rem;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px -5px rgba(255, 255, 255, 0.1);
}

.btn-premium-login:hover {
  transform: translateY(-2px);
  background: #f3f4f6;
  box-shadow: 0 20px 25px -5px rgba(255, 255, 255, 0.2);
}

.btn-premium-login:active {
  transform: translateY(0);
}

.premium-sparkles {
  position: absolute;
  top: -20px;
  right: -20px;
  color: #fff;
  opacity: 0.5;
  animation: spin-slow 10s linear infinite;
}

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

@media (max-width: 640px) {
  .premium-success-card {
    padding: 3rem 1.5rem;
  }
  .premium-success-card h1 {
    font-size: 2rem;
  }
}
*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*//*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/
dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.pointer-events-none {
  pointer-events: none;
}
.fixed {
  position: fixed;
}
.absolute {
  position: absolute;
}
.relative {
  position: relative;
}
.inset-0 {
  inset: 0px;
}
.-bottom-9 {
  bottom: -2.25rem;
}
.-right-12 {
  right: -3rem;
}
.-top-3 {
  top: -0.75rem;
}
.-top-6 {
  top: -1.5rem;
}
.bottom-4 {
  bottom: 1rem;
}
.left-0 {
  left: 0px;
}
.left-1\/2 {
  left: 50%;
}
.left-1\/4 {
  left: 25%;
}
.left-4 {
  left: 1rem;
}
.left-8 {
  left: 2rem;
}
.right-0 {
  right: 0px;
}
.right-1\/4 {
  right: 25%;
}
.right-4 {
  right: 1rem;
}
.top-0 {
  top: 0px;
}
.top-1\/2 {
  top: 50%;
}
.top-4 {
  top: 1rem;
}
.top-8 {
  top: 2rem;
}
.-z-10 {
  z-index: -10;
}
.z-0 {
  z-index: 0;
}
.z-10 {
  z-index: 10;
}
.z-20 {
  z-index: 20;
}
.z-50 {
  z-index: 50;
}
.order-1 {
  order: 1;
}
.order-2 {
  order: 2;
}
.order-3 {
  order: 3;
}
.col-span-2 {
  grid-column: span 2 / span 2;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-10 {
  margin-bottom: 2.5rem;
}
.mb-12 {
  margin-bottom: 3rem;
}
.mb-16 {
  margin-bottom: 4rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-3 {
  margin-bottom: 0.75rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mb-6 {
  margin-bottom: 1.5rem;
}
.mb-8 {
  margin-bottom: 2rem;
}
.mr-1 {
  margin-right: 0.25rem;
}
.mr-2 {
  margin-right: 0.5rem;
}
.mt-1 {
  margin-top: 0.25rem;
}
.mt-16 {
  margin-top: 4rem;
}
.mt-24 {
  margin-top: 6rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mt-6 {
  margin-top: 1.5rem;
}
.mt-8 {
  margin-top: 2rem;
}
.block {
  display: block;
}
.inline-block {
  display: inline-block;
}
.inline {
  display: inline;
}
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}
.table {
  display: table;
}
.grid {
  display: grid;
}
.hidden {
  display: none;
}
.h-10 {
  height: 2.5rem;
}
.h-12 {
  height: 3rem;
}
.h-16 {
  height: 4rem;
}
.h-20 {
  height: 5rem;
}
.h-24 {
  height: 6rem;
}
.h-5 {
  height: 1.25rem;
}
.h-6 {
  height: 1.5rem;
}
.h-8 {
  height: 2rem;
}
.h-\[24rem\] {
  height: 24rem;
}
.h-\[380px\] {
  height: 380px;
}
.h-\[400px\] {
  height: 400px;
}
.h-\[500px\] {
  height: 500px;
}
.h-\[600px\] {
  height: 600px;
}
.h-auto {
  height: auto;
}
.h-full {
  height: 100%;
}
.h-px {
  height: 1px;
}
.min-h-\[100px\] {
  min-height: 100px;
}
.min-h-screen {
  min-height: 100vh;
}
.w-10 {
  width: 2.5rem;
}
.w-12 {
  width: 3rem;
}
.w-16 {
  width: 4rem;
}
.w-20 {
  width: 5rem;
}
.w-24 {
  width: 6rem;
}
.w-40 {
  width: 10rem;
}
.w-5 {
  width: 1.25rem;
}
.w-6 {
  width: 1.5rem;
}
.w-72 {
  width: 18rem;
}
.w-8 {
  width: 2rem;
}
.w-\[380px\] {
  width: 380px;
}
.w-\[400px\] {
  width: 400px;
}
.w-\[500px\] {
  width: 500px;
}
.w-\[600px\] {
  width: 600px;
}
.w-\[90\%\] {
  width: 90%;
}
.w-full {
  width: 100%;
}
.max-w-2xl {
  max-width: 42rem;
}
.max-w-3xl {
  max-width: 48rem;
}
.max-w-5xl {
  max-width: 64rem;
}
.max-w-7xl {
  max-width: 80rem;
}
.max-w-full {
  max-width: 100%;
}
.max-w-none {
  max-width: none;
}
.max-w-sm {
  max-width: 24rem;
}
.max-w-xs {
  max-width: 20rem;
}
.flex-1 {
  flex: 1 1 0%;
}
.flex-shrink-0 {
  flex-shrink: 0;
}
.shrink-0 {
  flex-shrink: 0;
}
.-translate-x-1\/2 {
  --tw-translate-x: -50%;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.-translate-y-1\/2 {
  --tw-translate-y: -50%;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.rotate-180 {
  --tw-rotate: 180deg;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.animate-\[slideDown_0\.3s_ease-out\] {
  animation: slideDown 0.3s ease-out;
}
@keyframes marquee {

  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-100% - var(--gap)));
  }
}
.animate-marquee {
  animation: marquee var(--duration) linear infinite;
}
@keyframes marquee-vertical {

  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(calc(-100% - var(--gap)));
  }
}
.animate-marquee-vertical {
  animation: marquee-vertical var(--duration) linear infinite;
}
@keyframes pulse {

  50% {
    opacity: .5;
  }
}
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes spin {

  to {
    transform: rotate(360deg);
  }
}
.animate-spin {
  animation: spin 1s linear infinite;
}
.cursor-not-allowed {
  cursor: not-allowed;
}
.cursor-pointer {
  cursor: pointer;
}
.select-none {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.resize-y {
  resize: vertical;
}
.resize {
  resize: both;
}
.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.flex-row {
  flex-direction: row;
}
.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-end {
  align-items: flex-end;
}
.items-center {
  align-items: center;
}
.items-baseline {
  align-items: baseline;
}
.justify-start {
  justify-content: flex-start;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-around {
  justify-content: space-around;
}
.gap-1 {
  gap: 0.25rem;
}
.gap-12 {
  gap: 3rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-4 {
  gap: 1rem;
}
.gap-5 {
  gap: 1.25rem;
}
.gap-6 {
  gap: 1.5rem;
}
.gap-8 {
  gap: 2rem;
}
.overflow-hidden {
  overflow: hidden;
}
.whitespace-nowrap {
  white-space: nowrap;
}
.whitespace-pre-line {
  white-space: pre-line;
}
.rounded-2xl {
  border-radius: 1rem;
}
.rounded-3xl {
  border-radius: 1.5rem;
}
.rounded-full {
  border-radius: 9999px;
}
.rounded-lg {
  border-radius: 0.5rem;
}
.rounded-md {
  border-radius: 0.375rem;
}
.rounded-xl {
  border-radius: 0.75rem;
}
.border {
  border-width: 1px;
}
.border-2 {
  border-width: 2px;
}
.border-b {
  border-bottom-width: 1px;
}
.border-t {
  border-top-width: 1px;
}
.border-gray-700 {
  --tw-border-opacity: 1;
  border-color: rgb(55 65 81 / var(--tw-border-opacity, 1));
}
.border-gray-800 {
  --tw-border-opacity: 1;
  border-color: rgb(31 41 55 / var(--tw-border-opacity, 1));
}
.border-gray-800\/50 {
  border-color: rgb(31 41 55 / 0.5);
}
.border-gray-800\/60 {
  border-color: rgb(31 41 55 / 0.6);
}
.border-green-500\/30 {
  border-color: rgb(34 197 94 / 0.3);
}
.border-white {
  --tw-border-opacity: 1;
  border-color: rgb(255 255 255 / var(--tw-border-opacity, 1));
}
.border-white\/10 {
  border-color: rgb(255 255 255 / 0.1);
}
.border-white\/20 {
  border-color: rgb(255 255 255 / 0.2);
}
.border-white\/5 {
  border-color: rgb(255 255 255 / 0.05);
}
.bg-black {
  --tw-bg-opacity: 1;
  background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
}
.bg-black\/60 {
  background-color: rgb(0 0 0 / 0.6);
}
.bg-black\/80 {
  background-color: rgb(0 0 0 / 0.8);
}
.bg-black\/90 {
  background-color: rgb(0 0 0 / 0.9);
}
.bg-black\/95 {
  background-color: rgb(0 0 0 / 0.95);
}
.bg-blue-500\/20 {
  background-color: rgb(59 130 246 / 0.2);
}
.bg-blue-500\/5 {
  background-color: rgb(59 130 246 / 0.05);
}
.bg-gray-700 {
  --tw-bg-opacity: 1;
  background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1));
}
.bg-gray-800 {
  --tw-bg-opacity: 1;
  background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));
}
.bg-gray-800\/50 {
  background-color: rgb(31 41 55 / 0.5);
}
.bg-gray-900\/20 {
  background-color: rgb(17 24 39 / 0.2);
}
.bg-gray-900\/40 {
  background-color: rgb(17 24 39 / 0.4);
}
.bg-green-500\/20 {
  background-color: rgb(34 197 94 / 0.2);
}
.bg-neutral-900 {
  --tw-bg-opacity: 1;
  background-color: rgb(23 23 23 / var(--tw-bg-opacity, 1));
}
.bg-purple-500\/20 {
  background-color: rgb(168 85 247 / 0.2);
}
.bg-purple-500\/5 {
  background-color: rgb(168 85 247 / 0.05);
}
.bg-white {
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
}
.bg-white\/10 {
  background-color: rgb(255 255 255 / 0.1);
}
.bg-white\/5 {
  background-color: rgb(255 255 255 / 0.05);
}
.bg-white\/\[0\.02\] {
  background-color: rgb(255 255 255 / 0.02);
}
.bg-gradient-to-b {
  background-image: linear-gradient(to bottom, var(--tw-gradient-stops));
}
.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}
.bg-gradient-to-l {
  background-image: linear-gradient(to left, var(--tw-gradient-stops));
}
.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
}
.from-black {
  --tw-gradient-from: #000 var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.from-gray-700 {
  --tw-gradient-from: #374151 var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(55 65 81 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.from-transparent {
  --tw-gradient-from: transparent var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.from-white {
  --tw-gradient-from: #fff var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.via-gray-700 {
  --tw-gradient-to: rgb(55 65 81 / 0)  var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), #374151 var(--tw-gradient-via-position), var(--tw-gradient-to);
}
.via-gray-800 {
  --tw-gradient-to: rgb(31 41 55 / 0)  var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), #1f2937 var(--tw-gradient-via-position), var(--tw-gradient-to);
}
.via-white\/95 {
  --tw-gradient-to: rgb(255 255 255 / 0)  var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), rgb(255 255 255 / 0.95) var(--tw-gradient-via-position), var(--tw-gradient-to);
}
.to-gray-300 {
  --tw-gradient-to: #d1d5db var(--tw-gradient-to-position);
}
.to-gray-900 {
  --tw-gradient-to: #111827 var(--tw-gradient-to-position);
}
.to-transparent {
  --tw-gradient-to: transparent var(--tw-gradient-to-position);
}
.to-white\/60 {
  --tw-gradient-to: rgb(255 255 255 / 0.6) var(--tw-gradient-to-position);
}
.object-contain {
  -o-object-fit: contain;
     object-fit: contain;
}
.object-cover {
  -o-object-fit: cover;
     object-fit: cover;
}
.p-0 {
  padding: 0px;
}
.p-1 {
  padding: 0.25rem;
}
.p-10 {
  padding: 2.5rem;
}
.p-2 {
  padding: 0.5rem;
}
.p-3 {
  padding: 0.75rem;
}
.p-4 {
  padding: 1rem;
}
.p-5 {
  padding: 1.25rem;
}
.p-6 {
  padding: 1.5rem;
}
.p-8 {
  padding: 2rem;
}
.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.px-5 {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}
.py-0\.5 {
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
}
.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
.py-10 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.py-20 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.py-24 {
  padding-top: 6rem;
  padding-bottom: 6rem;
}
.py-28 {
  padding-top: 7rem;
  padding-bottom: 7rem;
}
.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.py-5 {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.pb-10 {
  padding-bottom: 2.5rem;
}
.pb-12 {
  padding-bottom: 3rem;
}
.pb-20 {
  padding-bottom: 5rem;
}
.pb-8 {
  padding-bottom: 2rem;
}
.pt-12 {
  padding-top: 3rem;
}
.pt-32 {
  padding-top: 8rem;
}
.pt-4 {
  padding-top: 1rem;
}
.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}
.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}
.text-5xl {
  font-size: 3rem;
  line-height: 1;
}
.text-\[10px\] {
  font-size: 10px;
}
.text-\[11px\] {
  font-size: 11px;
}
.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}
.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}
.font-bold {
  font-weight: 700;
}
.font-extrabold {
  font-weight: 800;
}
.font-medium {
  font-weight: 500;
}
.font-semibold {
  font-weight: 600;
}
.uppercase {
  text-transform: uppercase;
}
.italic {
  font-style: italic;
}
.leading-none {
  line-height: 1;
}
.leading-relaxed {
  line-height: 1.625;
}
.leading-tight {
  line-height: 1.25;
}
.tracking-tight {
  letter-spacing: -0.025em;
}
.tracking-tighter {
  letter-spacing: -0.05em;
}
.tracking-wider {
  letter-spacing: 0.05em;
}
.tracking-widest {
  letter-spacing: 0.1em;
}
.text-black {
  --tw-text-opacity: 1;
  color: rgb(0 0 0 / var(--tw-text-opacity, 1));
}
.text-gray-300 {
  --tw-text-opacity: 1;
  color: rgb(209 213 219 / var(--tw-text-opacity, 1));
}
.text-gray-400 {
  --tw-text-opacity: 1;
  color: rgb(156 163 175 / var(--tw-text-opacity, 1));
}
.text-gray-500 {
  --tw-text-opacity: 1;
  color: rgb(107 114 128 / var(--tw-text-opacity, 1));
}
.text-green-400 {
  --tw-text-opacity: 1;
  color: rgb(74 222 128 / var(--tw-text-opacity, 1));
}
.text-neutral-500 {
  --tw-text-opacity: 1;
  color: rgb(115 115 115 / var(--tw-text-opacity, 1));
}
.text-white {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
.text-white\/30 {
  color: rgb(255 255 255 / 0.3);
}
.text-white\/40 {
  color: rgb(255 255 255 / 0.4);
}
.text-white\/5 {
  color: rgb(255 255 255 / 0.05);
}
.text-white\/50 {
  color: rgb(255 255 255 / 0.5);
}
.text-white\/60 {
  color: rgb(255 255 255 / 0.6);
}
.text-white\/70 {
  color: rgb(255 255 255 / 0.7);
}
.opacity-10 {
  opacity: 0.1;
}
.opacity-20 {
  opacity: 0.2;
}
.opacity-40 {
  opacity: 0.4;
}
.opacity-50 {
  opacity: 0.5;
}
.opacity-70 {
  opacity: 0.7;
}
.shadow-2xl {
  --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.shadow-\[0_0_30px_rgba\(255\2c 255\2c 255\2c 0\.2\)\] {
  --tw-shadow: 0 0 30px rgba(255,255,255,0.2);
  --tw-shadow-colored: 0 0 30px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.shadow-\[0_0_40px_rgba\(255\2c 255\2c 255\2c 0\.05\)\] {
  --tw-shadow: 0 0 40px rgba(255,255,255,0.05);
  --tw-shadow-colored: 0 0 40px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.shadow-lg {
  --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.shadow-md {
  --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.outline {
  outline-style: solid;
}
.blur {
  --tw-blur: blur(8px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.blur-2xl {
  --tw-blur: blur(40px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.blur-3xl {
  --tw-blur: blur(64px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.blur-xl {
  --tw-blur: blur(24px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.drop-shadow {
  --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.drop-shadow-\[0_0px_20px_rgba\(255\2c 255\2c 255\2c 0\.15\)\] {
  --tw-drop-shadow: drop-shadow(0 0px 20px rgba(255,255,255,0.15));
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.drop-shadow-lg {
  --tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1));
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.grayscale {
  --tw-grayscale: grayscale(100%);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.backdrop-blur-md {
  --tw-backdrop-blur: blur(12px);
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-blur-sm {
  --tw-backdrop-blur: blur(4px);
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.duration-200 {
  transition-duration: 200ms;
}
.duration-300 {
  transition-duration: 300ms;
}
.duration-500 {
  transition-duration: 500ms;
}
.duration-700 {
  transition-duration: 700ms;
}
.ease-out {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}
.\[--duration\:40s\] {
  --duration: 40s;
}
.\[--duration\:50s\] {
  --duration: 50s;
}
.\[--gap\:1rem\] {
  --gap: 1rem;
}
.\[--gap\:2rem\] {
  --gap: 2rem;
}
.\[animation-direction\:reverse\] {
  animation-direction: reverse;
}
.\[gap\:var\(--gap\)\] {
  gap: var(--gap);
}

:root {
  --bg-color: #0a0a0a;
  --surface-color: #111111;
  --surface-hover: #1a1a1a;
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-border-soft: rgba(255, 255, 255, 0.05);
  --surface-soft: rgba(255, 255, 255, 0.03);
  --input-bg: rgba(255, 255, 255, 0.03);
  --input-border: rgba(255, 255, 255, 0.1);
  --input-focus: var(--primary);
  
  --primary: #3b82f6; /* Azul eléctrico */
  --primary-glow: rgba(59, 130, 246, 0.25);
  --primary-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --success: #15803d; /* Verde más oscuro para mejor legibilidad */
  --success-glow: rgba(21, 128, 61, 0.2);
  --ai-color: #8b5cf6; /* Violeta (IA y predicciones) */
  --ai-glow: rgba(139, 92, 246, 0.25);
  --danger: #ef4444; /* Rojo suave para gastos/stock bajo */
  
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition-fast: 0.15s ease;
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme='light'] {
  --bg-color: #f1f5f9;      /* Slate 100 - Fondo base */
  --surface-color: #ffffff;   /* Blanco puro */
  --surface-hover: #f8fafc;   /* Slate 50 */
  --panel-border: rgba(15, 23, 42, 0.12); /* Más definido */
  --panel-border-soft: rgba(15, 23, 42, 0.08);
  --surface-soft: rgba(15, 23, 42, 0.04);
  --input-bg: #f8fafc;      /* Fondo de input más oscuro que la superficie */
  --input-border: #cbd5e1;  /* Borde Slate 300 - Mucho más visible */
  --input-focus: #2563eb;
  
  --text-main: #0f172a;     /* Slate 900 */
  --text-muted: #1e293b;    /* Slate 800 - Más oscuro */
  --text-dim: #475569;      /* Slate 600 - Más oscuro */
}

/* Sidebar adaptativa al tema */
[data-theme='light'] .sidebar {
  background: #ffffff;
  border-right: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 4px 0 20px rgba(15, 23, 42, 0.03);
}

[data-theme='light'] .nav-link:hover {
  background: #f1f5f9;
}

[data-theme='light'] .nav-link.active {
  background: rgba(37, 99, 235, 0.08);
}

[data-theme='light'] .user-profile {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

[data-theme='light'] .user-profile:hover {
  background: #f1f5f9;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--text-main);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font-body);
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

/* Fix for standard select dropdown options in dark theme */
select option {
  background-color: var(--surface-color);
  color: var(--text-main);
  padding: 8px;
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
}

[data-theme='light'] .glass-panel {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.glass-card {
  background: var(--surface-color);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

[data-theme='light'] .glass-card {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme='light'] .glass-card:hover {
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.15);
}

/* Utilities */
.text-gradient {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Forms - Global High Contrast System */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

[data-theme='light'] .form-group label {
  color: var(--text-muted); /* Más oscuro en modo día */
}

.form-input, .form-select, .form-textarea {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  outline: none;
  width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  background: var(--surface-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-input::-moz-placeholder {
  color: var(--text-dim);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
  color: #fff;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-smooth);
  box-shadow: 0 4px 15px var(--primary-glow);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
  filter: brightness(1.1);
}

.btn-ai {
  background: linear-gradient(135deg, var(--ai-color), #c084fc);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px var(--ai-glow);
}

.btn-ai:hover {
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-main);
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

[data-theme='light'] .btn-outline {
  border-color: rgba(15, 23, 42, 0.15);
  background: rgba(255, 255, 255, 0.7);
}

[data-theme='light'] .btn-outline:hover {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.3);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

/* Layout System */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 2rem;
  transition: padding var(--transition-smooth);
}

/* Confirm Modal Styling */
.confirm-modal {
  max-width: 400px;
  text-align: center;
  padding: 2.5rem;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.confirm-icon-container {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.confirm-icon-container .text-error {
  color: #ef4444;
  filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.4));
}

.confirm-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

.confirm-message {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.confirm-footer {
  display: flex !important;
  gap: 12px;
  justify-content: center !important;
  border: none !important;
  padding: 0 !important;
}

.btn-danger {
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 500;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
  transition: all var(--transition-smooth);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
  filter: brightness(1.1);
}

/* Global Action Icons */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--transition-smooth);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-icon.delete:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  width: 100%;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

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

.dropdown-item.delete {
  color: #ef4444;
}

.dropdown-item.delete:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.25);
}

[data-theme='dark'] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}
[data-theme='dark'] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Base animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn var(--transition-smooth) forwards;
}

/* Global Responsive Adjustments */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive table {
  min-width: 600px; /* Force scroll on small screens */
}

@media (max-width: 1024px) {
  .grid-3, .metrics-grid, .ventas-stats, .finanzas-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .charts-grid, .bottom-grid, .invoice-footer-grid {
    grid-template-columns: 1fr !important;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .toolbar .search-bar {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 1rem;
  }
  
  .grid-3, .metrics-grid, .ventas-stats, .finanzas-stats, .accounting-summary {
    grid-template-columns: 1fr !important;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
  
  /* Modal responsive */
  .modal-overlay {
    padding: 0.5rem;
  }
  .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 95vh !important;
    border-radius: var(--radius-md) !important;
  }
  
  .form-row, .form-grid {
    flex-direction: column;
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  
  .inventario-header, .clientes-header, .ventas-header, .finanzas-header, .dashboard-header, .recordatorios-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .header-actions, .flex-center.gap-3, .flex-center.gap-2 {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  
  .btn-primary, .btn-outline, .btn-ai {
    width: 100%;
    justify-content: center;
  }
  
  .table-responsive {
    margin: 0 -1rem;
    width: calc(100% + 2rem);
    border-radius: 0;
  }
  
  .crm-table th, .crm-table td {
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 0.75rem;
  }
  
  .stat-card {
    padding: 1rem;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
}

/* Mobile Card Tables */
@media (max-width: 768px) {
  .table-responsive {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  
  .crm-table, .gastos-table, .oi-table, .finance-table, .purchases-table, .inv-table, .quote-table, .admin-table {
    display: block;
    width: 100%;
  }
  
  .crm-table thead, .gastos-table thead, .oi-table thead, .finance-table thead, .purchases-table thead, .inv-table thead, .quote-table thead, .admin-table thead {
    display: none;
  }
  
  .crm-table tbody, .gastos-table tbody, .oi-table tbody, .finance-table tbody, .purchases-table tbody, .inv-table tbody, .quote-table tbody, .admin-table tbody {
    display: block;
    width: 100%;
  }
  
  .crm-table tr, .gastos-table tr, .oi-table tr, .finance-table tr, .purchases-table tr, .inv-table tr, .quote-table tr, .admin-table tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    background: var(--surface-color);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  }
  
  .crm-table td, .gastos-table td, .oi-table td, .finance-table td, .purchases-table td, .inv-table td, .quote-table td, .admin-table td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.8rem 0 !important;
    border-bottom: 1px dashed var(--panel-border-soft) !important;
    text-align: right;
    min-height: auto;
  }
  
  .crm-table td:last-child, .gastos-table td:last-child, .oi-table td:last-child, .finance-table td:last-child, .purchases-table td:last-child, .inv-table td:last-child, .quote-table td:last-child, .admin-table td:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    padding-top: 1rem !important;
    margin-top: 0.5rem;
    border-top: 1px solid var(--panel-border) !important;
    justify-content: flex-end !important; 
    gap: 0.5rem;
  }
  
  .crm-table td::before, .gastos-table td::before, .oi-table td::before, .finance-table td::before, .purchases-table td::before, .inv-table td::before, .quote-table td::before, .admin-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 1rem;
    flex-shrink: 0;
  }
  
  .crm-table td > div, .gastos-table td > div, .oi-table td > div, .finance-table td > div {
    justify-content: flex-end;
    text-align: right;
  }
}
.selection\:bg-white *::-moz-selection {
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
}
.selection\:bg-white *::selection {
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
}
.selection\:text-black *::-moz-selection {
  --tw-text-opacity: 1;
  color: rgb(0 0 0 / var(--tw-text-opacity, 1));
}
.selection\:text-black *::selection {
  --tw-text-opacity: 1;
  color: rgb(0 0 0 / var(--tw-text-opacity, 1));
}
.selection\:bg-white::-moz-selection {
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
}
.selection\:bg-white::selection {
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
}
.selection\:text-black::-moz-selection {
  --tw-text-opacity: 1;
  color: rgb(0 0 0 / var(--tw-text-opacity, 1));
}
.selection\:text-black::selection {
  --tw-text-opacity: 1;
  color: rgb(0 0 0 / var(--tw-text-opacity, 1));
}
.hover\:scale-105:hover {
  --tw-scale-x: 1.05;
  --tw-scale-y: 1.05;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.hover\:scale-110:hover {
  --tw-scale-x: 1.1;
  --tw-scale-y: 1.1;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.hover\:border-gray-600:hover {
  --tw-border-opacity: 1;
  border-color: rgb(75 85 99 / var(--tw-border-opacity, 1));
}
.hover\:border-white\/20:hover {
  border-color: rgb(255 255 255 / 0.2);
}
.hover\:border-white\/40:hover {
  border-color: rgb(255 255 255 / 0.4);
}
.hover\:bg-gray-100:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
}
.hover\:bg-gray-700:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1));
}
.hover\:bg-gray-800:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));
}
.hover\:bg-gray-800\/50:hover {
  background-color: rgb(31 41 55 / 0.5);
}
.hover\:bg-white\/20:hover {
  background-color: rgb(255 255 255 / 0.2);
}
.hover\:bg-white\/5:hover {
  background-color: rgb(255 255 255 / 0.05);
}
.hover\:bg-white\/90:hover {
  background-color: rgb(255 255 255 / 0.9);
}
.hover\:font-medium:hover {
  font-weight: 500;
}
.hover\:font-semibold:hover {
  font-weight: 600;
}
.hover\:text-white:hover {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
.hover\:text-white\/70:hover {
  color: rgb(255 255 255 / 0.7);
}
.focus-visible\:outline-none:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.focus-visible\:ring-2:focus-visible {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.focus-visible\:ring-offset-2:focus-visible {
  --tw-ring-offset-width: 2px;
}
.active\:scale-95:active {
  --tw-scale-x: .95;
  --tw-scale-y: .95;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.disabled\:pointer-events-none:disabled {
  pointer-events: none;
}
.disabled\:opacity-50:disabled {
  opacity: 0.5;
}
.group:hover .group-hover\:-translate-x-1 {
  --tw-translate-x: -0.25rem;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.group:hover .group-hover\:translate-y-\[-5px\] {
  --tw-translate-y: -5px;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.group:hover .group-hover\:scale-105 {
  --tw-scale-x: 1.05;
  --tw-scale-y: 1.05;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.group:hover .group-hover\:border-white\/20 {
  border-color: rgb(255 255 255 / 0.2);
}
.group:hover .group-hover\:shadow-\[0_20px_40px_rgba\(0\2c 0\2c 0\2c 0\.5\)\] {
  --tw-shadow: 0 20px 40px rgba(0,0,0,0.5);
  --tw-shadow-colored: 0 20px 40px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.group:hover .group-hover\:grayscale-0 {
  --tw-grayscale: grayscale(0);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.group:hover .group-hover\:\[animation-play-state\:paused\] {
  animation-play-state: paused;
}
@media (min-width: 640px) {

  .sm\:h-10 {
    height: 2.5rem;
  }

  .sm\:h-16 {
    height: 4rem;
  }

  .sm\:h-28 {
    height: 7rem;
  }

  .sm\:w-10 {
    width: 2.5rem;
  }

  .sm\:w-14 {
    width: 3.5rem;
  }

  .sm\:w-16 {
    width: 4rem;
  }
}
@media (min-width: 768px) {

  .md\:flex {
    display: flex;
  }

  .md\:hidden {
    display: none;
  }

  .md\:h-14 {
    height: 3.5rem;
  }

  .md\:h-24 {
    height: 6rem;
  }

  .md\:h-36 {
    height: 9rem;
  }

  .md\:h-\[460px\] {
    height: 460px;
  }

  .md\:w-14 {
    width: 3.5rem;
  }

  .md\:w-20 {
    width: 5rem;
  }

  .md\:w-24 {
    width: 6rem;
  }

  .md\:w-\[460px\] {
    width: 460px;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .md\:flex-row {
    flex-direction: row;
  }

  .md\:items-center {
    align-items: center;
  }

  .md\:justify-between {
    justify-content: space-between;
  }

  .md\:gap-1 {
    gap: 0.25rem;
  }

  .md\:py-24 {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .md\:pb-24 {
    padding-bottom: 6rem;
  }

  .md\:text-left {
    text-align: left;
  }

  .md\:text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }

  .md\:text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }

  .md\:text-5xl {
    font-size: 3rem;
    line-height: 1;
  }

  .md\:text-6xl {
    font-size: 3.75rem;
    line-height: 1;
  }

  .md\:text-base {
    font-size: 1rem;
    line-height: 1.5rem;
  }
}
@media (min-width: 1024px) {

  .lg\:order-1 {
    order: 1;
  }

  .lg\:order-2 {
    order: 2;
  }

  .lg\:max-w-xs {
    max-width: 20rem;
  }

  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .lg\:flex-row {
    flex-direction: row;
  }

  .lg\:gap-20 {
    gap: 5rem;
  }

  .lg\:px-0 {
    padding-left: 0px;
    padding-right: 0px;
  }

  .lg\:text-6xl {
    font-size: 3.75rem;
    line-height: 1;
  }
}
