/* ==========================================================================
   PRODUTIVIDADE CALMA — DESIGN SYSTEM & PWA STYLESHEET (CLICKUP INSPIRED)
   Marca: Nascimento Consultoria (Vander Core)
   Aesthetic: Ultra-modern ClickUp UI — Clean Cards, Status Headers, Pill Badges & Sleek Spacing
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Sora:wght@600;700;800&display=swap');

:root {
  /* ClickUp / Nascimento Consultoria Color Tokens (Vander Core) */
  --primary: #7B6CF6;
  --primary-container: #6f60e9;
  --secondary: #5c50b2;
  --primary-hover: #6355E6;
  --primary-light: #EEF2FF;
  --primary-glow: rgba(123, 108, 246, 0.15);
  
  --bg-main: #F9F9F9;
  --surface: #FFFFFF;
  --surface-hover: #F1F5F9;
  
  --slate-dark: #0F172A;
  --slate-mid: #334155;
  --slate-light: #64748B;
  --slate-subtle: #94A3B8;
  --border-color: #E2E8F0;
  --border-subtle: #F1F5F9;
  
  /* ClickUp Status Colors */
  --status-todo: #64748B;
  --status-todo-bg: #F1F5F9;
  --status-progress: #4F46E5;
  --status-progress-bg: #EEF2FF;
  --status-done: #10B981;
  --status-done-bg: #ECFDF5;
  --status-alert: #EF4444;
  --status-alert-bg: #FEF2F2;
  --status-warning: #F59E0B;
  --status-warning-bg: #FFFBEB;
  
  --whatsapp: #25D366;
  --whatsapp-hover: #1EBD56;

  --font-title: 'Sora', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* ClickUp Soft Elevate Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 4px 16px -2px rgba(123, 108, 246, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px -4px rgba(123, 108, 246, 0.14), 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-dark: 0 12px 28px -6px rgba(15, 23, 42, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--slate-dark);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   ClickUp Style Topbar Header
   ========================================================================== */
.app-header {
  background: linear-gradient(180deg, #0F172A 0%, #1E1B4B 100%);
  color: #FFFFFF;
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-dark);
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.brand-logo {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary) 0%, #9B8DFD 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  color: #FFFFFF;
  box-shadow: 0 0 20px rgba(123, 108, 246, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-info h1 {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.brand-info p {
  font-size: 0.75rem;
  color: #94A3B8;
  font-weight: 500;
}

.engineer-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.avatar-circle {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13px;
  color: #FFF;
  box-shadow: 0 2px 8px rgba(123, 108, 246, 0.3);
}

.engineer-details {
  display: flex;
  flex-direction: column;
}

.engineer-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #F8FAFC;
}

.engineer-role {
  font-size: 0.7rem;
  color: #94A3B8;
}

/* ==========================================================================
   ClickUp Style App Navigation Bar
   ========================================================================== */
.app-nav {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 70px;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 12px;
}

.nav-container::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-light);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.nav-tab:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.nav-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background-color: rgba(123, 108, 246, 0.04);
}

.nav-tab .badge {
  background-color: #F1F5F9;
  color: var(--slate-mid);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.nav-tab.active .badge {
  background-color: var(--primary);
  color: #FFFFFF;
}

/* Notebook & Tablet Responsive Navigation Fix */
@media (max-width: 1280px) {
  .nav-tab {
    padding: 12px 14px;
    font-size: 0.82rem;
    gap: 6px;
  }
  .nav-tab .badge {
    font-size: 0.68rem;
    padding: 2px 6px;
  }
}

@media (max-width: 1024px) {
  .nav-tab {
    padding: 10px 10px;
    font-size: 0.78rem;
  }
  .nav-tab .badge {
    display: none; /* Hide badge on smaller laptop screens to prevent horizontal overflow */
  }
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.main-wrapper {
  flex: 1;
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 24px;
}

/* View Sections */
.view-section {
  display: none;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-section.active {
  display: block;
}

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

/* Header & Headers */
.section-header {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-header h2 {
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--slate-dark);
  letter-spacing: -0.01em;
}

.section-header p {
  color: var(--slate-light);
  font-size: 0.88rem;
  margin-top: 4px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 24px;
}

/* ==========================================================================
   ClickUp Inspired Cards & KPI Containers
   ========================================================================== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
  transform: translateY(-2px);
}

/* ClickUp Top Accent Bar for Cards */
.card.card-accent-purple::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #9B8DFD);
}

.card.card-accent-green::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #10B981, #34D399);
}

.card-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-title-bar h3 {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-dark);
}

/* ==========================================================================
   ClickUp Status Pills & Badges
   ========================================================================== */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

.status-pill.em_andamento {
  background-color: var(--status-progress-bg);
  color: var(--status-progress);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.status-pill.aprovado {
  background-color: var(--status-done-bg);
  color: var(--status-done);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-pill.alerta {
  background-color: var(--status-alert-bg);
  color: var(--status-alert);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-pill.warning {
  background-color: var(--status-warning-bg);
  color: var(--status-warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ==========================================================================
   ClickUp Style Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(123, 108, 246, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 18px rgba(123, 108, 246, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #F1F5F9;
  color: var(--slate-dark);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: #E2E8F0;
  color: var(--slate-dark);
}

.btn-whatsapp {
  background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-hover) 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
}

/* ==========================================================================
   ClickUp Task List & Kanban Board Design
   ========================================================================== */
.clickup-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #F8FAFC;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--slate-dark);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--surface);
  margin-bottom: 10px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.checklist-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  background-color: #FAFAFE;
}

.checklist-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
  margin-top: 2px;
  border-radius: 4px;
}

.checklist-content {
  flex: 1;
}

.checklist-title {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--slate-dark);
}

.checklist-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--slate-light);
  margin-top: 6px;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: #F1F5F9;
  font-weight: 600;
}

/* ==========================================================================
   ClickUp Supplier Table
   ========================================================================== */
.clickup-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.clickup-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.clickup-table th {
  background: #F8FAFC;
  padding: 14px 16px;
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--slate-mid);
  border-bottom: 1px solid var(--border-color);
}

.clickup-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--slate-dark);
}

.clickup-table tr:hover {
  background-color: #F8FAFC;
}

.supplier-badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.price-tag {
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--slate-dark);
  font-size: 1.05rem;
}

.delivery-time {
  font-size: 0.78rem;
  color: var(--status-done);
  font-weight: 700;
}

/* ==========================================================================
   Client Portal & Photo Cards
   ========================================================================== */
.client-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 50%, var(--teal-dark) 100%);
  color: #FFFFFF;
  padding: 32px 28px;
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
  box-shadow: 0 12px 32px rgba(4, 62, 87, 0.22);
  border: 1px solid rgba(138, 196, 208, 0.25);
  position: relative;
  overflow: hidden;
}

.client-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(138, 196, 208, 0.2) 0%, rgba(4, 62, 87, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.client-hero h2 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.photo-thumb {
  width: 100%;
  height: 145px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.photo-thumb:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

/* ==========================================================================
   Footer & Floating Audio Button
   ========================================================================== */
.app-footer {
  text-align: center;
  padding: 24px;
  color: var(--slate-light);
  font-size: 0.82rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  background-color: var(--surface);
}

.fab-audio {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #FFF;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 8px 24px rgba(123, 108, 246, 0.45);
  cursor: pointer;
  z-index: 200;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-audio:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(123, 108, 246, 0.6);
}

/* Mobile Sandwich Menu Button */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: #FFF;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Mobile Responsive Drawer */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
  .header-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .engineer-profile {
    display: none;
  }

  .app-nav {
    top: 64px;
  }

  .nav-container {
    display: none;
    flex-direction: column;
    background: var(--surface);
    padding: 12px;
    box-shadow: var(--shadow-dark);
  }

  .nav-container.mobile-open {
    display: flex;
  }

  .nav-tab {
    padding: 14px 16px;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--border-subtle);
    border-left: 4px solid transparent;
    justify-content: space-between;
    width: 100%;
    border-radius: var(--radius-md);
  }

  .nav-tab.active {
    border-bottom-color: var(--border-subtle);
    border-left-color: var(--primary);
    background: var(--primary-light);
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Logo Oficial Nascimento Consultoria (vander.com.br) & Assinatura DigitalSEO
   ========================================================================== */
.brand-logo-vander {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--primary);
  color: #FFFFFF;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(123, 108, 246, 0.4);
  flex-shrink: 0;
}

/* ==========================================================================
   Mão de Obra — Tabela da Linha do Tempo Físico-Financeira
   ========================================================================== */
.timeline-mo-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.88rem;
}

.timeline-mo-table th {
  background-color: #F1F5F9;
  color: var(--slate-mid);
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-color);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline-mo-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.timeline-mo-table tr:hover {
  background-color: #F8FAFC;
}

.mo-badge-combinado {
  background: #EEF2FF;
  color: #4F46E5;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.mo-badge-pago {
  background: #ECFDF5;
  color: #059669;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.mo-badge-saldo {
  background: #FFFBEB;
  color: #D97706;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Task Management Board
   ========================================================================== */
.quick-add-bar {
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.quick-add-bar input[type="text"] {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
  background-color: #FAFAFA;
}

.quick-add-bar input[type="text"]:focus {
  border-color: var(--primary);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.quick-add-bar select {
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  background-color: #FFFFFF;
}

.clickup-board-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1200px) {
  .clickup-board-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .clickup-board-grid {
    grid-template-columns: 1fr;
  }
}

.task-column {
  background: #F1F5F9;
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 400px;
}

.task-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 4px;
}

.task-column-title {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-column-todo .task-column-title { color: #475569; }
.task-column-progress .task-column-title { color: #4F46E5; }
.task-column-waiting .task-column-title { color: #D97706; }
.task-column-done .task-column-title { color: #059669; }

.task-count-badge {
  background: rgba(15, 23, 42, 0.08);
  color: var(--slate-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.clickup-task-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.clickup-task-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.clickup-task-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.clickup-task-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  accent-color: var(--primary);
  cursor: pointer;
  margin-top: 2px;
}

.clickup-task-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--slate-dark);
  line-height: 1.35;
  flex: 1;
}

.clickup-task-card.completed .clickup-task-title {
  text-decoration: line-through;
  color: var(--slate-subtle);
}

.clickup-task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.assignee-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-main);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: var(--slate-mid);
}

.assignee-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.priority-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.priority-alta { background: #FEF2F2; color: #DC2626; }
.priority-media { background: #FFFBEB; color: #D97706; }
.priority-baixa { background: #F0FDF4; color: #16A34A; }

/* Aliases for clean Task Board (replacing ClickUp classes) */
.task-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.task-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  cursor: pointer;
}
.task-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.task-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.task-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  accent-color: var(--primary);
  cursor: pointer;
  margin-top: 2px;
}
.task-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--slate-dark);
  line-height: 1.35;
  flex: 1;
}
.task-card.completed .task-title {
  text-decoration: line-through;
  color: var(--slate-subtle);
}
.task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 6px;
}
.phase-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: #EEF2FF;
  color: #4F46E5;
}

/* ==========================================================================
   TASK DETAIL SIDE DRAWER MODAL & COMMENTS / MEDIA
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.drawer-backdrop.active {
  display: block;
  opacity: 1;
}

.task-drawer {
  position: fixed;
  top: 0;
  right: -520px;
  width: 520px;
  max-width: 90vw;
  height: 100vh;
  background: var(--surface);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}
.task-drawer.open {
  right: 0;
}

.drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-main);
  position: sticky;
  top: 0;
  z-index: 10;
}
.drawer-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Comments Feed in Task Modal */
.comments-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}
.comment-bubble {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}
.comment-author {
  font-weight: 700;
  color: var(--slate-dark);
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

/* Media Grid in Task Modal */
.task-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.task-media-thumb {
  width: 100%;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-color);
}

/* Modal Login Gate */
.login-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 100%);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  text-align: center;
}

/* ==========================================================================
   MICRO-ANIMATIONS & WHATSAPP FLOATING CTA
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
  70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.view-section.active {
  animation: fadeIn 0.35s ease-out forwards;
}

.whatsapp-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--whatsapp);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: all 0.25s ease;
  animation: pulseGlow 3s infinite;
}

.whatsapp-float-btn:hover {
  background-color: var(--whatsapp-hover);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.5);
  color: #FFFFFF;
}

.whatsapp-float-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}




/* ==========================================================================
   iOS NATIVE MOBILE DESIGN SYSTEM
   Triggered on screens ≤ 768px — mirrors Apple Human Interface Guidelines
   ========================================================================== */

@media (max-width: 768px) {

  /* ── Base & Safe Areas ───────────────────────────────────────────────── */
  :root {
    --ios-safe-top: env(safe-area-inset-top, 44px);
    --ios-safe-bottom: env(safe-area-inset-bottom, 34px);
    --ios-tab-height: 83px;
    --ios-header-height: 52px;
    --ios-bg: #F2F2F7;
    --ios-surface: #FFFFFF;
    --ios-surface-2: #F2F2F7;
    --ios-separator: rgba(60, 60, 67, 0.18);
    --ios-label: #1C1C1E;
    --ios-label-secondary: rgba(60, 60, 67, 0.6);
    --ios-label-tertiary: rgba(60, 60, 67, 0.3);
    --ios-blue: #007AFF;
    --ios-indigo: #5856D6;
    --ios-teal: #30B0C7;
    --ios-green: #34C759;
    --ios-red: #FF3B30;
    --ios-orange: #FF9500;
    --ios-accent: #007AFF;
    --font-ios: -apple-system, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
  }

  * {
    -webkit-overflow-scrolling: touch;
  }

  body {
    font-family: var(--font-ios);
    background-color: var(--ios-bg);
    /* Reserve space for top safe area + fixed header + bottom tab */
    padding-bottom: calc(var(--ios-tab-height) + var(--ios-safe-bottom));
    padding-top: 0;
    overscroll-behavior-y: none;
  }

  /* ── App Header → iOS Navigation Bar ─────────────────────────────────── */
  .app-header {
    padding: 0;
    padding-top: calc(var(--ios-safe-top) + 4px);
    padding-bottom: 0;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid rgba(255,255,255,0.12);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    box-shadow: none;
  }

  .header-container {
    padding: 10px 16px 10px;
    flex-wrap: nowrap;
    gap: 8px;
  }

  /* Logo badge in header — compact on mobile */
  .brand-badge {
    gap: 8px;
  }

  .brand-badge > div:first-child {
    padding: 4px 10px !important;
  }

  .brand-badge > div:first-child img {
    height: 26px !important;
  }

  .brand-info h1 {
    font-size: 0.95rem;
    letter-spacing: -0.01em;
  }

  .brand-info p {
    display: none; /* Hide subtitle on mobile — space constrained */
  }

  /* Global obra switcher compact */
  #header-global-obra-select {
    font-size: 0.72rem !important;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .engineer-details span.engineer-role {
    display: none;
  }

  /* ── Desktop Top Nav → Hidden on Mobile ──────────────────────────────── */
  .app-nav {
    display: none !important;
  }

  /* Context bar → minimal pill on mobile */
  .active-obra-bar {
    display: none !important;
  }

  /* ── Main Wrapper ─────────────────────────────────────────────────────── */
  .main-wrapper {
    padding: calc(var(--ios-safe-top) + 58px) 0 16px;
    max-width: 100%;
    width: 100%;
  }

  /* ── Section Headers → iOS Large Title style ─────────────────────────── */
  .section-header {
    padding: 20px 16px 14px;
    border-bottom: 0.5px solid var(--ios-separator);
    margin-bottom: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .section-header h2 {
    font-family: var(--font-ios);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ios-label);
  }

  .section-header p {
    font-family: var(--font-ios);
    font-size: 0.82rem;
    color: var(--ios-label-secondary);
  }

  .section-header > div:last-child {
    width: 100%;
    flex-direction: row;
    gap: 8px;
  }

  /* ── Grids → Single Column Stack ─────────────────────────────────────── */
  .grid-3, .grid-2 {
    display: flex;
    flex-direction: column;
    gap: 1px; /* iOS table-view gap */
    background: var(--ios-separator);
    border-radius: 0;
    margin-bottom: 28px;
  }

  /* ── Cards → iOS List Cells ──────────────────────────────────────────── */
  .card {
    border-radius: 0;
    border: none;
    border-bottom: 0.5px solid var(--ios-separator);
    padding: 14px 16px;
    box-shadow: none;
    background: var(--ios-surface);
    margin: 0;
    transition: background-color 0.15s ease;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
  }

  .card:active {
    background-color: rgba(0, 0, 0, 0.05);
  }

  /* First & last card get iOS grouped table rounded corners */
  .grid-3 .card:first-child,
  .grid-2 .card:first-child {
    border-radius: 10px 10px 0 0;
  }

  .grid-3 .card:last-child,
  .grid-2 .card:last-child {
    border-radius: 0 0 10px 10px;
    border-bottom: none;
  }

  .grid-3 .card:only-child,
  .grid-2 .card:only-child {
    border-radius: 10px;
  }

  /* ── KPI Values → Large SF numerals ─────────────────────────────────── */
  .kpi-value {
    font-family: var(--font-ios) !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.04em !important;
  }

  /* ── Buttons → iOS Pill style ────────────────────────────────────────── */
  .btn {
    font-family: var(--font-ios);
    border-radius: 10px;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s ease, transform 0.1s ease;
    letter-spacing: -0.01em;
  }

  .btn:active {
    opacity: 0.7;
    transform: scale(0.98);
  }

  .btn-primary {
    background: var(--ios-blue);
    border: none;
    font-weight: 600;
  }

  .section-header .btn {
    font-size: 0.85rem;
    padding: 8px 14px;
  }

  /* ── Task Cards → iOS Row Cells ──────────────────────────────────────── */
  .clickup-task-card, .task-card {
    border-radius: 0 !important;
    border: none !important;
    border-bottom: 0.5px solid var(--ios-separator) !important;
    box-shadow: none !important;
    padding: 12px 16px !important;
    margin: 0 !important;
    background: var(--ios-surface) !important;
    transition: background-color 0.12s ease;
  }

  .clickup-task-card:active, .task-card:active {
    background-color: rgba(0,0,0,0.05) !important;
  }

  /* Kanban columns → vertical list */
  .clickup-board-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  .task-column {
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07) !important;
  }

  .task-column-header {
    border-radius: 0 !important;
  }

  /* ── Supplier Table → iOS Grouped List ───────────────────────────────── */
  .suppliers-grid, .suppliers-table, table {
    display: block;
    overflow-x: hidden;
    width: 100%;
  }

  table thead { display: none; }
  table tbody { display: flex; flex-direction: column; gap: 0; }
  table tr {
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    background: var(--ios-surface);
    border-bottom: 0.5px solid var(--ios-separator);
    gap: 4px;
  }
  table td {
    display: block;
    border: none;
    padding: 0;
    font-size: 0.88rem;
    font-family: var(--font-ios);
  }
  table td:first-child {
    font-weight: 600;
    font-size: 1rem;
    color: var(--ios-label);
  }
  table td:not(:first-child) {
    color: var(--ios-label-secondary);
    font-size: 0.82rem;
  }

  /* ── Quick Add Bar → iOS search/input style ──────────────────────────── */
  .quick-add-bar {
    flex-direction: column;
    margin: 0 16px 16px;
    border-radius: 10px !important;
    padding: 12px !important;
    border: none !important;
    background: var(--ios-surface) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08) !important;
  }

  .quick-add-bar input[type="text"],
  .quick-add-bar select {
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    border: none;
    background: var(--ios-bg);
    font-family: var(--font-ios);
    font-size: 16px; /* Prevents iOS zoom on focus */
    color: var(--ios-label);
  }

  /* ── Filter pills → iOS Segmented Control ─────────────────────────────  */
  [style*="Filtrar"] {
    background: var(--ios-surface) !important;
    margin: 0 16px 16px !important;
    border-radius: 10px !important;
    border: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07) !important;
    padding: 12px !important;
    overflow-x: auto !important;
  }

  /* ── Side Drawers → iOS Bottom Sheet ─────────────────────────────────── */
  .task-drawer,
  #insumos-modal,
  #ai-search-modal {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 92vh !important;
    border-radius: 16px 16px 0 0 !important;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.15) !important;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    padding-bottom: env(safe-area-inset-bottom, 20px) !important;
  }

  .task-drawer.open,
  #insumos-modal.open,
  #ai-search-modal.open {
    right: 0 !important;
    transform: translateY(0) !important;
  }

  /* iOS bottom sheet drag handle */
  .drawer-header::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--ios-label-tertiary);
    border-radius: 2px;
    margin: 0 auto 12px;
  }

  .drawer-header {
    flex-direction: column;
    align-items: center;
    padding: 12px 20px 16px !important;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--ios-surface);
    border-bottom: 0.5px solid var(--ios-separator);
  }

  .drawer-header h3 {
    font-family: var(--font-ios);
    font-weight: 600;
    font-size: 1.05rem;
  }

  .drawer-header .btn {
    position: absolute;
    right: 16px;
    top: 16px;
    background: var(--ios-bg) !important;
    color: var(--ios-blue) !important;
    border: none !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    border-radius: 9999px !important;
    padding: 4px 12px !important;
  }

  .drawer-body {
    padding: 16px !important;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
  }

  /* ── Comments in drawer → iOS Messages style ─────────────────────────── */
  .comment-bubble {
    border-radius: 16px !important;
    border-radius: 16px 16px 4px 16px !important;
    background: #E9E9EB !important;
    border: none !important;
    padding: 10px 14px !important;
    font-family: var(--font-ios) !important;
    font-size: 0.9rem !important;
  }

  /* ── Login Gate → iOS Full-screen sheet ──────────────────────────────── */
  .login-gate-overlay {
    align-items: flex-end !important;
    background: rgba(0,0,0,0.4) !important;
  }

  .login-card {
    border-radius: 20px 20px 0 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-bottom: env(safe-area-inset-bottom, 24px) !important;
  }

  /* ── WhatsApp float button → above tab bar ───────────────────────────── */
  .whatsapp-float-btn {
    bottom: calc(var(--ios-tab-height) + var(--ios-safe-bottom) + 12px);
    right: 16px;
  }

  /* ── Hide mobile hamburger (replaced by tab bar) ─────────────────────── */
  .mobile-menu-btn {
    display: none !important;
  }

  /* ── Inputs prevent auto-zoom (iOS requires min 16px) ───────────────── */
  input, select, textarea {
    font-size: 16px !important;
    font-family: var(--font-ios) !important;
    border-radius: 8px;
  }

  /* ── Progress bars → iOS style ───────────────────────────────────────── */
  .progress-fill {
    border-radius: 9999px;
    background: var(--ios-blue) !important;
  }

  /* ── Status pills → iOS capsule ──────────────────────────────────────── */
  .status-pill {
    font-family: var(--font-ios);
    border-radius: 9999px;
  }

} /* end @media (max-width: 768px) */

/* ==========================================================================
   iOS BOTTOM TAB BAR — Core Styles (Desktop: hidden, Mobile: visible)
   ========================================================================== */
.ios-tab-bar {
  display: none; /* Hidden on desktop */
}

@media (max-width: 768px) {
  .ios-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: rgba(249, 249, 249, 0.92);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid rgba(60, 60, 67, 0.2);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    align-items: flex-start;
    justify-content: space-around;
    gap: 0;
    height: auto;
    min-height: 49px;
  }

  .ios-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 6px 4px 8px;
    flex: 1;
    border: none;
    background: transparent;
    cursor: pointer;
    color: rgba(60, 60, 67, 0.4);
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease;
    position: relative;
    gap: 2px;
    min-width: 44px;
  }

  .ios-tab-item:active {
    opacity: 0.6;
    transform: scale(0.92);
  }

  .ios-tab-item.active {
    color: #007AFF;
  }

  .ios-tab-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .ios-tab-item.active .ios-tab-icon {
    transform: scale(1.08);
  }

  .ios-tab-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
  }

  /* Filled icon when active (replace stroke with fill for iOS feel) */
  .ios-tab-item.active .ios-tab-icon svg {
    stroke-width: 2.5;
  }

  .ios-tab-label {
    font-family: -apple-system, 'SF Pro Text', 'Helvetica Neue', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1;
    white-space: nowrap;
  }

  /* Center FAB tab — elevated task button */
  .ios-tab-center {
    position: relative;
    top: -10px;
  }

  .ios-tab-fab {
    width: 50px !important;
    height: 50px !important;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    border-radius: 50%;
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.45);
  }

  .ios-tab-center.active .ios-tab-fab,
  .ios-tab-center:not(.active) .ios-tab-fab {
    color: #FFFFFF !important;
  }

  /* Notification dot on tab items */
  .ios-tab-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 14px);
    background: #FF3B30;
    color: #FFFFFF;
    font-size: 9px;
    font-weight: 700;
    font-family: -apple-system, sans-serif;
    min-width: 16px;
    height: 16px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid rgba(249, 249, 249, 0.92);
  }
}

/* ==========================================================================
   MOBILE PRACTICAL FIELD EXECUTION CARD (Nascimento Consultoria Navy & Teal)
   ========================================================================== */
.mobile-field-execution-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 20px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 10px 30px rgba(4, 62, 87, 0.08);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.mobile-field-execution-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #7B6CF6 0%, #6f60e9 50%, #A594F9 100%);
}

.field-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.field-fase-tag {
  display: inline-block;
  background: #EEF2FF;
  color: #7B6CF6;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid #C7D2FE;
  margin-bottom: 6px;
}

.field-obra-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--slate-dark);
  line-height: 1.25;
}

.field-obra-subtitle {
  font-size: 0.8rem;
  color: #64748B;
  margin-top: 4px;
}

.field-progress-badge {
  background: #7B6CF6;
  color: #FFFFFF;
  padding: 8px 12px;
  border-radius: 14px;
  text-align: center;
  min-width: 68px;
  box-shadow: 0 4px 12px rgba(123, 108, 246, 0.25);
}

.pct-num {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}

.pct-lbl {
  font-size: 0.65rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: #E2E8F0;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.field-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #5da1af 0%, #8ac4d0 100%);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.field-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.field-chip {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
}

.badge-ok { background: #DCFCE7; color: #166534; }
.badge-warn { background: #FEF3C7; color: #92400E; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.chip-navy { background: #043e57; color: #FFFFFF; }

/* Quick Field Action Bar */
.field-action-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

@media (max-width: 480px) {
  .field-action-bar {
    grid-template-columns: 1fr;
  }
}

.field-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 44px;
}

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

.btn-whatsapp {
  background: #25D366;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}


.btn-alert {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}

.field-top-gargalo {
  background: #FFFBEB;
  border-left: 4px solid #F59E0B;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.gargalo-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #92400E;
}

.gargalo-desc {
  font-size: 0.82rem;
  color: #78350F;
  margin-top: 4px;
  line-height: 1.4;
}

/* Sprint Checklist */
.field-sprint-section {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 18px;
}

.sprint-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E2E8F0;
}

.sprint-header h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #043e57;
}

.sprint-prazo {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748B;
  background: #E2E8F0;
  padding: 2px 8px;
  border-radius: 9999px;
}

.sprint-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-item {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 12px;
}

.checklist-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #1E293B;
}

.checklist-label.checked .item-text {
  text-decoration: line-through;
  color: #94A3B8;
}

.field-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #043e57;
  cursor: pointer;
}

/* Accordion Details */
.field-details-accordion {
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: #FFFFFF;
}

.accordion-trigger {
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #043e57;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.accordion-content {
  padding: 14px 16px 16px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-block h4 {
  font-size: 0.82rem;
  color: #043e57;
  margin-bottom: 6px;
}

.fin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  font-size: 0.78rem;
  background: #F8FAFC;
  padding: 10px;
  border-radius: 8px;
}

.detail-obs {
  font-size: 0.78rem;
  color: #475569;
  margin-top: 6px;
  line-height: 1.4;
}

.team-mini-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.team-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  background: #F8FAFC;
  padding: 8px 10px;
  border-radius: 8px;
}

.mini-wa-btn {
  color: #25D366;
  font-weight: 700;
  text-decoration: none;
}

/* ==========================================================================
   CLIENT PORTAL — 3 PERGUNTAS & CLIENT QUICK ACTIONS
   ========================================================================== */
.client-questions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 860px) {
  .client-questions-grid {
    grid-template-columns: 1fr;
  }
}

.question-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 16px rgba(4, 62, 87, 0.06);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.question-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 20px;
  border: 1px solid rgba(138, 196, 208, 0.3);
  box-shadow: 0 6px 20px rgba(4, 62, 87, 0.07);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.question-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(4, 62, 87, 0.12);
}

.question-card.status-ok { 
  border-top: 5px solid #10B981; 
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.03) 0%, #FFFFFF 100%);
}
.question-card.status-warn { 
  border-top: 5px solid #F59E0B; 
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.03) 0%, #FFFFFF 100%);
}
.question-card.status-danger { 
  border-top: 5px solid #EF4444; 
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.03) 0%, #FFFFFF 100%);
}

.question-number {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.question-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.25;
}

.question-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.badge-ok { background: #DCFCE7; color: #166534; }
.badge-warn { background: #FEF3C7; color: #92400E; }
.badge-danger { background: #FEE2E2; color: #991B1B; }

.question-desc {
  font-size: 0.83rem;
  color: #475569;
  line-height: 1.5;
}

/* Client Quick Action Bar (Mobile & Desktop) */
.client-action-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .client-action-bar {
    grid-template-columns: 1fr;
  }
}

.client-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 50px;
  text-decoration: none;
}

.client-action-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

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

.btn-scan-nfe {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  box-shadow: 0 4px 16px rgba(4, 62, 87, 0.28);
}

.btn-buy-material {
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal-mid) 100%);
  box-shadow: 0 4px 16px rgba(93, 161, 175, 0.32);
}

.btn-material-arrived {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.28);
}

/* Delay Audit Box (Engenheiro & Cliente) */
.delay-audit-box {
  background: #FEF2F2;
  border: 1.5px solid #FCA5A5;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.delay-audit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #991B1B;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.delay-audit-body {
  font-size: 0.8rem;
  color: #7F1D1D;
  line-height: 1.45;
}

.delay-audit-resp {
  display: inline-block;
  background: #991B1B;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 6px;
}


