:root {
  --radius: 1rem;
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --background: #f4f6f8;
  --foreground: #1a1d24;
  --card: #ffffff;
  --card-foreground: #1a1d24;
  --popover: #ffffff;
  --popover-foreground: #1a1d24;
  --primary: #0d7c8c;
  --primary-foreground: #f4f6f8;
  --secondary: #eef0f3;
  --secondary-foreground: #2a2e38;
  --muted: #f0f2f5;
  --muted-foreground: #6b7280;
  --accent: #d1f0e8;
  --accent-foreground: #1a5c6e;
  --destructive: #c44d3d;
  --destructive-foreground: #f8f9fa;
  --success: #2da179;
  --success-foreground: #f8f9fa;
  --warning: #d4a72c;
  --warning-foreground: #3d2f0a;
  --info: #4a8ac5;
  --info-foreground: #f8f9fa;
  --border: #d8dce2;
  --input: #e0e4e9;
  --ring: #2a8fa8;
  --chart-1: #2a8fa8;
  --chart-2: #2da179;
  --chart-3: #d4a72c;
  --chart-4: #c44d3d;
  --chart-5: #8b5cf6;
  --sidebar: #1f2833;
  --sidebar-foreground: #eef0f3;
  --sidebar-primary: #3da89c;
  --sidebar-primary-foreground: #0f1419;
  --sidebar-accent: #3a4550;
  --sidebar-accent-foreground: #eef0f3;
  --sidebar-border: #3a4550;
  --sidebar-ring: #3da89c;

  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-success: var(--success);
  --color-success-foreground: var(--success-foreground);
  --color-warning: var(--warning);
  --color-warning-foreground: var(--warning-foreground);
  --color-info: var(--info);
  --color-info-foreground: var(--info-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
}

* {
  border-color: var(--color-border);
  box-sizing: border-box;
}

html {
  direction: rtl;
  font-size: 16px;
}

body {
  margin: 0;
  background-color: var(--color-background);
  color: var(--color-foreground);
  font-family: "Vazirmatn", ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: "ss02";
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.nums-fa {
  font-variant-numeric: tabular-nums;
  direction: ltr;
}

td.nums-fa {
  display: table-cell;
}

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

a:hover {
  text-decoration: underline;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 0.875rem;
}

/* Custom utilities */
.card-elevated {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 1px 2px rgba(26, 29, 36, 0.04),
    0 4px 16px rgba(26, 29, 36, 0.04);
}

.stage-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 4px;
  border: 2px solid var(--color-border);
  background-color: var(--color-background);
}

.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background-color: var(--color-card);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  gap: 0.5rem;
}

.btn:hover {
  opacity: 0.9;
}
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-primary-foreground);
}
.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-secondary-foreground);
}
.btn-secondary:hover {
  background-color: var(--color-muted);
}
.btn-destructive {
  background-color: var(--color-destructive);
  color: var(--color-destructive-foreground);
}
.btn-success {
  background-color: var(--color-success);
  color: var(--color-success-foreground);
}
.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
}
.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-input);
  border-radius: var(--radius-md);
  background-color: transparent;
  color: var(--color-foreground);
  font-family: inherit;
  font-size: 0.875rem;
}

.input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-ring);
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: left 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-left: 2.5rem;
}

.js-datatable {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.js-datatable .dt-checkbox-col {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table-sm {
  font-size: 0.75rem;
}

.table-sm th {
  padding: 0.375rem 0.5rem;
}

.table-sm td {
  padding: 0.375rem 0.5rem;
}

.table th {
  background-color: var(--color-muted);
  padding: 0.5rem 0.75rem;
  text-align: center;
  font-weight: 500;
  color: var(--color-muted-foreground);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
  text-align: center;
  background-color: #ffffff;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.table tbody tr {
  background-color: #ffffff;
  transition: background-color 0.2s;
  cursor: pointer;
}

.table tbody tr:hover td {
  background-color: rgba(240, 242, 245, 0.5);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.badge-success {
  background-color: rgba(45, 161, 121, 0.15);
  color: var(--color-success);
  border-color: rgba(45, 161, 121, 0.3);
}

.badge-warning {
  background-color: rgba(212, 167, 44, 0.15);
  color: var(--color-warning);
  border-color: rgba(212, 167, 44, 0.3);
}

.badge-info {
  background-color: rgba(74, 138, 197, 0.15);
  color: var(--color-info);
  border-color: rgba(74, 138, 197, 0.3);
}

.badge-destructive {
  background-color: rgba(196, 77, 61, 0.15);
  color: var(--color-destructive);
  border-color: rgba(196, 77, 61, 0.3);
}

.badge-secondary {
  background-color: var(--color-secondary);
  color: var(--color-secondary-foreground);
}

.table tr.dt-selected td {
  background-color: rgba(13, 124, 140, 0.08);
}

.table td.dt-cell-saving {
  background-color: rgba(13, 124, 140, 0.06);
}

.table td.dt-cell-success {
  background-color: rgba(45, 161, 121, 0.12);
}

.table td.dt-cell-error {
  background-color: rgba(196, 77, 61, 0.12);
}

.dt-batch-toolbar {
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  transition:
    opacity 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
    max-height 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
    margin 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
    padding 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dt-batch-toolbar.visible {
  opacity: 1;
  visibility: visible;
  max-height: 80px;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.dt-toolbar {
  direction: rtl;
  animation: dtFadeIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.dt-sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.dt-sort-asc::after {
  content: "▲";
  font-size: 0.6rem;
  margin-right: 0.25rem;
  opacity: 0.5;
}

.dt-sort-desc::after {
  content: "▼";
  font-size: 0.6rem;
  margin-right: 0.25rem;
  opacity: 0.5;
}

.print-area {
  display: none;
}

#sidebar {
  z-index: 100;
  transition:
    transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform, opacity;
  backface-visibility: hidden;
}

@media (max-width: 1023px) {
  #sidebar.closed {
    position: fixed !important;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
  }
}

#sidebar {
  transition:
    width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#sidebar.collapsed {
  width: 4.5rem !important;
}

#sidebar.collapsed .sidebar-label,
#sidebar.collapsed .sidebar-user-label {
  opacity: 0;
  overflow: hidden;
  width: 0;
  display: none;
}

#sidebar.collapsed .sidebar-icon-center,
#sidebar.collapsed .sidebar-link svg {
  margin-left: auto;
  margin-right: auto;
}

#sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

#sidebar.collapsed .sidebar-group-toggle {
  justify-content: center;
}

#sidebar.collapsed .sidebar-group-chevron {
  display: none;
}

#sidebar-overlay {
  transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.table td,
.table th {
  text-align: center;
}

.action-menu-container .bg-popover {
  text-align: center;
}

.action-menu-container .bg-popover .py-1 button,
.action-menu-container .bg-popover .py-1 a {
  text-align: center;
}

.action-menu-container button {
  padding: 0.5rem;
}

.survey-info-panel {
  direction: rtl;
  font-family: "Vazirmatn", ui-sans-serif, system-ui, sans-serif;
}

.survey-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .survey-summary-grid {
    grid-template-columns: 1fr;
  }
}

.survey-summary-card {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}

.survey-summary-card:hover {
  box-shadow: 0 4px 12px rgba(26, 29, 36, 0.06);
  transform: translateY(-1px);
}

.survey-summary-card .label {
  font-size: 0.75rem;
  color: var(--color-muted-foreground);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.survey-summary-card .value {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-foreground);
  word-break: break-word;
  text-align: center;
}

.survey-center-box {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1rem;
}

.survey-center-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.survey-center-row:last-child {
  border-bottom: none;
}

.survey-center-label {
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
  min-width: 5rem;
}

.survey-center-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-foreground);
  direction: ltr;
  text-align: center;
  flex: 1;
  margin-left: 1rem;
  font-variant-numeric: tabular-nums;
}

.survey-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--color-secondary);
  color: var(--color-secondary-foreground);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.survey-copy-btn:hover {
  background-color: var(--color-muted);
  border-color: var(--color-muted-foreground);
}

.survey-points-section {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.survey-points-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-foreground);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.survey-points-table-wrap {
  max-height: 320px;
  overflow-y: auto;
}

.survey-points-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.survey-points-table thead th {
  position: sticky;
  top: 0;
  background-color: var(--color-muted);
  padding: 0.5rem 0.75rem;
  text-align: center;
  font-weight: 500;
  color: var(--color-muted-foreground);
  border-bottom: 1px solid var(--color-border);
  z-index: 1;
}

.survey-points-table tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  text-align: center;
  background-color: #ffffff;
  transition: background-color 0.15s;
}

.survey-points-table tbody tr {
  cursor: pointer;
  transition: background-color 0.15s;
}

.survey-points-table tbody tr:hover td {
  background-color: rgba(240, 242, 245, 0.6);
}

.survey-points-table tbody tr.survey-point-highlight td {
  background-color: rgba(13, 124, 140, 0.08);
}

.survey-points-table .nums {
  direction: ltr;
  font-variant-numeric: tabular-nums;
}

.survey-map-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-family: "Vazirmatn", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #dc2626 !important;
  text-align: center;
  pointer-events: auto !important;
  cursor: pointer;
  padding: 0;
  margin: 0;
  line-height: 1;
  text-shadow:
    0 0 2px #ffffff,
    0 0 3px #ffffff;
}

.survey-map-badge {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-family: "Vazirmatn", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  margin: 0;
}

.survey-map-badge-red {
  background: transparent !important;
  border: none !important;
  color: #dc2626 !important;
  text-shadow:
    0 0 2px #ffffff,
    0 0 3px #ffffff;
}

.survey-map-label-highlight {
  background: transparent !important;
  color: #dc2626 !important;
  font-size: 14px;
  font-weight: 800;
  text-shadow:
    0 0 2px #ffffff,
    0 0 4px #ffffff;
}

.leaflet-div-icon.survey-map-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  pointer-events: auto !important;
}

.leaflet-div-icon.survey-map-label .survey-map-badge,
.leaflet-div-icon.survey-map-label .survey-map-badge-red {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.survey-map-draggable {
  cursor: grab;
}
#survey-map-container.survey-map-dragging {
  cursor: grabbing !important;
}

.survey-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 60;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  background-color: var(--color-success);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(0);
  opacity: 1;
  transition:
    opacity 0.3s,
    transform 0.3s;
  pointer-events: none;
}

.survey-toast.hidden {
  opacity: 0;
  transform: translateY(1rem);
}

.survey-clickable-coord {
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius-md);
  padding: 0.125rem 0.375rem;
  margin: -0.125rem -0.375rem;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.survey-clickable-coord:hover {
  background-color: var(--color-muted);
  color: var(--color-primary);
}

.survey-clickable-coord:active {
  background-color: var(--color-accent);
  color: var(--color-accent-foreground);
}

.field-palette-btn.field-selected {
  background-color: var(--color-primary);
  color: var(--color-primary-foreground);
  box-shadow: 0 0 0 2px var(--color-primary-foreground);
}

/* --- Fixed case navigation buttons --- */
.case-nav-btn {
  position: fixed;
  bottom: 1.25rem;
  z-index: 200;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  opacity: 0.25;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.case-nav-btn:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.case-nav-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.case-nav-btn svg {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--color-foreground);
}

.case-nav-prev {
  left: 1.25rem;
}

.case-nav-next {
  right: 1.25rem;
}

.case-nav-tooltip {
  position: absolute;
  top: 50%;
  left: 125%;
  transform: translateY(-50%);
  background-color: var(--color-popover);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  min-width: 140px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s;
  pointer-events: none;
  z-index: 199;
  white-space: nowrap;
}

.case-nav-tooltip::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -5px;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: var(--color-popover);
}

.case-nav-btn:hover .case-nav-tooltip {
  opacity: 1;
  visibility: visible;
}

.case-nav-btn.case-nav-next .case-nav-tooltip {
  left: auto;
  right: 125%;
}

.case-nav-btn.case-nav-next .case-nav-tooltip::before {
  left: auto;
  right: -5px;
  border-right-color: transparent;
  border-left-color: var(--color-popover);
}

.case-nav-tooltip-title {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-muted-foreground);
  margin-bottom: 0.25rem;
}

.case-nav-tooltip-row {
  font-size: 0.75rem;
  color: var(--color-foreground);
  margin: 0.125rem 0;
}

.case-nav-tooltip-label {
  color: var(--color-muted-foreground);
  margin-right: 0.25rem;
}

/* ===== Print Map Document (isolated, temporary) ===== */

@page {
  size: A4;
  margin-top: 10mm;
  margin-bottom: 10mm;
  margin-left: 10mm;
  margin-right: 10mm;
}

@page :first {
  size: A4;
  margin-top: 10mm;
  margin-bottom: 10mm;
  margin-left: 10mm;
  margin-right: 10mm;
}

#map-print-document {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  background: #fff !important;
  overflow: auto !important;
  padding: 20px !important;
  box-sizing: border-box !important;
}

.print-page {
  width: 190mm;
  max-width: 190mm;
  margin: 0 auto;
  padding: 0 3mm;
  box-sizing: border-box;
  direction: rtl;
  font-family: "Vazirmatn", ui-sans-serif, system-ui, sans-serif;
  background: #fff;
  color: #1a1d24;
}

.print-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4mm;
}

.print-icon {
  width: 6mm;
  height: 6mm;
  flex-shrink: 0;
}

.print-header-table,
.print-info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 5mm;
  font-size: 12px;
}

.print-info-box {
  display: flex;
  gap: 10mm;
  margin-bottom: 5mm;
}

.print-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.print-info-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  font-size: 12px;
  border-bottom: 1px solid #d8dce2;
}

.print-info-label {
  font-weight: 600;
  text-align: right;
}

.print-info-value {
  text-align: left;
  margin-left: 6px;
  word-break: break-word;
}

.print-map {
  width: 100%;
  height: 90mm;
  border: 1px solid #000;
  border-radius: 8px;
  margin-bottom: 5mm;
}

.print-utm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 5mm;
}

.print-utm-table tbody tr:nth-child(odd) {
  background-color: #f9fafb;
}

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

.print-utm-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 3mm;
  margin-top: 8mm;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4mm;
}

.print-area-row .print-area-label {
  text-align: center;
  font-weight: 600;
  padding: 4px 8px;
}

.print-area-row .print-area-value {
  text-align: center;
  font-weight: 700;
}

.print-utm-table th,
.print-utm-table td {
  border: 1px solid #000;
  padding: 4px 8px;
  text-align: center;
}

.print-utm-table .nums {
  direction: ltr;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.print-utm-table-wide {
  font-size: 9px;
}

.print-utm-table-wide th,
.print-utm-table-wide td {
  padding: 3px 4px;
}

.print-centroid-wide {
  text-align: center;
  font-weight: 600;
}

.print-images {
  margin-top: 5mm;
}

.print-images-title {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 3mm;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4mm;
}

.print-images-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3mm;
}

.print-parcel-image {
  object-fit: cover;
  border: 1px solid #000;
  border-radius: 8px;
}

.print-images-grid .print-parcel-image[data-single="true"] {
  width: 100%;
  height: auto;
}

.print-images-grid .print-parcel-image[data-single="false"] {
  width: calc(50% - 1.5mm);
  height: auto;
}

/* ===== Certificate Print Page ===== */

.cert-page {
  width: 100%;
  max-width: 190mm;
  margin: 0 auto;
  padding: 0 5mm;
  box-sizing: border-box;
}

.cert-images {
  display: flex;
  flex-direction: column;
  gap: 3mm;
  margin-bottom: 6mm;
}

.cert-image-multi {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
}
.cert-image-single {
  width: 100%;
  height: auto;
  max-height: 850px;
  object-fit: contain;
}

.cert-info-box {
  border: 0.5px solid #666;
  border-radius: 8px;
  padding: 4mm;
  margin: 0 auto 6mm auto;
  max-width: 140mm;
  font-size: 11px;
  box-sizing: border-box;
  display: flex;
  gap: 4px;
}

.cert-info-row {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cert-info-label {
  font-weight: 600;
  text-align: center;
  margin-bottom: 1px;
}

.cert-info-value {
  text-align: center;
}

.cert-bottom-row {
  display: flex;
  gap: 5mm;
  margin-top: 6mm;
}

.cert-box {
  flex: 3;
  border: 0.5px solid #666;
  border-radius: 8px;
  padding: 5mm;
  text-align: justify;
  font-size: 12px;
  line-height: 1.8;
  box-sizing: border-box;
}

.cert-signature-box {
  flex: 2;
  border: 0.5px solid #666;
  border-radius: 8px;
  padding: 5mm;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  font-size: 12px;
  box-sizing: border-box;
}

.signature-label {
  text-align: center;
  width: 100%;
  font-weight: 600;
}

.print-map-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

@media print {
  body > *:not(#map-print-document) {
    display: none !important;
  }

  #map-print-document {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    max-width: none !important;
  }

  .print-header,
  .print-map,
  .print-info-box,
  .print-images,
  .print-utm-wrapper {
    page-break-inside: avoid;
  }

  .print-utm-wrapper {
    break-inside: avoid;
  }

  .print-utm-table {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .print-utm-table tr {
    page-break-inside: avoid;
  }
}

.mobile-block-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #1f2833;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.mobile-block-content {
  text-align: center;
  color: #f8f9fa;
  padding: 2rem;
  max-width: 90%;
}

.mobile-block-icon {
  margin-bottom: 1.5rem;
  color: #4a8ac5;
  display: flex;
  justify-content: center;
}

.mobile-block-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.mobile-block-site-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.mobile-block-text {
  font-size: 1.125rem;
  opacity: 0.85;
  line-height: 1.6;
}
