/* ── DESIGN SYSTEM GEORURALCAMPO ── */
:root {
  --c-dark:      #2B4954;
  --c-med:       #4F7C93;
  --c-light:     #92BBC4;
  --c-xlight:    #C7DEE2;
  --c-bg:        #0E191D;
  --c-bg2:       #15242C;
  --c-deep:      #0A1215;
  --c-white:     #FFFFFF;
  --c-accent:    #7DD4E0;
  --c-green:     #4ade80;
  --c-g3:        #1A3225;
  --c-g1:        #4CAF7A;
  --c-red:       #EF5350;
  --c-amb:       #FF9800;
  
  --fd: 'Syne', sans-serif;
  --fb: 'DM Sans', sans-serif;
  --fm: 'DM Mono', monospace;
  
  --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 25px rgba(125, 212, 224, 0.08);
}

/* ── BASE STYLES ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--c-bg);
  color: var(--c-white);
  font-family: var(--fb);
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ── BACKGROUND DRIFT GRID ── */
#particles-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.drift-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(146,187,196,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(146,187,196,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* ── DESKTOP VIEWS HEADER ── */
.desktop-header {
  position: relative;
  z-index: 10;
  padding: 20px 40px;
  border-bottom: 1px solid rgba(79, 124, 147, 0.15);
  background: rgba(14, 25, 29, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.desktop-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.desktop-header .logo-box {
  width: 36px;
  height: 36px;
  background: rgba(79, 124, 147, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.desktop-header h1 {
  font-family: var(--fd);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}

.desktop-header h1 span {
  color: var(--c-accent);
}

.desktop-header p {
  font-size: 10px;
  color: var(--c-med);
  font-family: var(--fm);
}

.system-status {
  font-size: 11px;
  color: var(--c-light);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(76, 222, 128, 0.08);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(76, 222, 128, 0.2);
}

.pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-green);
  box-shadow: 0 0 8px var(--c-green);
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── LAYOUT CONTAINER ── */
.main-container {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  padding: 40px;
  gap: 40px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.desktop-panel {
  flex: 1;
  background: rgba(21, 36, 44, 0.55);
  border: 1px solid rgba(79, 124, 147, 0.18);
  border-radius: 12px;
  padding: 30px;
  backdrop-filter: blur(14px);
  min-height: 600px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
}

.desktop-panel h2 {
  font-family: var(--fd);
  font-size: 18px;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.panel-subtitle {
  font-size: 12px;
  color: var(--c-light);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* ── FEATURES LIST ── */
.features-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.feature-card {
  display: flex;
  gap: 14px;
}

.feature-card .feat-icon {
  font-size: 20px;
  width: 38px;
  height: 38px;
  background: rgba(79, 124, 147, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-card h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.feature-card p {
  font-size: 11px;
  color: var(--c-med);
  line-height: 1.4;
}

.wa-quick-send {
  margin-top: auto;
  background: rgba(76, 175, 122, 0.08);
  border: 1px dashed rgba(76, 175, 122, 0.25);
  border-radius: 8px;
  padding: 16px;
}

.wa-quick-send h3 {
  font-family: var(--fd);
  font-size: 12px;
  color: var(--c-g1);
  margin-bottom: 4px;
}

.wa-quick-send p {
  font-size: 10px;
  color: var(--c-light);
  line-height: 1.4;
}

/* ── SIMULATOR VIEWPORT ── */
.simulator-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-frame {
  width: 320px;
  height: 640px;
  background: #111;
  border: 10px solid #222;
  border-radius: 46px;
  box-shadow: var(--shadow-premium), 0 0 0 1px #333, inset 0 0 0 1px #111;
  position: relative;
  overflow: hidden;
  padding: 8px;
}

.phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 24px;
  background: #222;
  border-radius: 0 0 16px 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.camera-lens {
  width: 8px;
  height: 8px;
  background: #0f1624;
  border-radius: 50%;
  border: 1px solid #333;
}

.speaker-grill {
  width: 40px;
  height: 4px;
  background: #333;
  border-radius: 2px;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--c-deep);
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ── STATUS BAR ── */
.mobile-status-bar {
  height: 38px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 20px 4px;
  font-size: 10px;
  color: var(--c-light);
  font-family: var(--fm);
  z-index: 90;
  pointer-events: none;
}

.status-time {
  font-weight: 700;
  color: var(--c-white);
}

.status-indicators {
  display: flex;
  gap: 6px;
}

/* ── APP VIEWS ── */
.app-view {
  display: none;
  flex: 1;
  flex-direction: column;
  padding: 0 16px 20px;
  overflow-y: auto;
  position: relative;
}

.app-view.active {
  display: flex;
}

/* Scrollbar styling for phone view */
.app-view::-webkit-scrollbar {
  width: 3px;
}
.app-view::-webkit-scrollbar-thumb {
  background: rgba(79, 124, 147, 0.2);
  border-radius: 10px;
}

/* ── SCREEN 1: LOGIN ── */
.logo-container {
  text-align: center;
  padding: 30px 0 20px;
}

.logo-icon-sq {
  width: 54px;
  height: 54px;
  background: rgba(79, 124, 147, 0.12);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-green);
  margin-bottom: 10px;
}

.logo-container h2 {
  font-family: var(--fd);
  font-size: 20px;
  font-weight: 700;
}

.logo-container h2 span {
  color: var(--c-green);
}

.logo-container p {
  font-size: 9px;
  color: var(--c-med);
  font-family: var(--fm);
  margin-top: 2px;
}

.login-box h3 {
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.login-lead {
  font-size: 11px;
  color: var(--c-light);
  text-align: center;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 8px;
  font-family: var(--fm);
  letter-spacing: 0.5px;
  color: var(--c-med);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(21, 36, 44, 0.7);
  border: 1px solid rgba(79, 124, 147, 0.25);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--c-white);
  font-size: 11.5px;
  font-family: var(--fb);
  outline: none;
  transition: border-color 0.25s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--c-green);
}

.btn {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--fb);
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s, opacity 0.2s;
}

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

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--c-green);
  color: var(--c-deep);
}

.btn-secondary {
  background: rgba(21, 36, 44, 0.8);
  border: 1px solid rgba(79, 124, 147, 0.25);
  color: var(--c-xlight);
}

.gov-btn {
  margin-top: 8px;
}

.gov-logo {
  background: #1351b4;
  color: #fff;
  font-size: 7px;
  font-weight: 800;
  padding: 2px 4px;
  border-radius: 2px;
  margin-right: 4px;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
}

.login-footer p {
  font-size: 8px;
  color: var(--c-green);
  font-family: var(--fm);
}

/* ── DASHBOARD HOME ── */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  margin-bottom: 12px;
}

.dashboard-header .user-info {
  display: flex;
  flex-direction: column;
}

.dashboard-header .welcome-text {
  font-size: 10px;
  color: var(--c-med);
}

.dashboard-header .user-fullname {
  font-family: var(--fd);
  font-size: 15px;
  font-weight: 700;
}

.dashboard-header .user-crea {
  font-size: 9px;
  color: var(--c-green);
}

.avatar-box {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-green);
  color: var(--c-deep);
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sync-badge-strip {
  background: rgba(76, 222, 128, 0.08);
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  border: 1px solid rgba(76, 222, 128, 0.12);
}

.sync-badge-strip.offline {
  background: rgba(239, 83, 80, 0.08);
  border-color: rgba(239, 83, 80, 0.12);
}

.sync-badge-strip.offline .sync-dot {
  background: var(--c-red);
  box-shadow: 0 0 6px var(--c-red);
}

.sync-badge-strip.offline .sync-text {
  color: var(--c-red);
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-green);
  box-shadow: 0 0 6px var(--c-green);
}

.blinking {
  animation: blink 2s infinite;
}

.sync-text {
  font-size: 9.5px;
  color: var(--c-green);
  flex: 1;
}

.btn-mini-sync {
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 8.5px;
  color: inherit;
  cursor: pointer;
}

.action-card-start {
  background: var(--c-green);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 16px;
  color: var(--c-deep);
  transition: transform 0.2s;
}

.action-card-start:active {
  transform: scale(0.97);
}

.start-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.action-card-start h4 {
  font-family: var(--fd);
  font-size: 13px;
  font-weight: 700;
}

.action-card-start p {
  font-size: 9px;
  opacity: 0.75;
}

.section-title {
  font-size: 9px;
  font-family: var(--fm);
  letter-spacing: 0.8px;
  color: var(--c-med);
  margin-bottom: 8px;
}

.visits-scroll-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.visit-card-item {
  background: rgba(21, 36, 44, 0.7);
  border: 1px solid rgba(79, 124, 147, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.visit-card-item .status-badge {
  margin-left: auto;
  font-size: 8px;
  font-family: var(--fm);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.status-badge.sync {
  background: rgba(76, 222, 128, 0.08);
  color: var(--c-green);
  border: 1px solid rgba(76, 222, 128, 0.2);
}

.status-badge.pending {
  background: rgba(255, 152, 0, 0.08);
  color: var(--c-amb);
  border: 1px solid rgba(255, 152, 0, 0.2);
}

.visit-card-item .icon {
  font-size: 16px;
  width: 28px;
  height: 28px;
  background: rgba(79, 124, 147, 0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visit-card-item h5 {
  font-size: 11.5px;
  font-weight: 700;
}

.visit-card-item p {
  font-size: 8.5px;
  color: var(--c-light);
  margin-top: 1px;
}

/* ── SCREEN 3: NOVA VISITA SETUP ── */
.view-header {
  height: 38px;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  position: relative;
}

.btn-back {
  background: transparent;
  border: none;
  color: var(--c-accent);
  font-size: 11px;
  cursor: pointer;
}

.view-header h3 {
  font-family: var(--fd);
  font-size: 13px;
  text-align: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  letter-spacing: 0.5px;
}

.setup-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.property-preview-card {
  background: rgba(14, 25, 29, 0.6);
  border: 1px dashed rgba(79, 124, 147, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prop-detail {
  font-size: 10px;
  display: flex;
  justify-content: space-between;
}

.prop-detail .lbl {
  color: var(--c-med);
}

.prop-detail .val {
  color: var(--c-xlight);
  font-weight: 500;
}

.gps-status-check {
  background: rgba(76, 222, 128, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(76, 222, 128, 0.1);
}

.gps-status-check .status-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-green);
}

.gps-status-check .status-lbl {
  font-size: 9px;
  color: var(--c-green);
}

/* ── SCREEN 4: VISITA EM CAMPO ── */
#field-map {
  height: 200px;
  width: 100%;
  background: #0f1c22;
  position: relative;
  z-index: 5;
  border-bottom: 1px solid rgba(79, 124, 147, 0.2);
}

/* Map HUD inside phone */
.map-hud-overlay {
  position: absolute;
  top: 48px;
  left: 24px;
  right: 24px;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.hud-item {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 8px;
  color: var(--c-green);
  font-family: var(--fm);
}

.hud-item.timer {
  color: var(--c-white);
  font-weight: 700;
}

.gps-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c-green);
  margin-right: 3px;
}

.field-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px 0 0;
}

.captured-evidences-strip {
  margin-bottom: 12px;
}

.gallery-title {
  font-size: 8px;
  font-family: var(--fm);
  color: var(--c-med);
  display: block;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.evidences-thumb-grid {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.ev-thumb-box {
  width: 48px;
  height: 48px;
  background: #111;
  border-radius: 6px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(79, 124, 147, 0.3);
}

.ev-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ev-gps-tag {
  position: absolute;
  bottom: 1px;
  left: 1px;
  right: 1px;
  font-family: var(--fm);
  font-size: 4px;
  color: var(--c-green);
  background: rgba(0,0,0,0.8);
  border-radius: 2px;
  text-align: center;
  padding: 1px 0;
}

.thumb-add-btn {
  width: 48px;
  height: 48px;
  border: 1.5px dashed rgba(79, 124, 147, 0.3);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--c-med);
  cursor: pointer;
  flex-shrink: 0;
}

.field-action-buttons {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.field-btn {
  flex: 1;
  background: rgba(21, 36, 44, 0.7);
  border: 1px solid rgba(79, 124, 147, 0.2);
  border-radius: 10px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.2s;
}

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

.field-btn.active {
  border-color: var(--c-green);
  background: rgba(76, 222, 128, 0.08);
}

.field-btn .ico {
  font-size: 16px;
}

.field-btn .lbl {
  font-size: 8px;
  font-weight: 500;
  color: var(--c-light);
}

.field-btn.active .lbl {
  color: var(--c-green);
  font-weight: 700;
}

/* ── SCREEN 5: CAMERA ── */
.camera-preview-window {
  height: 220px;
  background: #000;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.camera-mock-scene {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 5;
}

.cam-overlay-coord {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.7);
  color: var(--c-green);
  font-family: var(--fm);
  font-size: 7.5px;
  padding: 3px 6px;
  border-radius: 4px;
}

.camera-crosshairs {
  width: 160px;
  height: 120px;
  border: 1px solid rgba(76, 222, 128, 0.5);
  border-radius: 6px;
  position: relative;
  z-index: 10;
  pointer-events: none;
}

.camera-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 6px;
  z-index: 20;
}

.btn-cam-cancel {
  background: transparent;
  border: none;
  color: var(--c-accent);
  font-size: 11px;
  cursor: pointer;
}

.shutter-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.shutter-btn .inner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--c-green);
  display: block;
}

.shutter-placeholder {
  width: 40px;
}

.camera-details-form {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.categories-selector-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.category-chip {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 500;
  background: rgba(21, 36, 44, 0.7);
  border: 1px solid rgba(79, 124, 147, 0.2);
  color: var(--c-light);
  cursor: pointer;
}

.category-chip.active {
  background: rgba(76, 222, 128, 0.08);
  border-color: var(--c-green);
  color: var(--c-green);
  font-weight: 700;
}

/* ── SCREEN 6: LAUDO FORM ACCORDION ── */
.laudo-form-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.accordion-item {
  border: 1px solid rgba(79, 124, 147, 0.2);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(21, 36, 44, 0.5);
}

.accordion-header {
  padding: 10px 12px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(21, 36, 44, 0.8);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

.accordion-header:hover {
  background: rgba(21, 36, 44, 0.95);
}

.accordion-header .num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(79, 124, 147, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--c-green);
  font-family: var(--fm);
}

.accordion-header .status {
  margin-left: auto;
  font-size: 10px;
  color: var(--c-green);
}

.accordion-body {
  display: none;
  padding: 10px 12px;
  border-top: 1px solid rgba(79, 124, 147, 0.15);
}

.accordion-body.active {
  display: block;
}

.accordion-body textarea {
  width: 100%;
  background: var(--c-deep);
  border: 1px solid rgba(79, 124, 147, 0.2);
  border-radius: 6px;
  color: var(--c-white);
  padding: 8px;
  font-size: 11px;
  line-height: 1.4;
  outline: none;
  resize: vertical;
}

.form-group-inline {
  display: flex;
  gap: 8px;
}

.form-group-inline > div {
  flex: 1;
}

/* Recommendations Technical Table in Accordion */
.table-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.btn-mini {
  padding: 3px 8px;
  font-size: 9px;
  border-radius: 4px;
}

.recommendations-table-wrapper {
  overflow-x: auto;
  border: 1px solid rgba(79, 124, 147, 0.15);
  border-radius: 6px;
}

.recommendations-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}

.recommendations-table th,
.recommendations-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(79, 124, 147, 0.15);
}

.recommendations-table th {
  background: rgba(21, 36, 44, 0.9);
  color: var(--c-light);
  font-weight: 700;
}

.recommendations-table input,
.recommendations-table select {
  background: rgba(14, 25, 29, 0.8);
  border: 1px solid rgba(79, 124, 147, 0.2);
  color: #fff;
  border-radius: 4px;
  padding: 3px 5px;
  outline: none;
  font-size: 9px;
}

.btn-delete-row {
  background: transparent;
  border: none;
  color: var(--c-red);
  font-size: 11px;
  cursor: pointer;
}

/* ── SCREEN 7: REPORT RESULT mock PDF ── */
.report-result-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mock-pdf-document {
  background: #f7f9fa;
  color: #1a262c;
  border-radius: 8px;
  padding: 16px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #c7dee2;
  box-shadow: inset 0 10px 30px rgba(0,0,0,0.05);
}

.pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #2B4954;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.pdf-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--fd);
  font-size: 10px;
  font-weight: 700;
}

.pdf-protocol {
  font-family: var(--fm);
  font-size: 8px;
  color: #4F7C93;
  font-weight: 700;
}

.pdf-title {
  font-family: var(--fd);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-align: center;
  margin-top: 6px;
}

.pdf-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #eaeef0;
  border-radius: 4px;
  padding: 8px;
  margin-top: 8px;
  margin-bottom: 10px;
}

.meta-row {
  font-size: 7.5px;
}

.meta-row .lbl {
  font-weight: 700;
  color: #4F7C93;
}

.meta-row .val {
  color: #1a262c;
}

.pdf-section {
  margin-bottom: 8px;
}

.pdf-section h4 {
  font-size: 8px;
  color: #2B4954;
  border-bottom: 1px solid #dce4e6;
  padding-bottom: 2px;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.pdf-section p {
  font-size: 7.5px;
  line-height: 1.35;
  color: #333;
}

.pdf-rec-table-wrap {
  border: 1px solid #dce4e6;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}

.pdf-rec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 7px;
}

.pdf-rec-table th,
.pdf-rec-table td {
  padding: 4px 6px;
  text-align: left;
  border-bottom: 1px solid #eaeef0;
}

.pdf-rec-table th {
  background: #dce4e6;
  font-weight: 700;
}

.pdf-rec-priority-badge {
  font-size: 6.5px;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
}

.pdf-rec-priority-badge.alta { background: rgba(239, 83, 80, 0.15); color: #c62828; }
.pdf-rec-priority-badge.media { background: rgba(255, 152, 0, 0.15); color: #ef6c00; }
.pdf-rec-priority-badge.baixa { background: rgba(76, 175, 122, 0.15); color: #2e7d32; }

.pdf-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 4px;
}

.pdf-evidence-card {
  border: 0.5px solid #dce4e6;
  border-radius: 4px;
  padding: 3px;
  background: #fff;
}

.pdf-evidence-img {
  width: 100%;
  height: 32px;
  object-fit: cover;
  border-radius: 2px;
}

.pdf-evidence-legend {
  font-size: 5.5px;
  color: #333;
  line-height: 1.2;
  margin-top: 2px;
}

.pdf-evidence-gps {
  font-family: var(--fm);
  font-size: 5px;
  color: #777;
}

.pdf-footer {
  border-top: 1px solid #2B4954;
  padding-top: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}

.pdf-sha {
  font-family: var(--fm);
  font-size: 5.5px;
  color: #777;
}

.pdf-watermark {
  font-size: 6px;
  font-weight: 700;
  color: #c7dee2;
  letter-spacing: 0.5px;
}

.report-actions-row {
  display: flex;
  gap: 5px;
}

.btn-share {
  flex: 1.4;
  background: var(--c-green);
  color: var(--c-deep);
}

.btn-download {
  flex: 1;
}

.btn-goto-home {
  margin-top: 4px;
  background: var(--c-accent);
  color: var(--c-deep);
}

/* ── TAB BAR NAVIGATION ── */
.mobile-tab-bar {
  height: 52px;
  background: var(--c-bg2);
  border-top: 1px solid rgba(79, 124, 147, 0.18);
  display: flex;
  align-items: center;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}

.tab-item .icon {
  font-size: 15px;
  opacity: 0.6;
}

.tab-item .label {
  font-size: 7.5px;
  color: var(--c-med);
}

.tab-item.active .icon {
  opacity: 1;
}

.tab-item.active .label {
  color: var(--c-green);
  font-weight: 700;
}

/* ── RIGHT PANEL DATABASE DEBUGGER ── */
.db-debugger {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.db-section-header {
  font-family: var(--fm);
  font-size: 10.5px;
  color: var(--c-light);
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(79, 124, 147, 0.15);
  padding-bottom: 3px;
}

.db-count {
  color: var(--c-green);
}

.db-logs-window {
  background: var(--c-deep);
  border: 1px solid rgba(79, 124, 147, 0.12);
  border-radius: 8px;
  padding: 10px;
  font-family: var(--fm);
  font-size: 9.5px;
  color: var(--c-med);
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-entry {
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(79, 124, 147, 0.1);
  line-height: 1.3;
}

.log-entry:last-child {
  border-bottom: none;
}

.log-entry .protocol {
  color: var(--c-green);
  font-weight: 700;
}

.log-entry .status {
  color: var(--c-accent);
}

.log-entry .meta {
  color: var(--c-light);
  font-size: 8.5px;
}

.log-placeholder {
  text-align: center;
  font-style: italic;
  font-size: 9px;
  color: var(--c-med);
  margin-top: 14px;
}

.network-debugger {
  margin-top: 24px;
  background: rgba(79, 124, 147, 0.08);
  border: 1px solid rgba(79, 124, 147, 0.15);
  border-radius: 8px;
  padding: 12px;
}

.network-debugger h3 {
  font-family: var(--fd);
  font-size: 12px;
  margin-bottom: 8px;
}

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

.network-status-label {
  font-size: 10.5px;
  color: var(--c-green);
  font-weight: 500;
}

/* ── RESPONSIVE PWA NATIVO ── */
@media (max-width: 1200px), (pointer: coarse) {
  /* Hides simulated frames on mobile */
  .desktop-header,
  .desktop-panel {
    display: none !important;
  }
  
  body {
    padding: 0;
    margin: 0;
  }
  
  .main-container {
    padding: 0;
  }
  
  .simulator-section {
    width: 100vw;
    height: 100vh;
  }
  
  .phone-frame {
    width: 100vw;
    height: 100vh;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }
  
  .phone-screen {
    border-radius: 0;
  }
  
  .phone-notch {
    display: none;
  }
  
  .mobile-status-bar {
    height: 24px;
    padding-top: 2px;
  }
  
  .app-view {
    padding-bottom: 64px;
  }
}

/* ── SCREEN 2B: CLIENTES SELECTION ── */
.clients-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.search-bar-wrap {
  position: relative;
}

.search-bar-wrap input {
  width: 100%;
  background: rgba(21, 36, 44, 0.8);
  border: 1px solid rgba(79, 124, 147, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--c-white);
  font-size: 11px;
  font-family: var(--fb);
  outline: none;
  transition: border-color 0.3s;
}

.search-bar-wrap input:focus {
  border-color: var(--c-green);
}

.search-bar-wrap input::placeholder {
  color: var(--c-med);
}

.clients-scroll-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  max-height: 320px;
  overflow-y: auto;
}

.client-card-item {
  background: rgba(21, 36, 44, 0.7);
  border: 1px solid rgba(79, 124, 147, 0.15);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.25s, transform 0.2s;
}

.client-card-item:active {
  transform: scale(0.98);
}

.client-card-item:hover {
  border-color: var(--c-green);
}

.client-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-dark), var(--c-med));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--c-white);
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.client-card-info h5 {
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 1px;
}

.client-card-info p {
  font-size: 8.5px;
  color: var(--c-light);
}

.client-card-info .client-tipo-badge {
  font-size: 7px;
  font-family: var(--fm);
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
  margin-left: 4px;
}

.client-tipo-badge.pf {
  background: rgba(125, 212, 224, 0.1);
  color: var(--c-accent);
  border: 1px solid rgba(125, 212, 224, 0.2);
}

.client-tipo-badge.pj {
  background: rgba(255, 152, 0, 0.1);
  color: var(--c-amb);
  border: 1px solid rgba(255, 152, 0, 0.2);
}

.client-card-arrow {
  margin-left: auto;
  font-size: 12px;
  color: var(--c-med);
}

.btn-new-client {
  margin-top: auto;
  font-size: 10.5px;
}

/* ── SCREEN 2C: CLIENT HISTORY ── */
.client-history-container {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.client-info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.client-avatar-lg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-green), var(--c-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--c-white);
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.15);
}

.client-info-details {
  display: flex;
  flex-direction: column;
}

.client-info-details h4 {
  font-family: var(--fd);
  font-size: 14px;
  font-weight: 700;
}

.client-detail-cpf {
  font-size: 9px;
  font-family: var(--fm);
  color: var(--c-accent);
}

.client-detail-municipio {
  font-size: 9px;
  color: var(--c-med);
}

.client-stats-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.stat-badge {
  flex: 1;
  background: rgba(21, 36, 44, 0.6);
  border: 1px solid rgba(79, 124, 147, 0.15);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--fd);
  font-size: 22px;
  font-weight: 800;
  color: var(--c-green);
}

.stat-label {
  font-size: 8px;
  color: var(--c-med);
  font-family: var(--fm);
  letter-spacing: 0.3px;
}

.history-visits-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.history-visit-card {
  background: rgba(21, 36, 44, 0.7);
  border: 1px solid rgba(79, 124, 147, 0.15);
  border-radius: 10px;
  padding: 10px 12px;
}

.history-visit-card .hv-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.history-visit-card .hv-protocol {
  font-size: 9px;
  font-family: var(--fm);
  color: var(--c-accent);
}

.history-visit-card .hv-date {
  font-size: 8.5px;
  color: var(--c-med);
}

.history-visit-card .hv-property {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
}

.history-visit-card .hv-obj {
  font-size: 9.5px;
  color: var(--c-light);
  margin-bottom: 4px;
}

.history-visit-card .hv-tech {
  font-size: 8px;
  color: var(--c-med);
}

.history-visit-card .hv-parecer {
  font-size: 8.5px;
  color: var(--c-xlight);
  background: rgba(76, 222, 128, 0.04);
  border-left: 2px solid var(--c-green);
  padding: 4px 8px;
  margin-top: 6px;
  border-radius: 0 4px 4px 0;
  line-height: 1.3;
  max-height: 40px;
  overflow: hidden;
}

.empty-history-msg {
  font-size: 10px;
  color: var(--c-med);
  text-align: center;
  padding: 14px;
}

.client-properties-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.client-prop-item {
  background: rgba(21, 36, 44, 0.5);
  border: 1px solid rgba(79, 124, 147, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-prop-item .prop-icon {
  font-size: 14px;
}

.client-prop-item .prop-info h6 {
  font-size: 10.5px;
  font-weight: 700;
}

.client-prop-item .prop-info span {
  font-size: 8px;
  color: var(--c-med);
  font-family: var(--fm);
}

.btn-start-for-client {
  margin-top: auto;
}

/* ── SELECTED CLIENT BADGE ── */
.selected-client-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(76, 222, 128, 0.08);
  border: 1px solid rgba(76, 222, 128, 0.2);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 8px;
}

.selected-client-badge .badge-icon {
  font-size: 14px;
}

.selected-client-badge .badge-text {
  font-size: 10px;
  color: var(--c-green);
  font-weight: 600;
}

/* ── MODAL OVERLAY ── */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 21, 0.92);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}

.modal-card {
  background: var(--c-bg2);
  border: 1px solid rgba(79, 124, 147, 0.25);
  border-radius: 14px;
  width: 100%;
  max-height: 90%;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(79, 124, 147, 0.15);
}

.modal-header h3 {
  font-family: var(--fd);
  font-size: 14px;
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--c-light);
  font-size: 16px;
  cursor: pointer;
}

.modal-body {
  padding: 16px;
}

.modal-body .form-group-inline {
  display: flex;
  gap: 10px;
}

.modal-body .form-group-inline > div {
  flex: 1;
}

/* ── DESIGN SYSTEM GEORURALCAMPO - LIGHT THEME OVERRIDES ── */
body.light-theme {
  --c-bg:        #E4EAEB;
  --c-bg2:       rgba(255, 255, 255, 0.85);
  --c-deep:      #F0F4F5;
  --c-white:     #1E3A47;
  --c-accent:    #2B4954;
  --c-dark:      #C7DEE2;
  --c-med:       #4F7C93;
  --c-light:     #2B4954;
  --c-xlight:    #1E3A47;
  --shadow-premium: 0 20px 50px rgba(43, 73, 84, 0.08), 0 0 25px rgba(43, 73, 84, 0.04);
}

body.light-theme .desktop-panel {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(43, 73, 84, 0.15);
  color: #1E3A47;
}

body.light-theme .desktop-panel h2 {
  color: #2B4954;
}

body.light-theme .panel-subtitle {
  color: #4F7C93;
}

body.light-theme .feature-card {
  background: rgba(79, 124, 147, 0.08);
  border: 1px solid rgba(79, 124, 147, 0.15);
}

body.light-theme .feature-card h3 {
  color: #2B4954;
}

body.light-theme .feature-card p {
  color: #4F7C93;
}

body.light-theme .wa-quick-send {
  background: rgba(76, 175, 122, 0.08);
  border: 1px solid rgba(76, 175, 122, 0.2);
  color: #1A3225;
}

body.light-theme .db-debugger {
  background: #FFFFFF;
  border: 1px solid rgba(43, 73, 84, 0.15);
}

body.light-theme .db-logs-window {
  background: #F0F4F5;
  border: 1px solid rgba(43, 73, 84, 0.12);
}

body.light-theme .net-simulator {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(43, 73, 84, 0.15);
}

body.light-theme .phone-frame {
  background: #111;
  box-shadow: 0 25px 60px rgba(0,0,0,0.15), 0 0 40px rgba(43, 73, 84, 0.1);
}

body.light-theme .client-card-item,
body.light-theme .history-visit-card,
body.light-theme .client-prop-item,
body.light-theme .stat-badge,
body.light-theme .setup-prop-box,
body.light-theme .form-section-card {
  background: #FFFFFF;
  border: 1px solid rgba(79, 124, 147, 0.18);
  color: #1E3A47;
}

body.light-theme .setup-title,
body.light-theme .section-title,
body.light-theme .field-title {
  color: #2B4954;
}

body.light-theme .form-group input,
body.light-theme .form-group select,
body.light-theme .form-group textarea {
  background: #FFFFFF;
  border: 1px solid rgba(79, 124, 147, 0.3);
  color: #1E3A47;
}

body.light-theme .form-group input:focus,
body.light-theme .form-group select:focus,
body.light-theme .form-group textarea:focus {
  border-color: #2B4954;
  box-shadow: 0 0 0 2px rgba(43, 73, 84, 0.1);
}

body.light-theme .mobile-tab-bar {
  background: #FFFFFF;
  border-top: 1px solid rgba(79, 124, 147, 0.15);
}

body.light-theme .tab-item {
  color: #4F7C93;
}

body.light-theme .tab-item.active {
  color: #2B4954;
}

body.light-theme .modal-card {
  background: #FFFFFF;
  color: #1E3A47;
}

body.light-theme .desktop-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(43, 73, 84, 0.15);
  color: #1E3A47;
}

body.light-theme .desktop-header h1 {
  color: #2B4954;
}

body.light-theme .desktop-header p {
  color: #4F7C93;
}

body.light-theme .desktop-header .logo-box {
  background: rgba(43, 73, 84, 0.08);
}

body.light-theme .system-status {
  color: #2B4954;
  background: rgba(43, 73, 84, 0.08);
  border: 1px solid rgba(43, 73, 84, 0.15);
}

body.light-theme .btn-hub-exit {
  color: #2B4954 !important;
  border-color: #4F7C93 !important;
}

.btn-hub-exit:hover {
  background: var(--c-accent) !important;
  color: #FFFFFF !important;
  border-color: var(--c-accent) !important;
}

/* ── TABLET OPTIMIZATIONS (min-width: 600px) ── */
@media (min-width: 600px) {
  /* Center & limit width for Login */
  #view-login .logo-container,
  #view-login .login-box {
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }

  /* 2-Column Grid for Home View */
  #view-home {
    display: grid !important;
    grid-template-columns: 1fr 1.2fr;
    grid-template-rows: auto auto 1fr;
    gap: 20px;
    padding: 20px;
    height: 100%;
    box-sizing: border-box;
  }
  #view-home .dashboard-header {
    grid-column: 1 / span 2;
    padding: 0 0 10px 0;
  }
  #view-home .sync-badge-strip {
    grid-column: 1 / span 2;
    margin-bottom: 0;
  }
  #view-home #card-start-visit {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
    margin: 0;
  }
  #view-home .section-title {
    grid-column: 2;
    grid-row: 3;
    margin-top: 0;
  }
  #view-home .visits-scroll-list {
    grid-column: 2;
    grid-row: 3;
    margin-top: 30px; /* clear section-title */
    height: calc(100vh - 200px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* 2-Column layout for Client cards & Lists */
  .clients-scroll-list,
  .history-visits-list,
  .client-properties-list {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* Client History split panel grid layout */
  .client-history-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    grid-template-rows: auto auto auto;
    gap: 20px;
  }
  #client-info-header {
    grid-column: 1;
    grid-row: 1;
  }
  .client-stats-row {
    grid-column: 1;
    grid-row: 2;
    margin: 0 !important;
  }
  #btn-new-visit-for-client {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
  }
  .client-history-container h3.section-title:nth-of-type(1) {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }
  #history-visits-list {
    grid-column: 2;
    grid-row: 1;
    margin-top: 24px;
  }
  .client-history-container h3.section-title:nth-of-type(2) {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
  }
  #client-properties-list {
    grid-column: 2;
    grid-row: 2;
    margin-top: 24px;
  }

  /* Setup Visit split layout */
  .setup-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    align-items: start;
  }
  .setup-container .form-group:nth-of-type(1) {
    grid-column: 1;
    grid-row: 1;
  }
  #property-preview-card {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 !important;
  }
  .setup-container .form-group:nth-of-type(2) {
    grid-column: 1;
    grid-row: 2;
  }
  #setup-custom-objective-wrap {
    grid-column: 1;
    grid-row: 3;
  }
  .gps-status-check {
    grid-column: 1 / span 2;
    grid-row: 4;
  }
  #btn-start-visit-confirm {
    grid-column: 1 / span 2;
    grid-row: 5;
  }

  /* Split screen for Fieldwork view */
  #view-field-work.active {
    display: flex !important;
    flex-direction: row;
    height: 100%;
    padding: 0;
    overflow: hidden;
  }
  #field-map {
    height: 100% !important;
    width: 60% !important;
    border-bottom: none;
    border-right: 1px solid rgba(79, 124, 147, 0.2);
  }
  #view-field-work .field-panel {
    width: 40%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
  }
  #view-field-work .map-hud-overlay {
    left: 20px;
    right: auto;
    width: auto;
    gap: 10px;
    top: 20px;
  }

  /* Mock PDF Document expanded height */
  .mock-pdf-document {
    max-height: 500px !important;
    padding: 24px !important;
  }
}
