/* Modern Admin Panel Styles */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --secondary: #10b981;
  --danger: #dc2626;
  --warning: #f59e0b;
  --success: #10b981;
  --bg: #f8fafc;
  --bg-dark: #1e293b;
  --bg-darker: #0f172a;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --card: #ffffff;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
}

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

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

/* Navigation */
.navbar {
  background: var(--bg-darker);
  color: white;
  padding: 1rem 0;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand a {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

.nav-subtitle {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-left: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  color: #cbd5e1;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  font-size: 0.9375rem;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-links a.active {
  background: var(--primary);
  color: white;
}

.nav-links a.logout {
  color: #f87171;
}

.nav-links a.logout:hover {
  background: rgba(248, 113, 113, 0.1);
}

.nav-links .icon {
  font-size: 1.125rem;
}

/* Main Content */
.main-content {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}

.stat-card.success {
  border-left-color: var(--success);
}

.stat-card.warning {
  border-left-color: var(--warning);
}

.stat-card.danger {
  border-left-color: var(--danger);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  background: var(--primary);
  color: white;
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--text-light);
}

.btn-secondary:hover {
  background: #475569;
}

.btn-success {
  background: var(--success);
}

.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: var(--danger);
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-warning {
  background: var(--warning);
}

.btn-warning:hover {
  background: #d97706;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Recipe Grid */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.recipe-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid var(--border);
}

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

.recipe-card.featured {
  border: 2px solid var(--warning);
  background: #fffbeb;
}

.recipe-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--border);
}

.recipe-image-placeholder {
  width: 100%;
  height: 200px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 3rem;
}

.recipe-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 1.25rem;
}

.recipe-image-container {
  position: relative;
}

.recipe-content {
  padding: 1.25rem;
}

.recipe-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.recipe-description {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.recipe-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-light);
}

.recipe-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.recipe-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.recipe-status.approved {
  background: #d1fae5;
  color: #065f46;
}

.recipe-status.rejected {
  background: #fee2e2;
  color: #991b1b;
}

.recipe-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Posts Feed */
.posts-feed {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.post-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
}

.post-user-info {
  flex: 1;
}

.post-username {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.post-date {
  font-size: 0.875rem;
  color: var(--text-light);
}

.post-visibility {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--border);
  color: var(--text-light);
}

.post-visibility.public {
  background: #dbeafe;
  color: #1e40af;
}

.post-body {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--text);
}

.post-media {
  margin: 1rem 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.post-media img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}

.post-media video {
  width: 100%;
  max-height: 400px;
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin-top: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
}

thead {
  background: var(--bg-dark);
  color: white;
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  padding: 1rem;
  border-top: 1px solid var(--border);
}

tbody tr:hover {
  background: #f8fafc;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

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

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  border-left: 4px solid;
}

.alert-success {
  background: #d1fae5;
  border-color: var(--success);
  color: #065f46;
}

.alert-error {
  background: #fee2e2;
  border-color: var(--danger);
  color: #991b1b;
}

.alert-info {
  background: #dbeafe;
  border-color: var(--primary);
  color: #1e40af;
}

/* Filters */
.filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.filter-btn:hover {
  background: var(--bg);
}

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

/* Footer */
.footer {
  background: var(--bg-dark);
  color: #cbd5e1;
  padding: 2rem;
  margin-top: 4rem;
  text-align: center;
}

/* Loading */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-light);
}

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

.empty-state-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.empty-state-text {
  font-size: 1rem;
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    flex-direction: column;
  }

  .main-content {
    padding: 0 1rem;
  }

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

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

