/* ==========================================================================
   HUB & LICENSING SUITE — MODERN SAAS DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Outfit:wght@500;600;700;800;900&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #e0e7ff;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 45px rgba(99, 102, 241, 0.14);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(6, 182, 212, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(236, 72, 153, 0.07) 0%, transparent 50%);
  background-attachment: fixed;
}

/* NAVBAR */
.hub-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding: 16px 0;
}

.hub-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--text-main);
}

.brand-badge {
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
  transition: color 0.2s ease;
}

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

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font-main);
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border: 1.5px solid var(--border-light);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

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

/* HERO SECTION */
.hub-hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #4338ca;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 30px;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 900;
  line-height: 1.15;
  color: #0f172a;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

/* METRICS STATS BAR */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 24px 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 80px;
}

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

.stat-val {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-lbl {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* SECTION TITLES */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.5px;
}

/* FEATURE CARDS */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}

.feat-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.feat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.feat-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
}

.feat-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #1e1b4b;
}

.feat-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* INTERACTIVE LICENSE CHECKER WIDGET */
.checker-wrap {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  border-radius: 24px;
  padding: 48px;
  color: #ffffff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
  margin-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.checker-wrap::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 70%);
  border-radius: 50%;
}

.checker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 868px) {
  .checker-grid {
    grid-template-columns: 1fr;
  }
}

.checker-input-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.checker-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 14px 18px;
  color: #ffffff;
  font-family: monospace;
  font-size: 15px;
  font-weight: 700;
  outline: none;
  transition: all 0.2s ease;
}

.checker-input:focus {
  background: rgba(255, 255, 255, 0.16);
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

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

.checker-result-card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 24px;
  display: none;
}

/* PRICING TIERS */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}

.price-card {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: 24px;
  padding: 36px 28px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
}

.price-card.popular {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
}

.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--accent-pink));
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-amount {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 900;
  color: #0f172a;
  margin: 16px 0 6px;
}

.price-period {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}

.price-features {
  list-style: none;
  margin: 24px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

/* MASTER ADMIN PANEL STYLES */
.admin-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1.5px solid var(--border-light);
}

.admin-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13.5px;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: #f8fafc;
}

/* TOGGLE SWITCH */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 30px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
  background-color: #10b981;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* BADGES */
.badge-active {
  background: #dcfce7;
  color: #15803d;
  font-weight: 800;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-disabled {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 800;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-tier {
  background: #e0e7ff;
  color: #4338ca;
  font-weight: 800;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border-radius: 24px;
  width: 90%;
  max-width: 580px;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-height: 90vh;
  overflow-y: auto;
}

/* FORM CONTROLS */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  font-family: var(--font-main);
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

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

/* TOAST */
.hub-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 14px 22px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  display: none;
  z-index: 2000;
  animation: slideUp 0.3s ease;
}

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