/* DispatchHub Styles */

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

:root {
  --primary-color: #2563eb;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-color);
}

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

/* Header */
header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  display: flex;
  align-items: center;
}

.logo h1 {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
}

/* Buttons */
.btn-primary, .btn-secondary {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  display: inline-block;
}

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

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

/* Hero Section */
.hero {
  text-align: center;
  padding: 6rem 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero .subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.cta-buttons .btn-primary {
  font-size: 1.1rem;
}

.cta-buttons .btn-secondary {
  background: white;
  color: var(--primary-color);
  border: none;
}

/* Features Section */
.features {
  padding: 4rem 0;
}

.features h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Pricing Section */
.pricing {
  padding: 4rem 0;
  background: var(--card-bg);
}

.pricing h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 1200px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.pricing-card {
  background: var(--bg-color);
  padding: 2rem;
  border-radius: 1rem;
  border: 2px solid var(--border-color);
  text-align: center;
}

.pricing-card.featured {
  border-color: var(--primary-color);
  position: relative;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

.pricing-card .tier-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.pricing-card .price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
}

.pricing-card .price span {
  font-size: 1rem;
  color: var(--text-secondary);
}

.pricing-card .setup-fee {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0.5rem 0 0 0;
}

.pricing-card .quota {
  color: var(--text-secondary);
  margin: 1rem 0;
}

.pricing-card .features {
  text-align: left;
  margin: 2rem 0;
}

.pricing-card .features li {
  margin: 0.5rem 0;
  list-style: none;
}

.pricing-card .features li:before {
  content: "✓ ";
  color: var(--success-color);
  font-weight: bold;
}

.pricing-card button {
  width: 100%;
  margin-top: 1rem;
}

/* Footer */
footer {
  background: var(--text-primary);
  color: white;
  text-align: center;
  padding: 2rem 0;
  margin-top: 4rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 1rem;
  max-width: 400px;
  width: 90%;
  position: relative;
}

.close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.close:hover {
  color: var(--text-primary);
}

.modal-content h2 {
  margin-bottom: 1.5rem;
}

.modal-content input {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
}

.modal-content button[type="submit"] {
  width: 100%;
  margin-top: 0.5rem;
}

.toggle-auth {
  text-align: center;
  margin-top: 1rem;
  color: var(--text-secondary);
}

.toggle-auth a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.error {
  background: #fee2e2;
  color: var(--danger-color);
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

.success {
  background: #d1fae5;
  color: var(--success-color);
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

/* Dashboard Specific Styles */
.dashboard-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card .label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.info-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 1rem 0;
}

.info-card h3 {
  margin-bottom: 1rem;
}

.code-block {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 0.5rem;
  font-family: 'Courier New', monospace;
  overflow-x: auto;
  margin: 1rem 0;
}

.copy-button {
  float: right;
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.copy-button:hover {
  background: #1d4ed8;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

table th, table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

table th {
  background: var(--bg-color);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .pricing-card.featured {
    transform: none;
  }

  .nav-links {
    gap: 1rem;
  }
}
