/* ==========================================
   CUBE — Project Reporting + Admin Messaging
   Additive only. Reuses the existing glass
   variables (--glass-strong, --glass-border,
   --glass-blur, --radius-lg, --shadow-md) and
   the red/coral primary accent so every new
   piece reads as part of CUBE.
   ========================================== */

/* ==========================================
   FLASH MESSAGES — used on pages in this
   feature that don't load edit_profile.css.
   ========================================== */

.cube-flash {
  margin-bottom: 16px;
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  color: var(--ink-soft);
}

.cube-flash-success {
  border-color: rgba(74, 222, 128, 0.35);
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
}

.cube-flash-error {
  border-color: rgba(227, 17, 54, 0.4);
  color: #ff8fa0;
  background: rgba(227, 17, 54, 0.1);
}

.cube-flash-info {
  color: var(--ink-soft);
}

/* ==========================================
   REPORT LINK — small & unobtrusive on the
   Project Detail page's Project Info card.
   ========================================== */

.report-project-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  padding: 8px 14px;
  border: 1px solid rgba(227, 17, 54, 0.35);
  border-radius: 30px;
  background: rgba(227, 17, 54, 0.08);
  color: #ff8fa0;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.report-project-link:hover {
  background: rgba(227, 17, 54, 0.16);
  color: #ff8fa0;
  transform: translateY(-1px);
}

/* ==========================================
   MODAL — shared shell for the report form
   (project page) and the admin talk/resolve
   dialogs (report detail page).
   ========================================== */

.cube-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 6, 8, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.cube-modal-overlay.open {
  display: flex;
}

.cube-modal-card {
  width: 100%;
  max-width: 480px;
  margin: auto;
  background: var(--glass-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 26px;
  animation: cubeModalIn 0.22s ease;
}

@keyframes cubeModalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cube-modal-card h2 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cube-modal-card h2 i {
  color: var(--primary);
  font-size: 17px;
}

.cube-modal-sub {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--ink-faint);
}

.cube-modal-field {
  margin-bottom: 16px;
}

.cube-modal-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 7px;
}

.cube-modal-field select,
.cube-modal-field textarea,
.cube-modal-field input[type="text"] {
  width: 100%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.cube-modal-field select:focus,
.cube-modal-field textarea:focus,
.cube-modal-field input[type="text"]:focus {
  border-color: var(--primary);
}

.cube-modal-field textarea {
  resize: vertical;
  min-height: 96px;
}

.cube-modal-field select option {
  background: #141419;
  color: #f2e9e9;
}

.cube-modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.cube-modal-actions .cube-btn {
  flex: 1;
  min-width: 120px;
}

.cube-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.cube-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.cube-btn-danger {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark, var(--primary)));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 24px var(--primary-glow, rgba(227, 17, 54, 0.3));
}

.cube-btn-danger:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark, var(--primary)));
  color: #fff;
}

.cube-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* --- "Inform the reporter" block inside the resolve modal --- */

.resolve-inform-field {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}

.resolve-inform-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.resolve-inform-toggle input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}

.resolve-inform-toggle span {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.resolve-inform-message {
  display: none;
  margin-top: 12px;
}

.resolve-inform-message.visible {
  display: block;
  animation: cubeModalIn 0.18s ease;
}

/* ==========================================
   REPORTS LIST PAGE (admin)
   ========================================== */

.reports-summary-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.reports-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 30px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.reports-summary-chip i {
  color: var(--primary);
}

.report-card {
  display: block;
  margin-bottom: 14px;
  padding: 20px 22px;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.report-card:hover {
  transform: translateY(-2px);
  border-color: rgba(227, 17, 54, 0.4);
}

/* Stretched-link: the whole card opens the report detail page while
   the inner project/reporter links stay clickable on top. */
.report-card-link {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  border-radius: inherit;
}

.report-card-title h3 a,
.report-card-meta a {
  position: relative;
  z-index: 2;
}

.report-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.report-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.report-card-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.report-card-title h3 a {
  color: var(--ink);
  text-decoration: none;
}

.report-card-title h3 a:hover {
  color: var(--primary);
}

.report-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.report-badge-ongoing {
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(227, 17, 54, 0.35);
}

.report-badge-resolved {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.report-card-category {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-faint);
}

.report-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-faint);
}

.report-card-meta a {
  color: var(--ink-soft);
  text-decoration: none;
}

.report-card-meta a:hover {
  color: var(--primary);
}

.report-card-meta i {
  margin-right: 6px;
  color: var(--primary);
}

/* ==========================================
   REPORT DETAIL PAGE (admin)
   ========================================== */

.report-detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.report-detail-card .info-row {
  padding: 10px 0;
}

.report-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.report-link:hover {
  color: var(--primary);
}

.msg-section-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.report-desc-text {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.7;
  white-space: pre-line;
}

.report-related-msg {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
}

.report-related-msg h4 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.report-related-msg p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  white-space: pre-line;
}

.report-related-msg span {
  display: block;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--ink-faint);
}

/* ==========================================
   USER MESSAGES PAGE
   ========================================== */

.msg-card {
  margin-bottom: 16px;
  padding: 22px 24px;
}

.msg-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.msg-sender {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.msg-sender-avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 18px;
  border: 1px solid var(--glass-border);
}

.msg-sender h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ink);
}

.msg-sender h3 i {
  color: var(--primary);
  font-size: 13px;
}

.msg-sender p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-faint);
}

.msg-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(227, 17, 54, 0.35);
  white-space: nowrap;
}

.msg-body {
  margin-top: 14px;
}

.msg-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.75;
  white-space: pre-line;
}

.msg-context {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
}

.msg-context h4 {
  margin: 0 0 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.msg-context p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.msg-context p a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.msg-context p a:hover {
  color: var(--primary);
}

.msg-time {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--ink-faint);
}

.msg-time i {
  margin-right: 6px;
}

.msg-reply-preview {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(74, 222, 128, 0.28);
  background: rgba(74, 222, 128, 0.06);
}

.msg-reply-preview h4 {
  margin: 0 0 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: #4ade80;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.msg-reply-preview h4 i {
  margin-right: 6px;
}

.msg-reply-preview p {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.7;
  white-space: pre-line;
}

/* ==========================================
   MESSAGE ACTIONS — reply / admin buttons
   ========================================== */

.msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.msg-reply-btn {
  padding: 9px 18px;
  font-size: 12.5px;
}

/* ==========================================
   COMPOSE-TO-CUBE / BROADCAST COMPOSE CARD
   ========================================== */

.msg-compose-card {
  margin-bottom: 22px;
  padding: 20px 22px;
}

.msg-compose-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-bottom: 14px;
}

.msg-compose-head h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ink);
}

.msg-compose-head p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink-faint);
}

.msg-compose-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  resize: vertical;
  min-height: 96px;
  transition: border-color 0.2s ease;
}

.msg-compose-form textarea:focus {
  border-color: var(--primary);
}

.msg-compose-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.msg-empty-state {
  text-align: center;
  padding: 48px 20px;
}

.msg-empty-state i {
  font-size: 40px;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

.msg-empty-state h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.msg-empty-state p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-faint);
}

/* ==========================================
   PROFILE MESSAGE BUTTON — below the profile
   action row (Edit Profile / Logout).
   ========================================== */

.profile-msg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  background: rgba(227, 17, 54, 0.12);
  border: 1px solid rgba(227, 17, 54, 0.4);
  color: #ff8fa0;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.25s ease, transform 0.2s ease;
}

.profile-msg-btn:hover {
  background: rgba(227, 17, 54, 0.22);
  color: #ff8fa0;
  transform: translateY(-1px);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 560px) {
  .cube-modal-card {
    padding: 20px 16px;
  }

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

  .cube-modal-actions .cube-btn {
    width: 100%;
    min-width: 0;
  }

  .msg-card {
    padding: 18px 16px;
  }

  .msg-card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .report-card-top {
    flex-direction: column;
  }

  .report-resolve-form {
    margin-left: 0;
    width: 100%;
  }
}

/* ==========================================
   REPORT CARD STATUS TINT (admin list page)
   Green border = resolved, red = ongoing.
   Additive only; the badge keeps its color.
   ========================================== */

.report-card-ongoing {
  border-color: rgba(227, 17, 54, 0.3);
}

.report-card-ongoing:hover {
  border-color: rgba(227, 17, 54, 0.45);
}

.report-card-resolved {
  border-color: rgba(74, 222, 128, 0.3);
}

.report-card-resolved:hover {
  border-color: rgba(74, 222, 128, 0.45);
}

/* ==========================================
   QUICK "RESOLVED" ACTION (admin report list)
   Sits on top of the stretched card link.
   ========================================== */

.report-resolve-form {
  position: relative;
  z-index: 2;
  margin-left: auto;
}

.report-resolve-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid rgba(227, 17, 54, 0.35);
  background: rgba(227, 17, 54, 0.1);
  color: #ff8fa0;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.report-resolve-btn:hover {
  background: rgba(227, 17, 54, 0.16);
  transform: translateY(-1px);
}

/* ==========================================
   DEDICATED CREATE REPORT PAGE
   ========================================== */

.report-form-card {
  max-width: 720px;
}

.report-form-project {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
}

.report-form-project h2 {
  margin: 0 0 4px;
  font-size: 20px;
  color: var(--ink);
}

.report-form-project h2 i {
  color: var(--primary);
  margin-right: 8px;
}

.report-form-project h2 a {
  color: var(--ink);
  text-decoration: none;
}

.report-form-project h2 a:hover {
  color: var(--primary);
}

.report-form-project p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.report-form-project p a {
  color: var(--primary);
  text-decoration: none;
}
