/* ===== FastPass Admin Theme - Dark Purple ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --fp-purple-50: #f5f3ff;
  --fp-purple-100: #ede9fe;
  --fp-purple-200: #ddd6fe;
  --fp-purple-300: #c4b5fd;
  --fp-purple-400: #a78bfa;
  --fp-purple-500: #8b5cf6;
  --fp-purple-600: #7c3aed;
  --fp-purple-700: #6d28d9;
  --fp-purple-800: #5b21b6;
  --fp-purple-900: #4c1d95;
  
  --fp-dark-900: #0f0f12;
  --fp-dark-800: #1a1a23;
  --fp-dark-700: #23232f;
  --fp-dark-600: #2d2d3a;
  --fp-dark-500: #3d3d4e;
  
  --fp-bg: #f8f9fc;
  --fp-card: #ffffff;
  --fp-border: #e5e7eb;
  --fp-text: #1f2937;
  --fp-text-muted: #6b7280;
  
  --fp-success: #10b981;
  --fp-warning: #f59e0b;
  --fp-danger: #ef4444;
  --fp-info: #3b82f6;
  
  --sidebar-width: 260px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--fp-bg);
  color: var(--fp-text);
  font-size: 14px;
  line-height: 1.5;
}

/* ===== Layout ===== */
.fastpass-app {
  display: flex;
  min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--fp-dark-900) 0%, var(--fp-dark-800) 100%);
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--fp-dark-600);
}

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

.sidebar-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--fp-purple-500) 0%, var(--fp-purple-700) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo .logo-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.sidebar-logo .logo-text {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.sidebar-logo .logo-text span {
  color: var(--fp-purple-400);
}

.sidebar-menu {
  padding: 20px 12px;
  flex: 1;
  overflow-y: auto;
}

.menu-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--fp-dark-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 12px;
  margin-bottom: 8px;
  margin-top: 20px;
}

.menu-label:first-child {
  margin-top: 0;
}

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

.nav-item {
  margin-bottom: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #9ca3af;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.nav-link:hover {
  background: var(--fp-dark-700);
  color: #fff;
}

.nav-link.active {
  background: linear-gradient(135deg, var(--fp-purple-600) 0%, var(--fp-purple-700) 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-link .badge {
  margin-left: auto;
  background: var(--fp-purple-600);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== Topbar ===== */
.topbar {
  background: var(--fp-card);
  border-bottom: 1px solid var(--fp-border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--fp-text);
  margin: 0;
}

.search-box {
  position: relative;
  width: 320px;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 1px solid var(--fp-border);
  border-radius: 10px;
  font-size: 14px;
  background: var(--fp-bg);
  transition: all 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--fp-purple-400);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--fp-text-muted);
}

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

.topbar-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--fp-border);
  background: var(--fp-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.topbar-btn:hover {
  background: var(--fp-bg);
  border-color: var(--fp-purple-300);
}

.topbar-btn svg {
  width: 20px;
  height: 20px;
  color: var(--fp-text-muted);
}

.topbar-btn .notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--fp-danger);
  border-radius: 50%;
  border: 2px solid var(--fp-card);
}

.user-dropdown {
  position: relative;
}

.user-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--fp-border);
  border-radius: 50px;
  background: var(--fp-card);
  cursor: pointer;
  transition: all 0.2s;
}

.user-toggle:hover {
  border-color: var(--fp-purple-300);
  background: var(--fp-bg);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--fp-purple-400) 0%, var(--fp-purple-600) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
}

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

.user-info {
  text-align: left;
}

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

.user-role {
  font-size: 11px;
  color: var(--fp-text-muted);
}

.user-toggle svg {
  width: 16px;
  height: 16px;
  color: var(--fp-text-muted);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--fp-card);
  border: 1px solid var(--fp-border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 8px;
  display: none;
  z-index: 100;
}

.dropdown-menu.show {
  display: block;
}

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

.dropdown-item:hover {
  background: var(--fp-bg);
  color: var(--fp-purple-600);
}

.dropdown-item svg {
  width: 18px;
  height: 18px;
  color: var(--fp-text-muted);
}

.dropdown-divider {
  height: 1px;
  background: var(--fp-border);
  margin: 8px 0;
}

/* ===== Page Content ===== */
.page-content {
  padding: 32px;
  flex: 1;
}

/* ===== Stats Cards ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--fp-card);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--fp-border);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.stat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.purple {
  background: linear-gradient(135deg, var(--fp-purple-100) 0%, var(--fp-purple-200) 100%);
  color: var(--fp-purple-600);
}

.stat-icon.green {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: var(--fp-success);
}

.stat-icon.orange {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: var(--fp-warning);
}

.stat-icon.red {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: var(--fp-danger);
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-menu {
  color: var(--fp-text-muted);
  cursor: pointer;
}

.stat-label {
  font-size: 13px;
  color: var(--fp-text-muted);
  margin-bottom: 4px;
}

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

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 20px;
}

.stat-change.positive {
  background: #d1fae5;
  color: var(--fp-success);
}

.stat-change.negative {
  background: #fee2e2;
  color: var(--fp-danger);
}

.stat-period {
  font-size: 12px;
  color: var(--fp-text-muted);
  margin-left: 8px;
}

/* ===== Cards ===== */
.card {
  background: var(--fp-card);
  border: 1px solid var(--fp-border);
  border-radius: 16px;
  overflow: hidden;
}

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

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fp-text);
  margin: 0;
}

.card-body {
  padding: 24px;
}

/* ===== Tables ===== */
.table-container {
  overflow-x: auto;
}

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

.fp-table thead {
  background: var(--fp-bg);
}

.fp-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--fp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--fp-border);
}

.fp-table td {
  padding: 16px;
  border-bottom: 1px solid var(--fp-border);
  font-size: 14px;
  color: var(--fp-text);
}

.fp-table tbody tr:hover {
  background: var(--fp-purple-50);
}

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

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

.product-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--fp-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.product-info h6 {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 2px 0;
}

.product-info span {
  font-size: 12px;
  color: var(--fp-text-muted);
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  background: #d1fae5;
  color: #059669;
}

.badge-warning {
  background: #fef3c7;
  color: #d97706;
}

.badge-danger {
  background: #fee2e2;
  color: #dc2626;
}

.badge-info {
  background: #dbeafe;
  color: #2563eb;
}

.badge-purple {
  background: var(--fp-purple-100);
  color: var(--fp-purple-700);
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--fp-purple-500) 0%, var(--fp-purple-700) 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--fp-border);
  color: var(--fp-text);
}

.btn-outline:hover {
  border-color: var(--fp-purple-400);
  color: var(--fp-purple-600);
  background: var(--fp-purple-50);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
}

/* ===== Forms ===== */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--fp-text);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--fp-border);
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.2s;
  background: var(--fp-card);
}

.form-control:focus {
  outline: none;
  border-color: var(--fp-purple-400);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

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

/* ===== Tabs ===== */
.nav-tabs-custom {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: var(--fp-bg);
  border-radius: 12px;
  margin-bottom: 24px;
  width: fit-content;
}

.nav-tab {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fp-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.nav-tab:hover {
  color: var(--fp-text);
}

.nav-tab.active {
  background: var(--fp-card);
  color: var(--fp-purple-600);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ===== Action Buttons ===== */
.action-btns {
  display: flex;
  gap: 8px;
}

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--fp-border);
  background: var(--fp-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--fp-text-muted);
}

.action-btn:hover {
  border-color: var(--fp-purple-400);
  color: var(--fp-purple-600);
  background: var(--fp-purple-50);
}

.action-btn.delete:hover {
  border-color: var(--fp-danger);
  color: var(--fp-danger);
  background: #fee2e2;
}

/* ===== Login Page ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--fp-dark-900) 0%, var(--fp-purple-900) 100%);
  padding: 20px;
}

.login-page .fastpass-app {
  display: block;
  min-height: auto;
}

.login-card {
  max-width: 420px;
  width: 100%;
  background: var(--fp-card);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
}

.login-card .logo-box {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--fp-purple-500) 0%, var(--fp-purple-700) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.login-card .logo-box svg {
  width: 36px;
  height: 36px;
  color: #fff;
}

.login-card h2 {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  color: var(--fp-text);
}

.login-card .subtitle {
  text-align: center;
  color: var(--fp-text-muted);
  margin-bottom: 32px;
  font-size: 14px;
}

.login-card .btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 15px;
}

/* ===== Etapas/Steps Page ===== */
.step-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--fp-card);
  border: 1px solid var(--fp-border);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.step-card:hover {
  border-color: var(--fp-purple-300);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.1);
}

.step-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-info {
  flex: 1;
}

.step-info h5 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

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

.step-order {
  font-size: 13px;
  color: var(--fp-text-muted);
  padding: 6px 12px;
  background: var(--fp-bg);
  border-radius: 20px;
}

/* ===== Integration Cards ===== */
.integration-card {
  background: var(--fp-card);
  border: 1px solid var(--fp-border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s;
}

.integration-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.integration-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.integration-card h5 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.integration-card p {
  font-size: 13px;
  color: var(--fp-text-muted);
  margin-bottom: 16px;
}

.integration-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.integration-status.connected {
  color: var(--fp-success);
}

.integration-status.disconnected {
  color: var(--fp-text-muted);
}

/* ===== Settings Page ===== */
.settings-avatar {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
}

.settings-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--fp-purple-200);
}

.settings-avatar .avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--fp-purple-400) 0%, var(--fp-purple-600) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 36px;
  font-weight: 600;
  border: 4px solid var(--fp-purple-200);
}

.settings-avatar .avatar-edit {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  background: var(--fp-purple-600);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  border: 3px solid var(--fp-card);
}

.settings-avatar .avatar-edit svg {
  width: 16px;
  height: 16px;
}

/* ===== Alert Info ===== */
.alert-info-custom {
  background: var(--fp-purple-50);
  border: 1px solid var(--fp-purple-200);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
}

.alert-info-custom svg {
  width: 20px;
  height: 20px;
  color: var(--fp-purple-600);
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-info-custom p {
  margin: 0;
  font-size: 13px;
  color: var(--fp-purple-800);
}

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

@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .topbar {
    padding: 16px 20px;
  }
  
  .page-content {
    padding: 20px;
  }
  
  .search-box {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex !important;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .user-info {
    display: none;
  }
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--fp-border);
  background: var(--fp-card);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-menu-btn svg {
  width: 20px;
  height: 20px;
  color: var(--fp-text);
}

/* ===== Overlay ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.sidebar-overlay.show {
  display: block;
}
