/**
 * LaporWarga - Citizen Reporting System
 * Main Stylesheet
 * Created: December 2025
 */

/* ============================================
   GLOBAL STYLES & RESET
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Brand Colors */
  --primary-color: rgb(26, 42, 74); /* Dark Blue - Trust & Stability */
  --secondary-color: rgb(211, 47, 47); /* Deep Red - Action & Urgency */
  --accent-color: #ef5350; /* Lighter Red - Highlights */

  /* Text Colors */
  --text-dark: #1f2937; /* Dark Gray */
  --text-muted: #6b7280; /* Muted Gray */
  --text-light: #9ca3af; /* Light Gray */

  /* Background Colors */
  --bg-white: #fafafa;
  --bg-light: #f9fafb; /* Light Gray for alternate sections */
  --bg-gray: #f3f4f6;

  /* Border & Dividers */
  --border-color: #e5e7eb;
  --border-light: #d9d9d9;

  /* Status Colors */
  --success-color: #22c55e; /* Green for Selesai */
  --warning-color: #f59e0b;
  --info-color: #3b82f6;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px 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);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --transition-colors: all 0.2s ease;
  --transition-shadow: box-shadow 0.3s ease;
  --transition-transform: transform 0.2s ease;
}

body {
  font-family: poppins, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  background-color: var(--bg-white);
  color: var(--text-dark);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-light);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  transition: var(--transition-colors);
}

.nav-brand:hover {
  opacity: 0.9;
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 4px;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-dark);
  transition: var(--transition-colors);
  border-radius: 2px;
}

.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--text-dark);
  transition: var(--transition-colors);
  padding: 0.5rem 0;
  font-weight: 400;
  position: relative;
}

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

.nav-link.active {
  color: var(--primary-color);
  font-weight: 550;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--secondary-color);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-weight: 400;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: var(--transition-colors);
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(1px);
}

/* Primary Button - For Trust Elements */
.btn-primary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--accent-color);
  box-shadow: var(--shadow-lg);
}

/* Secondary Button - Primary CTA (Deep Red for Action) */
.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background-color: rgba(211, 47, 47, 0.9);
  box-shadow: var(--shadow-lg);
}

/* Outline Button - Secondary Actions */
.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: none;
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-md);
}

/* Success Button */
.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-success:hover {
  background-color: rgba(34, 197, 94, 0.9);
  box-shadow: var(--shadow-lg);
}

/* Danger Button (used in admin delete actions) */
.btn-danger {
  background-color: var(--secondary-color);
  color: white;
}

.btn-danger:hover {
  opacity: 0.9;
  box-shadow: var(--shadow-lg);
}

/* Button Sizes */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  border-radius: 0.875rem;
}

.btn-block {
  display: block;
  width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  background: rgb(255, 253, 251);
  color: var(--primary-color);
  padding: 6rem 0;
}

@media (min-width: 1024px) {
  .hero {
    padding: 5rem 0 7rem 0;
  }
}

/* Hero two-column layout */
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-left {
  text-align: left;
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.5rem;
  }
}

.hero-description {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
  opacity: 0.95;
  color: var(--primary-color);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Smaller buttons in hero (about half the large size) */
.hero .btn-large {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
}

.hero-right .hero-image {
  width: 1000px;
}

@media (min-width: 1024px) {
  .hero-description {
    font-size: 1.25rem;
  }
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-right .hero-image {
    height: 380px;
  }
}

@media (max-width: 480px) {
  .hero-right .hero-image {
    height: 280px;
  }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 5rem 0;
}

@media (min-width: 1024px) {
  .section {
    padding: 5rem 0;
  }
}

.section-alt {
  background-color: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

@media (min-width: 1024px) {
  .section-header {
    margin-bottom: 4rem;
  }
}

.section-title {
  font-size: 1.5rem;
  color: black;
  margin-bottom: 1rem;
  font-weight: 400;
}

@media (min-width: 1024px) {
  .section-title {
    font-size: 2.5rem;
  }
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Laporan Publik - Secondary background for container */
#laporan-publik .container {
  background: var(--primary-color);
  color: #fff;
  border-radius: 0.75rem;
  padding: 4rem 4rem;
}

#laporan-publik .section-title {
  color: #fff;
}
#laporan-publik .section-subtitle {
  color: rgba(255, 255, 255, 0.9);
}

/* Keep table readable on colored container */
#laporan-publik .table-responsive {
  box-shadow: var(--shadow-md);
}
#laporan-publik .table {
  background: #fff;
}

/* ============================================
   PROCESS FLOW (After Hero)
   ============================================ */
.process-flow {
  background: var(--primary-color);
  color: #fff;
  padding: 3rem 0;
}

.process-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  text-align: center;
}

@media (max-width: 992px) {
  .process-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    row-gap: 2.5rem;
  }
}

.process-grid::before {
  content: "";
  position: absolute;
  top: 34px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.25);
}

.process-item {
  position: relative;
}

.process-icon {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin: 0 auto 0.75rem;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1;
}

.process-title {
  color: #fff;
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.process-desc {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ============================================
   CAROUSEL
   ============================================ */
.carousel-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.carousel-wrapper {
  overflow: hidden;
  border-radius: 1rem;
}

.carousel {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.5s ease-in-out;
}

.carousel-card {
  flex: 0 0 calc(33.333% - 1rem);
  min-width: 0;
  display: flex;
}

.carousel-card .card {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  padding-top: 0.75rem;
}

.carousel-card .card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.info-badge {
  position: absolute;
  top: 0.6rem;
  right: 1rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--primary-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.info-badge--alert {
  background: var(--secondary-color);
}
.info-badge--info {
  background: var(--primary-color);
}

@media (max-width: 768px) {
  .carousel-card {
    flex: 0 0 100%;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .carousel-card {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: white;
  color: var(--primary-color);
  border: 2px solid var(--border-color);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 10;
  transition: var(--transition-colors);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.carousel-prev {
  left: -46px;
}

.carousel-next {
  right: -46px;
}

@media (max-width: 768px) {
  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .carousel-prev {
    left: 10px;
  }

  .carousel-next {
    right: 10px;
  }
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition-shadow);
  border: 1px solid var(--border-light);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card-header {
  background-color: white;
  color: var(--text-dark);
  padding: 0rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.card-body {
  padding: 1rem 1.25rem;
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

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

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.info-lokasi {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.info-deskripsi {
  line-height: 1.6;
  margin-bottom: 0rem;
  color: var(--text-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
}

.info-detail-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.5rem;
  transition: var(--transition-colors);
}

.info-detail-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.info-tanggal {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);

  padding-top: 0.75rem;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .grid {
    gap: 2rem;
  }
}

/* ============================================
   FORMS
   ============================================ */
.form-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: white;
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-md);
}

@media (min-width: 1024px) {
  .form-container {
    padding: 2.5rem;
  }
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: var(--transition-colors);
  color: var(--text-dark);
  background-color: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 42, 74, 0.1);
}

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

.form-text {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============================================
   TABLES
   ============================================ */
.table-responsive {
  overflow-x: auto;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.table,
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
}

.table thead,
.admin-table thead {
  background-color: var(--bg-gray);
}

.table th,
.table td,
.admin-table th,
.admin-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th,
.admin-table th {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td,
.admin-table td {
  color: var(--text-dark);
}

.table tbody tr,
.admin-table tbody tr {
  transition: var(--transition-colors);
}

.table tbody tr:nth-child(even),
.admin-table tbody tr:nth-child(even) {
  background-color: var(--bg-light);
}

.table tbody tr:hover,
.admin-table tbody tr:hover {
  background-color: var(--bg-gray);
}

.table td:last-child,
.admin-table td:last-child {
  white-space: nowrap;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 200;
  text-align: center;
  line-height: 1;
}

.badge-lg {
  padding: 0.5rem 1rem;
  font-size: 1rem;
}

/* Status Badge - Diterima (Blue) */
.badge-info {
  background-color: var(--primary-color);
  color: white;
}

/* Status Badge - Diproses (Red) */
.badge-warning {
  background-color: var(--secondary-color);
  color: white;
}

/* Status Badge - Selesai (Green) */
.badge-success {
  background-color: var(--success-color);
  color: white;
}

/* Neutral badge (used for category labels) */
.badge-secondary {
  background-color: var(--bg-gray);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid;
}

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

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

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

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

/* ============================================
   DETAIL PAGE
   ============================================ */
.detail-container {
  max-width: 1200px;
  margin: 0 auto;
  flex: 1;
  width: 100%;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-section {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.detail-section h3,
.detail-section h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

.detail-table {
  width: 100%;
}

.detail-table td {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.detail-table td:first-child {
  width: 40%;
  color: var(--text-muted);
  font-weight: 500;
}

.detail-table td:last-child {
  color: var(--text-dark);
}

.detail-img {
  width: 100%;
  border-radius: 0.75rem;
  margin-top: 0.75rem;
  box-shadow: var(--shadow-sm);
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
  opacity: 0.5;
  transition: var(--transition-colors);
}

.timeline-item.active {
  opacity: 1;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 10px;
  bottom: -10px;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: absolute;
  left: -26px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--border-color);
  border: 3px solid white;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-colors);
}

.timeline-item.active .timeline-dot {
  background-color: var(--success-color);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.timeline-content strong {
  display: block;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.timeline-content small {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background-color: var(--primary-color);
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

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

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
  }
}

.footer-col h3,
.footer-col h4 {
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 1.125rem;
}

.footer-links,
.footer-contact {
  list-style: none;
}

.footer-links li,
.footer-contact li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition-colors);
  font-size: 0.9375rem;
}

.footer-links a:hover {
  color: white;
  padding-left: 4px;
}

.footer-contact li {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

/* ============================================
   ADMIN STYLES
   ============================================ */
.login-page {
  background: linear-gradient(135deg, var(--primary-color) 0%, rgba(26, 42, 74, 0.95) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-container {
  width: 100%;
  max-width: 450px;
}

.login-box {
  background-color: white;
  border-radius: 1rem;
  padding: 3rem;
  box-shadow: var(--shadow-xl);
}

@media (max-width: 480px) {
  .login-box {
    padding: 2rem 1.5rem;
  }
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h1 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

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

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
}

.login-footer a {
  color: var(--primary-color);
  font-weight: 500;
  transition: var(--transition-colors);
}

.login-footer a:hover {
  color: var(--secondary-color);
}

.admin-page {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  background-color: var(--bg-light);
}

.admin-sidebar {
  width: 260px;
  background-color: var(--primary-color);
  color: white;
  padding: 2rem 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.sidebar-header {
  padding: 0 1.5rem;
  margin-bottom: 2rem;
}

.sidebar-header h2 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.sidebar-header p {
  font-size: 0.875rem;
  opacity: 0.8;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  transition: var(--transition-colors);
  font-weight: 500;
}

.sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-link.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  border-right: 3px solid white;
}

.sidebar-link span {
  font-size: 1.25rem;
}

.admin-content {
  margin-left: 260px;
  flex: 1;
  padding: 2rem;
}

@media (max-width: 768px) {
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }

  .admin-content {
    margin-left: 0;
  }
}

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

@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

.admin-header h1 {
  color: var(--primary-color);
  font-size: 2rem;
  font-weight: 700;
}

.admin-user {
  background-color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-sm);
  font-weight: 500;
}

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

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border-left: 4px solid;
  transition: var(--transition-shadow);
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
}

.stat-primary {
  border-color: var(--primary-color);
}

.stat-info {
  border-color: var(--primary-color);
}

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

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

.stat-icon {
  font-size: 3rem;
  line-height: 1;
}

.stat-content h3 {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
}

/* ============================================
   ADMIN COMPACT OVERRIDES
   ============================================ */
/* Make admin dashboard more compact without affecting public pages */
.admin-page .admin-sidebar {
  width: 220px;
  padding: 1.25rem 0;
}

.admin-page .admin-content {
  margin-left: 220px;
  padding: 1.25rem;
}

.admin-page .sidebar-header h2 {
  font-size: 1.5rem;
}

.admin-page .sidebar-header p {
  font-size: 0.8125rem;
}

.admin-page .sidebar-link {
  padding: 0.75rem 1rem;
}

.admin-page .sidebar-link span,
.admin-page .sidebar-link i {
  font-size: 1rem;
}

.admin-page .admin-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
}

.admin-page .admin-header h1 {
  font-size: 1.5rem;
}

.admin-page .admin-user {
  padding: 0.5rem 1rem;
}

.admin-page .stats-grid {
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-page .stat-card {
  padding: 1rem;
  gap: 1rem;
}

.admin-page .stat-icon {
  font-size: 2rem;
}

.admin-page .stat-number {
  font-size: 1.5rem;
}

.admin-page .table,
.admin-page .admin-table {
  font-size: 0.875rem;
}

.admin-page .table th,
.admin-page .table td,
.admin-page .admin-table th,
.admin-page .admin-table td {
  padding: 0.75rem;
}

/* ============================================
   SUCCESS PAGE
   ============================================ */
.success-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, rgba(26, 42, 74, 0.95) 100%);
  padding: 1.5rem;
}

.success-box {
  background-color: white;
  border-radius: 1rem;
  padding: 3rem;
  max-width: 600px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-xl);
}

@media (max-width: 480px) {
  .success-box {
    padding: 2rem 1.5rem;
  }
}

.success-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.success-box h1 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 700;
}

.report-code-box {
  background-color: var(--bg-light);
  padding: 2rem;
  border-radius: 0.75rem;
  margin: 2rem 0;
  border: 2px dashed var(--border-color);
}

.report-code {
  font-size: 1.75rem;
  color: var(--secondary-color);
  font-weight: 700;
  margin: 1rem 0;
  font-family: "Courier New", monospace;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .report-code {
    font-size: 2rem;
  }
}

.text-small {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.success-info {
  text-align: left;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.success-info p {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.success-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    flex-direction: column;
    padding: 1rem;
    display: none;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border-light);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .nav-link.active::after {
    display: none;
  }

  .hero-title {
    font-size: 1.875rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

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

  .table {
    font-size: 0.875rem;
  }

  .table th,
  .table td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .btn {
    padding: 0.625rem 1.25rem;
  }

  .form-container {
    padding: 1.5rem;
  }

  .hero {
    padding: 4rem 0;
  }

  .section {
    padding: 3rem 0;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus Visible for Accessibility */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Selection Color */
::selection {
  background-color: var(--primary-color);
  color: white;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

/* Scroll Animation */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   CHATBOT STYLES
   ============================================ */

/* Chatbot Container */
#chatbot-container {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  z-index: 9999 !important;
}

/* Floating Button */
.chatbot-btn {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--secondary-color);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-transform), var(--transition-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.chatbot-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

.chatbot-btn:active {
  transform: scale(0.95);
}

/* Tooltip */
.chatbot-tooltip {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--text-dark);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.chatbot-btn:hover .chatbot-tooltip {
  opacity: 1;
}

.chatbot-tooltip::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: var(--text-dark);
}

/* Chat Panel */
.chatbot-panel {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 500px;
  max-height: calc(100vh - 120px);
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

.chatbot-panel.active {
  display: flex;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Chatbot Header */
.chatbot-header {
  background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chatbot-header p {
  font-size: 13px;
  opacity: 0.9;
}

.chatbot-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background 0.2s ease;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Messages Container */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: var(--bg-light);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: var(--bg-gray);
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* Message Bubble */
.chatbot-message {
  display: flex;
  gap: 10px;
  animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--secondary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.user-message .message-avatar {
  background: var(--primary-color);
}

.message-content {
  flex: 1;
  max-width: 80%;
}

.message-content p {
  background: white;
  padding: 12px 16px;
  border-radius: 12px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
}

.user-message {
  flex-direction: row-reverse;
}

.user-message .message-content {
  text-align: right;
}

.user-message .message-content p {
  background: var(--primary-color);
  color: white;
}

/* Message Suggestions */
.message-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.suggestion-btn {
  background: white;
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-colors);
  color: var(--secondary-color);
}

.suggestion-btn:hover {
  background: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
}

/* Input Area */
.chatbot-input-area {
  display: flex;
  gap: 10px;
  padding: 16px;
  background: white;
  border-top: 1px solid var(--border-color);
}

#chatbot-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

#chatbot-input:focus {
  border-color: var(--secondary-color);
}

.chatbot-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--secondary-color);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition-transform);
}

.chatbot-send-btn:hover {
  transform: scale(1.1);
}

.chatbot-send-btn:active {
  transform: scale(0.95);
}

.chatbot-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Typing Indicator */
.chatbot-typing {
  padding: 10px 20px;
  background: var(--bg-light);
  border-top: 1px solid var(--border-color);
}

.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 8px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--text-light);
  border-radius: 50%;
  animation: typingDot 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {
  0%,
  60%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
  30% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .chatbot-panel {
    width: calc(100vw - 20px);
    right: 10px;
    bottom: 80px;
  }

  #chatbot-container {
    right: 10px;
    bottom: 10px;
  }

  .chatbot-btn {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }

  .chatbot-tooltip {
    display: none;
  }
}

/* ============================================
   VISION AI STYLES
   ============================================ */

/* Vision AI Container */
#vision-ai-container {
  margin-top: 12px;
  margin-bottom: 20px;
}

/* Vision AI Button */
#btn-vision-ai {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

#btn-vision-ai i {
  font-size: 1.1rem;
}

#btn-vision-ai:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #ccc;
}

#btn-vision-ai:disabled:hover {
  background-color: #ccc;
  transform: none;
  box-shadow: none;
}

/* Loading State */
#btn-vision-ai.loading i {
  animation: spin 1s linear infinite;
}

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

/* Vision AI Notification */
.vision-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 400px;
  z-index: 10000;
  transform: translateX(500px);
  opacity: 0;
  transition: all 0.3s ease;
}

.vision-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.vision-notification i {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.vision-notification span {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-color);
}

.vision-notification-success {
  border-left: 4px solid var(--primary-color);
}

.vision-notification-success i {
  color: var(--primary-color);
}

.vision-notification-error {
  border-left: 4px solid var(--secondary-color);
}

.vision-notification-error i {
  color: var(--secondary-color);
}

/* Responsive adjustments for Vision AI */
@media (max-width: 768px) {
  #btn-vision-ai {
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
    padding: 10px 20px;
  }

  .vision-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}
