/* ==========================================
   NebulaX Shop Pages stylesheet
   ========================================== */

/* Variables and design system integration */
:root {
  --color-gold: #f59e0b;
  --color-indigo: #6366f1;
  --color-cyan: #06b6d4;
  --color-green: #10b981;
  --color-red: #ef4444;
  --color-gray: #9ca3af;
  --bg-card: rgba(26, 10, 48, 0.45);
  --border-card: rgba(139, 92, 246, 0.15);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.shop-container {
  width: 100%;
  max-width: 1200px;
  margin: 120px auto 80px;
  padding: 0 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

.footer {
  margin-top: auto;
}

.shop-title-section {
  text-align: center;
  margin-bottom: 40px;
}

.shop-title-section h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphism card utility */
.glass-card {
  background: rgba(13, 6, 26, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(139, 92, 246, 0.15);
}

/* Pack Selection (commander.html) */
.pack-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 35px;
}

.pack-select-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pack-select-row:hover {
  border-color: rgba(139, 92, 246, 0.25);
  background: rgba(255, 255, 255, 0.03);
}

.pack-select-row.active {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.06);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.1);
}

.pack-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.pack-select-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: white;
}

.pack-select-features {
  font-size: 0.85rem;
  color: #9ca3af;
}

.pack-select-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #c4b5fd;
}

@media (max-width: 480px) {
  .pack-select-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 16px;
  }
  .pack-select-price {
    align-self: flex-end;
    font-size: 1.4rem;
  }
}

/* Form Styles */
.shop-form {
  max-width: 800px;
  margin: 0 auto;
}

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

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: #9ca3af;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 11px 14px;
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
  background: rgba(255, 255, 255, 0.04);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  margin: 20px 0;
}

.form-checkbox input {
  margin-top: 3px;
  accent-color: #8b5cf6;
}

.form-checkbox span {
  font-size: 0.85rem;
  color: #9ca3af;
  line-height: 1.5;
}

.submit-btn-container {
  text-align: center;
  margin-top: 25px;
}

.btn-shop-pay {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.btn-shop-pay:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-shop-pay:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
}

.btn-shop-pay:active {
  transform: translateY(0);
}

/* Tracking / Progress Bar (suivi.html) */
.tracking-wrapper {
  max-width: 800px;
  margin: 0 auto 30px;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 40px;
  padding: 0 40px;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 40px;
  right: 40px;
  height: 4px;
  background: rgba(139, 92, 246, 0.15);
  z-index: 1;
}

.progress-line-fill {
  position: absolute;
  top: 20px;
  left: 40px;
  height: 4px;
  background: #8b5cf6;
  z-index: 2;
  transition: width 0.5s ease-in-out;
  width: 0%;
}

.step-node {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1e113a;
  border: 2px solid rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray);
  font-weight: 600;
  transition: all 0.3s ease;
}

.step-node.active .step-icon {
  border-color: #8b5cf6;
  background: #8b5cf6;
  color: white;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.step-node.completed .step-icon {
  border-color: var(--color-green);
  background: var(--color-green);
  color: white;
}

.step-label {
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-gray);
}

.step-node.active .step-label {
  color: white;
  font-weight: 600;
}

.step-node.completed .step-label {
  color: var(--color-green);
}

/* Chat Section */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 450px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 30px;
}

.chat-header {
  padding: 16px 20px;
  background: rgba(26, 10, 48, 0.6);
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #c4b5fd;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-header .status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-green);
  box-shadow: 0 0 8px var(--color-green);
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chat-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 12px;
  line-height: 1.5;
  font-size: 0.95rem;
  word-break: break-word;
}

.chat-bubble.admin {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f3e8ff;
  border-top-left-radius: 2px;
}

.chat-bubble.client {
  align-self: flex-end;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  color: white;
  border-top-right-radius: 2px;
}

.chat-time {
  display: block;
  font-size: 0.75rem;
  margin-top: 6px;
  opacity: 0.6;
  text-align: right;
}

.chat-input-area {
  padding: 16px;
  background: rgba(26, 10, 48, 0.6);
  border-top: 1px solid rgba(139, 92, 246, 0.15);
  display: flex;
  gap: 12px;
}

.chat-input-area input {
  flex: 1;
}

.btn-chat-send {
  background: #8b5cf6;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.btn-chat-send:hover {
  background: #7c3aed;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--color-gold);
}

.badge-in-progress {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--color-indigo);
}

.badge-delivered {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--color-green);
}

.badge-cancelled {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--color-red);
}

/* Admin Dashboard Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background-color: #080311;
  color: #f3e8ff;
  font-family: 'Inter', sans-serif;
}

.admin-sidebar {
  width: 250px;
  background: #0d061a;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 35px;
  box-sizing: border-box;
}

.admin-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-logo img {
  width: 28px;
  height: 28px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #9ca3af;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.25s ease;
  cursor: pointer;
  font-size: 0.95rem;
}

.admin-nav-item:hover, .admin-nav-item.active {
  color: white;
  background: rgba(139, 92, 246, 0.08);
}

.admin-nav-item.active {
  color: #c4b5fd;
  border-left: 2px solid #8b5cf6;
  border-radius: 0 8px 8px 0;
  font-weight: 600;
}

.admin-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-user img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.3);
  object-fit: cover;
  background-color: rgba(255, 255, 255, 0.03);
}

.admin-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.admin-user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.admin-user-role {
  font-size: 0.75rem;
  color: #ef4444;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.admin-user-role:hover {
  opacity: 0.8;
}

.admin-main {
  flex: 1;
  padding: 40px 50px;
  overflow-y: auto;
  box-sizing: border-box;
}

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

.admin-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.5px;
}

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

.stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 24px;
  box-shadow: none;
  transition: border-color 0.3s;
}

.stat-card:hover {
  border-color: rgba(139, 92, 246, 0.15);
  box-shadow: none;
}

.stat-card-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #9ca3af;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-card-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

/* Orders Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.admin-table th {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #9ca3af;
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 16px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.95rem;
  color: #e2d8f0;
}

.admin-table tr {
  transition: background 0.2s;
  cursor: pointer;
}

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

/* Password View Helper */
.password-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-toggle-pw {
  background: none;
  border: none;
  color: #8b5cf6;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  font-weight: 500;
  transition: color 0.2s;
}

.btn-toggle-pw:hover {
  color: #a78bfa;
}

.admin-actions-group {
  display: flex;
  gap: 10px;
}

.btn-action {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
  border: none;
  text-align: center;
  transition: all 0.2s;
}

.btn-action-primary {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.btn-action-primary:hover {
  background: #8b5cf6;
  color: white;
  border-color: #8b5cf6;
}

.btn-action-success {
  background: rgba(16, 185, 129, 0.15);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-action-success:hover {
  background: var(--color-green);
  color: white;
  border-color: var(--color-green);
}

.btn-action-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-action-danger:hover {
  background: var(--color-red);
  color: white;
  border-color: var(--color-red);
}

/* Discord Login Screen */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 50%, #15082d 0%, #06020c 100%);
  position: relative;
  overflow: hidden;
}

.login-screen::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}

.login-card {
  max-width: 420px;
  text-align: center;
  padding: 45px 35px;
  background: rgba(13, 6, 26, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 92, 246, 0.05);
  position: relative;
  z-index: 2;
}

.login-card h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-card p {
  color: #9ca3af;
  margin-bottom: 30px;
  line-height: 1.6;
  font-size: 0.95rem;
}

.btn-discord-login {
  background: #5865F2;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 15px 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
  width: 100%;
  box-sizing: border-box;
}

.btn-discord-login:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.5), 0 0 30px rgba(88, 101, 242, 0.2);
}

.btn-discord-login:active {
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
}

/* Steps Indicator and Multi-step Form */
.steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 35px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.step-indicator-item {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.4;
  transition: all 0.3s ease;
}

.step-indicator-item.active {
  opacity: 1;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  color: #9ca3af;
  transition: all 0.3s ease;
}

.step-indicator-item.active .step-num {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: white;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.step-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: #c4b5fd;
  transition: all 0.3s ease;
}

.step-indicator-item.active .step-text {
  color: white;
  font-weight: 600;
}

.step-indicator-line {
  flex: 0 0 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.step-actions-group {
  display: flex;
  gap: 12px;
  margin-top: 25px;
}

.btn-shop-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #9ca3af;
  border-radius: 6px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-shop-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  color: white;
  border-color: rgba(255, 255, 255, 0.1);
}

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

/* Two-column checkout grid */
.checkout-layout-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 30px;
  align-items: start;
}

.checkout-main-form {
  width: 100%;
}

.checkout-sidebar {
  width: 100%;
  position: sticky;
  top: 100px;
}

@media (max-width: 768px) {
  .checkout-layout-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .checkout-sidebar {
    position: static;
  }
}

/* Hide number input spinners (arrows) */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

/* Info list details styling (Admin & Tracking) */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  color: #9ca3af;
  font-size: 0.95rem;
}

.info-value {
  font-family: 'Inter', sans-serif;
  color: white;
  font-weight: 500;
  font-size: 0.95rem;
  text-align: right;
}
