/* OpenWeb Topup Manager - Custom Styles */
/* Inspired by bunny.net's vivid design aesthetic */

:root {
  /* Primary Colors - Blue & Orange palette inspired by bunny.net */
  --primary-blue: #1e40af;
  --primary-blue-light: #3b82f6;
  --primary-blue-dark: #1e3a8a;
  --accent-orange: #f97316;
  --accent-orange-light: #fb923c;
  --accent-orange-dark: #ea580c;
  
  /* Provider Colors */
  --telkom-color: #00a8cc;
  --mtn-color: #ffcc00;
  --vodacom-color: #e60000;
  
  /* Neutral Colors */
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-light: #e5e7eb;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-orange-light) 100%);
  --gradient-text: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-orange) 100%);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Global Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
}

/* Typography */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* Navigation */
.navbar-brand img {
  transition: transform 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: var(--accent-orange-light);
}

/* Buttons */
.btn-primary {
  background: var(--gradient-primary);
  border: none;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: var(--gradient-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:focus, .btn-primary:active {
  background: var(--gradient-primary);
  box-shadow: var(--shadow-md);
}

.cta-button {
  background: var(--gradient-accent);
  border: none;
  font-size: 1.1rem;
  padding: 1rem 2rem;
  border-radius: 1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.cta-button:hover::before {
  left: 100%;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e5e7eb" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.feature-item i {
  font-size: 1.25rem;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  z-index: 2;
}

.floating-card {
  position: relative;
  animation: float 6s ease-in-out infinite;
}

.floating-card img {
  border-radius: 1rem;
  box-shadow: var(--shadow-xl);
}

.stats-overlay {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--bg-white);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 1rem;
}

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

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-blue);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-light);
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* Provider Logos */
.providers-section {
  background: var(--bg-light);
}

.provider-logo {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-white);
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.provider-logo:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.provider-logo img {
  max-height: 40px;
  width: auto;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.provider-logo:hover img {
  filter: grayscale(0%);
}

/* Package Cards */
.packages-section {
  padding: 5rem 0;
}

.category-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--primary-blue);
  display: inline-block;
}

.package-card {
  background: var(--bg-white);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.package-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.package-card.featured {
  border: 2px solid var(--accent-orange);
  position: relative;
}

.package-header {
  padding: 1.5rem 1.5rem 1rem;
  position: relative;
}

.provider-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.provider-badge.telkom {
  background: var(--telkom-color);
  color: white;
}

.provider-badge.mtn {
  background: var(--mtn-color);
  color: black;
}

.provider-badge.vodacom {
  background: var(--vodacom-color);
  color: white;
}

.featured-badge {
  position: absolute;
  top: -5px;
  right: 1rem;
  background: var(--gradient-accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.package-name {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.package-description {
  color: var(--text-light);
  font-size: 0.95rem;
}

.package-body {
  padding: 0 1.5rem 1rem;
}

.price-display {
  text-align: center;
  margin-bottom: 1.5rem;
}

.currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-light);
  vertical-align: top;
}

.amount {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-blue);
  line-height: 1;
}

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

.package-features li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.package-footer {
  padding: 1rem 1.5rem 1.5rem;
}

/* Features Section */
.features-section {
  background: var(--bg-light);
}

.feature-card {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.feature-icon i {
  font-size: 2rem;
  color: white;
}

.feature-card h4 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

/* Checkout Styles */
.checkout-container {
  background: var(--bg-white);
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.package-summary {
  background: var(--bg-light);
  padding: 2rem;
  height: 100%;
}

.package-card-mini {
  background: var(--bg-white);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.features-list {
  margin: 1.5rem 0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.price-breakdown {
  margin-top: 1.5rem;
}

.price-line {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.price-line.total {
  font-size: 1.1rem;
  border-top: 2px solid var(--border-light);
  margin-top: 0.5rem;
  padding-top: 1rem;
}

.checkout-form {
  padding: 2rem;
}

.security-notice {
  background: var(--bg-light);
  border-radius: 0.5rem;
  padding: 1rem;
}

/* Auth Styles */
.auth-card {
  background: var(--bg-white);
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}

.admin-notice {
  border: 1px solid var(--border-light);
}

/* Admin Dashboard */
.stats-card {
  background: var(--bg-white);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stats-icon {
  width: 60px;
  height: 60px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.stats-content h3 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-dark);
}

.stats-content p {
  margin: 0;
  color: var(--text-light);
}

.quick-action-card {
  background: var(--bg-white);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
}

.quick-action-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.action-icon {
  width: 80px;
  height: 80px;
  border-radius: 1rem;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2rem;
}

/* Order Cards */
.order-card {
  background: var(--bg-white);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  overflow: hidden;
}

.order-card:hover {
  box-shadow: var(--shadow-lg);
}

.order-header {
  background: var(--bg-light);
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.order-body {
  padding: 1.5rem;
}

.order-footer {
  padding: 1rem 1.5rem 1.5rem;
  background: var(--bg-light);
}

.package-info {
  background: var(--bg-light);
  border-radius: 0.5rem;
  padding: 1rem;
}

.customer-details h6 {
  color: var(--text-dark);
  font-weight: 600;
  margin-bottom: 1rem;
}

.payment-info {
  background: var(--bg-light);
  border-radius: 0.5rem;
  padding: 1rem;
}

/* Success/Cancel Pages */
.success-card, .cancel-card {
  background: var(--bg-white);
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  padding: 3rem 2rem;
}

.success-icon, .cancel-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.order-summary {
  background: var(--bg-light);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 2rem 0;
}

.order-details {
  text-align: left;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 500;
  color: var(--text-light);
}

.detail-value {
  font-weight: 600;
  color: var(--text-dark);
}

.next-steps {
  background: var(--bg-light);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.steps {
  display: flex;
  justify-content: space-around;
  margin-top: 1rem;
}

.step {
  text-align: center;
  font-size: 0.875rem;
}

.step i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

.support-options {
  background: var(--bg-light);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.support-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

/* Empty States */
.empty-state {
  background: var(--bg-white);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  padding: 3rem 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .hero-features {
    flex-direction: column;
    gap: 1rem;
  }
  
  .stats-overlay {
    position: static;
    margin-top: 1rem;
    justify-content: center;
  }
  
  .steps {
    flex-direction: column;
    gap: 1rem;
  }
  
  .package-card {
    margin-bottom: 2rem;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .package-name {
    font-size: 1.5rem;
  }
  
  .amount {
    font-size: 2.5rem;
  }
  
  .auth-card, .success-card, .cancel-card {
    padding: 2rem 1rem;
  }
}

/* Form Improvements */
.form-control:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

.form-select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

/* Loading States */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
  .navbar, .footer, .btn {
    display: none !important;
  }
  
  .container {
    max-width: none !important;
  }
}
