/* ==========================================================
   🔐 MODERATION DASHBOARD STYLES
   ========================================================== */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #F3F0EB;
  color: #201e1f;
  line-height: 1.5;
}

/* Login Section */
.login-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  background: white;
  padding: 3rem;
  max-width: 400px;
  width: 100%;
  border: 1px solid rgba(32, 30, 31, 0.1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-title {
  font-size: 2rem;
  color: #201e1f;
  margin-bottom: 1rem;
  font-weight: 600;
}

.login-subtitle {
  font-size: 0.95rem;
  color: #1A0088;
  margin-bottom: 2rem;
  opacity: 0.8;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-form input {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  border: 1px solid rgba(32, 30, 31, 0.2);
  border-bottom: 2px solid #1A0088;
  background: transparent;
  color: #201e1f;
  outline: none;
  transition: border-color 0.3s;
}

.login-form input:focus {
  border-bottom-color: #4d0014;
}

.btn-login {
  background-color: #4d0014;
  color: white;
  font-size: 1rem;
  padding: 1rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
  text-transform: uppercase;
  font-weight: 600;
}

.btn-login:hover {
  background-color: #FF5F1F;
}

.login-error {
  color: #4d0014;
  font-size: 0.9rem;
  margin-top: 1rem;
  min-height: 1.5rem;
}

/* Dashboard Section */
.dashboard-section {
  min-height: 100vh;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #201e1f;
}

.dashboard-title {
  font-size: 2.5rem;
  color: #201e1f;
  font-weight: 600;
}

.btn-logout {
  font-size: 0.9rem;
  color: #1A0088;
  background: transparent;
  border: 1px solid #1A0088;
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
}

.btn-logout:hover {
  background-color: #1A0088;
  color: white;
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.tab-btn {
  font-size: 0.9rem;
  color: #201e1f;
  background: transparent;
  border: 1px solid rgba(32, 30, 31, 0.2);
  padding: 0.75rem 2rem;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  opacity: 0.6;
}

.tab-btn:hover {
  opacity: 1;
}

.tab-btn.active {
  background-color: #201e1f;
  color: white;
  opacity: 1;
}

/* Comments Container */
.comments-container {
  background: white;
  padding: 2rem;
  border: 1px solid rgba(32, 30, 31, 0.1);
}

.comment-item {
  background: #F3F0EB;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-left: 3px solid #1A0088;
}

.comment-item.approved {
  border-left-color: #AAFF00;
  opacity: 0.7;
}

.comment-item.moderator {
  border-left-color: #4d0014;
  background-color: rgba(142, 185, 254, 0.05);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.comment-meta {
  flex: 1;
}

.comment-author {
  font-size: 1.1rem;
  font-weight: 600;
  color: #201e1f;
  display: block;
  margin-bottom: 0.25rem;
}

.comment-email {
  font-size: 0.85rem;
  color: #1A0088;
  opacity: 0.7;
  display: block;
}

.comment-article-link {
  font-size: 0.85rem;
  color: #4d0014;
  margin-top: 0.25rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.3s;
}

.comment-article-link:hover {
  color: #FF5F1F;
  text-decoration: underline;
}

.comment-status {
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  background-color: rgba(26, 0, 136, 0.1);
  color: #1A0088;
  text-transform: uppercase;
  font-weight: 600;
}

.comment-status.approved {
  background-color: rgba(170, 255, 0, 0.2);
  color: #4d7300;
}

.comment-body {
  font-size: 1rem;
  color: #201e1f;
  line-height: 1.6;
  margin-bottom: 1rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.comment-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-approve,
.btn-delete,
.btn-reply {
  font-size: 0.85rem;
  padding: 0.5rem 1.25rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  font-weight: 600;
}

.btn-approve {
  background-color: #AAFF00;
  color: #201e1f;
}

.btn-approve:hover {
  background-color: #99ee00;
}

.btn-delete {
  background-color: #4d0014;
  color: white;
}

.btn-delete:hover {
  background-color: #FF5F1F;
}

.btn-reply {
  background-color: #8EB9FE;
  color: #201e1f;
}

.btn-reply:hover {
  background-color: #7da9ed;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  font-style: italic;
  font-size: 1.2rem;
  color: #1A0088;
  opacity: 0.5;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 1rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(77, 0, 20, 0.2);
  border-top-color: #4d0014;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(32, 30, 31, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(32, 30, 31, 0.1);
}

.modal-title {
  font-size: 1.5rem;
  color: #201e1f;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 2rem;
  color: #201e1f;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 2rem;
  height: 2rem;
}

.modal-body {
  padding: 1.5rem;
}

.original-comment {
  background-color: rgba(142, 185, 254, 0.1);
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 2px solid #1A0088;
}

.original-comment p {
  font-size: 0.95rem;
  color: #201e1f;
  line-height: 1.6;
}

#replyForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#replyForm textarea {
  width: 100%;
  min-height: 150px;
  padding: 1rem;
  font-size: 1rem;
  border: 1px solid rgba(32, 30, 31, 0.2);
  border-bottom: 2px solid #1A0088;
  background: transparent;
  color: #201e1f;
  outline: none;
  resize: vertical;
  font-family: inherit;
}

#replyForm textarea:focus {
  border-bottom-color: #4d0014;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.btn-primary,
.btn-secondary {
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  font-weight: 600;
}

.btn-primary {
  background-color: #4d0014;
  color: white;
}

.btn-primary:hover {
  background-color: #FF5F1F;
}

.btn-secondary {
  background-color: transparent;
  color: #201e1f;
  border: 1px solid #201e1f;
}

.btn-secondary:hover {
  background-color: #201e1f;
  color: white;
}

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

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

  .filter-tabs {
    flex-direction: column;
  }

  .tab-btn {
    width: 100%;
  }

  .comment-actions {
    flex-direction: column;
  }

  .btn-approve,
  .btn-delete,
  .btn-reply {
    width: 100%;
  }
}