:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #f5f6fb;
  color: #222;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

.dashboard-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.dashboard-header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 1.5rem;
  color: #222;
}

.header-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-link {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #666;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: #f5f6fb;
  color: #222;
}

.nav-link.active {
  color: #3365ff;
  font-weight: 600;
}

/* Main Content */
.dashboard-main {
  flex: 1;
  padding: 2rem;
}

.dashboard-content {
  max-width: 1200px;
  margin: 0 auto;
}

.dashboard-header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.dashboard-header-section h2 {
  margin: 0;
  font-size: 1.75rem;
  color: #222;
}

.primary {
  padding: 0.75rem 1.5rem;
  background: #3365ff;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s ease;
  font-family: inherit;
}

.primary:hover {
  background: #2551e6;
}

/* Loading */
.loading {
  text-align: center;
  padding: 3rem;
  color: #666;
}

/* Error Message */
.error-message {
  background: #fee;
  color: #c33;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.error-message.hidden {
  display: none;
}

/* Businesses Grid */
.businesses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.business-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.business-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.business-card-hero {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.business-card-header {
  margin-bottom: 0.5rem;
}

.business-card-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.business-card-name {
  margin: 0;
  font-size: 1.25rem;
  color: #222;
  font-weight: 600;
}

.business-card-category {
  color: #666;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.business-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.business-card-actions button,
.business-card-actions a {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #d7d7dc;
  background: #fff;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  color: #666;
  transition: all 0.2s ease;
  font-family: inherit;
}

.business-card-actions button:hover,
.business-card-actions a:hover {
  background: #f5f6fb;
  border-color: #bbb;
  color: #222;
}

.business-card-actions .primary {
  background: #3365ff;
  color: #fff;
  border-color: #3365ff;
}

.business-card-actions .primary:hover {
  background: #2551e6;
}

/* QR Code Button in Header */
.qr-btn-header {
  padding: 0.375rem;
  border: 1px solid #d7d7dc;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}

.qr-btn-header:hover {
  background: #f5f6fb;
  border-color: #bbb;
  color: #222;
}

.qr-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}

/* QR Code Modal */
.qr-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.qr-modal.hidden {
  display: none;
}

.qr-modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.qr-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.qr-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #222;
}

.qr-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  line-height: 1;
}

.qr-modal-close:hover {
  background: #f5f6fb;
  color: #222;
}

.qr-modal-body {
  padding: 1.5rem;
  text-align: center;
}

#qr-canvas {
  max-width: 100%;
  height: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.qr-modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.qr-modal-actions button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.qr-modal-actions .primary {
  background: #3365ff;
  color: #fff;
}

.qr-modal-actions .primary:hover {
  background: #2551e6;
}

.qr-modal-actions .secondary {
  background: #f5f6fb;
  color: #666;
  border: 1px solid #d7d7dc;
}

.qr-modal-actions .secondary:hover {
  background: #e8e9ed;
  color: #222;
}

.qr-url-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d7d7dc;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #f9f9f9;
  color: #666;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .qr-modal-content {
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }

  .qr-modal-actions {
    flex-direction: column;
  }

  .qr-modal-actions button {
    width: 100%;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state.hidden {
  display: none;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  color: #222;
}

.empty-state p {
  margin: 0 0 2rem 0;
  color: #666;
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-main {
    padding: 1rem;
  }

  .header-content {
    padding: 0 1rem;
    flex-direction: column;
    gap: 1rem;
  }

  .dashboard-header-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

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

