/* ═══════════════════════════════════════
   ZETTA FIELD APP — Design System
   ═══════════════════════════════════════ */

:root {
  /* Brand */
  --navy:    #0F172A;
  --slate:   #1E293B;
  --card:    #1E293B;
  --border:  #334155;
  --cyan:    #0BB8D4;
  --cyan-dk: #0990A8;
  --green:   #22C55E;
  --yellow:  #F59E0B;
  --red:     #EF4444;
  --blue:    #3B82F6;

  /* Text */
  --text-primary:   #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted:     #64748B;

  /* Layout base */
  --navbar-h:  56px;
  --bottom-h:  64px;
  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);

  /* Safe areas — respeita notch, status bar e barra de navegação do Android/iOS */
  --safe-top:    env(safe-area-inset-top,    0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left,   0px);
  --safe-right:  env(safe-area-inset-right,  0px);
}

/* ─── RESET ─────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { font-size:16px; -webkit-tap-highlight-color:transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--navy);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display:block; max-width:100%; }
button { cursor:pointer; font-family:inherit; border:none; background:none; }

/* ─── SCROLLBAR ──────────────────────────── */
::-webkit-scrollbar { width:4px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:2px; }

/* ─── TOP NAVBAR ─────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(var(--navbar-h) + var(--safe-top));
  padding-top: var(--safe-top);
  padding-left: calc(16px + var(--safe-left));
  padding-right: calc(16px + var(--safe-right));
  background: var(--slate);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar-logo img {
  height: 32px;
  border-radius: 6px;
}
.navbar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.navbar-subtitle {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: -2px;
}
.navbar-action {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: background .2s;
}
.navbar-action:active { background: var(--border); }

/* ─── CONTENT AREA ───────────────────────── */
.page-content {
  padding-top: calc(var(--navbar-h) + var(--safe-top) + 16px);
  padding-bottom: calc(var(--bottom-h) + var(--safe-bottom) + 16px);
  padding-left: calc(16px + var(--safe-left));
  padding-right: calc(16px + var(--safe-right));
  min-height: 100vh;
}

/* ─── BOTTOM NAV ─────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--bottom-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  background: var(--slate);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 0;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: color .2s;
  position: relative;
}
.bottom-nav-item svg {
  width: 22px; height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bottom-nav-item.active {
  color: var(--cyan);
}
.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: var(--cyan);
  border-radius: 0 0 2px 2px;
}
.bottom-nav-item .badge-dot {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  width: 7px; height: 7px;
  background: var(--red);
  border-radius: 50%;
  border: 1.5px solid var(--slate);
}

/* ─── CARDS ──────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.card-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.card-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.card-icon-cyan  { background: rgba(11,184,212,.15); color: var(--cyan); }
.card-icon-green { background: rgba(34,197,94,.15);  color: var(--green); }
.card-icon-yellow{ background: rgba(245,158,11,.15); color: var(--yellow); }
.card-icon-red   { background: rgba(239,68,68,.15);  color: var(--red); }
.card-icon-blue  { background: rgba(59,130,246,.15); color: var(--blue); }

/* ─── INTERVENTION CARD ─────────────────── */
.int-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  transition: border-color .2s, transform .15s;
}
.int-card:active {
  transform: scale(0.985);
  border-color: var(--cyan);
}
.int-card-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(11,184,212,.12);
  color: var(--cyan);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.int-card-body { flex: 1; min-width: 0; }
.int-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.int-card-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 3px;
}
.int-card-badge {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-pending  { background: rgba(245,158,11,.15); color: var(--yellow); }
.badge-open     { background: rgba(59,130,246,.15); color: var(--blue); }
.badge-synced   { background: rgba(34,197,94,.15);  color: var(--green); }
.badge-error    { background: rgba(239,68,68,.15);  color: var(--red); }

/* ─── SECTION HEADER ─────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.section-link {
  font-size: 0.8rem;
  color: var(--cyan);
  font-weight: 500;
}

/* ─── GREETING ───────────────────────────── */
.greeting {
  padding: 8px 0 20px;
}
.greeting-hello {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.greeting-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
}

/* ─── STATS ROW ──────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}
.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.stat-trend {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ─── BUTTONS ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity .2s, transform .15s;
  min-height: 48px;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.97); opacity: .85; }
.btn:disabled { opacity:.5; pointer-events:none; }
.btn-primary  { background: var(--cyan);  color: #fff; }
.btn-success  { background: var(--green); color: #fff; }
.btn-danger   { background: var(--red);   color: #fff; }
.btn-warning  { background: var(--yellow);color: #fff; }
.btn-ghost    { background: var(--border);color: var(--text-primary); }
.btn-outline  { background: transparent; border: 1.5px solid var(--border); color: var(--text-primary); }
.btn-full     { width: 100%; }
.btn-sm       { padding: 8px 14px; font-size:0.8rem; min-height:36px; border-radius:6px; }
.btn-icon {
  width: 44px; height: 44px;
  padding: 0;
  border-radius: 10px;
  font-size: 1.1rem;
}

/* ─── FORMS ──────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  background: var(--navy);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  min-height: 48px;
  appearance: none;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(11,184,212,.15);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
textarea.form-control { min-height: 120px; resize: vertical; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ─── STEP WIZARD ────────────────────────── */
.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 0;
  margin-bottom: 8px;
}
.step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background .3s, width .3s;
}
.step-dot.active {
  background: var(--cyan);
  width: 24px;
  border-radius: 4px;
}
.step-dot.done { background: var(--green); }

.wizard-header {
  margin-bottom: 20px;
}
.wizard-step-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}
.wizard-step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}
.wizard-nav {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.wizard-nav .btn { flex: 1; }

/* ─── CHECKLIST ──────────────────────────── */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--navy);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  min-height: 52px;
  touch-action: manipulation;
}
.checklist-item:active { opacity: .8; }
.checklist-item.checked {
  border-color: var(--green);
  background: rgba(34,197,94,.06);
}
.checklist-item input[type="checkbox"] { display:none; }
.check-box {
  width: 22px; height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex; align-items:center; justify-content:center;
  flex-shrink: 0;
  transition: border-color .2s, background .2s;
  font-size: 0.85rem;
}
.checklist-item.checked .check-box {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.check-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex: 1;
  line-height: 1.4;
}
.checklist-item.checked .check-label { color: var(--text-primary); }

/* ─── PHOTO GRID ─────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.photo-slot {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color .2s;
}
.photo-slot:active { border-color: var(--cyan); }
.photo-slot.filled { border-style: solid; border-color: var(--green); }
.photo-slot input { position:absolute; inset:0; opacity:0; cursor:pointer; }
.photo-slot img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.photo-slot-icon { font-size: 1.4rem; }

/* ─── INSPECTION LIST CARD ───────────────── */
.insp-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .2s;
}
.insp-card:active { border-color: var(--cyan); transform: scale(0.995); }
.insp-card-row1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}
.insp-campo {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.insp-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ─── SEARCH BAR ─────────────────────────── */
.search-bar {
  position: relative;
  margin-bottom: 14px;
}
.search-bar input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
}
.search-bar input:focus {
  outline: none;
  border-color: var(--cyan);
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

/* ─── FILTER ROW ─────────────────────────── */
.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display:none; }
.filter-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  background: var(--card);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
  touch-action: manipulation;
}
.filter-chip.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(11,184,212,.1);
}

/* ─── EMPTY STATE ────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.empty-sub { font-size: 0.85rem; }

/* ─── MODAL ──────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 200;
  align-items: flex-end;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal-sheet {
  width: 100%;
  max-height: 90vh;
  background: var(--slate);
  border-radius: 20px 20px 0 0;
  padding: 20px;
  padding-bottom: calc(20px + var(--safe-bottom));
  overflow-y: auto;
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.modal-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
}
.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

/* ─── ALERT ──────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-danger  { background: rgba(239,68,68,.12);  color: #FCA5A5; border: 1px solid rgba(239,68,68,.25); }
.alert-success { background: rgba(34,197,94,.12);  color: #86EFAC; border: 1px solid rgba(34,197,94,.25); }
.alert-info    { background: rgba(11,184,212,.12); color: #67E8F9; border: 1px solid rgba(11,184,212,.25); }
.alert-warning { background: rgba(245,158,11,.12); color: #FCD34D; border: 1px solid rgba(245,158,11,.25); }

/* ─── SPINNER ────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── TOAST ──────────────────────────────── */
#toast-container {
  position: fixed;
  top: calc(var(--navbar-h) + var(--safe-top) + 12px);
  left: calc(16px + var(--safe-left));
  right: calc(16px + var(--safe-right));
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: fadeInDown .3s ease, fadeOut .3s ease 2.7s forwards;
  pointer-events: auto;
  cursor: pointer;
}
/* Erros ficam sem auto-fade — animação só entra, não sai */
.toast.toast-error {
  animation: fadeInDown .3s ease;
  border-left: 4px solid #ff6b6b;
}
.toast-success { background: rgba(34,197,94,.92);  color:#fff; }
.toast-error   { background: rgba(200,30,30,.96);  color:#fff; }
.toast-info    { background: rgba(11,184,212,.92); color:#fff; }
.toast-msg     { flex: 1; line-height: 1.4; word-break: break-word; }
.toast-close   { flex-shrink: 0; font-size: 1rem; opacity: .7; line-height: 1; }
@keyframes fadeInDown {
  from { opacity:0; transform:translateY(-10px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes fadeOut {
  to { opacity:0; transform:translateY(-10px); }
}

/* ─── DIVIDER ────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}
.divider-label {
  text-align: center;
  position: relative;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 16px 0;
}
.divider-label::before, .divider-label::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.divider-label::before { left: 0; }
.divider-label::after  { right: 0; }

/* ─── LOGIN PAGE ─────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: calc(24px + var(--safe-top));
  padding-bottom: calc(24px + var(--safe-bottom));
  padding-left: calc(24px + var(--safe-left));
  padding-right: calc(24px + var(--safe-right));
  background: var(--navy);
}
.login-logo {
  margin-bottom: 32px;
  text-align: center;
}
.login-logo img { height: 64px; margin: 0 auto 12px; border-radius: 14px; }
.login-logo-name {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--cyan), #818CF8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-logo-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.login-box {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.login-box h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.login-box p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.password-toggle {
  position: relative;
}
.password-toggle input { padding-right: 44px; }
.password-toggle .toggle-btn {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  touch-action: manipulation;
}
.login-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ─── DETALHE INSP ───────────────────────── */
.detalhe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.detalhe-item {
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.detalhe-item label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
  margin-bottom: 4px;
}
.detalhe-item strong {
  font-size: 0.9rem;
  color: var(--text-primary);
}
.detalhe-secao { margin-bottom: 20px; }
.detalhe-secao-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 10px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.check-row:last-child { border-bottom: none; }
.check-row.ok { color: var(--green); }
.check-row.nok { color: var(--red); }

/* ─── PHOTO THUMB ────────────────────────── */
.photo-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.photo-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border);
}
.photo-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .2s;
}
.photo-thumb:active img { transform: scale(1.05); }

/* ─── PDF / RELATORIO SECTION ────────────── */
.report-action {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: border-color .2s;
}
.report-action:active { border-color: var(--cyan); }
.report-action-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items:center; justify-content:center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.report-action-body { flex: 1; }
.report-action-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.report-action-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 3px;
}
.report-arrow { color: var(--text-muted); font-size: 1.1rem; }

/* ─── PROFILE ────────────────────────────── */
.profile-header {
  text-align: center;
  padding: 24px 0 16px;
}
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--cyan);
  display: flex; align-items:center; justify-content:center;
  font-size: 1.8rem;
  margin: 0 auto 12px;
}
.profile-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.profile-role {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 3px;
}
.profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
}
.profile-item:last-child { border-bottom: none; }
.profile-item-left { display: flex; align-items:center; gap: 12px; }
.profile-item-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items:center; justify-content:center;
  font-size: 1rem;
}
.sync-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 0.8rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.sync-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sync-dot-green  { background: var(--green); }
.sync-dot-yellow { background: var(--yellow); }
.sync-dot-red    { background: var(--red); }

/* ─── FULLSCREEN IMAGE ───────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width:95vw; max-height:95vh; object-fit:contain; border-radius: 8px; }
.lightbox-close {
  position: absolute;
  top: 20px; right: 20px;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

/* ─── UTILITIES ──────────────────────────── */
.text-cyan    { color: var(--cyan); }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--green); }
.text-danger  { color: var(--red); }
.text-warning { color: var(--yellow); }
.fw-bold   { font-weight: 700; }
.fw-medium { font-weight: 500; }
.text-sm   { font-size: 0.82rem; }
.text-xs   { font-size: 0.72rem; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.flex   { display:flex; align-items:center; }
.flex-between { display:flex; align-items:center; justify-content:space-between; }
.hidden { display:none !important; }

/* ─── RESPONSIVE ─────────────────────────── */
@media (min-width: 480px) {
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
  .stats-row  { grid-template-columns: repeat(4, 1fr); }
}

/* ── Tablet (768px+) ── */
@media (min-width: 768px) {
  :root {
    --navbar-h: 64px;
    --bottom-h: 0px;
  }

  /* Navbar full-width com sidebar de navegação */
  .navbar {
    max-width: 100%;
    left: 0; right: 0;
    transform: none;
    padding-left: calc(240px + 24px);
  }

  /* Sidebar fixa à esquerda substituindo o bottom nav */
  .bottom-nav {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 240px;
    height: 100vh;
    top: 0; left: 0; bottom: auto; right: auto;
    border-top: none;
    border-right: 1px solid var(--border);
    padding-top: calc(var(--navbar-h) + 24px);
    padding-bottom: 24px;
    padding-left: 12px;
    padding-right: 12px;
    gap: 4px;
    transform: none;
    max-width: none;
    box-shadow: 4px 0 20px rgba(0,0,0,0.2);
  }

  .bottom-nav-item {
    flex-direction: row;
    justify-content: flex-start;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    gap: 12px;
    text-transform: none;
    letter-spacing: 0;
  }

  .bottom-nav-item.active {
    background: rgba(11,184,212,.1);
    border-radius: var(--radius-sm);
  }

  .bottom-nav-item.active::before {
    display: none;
  }

  .bottom-nav-item svg {
    width: 20px; height: 20px;
    flex-shrink: 0;
  }

  .bottom-nav-item .badge-dot {
    top: 8px;
    right: 12px;
  }

  /* Conteúdo ao lado da sidebar */
  .page-content {
    padding-left: calc(240px + 24px);
    padding-right: 24px;
    padding-top: calc(var(--navbar-h) + 24px);
    padding-bottom: 24px;
    max-width: 100%;
    margin: 0;
  }

  /* Grids maiores no tablet */
  .stats-row         { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .photo-grid        { grid-template-columns: repeat(5, 1fr); }
  .photo-thumbs      { grid-template-columns: repeat(5, 1fr); }
  .detalhe-grid      { grid-template-columns: repeat(3, 1fr); }
  .form-row          { grid-template-columns: repeat(3, 1fr); }

  /* Cards em 2 colunas quando há lista */
  .cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* Modal centralizado em vez de bottom sheet */
  .modal-overlay { align-items: center; justify-content: center; }
  .modal-sheet {
    width: 520px;
    max-height: 85vh;
    border-radius: 16px;
    animation: fadeIn .2s ease;
  }
  @keyframes fadeIn {
    from { opacity:0; transform: scale(0.96); }
    to   { opacity:1; transform: scale(1); }
  }
  .modal-handle { display: none; }

  /* Login page mais espaçada */
  .login-box { max-width: 440px; padding: 36px 32px; }

  /* Greeting */
  .greeting-name { font-size: 1.8rem; }
}

/* ── Large tablet / desktop (1024px+) ── */
@media (min-width: 1024px) {
  .bottom-nav { width: 260px; }
  .navbar     { padding-left: calc(260px + 32px); }

  .page-content {
    padding-left: calc(260px + 32px);
    padding-right: 32px;
    max-width: 1100px;
  }

  .photo-grid   { grid-template-columns: repeat(6, 1fr); }
  .photo-thumbs { grid-template-columns: repeat(6, 1fr); }
  .detalhe-grid { grid-template-columns: repeat(4, 1fr); }
}
