/* Base styles */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f8f9fa;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

/* Wrapper */
.wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* Sidebar */
#sidebar {
  min-width: 250px;
  max-width: 250px;
  background: #343a40;
  color: #fff;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  height: 100vh !important;
  z-index: 1000 !important;
  overflow-y: auto;
  transform: none !important;
}

#sidebar.collapsed {
  margin-left: -250px;
}

#sidebar.collapsed + #content {
  margin-left: 0;
}

#sidebar .sidebar-header {
  padding: 20px;
  background: #2c3136;
  text-align: center;
}

#sidebar .sidebar-header .logo {
  height: 40px;
}

#sidebar ul.components {
  padding: 20px 0;
  flex-grow: 1;
}

#sidebar ul li a {
  padding: 10px 20px;
  font-size: 1.1em;
  display: flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s;
}

#sidebar ul li a:hover {
  background: #2c3136;
}

#sidebar ul li.active > a {
  background: #2c3136;
}

#sidebar ul li a i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

#sidebar ul.collapse.list-unstyled {
  padding-left: 30px;
}

#sidebar ul.collapse.list-unstyled a {
  font-size: 0.9em;
  padding: 5px 10px;
}

/* Content */
#content {
  width: 100%;
  min-height: 100vh;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  margin-left: 250px;
  position: relative;
}

/* Report Viewer Styles */
.report-container {
  max-width: 100%;
  overflow-x: auto;
}

.report-header {
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.report-header h4 {
  color: #343a40;
  margin-bottom: 0.5rem;
}

.report-content {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1rem;
  min-height: 400px;
  overflow-y: auto;
  max-height: 600px;
}

.report-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.report-content table th,
.report-content table td {
  border: 1px solid #dee2e6;
  padding: 0.5rem;
  text-align: left;
}

.report-content table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

.report-content .text-center {
  text-align: center;
}

.report-content .text-right {
  text-align: right;
}

.report-content .text-bold {
  font-weight: bold;
}

.report-content .page-break {
  page-break-before: always;
}

/* Modal adjustments for report viewing */
.modal-xl {
  max-width: 95%;
}

.modal-xl .modal-body {
  max-height: 80vh;
  overflow-y: auto;
}

#reportViewerContainer {
  min-height: 400px;
}

/* Print styles for reports */
@media print {
  .report-content {
    border: none;
    padding: 0;
    max-height: none;
    overflow: visible;
  }
  
  .modal-header,
  .modal-footer {
    display: none;
  }
  
  .modal-body {
    padding: 0;
  }
}

/* Top Navigation */
.navbar {
  padding: 15px;
  background: #fff !important;
  border-bottom: 1px solid #dee2e6;
}

/* Navbar Layout */
.navbar .container-fluid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.navbar-left {
  flex: 1;
  display: flex;
  align-items: center;
}

.navbar-center {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.navbar-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Sync Message Area in Navbar */
.navbar .sync-message-container {
  min-height: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 4px;
  background-color: rgba(0, 123, 255, 0.1);
  border: 1px solid rgba(0, 123, 255, 0.2);
  transition: all 0.3s ease;
  max-width: 350px;
  text-align: center;
  font-size: 0.85rem;
  color: #0d6efd;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
}

.navbar .sync-message-container:not(:empty) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navbar .sync-message-container.syncing {
  background-color: rgba(255, 193, 7, 0.1);
  border-color: rgba(255, 193, 7, 0.3);
  color: #856404;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navbar .sync-message-container.success {
  background-color: rgba(40, 167, 69, 0.1);
  border-color: rgba(40, 167, 69, 0.3);
  color: #155724;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navbar .sync-message-container.error {
  background-color: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.3);
  color: #721c24;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navbar .sync-message-container.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
}

.navbar .sync-message {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.navbar .sync-message i {
  font-size: 0.9rem;
}

.navbar .sync-message .spinner-border {
  width: 0.9rem;
  height: 0.9rem;
  border-width: 0.12em;
}

/* Sync Progress Bar - Removed as per requirements */

/* Sync Progress Text - Removed as per requirements */

/* Sync Additional Info */
.navbar .sync-additional-info {
  font-size: 0.75rem;
  font-weight: 400;
  color: inherit;
  text-align: center;
  margin-top: 2px;
  opacity: 0.9;
  line-height: 1.2;
}

/* Responsive adjustments for navbar */
@media (max-width: 768px) {
  .navbar .container-fluid {
    flex-direction: column;
    gap: 10px;
  }
  
  .navbar-left,
  .navbar-center,
  .navbar-right {
    flex: none;
    width: 100%;
  }
  
  .navbar-center {
    order: 2;
  }
  
  .navbar-right {
    order: 3;
  }
  
  .navbar .sync-message-container {
    max-width: 100%;
    margin: 0 10px;
  }
}

#sidebarCollapse {
  padding: 5px 10px;
}

/* Dropdown menus */
.dropdown-menu {
  padding: 0.5rem 0;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
}

.dropdown-item i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

/* Main content area */
main.container-fluid {
  padding: 20px;
  flex-grow: 1;
}

/* Responsive */
@media (max-width: 768px) {
  #sidebar {
    margin-left: -250px;
    position: fixed;
  }
  #sidebar.mobile-open {
    margin-left: 0;
  }
  #content {
    margin-left: 0;
  }
}

/* Dashboard specific styles */
.dashboard-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

/* Dashboard Header Layout */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px 0;
  border-bottom: 1px solid #dee2e6;
}

.header-left {
  flex: 1;
}

.header-center {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

/* Sync Message Area */
.sync-message-container {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  background-color: rgba(0, 123, 255, 0.1);
  border: 1px solid rgba(0, 123, 255, 0.2);
  transition: all 0.3s ease;
  max-width: 400px;
  text-align: center;
}

.sync-message-container.syncing {
  background-color: rgba(255, 193, 7, 0.1);
  border-color: rgba(255, 193, 7, 0.3);
  color: #856404;
}

.sync-message-container.success {
  background-color: rgba(40, 167, 69, 0.1);
  border-color: rgba(40, 167, 69, 0.3);
  color: #155724;
}

.sync-message-container.error {
  background-color: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.3);
  color: #721c24;
}

.sync-message-container.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
}

.sync-message {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.sync-message i {
  font-size: 1rem;
}

.sync-message .spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
}

/* Responsive adjustments for header */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .header-left,
  .header-center,
  .header-right {
    flex: none;
    width: 100%;
  }
  
  .header-center {
    order: 2;
  }
  
  .header-right {
    order: 3;
  }
  
  .sync-message-container {
    max-width: 100%;
    margin: 0 10px;
  }
}

.stats-card {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.stats-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #6c757d;
}

.stats-number {
  font-size: 2rem;
  font-weight: bold;
  margin: 10px 0;
  color: #343a40;
}

.stats-label {
  color: #6c757d;
  font-size: 0.9rem;
}

/* Card styles */
.card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.card-header {
  background-color: #fff;
  border-bottom: 1px solid #dee2e6;
  padding: 1rem;
}

.card-header h4 {
  margin: 0;
  color: #343a40;
}

.table {
  margin: 0;
}

.table th {
  border-top: none;
  color: #6c757d;
  font-weight: 500;
}

/* Button styles */
.btn-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-primary:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

/* Form styles */
.form-control {
  border-radius: 4px;
}

.form-control:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
}

/* Timeline styles */
.timeline {
    position: relative;
    padding: 0;
    list-style: none;
}

.timeline-item {
    position: relative;
    padding-left: 24px;
    margin-bottom: 20px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.timeline-content {
    padding-left: 8px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 12px;
    bottom: -20px;
    width: 2px;
    background-color: #dee2e6;
}

.timeline-item:last-child::before {
    display: none;
}

/* Print styles */
@media print {
    .sidebar,
    .navbar,
    .btn-group,
    .card-header button,
    .actions-card {
        display: none !important;
    }

    .container-fluid {
        width: 100% !important;
        padding: 0 !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
    }

    .card-header {
        background: none !important;
        border-bottom: 1px solid #000 !important;
    }

    .badge {
        border: 1px solid #000 !important;
        color: #000 !important;
        background: none !important;
    }

    .table {
        width: 100% !important;
    }

    .table td,
    .table th {
        border-color: #000 !important;
    }
}

/* Logo and Avatar Placeholders */
.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}

.user-avatar-placeholder {
  font-size: 1.5rem;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border-radius: 50%;
  border: 1px solid #dee2e6;
}

/* Enhanced Dashboard Styles */
.dashboard-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #eee;
}

.header h1 {
  color: #333;
  margin: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Calendar Section */
.calendar-section {
  margin-bottom: 2rem;
}

.calendar-section .card {
  width: 100%;
}

.calendar-section .card-header {
  background: #667eea;
  color: white;
  border-bottom: none;
}

.calendar-section .card-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.calendar-controls select {
  min-width: 150px;
}

#calendar {
  background: white;
  min-height: 600px;
}

/* FullCalendar customizations */
.fc-toolbar {
  margin-bottom: 1rem;
}

.fc-toolbar-title {
  font-size: 1.5rem !important;
  font-weight: 600;
}

.fc-button-primary {
  background-color: #667eea !important;
  border-color: #667eea !important;
}

.fc-button-primary:hover {
  background-color: #5a6fd8 !important;
  border-color: #5a6fd8 !important;
}

.fc-event {
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 0.85rem;
  white-space: pre-line;
  line-height: 1.2;
}

/* Inspections Grid Section */
.inspections-section {
  width: 100%;
}

.inspections-section .card {
  width: 100%;
}

.inspections-section .card-header {
  background: #764ba2;
  color: white;
  border-bottom: none;
}

.inspections-section .card-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.grid-controls {
  gap: 10px;
}

.table-responsive {
  min-height: 400px;
}

#inspectionsTable {
  width: 100%;
  margin-bottom: 0;
}

#inspectionsTable thead th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}

#inspectionsTable tbody tr {
  transition: background-color 0.15s ease-in-out;
}

#inspectionsTable tbody tr:hover {
  background-color: #f8f9fa;
}

#inspectionsTable tbody tr.selected {
  background-color: #e3f2fd;
}

#inspectionsTable td {
  vertical-align: middle;
  white-space: nowrap;
}

.action-buttons {
  display: flex;
  gap: 0.25rem;
}

.action-buttons .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* Status badges */
.status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-badge.scheduled {
  background-color: #E3F2FD;
  color: #1565C0;
}

.status-badge.in-progress {
  background-color: #FFF8E1;
  color: #E65100;
}

.status-badge.completed {
  background-color: #E8F5E8;
  color: #2E7D32;
}

.status-badge.cancelled {
  background-color: #F5F5F5;
  color: #424242;
}

.status-badge.overdue {
  background-color: #FFEBEE;
  color: #C62828;
}

/* System Status Modal */
.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.status-item:last-child {
  border-bottom: none;
}

.status-label {
  font-weight: 500;
  color: #666;
}

.status-success {
  color: #28a745;
  font-weight: 600;
}

.status-warning {
  color: #ffc107;
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .dashboard-container {
    padding: 10px;
  }
  
  .header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .grid-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .grid-controls input,
  .grid-controls select {
    width: 100% !important;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .fc-toolbar {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
  }
}

/* Responsive improvements for wider screens */
@media (min-width: 1200px) {
  .dashboard-container {
    max-width: 95%;
    padding: 30px;
  }
  
  .calendar-section .card-body {
    padding: 2rem;
  }
  
  .inspections-section .card-body {
    padding: 2rem;
  }
  
  #calendar {
    min-height: 700px;
  }
  
  /* Better table column distribution */
  #inspectionsTable th:nth-child(1) { width: 10%; } /* Date */
  #inspectionsTable th:nth-child(2) { width: 8%; }  /* Time */
  #inspectionsTable th:nth-child(3) { width: 10%; } /* Address Code */
  #inspectionsTable th:nth-child(4) { width: 10%; } /* Inspection # */
  #inspectionsTable th:nth-child(5) { width: 30%; } /* Address */
  #inspectionsTable th:nth-child(6) { width: 12%; } /* Type */
  #inspectionsTable th:nth-child(7) { width: 10%; } /* Status */
  #inspectionsTable th:nth-child(8) { width: 10%; } /* Actions */
}

@media (min-width: 1400px) {
  .dashboard-container {
    max-width: 98%;
    padding: 40px;
  }
  
  #calendar {
    min-height: 750px;
  }
  
  .table-responsive {
    min-height: 500px;
  }
}

/* Improve calendar event display */
.fc-event {
  border-radius: 4px;
  border: none;
  padding: 4px 6px;
  font-size: 0.75rem;
  cursor: grab;
  white-space: pre-line;
  line-height: 1.1;
  min-height: 60px;
  overflow: hidden;
  transition: all 0.2s ease-in-out;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.fc-event:hover {
  opacity: 0.8;
  transform: scale(1.02);
  cursor: move;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: all 0.2s ease-in-out;
}

.fc-event:active {
  cursor: grabbing;
}

/* Calendar event text styling */
.fc-event-title {
  white-space: pre-line;
  font-weight: 500;
}

.fc-event-title-container {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Drag and drop visual feedback */
.fc-event-dragging {
  opacity: 0.7;
  z-index: 999;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Touch device optimizations */
@media (pointer: coarse) {
  .fc-event {
    min-height: 70px;
    padding: 6px 8px;
    font-size: 0.8rem;
    cursor: pointer;
  }
  
  .fc-event:hover {
    transform: scale(1.03);
  }
  
  .fc-daygrid-event {
    margin: 2px 1px;
  }
  
  /* Larger touch targets for calendar navigation */
  .fc-button {
    min-height: 44px;
    min-width: 44px;
    padding: 8px 12px;
  }
  
  .fc-toolbar-chunk {
    margin-bottom: 10px;
  }
}

.fc-event.fc-event-mirror {
  opacity: 0.8;
  transform: rotate(2deg);
}

.fc-highlight {
  background-color: rgba(13, 110, 253, 0.2) !important;
  border: 2px dashed #0d6efd !important;
}

/* Better spacing for grid controls */
.grid-controls {
  gap: 15px;
  align-items: center;
}

.grid-controls input {
  min-width: 250px;
}

.grid-controls select {
  min-width: 140px;
}

/* Improve table appearance */
#inspectionsTable {
  font-size: 0.95rem;
}

#inspectionsTable td {
  padding: 12px 8px;
}

#inspectionsTable th {
  padding: 12px 8px;
  font-size: 0.9rem;
}

/* Dashboard page styling */
.dashboard-stats .card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.dashboard-stats .card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dashboard-stats .card-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0;
}

.dashboard-stats .text-muted {
    font-size: 0.875rem;
}

.quick-access .btn {
    border-radius: 0.5rem;
    padding: 1rem;
    height: auto;
    text-align: left;
}

.quick-access .btn i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Search forms */
.search-form {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.search-form .btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    background-color: #f8f9fa;
}

.table-responsive {
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Status badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Form controls */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Page headers */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin-bottom: 0;
    font-weight: 300;
}

/* Inspection edit form specific styles */
.inspection-form-container {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    overflow: hidden;
}

/* Tab styling */
.nav-tabs {
    border-bottom: 2px solid #e9ecef;
    background-color: #f8f9fa;
    padding: 0.5rem 1rem 0;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 0.375rem 0.375rem 0 0;
    color: #6c757d;
    font-weight: 500;
    padding: 0.75rem 1rem;
    margin-right: 0.25rem;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: #495057;
    background-color: #e9ecef;
}

.nav-tabs .nav-link.active {
    color: #495057;
    background-color: white;
    border-color: #e9ecef #e9ecef white;
    border-width: 1px 1px 2px;
}

.tab-content {
    padding: 2rem;
    min-height: 500px;
}

/* Signature pad */
.signature-container {
    border: 2px dashed #ced4da;
    border-radius: 0.375rem;
    padding: 1rem;
    text-align: center;
    background-color: #f8f9fa;
}

#signaturePad {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: white;
    cursor: crosshair;
}

/* Login page styling */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem 1rem 0 0;
    padding: 2rem;
    text-align: center;
}

.login-body {
    padding: 2rem;
}

.login-header img {
    max-height: 80px;
    margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-stats .col-md-3 {
        margin-bottom: 1rem;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.125rem 0.25rem;
        font-size: 0.6875rem;
    }
}

/* Utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animation for loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Custom scrollbar for better UX */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Vertical Panel Layout Styles */
.inspection-panels-container {
    padding-bottom: 2rem;
}

/* Sticky navigation sidebar */
.sticky-top {
    z-index: 1020;
}

.list-group-item {
    border: none;
    border-radius: 0.375rem !important;
    margin-bottom: 0.25rem;
    transition: all 0.15s ease-in-out;
}

.list-group-item:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

.list-group-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.list-group-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

/* Panel cards */
.card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.25rem;
}

.card-header h5 {
    margin-bottom: 0;
    font-weight: 600;
}

.card-header .btn-link {
    color: inherit;
    text-decoration: none;
    width: 100%;
    text-align: left;
    font-weight: 600;
}

.card-header .btn-link:hover {
    color: #0d6efd;
}

/* Collapsible chevron animation */
.fa-chevron-down {
    transition: transform 0.2s ease-in-out;
}

.rotate-180 {
    transform: rotate(180deg);
}

/* Panel content styling */
.card-body {
    padding: 1.5rem;
}

/* Form improvements for vertical layout */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

.input-group .btn {
    border-color: #ced4da;
}

.input-group .btn:hover {
    border-color: #86b7fe;
}

/* Table improvements */
.table-responsive {
    border-radius: 0.375rem;
    max-height: 400px;
    overflow-y: auto;
}

.table thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
}

/* Status badges improvements */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Button improvements */
.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Quick navigation highlighting */
.list-group-item:target {
    background-color: #cff4fc;
    border-color: #b6effb;
}

/* Panel section spacing */
.inspection-panels-container .card:last-child {
    margin-bottom: 0;
}

/* Responsive improvements for vertical layout */
@media (max-width: 768px) {
    .row {
        margin: 0;
    }
    
    .col-md-2 {
        margin-bottom: 1rem;
    }
    
    .sticky-top {
        position: relative !important;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
        max-height: 300px;
    }
}

/* Loading states for panels */
.panel-loading {
    opacity: 0.6;
    pointer-events: none;
}

.panel-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2rem;
    height: 2rem;
    margin: -1rem 0 0 -1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Address Editor Panel Navigation Styles */
.address-panels-container {
    min-height: 600px;
}

.address-panels-container .list-group-item {
    border: none;
    background: #fff;
    color: #495057;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem !important;
    margin-bottom: 0.25rem;
}

.address-panels-container .list-group-item:hover {
    background: #e9ecef;
    color: #007bff;
    transform: translateX(3px);
}

.address-panels-container .list-group-item.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
    border-left: 4px solid #0056b3;
    font-weight: 600;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.address-panels-container .list-group-item.active i {
    color: #fff;
}

.address-panels-container .list-group-item i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
    transition: color 0.3s ease;
}

/* Panel collapse animations for address editor */
.address-panels-container .collapse {
    transition: all 0.3s ease;
}

.address-panels-container .card-header .btn-link {
    text-decoration: none;
    color: #495057;
    font-weight: 600;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.address-panels-container .card-header .btn-link:hover {
    color: #007bff;
}

.address-panels-container .card-header .btn-link i.fas.fa-chevron-down,
.address-panels-container .card-header .btn-link i.fas.fa-chevron-up {
    transition: transform 0.3s ease;
}

.address-panels-container .card-header .btn-link[aria-expanded="true"] i.fas.fa-chevron-down {
    transform: rotate(180deg);
}

/* Party Editor Panel Navigation Styles */
.party-panels-container {
    min-height: 600px;
}

.party-panels-container .list-group-item {
    border: none;
    background: #fff;
    color: #495057;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem !important;
    margin-bottom: 0.25rem;
}

.party-panels-container .list-group-item:hover {
    background: #e9ecef;
    color: #007bff;
    transform: translateX(3px);
}

.party-panels-container .list-group-item.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
    border-left: 4px solid #0056b3;
    font-weight: 600;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.party-panels-container .list-group-item.active i {
    color: #fff;
}

.party-panels-container .list-group-item i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
    transition: color 0.3s ease;
}

/* Panel collapse animations for party editor */
.party-panels-container .collapse {
    transition: all 0.3s ease;
}

.party-panels-container .card-header .btn-link {
    text-decoration: none;
    color: #495057;
    font-weight: 600;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.party-panels-container .card-header .btn-link:hover {
    color: #007bff;
}

.party-panels-container .card-header .btn-link i.fas.fa-chevron-down,
.party-panels-container .card-header .btn-link i.fas.fa-chevron-up {
    transition: transform 0.3s ease;
}

.party-panels-container .card-header .btn-link[aria-expanded="true"] i.fas.fa-chevron-down {
    transform: rotate(180deg);
}

/* Quick Edit Drawer Styles */
.quick-edit-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1050;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s 0.3s, opacity 0.3s ease-in-out;
}

.quick-edit-drawer.show {
  visibility: visible;
  opacity: 1;
  transition: visibility 0s, opacity 0.3s ease-in-out;
}

.drawer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 100%;
  background: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

.quick-edit-drawer.show .drawer-content {
  transform: translateX(0);
}

.drawer-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.drawer-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #495057;
  flex-grow: 1;
}

.drawer-body {
  padding: 1.5rem;
  flex-grow: 1;
  overflow-y: auto;
}

.drawer-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #dee2e6;
  background: #f8f9fa;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

.drawer-body .form-group {
  margin-bottom: 1rem;
}

.drawer-body .form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #495057;
}

.drawer-body .form-label i {
  color: #6c757d;
  margin-right: 0.5rem;
}

.drawer-body .form-control {
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
  padding: 0.5rem 0.75rem;
}

.drawer-body .form-control:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Responsive drawer */
@media (max-width: 576px) {
  .drawer-content {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .drawer-content {
    width: 90%;
  }
}

/* PWA Status Indicator */
.pwa-status-indicator {
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  min-width: 120px;
  background-color: rgba(0, 123, 255, 0.1);
  border: 1px solid rgba(0, 123, 255, 0.2);
  margin-right: 0.75rem;
}

.pwa-status-indicator.online {
  color: #198754;
  background-color: rgba(25, 135, 84, 0.1);
  border-color: rgba(25, 135, 84, 0.2);
}

.pwa-status-indicator.offline {
  color: #dc3545;
  background-color: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.2);
}

.pwa-status-indicator.syncing {
  color: #ffc107;
  background-color: rgba(255, 193, 7, 0.1);
  border-color: rgba(255, 193, 7, 0.2);
}

.pwa-status-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pwa-status-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.pwa-status-text {
  white-space: nowrap;
}

/* Responsive adjustments for PWA status indicator */
@media (max-width: 768px) {
  .pwa-status-indicator {
    min-width: 100px;
    padding: 0.375rem;
  }
  
  .pwa-status-row {
    font-size: 0.7rem;
  }
}

/* Storage Status Styles */
.storage-info {
  font-size: 0.85rem;
  line-height: 1.4;
}

.storage-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

.storage-label {
  font-weight: 500;
  color: #666;
  min-width: 80px;
}

.storage-value {
  color: #333;
  text-align: right;
}

/* Footer Styles */
.footer {
  margin-top: auto;
  background-color: #f8f9fa !important;
  border-top: 1px solid #dee2e6;
  font-size: 0.875rem;
}

.footer .text-muted {
  color: #6c757d !important;
}

/* Ensure content area takes full height */
#content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}