/* Component-based CSS for refactored site */
/* @version 1.0.0 */

/* ========== Component Styles ========== */

/* Badge Component */
.badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(212,175,55,.08);
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}

.badge.inline {
  border-radius: 8px;
}

/* KPI Component */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 18px;
  max-width: 660px;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  box-shadow: var(--shadow);
  text-align: center;
}

.kpi .num {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 2px;
  color: var(--primary);
}

/* Feature Grid */
.grid.features {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 14px;
}

.feature-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,.8);
}

/* FAQ Component */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-container h3 {
  color: var(--primary);
  margin-bottom: 8px;
}

.faq-container p {
  margin-bottom: 0;
}

.faq-container hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* Testimonial Component */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.testimonial-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}

.testimonial-card .rating {
  margin-bottom: 12px;
}

.testimonial-card .star {
  color: var(--primary);
  font-size: 18px;
}

.testimonial-text {
  font-style: italic;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.testimonial-author strong {
  color: var(--text);
}

.testimonial-author span {
  color: var(--muted);
  font-size: 14px;
}

/* Alert Component */
.alert {
  padding: 12px 16px;
  background: rgba(212,175,55,.10);
  border-left: 4px solid var(--primary);
  color: var(--muted);
  border-radius: 4px;
}

/* Button Group */
.cta {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* ========== Form Components ========== */

/* Form Field Component */
.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 600;
}

.form-field .required {
  color: var(--error, #dc3545);
  margin-left: 4px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  background: var(--input-bg, #1a1a1a);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

.form-control.error {
  border-color: var(--error, #dc3545);
}

.form-error {
  color: var(--error, #dc3545);
  font-size: 13px;
  margin-top: 6px;
}

.form-help {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

/* Auth Layout */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow);
}

.auth-logo {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo img {
  height: 60px;
  width: 200px;
  object-fit: cover;
}

.auth-title {
  text-align: center;
  margin-bottom: 10px;
  color: var(--primary);
}

.auth-content .lead {
  text-align: center;
  color: var(--muted);
  margin-bottom: 30px;
}

.form-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

/* ========== Member Layout ========== */

.member-layout {
  display: flex;
  min-height: 100vh;
}

.member-sidebar {
  width: 260px;
  background: var(--sidebar-bg, #0a0a0a);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  width: 100%;
  height: 40px;
  object-fit: contain;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 0;
}

.nav-item {
  display: block;
  padding: 12px 20px;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.nav-item:hover {
  color: var(--primary);
  background: rgba(212,175,55,0.05);
}

.nav-item.active {
  color: var(--primary);
  background: rgba(212,175,55,0.1);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
}

.user-info {
  margin-bottom: 15px;
}

.user-name {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 4px;
}

.user-email {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.logout-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

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

.member-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.member-header {
  padding: 20px 30px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.member-header h1 {
  margin: 0;
  font-size: 24px;
  color: var(--primary);
}

.member-content {
  padding: 30px;
  flex: 1;
  overflow-y: auto;
}

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

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.stat-icon {
  font-size: 32px;
}

.stat-value {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* Data Table */
.table-wrapper {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.data-table thead {
  background: rgba(212,175,55,0.05);
  border-bottom: 2px solid var(--border);
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.data-table tbody tr:hover {
  background: rgba(212,175,55,0.03);
}

.data-table .actions {
  text-align: right;
}

.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.pricing-card.featured {
  border-color: var(--primary);
  transform: scale(1.05);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #000;
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.pricing-title {
  text-align: center;
  color: var(--primary);
  margin-bottom: 20px;
}

.pricing-price {
  text-align: center;
  margin-bottom: 20px;
}

.pricing-price .currency {
  font-size: 20px;
  color: var(--muted);
  vertical-align: top;
}

.pricing-price .amount {
  font-size: 48px;
  font-weight: 900;
  color: var(--text);
}

.pricing-price .period {
  font-size: 16px;
  color: var(--muted);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 30px 0;
}

.pricing-features li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--text);
}

.pricing-features .feature-icon {
  color: var(--primary);
  margin-right: 10px;
}

/* Responsive */
@media (max-width: 820px) {
  .kpis {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials {
    grid-template-columns: 1fr;
  }

  .member-sidebar {
    display: none;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

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

  .badges {
    justify-content: center;
  }

  .cta {
    flex-direction: column;
    align-items: stretch;
  }

  .cta .btn {
    text-align: center;
    width: 100%;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}