/* ============================================================
   Nellore Municipal Corporation - Cleanliness Management System
   Custom Stylesheet
   Built for Bootstrap 5.3.0
   ============================================================ */

/* ----- Google Fonts — Inter for clean, professional typography ----- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ----- CSS Custom Properties ----- */
:root {
  --navy-primary: #1a237e;
  --navy-dark: #0f1654;
  --navy-light: #283593;
  --teal-accent: #00897b;
  --teal-light: #4db6ac;
  --teal-dark: #00695c;
  --gold-highlight: #e8a817;
  --gold-light: #f5c842;
  --gold-dark: #c78f0a;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --bg-light: #f1f5f9;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-hover: 0 16px 48px rgba(15, 23, 42, 0.12), 0 6px 16px rgba(15, 23, 42, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition-base: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- Global Resets & Base ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

main {
  flex: 1;
}

a {
  color: var(--teal-accent);
  text-decoration: none;
  transition: var(--transition-base);
}

a:hover {
  color: var(--teal-dark);
}

::selection {
  background-color: var(--navy-primary);
  color: #ffffff;
}

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--navy-primary);
  margin-bottom: 0.5em;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: 0.25rem;
  position: relative;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.section-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy-primary);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--gold-highlight);
  display: inline-block;
}


/* =============================================================
   NAVBAR - Government Style (.navbar-gov)
   ============================================================= */
.navbar-gov {
  background: linear-gradient(135deg, #1e2a78 0%, #131a5c 100%);
  padding: 0.5rem 1rem;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.2);
  z-index: 1050;
  border-bottom: 2px solid var(--gold-highlight);
}

.navbar-gov .navbar-brand {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  letter-spacing: 0.3px;
}

.navbar-gov .navbar-brand img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.navbar-gov .navbar-brand:hover {
  color: var(--gold-highlight);
}

.navbar-gov .navbar-brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.navbar-gov .navbar-brand .brand-text small {
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.85;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.navbar-gov .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
  position: relative;
}

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

.navbar-gov .nav-link.active {
  color: var(--gold-highlight);
  background-color: rgba(255, 255, 255, 0.08);
}

.navbar-gov .nav-link .badge {
  font-size: 0.65rem;
  padding: 0.2em 0.5em;
  position: relative;
  top: -2px;
}

.navbar-gov .dropdown-menu {
  background: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  margin-top: 0.5rem;
  min-width: 200px;
  animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.navbar-gov .dropdown-item {
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: var(--transition-base);
}

.navbar-gov .dropdown-item:hover {
  background-color: var(--bg-light);
  color: var(--navy-primary);
  padding-left: 1.25rem;
}

.navbar-gov .dropdown-item i {
  width: 20px;
  text-align: center;
  margin-right: 0.5rem;
  color: var(--teal-accent);
}

.navbar-gov .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
  padding: 0.35rem 0.6rem;
}

.navbar-gov .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-gov .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--gold-highlight);
  object-fit: cover;
}

.navbar-gov .user-info {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  line-height: 1.3;
}

.navbar-gov .user-info small {
  color: var(--gold-highlight);
  font-size: 0.7rem;
}


/* =============================================================
   SIDEBAR (optional)
   ============================================================= */
.sidebar {
  background: #ffffff;
  min-height: calc(100vh - 64px);
  border-right: 1px solid var(--border-color);
  padding: 1rem 0;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

.sidebar .nav-link {
  color: var(--text-primary);
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  border-radius: 0;
  border-left: 3px solid transparent;
  transition: var(--transition-base);
}

.sidebar .nav-link:hover {
  background-color: var(--bg-light);
  color: var(--navy-primary);
  border-left-color: var(--teal-accent);
}

.sidebar .nav-link.active {
  background-color: rgba(0, 137, 123, 0.08);
  color: var(--teal-accent);
  border-left-color: var(--teal-accent);
  font-weight: 600;
}

.sidebar .nav-link i {
  width: 22px;
  text-align: center;
  margin-right: 0.75rem;
}


/* =============================================================
   CARDS - Modern Design
   ============================================================= */
.card {
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  background: var(--bg-white);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 0, 0, 0.06);
}

.card-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--navy-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header .card-title {
  margin-bottom: 0;
  font-size: 1rem;
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
}

/* Card with left border accent */
.card-accent-teal {
  border-left: 4px solid var(--teal-accent);
}

.card-accent-navy {
  border-left: 4px solid var(--navy-primary);
}

.card-accent-gold {
  border-left: 4px solid var(--gold-highlight);
}


/* =============================================================
   STAT CARDS with Gradient Backgrounds
   ============================================================= */
.card-stat {
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-base);
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.card-stat::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition-slow);
}

.card-stat:hover::before {
  transform: scale(1.3);
}

.card-stat::after {
  content: '';
  position: absolute;
  bottom: -30px;
  right: 30px;
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.card-stat .stat-icon {
  font-size: 2.25rem;
  opacity: 0.85;
  position: absolute;
  top: 1rem;
  right: 1.25rem;
}

.card-stat .stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.card-stat .stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.card-stat .stat-change {
  font-size: 0.75rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.card-stat .stat-change.positive {
  color: #a5d6a7;
}

.card-stat .stat-change.negative {
  color: #ef9a9a;
}

/* Gradient Backgrounds — refined, muted-premium palette */
.blue-gradient {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b68d9 100%);
}

.green-gradient {
  background: linear-gradient(135deg, #166534 0%, #22a55b 100%);
}

.orange-gradient {
  background: linear-gradient(135deg, #c2410c 0%, #f59e0b 100%);
}

.red-gradient {
  background: linear-gradient(135deg, #991b1b 0%, #dc3545 100%);
}

.teal-gradient {
  background: linear-gradient(135deg, #115e59 0%, #0d9488 100%);
}

.purple-gradient {
  background: linear-gradient(135deg, #5b21b6 0%, #8b5cf6 100%);
}

/* Counter Animation */
.stat-counter {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  transition: var(--transition-slow);
}


/* =============================================================
   DATA TABLES - Professional Styling
   ============================================================= */
.table-container {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table {
  margin-bottom: 0;
  font-size: 0.875rem;
}

.table thead th {
  background: linear-gradient(135deg, #1e2a78 0%, #283593 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.85rem 1rem;
  border: none;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

.table thead th:first-child {
  border-top-left-radius: var(--radius-md);
}

.table thead th:last-child {
  border-top-right-radius: var(--radius-md);
}

.table tbody tr {
  transition: var(--transition-base);
  border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.table tbody tr:hover {
  background-color: #f0f7ff;
  box-shadow: inset 3px 0 0 var(--teal-accent);
}

.table tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  color: var(--text-primary);
  border-top: none;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* Table action buttons */
.table .btn-action {
  padding: 0.3rem 0.5rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
  border: none;
}

.table .btn-action:hover {
  transform: scale(1.05);
}

/* Scrollable table wrapper */
.table-responsive {
  border-radius: var(--radius-md);
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
  background: var(--bg-light);
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}

/* DataTables integration overrides */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  transition: var(--transition-base);
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--teal-accent);
  box-shadow: 0 0 0 3px rgba(0, 137, 123, 0.15);
  outline: none;
}

.dataTables_wrapper .dataTables_info {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: var(--radius-sm) !important;
  margin: 0 2px;
  transition: var(--transition-base);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--navy-primary) !important;
  color: #ffffff !important;
  border-color: var(--navy-primary) !important;
}


/* =============================================================
   STATUS BADGES - Pill Shaped
   ============================================================= */
.badge-pending {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.3em 0.85em;
  border-radius: 50px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.badge-approved {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.3em 0.85em;
  border-radius: 50px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.badge-rejected {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.3em 0.85em;
  border-radius: 50px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.badge-info {
  background-color: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.3em 0.85em;
  border-radius: 50px;
}

.badge-completed {
  background-color: #ccfbf1;
  color: #0f766e;
  border: 1px solid #5eead4;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.3em 0.85em;
  border-radius: 50px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.badge-in-progress {
  background-color: #e0e7ff;
  color: #3730a3;
  border: 1px solid #a5b4fc;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.3em 0.85em;
  border-radius: 50px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}


/* =============================================================
   FORM INPUTS - Modern Styling
   ============================================================= */
.form-control,
.form-select {
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  background-color: var(--bg-white);
  transition: var(--transition-base);
}

.form-control:focus,
.form-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.form-control:hover,
.form-select:hover {
  border-color: #93c5fd;
}

.form-control::placeholder {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--navy-primary);
  margin-bottom: 0.4rem;
}

.form-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Input group addons */
.input-group-text {
  background-color: var(--bg-light);
  border: 1.5px solid var(--border-color);
  color: var(--teal-accent);
  font-size: 0.875rem;
}

/* Floating labels */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--teal-accent);
}

/* Custom checkbox / radio */
.form-check-input:checked {
  background-color: var(--teal-accent);
  border-color: var(--teal-accent);
}

.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(0, 137, 123, 0.15);
  border-color: var(--teal-accent);
}

/* Validation states */
.was-validated .form-control:valid,
.form-control.is-valid {
  border-color: #2e7d32;
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
  border-color: #c62828;
}

/* Textarea */
textarea.form-control {
  min-height: 100px;
  resize: vertical;
}


/* =============================================================
   BUTTONS
   ============================================================= */
.btn {
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.2px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  border-color: #1e3a8a;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  border-color: #1e40af;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.3);
  transform: translateY(-1px);
}

.btn-teal {
  background: var(--teal-accent);
  border-color: var(--teal-accent);
  color: #ffffff;
}

.btn-teal:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 137, 123, 0.3);
}

.btn-gold {
  background: var(--gold-highlight);
  border-color: var(--gold-highlight);
  color: var(--navy-dark);
}

.btn-gold:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(249, 168, 37, 0.3);
}

.btn-outline-teal {
  border: 1.5px solid var(--teal-accent);
  color: var(--teal-accent);
  background: transparent;
}

.btn-outline-teal:hover {
  background: var(--teal-accent);
  color: #ffffff;
}

.btn-outline-navy {
  border: 1.5px solid var(--navy-primary);
  color: var(--navy-primary);
  background: transparent;
}

.btn-outline-navy:hover {
  background: var(--navy-primary);
  color: #ffffff;
}

/* Icon button */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.875rem;
}


/* =============================================================
   LOGIN PAGE - Split Screen Layout
   ============================================================= */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

.login-left-panel {
  flex: 1;
  background: linear-gradient(135deg, #0f1654 0%, #1e2a78 50%, #283593 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.login-left-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 137, 123, 0.15) 0%, transparent 60%);
  animation: loginPulse 8s ease-in-out infinite;
}

@keyframes loginPulse {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

.login-left-panel .logo-container {
  text-align: center;
  z-index: 1;
  position: relative;
}

.login-left-panel .logo-container img {
  width: 100px;
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.login-left-panel h1 {
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
}

.login-left-panel p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  text-align: center;
  max-width: 360px;
}

.login-left-panel .gov-emblem {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  z-index: 1;
  position: relative;
}

.login-left-panel .gov-emblem small {
  color: var(--gold-highlight);
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.login-right-panel {
  flex: 1;
  background: var(--bg-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.login-right-panel .login-form-container {
  width: 100%;
  max-width: 400px;
}

.login-right-panel h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: 0.25rem;
}

.login-right-panel .login-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.login-right-panel .form-control {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
}

.login-right-panel .btn-login {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--navy-primary);
  border-color: var(--navy-primary);
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
}

.login-right-panel .btn-login:hover {
  background: var(--navy-light);
  border-color: var(--navy-light);
  box-shadow: 0 6px 20px rgba(26, 35, 126, 0.35);
  transform: translateY(-1px);
}

.login-footer-text {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}


/* =============================================================
   FOOTER - Government Style (.footer-gov)
   ============================================================= */
.footer-gov {
  background: linear-gradient(135deg, #131a5c 0%, #1e2a78 100%);
  color: rgba(255, 255, 255, 0.75);
  padding: 1.5rem 0;
  font-size: 0.8rem;
  border-top: 2px solid var(--gold-highlight);
  margin-top: auto;
}

.footer-gov a {
  color: var(--gold-highlight);
  transition: var(--transition-base);
}

.footer-gov a:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

.footer-gov .footer-brand {
  font-weight: 600;
  color: #ffffff;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.footer-gov .footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-gov .footer-links li a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.8rem;
}

.footer-gov .footer-links li a:hover {
  color: var(--gold-highlight);
}

.footer-gov hr {
  border-color: rgba(255, 255, 255, 0.1);
  margin: 1rem 0;
}

.footer-gov .copyright {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}


/* =============================================================
   EXPORT BUTTON GROUP
   ============================================================= */
.export-btn-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.export-btn-group .btn {
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

.export-btn-group .btn-excel {
  background: #1d6f42;
  border-color: #1d6f42;
  color: #ffffff;
}

.export-btn-group .btn-excel:hover {
  background: #17593a;
  box-shadow: 0 3px 10px rgba(29, 111, 66, 0.3);
}

.export-btn-group .btn-pdf {
  background: #d32f2f;
  border-color: #d32f2f;
  color: #ffffff;
}

.export-btn-group .btn-pdf:hover {
  background: #b71c1c;
  box-shadow: 0 3px 10px rgba(211, 47, 47, 0.3);
}

.export-btn-group .btn-print {
  background: var(--navy-primary);
  border-color: var(--navy-primary);
  color: #ffffff;
}

.export-btn-group .btn-print:hover {
  background: var(--navy-light);
  box-shadow: 0 3px 10px rgba(26, 35, 126, 0.3);
}

.export-btn-group .btn-csv {
  background: #00796b;
  border-color: #00796b;
  color: #ffffff;
}

.export-btn-group .btn-csv:hover {
  background: #00695c;
  box-shadow: 0 3px 10px rgba(0, 121, 107, 0.3);
}


/* =============================================================
   FILTER BAR
   ============================================================= */
.filter-bar {
  background: var(--bg-white);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  border: 1px solid var(--border-color);
}

.filter-bar .form-group {
  flex: 1;
  min-width: 180px;
}

.filter-bar .form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
}

.filter-bar .form-control,
.filter-bar .form-select {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
}

.filter-bar .btn {
  white-space: nowrap;
  min-width: 100px;
}

.filter-bar .filter-actions {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}


/* =============================================================
   LOADING SPINNER
   ============================================================= */
.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 137, 123, 0.2);
  border-top-color: var(--teal-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-spinner.spinner-sm {
  width: 24px;
  height: 24px;
  border-width: 3px;
}

.loading-spinner.spinner-lg {
  width: 56px;
  height: 56px;
  border-width: 5px;
}

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

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(3px);
}

.loading-overlay .loading-text {
  margin-top: 1rem;
  color: var(--navy-primary);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

/* Page-level spinner for containers */
.content-loading {
  position: relative;
  min-height: 200px;
}

.content-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid rgba(0, 137, 123, 0.2);
  border-top-color: var(--teal-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}


/* =============================================================
   TOAST NOTIFICATIONS
   ============================================================= */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 380px;
  width: 100%;
  pointer-events: none;
}

.toast-container .toast {
  pointer-events: auto;
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: toastSlideIn 0.35s ease;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-container .toast.toast-success {
  border-left: 4px solid #2e7d32;
}

.toast-container .toast.toast-error {
  border-left: 4px solid #c62828;
}

.toast-container .toast.toast-warning {
  border-left: 4px solid #e65100;
}

.toast-container .toast.toast-info {
  border-left: 4px solid #1565c0;
}


/* =============================================================
   ALERTS
   ============================================================= */
.alert {
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  padding: 0.85rem 1.25rem;
  border-left: 4px solid transparent;
}

.alert-success {
  background-color: #e8f5e9;
  color: #1b5e20;
  border-left-color: #2e7d32;
}

.alert-danger {
  background-color: #ffebee;
  color: #b71c1c;
  border-left-color: #c62828;
}

.alert-warning {
  background-color: #fff3e0;
  color: #e65100;
  border-left-color: #ef6c00;
}

.alert-info {
  background-color: #e3f2fd;
  color: #0d47a1;
  border-left-color: #1565c0;
}


/* =============================================================
   MODAL OVERRIDES
   ============================================================= */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, #1e2a78 0%, #283593 100%);
  color: #ffffff;
  padding: 1rem 1.5rem;
  border-bottom: none;
}

.modal-header .modal-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: #ffffff;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.modal-header .btn-close:hover {
  opacity: 1;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-light);
}


/* =============================================================
   PAGINATION
   ============================================================= */
.pagination .page-link {
  color: var(--navy-primary);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.8rem;
  font-size: 0.85rem;
  transition: var(--transition-base);
  margin: 0 2px;
  border-radius: var(--radius-sm);
}

.pagination .page-link:hover {
  background: var(--navy-primary);
  color: #ffffff;
  border-color: var(--navy-primary);
}

.pagination .page-item.active .page-link {
  background: var(--navy-primary);
  border-color: var(--navy-primary);
}


/* =============================================================
   BREADCRUMBS
   ============================================================= */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1rem;
  font-size: 0.825rem;
}

.breadcrumb-item a {
  color: var(--teal-accent);
}

.breadcrumb-item.active {
  color: var(--text-secondary);
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-muted);
}


/* =============================================================
   DASHBOARD SPECIFIC
   ============================================================= */
.dashboard-header {
  margin-bottom: 1.5rem;
}

.welcome-card {
  background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-light) 60%, var(--teal-accent) 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.welcome-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.welcome-card h2 {
  color: #ffffff;
  font-weight: 700;
}

.welcome-card p {
  opacity: 0.85;
  margin-bottom: 0;
}

/* Chart containers */
.chart-container {
  position: relative;
  padding: 1rem;
}

.chart-container canvas {
  width: 100% !important;
}


/* =============================================================
   MISC UTILITIES
   ============================================================= */
.text-navy { color: var(--navy-primary) !important; }
.text-teal { color: var(--teal-accent) !important; }
.text-gold { color: var(--gold-highlight) !important; }
.bg-navy { background-color: var(--navy-primary) !important; }
.bg-teal { background-color: var(--teal-accent) !important; }
.bg-gold { background-color: var(--gold-highlight) !important; }

.border-teal { border-color: var(--teal-accent) !important; }
.border-navy { border-color: var(--navy-primary) !important; }
.border-gold { border-color: var(--gold-highlight) !important; }

.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-color), transparent);
  margin: 1.5rem 0;
}

.hover-lift {
  transition: var(--transition-base);
}

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

.cursor-pointer {
  cursor: pointer;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: #bdbdbd;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9e9e9e;
}

/* Image preview thumbnail */
.img-thumbnail-sm {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-base);
}

.img-thumbnail-sm:hover {
  border-color: var(--teal-accent);
  transform: scale(1.1);
}

/* Camera container */
.camera-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

#camera-preview, #camera-output {
  width: 100%;
  border-radius: var(--radius-sm);
}

#image-preview {
  max-height: 200px;
  border-radius: var(--radius-sm);
}

/* Map container */
#map {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: block;
}

.empty-state h5 {
  color: var(--text-secondary);
  font-weight: 600;
}

/* Avatar / profile */
.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: #ffffff;
  background: var(--teal-accent);
  flex-shrink: 0;
}

.avatar-circle.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.avatar-circle.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 1.25rem;
}

/* Timeline for activity log */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.6rem;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal-accent);
  border: 2px solid var(--bg-white);
  box-shadow: 0 0 0 2px var(--teal-accent);
}

.timeline-item .timeline-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

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


/* =============================================================
   RESPONSIVE DESIGN
   ============================================================= */
@media (max-width: 991.98px) {
  .login-left-panel {
    display: none;
  }

  .login-right-panel {
    flex: 1;
    padding: 2rem 1.5rem;
  }

  .navbar-gov .navbar-brand {
    font-size: 0.95rem;
  }

  .navbar-gov .navbar-brand img {
    height: 32px;
  }
}

@media (max-width: 768px) {
  .page-title {
    font-size: 1.35rem;
  }

  .card-stat {
    min-height: auto;
    padding: 1rem;
  }

  .card-stat .stat-value {
    font-size: 1.5rem;
  }

  .card-stat .stat-icon {
    font-size: 1.75rem;
  }

  .stat-counter {
    font-size: 1.75rem;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .filter-bar .form-group {
    min-width: 100%;
  }

  .filter-bar .filter-actions {
    width: 100%;
  }

  .filter-bar .filter-actions .btn {
    flex: 1;
  }

  .export-btn-group {
    width: 100%;
  }

  .export-btn-group .btn {
    flex: 1;
    justify-content: center;
  }

  .table thead th {
    font-size: 0.72rem;
    padding: 0.65rem 0.5rem;
  }

  .table tbody td {
    font-size: 0.8rem;
    padding: 0.6rem 0.5rem;
  }

  .card-body {
    padding: 1rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .welcome-card {
    padding: 1.25rem;
  }

  .welcome-card h2 {
    font-size: 1.15rem;
  }

  .footer-gov {
    text-align: center;
  }

  .footer-gov .footer-links {
    justify-content: center;
  }

  .toast-container {
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .sidebar {
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .breadcrumb {
    font-size: 0.75rem;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .table-responsive {
    font-size: 0.875rem;
  }
}

@media (max-width: 576px) {
  .navbar-gov .navbar-brand .brand-text {
    display: none;
  }

  .card-stat .stat-label {
    font-size: 0.7rem;
  }

  .card-stat .stat-value {
    font-size: 1.25rem;
  }

  .page-title {
    font-size: 1.15rem;
  }

  .page-subtitle {
    font-size: 0.825rem;
  }
}


/* =============================================================
   PRINT STYLES
   ============================================================= */
@media print {
  *,
  *::before,
  *::after {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
    line-height: 1.5;
  }

  /* Hide non-essential elements */
  .navbar-gov,
  .footer-gov,
  .sidebar,
  .filter-bar,
  .export-btn-group,
  .btn,
  .toast-container,
  .loading-overlay,
  .loading-spinner,
  .breadcrumb,
  .pagination,
  .modal-backdrop,
  .dropdown-menu,
  .form-check,
  .btn-action,
  .no-print {
    display: none !important;
  }

  main {
    padding: 0 !important;
    margin: 0 !important;
  }

  .container,
  .container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .row {
    margin: 0 !important;
  }

  .col, [class*="col-"] {
    padding: 0 0.25rem !important;
  }

  /* Card stat printing */
  .card-stat {
    border: 1px solid #cccccc !important;
    background: #ffffff !important;
    color: #000000 !important;
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .card-stat .stat-label {
    color: #333333 !important;
  }

  .card-stat .stat-value {
    color: #000000 !important;
    font-size: 1.5rem;
  }

  .card-stat .stat-icon {
    display: none;
  }

  .card-stat::before,
  .card-stat::after {
    display: none;
  }

  /* Card printing */
  .card {
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .card-header {
    background: #f5f5f5 !important;
    border-bottom: 1px solid #cccccc !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Table printing */
  .table {
    border-collapse: collapse !important;
    width: 100% !important;
  }

  .table thead th {
    background: #e0e0e0 !important;
    color: #000000 !important;
    border: 1px solid #cccccc !important;
    font-size: 9pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .table tbody td {
    border: 1px solid #cccccc !important;
    font-size: 9pt;
    padding: 4px 8px !important;
  }

  .table tbody tr:nth-child(even) {
    background: #f9f9f9 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .table tbody tr:hover {
    box-shadow: none !important;
  }

  /* Badge printing */
  .badge-pending,
  .badge-approved,
  .badge-rejected,
  .badge-completed,
  .badge-in-progress,
  .badge-info {
    border: 1px solid #999999 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Print header */
  .print-header {
    display: block !important;
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #000000;
  }

  .print-header h1 {
    font-size: 14pt;
    color: #000000;
    margin: 0;
  }

  .print-header p {
    font-size: 10pt;
    color: #333333;
    margin: 0.25rem 0 0 0;
  }

  /* Links for printing */
  a[href]::after {
    content: none !important;
  }

  /* Page breaks */
  h2, h3, h4 {
    page-break-after: avoid;
  }

  .page-break-before {
    page-break-before: always;
  }

  .page-break-after {
    page-break-after: always;
  }

  @page {
    margin: 1.5cm;
    size: A4 landscape;
  }
}

/* Show only in print */
.print-only {
  display: none !important;
}

@media print {
  .print-only {
    display: block !important;
  }
}


/* =============================================================
   ANIMATIONS & TRANSITIONS
   ============================================================= */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease;
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease;
}

.animate-fade-in-down {
  animation: fadeInDown 0.5s ease;
}

.animate-slide-in-left {
  animation: slideInLeft 0.4s ease;
}

/* Stagger children animations */
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
