/* ============================================
   ProManage Hosting - Front-end Styles
   Brand Colors:
   - Purple/Navy: #282f4f
   - Teal: #2c9497
   - Dark Teal: #18817D
   - Button: #333C49
   ============================================ */

/* === CSS Variables === */
:root {
  /* Brand Colors */
  --primary-color: #2c9497;
  --secondary-color: #282f4f;
  --accent-color: #18817d;
  --btn-bg: #2c9497;
  --btn-dark: #333C49;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --bg-light: #f0f2f5;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;

  /* Bootstrap Overrides */
  --bs-primary: #2c9497;
  --bs-primary-rgb: 44, 148, 151;
  --bs-secondary: #282f4f;
  --bs-secondary-rgb: 40, 47, 79;
  --bs-link-color: #2c9497;
  --bs-link-hover-color: #18817d;

  /* Layout */
  --container-width: 1200px;
  --spacing-base: 1rem;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

/* === Reset & Base === */
body {
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-light);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-color);
}

/* === Bootstrap Overrides === */

/* Primary Button */
.btn-primary {
  background-color: var(--btn-bg) !important;
  border-color: var(--btn-bg) !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  box-shadow: 0 4px 12px rgba(44, 148, 151, 0.35) !important;
}

/* Outline Primary Button */
.btn-outline-primary {
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #fff !important;
}

/* Secondary Button */
.btn-secondary {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
}

.btn-secondary:hover {
  background-color: #1e2440 !important;
  border-color: #1e2440 !important;
}

/* Dark Button */
.btn-dark {
  background-color: var(--btn-dark) !important;
  border-color: var(--btn-dark) !important;
}

/* Text Colors */
.text-primary {
  color: var(--primary-color) !important;
}

.text-secondary {
  color: var(--text-secondary) !important;
}

/* Background */
.bg-primary {
  background-color: var(--primary-color) !important;
}

/* Badges */
.badge.bg-primary {
  background-color: var(--primary-color) !important;
}

/* Links */
a.text-primary:hover {
  color: var(--accent-color) !important;
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(44, 148, 151, 0.25);
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Pagination */
.page-link {
  color: var(--primary-color);
}

.page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Nav Tabs & Pills */
.nav-link.active {
  color: var(--primary-color) !important;
}

.nav-pills .nav-link.active {
  background-color: var(--primary-color);
  color: #fff !important;
}

/* Progress Bar */
.progress-bar {
  background-color: var(--primary-color);
}

/* Alerts */
.alert-primary {
  background-color: rgba(44, 148, 151, 0.1);
  border-color: rgba(44, 148, 151, 0.2);
  color: var(--accent-color);
}

/* Cards */
.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-shadow:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg) !important;
}

/* === Navbar === */
.navbar {
  background-color: var(--bg-white);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  padding: 0.75rem 0;
  z-index: 1050;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color) !important;
}

/* === Hero Section === */
.hero {
  background: linear-gradient(135deg, #282f4f 0%, #1a1e32 60%, #2c9497 100%);
  color: white;
  text-align: center;
  padding: 7rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle, rgba(44,148,151,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  position: relative;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.85;
  max-width: 700px;
  margin: 0 auto 2rem;
  position: relative;
}

/* === Pricing / Plans Section === */
.pricing-section {
  padding: 4rem 0;
  background-color: var(--bg-light);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.pricing-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  border: 1px solid var(--border-color);
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.popular,
.card.border-primary {
  border: 2px solid var(--primary-color) !important;
}

.badge-popular {
  background-color: var(--primary-color);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 20px;
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  font-weight: 600;
}

.plan-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 1rem 0;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  text-align: left;
}

.plan-features li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.check-icon {
  color: var(--accent-color);
}

/* === Features Section === */
#features .p-4 {
  transition: transform 0.3s ease;
}

#features .p-4:hover {
  transform: translateY(-4px);
}

#features .bg-light {
  background-color: rgba(44, 148, 151, 0.08) !important;
}

#features .text-primary {
  color: var(--primary-color) !important;
}

/* === Footer === */
footer {
  background-color: var(--secondary-color) !important;
  color: white;
  padding: 4rem 0 2rem;
}

.footer-logo {
  filter: brightness(0) invert(1);
}

footer a {
  color: rgba(255,255,255,0.75) !important;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #fff !important;
}

footer h5,
footer h6 {
  color: #fff !important;
}

footer p,
footer .text-muted {
  color: rgba(255,255,255,0.6) !important;
}

footer .btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

/* === Form Styles === */
.form-group {
  margin-bottom: 1.5rem;
}

.form-control {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* === Checkout Page === */
.checkout-container {
  max-width: 600px;
  margin: 3rem auto;
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* === Customer Auth Pages === */
.auth-card {
  max-width: 480px;
  margin: 3rem auto;
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.auth-card h2 {
  color: var(--secondary-color);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* === Customer Dashboard === */
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary-color);
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(44, 148, 151, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.stat-card h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin: 0;
}

.stat-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

/* === Status Badges === */
.badge-status {
  padding: 0.35em 0.75em;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-active,
.badge-paid {
  background-color: rgba(44, 148, 151, 0.12);
  color: #18817d;
}

.badge-pending {
  background-color: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.badge-cancelled,
.badge-failed {
  background-color: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.badge-expired {
  background-color: rgba(107, 114, 128, 0.12);
  color: #6b7280;
}

/* === Tables === */
.table thead th {
  background-color: var(--secondary-color);
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  padding: 0.85rem 1rem;
  border: none;
}

.table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  font-size: 0.9rem;
}

.table-hover tbody tr:hover {
  background-color: rgba(44, 148, 151, 0.04);
}

/* === Utility Classes === */
.transition-all {
  transition: all 0.3s ease;
}

.gradient-primary {
  background: linear-gradient(135deg, #282f4f, #2c9497);
}

.gradient-text {
  background: linear-gradient(135deg, #282f4f, #2c9497);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.border-primary {
  border-color: var(--primary-color) !important;
}

/* === SweetAlert2 Overrides === */
.swal2-confirm {
  background-color: var(--primary-color) !important;
  border: none !important;
}

.swal2-confirm:hover {
  background-color: var(--accent-color) !important;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* === Responsive === */
@media (max-width: 768px) {
  .hero {
    padding: 5rem 1rem 3rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .auth-card {
    margin: 1.5rem;
    padding: 1.5rem;
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 1.75rem;
  }
  .stat-card {
    padding: 1rem;
  }
  .stat-card h3 {
    font-size: 1.5rem;
  }
}
