/* Global Styles */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

/* Article Cards */
.article-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.article-card h2,
.article-card h3 {
  margin-bottom: 0.5rem;
}

.article-card h2 a,
.article-card h3 a {
  color: #333;
  text-decoration: none;
}

.article-card h2 a:hover,
.article-card h3 a:hover {
  color: #0066cc;
}

.article-card .category {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.article-card .meta {
  color: #666;
  font-size: 0.9rem;
}

/* Loading, Error, Empty States */
.loading,
.error,
.empty {
  text-align: center;
  padding: 3rem 1rem;
  background: white;
  border-radius: 8px;
}

.error {
  color: #f44336;
}

/* Dashboard Styles */
.dashboard-overview {
  max-width: 1000px;
}

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

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #ccc;
}

.stat-card.published {
  border-left-color: #4caf50;
}

.stat-card.pending {
  border-left-color: #ff9800;
}

.stat-card.rejected {
  border-left-color: #f44336;
}

.stat-card h3 {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
}

.quick-actions {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
}

.quick-actions h2 {
  margin-bottom: 1rem;
}

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

.action-card {
  background: #f5f5f5;
  padding: 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s;
}

.action-card:hover {
  background: #e0e0e0;
}

.action-card h3 {
  margin-bottom: 0.5rem;
}

.action-card p {
  color: #666;
  font-size: 0.9rem;
}

/* Table Styles */
.article-table,
.review-table {
  width: 100%;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.article-table th,
.article-table td,
.review-table th,
.review-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.article-table th,
.review-table th {
  background: #f5f5f5;
  font-weight: 600;
}

.status-badge {
  display: inline-block;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.rejection-reason {
  color: #f44336;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Buttons */
.btn-primary,
.btn-delete,
.btn-danger,
.btn-review,
.btn-approve,
.btn-reject {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: #0066cc;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #0052a3;
}

.btn-delete,
.btn-danger,
.btn-reject {
  background: #f44336;
  color: white;
}

.btn-delete:hover:not(:disabled),
.btn-danger:hover:not(:disabled),
.btn-reject:hover:not(:disabled) {
  background: #d32f2f;
}

.btn-review,
.btn-approve {
  background: #4caf50;
  color: white;
}

.btn-review:hover:not(:disabled),
.btn-approve:hover:not(:disabled) {
  background: #388e3c;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Settings Form */
.settings-container {
  max-width: 600px;
}

.message {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.message.success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #4caf50;
}

.message.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #f44336;
}

.settings-section {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.settings-section h2 {
  margin-bottom: 1.5rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0066cc;
}

.button-group {
  display: flex;
  gap: 1rem;
}

/* Review Detail */
.review-detail {
  max-width: 900px;
}

.article-info {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.article-info h2 {
  margin-bottom: 1rem;
}

.article-info .meta {
  display: flex;
  gap: 1.5rem;
  color: #666;
  font-size: 0.9rem;
}

.article-preview {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.article-preview h3 {
  margin-bottom: 1rem;
}

.preview-content {
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  max-height: 600px;
  overflow-y: auto;
}

.review-actions {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
}

.approve-section {
  margin-bottom: 2rem;
}

.reject-section label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.reject-section textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 1rem;
}

.reject-section textarea:focus {
  outline: none;
  border-color: #0066cc;
}
