/* ==========================================================================
   OFICINAPRO MOBILE - DESIGN SYSTEM (AUTOMOTIVE DARK COCKPIT)
   Aesthetics: Rich Dark Mode, HSL Color Palette, Glassmorphism, Micro-animations
   ========================================================================== */

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

:root {
  /* Cores Base HSL */
  --bg-primary: hsl(222, 47%, 7%);
  --bg-secondary: hsl(222, 42%, 11%);
  --bg-tertiary: hsl(222, 38%, 15%);
  --bg-card: hsla(222, 36%, 13%, 0.75);
  --bg-glass: hsla(222, 36%, 12%, 0.6);

  /* Acentos Automotivos */
  --accent-turbo: hsl(24, 100%, 50%);
  --accent-turbo-glow: hsla(24, 100%, 50%, 0.35);
  --accent-turbo-hover: hsl(24, 100%, 45%);
  
  --accent-electric: hsl(217, 91%, 60%);
  --accent-electric-glow: hsla(217, 91%, 60%, 0.25);
  
  --status-success: hsl(152, 76%, 42%);
  --status-success-bg: hsla(152, 76%, 42%, 0.15);
  --status-warning: hsl(43, 96%, 56%);
  --status-warning-bg: hsla(43, 96%, 56%, 0.15);
  --status-info: hsl(199, 89%, 48%);
  --status-info-bg: hsla(199, 89%, 48%, 0.15);
  --status-danger: hsl(0, 84%, 60%);
  --status-danger-bg: hsla(0, 84%, 60%, 0.15);

  /* Tipografia & Bordas */
  --text-main: hsl(210, 40%, 98%);
  --text-muted: hsl(215, 20%, 65%);
  --text-subtle: hsl(215, 15%, 45%);
  --border-subtle: hsla(215, 25%, 27%, 0.5);
  --border-focus: hsla(24, 100%, 50%, 0.6);
  --border-glass: hsla(210, 40%, 98%, 0.08);

  /* Dimensões & Sombras */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px var(--border-glass);
  --shadow-glow: 0 0 25px var(--accent-turbo-glow);
  --shadow-floating: 0 20px 40px -15px rgba(0, 0, 0, 0.7);

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 15%, hsla(24, 100%, 50%, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 90% 85%, hsla(217, 91%, 60%, 0.06) 0%, transparent 45%);
  background-attachment: fixed;
}

/* Container do App (Mobile-First / Shell) */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
  padding-bottom: 90px; /* Espaço para Bottom Navigation */
}

@media (min-width: 768px) {
  body {
    padding: 24px 0;
  }
  .app-container {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    min-height: calc(100vh - 48px);
    overflow: hidden;
  }
}

/* Header Superior Fixo */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-glass);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.brand-logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-turbo), #ff2a00);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px var(--accent-turbo-glow);
}

.brand-logo-badge svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  background: linear-gradient(180deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-turbo);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  background: hsla(222, 30%, 18%, 0.6);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.icon-btn:hover, .icon-btn:active {
  background: var(--bg-tertiary);
  transform: scale(0.96);
  border-color: var(--accent-turbo);
}

/* Barra de Busca de Alta Performance */
.search-section {
  padding: 16px 20px 8px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-subtle);
  pointer-events: none;
  width: 20px;
  height: 20px;
}

.search-input {
  width: 100%;
  padding: 14px 14px 14px 44px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-smooth);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-subtle);
}

.search-input:focus {
  border-color: var(--accent-turbo);
  box-shadow: 0 0 0 3px var(--accent-turbo-glow);
  background: var(--bg-tertiary);
}

/* ==========================================================================
   OS 3 GRANDES BOTÕES RÁPIDOS DA PÁGINA INICIAL (HERO ACTIONS)
   ========================================================================== */
.hero-actions-container {
  padding: 12px 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.hero-action-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
}

.hero-action-card.orcamento::before { background: var(--accent-turbo); }
.hero-action-card.cliente::before { background: var(--accent-electric); }
.hero-action-card.veiculo::before { background: var(--status-success); }

.hero-action-card:hover, .hero-action-card:active {
  transform: translateY(-2px);
  border-color: var(--border-subtle);
  box-shadow: 0 12px 25px -8px rgba(0, 0, 0, 0.6);
}

.hero-action-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-action-card.orcamento .hero-action-icon {
  background: linear-gradient(135deg, var(--accent-turbo), #ea580c);
  color: #fff;
}

.hero-action-card.cliente .hero-action-icon {
  background: linear-gradient(135deg, var(--accent-electric), #1d4ed8);
  color: #fff;
}

.hero-action-card.veiculo .hero-action-icon {
  background: linear-gradient(135deg, var(--status-success), #047857);
  color: #fff;
}

.hero-action-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.hero-action-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.hero-action-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.hero-action-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.hero-action-arrow {
  color: var(--text-subtle);
  font-size: 1.2rem;
  font-weight: 700;
  transition: var(--transition-smooth);
}

.hero-action-card:hover .hero-action-arrow {
  transform: translateX(3px);
  color: var(--text-main);
}

/* Painel de Status Compacto */
.status-pill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 20px 10px;
  padding: 8px 14px;
  background: hsla(222, 38%, 14%, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-success);
  box-shadow: 0 0 8px var(--status-success);
  margin-right: 6px;
}

/* Box de Relações Mútuas (Veículo ⟷ Cliente) */
.relation-box {
  background: hsla(222, 45%, 9%, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.relation-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-subtle);
  letter-spacing: 0.5px;
}

.vehicle-pill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-tertiary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  margin-top: 4px;
}

.vehicle-pill-plate {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-main);
}

.btn-open-orc-mini {
  background: var(--accent-turbo);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-open-orc-mini:hover {
  background: var(--accent-turbo-hover);
}

/* Seção de Conteúdo Principal (Lista de Itens) */
.main-content {
  flex: 1;
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0 8px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-badge {
  background: var(--bg-tertiary);
  color: var(--accent-turbo);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Cards de Veículos / Orçamentos / OS */
.card-item {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.card-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-turbo);
}

.card-item.os::before {
  background: var(--accent-electric);
}

.card-item.cliente::before {
  background: var(--status-success);
}

.card-item:hover {
  border-color: var(--border-subtle);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-plate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  background: #ffffff;
  color: #0b1329;
  padding: 2px 8px;
  border-radius: 4px;
  border: 2px solid #002266;
  letter-spacing: 1px;
  width: fit-content;
}

.card-vehicle-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.card-owner {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pendente {
  background: var(--status-warning-bg);
  color: var(--status-warning);
}

.badge-aprovado {
  background: var(--status-success-bg);
  color: var(--status-success);
}

.badge-aberta {
  background: var(--status-info-bg);
  color: var(--status-info);
}

.badge-finalizada {
  background: hsla(215, 20%, 65%, 0.15);
  color: var(--text-muted);
}

.card-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: hsla(222, 35%, 10%, 0.5);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-item-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
}

.meta-item-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.card-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-card-action {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
}

.btn-card-action.primary {
  background: var(--accent-turbo);
  color: #fff;
}

.btn-card-action.primary:hover {
  background: var(--accent-turbo-hover);
}

.btn-card-action.secondary {
  background: var(--bg-tertiary);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

.btn-card-action.secondary:hover {
  background: hsl(222, 38%, 20%);
}

.btn-card-action.whatsapp {
  background: #25D366;
  color: #fff;
}

/* Bottom Navigation Fixo (PWA Style) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 60;
  background: hsla(222, 45%, 8%, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-around;
  padding: 10px 12px;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-subtle);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.nav-tab svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.nav-tab.active {
  color: var(--accent-turbo);
}

.nav-tab.active svg {
  stroke: var(--accent-turbo);
}

/* Modais Elegantes (Glassmorphism) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px 20px 40px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-floating);
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.modal-handle {
  width: 48px;
  height: 5px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  margin: 0 auto 16px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

/* Banners e Botões de Scanner com IA */
.ai-scanner-btn {
  background: linear-gradient(135deg, hsla(280, 80%, 60%, 0.15), hsla(217, 91%, 60%, 0.15));
  border: 1px solid hsla(280, 80%, 60%, 0.4);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-smooth);
  margin-bottom: 16px;
}

.ai-scanner-btn:hover, .ai-scanner-btn:active {
  background: linear-gradient(135deg, hsla(280, 80%, 60%, 0.25), hsla(217, 91%, 60%, 0.25));
  border-color: hsla(280, 80%, 70%, 0.7);
  transform: translateY(-1px);
}

.ai-scanner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-scanner-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

.ai-scanner-title {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.ai-scanner-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.ai-badge {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ai-loading-box {
  display: none;
  background: hsla(222, 45%, 15%, 0.8);
  border: 1px solid var(--accent-turbo);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  align-items: center;
  gap: 12px;
  animation: pulse 1.5s infinite;
}

.ai-loading-box.active {
  display: flex;
}

.ai-error-box {
  display: none;
  background: var(--status-danger-bg);
  border: 1px solid var(--status-danger);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.78rem;
  color: var(--text-main);
  margin-bottom: 14px;
  line-height: 1.4;
}

.ai-error-box.active {
  display: block;
}

.draft-pill {
  font-size: 0.68rem;
  color: var(--status-warning);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Formulários Modernos */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--accent-turbo);
  box-shadow: 0 0 0 2px var(--accent-turbo-glow);
}

/* Área de Fotos & Câmera */
.camera-area {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  background: hsla(222, 38%, 15%, 0.3);
  transition: var(--transition-smooth);
  margin-bottom: 16px;
}

.camera-area:hover, .camera-area:active {
  border-color: var(--accent-turbo);
  background: hsla(24, 100%, 50%, 0.05);
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.photo-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

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

.photo-thumb .btn-del-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Gravador de Voz Animado */
.audio-recorder-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.mic-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-turbo);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px var(--accent-turbo-glow);
}

.mic-btn.recording {
  background: var(--status-danger);
  animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 90%;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  background: hsla(222, 45%, 15%, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-left: 4px solid var(--accent-turbo);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slide-down 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.toast.success { border-left-color: var(--status-success); }
.toast.error { border-left-color: var(--status-danger); }

@keyframes slide-down {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Estado Vazio / Carregando */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid hsla(24, 100%, 50%, 0.2);
  border-top-color: var(--accent-turbo);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   COMBOBOX AUTOCOMPLETE (PARA 1000+ REGISTROS) & CHIPS DE FILTRO
   ========================================================================== */
.combobox-wrapper {
  position: relative;
  width: 100%;
}

.combobox-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 150;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  max-height: 230px;
  overflow-y: auto;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.75);
}

.combobox-dropdown.open {
  display: block;
}

.combobox-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: var(--transition-smooth);
}

.combobox-item:last-child {
  border-bottom: none;
}

.combobox-item:hover, .combobox-item:active {
  background: var(--bg-tertiary);
  border-left: 3px solid var(--accent-turbo);
}

.combobox-item-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.combobox-item-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.combobox-item-action {
  background: hsla(24, 100%, 50%, 0.1);
  color: var(--accent-turbo);
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
  text-align: center;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-top: 1px dashed hsla(24, 100%, 50%, 0.4);
}

.combobox-item-action:hover {
  background: hsla(24, 100%, 50%, 0.2);
}

/* Card de Entidade Selecionada no Combobox */
.selected-badge-box {
  background: hsla(222, 45%, 15%, 0.9);
  border: 1px solid var(--accent-turbo);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.selected-badge-title {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
}

.selected-badge-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.btn-badge-change {
  background: none;
  border: none;
  color: var(--accent-turbo);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 6px;
  flex-shrink: 0;
}

/* Chips de Filtro Rápido para Orçamentos */
.filter-chips-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-chips-row::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.filter-chip:active, .filter-chip.active {
  background: var(--accent-turbo);
  color: #fff;
  border-color: var(--accent-turbo);
  box-shadow: 0 4px 12px var(--accent-turbo-glow);
}

/* Barra de Filtro de Orçamentos */
.orc-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.orc-filter-input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-smooth);
}

.orc-filter-input:focus {
  border-color: var(--accent-turbo);
  background: var(--bg-tertiary);
}

/* Responsividade Mobile Reforçada */
@media (max-width: 480px) {
  .app-container {
    padding-bottom: 85px;
  }
  .modal-sheet {
    padding: 20px 16px 85px;
    max-height: 92vh;
  }
  .card-actions-row {
    flex-wrap: wrap;
  }
  .btn-card-action {
    min-height: 44px;
  }
  .hero-action-card {
    padding: 14px 12px;
  }
}

/* --- ITENS DO ORÇAMENTO (PEÇAS E SERVIÇOS) --- */
.orc-items-section {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.orc-items-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.orc-items-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-type-toggle {
  display: flex;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 4px;
  border: 1px solid var(--border-subtle);
}

.item-type-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.item-type-btn.active.peca {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

.item-type-btn.active.servico {
  background: linear-gradient(135deg, #0284c7, #00d4ff);
  color: #0b0f19;
  box-shadow: 0 2px 10px rgba(0, 212, 255, 0.4);
}

/* Card Dinâmico de Adição com Transição Suave */
.add-item-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-secondary);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.add-item-card.mode-peca {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.08);
}

.add-item-card.mode-servico {
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.08);
}

.add-item-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.active-mode-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  transition: all 0.25s ease;
}

.mode-peca .active-mode-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #4ade80;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.mode-servico .active-mode-badge {
  background: rgba(0, 212, 255, 0.15);
  color: var(--accent-electric);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.btn-clear-item-fields {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.btn-clear-item-fields:hover {
  color: var(--status-danger);
}

.item-desc-input {
  width: 100%;
  font-size: 0.95rem;
}

.item-inputs-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  align-items: flex-end;
}

.input-col-qtd,
.input-col-valor {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.item-mini-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Stepper de Quantidade */
.stepper-box {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 44px;
}

.btn-stepper {
  width: 34px;
  height: 100%;
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-main);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  user-select: none;
}

.btn-stepper:active {
  background: var(--accent-turbo);
  color: #fff;
}

.stepper-input {
  width: 42px;
  height: 100%;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0;
  -moz-appearance: textfield;
}

.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Wrapper de Moeda R$ */
.currency-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.currency-prefix {
  position: absolute;
  left: 12px;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-muted);
  pointer-events: none;
}

.currency-input {
  width: 100%;
  height: 44px;
  padding-left: 36px !important;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}

/* Botão de Adição Largo e Responsivo (Sem Cortes!) */
.btn-add-item-action {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.92rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 2px;
}

.mode-peca .btn-add-item-action {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.mode-peca .btn-add-item-action:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.mode-servico .btn-add-item-action {
  background: linear-gradient(135deg, #0284c7, #00d4ff);
  color: #0b0f19;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.35);
}

.mode-servico .btn-add-item-action:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.25);
}

.btn-add-icon {
  font-size: 1.1rem;
}

.orc-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

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

.orc-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  animation: itemSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.2s ease;
}

.orc-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.orc-item-desc {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-item-peca {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-item-servico {
  background: rgba(0, 212, 255, 0.15);
  color: var(--accent-electric);
  border: 1px solid rgba(0, 212, 255, 0.3);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.orc-item-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.orc-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.orc-item-price {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--accent-turbo);
}

.btn-remove-item {
  background: none;
  border: none;
  color: var(--status-danger);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.btn-remove-item:hover {
  background: rgba(239, 68, 68, 0.15);
}

.orc-totals-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.orc-totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.orc-totals-row.grand-total {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-turbo);
  padding-top: 4px;
  border-top: 1px dashed var(--border-glass);
}

/* Modal de Sucesso Pós-Orçamento */
.success-orc-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

.success-orc-number {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-turbo);
  letter-spacing: 0.5px;
}

.success-orc-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.btn-action-share-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-tertiary);
  color: #fff;
  border: 1px solid var(--border-glass);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-action-share-pdf:hover {
  border-color: var(--accent-turbo);
  background: var(--bg-primary);
}

.btn-action-share-zap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-action-share-zap:hover {
  background: #20ba5a;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.btn-action-share-zap:active {
  transform: translateY(1px);
}

.btn-action-share-native {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent-electric);
  color: #000;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-action-share-native:hover {
  background: #00c4e6;
  transform: translateY(-1px);
}

.btn-action-share-native:active {
  transform: translateY(1px);
}

/* Ícone com rotação suave ao sincronizar */
.icon-btn.rotating svg {
  animation: spin 0.7s linear infinite;
  color: var(--accent-turbo);
}

/* Botão elegante para alternar entre os 2 últimos orçamentos e a lista completa */
.btn-ver-mais-orc {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-ver-mais-orc:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-turbo);
  color: var(--accent-turbo);
  transform: translateY(-1px);
}

.btn-ver-mais-orc:active {
  transform: translateY(1px);
}

/* Badge de Cofre Seguro nas Configurações */
.security-vault-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: hsla(145, 60%, 15%, 0.35);
  border: 1px solid hsla(145, 60%, 45%, 0.4);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.vault-icon {
  font-size: 1.5rem;
}

.vault-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--status-success);
}

.vault-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 2px;
}

.vault-desc code {
  color: var(--accent-electric);
}

/* Box de Histórico de Orçamentos do Veículo */
.vehicle-orcamentos-box {
  background: hsla(222, 45%, 8%, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vehicle-orcamentos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vehicle-orcamentos-title {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-main);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-orc-count {
  background: hsla(24, 100%, 50%, 0.2);
  color: var(--accent-turbo);
  border: 1px solid hsla(24, 100%, 50%, 0.35);
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 800;
}

.vehicle-orcamentos-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}

.vehicle-orc-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: var(--transition-smooth);
}

.vehicle-orc-item:hover {
  border-color: hsla(24, 100%, 50%, 0.4);
  background: hsl(222, 38%, 18%);
}

.vehicle-orc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vehicle-orc-num-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vehicle-orc-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--accent-turbo);
}

.vehicle-orc-price {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-main);
}

.vehicle-orc-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
  background: hsla(222, 38%, 10%, 0.5);
  padding: 5px 8px;
  border-radius: 4px;
}

.vehicle-orc-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px dashed var(--border-subtle);
}

.vehicle-orc-date {
  font-size: 0.7rem;
  color: var(--text-subtle);
}

.vehicle-orc-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-orc-mini-action {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
}

.btn-orc-mini-action:hover {
  background: var(--bg-primary);
  border-color: var(--accent-turbo);
  color: var(--accent-turbo);
}

.btn-orc-mini-action.primary {
  background: var(--status-success-bg);
  border-color: var(--status-success);
  color: var(--status-success);
}

.btn-orc-mini-action.zap {
  background: rgba(37, 211, 102, 0.15);
  border-color: rgba(37, 211, 102, 0.4);
  color: #4ade80;
}

.vehicle-orc-empty {
  padding: 10px 12px;
  background: hsla(222, 35%, 12%, 0.4);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  color: var(--text-subtle);
  text-align: center;
}

/* Alerta de orçamento pendente no combobox ao abrir orçamento */
.alerta-orc-pendente-box {
  background: hsla(38, 92%, 50%, 0.15);
  border: 1px solid hsla(38, 92%, 50%, 0.35);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.76rem;
  color: var(--status-warning);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  width: 100%;
}

.btn-editar-pendente-inline {
  background: var(--status-warning);
  color: #000;
  border: none;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 8px;
  cursor: pointer;
  white-space: nowrap;
}
