/*
 * BizPro — Component Styles
 * File: assets/css/components.css
 */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-size: 1rem;
  font-weight: var(--font-weight-medium);
  line-height: 1.5;
  text-align: center;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn--primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: white;
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--secondary:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn--sm {
  padding: 6px 16px;
  font-size: 0.9rem;
}

.btn--lg {
  padding: 14px 28px;
  font-size: 1.1rem;
}

.btn--full-width {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Forms */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-group--inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.form-control {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

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

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.link-sm {
  font-size: 0.9rem;
  color: var(--color-primary);
}

/* Alerts */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
}

.alert--info {
  background: rgba(52, 152, 219, 0.1);
  border: 1px solid rgba(52, 152, 219, 0.3);
  color: #2C3E50;
}

.alert--success {
  background: rgba(39, 174, 96, 0.1);
  border: 1px solid rgba(39, 174, 96, 0.3);
  color: #2C3E50;
}

.alert--error {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: #C0392B;
}

.alert--warning {
  background: rgba(243, 156, 18, 0.1);
  border: 1px solid rgba(243, 156, 18, 0.3);
  color: #2C3E50;
}

/* Cards */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-border-light);
}

.card-body {
  padding: var(--space-lg);
}

.card-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--color-border-light);
  background: var(--color-bg-alt);
}

/* Stats Cards */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.stat-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

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

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.feature-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-normal);
}

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

.feature-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.feature-card h3 {
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.feature-card p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.feature-link {
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
}

/* Hero Section */
.hero {
  padding: var(--space-3xl) 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
  color: white;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: var(--space-2xl);
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

/* Sections */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: var(--space-2xl);
}

.features-overview,
.stats-section,
.cta-section {
  padding: var(--space-3xl) 0;
}

.stats-section {
  background: var(--color-bg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2xl);
}

.stats-grid .stat-card {
  flex-direction: column;
  text-align: center;
}

.stats-grid .stat-number {
  font-size: 2.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.cta-section {
  background: linear-gradient(135deg, #20B2AA 0%, #16857E 100%);
  color: white;
  text-align: center;
}

.cta-title {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  color: white;
}

.cta-subtitle {
  font-size: 1.25rem;
  margin-bottom: var(--space-xl);
  opacity: 0.9;
}

/* Dashboard Layout */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
  min-height: calc(100vh - var(--header-height) - 200px);
}

.dashboard-sidebar {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  height: fit-content;
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-fast);
}

.sidebar-nav .nav-item:hover,
.sidebar-nav .nav-item.active {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.dashboard-content {
  min-width: 0;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.dashboard-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--space-xl);
}

.widget {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-border-light);
}

.widget-header h2 {
  font-size: 1.25rem;
  margin: 0;
}

.widget-body {
  padding: var(--space-lg);
}

/* Auth Pages */
.auth-container {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) 0;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.auth-header h1 {
  margin-bottom: var(--space-sm);
}

.auth-header p {
  color: var(--color-text-muted);
  margin: 0;
}

.auth-form {
  margin-bottom: var(--space-lg);
}

.auth-footer {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border-light);
}

@media (max-width: 1024px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
  }

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