/* ==========================================
   CampusFix AI - Complete Improved Styling
   Mobile First + Responsive Design
========================================== */


/* ==========================================
   ROOT COLORS
========================================== */

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #eef2ff;

    --background: #f5f7fb;
    --surface: #ffffff;

    --text: #1f2937;
    --text-light: #6b7280;

    --border: #e5e7eb;

    --success: #16a34a;
    --success-bg: #dcfce7;

    --warning: #d97706;
    --warning-bg: #fef3c7;

    --danger: #dc2626;
    --danger-bg: #fee2e2;

    --info: #2563eb;
    --info-bg: #dbeafe;

    --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.10);

    --radius: 14px;
}


/* ==========================================
   GLOBAL RESET
========================================== */

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;

    font-family: Arial, Helvetica, sans-serif;

    background: var(--background);

    color: var(--text);

    line-height: 1.6;
}


/* ==========================================
   HEADER
========================================== */

.header {
    background:
        linear-gradient(
            135deg,
            #312e81,
            #4f46e5,
            #6366f1
        );

    color: white;

    padding: 18px 20px;

    display: flex;

    align-items: center;

    gap: 16px;

    box-shadow:
        0 3px 12px
        rgba(0, 0, 0, 0.12);
}


.logo {
    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    min-width: 56px;

    height: 56px;

    border-radius: 14px;

    background:
        rgba(255, 255, 255, 0.15);

    font-size: 13px;

    font-weight: bold;

    backdrop-filter: blur(8px);
}


.header-text {
    display: flex;

    flex-direction: column;

    justify-content: center;
}


.header-text span {
    font-size: 13px;

    opacity: 0.85;
}


.header-text h1 {
    margin: 0;

    font-size: 22px;

    font-weight: 700;
}


/* ==========================================
   MAIN CONTAINER
========================================== */

.container {
    width: 100%;

    max-width: 1100px;

    margin: 0 auto;

    padding: 20px 16px 50px;
}


/* ==========================================
   HERO SECTION
========================================== */

.hero {
    background:
        linear-gradient(
            135deg,
            #ffffff,
            #f5f7ff
        );

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 32px 24px;

    margin-bottom: 28px;

    box-shadow: var(--shadow);
}


.badge {
    display: inline-block;

    padding: 6px 12px;

    border-radius: 999px;

    font-size: 12px;

    font-weight: 600;

    color: var(--primary);

    background: var(--primary-light);

    margin-bottom: 12px;
}


.hero h2 {
    margin: 0 0 12px;

    font-size: 32px;

    line-height: 1.25;

    color: var(--text);
}


.hero h2 span {
    color: var(--primary);
}


.hero p {
    max-width: 700px;

    color: var(--text-light);

    margin-bottom: 24px;
}


/* ==========================================
   BUTTONS
========================================== */

button {
    border: none;

    cursor: pointer;

    font-family: inherit;

    font-size: 14px;

    font-weight: 600;

    padding: 12px 18px;

    border-radius: 8px;

    background: var(--primary);

    color: white;

    transition: 0.25s ease;

    box-shadow:
        0 3px 8px
        rgba(79, 70, 229, 0.18);
}


button:hover {
    background: var(--primary-dark);

    transform: translateY(-1px);

    box-shadow:
        0 6px 14px
        rgba(79, 70, 229, 0.25);
}


button:active {
    transform: scale(0.98);
}


.hero-buttons {
    display: flex;

    flex-wrap: wrap;

    gap: 12px;
}


.secondary {
    background: white;

    color: var(--primary);

    border: 1px solid var(--primary);

    box-shadow: none;
}


.secondary:hover {
    background: var(--primary-light);

    color: var(--primary);
}


/* ==========================================
   DASHBOARD
========================================== */

.dashboard {
    margin-bottom: 30px;
}


.dashboard h2 {
    font-size: 24px;

    margin-bottom: 18px;
}


.stats {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 16px;
}


.stat-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 12px;

    padding: 20px;

    box-shadow: var(--shadow);

    transition: 0.25s ease;
}


.stat-card:hover {
    transform: translateY(-3px);

    box-shadow: var(--shadow-hover);
}


.stat-card h3 {
    margin: 0 0 8px;

    font-size: 28px;

    color: var(--primary);
}


.stat-card p {
    margin: 0;

    color: var(--text-light);

    font-size: 14px;
}


/* ==========================================
   REPORT SECTION
========================================== */

.report-section {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 24px;

    margin: 30px 0;

    box-shadow: var(--shadow);
}


.report-section h2 {
    margin-top: 0;

    margin-bottom: 22px;
}


/* ==========================================
   FORM
========================================== */

form {
    display: grid;

    gap: 16px;
}


label {
    font-size: 14px;

    font-weight: 600;

    color: var(--text);
}


input,
select,
textarea {
    width: 100%;

    padding: 13px 14px;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    background: white;

    color: var(--text);

    font-family: inherit;

    font-size: 14px;

    outline: none;

    transition: 0.2s ease;
}


input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(79, 70, 229, 0.12);
}


textarea {
    min-height: 130px;

    resize: vertical;
}


/* ==========================================
   COMPLAINT SECTION
========================================== */

.complaints {
    margin-top: 35px;
}


.complaints h2 {
    font-size: 24px;

    margin-bottom: 18px;
}


#complaintsList {
    display: grid;

    gap: 16px;
}


/* ==========================================
   COMPLAINT CARD
========================================== */

.complaint-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 12px;

    padding: 20px;

    box-shadow: var(--shadow);

    transition: 0.25s ease;

    position: relative;

    overflow: hidden;
}


.complaint-card:hover {
    transform: translateY(-3px);

    box-shadow: var(--shadow-hover);

    border-color: #c7d2fe;
}


.complaint-card::before {
    content: "";

    position: absolute;

    left: 0;

    top: 0;

    width: 4px;

    height: 100%;

    background: var(--primary);
}


.complaint-card h3 {
    margin: 0 0 8px;

    font-size: 18px;

    color: var(--text);
}


.complaint-card p {
    margin: 0 0 15px;

    color: var(--text-light);

    font-size: 14px;
}


/* ==========================================
   COMPLAINT META INFORMATION
========================================== */

.complaint-meta {
    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 10px;

    font-size: 12px;

    color: var(--text-light);
}


.complaint-meta span {
    display: inline-flex;

    align-items: center;

    gap: 4px;
}


/* ==========================================
   STATUS BADGES
========================================== */

.status {
    padding: 5px 10px;

    border-radius: 999px;

    font-size: 11px;

    font-weight: 700;

    white-space: nowrap;
}


/* Pending */

.status.pending {
    background: var(--warning-bg);

    color: var(--warning);
}


/* In Progress */

.status.progress {
    background: var(--info-bg);

    color: var(--info);
}


/* Resolved */

.status.resolved {
    background: var(--success-bg);

    color: var(--success);
}


/* Escalated */

.status.escalated {
    background: var(--danger-bg);

    color: var(--danger);
}


/* ==========================================
   DETAILS SECTION
========================================== */

.details-section {
    margin-top: 35px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 24px;

    box-shadow: var(--shadow);
}


.details-section > h2 {
    margin-top: 20px;
}


/* ==========================================
   BACK BUTTON
========================================== */

.back-button {
    background: #f8fafc;

    color: var(--text);

    border: 1px solid var(--border);

    box-shadow: none;

    margin-bottom: 16px;
}


.back-button:hover {
    background: #eef2ff;

    color: var(--primary);

    border-color: #c7d2fe;
}


/* ==========================================
   COMPLAINT DETAIL CARD
========================================== */

.complaint-detail-card {
    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 12px;

    padding: 24px;
}


.complaint-detail-card h2 {
    margin: 0 0 6px;

    font-size: 24px;

    color: var(--text);
}


.complaint-detail-card > p:first-of-type {
    color: var(--text-light);

    margin-top: 0;
}


.complaint-detail-card p {
    margin: 8px 0;

    font-size: 14px;
}


.complaint-detail-card hr {
    border: none;

    border-top: 1px solid var(--border);

    margin: 20px 0;
}


.complaint-detail-card h3 {
    margin: 0 0 14px;

    font-size: 17px;
}


/* ==========================================
   AUTHORITY ACTIONS
========================================== */

#actionNote {
    width: 100%;

    min-height: 110px;

    margin-bottom: 14px;
}


.action-buttons {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;
}


/* ==========================================
   RESOLVED MESSAGE
========================================== */

.resolved-message {
    display: inline-block;

    background: var(--success-bg);

    color: var(--success);

    padding: 10px 14px;

    border-radius: 8px;

    font-weight: 600;
}


/* ==========================================
   COMPLAINT JOURNEY
========================================== */

.complaint-history {
    display: flex;

    flex-direction: column;

    gap: 12px;
}


.history-item {
    background: #f8fafc;

    border: 1px solid var(--border);

    border-left: 4px solid var(--primary);

    border-radius: 10px;

    padding: 14px 16px;

    transition: 0.2s ease;
}


.history-item:hover {
    background: #f5f7ff;

    transform: translateX(3px);
}


.history-item strong {
    display: block;

    color: var(--primary);

    margin-bottom: 4px;

    font-size: 14px;
}


.history-item p {
    margin: 0;

    color: var(--text-light);

    font-size: 13px;
}


/* ==========================================
   HIDDEN CLASS
========================================== */

.hidden {
    display: none !important;
}


/* ==========================================
   EMPTY STATE
========================================== */

#complaintsList > p {
    text-align: center;

    padding: 30px;

    background: white;

    border: 1px dashed #cbd5e1;

    border-radius: 12px;

    color: var(--text-light);
}


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

@media (max-width: 768px) {

    .header {
        padding: 15px;

        gap: 12px;
    }


    .header-text h1 {
        font-size: 19px;
    }


    .header-text span {
        font-size: 11px;
    }


    .logo {
        min-width: 48px;

        height: 48px;
    }


    .container {
        padding: 16px 12px 40px;
    }


    .hero {
        padding: 24px 18px;
    }


    .hero h2 {
        font-size: 25px;
    }


    .hero p {
        font-size: 14px;
    }


    .hero-buttons {
        flex-direction: column;
    }


    .hero-buttons button {
        width: 100%;
    }


    .stats {
        grid-template-columns:
            repeat(2, 1fr);

        gap: 12px;
    }


    .stat-card {
        padding: 16px;
    }


    .stat-card h3 {
        font-size: 24px;
    }


    .report-section,
    .details-section {
        padding: 16px;
    }


    .complaint-card {
        padding: 16px;
    }


    .complaint-meta {
        gap: 8px;

        line-height: 1.5;
    }


    .complaint-detail-card {
        padding: 16px;
    }


    .complaint-detail-card h2 {
        font-size: 21px;
    }


    .action-buttons {
        flex-direction: column;
    }


    .action-buttons button {
        width: 100%;
    }

}


/* ==========================================
   SMALL MOBILE
========================================== */

@media (max-width: 420px) {

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


    .stat-card {
        padding: 14px;
    }


    .stat-card h3 {
        font-size: 21px;
    }


    .complaint-meta {
        flex-direction: column;

        align-items: flex-start;
    }


    .hero h2 {
        font-size: 23px;
    }


    button {
        padding: 11px 15px;
    }

}


/* ==========================================
   DESKTOP IMPROVEMENTS
========================================== */

@media (min-width: 769px) {

    .report-section,
    .details-section {
        padding: 32px;
    }


    .complaint-card {
        padding: 22px 24px;
    }


    .complaint-detail-card {
        padding: 30px;
    }

   }
/* =========================================
   AUTHORITY DASHBOARD
========================================= */

.authority-dashboard {
  margin-top: 40px;
  padding: 32px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}


/* =========================================
   AUTHORITY DASHBOARD HEADER
========================================= */

.authority-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}


.authority-dashboard-header h2 {
  margin-top: 12px;
  margin-bottom: 10px;
}


.authority-dashboard-header p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}


/* =========================================
   AUTHORITY STATISTICS
========================================= */

.authority-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 30px;
}


.authority-stat-card {
  padding: 22px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  transition: transform 0.2s ease,
              box-shadow 0.2s ease;
}


.authority-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}


.authority-stat-card h3 {
  margin: 0 0 8px 0;
  font-size: 30px;
  font-weight: 700;
}


.authority-stat-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}


/* =========================================
   AUTHORITY CONTROLS
========================================= */

.authority-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  margin-bottom: 25px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}


.authority-controls label {
  font-weight: 600;
  white-space: nowrap;
}


.authority-controls select {
  flex: 1;
  max-width: 350px;
  padding: 12px 15px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-size: 15px;
  cursor: pointer;
  outline: none;
}


.authority-controls select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}


/* =========================================
   AUTHORITY COMPLAINT LIST
========================================= */

.authority-complaints-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}


/* =========================================
   AUTHORITY COMPLAINT CARD
========================================= */

.authority-complaint-card {
  padding: 22px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease,
              box-shadow 0.2s ease;
}


.authority-complaint-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}


/* =========================================
   COMPLAINT CARD TOP
========================================= */

.authority-complaint-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}


.authority-complaint-top h3 {
  margin: 0 0 8px 0;
  font-size: 19px;
}


.authority-complaint-top p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}


/* =========================================
   AUTHORITY COMPLAINT META
========================================= */

.authority-complaint-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}


.authority-complaint-meta span {
  padding: 8px 12px;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: 13px;
  color: #475569;
}


/* =========================================
   AUTHORITY CARD ACTIONS
========================================= */

.authority-card-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}


.authority-card-actions button {
  padding: 11px 18px;
  border: none;
  border-radius: 9px;
  background: #2563eb;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease,
              transform 0.2s ease;
}


.authority-card-actions button:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}


/* =========================================
   NO COMPLAINT MESSAGE
========================================= */

.no-authority-complaints {
  padding: 35px;
  text-align: center;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: #64748b;
}


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

@media (max-width: 900px) {

  .authority-stats {
    grid-template-columns: repeat(2, 1fr);
  }

}


@media (max-width: 600px) {

  .authority-dashboard {
    padding: 20px;
    margin-top: 25px;
  }


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


  .authority-controls {
    flex-direction: column;
    align-items: stretch;
  }


  .authority-controls select {
    max-width: none;
    width: 100%;
  }


  .authority-complaint-top {
    flex-direction: column;
  }


  .authority-card-actions {
    justify-content: stretch;
  }


  .authority-card-actions button {
    width: 100%;
  }

}
/* =========================================
   DEADLINE COUNTDOWN BADGES
========================================= */

.deadline {
  display: inline-flex;
  align-items: center;
  width: fit-content;

  margin-top: 10px;
  padding: 7px 12px;

  border-radius: 999px;

  font-size: 0.85rem;
  font-weight: 600;

  background: #eff6ff;
  color: #2563eb;

  border: 1px solid #bfdbfe;
}


/* URGENT DEADLINE */

.deadline.urgent {
  background: #fff7ed;
  color: #ea580c;

  border-color: #fed7aa;
}


/* OVERDUE / ESCALATED */

.deadline.overdue {
  background: #fef2f2;
  color: #dc2626;

  border-color: #fecaca;
}


/* RESOLVED */

.deadline.resolved-deadline {
  background: #f0fdf4;
  color: #16a34a;

  border-color: #bbf7d0;
}


/* AUTHORITY DASHBOARD ALIGNMENT */

.authority-complaint-top .deadline {
  margin-top: 8px;
}


/* MOBILE RESPONSIVENESS */

@media (max-width: 600px) {

  .deadline {
    font-size: 0.78rem;
    padding: 6px 10px;
    margin-top: 8px;
  }

}
/* =========================================
   ESCALATION INFORMATION BOX
========================================= */

.escalation-info {
  display: flex;
  align-items: flex-start;
  gap: 16px;

  margin: 20px 0;
  padding: 20px;

  border: 1px solid #fecaca;
  border-radius: 16px;

  background: #fff7ed;
}

.escalation-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 46px;
  height: 46px;

  flex-shrink: 0;

  border-radius: 50%;

  font-size: 1.4rem;

  background: #fee2e2;
}

.escalation-content {
  flex: 1;
}

.escalation-content h3 {
  margin: 0 0 8px;

  font-size: 1.1rem;
}

.escalation-content p {
  margin: 7px 0;

  line-height: 1.6;
}


/* =========================================
   MOBILE RESPONSIVE ESCALATION BOX
========================================= */

@media (max-width: 600px) {

  .escalation-info {
    gap: 12px;

    padding: 16px;

    border-radius: 14px;
  }

  .escalation-icon {
    width: 40px;
    height: 40px;

    font-size: 1.2rem;
  }

  .escalation-content h3 {
    font-size: 1rem;
  }

}

/* Clear All Test Complaints Button */

.reset-complaints-container {
  margin: 20px 0;
  text-align: center;
}

.reset-complaints-btn {
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
}

.reset-complaints-btn:hover {
  opacity: 0.85;
}
