/* Dark Mode Modern Styling */

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

/* Improve touch scrolling on mobile */
html {
  -webkit-overflow-scrolling: touch;
  -webkit-tap-highlight-color: transparent;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #8b5cf6;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border: #334155;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --error: #dc2626;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Login Page */
.login-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-container {
  max-width: 420px;
  width: 100%;
}

.login-box {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-accent {
  color: #667eea;
  -webkit-text-fill-color: #667eea;
}

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

.login-form {
  margin-top: 30px;
}

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

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

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-container {
  padding: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

.btn-secondary:hover {
  background: #475569;
}

.btn-login {
  width: 100%;
  margin-top: 10px;
}

.login-footer {
  margin-top: 20px;
  text-align: center;
}

.register-link {
  display: block;
  margin-top: 15px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.register-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--error);
  color: var(--error);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
}

/* Credentials Box */
.credentials-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-top: 15px;
}

.credentials-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.3);
}

.credentials-header h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.credentials-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.credential-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 8px;
}

.credential-label {
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 80px;
}

.credential-value {
  flex: 1;
  font-family: 'Courier New', monospace;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text-primary);
  font-weight: 600;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}

.btn-icon:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  color: var(--text-primary);
}

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

.btn-regenerate {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
}

.btn-regenerate:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.badge-active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border: 1px solid var(--success);
}

/* Auto-refresh indicator */
.auto-refresh-indicator {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 768px) {
  .auto-refresh-indicator {
    font-size: 0.75rem;
  }
}

/* Mobile adjustments for action buttons */
@media (max-width: 768px) {
  .action-buttons {
    flex-direction: column;
  }
  
  .action-buttons .btn-small {
    width: 100%;
    margin-bottom: 5px;
  }
  
  .data-table th:last-child,
  .data-table td:last-child {
    min-width: 120px;
  }
  
  /* Mobile notification adjustments */
  .notification-content {
    flex-direction: column;
    gap: 15px;
  }
  
  .notification-icon {
    font-size: 2rem;
  }
  
  .notification-text {
    font-size: 1rem;
    text-align: center;
  }
  
  .notification-text strong {
    font-size: 1.2rem;
  }
  
  .notification-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
  }
}

/* Trade Notification Banner */
.trade-notification {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  padding: 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
  animation: slideDown 0.4s ease-out;
}

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

.notification-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.notification-icon {
  font-size: 2.5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.notification-text {
  flex: 1;
  font-size: 1.2rem;
  line-height: 1.6;
}

.notification-text strong {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.notification-close {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
  padding: 0;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Navbar */
.navbar {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-top: 0;
  transition: margin-top 0.3s;
}

/* Adjust navbar when notification is shown */
body:has(.trade-notification[style*="display: block"]) .navbar {
  margin-top: 90px;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-username {
  color: var(--text-primary);
  font-weight: 600;
}

.btn-logout {
  background: var(--bg-hover);
  color: var(--text-primary);
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: #475569;
}

/* Main Content */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* Mobile adjustments for main content */
@media (max-width: 768px) {
  .main-content {
    padding: 15px 10px;
  }
}

.dashboard {
  width: 100%;
}

.dashboard-header {
  margin-bottom: 40px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  padding: 30px;
  border-radius: 16px;
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.dashboard-header h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

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

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-card);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.2s;
}

.stat-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 2.5rem;
}

.stat-info h3 {
  font-size: 2rem;
  margin-bottom: 4px;
}

.stat-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.stat-card-warning {
  border-color: var(--warning);
}

/* Dashboard Sections */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 30px;
}

.dashboard-section {
  background: var(--bg-card);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-section h3 {
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.user-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.user-dashboard-grid .dashboard-section {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.user-dashboard-grid .dashboard-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.user-dashboard-grid .dashboard-section:hover {
  transform: translateY(-5px);
  border-color: #6366f1;
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.user-dashboard-grid .dashboard-section:hover::before {
  opacity: 1;
}

.user-dashboard-grid .dashboard-section h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.4rem;
  font-weight: 700;
}

.credits-display {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  backdrop-filter: blur(10px);
}

.credits-label {
  color: var(--text-muted);
}

.credits-amount {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.credits-highlight {
  color: var(--primary);
  font-weight: 700;
}

.credits-display-small {
  color: var(--text-muted);
  margin-top: 10px;
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin-bottom: 20px;
}

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

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

.data-table th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 15px;
  border-bottom: 1px solid var(--border);
}

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

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

/* Badges */
.badge {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.badge:hover {
  transform: scale(1.05);
}

.badge-credits {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
  color: #10b981;
  border: 1px solid #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.badge-pending {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
  color: #f59e0b;
  border: 1px solid #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.badge-approved, .badge-active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
  color: #10b981;
  border: 1px solid #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.badge-completed {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid #3b82f6;
}

.badge-out-of-stock {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
  color: #ef4444;
  border: 1px solid #ef4444;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.badge-denied {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
  color: #ef4444;
  border: 1px solid #ef4444;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

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

.badge-processing {
  background: rgba(139, 92, 246, 0.2);
  color: #8b5cf6;
  border: 1px solid #8b5cf6;
}

/* Quick Items */
.quick-items {
  display: grid;
  gap: 15px;
  margin-bottom: 25px;
}

/* Quick item styling with gradient text */
.quick-item h4 {
  margin-bottom: 5px;
  font-weight: 600;
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.quick-item .item-cost {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.quick-item {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: all 0.2s;
}

.quick-item:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateX(5px);
}

.offer-section {
  margin: 20px 0;
}

.offer-section p {
  padding: 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-radius: 10px;
  margin-bottom: 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  border: 1px solid rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(10px);
}


/* List Items */
.list-container {
  max-height: 400px;
  overflow-y: auto;
}

.list-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
  padding: 15px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: all 0.2s;
}

.list-item:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateX(5px);
}

.list-item-info h4 {
  margin-bottom: 4px;
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.list-item-actions {
  display: flex;
  gap: 10px;
}

/* Catalog */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

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

.catalog-item:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.catalog-item-image {
  width: 100%;
  height: 200px;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.catalog-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-image {
  font-size: 5rem;
}

.catalog-item-info {
  padding: 20px;
}

.catalog-item-info h3 {
  margin-bottom: 8px;
}

.item-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.catalog-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.catalog-item-info .item-cost {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 1.1rem;
}

.item-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  overflow: auto;
}

.modal-content {
  background-color: var(--bg-card);
  margin: 10% auto;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  border: 1px solid var(--border);
}

.close {
  color: var(--text-muted);
  float: right;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: var(--text-primary);
}

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

.catalog-header h2 {
  font-size: 2rem;
  margin-top: 8px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--primary-dark);
}

.breadcrumb span {
  color: var(--text-muted);
}

/* Admin Preview Banner */
.admin-preview-banner {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
  color: white;
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.admin-preview-banner p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.admin-preview-banner .btn {
  font-size: 0.9rem;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.admin-preview-banner .btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Footer */
.footer {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-top: 1px solid var(--border);
  padding: 30px 0;
  text-align: center;
  margin-top: 80px;
  backdrop-filter: blur(10px);
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive */
/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* General adjustments */
  body {
    font-size: 0.95rem;
  }
  
  /* Navbar mobile styles */
  .nav-container {
    flex-direction: column;
    gap: 15px;
  }
  
  .nav-links {
    flex-direction: column;
    width: 100%;
  }
  
  .nav-link {
    padding: 12px;
    width: 100%;
    text-align: center;
  }
  
  /* Login and Registration pages */
  .login-box {
    padding: 30px 20px;
  }
  
  .login-logo {
    font-size: 2rem;
  }
  
  .form-input {
    font-size: 1rem;
    padding: 14px 16px;
  }
  
  /* Grids - single column */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .dashboard-grid,
  .user-dashboard-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  /* Tables - horizontal scroll on mobile */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .data-table {
    min-width: 600px;
    font-size: 0.9rem;
  }
  
  .data-table th,
  .data-table td {
    padding: 10px 8px;
  }
  
  /* Dashboard sections */
  .dashboard-section {
    padding: 20px 15px;
  }
  
  .dashboard-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }
  
  /* Dashboard header */
  .dashboard-header h2 {
    font-size: 1.5rem;
  }
  
  .credits-display {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
  }
  
  /* Buttons - full width on mobile */
  .btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
  }
  
  .btn-small {
    width: 100%;
  }
  
  /* Form rows - stack on mobile */
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  /* Credentials box */
  .credentials-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .credentials-header h4 {
    font-size: 1rem;
  }
  
  .credential-item {
    flex-wrap: wrap;
  }
  
  .credential-label {
    min-width: 100%;
    margin-bottom: 5px;
  }
  
  /* List items */
  .list-item {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .list-item-info,
  .list-item-actions {
    width: 100%;
  }
  
  /* Catalog card adjustments */
  .catalog-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .catalog-header h2 {
    font-size: 1.5rem;
  }
  
  /* Stat cards */
  .stat-card {
    padding: 20px;
  }
  
  .stat-icon {
    font-size: 2.5rem;
  }
  
  /* Modal */
  .modal-content {
    margin: 10% auto;
    padding: 25px 20px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  /* Breadcrumb */
  .breadcrumb {
    flex-wrap: wrap;
  }
  
  /* Admin preview banner */
  .admin-preview-banner {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  /* Quick items */
  .quick-items {
    flex-direction: column;
  }
  
  /* Small text adjustments */
  .text-muted {
    font-size: 0.85rem;
  }
  
  /* Fix touch targets - minimum 44x44px */
  .btn-icon {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Make all clickable elements easier to tap */
  .nav-link,
  .btn,
  .quick-item,
  .list-item {
    cursor: pointer;
  }
  
  /* Improve text readability on small screens */
  .text-muted {
    line-height: 1.6;
  }
  
  /* Ensure proper spacing on mobile */
  .dashboard {
    padding: 15px 10px;
  }
  
  .dashboard-header {
    margin-bottom: 20px;
  }
  
  /* Input focus states for mobile */
  .form-input:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .login-box {
    padding: 25px 15px;
  }
  
  .login-logo {
    font-size: 1.8rem;
  }
  
  .dashboard-section {
    padding: 15px 10px;
  }
  
  .dashboard-header h2 {
    font-size: 1.3rem;
  }
  
  .data-table {
    font-size: 0.85rem;
  }
  
  .credential-value {
    font-size: 0.9rem;
  }
  
  /* Even smaller text for very small screens */
  .login-box {
    margin: 10px;
  }
  
  .login-subtitle {
    font-size: 0.85rem;
  }
  
  /* Compact tables */
  .data-table th,
  .data-table td {
    padding: 8px 6px;
  }
}

/* Landscape mobile orientation */
@media (max-width: 896px) and (orientation: landscape) {
  .login-container {
    padding: 10px;
  }
  
  .login-box {
    padding: 20px;
  }
  
  .dashboard {
    padding: 10px;
  }
}

/* Prevent text size adjustment on iOS */
@media screen and (max-width: 768px) {
  input,
  textarea,
  select,
  button {
    font-size: 16px !important;
  }
}

