/* 
  Humara Ward - Ward Parshad Shikayat & Niwaran Portal
  Modern Civic Responsive CSS Design System
*/

@import url('https://fonts.googleapis.com/css2?family=Hind:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --primary-navy: #0f172a;
  --primary-blue: #1e3a8a;
  --primary-accent: #2563eb;
  --saffron-orange: #ea580c;
  --saffron-hover: #c2410c;
  --emerald-green: #10b981;
  --rose-red: #f43f5e;
  --amber-yellow: #f59e0b;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-alt: #f1f5f9;
  
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-light: #e2e8f0;
  --border-focus: #3b82f6;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.2);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* Header & Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--saffron-orange), #fb923c);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
}

.brand-text h1 {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-text p {
  color: #94a3b8;
  font-size: 0.78rem;
}

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

.nav-link {
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--saffron-orange), var(--saffron-hover));
  color: #ffffff !important;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.45);
}

.btn-secondary {
  background: #ffffff;
  color: var(--primary-navy) !important;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border-light);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--bg-alt);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 500;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Layout Container */
.main-wrapper {
  flex: 1;
  padding-bottom: 3rem;
}

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

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff;
  padding: 3.5rem 0 4.5rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(234, 88, 12, 0.2) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(234, 88, 12, 0.2);
  color: #fdba74;
  border: 1px solid rgba(234, 88, 12, 0.4);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.hero-subtitle {
  color: #cbd5e1;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

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

/* Councillor Card */
.councillor-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.councillor-avatar {
  width: 105px;
  height: 105px;
  border-radius: 50%;
  margin: 0 auto 1rem auto;
  overflow: hidden;
  border: 3px solid #f97316;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.25) 0%, rgba(15, 23, 42, 0.9) 80%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.councillor-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform: scale(1.08);
}

.councillor-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.councillor-card p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.councillor-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  text-align: left;
}

.councillor-meta-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #e2e8f0;
}

.councillor-meta-item i {
  color: #f97316;
  width: 18px;
}

/* Section Cards & Features */
.section-header {
  margin: 3rem 0 1.75rem 0;
  text-align: center;
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-navy);
}

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

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-icon.total { background: #e0f2fe; color: #0284c7; }
.stat-icon.pending { background: #fef3c7; color: #d97706; }
.stat-icon.progress { background: #dbeafe; color: #2563eb; }
.stat-icon.resolved { background: #d1fae5; color: #059669; }

.stat-info h4 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-navy);
  line-height: 1;
}

.stat-info p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

/* Forms & Cards */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
  max-width: 800px;
  margin: -2.5rem auto 2rem auto;
  position: relative;
  z-index: 10;
}

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

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

.form-group label span.required {
  color: var(--rose-red);
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 0.98rem;
  font-family: inherit;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text-dark);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.help-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Upload Dropzone */
.file-upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  background: var(--bg-alt);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.file-upload-area:hover, .file-upload-area.dragover {
  border-color: var(--primary-accent);
  background: #eff6ff;
}

.file-upload-icon {
  font-size: 2.2rem;
  color: var(--primary-accent);
  margin-bottom: 0.75rem;
}

.image-preview {
  margin-top: 1rem;
  display: none;
  position: relative;
}

.image-preview img {
  max-width: 100%;
  max-height: 220px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-pending {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-progress {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-resolved {
  background: #d1fae5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-rejected {
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fecdd3;
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-error {
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.alert-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Tracking Timeline */
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

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

.tracking-id {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-navy);
}

.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--border-light);
}

.timeline-step {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-step:last-child {
  margin-bottom: 0;
}

.timeline-icon {
  position: absolute;
  left: -2rem;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid #cbd5e1;
  z-index: 2;
}

.timeline-step.completed .timeline-icon {
  background: var(--emerald-green);
  border-color: var(--emerald-green);
}

.timeline-step.active .timeline-icon {
  background: var(--primary-accent);
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.timeline-content h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
}

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

/* Resolution Comparison Card */
.photos-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.photo-box {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.photo-box h6 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.photo-box img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

/* Admin Dashboard Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  text-align: left;
  font-size: 0.92rem;
}

.admin-table th {
  background: #f1f5f9;
  color: var(--primary-navy);
  font-weight: 700;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--border-light);
  white-space: nowrap;
}

.admin-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.admin-table tr:hover {
  background: #f8fafc;
}

.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
  box-shadow: var(--shadow-sm);
}

/* Modal Popup */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg-alt);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
.site-footer {
  background: var(--primary-navy);
  color: #94a3b8;
  padding: 3rem 0 1.5rem 0;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

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

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-col p {
  line-height: 1.6;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

/* Mobile Hamburger Menu Button */
.mobile-menu-btn {
  display: none;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .nav-container {
    padding: 0.75rem 1rem;
  }
  
  .hero-title {
    font-size: 2.1rem;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0f172a;
    border-bottom: 2px solid var(--saffron-orange);
    flex-direction: column;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    z-index: 999;
  }

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

  .nav-link {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .hero-section {
    padding: 2rem 0 3rem 0;
  }

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

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

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

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

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 0.85rem;
  }

  .form-card {
    padding: 1.25rem;
    margin-top: 1rem;
    border-radius: var(--radius-md);
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

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

  .stat-card {
    padding: 1rem;
  }

  .stat-info h4 {
    font-size: 1.4rem;
  }

  .filter-bar {
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar form > div {
    width: 100% !important;
  }

  .modal-box {
    padding: 1.25rem;
    width: 95%;
    max-height: 94vh;
    border-radius: var(--radius-md);
  }

  .photos-comparison {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 2rem 0 1rem 0;
  }
}

@media (max-width: 480px) {
  .brand-text h1 {
    font-size: 1rem;
  }

  .brand-text p {
    font-size: 0.7rem;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

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

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

  .btn-primary, .btn-secondary, .btn-outline {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
  }

  .admin-table th, .admin-table td {
    padding: 0.75rem 0.85rem;
    font-size: 0.85rem;
  }
}
