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

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.headerLeft {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.headerActions {
  display: flex;
  gap: 12px;
}

.title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary, #f8fafc);
  margin: 0;
}

.subtitle {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.addButton {
  padding: 10px 20px;
  background: var(--color-primary-accent);
  color: #0f172a;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.addButton:hover {
  background: #6cd2ff;
}

.addButton:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.secondaryButton {
  padding: 10px 20px;
  background: transparent;
  color: var(--color-primary-accent);
  border: 1px solid var(--color-primary-accent);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.secondaryButton:hover {
  background: rgba(56, 189, 248, 0.1);
}

/* Error message */
.error {
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #dc2626;
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.error button {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
}

/* Modal */
.modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: white;
  border-radius: 8px;
  width: 500px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e0e0e0;
}

.modalHeader h2 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.closeButton {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.closeButton:hover {
  color: #333;
}

/* Form */
.form {
  padding: 24px;
}

.formGroup {
  margin-bottom: 16px;
}

.formGroup label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
}

.formGroup input[type='text'],
.formGroup select,
.formGroup textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  background: #fff;
  transition: border-color 0.2s;
}

.formGroup input:focus,
.formGroup select:focus,
.formGroup textarea:focus {
  outline: none;
  border-color: var(--color-primary-accent);
}

.formActions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
}

.cancelButton {
  padding: 10px 20px;
  background: white;
  color: #333;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.cancelButton:hover {
  background: #f5f5f5;
  border-color: #999;
}

.submitButton {
  padding: 10px 20px;
  background: var(--color-primary-accent);
  color: #0f172a;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.submitButton:hover {
  background: #6cd2ff;
}

.submitButton:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Category list in modal */
.categoryList {
  padding: 16px 24px 24px;
  border-top: 1px solid #e0e0e0;
}

.categoryList h3 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin: 0 0 12px;
}

.categoryListItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.categoryListItem:last-child {
  border-bottom: none;
}

.categoryListName {
  font-size: 14px;
  color: #333;
}

.categoryListCount {
  font-size: 12px;
  color: #666;
  margin-left: 8px;
}

.categoryListActions {
  display: flex;
  gap: 8px;
}

/* Category Filter Tabs */
.categoryFilter {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.categoryButton {
  padding: 8px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  background: white;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.categoryButton:hover {
  border-color: var(--color-primary-accent);
  color: var(--color-primary-accent);
}

.categoryButton.active {
  background: var(--color-primary-accent);
  border-color: var(--color-primary-accent);
  color: #0f172a;
}

/* Loading State */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  gap: 12px;
  color: #666;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e0e0e0;
  border-top-color: var(--color-primary-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Empty State */
.emptyState {
  text-align: center;
  padding: 48px;
  color: #666;
}

.emptyState .addButton {
  margin-top: 16px;
}

/* Guide Grid */
.guideGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.guideCard {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.guideCard:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.guideCardInfo {
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
}

.guideTitle {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 8px;
}

.guideMeta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.guideCategory {
  font-size: 12px;
  color: #666;
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 4px;
}

.guideStatus {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.guideStatus.draft {
  background: #fef3c7;
  color: #92400e;
}

.guideStatus.published {
  background: #d1fae5;
  color: #065f46;
}

.guideSlug {
  font-size: 12px;
  color: #999;
  margin: 0;
  font-family: monospace;
}

.guideCardActions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
}

.editButton {
  flex: 1;
  padding: 8px 12px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  text-align: center;
}

.editButton:hover {
  background: #e0e0e0;
}

.deleteButton {
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  font-size: 13px;
  color: #dc2626;
  cursor: pointer;
  transition: all 0.2s;
}

.deleteButton:hover {
  background: #fee2e2;
}

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