/* Admin Panel Styles */
* {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

.admin-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  min-height: 100vh;
  background: 
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    var(--background);
}

.admin-header {
  background: 
    radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(99, 102, 241, 0.1) 0%, transparent 60%),
    var(--surface);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: var(--radius-md);
  padding: 0.25rem;
}

.admin-logo-link:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.6));
}

.admin-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(245,158,11,0.45));
}

.admin-brand h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.admin-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.admin-nav-btn {
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.admin-nav-btn:hover,
.admin-nav-btn.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.admin-nav-btn:last-child {
  background: rgba(236, 72, 153, 0.1);
  border-color: rgba(236, 72, 153, 0.2);
  color: #f472b6;
}

.admin-nav-btn:last-child:hover {
  background: rgba(236, 72, 153, 0.2);
  border-color: rgba(236, 72, 153, 0.4);
}

.admin-tab {
  display: none;
  padding: 2rem;
}

.admin-tab.active {
  display: block;
}

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

.stat-card {
  background: 
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    var(--surface-alt);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.stat-card[style*="cursor: pointer"] {
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 20px rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.stat-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card span {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-light);
  line-height: 1;
}

/* Admin Chat Interface */
.admin-chat-container {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 1.5rem;
  height: calc(100vh - 200px);
  min-height: 600px;
}

.chat-sidebar {
  background: 
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
    var(--surface-alt);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(59, 130, 246, 0.02);
}

.chat-sidebar-header h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.chat-status-filter {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.4rem 0.8rem;
  background: transparent;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--text);
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.chat-list::-webkit-scrollbar {
  width: 6px;
}

.chat-list::-webkit-scrollbar-track {
  background: rgba(59, 130, 246, 0.1);
  border-radius: 3px;
}

.chat-list::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: 3px;
}

.chat-item {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.chat-item:hover {
  background: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.2);
}

.chat-item.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.chat-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.chat-item-name {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
}

.chat-item-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat-item-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-item-status {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

.chat-item-status.waiting {
  background: rgba(59, 130, 246, 0.2);
  color: var(--primary-light);
}

.chat-item-status.active {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.chat-item-status.resolved {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.admin-chat-window {
  background: 
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    var(--surface-alt);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-chat-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(59, 130, 246, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.chat-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: white;
}

.chat-user-details h4 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.chat-user-details p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.chat-actions {
  display: flex;
  gap: 0.5rem;
}

.chat-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.chat-action-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--text);
}

.chat-action-btn#resolve-chat:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.chat-action-btn#escalate-chat:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--primary-light);
}

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

.admin-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.admin-chat-messages::-webkit-scrollbar-track {
  background: rgba(59, 130, 246, 0.1);
  border-radius: 3px;
}

.admin-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: 3px;
}

.no-chat-selected {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 1.1rem;
  text-align: center;
}

.admin-message {
  display: flex;
  gap: 0.75rem;
  animation: fadeInUp 0.3s ease;
}

.admin-message.user {
  flex-direction: row-reverse;
}

.admin-message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.admin-message.support .admin-message-avatar {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.admin-message.user .admin-message-avatar {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.8), rgba(99, 102, 241, 0.6));
  color: white;
}

.admin-message-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-message.user .admin-message-content {
  align-items: flex-end;
}

.admin-message-text {
  background: rgba(59, 130, 246, 0.1);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(59, 130, 246, 0.2);
  max-width: 400px;
  word-wrap: break-word;
  line-height: 1.4;
}

.admin-message.user .admin-message-text {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.1));
  border-color: rgba(99, 102, 241, 0.3);
}

.admin-message-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.admin-message.user .admin-message-time {
  text-align: right;
}

.admin-chat-input-container {
  padding: 1.5rem;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(59, 130, 246, 0.02);
}

.admin-chat-input-wrapper {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

#admin-chat-input {
  flex: 1;
  background: rgba(13, 16, 24, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text);
  font: inherit;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  line-height: 1.4;
}

#admin-chat-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#admin-chat-input::placeholder {
  color: var(--text-muted);
}

.admin-chat-send {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
}

.admin-chat-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.admin-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.admin-chat-footer {
  text-align: center;
}

.quick-responses {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.quick-response {
  padding: 0.4rem 0.8rem;
  background: transparent;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-response:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--text);
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
  .admin-chat-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  
  .chat-sidebar {
    height: 200px;
  }
  
  .chat-list {
    max-height: 150px;
  }
}

@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .admin-nav {
    width: 100%;
    justify-content: center;
  }
  
  .admin-nav-btn {
    flex: 1;
    text-align: center;
  }
  
  .admin-tab {
    padding: 1rem;
  }
  
  .admin-stats {
    grid-template-columns: 1fr;
  }
}

/* Login Section */
.admin-login-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  padding: 2rem;
}


.admin-login-card {
  background: 
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    var(--surface);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 3rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 
    var(--shadow-lg), 
    0 0 40px rgba(59, 130, 246, 0.15),
    0 0 80px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  animation: fadeInUp 0.6s ease;
}

.admin-login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.admin-login-logo {
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.4));
  margin-bottom: 1rem;
}

.admin-login-header h2 {
  color: var(--primary-light);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.admin-login-header p {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
}

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

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

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

.form-group input {
  background: rgba(13, 16, 24, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--text);
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: rgba(13, 16, 24, 0.9);
}

.admin-login-btn {
  margin-top: 0.5rem;
}

.admin-login-btn svg {
  transition: transform 0.2s ease;
}

.admin-login-btn:hover svg {
  transform: translateX(2px);
}

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

@media (max-width: 768px) {
  .admin-login-card {
    padding: 2rem;
    margin: 1rem;
  }
}

/* User Management Styles */
.user-list {
  margin-top: var(--space-6);
  overflow-x: auto;
  width: 100%;
}

.user-list table {
  width: auto;
  min-width: 100%;
}

/* Filter Styles */
.user-filters {
  margin-bottom: var(--space-6);
}

.filter-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  align-items: flex-end;
  padding: var(--space-4);
  background: linear-gradient(135deg, #0b1120 0%, #0c1426 25%, #0f1a30 50%, #1e3a8a 75%, #1e40af 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(59, 130, 246, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.filter-group.filter-actions {
  grid-column: 1 / -1;
  align-items: flex-start;
}

.filter-group label {
  color: #d1d5db;
  font-size: var(--font-size-sm);
  font-weight: 500;
}

/* Filter inputs inherit global select styles, but with smaller padding for compact layout */
.filter-select {
  padding: var(--space-2) var(--space-3);
  padding-right: var(--space-8);
  font-size: var(--font-size-sm);
  background-position: right var(--space-2) center;
}

.filter-input {
  padding: var(--space-2) var(--space-3);
  background: rgba(9, 17, 34, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-md);
  color: #e5e7eb;
  font-size: var(--font-size-sm);
  transition: all 0.3s ease;
}

.filter-select:hover {
  background-position: right var(--space-2) center;
}

.filter-select:focus {
  background-position: right var(--space-2) center;
}

.filter-input:hover {
  background: rgba(9, 17, 34, 0.9);
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.filter-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 0 20px rgba(59, 130, 246, 0.1);
  background: rgba(9, 17, 34, 0.95);
  color: #3b82f6;
}

.filter-actions {
  min-width: auto;
  flex: 0 0 auto;
}

.filter-btn {
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-md);
  color: var(--gray-300);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.clear-btn {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.filter-btn.clear-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

@media (max-width: 768px) {
  .filter-container {
    grid-template-columns: 1fr;
  }
  
  .filter-group {
    width: 100%;
    min-width: auto;
  }
  
  .filter-group.filter-actions {
    grid-column: 1;
  }
  
  .filter-btn {
    width: 100%;
  }
}

.users-table {
  width: auto;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(9, 17, 34, 0.8);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  table-layout: auto;
}

.users-table thead {
  background: rgba(59, 130, 246, 0.1);
  border-bottom: 2px solid rgba(59, 130, 246, 0.3);
}

.users-table thead tr:first-child th:first-child {
  border-top-left-radius: var(--radius-lg);
}

.users-table thead tr:first-child th:last-child {
  border-top-right-radius: var(--radius-lg);
}

.users-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-lg);
}

.users-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-lg);
}

.users-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 600;
  color: var(--primary);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  width: auto;
}

.users-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--gray-300);
  font-size: var(--font-size-sm);
  white-space: nowrap;
  width: auto;
}

.users-table tbody tr {
  transition: all 0.3s ease;
}

.users-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

.user-info-compact {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.user-avatar-small {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: var(--gray-800);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--font-size-sm);
}

.user-name {
  color: var(--white);
  font-weight: 500;
}

.role-select,
.plan-select {
  padding: var(--space-1) var(--space-2);
  padding-right: var(--space-8);
  background: rgba(9, 17, 34, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-md);
  color: #e5e7eb;
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffc443' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-2) center;
  background-size: 12px;
}

.plan-select:hover {
  background: rgba(9, 17, 34, 0.9);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffc443' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-2) center;
  background-size: 12px;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.plan-select:focus {
  outline: none;
  background: rgba(9, 17, 34, 0.95);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffc443' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-2) center;
  background-size: 12px;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 0 20px rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.plan-select option {
  background: #0b1120;
  color: #e5e7eb;
  padding: var(--space-2);
  border: none;
}

.plan-select option:hover,
.plan-select option:checked {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.status-badge {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-active {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-expired {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-free {
  background: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

.trial-badge {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: 500;
  white-space: nowrap;
}

.trial-badge.used {
  background: rgba(59, 130, 246, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.trial-badge.available {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.discord-badge {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: 500;
  white-space: nowrap;
}

.discord-badge.connected {
  background: rgba(88, 101, 242, 0.2);
  color: #5865F2;
  border: 1px solid rgba(88, 101, 242, 0.3);
}

.discord-badge.disconnected {
  background: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

.admin-toggle {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.table-actions {
  display: flex;
  gap: var(--space-2);
}

.icon-btn {
  padding: var(--space-1);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.icon-btn.edit-btn {
  color: var(--primary);
  border-color: rgba(59, 130, 246, 0.3);
}

.icon-btn.edit-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
}

.icon-btn.delete-btn {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.icon-btn.delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
}

.edit-menu-container {
  position: relative;
  display: inline-block;
}

.edit-menu {
  position: fixed;
  background: rgba(20, 20, 30, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  min-width: 180px;
  padding: var(--space-1);
  margin-top: 0;
  display: flex;
  flex-direction: column;
}

.edit-menu-item {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--gray-300);
  font-size: var(--font-size-sm);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.edit-menu-item:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
}

.hwid-display {
  color: var(--gray-400);
  font-size: var(--font-size-sm);
  font-family: 'Courier New', monospace;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.ip-display {
  color: var(--gray-400);
  font-size: var(--font-size-sm);
  font-family: 'Courier New', monospace;
}

.text-danger {
  color: #ef4444 !important;
  font-weight: 600;
}

.no-users, .error {
  text-align: center;
  color: var(--gray-400);
  font-style: italic;
  padding: var(--space-8);
}

.error {
  color: #ef4444;
}

@media (max-width: 1024px) {
  .users-table {
    font-size: var(--font-size-xs);
  }
  
  .users-table th,
  .users-table td {
    padding: var(--space-2);
  }
}

/* Pagination Styles */
.pagination-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-6);
  padding: var(--space-4);
  background: rgba(9, 17, 34, 0.5);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(59, 130, 246, 0.2);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.pagination-info label {
  color: var(--gray-300);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

/* Items per page select inherits global select styles with smaller padding */
.items-per-page-select {
  padding: var(--space-2) var(--space-3);
  padding-right: var(--space-8);
  font-size: var(--font-size-sm);
  background-position: right var(--space-2) center;
}

.items-per-page-select:hover {
  background-position: right var(--space-2) center;
}

.items-per-page-select:focus {
  background-position: right var(--space-2) center;
}

.pagination-info-text {
  color: var(--gray-400);
  font-size: var(--font-size-sm);
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.pagination-btn {
  padding: var(--space-2) var(--space-3);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-md);
  color: var(--gray-300);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 36px;
  text-align: center;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--gray-800);
  font-weight: 700;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.pagination-ellipsis {
  padding: var(--space-2) var(--space-2);
  color: var(--gray-500);
  font-size: var(--font-size-sm);
}

@media (max-width: 768px) {
  .pagination-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .pagination-info {
    justify-content: space-between;
    width: 100%;
  }
  
  .pagination-nav {
    justify-content: center;
    width: 100%;
  }
  
  .pagination-btn {
    min-width: 32px;
    padding: var(--space-1) var(--space-2);
    font-size: var(--font-size-xs);
  }
}

/* iOS-Style Notification System */
#notification-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 90%;
  width: 420px;
}

.notification {
  background: rgba(20, 20, 30, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  pointer-events: auto;
  transform: translateY(-120px);
  opacity: 0;
  animation: slideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  min-height: 60px;
}

.notification.removing {
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes slideDown {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideUp {
  to {
    transform: translateY(-120px);
    opacity: 0;
  }
}

.notification-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  margin-top: 2px;
}

.notification-icon.success {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.notification-icon.error {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.notification-icon.warning {
  background: rgba(59, 130, 246, 0.2);
  color: #f59e0b;
}

.notification-icon.info {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.notification-icon.question {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
}

.notification-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification-title {
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
}

.notification-message {
  color: var(--gray-300);
  font-size: 14px;
  line-height: 1.5;
}

.notification-input {
  width: 100%;
  padding: 10px 12px;
  margin-top: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: white;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.notification-input:focus {
  border-color: var(--primary-color);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.notification-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.notification-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.notification-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notification-btn.primary {
  background: var(--primary);
  color: var(--gray-800);
}

.notification-btn.primary:hover {
  background: #60a5fa;
  transform: scale(1.05);
}

.notification-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.notification-btn.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.notification-btn.danger:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: scale(1.05);
}

.notification-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}
