
  * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Roboto, sans-serif; }

  body { background: #f4f6f9; color: #333; }

  .app-hidden, .login-screen.hidden { display: none; }
  .login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e2a38;
    padding: 20px;
  }
  .login-box {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  }
  .login-logo { color: #1e2a38; padding: 0 0 20px; }
  .login-box h1 { font-size: 24px; margin-bottom: 20px; }
  .link-button { display: block; margin: 14px auto 0; border: 0; background: none; color: #4285F4; cursor: pointer; }
  .login-erro { color: #e53935; min-height: 20px; margin-top: 14px; font-size: 13px; }
  .versao-compilacao { color: #777; text-align: center; font-size: 11px; margin-top: 10px; }

  .app-container { display: flex; min-height: 100vh; }

  /* Sidebar */
  .sidebar {
    width: 220px;
    background: #1e2a38;
    color: #fff;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    top: 0; left: 0;
  }

  .logo { padding: 0 20px 20px; font-size: 20px; font-weight: bold; }
  .logo span { color: #4285F4; }

  .menu { list-style: none; }
  .menu li {
    padding: 14px 20px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 15px;
  }
  .menu li:hover, .menu li.active {
    background: #4285F4;
    border-left: 4px solid #fff;
  }

  .content {
    margin-left: 220px;
    padding: 30px;
    width: calc(100% - 220px);
  }

  .page { display: none; }
  .page.active { display: block; animation: fadeIn 0.3s ease; }

  @keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

  h1 { margin-bottom: 20px; color: #1e2a38; }

  .inicio-page {
    min-height: calc(100vh - 60px);
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .page.inicio-page.active { display: flex; }
  .inicio-conteudo { padding: 40px 20px; }
  .inicio-marca {
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #4285F4;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 38px;
  }
  .inicio-conteudo h1 { margin-bottom: 8px; font-size: 38px; }
  .inicio-conteudo p { color: #5f6368; font-size: 20px; }

  .cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
  }
  .card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    text-align: center;
  }
  .card span { font-size: 28px; font-weight: bold; color: #4285F4; display: block; }
  .card p { color: #777; margin-top: 6px; }

  .btn-primary {
    background: #4285F4;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 16px;
  }
  .btn-primary:hover { background: #3367d6; }

  .tabela-container {
    background: #fff;
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  }
  table { width: 100%; border-collapse: collapse; min-width: 500px; }
  th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
  th { background: #f8f9fb; color: #555; }
  .acao-btn { cursor: pointer; margin-right: 8px; color: #4285F4; }
  .acao-btn.excluir { color: #e53935; }
  .mensagem-erro { color: #e53935; padding: 18px; }
  .diagnostico-folha { color: #666; font-size: 13px; margin: -6px 0 16px; }
  .checklist-carro { border: 1px solid #ddd; border-radius: 8px; padding: 12px; margin: 14px 0; }
  .checklist-carro legend { padding: 0 6px; color: #555; font-size: 13px; }
  .checklist-carro > label { display: block; margin: 8px 0; font-size: 13px; color: #555; }

  /* Modal */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    min-height: 100vh;
    height: 100dvh;
    padding: 24px;
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
  }
  .modal-overlay.active { display: flex; }
  .modal {
    background: #fff;
    width: 90%;
    max-width: 480px;
    border-radius: 12px;
    padding: 20px;
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
  }
  .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
  .fechar-modal { cursor: pointer; font-size: 22px; }

  .form-group { margin-bottom: 14px; }
  .form-group label { display: block; margin-bottom: 6px; font-size: 13px; color: #555; }
  .form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
  }
  .btn-salvar {
    width: 100%;
    background: #34a853;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    margin-top: 10px;
  }
  .permissoes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .permissoes-grid label {
    font-size: 13px;
    color: #555;
  }

  .loading-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
  }
  .loading-overlay.active { display: flex; }
  .spinner {
    width: 40px; height: 40px;
    border: 4px solid #ddd;
    border-top: 4px solid #4285F4;
    border-radius: 50%;
    animation: girar 0.8s linear infinite;
  }
  @keyframes girar { to { transform: rotate(360deg); } }

  /* Responsivo - Mobile */
  @media (max-width: 768px) {
    .sidebar {
      width: 100%;
      height: auto;
      position: fixed;
      bottom: 0;
      top: auto;
      display: flex;
      padding: 0;
      z-index: 100;
    }
    .logo { display: none; }
    .menu {
      display: flex;
      width: 100%;
      justify-content: space-around;
    }
    .menu li {
      flex: 1;
      text-align: center;
      font-size: 11px;
      padding: 10px 4px;
      border-left: none !important;
    }
    .content {
      margin-left: 0;
      width: 100%;
      padding: 16px;
      padding-bottom: 80px;
    }
  }
/* Tema Cloudflare — inspirado no painel mobile-first de referencia. */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display&display=swap');

:root {
  --navy: #0f2744;
  --navy-2: #1a3a5c;
  --blue: #2563eb;
  --gold: #f59e0b;
  --bg: #f8fafc;
  --surface: #ffffff;
  --line: #e2e8f0;
  --muted: #64748b;
  --text: #0f172a;
  --radius: 14px;
  --radius-lg: 20px;
}

* { font-family: 'DM Sans', 'Segoe UI', sans-serif; }
body { background: var(--bg); color: var(--text); }

.login-screen { background: radial-gradient(circle at 15% 15%, #1f4973, var(--navy) 55%); }
.login-box { max-width: 390px; padding: 30px 24px; border-radius: var(--radius-lg); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); box-shadow: 0 20px 60px rgba(0,0,0,.28); }
.login-logo, .login-box h1 { color: #fff; text-align: center; }
.login-logo { font-family: 'DM Serif Display', serif; font-size: 27px; padding-bottom: 12px; }
.login-box h1 { font-family: 'DM Serif Display', serif; font-size: 23px; font-weight: 400; }
.login-box .form-group label { color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .8px; font-size: 11px; font-weight: 700; }
.login-box .form-group input { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.18); color: #fff; min-height: 52px; }
.login-box .form-group input:focus { border-color: var(--gold); outline: none; }
.login-box .btn-salvar { background: var(--gold); color: var(--navy); font-weight: 700; min-height: 52px; }
.versao-compilacao { color: rgba(255,255,255,.45); }
.brand-logo { display: block; object-fit: contain; }
.brand-logo-login { width: min(260px, 82vw); height: 138px; margin: 0 auto 6px; }

.sidebar { width: 250px; padding: 22px 12px; background: var(--navy); box-shadow: 5px 0 24px rgba(15,39,68,.08); }
.logo { padding: 8px 14px 26px; }
.brand-logo-menu { width: 205px; height: 100px; object-position: center; }
.menu { display: grid; gap: 4px; }
.menu li { border-radius: 11px; padding: 12px 14px; color: rgba(255,255,255,.68); font-size: 14px; font-weight: 600; border-left: 0; }
.menu li:hover, .menu li.active { background: rgba(255,255,255,.12); color: #fff; border-left: 0; }
.menu li.active { box-shadow: inset 3px 0 0 var(--gold); }

.content { margin-left: 250px; width: calc(100% - 250px); padding: 36px clamp(24px, 4vw, 58px); max-width: 1680px; }
.page h1 { font-family: 'DM Serif Display', serif; color: var(--navy); font-size: 30px; font-weight: 400; margin-bottom: 10px; }
.page h1 + .btn-primary { margin-top: 8px; }
.inicio-page { min-height: calc(100vh - 72px); text-align: left; justify-content: flex-start; align-items: flex-start; }
.inicio-conteudo { width: 100%; max-width: 750px; border-radius: var(--radius-lg); padding: 34px; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; box-shadow: 0 12px 28px rgba(15,39,68,.18); }
.inicio-marca { width: 170px; height: 110px; margin: 0 0 18px; background: #fff; overflow: hidden; }
.brand-logo-inicio { width: 100%; height: 100%; }
.inicio-conteudo h1 { font-family: 'DM Serif Display', serif; color: #fff; font-size: 34px; }
.inicio-conteudo p { color: #dbeafe; }

.btn-primary { background: var(--navy); border-radius: 11px; padding: 12px 17px; font-weight: 700; box-shadow: 0 4px 12px rgba(15,39,68,.16); }
.btn-primary:hover { background: var(--navy-2); }
.btn-salvar { border-radius: 11px; background: var(--navy); font-weight: 700; }
.btn-salvar:hover { background: var(--navy-2); }
.tabela-container { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: none; }
th { background: #f1f5f9; color: var(--muted); font-size: 11px; letter-spacing: .75px; text-transform: uppercase; }
th, td { padding: 14px 16px; border-color: var(--line); }
td { color: #334155; }
tr:hover td { background: #f8fafc; }
.acao-btn { color: var(--blue); font-weight: 600; }
.diagnostico-folha { padding: 12px 14px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 11px; color: #9a3412; }

.modal-overlay { background: rgba(15,39,68,.58); backdrop-filter: blur(3px); align-items: center; }
.modal { width: min(560px, 94vw); max-width: 560px; border-radius: var(--radius-lg); padding: 24px; box-shadow: 0 24px 60px rgba(15,39,68,.28); }
.modal-header h2 { font-family: 'DM Serif Display', serif; color: var(--navy); font-weight: 400; }
.form-group input, .form-group select, .form-group textarea { min-height: 48px; border: 1.5px solid var(--line); border-radius: 11px; color: var(--text); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.checklist-carro { border-color: var(--line); border-radius: 12px; }

@media (max-width: 768px) {
  .content { padding: 18px 16px 100px; }
  .sidebar { height: 70px; padding: 7px 0; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(15,39,68,.08); }
  .menu { display: flex; width: 100%; gap: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .menu::-webkit-scrollbar { display: none; }
  .menu li { min-width: 76px; padding: 6px 5px; color: var(--muted); font-size: 9px; line-height: 1.2; text-align: center; text-transform: uppercase; }
  .menu li:hover, .menu li.active { background: transparent; color: var(--blue); box-shadow: inset 0 -3px 0 var(--blue); }
  .page h1 { font-size: 27px; }
  .inicio-conteudo { padding: 26px 22px; }
  .inicio-conteudo h1 { font-size: 28px; }
  .brand-logo-login { width: min(230px, 76vw); height: 120px; }
  .btn-primary { min-height: 48px; width: 100%; margin-bottom: 14px; }
  .tabela-container { background: transparent; border: 0; overflow: visible; }
  table, table tbody, table tr, table td { display: block; min-width: 0; width: 100%; }
  table thead { display: none; }
  table tr { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 14px; margin-bottom: 10px; box-shadow: 0 2px 7px rgba(15,39,68,.04); }
  table td { min-height: 34px; padding: 8px 0; display: flex; justify-content: space-between; align-items: center; gap: 14px; border-bottom: 1px solid #f1f5f9; text-align: right; font-size: 14px; }
  table td:last-child { border-bottom: 0; }
  table td::before { color: var(--muted); content: 'Informacao'; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-align: left; text-transform: uppercase; }
  #tabela-clientes td:nth-child(1)::before { content: 'Nome'; } #tabela-clientes td:nth-child(2)::before { content: 'Telefone'; } #tabela-clientes td:nth-child(3)::before { content: 'E-mail'; } #tabela-clientes td:nth-child(4)::before { content: 'Acoes'; }
  #tabela-carros td:nth-child(1)::before { content: 'Placa'; } #tabela-carros td:nth-child(2)::before { content: 'Modelo'; } #tabela-carros td:nth-child(3)::before { content: 'Marca'; } #tabela-carros td:nth-child(4)::before { content: 'Cliente'; } #tabela-carros td:nth-child(5)::before { content: 'Checklist'; } #tabela-carros td:nth-child(6)::before { content: 'Fotos'; } #tabela-carros td:nth-child(7)::before { content: 'Acoes'; }
  #tabela-orcamentos td:nth-child(1)::before { content: 'Data'; } #tabela-orcamentos td:nth-child(2)::before { content: 'Descricao'; } #tabela-orcamentos td:nth-child(3)::before { content: 'Total'; } #tabela-orcamentos td:nth-child(4)::before { content: 'Status'; } #tabela-orcamentos td:nth-child(5)::before { content: 'Acoes'; }
  #tabela-pagamentos td:nth-child(1)::before { content: 'Data'; } #tabela-pagamentos td:nth-child(2)::before { content: 'Cliente'; } #tabela-pagamentos td:nth-child(3)::before { content: 'Carro'; } #tabela-pagamentos td:nth-child(4)::before { content: 'Mecanico'; } #tabela-pagamentos td:nth-child(5)::before { content: 'Lider'; } #tabela-pagamentos td:nth-child(6)::before { content: 'Forma'; } #tabela-pagamentos td:nth-child(7)::before { content: 'Valor'; } #tabela-pagamentos td:nth-child(8)::before { content: 'Status'; }
  #tabela-adiantamentos td:nth-child(1)::before { content: 'Data'; } #tabela-adiantamentos td:nth-child(2)::before { content: 'Mecanico'; } #tabela-adiantamentos td:nth-child(3)::before { content: 'Forma'; } #tabela-adiantamentos td:nth-child(4)::before { content: 'Valor'; } #tabela-adiantamentos td:nth-child(5)::before { content: 'Status'; } #tabela-adiantamentos td:nth-child(6)::before { content: 'Comprovante'; } #tabela-adiantamentos td:nth-child(7)::before { content: 'Acoes'; }
  #tabela-funcionarios td:nth-child(1)::before { content: 'Nome'; } #tabela-funcionarios td:nth-child(2)::before { content: 'Login'; } #tabela-funcionarios td:nth-child(3)::before { content: 'Cargo'; } #tabela-funcionarios td:nth-child(4)::before { content: 'Telefone'; } #tabela-funcionarios td:nth-child(5)::before { content: 'Especialidade'; } #tabela-funcionarios td:nth-child(6)::before { content: 'Acoes'; }
  #tabela-pecas td:nth-child(1)::before { content: 'Nome'; } #tabela-pecas td:nth-child(2)::before { content: 'Fornecedor'; } #tabela-pecas td:nth-child(3)::before { content: 'Preco'; } #tabela-pecas td:nth-child(4)::before { content: 'Estoque'; } #tabela-pecas td:nth-child(5)::before { content: 'Acoes'; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-width: none; max-height: 92dvh; border-radius: 20px 20px 0 0; padding: 20px 18px 30px; animation: subir-modal .22s ease-out; }
  .modal::before { content: ''; display: block; width: 38px; height: 4px; margin: -8px auto 16px; border-radius: 4px; background: #cbd5e1; }
  .permissoes-grid { grid-template-columns: 1fr; }
}
@keyframes subir-modal { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Sobrescritas finais: devem permanecer por último para substituir o tema anterior. */
.app-hidden { display: none !important; }
.mobile-topbar { display: flex; height: 56px; flex: 0 0 56px; align-items: center; gap: 10px; padding: 6px max(16px, calc((100vw - 1120px) / 2)); background: var(--teal); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); z-index: 10; }
.mobile-topbar-logo { width: 42px; height: 42px; padding: 2px; object-fit: contain; background: #fff; border-radius: 10px; }
.mobile-topbar strong { display: block; font-size: 15px; line-height: 17px; }.mobile-topbar small { display: block; margin-top: 2px; color: rgba(255,255,255,.68); font-size: 10px; }
.sidebar { display: none; }.app-container { display: flex; height: 100dvh; min-height: 0; flex-direction: column; background: var(--page-bg); }.content { margin: 0 auto; width: 100%; max-width: 1160px; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 24px 20px; }
.mobile-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); width: 100%; height: 62px; flex: 0 0 62px; padding: 0 max(0px, calc((100vw - 1120px) / 2)); background: var(--teal); box-shadow: 0 -2px 8px rgba(0,0,0,.12); z-index: 20; }.mobile-nav button { border: 0; min-width: 0; background: transparent; color: rgba(255,255,255,.65); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 5px 2px; font: 600 10px 'DM Sans', sans-serif; }.mobile-nav button span { height: 22px; display: flex; align-items: center; font-size: 18px; line-height: 1; }.mobile-nav button.active { color: #fff; background: rgba(0,0,0,.12); box-shadow: inset 0 3px 0 #b7e2df; }
.mobile-menu-overlay { display: none; position: fixed; inset: 0; z-index: 80; background: rgba(8,37,38,.55); align-items: flex-end; }.mobile-menu-overlay.active { display: flex; }.toast { display: block; bottom: 78px; }
@media (max-width: 768px) { .content { padding: 18px 16px; }.mobile-nav { height: 62px; flex-basis: 62px; padding: 0; background: var(--teal); }.mobile-nav button { font-size: 9px; }.mobile-nav button.active { box-shadow: inset 0 3px 0 #b7e2df; }.modal-overlay { align-items: flex-end; }.modal { width: 100%; max-width: none; border-radius: 20px 20px 0 0; } }

/* Tema definitivo: shell único, baseado no projeto futura-estoque. */
:root { --teal: #1a5c5a; --teal-dark: #163f3e; --teal-soft: #e8f2f2; --page-bg: #f0f4f5; --card-line: #c8d8da; --ink: #1a2e2e; --subtle: #617879; }
.app-hidden { display: none !important; }
body { background: var(--page-bg); color: var(--ink); overflow: hidden; }
.login-screen { background: var(--page-bg); }
.login-box { background: transparent; border: 0; box-shadow: none; padding: 24px 20px; max-width: 380px; }
.brand-logo-login { width: 96px; height: 96px; padding: 7px; background: #fff; border: 1px solid var(--card-line); border-radius: 18px; margin: 0 auto 18px; }
.login-box h1 { color: var(--ink); font-family: 'DM Sans', sans-serif; font-size: 22px; font-weight: 700; margin-bottom: 26px; }
.login-box .form-group label { color: var(--subtle); letter-spacing: .6px; }
.login-box .form-group input { background: #fff; color: var(--ink); border: 1px solid var(--card-line); border-radius: 10px; min-height: 48px; }
.login-box .btn-salvar { background: var(--teal); color: #fff; border-radius: 10px; min-height: 48px; box-shadow: none; }
.login-box .btn-salvar:hover { background: var(--teal-dark); }.versao-compilacao { color: #829596; }

.app-container { display: flex; height: 100dvh; min-height: 0; flex-direction: column; background: var(--page-bg); }
.sidebar { display: none; }
.mobile-topbar { display: flex; height: 56px; flex: 0 0 56px; align-items: center; gap: 10px; padding: 6px max(16px, calc((100vw - 1120px) / 2)); background: var(--teal); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); z-index: 10; }
.mobile-topbar-logo { width: 42px; height: 42px; padding: 2px; object-fit: contain; background: #fff; border-radius: 10px; }
.mobile-topbar strong { display: block; font-size: 15px; line-height: 17px; }.mobile-topbar small { display: block; margin-top: 2px; color: rgba(255,255,255,.68); font-size: 10px; }
.content { margin: 0 auto; width: 100%; max-width: 1160px; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 24px 20px; }
.page h1 { font-family: 'DM Sans', sans-serif; font-size: 22px; font-weight: 700; color: var(--ink); margin: 0 0 5px; }.page h1::after { content: ''; display: block; width: 30px; height: 3px; margin-top: 8px; border-radius: 3px; background: var(--teal); }
.inicio-page, .page.inicio-page.active { min-height: 0; display: block; }.inicio-conteudo { max-width: none; padding: 24px; min-height: 200px; border: 1px solid var(--card-line); border-radius: 14px; background: linear-gradient(130deg, #fff, #e9f3f3); box-shadow: none; }.inicio-marca { width: 112px; height: 74px; margin: 0 0 15px; border-radius: 10px; background: #fff; }.inicio-conteudo h1 { color: var(--ink); font-family: 'DM Sans', sans-serif; font-size: 27px; font-weight: 700; }.inicio-conteudo p { color: var(--subtle); font-size: 16px; }
.btn-primary { background: var(--teal); border-radius: 10px; padding: 11px 16px; box-shadow: none; }.btn-primary:hover { background: var(--teal-dark); }.btn-salvar, .btn-salvar:hover { background: var(--teal); }.btn-salvar:hover { background: var(--teal-dark); }
.tabela-container { margin-top: 12px; border: 1px solid var(--card-line); border-radius: 12px; background: #fff; box-shadow: none; }th { background: #eaf3f3; color: #4b6c6e; }th, td { border-color: #e1ebec; }td { color: #284244; }tr:hover td { background: #f6fafa; }.acao-btn { color: var(--teal); }
.mobile-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); width: 100%; height: 62px; flex: 0 0 62px; padding: 0 max(0px, calc((100vw - 1120px) / 2)); background: var(--teal); box-shadow: 0 -2px 8px rgba(0,0,0,.12); z-index: 20; }
.mobile-nav button { border: 0; min-width: 0; background: transparent; color: rgba(255,255,255,.65); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 5px 2px; font: 600 10px 'DM Sans', sans-serif; }.mobile-nav button span { height: 22px; display: flex; align-items: center; font-size: 18px; line-height: 1; }.mobile-nav button.active { color: #fff; background: rgba(0,0,0,.12); box-shadow: inset 0 3px 0 #b7e2df; }
.modal-overlay { align-items: center; background: rgba(8,37,38,.5); }.modal { width: min(640px, 94vw); max-width: 640px; border-radius: 18px; padding: 22px; }.modal-header h2 { font-family: 'DM Sans', sans-serif; font-weight: 700; color: var(--ink); }.form-group input, .form-group select, .form-group textarea { border-color: var(--card-line); }
.mobile-menu-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(8,37,38,.55); align-items: flex-end; }.mobile-menu-overlay.active { display: flex; }.mobile-menu-sheet { width: 100%; max-width: 640px; max-height: 82dvh; margin: auto auto 0; overflow-y: auto; background: #fff; border-radius: 20px 20px 0 0; padding: 8px 16px 22px; animation: subir-modal .22s ease-out; }.mobile-sheet-handle { width: 40px; height: 4px; background: var(--card-line); border-radius: 3px; margin: 4px auto 12px; }.mobile-sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 3px 2px 14px; color: var(--ink); border-bottom: 1px solid #e0eeee; }.mobile-sheet-header button { border: 0; background: var(--teal-soft); color: var(--teal); border-radius: 50%; width: 30px; height: 30px; font-size: 22px; }.mobile-menu-items { display: grid; gap: 8px; padding-top: 14px; }.mobile-menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid var(--card-line); border-radius: 12px; background: #fff; text-align: left; }.mobile-menu-item > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--teal-soft); font-size: 19px; }.mobile-menu-item i { display: grid; gap: 3px; flex: 1; font-style: normal; }.mobile-menu-item strong { color: var(--ink); font-size: 14px; }.mobile-menu-item small { color: var(--subtle); font-size: 11px; }.mobile-menu-item b { color: var(--teal); font-size: 25px; font-weight: 400; }
.toast { position: fixed; bottom: 78px; left: 50%; z-index: 120; display: block; max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: 22px; background: var(--teal-dark); color: #fff; font-size: 13px; opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: .2s; }.toast.active { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 768px) { .content { padding: 18px 16px; }.page h1 { font-size: 21px; }.btn-primary { width: 100%; min-height: 46px; }.tabela-container { border: 0; background: transparent; overflow: visible; } table, table tbody, table tr, table td { display: block; min-width: 0; width: 100%; } table thead { display: none; } table tr { padding: 8px 13px; margin-bottom: 10px; background: #fff; border: 1px solid var(--card-line); border-radius: 12px; box-shadow: 0 1px 3px rgba(20,50,50,.05); } table td { display: flex; align-items: center; justify-content: space-between; min-height: 35px; padding: 8px 0; gap: 14px; border-bottom: 1px solid #edf2f2; text-align: right; font-size: 13px; } table td::before { color: var(--subtle); content: 'Informação'; font-size: 10px; font-weight: 700; letter-spacing: .5px; text-align: left; text-transform: uppercase; } table td:last-child { border: 0; } .modal-overlay { align-items: flex-end; padding: 0; }.modal { width: 100%; max-width: none; max-height: 92dvh; border-radius: 20px 20px 0 0; padding: 20px 18px 28px; }.modal::before { content: ''; display: block; width: 40px; height: 4px; margin: -8px auto 16px; border-radius: 3px; background: var(--card-line); } }

/* Estrutura mobile: inspirada no aplicativo de estoque, com app-shell e navegação curta. */
.mobile-topbar, .mobile-nav, .mobile-menu-overlay, .toast { display: none; }

@media (max-width: 768px) {
  body { overflow: hidden; background: #f0f4f5; }
  .app-container { display: flex; height: 100dvh; min-height: 0; flex-direction: column; }
  .sidebar { display: none; }

  .mobile-topbar {
    display: flex; height: 58px; flex: 0 0 58px; align-items: center; gap: 10px;
    padding: 6px 16px; background: var(--navy); color: #fff; box-shadow: 0 2px 8px rgba(15,39,68,.2); z-index: 10;
  }
  .mobile-topbar-logo { width: 42px; height: 42px; object-fit: contain; border-radius: 10px; background: #fff; padding: 2px; }
  .mobile-topbar strong { display: block; font-size: 15px; line-height: 17px; }
  .mobile-topbar small { display: block; color: rgba(255,255,255,.65); font-size: 10px; margin-top: 2px; }

  .content { margin: 0; width: 100%; max-width: none; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px 16px; }
  .page h1 { font-family: 'DM Sans', sans-serif; font-size: 21px; font-weight: 700; margin: 0 0 4px; }
  .page h1::after { content: ''; display: block; width: 32px; height: 3px; border-radius: 3px; background: var(--gold); margin-top: 8px; }
  .page h1 + .btn-primary { margin-top: 16px; }
  .btn-primary { display: flex; align-items: center; justify-content: center; border-radius: 10px; min-height: 46px; margin-bottom: 14px; box-shadow: none; }

  .inicio-page { min-height: 0; display: block; }
  .page.inicio-page.active { display: block; }
  .inicio-conteudo { min-height: 230px; padding: 24px 20px; border-radius: 16px; background: linear-gradient(145deg, var(--navy), #1e527d); }
  .inicio-marca { width: 118px; height: 76px; margin: 0 0 14px; border-radius: 10px; }
  .inicio-conteudo h1 { font-family: 'DM Sans', sans-serif; font-size: 25px; font-weight: 700; }
  .inicio-conteudo p { font-size: 15px; }

  .mobile-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); height: 64px; flex: 0 0 64px; background: var(--navy); box-shadow: 0 -2px 10px rgba(15,39,68,.18); z-index: 20; }
  .mobile-nav button { min-width: 0; border: 0; background: transparent; color: rgba(255,255,255,.65); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 5px 2px; font: 600 9px 'DM Sans', sans-serif; }
  .mobile-nav button span { height: 22px; display: flex; align-items: center; font-size: 18px; font-weight: 600; line-height: 1; }
  .mobile-nav button.active { color: #fff; background: rgba(255,255,255,.12); box-shadow: inset 0 3px 0 var(--gold); }
  .mobile-nav button:active { background: rgba(255,255,255,.2); }

  .tabela-container { margin-top: 12px; }
  table tr { border: 1px solid #d9e5e7; border-radius: 12px; padding: 8px 13px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(20,50,50,.05); }
  table td { min-height: 35px; font-size: 13px; }
  table td::before { color: #657c80; font-size: 10px; }
  table td:first-child { color: #17393b; font-weight: 700; }
  table td:first-child::before { color: #1a5c5a; }

  .modal-overlay { z-index: 90; }
  .modal { padding-bottom: 28px; }

  .mobile-menu-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(8,28,38,.54); align-items: flex-end; }
  .mobile-menu-overlay.active { display: flex; }
  .mobile-menu-sheet { width: 100%; max-height: 82dvh; overflow-y: auto; background: #fff; border-radius: 20px 20px 0 0; padding: 8px 16px calc(22px + env(safe-area-inset-bottom)); animation: subir-modal .22s ease-out; }
  .mobile-sheet-handle { width: 38px; height: 4px; border-radius: 4px; background: #c8d8da; margin: 4px auto 12px; }
  .mobile-sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 3px 2px 14px; border-bottom: 1px solid #e4eeee; color: #17393b; font-size: 17px; }
  .mobile-sheet-header button { border: 0; background: #eef5f5; color: #35585a; border-radius: 50%; width: 30px; height: 30px; font-size: 23px; line-height: 26px; }
  .mobile-menu-items { display: grid; gap: 8px; padding-top: 14px; }
  .mobile-menu-item { border: 1px solid #dce9ea; border-radius: 12px; background: #fff; display: flex; align-items: center; width: 100%; padding: 12px; text-align: left; gap: 12px; }
  .mobile-menu-item > span { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 40px; border-radius: 10px; background: #e8f2f2; font-size: 20px; }
  .mobile-menu-item i { display: grid; gap: 3px; flex: 1; font-style: normal; }
  .mobile-menu-item strong { color: #17393b; font-size: 14px; }.mobile-menu-item small { color: #698083; font-size: 11px; }.mobile-menu-item b { color: #1a5c5a; font-size: 26px; font-weight: 400; }.mobile-menu-empty { padding: 20px 4px; color: var(--muted); text-align: center; }

  .toast { position: fixed; bottom: 78px; left: 50%; transform: translate(-50%, 20px); width: max-content; max-width: calc(100vw - 32px); z-index: 120; padding: 11px 17px; border-radius: 20px; background: #17393b; box-shadow: 0 5px 18px rgba(0,0,0,.24); color: #fff; font-size: 13px; line-height: 1.35; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
  .toast.active { opacity: 1; transform: translate(-50%, 0); }
}
/* Prioridade final do shell futura-estoque. */
.inicio-banner-legado { display: none !important; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 5px; }.topbar-actions button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: rgba(255,255,255,.12); color: #fff; font-size: 19px; line-height: 1; }.topbar-actions button:disabled { opacity: .35; }
.inicio-operacional { display: grid; gap: 22px; }.entrada-rapida { padding: 22px; border: 1px solid var(--card-line); border-radius: 14px; background: #fff; }.entrada-rapida h1 { margin-top: 3px; }.entrada-rapida h1::after { display: none; }.entrada-rapida > div:first-child > p:last-child { margin-top: 4px; color: var(--subtle); font-size: 14px; }.eyebrow { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .9px; }.busca-rapida { display: flex; gap: 8px; margin-top: 18px; }.busca-rapida input { min-width: 0; flex: 1; height: 48px; border: 1px solid var(--card-line); border-radius: 10px; padding: 0 13px; color: var(--ink); font-size: 15px; text-transform: uppercase; }.busca-rapida button, .sem-resultado button { border: 0; border-radius: 10px; background: var(--teal); color: #fff; padding: 0 18px; font-weight: 700; }.link-entrada { margin-top: 12px; border: 0; background: transparent; color: var(--teal); font-weight: 700; }.atalhos-inicio { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }.atalhos-inicio button { min-height: 118px; padding: 15px; border: 1px solid var(--card-line); border-radius: 12px; background: #fff; text-align: left; color: var(--ink); }.atalhos-inicio button:hover { border-color: var(--teal); background: #f6fbfb; }.atalhos-inicio button span { display: block; font-size: 25px; margin-bottom: 9px; }.atalhos-inicio button strong, .atalhos-inicio button small { display: block; }.atalhos-inicio button strong { font-size: 14px; }.atalhos-inicio button small { margin-top: 3px; color: var(--subtle); font-size: 11px; }.atalhos-inicio .atalho-principal { background: var(--teal); border-color: var(--teal); color: #fff; }.atalhos-inicio .atalho-principal small { color: rgba(255,255,255,.75); }
.resultado-busca-rapida { display: grid; gap: 7px; margin-top: 10px; }.resultado-titulo { color: var(--subtle); font-size: 11px; font-weight: 700; text-transform: uppercase; }.resultado-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 1px solid var(--card-line); border-radius: 10px; background: #f9fcfc; text-align: left; }.resultado-item > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--teal-soft); }.resultado-item i { display: grid; gap: 2px; flex: 1; font-style: normal; }.resultado-item strong { font-size: 13px; color: var(--ink); }.resultado-item small { color: var(--subtle); font-size: 11px; }.resultado-item b { color: var(--teal); font-size: 23px; font-weight: 400; }.sem-resultado { display: grid; gap: 7px; margin-top: 10px; padding: 13px; border-radius: 10px; background: #fff7e8; color: #71520d; font-size: 13px; }.sem-resultado span { font-size: 12px; }.sem-resultado button { width: max-content; height: 36px; margin-top: 3px; }.aviso-entrada { margin: 0 0 14px; padding: 10px; border-radius: 9px; background: var(--teal-soft); color: var(--teal-dark); font-size: 12px; }
.painel-gestao { padding-top: 4px; }.painel-gestao[hidden] { display: none; }.painel-gestao-cabecalho { display: flex; align-items: end; justify-content: space-between; gap: 12px; }.painel-gestao h2 { color: var(--ink); font-size: 20px; }.painel-gestao-cabecalho button { border: 1px solid var(--card-line); border-radius: 8px; background: #fff; color: var(--teal); padding: 9px 11px; font-weight: 700; }.indicadores-gestao { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }.indicadores-gestao > button { display: grid; gap: 5px; min-height: 76px; padding: 12px; border: 1px solid var(--card-line); border-radius: 11px; background: #fff; text-align: left; }.indicadores-gestao small { color: var(--subtle); font-size: 10px; }.indicadores-gestao strong { color: var(--teal-dark); font-size: 19px; }.carregando-painel, .erro-painel { color: var(--subtle); font-size: 13px; }.filas-gestao { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }.filas-gestao > div { padding: 14px; border: 1px solid var(--card-line); border-radius: 12px; background: #fff; }.filas-gestao h3 { margin-bottom: 10px; color: var(--ink); font-size: 14px; }.fila-gestao { display: grid; gap: 7px; }.fila-gestao button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 0; border: 0; border-bottom: 1px solid #e7eeee; background: transparent; text-align: left; }.fila-gestao button:last-child { border-bottom: 0; }.fila-gestao i { padding: 4px 6px; border-radius: 5px; background: #fff4d7; color: #7b5b0e; font-size: 9px; font-style: normal; font-weight: 700; }.fila-gestao span { display: grid; min-width: 0; flex: 1; gap: 2px; }.fila-gestao strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.fila-gestao small { color: var(--subtle); font-size: 10px; }.fila-gestao b { color: var(--teal); font-size: 21px; font-weight: 400; }.fila-vazia { padding: 13px 0; color: var(--subtle); font-size: 12px; text-align: center; }
.painel-mecanico { padding: 16px; border: 1px solid var(--card-line); border-radius: 14px; background: #fff; }.painel-mecanico[hidden] { display:none; }.fila-mecanico { display:grid; gap:8px; margin-top:12px; }.fila-mecanico article { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 0; border-bottom:1px solid #e7eeee; }.fila-mecanico article:last-child { border:0; }.fila-mecanico article > div { display:grid; gap:3px; min-width:0; }.fila-mecanico i { width:max-content; padding:4px 6px; border-radius:5px; background:#fff4d7; color:#7b5b0e; font-size:9px; font-style:normal; font-weight:700; }.fila-mecanico strong { color:var(--ink); font-size:14px; }.fila-mecanico small { color:var(--subtle); font-size:11px; }.fila-mecanico button { border:0; border-radius:8px; padding:9px; background:var(--teal); color:#fff; font-weight:700; font-size:11px; }
.fila-mecanico .entrada-acionavel { cursor:pointer; border-radius:9px; padding:11px; border:1px solid transparent; }.fila-mecanico .entrada-acionavel:hover { border-color:var(--teal); background:#f5fbfb; }.proxima-etapa { color:var(--teal) !important; font-weight:700; }
.app-hidden { display: none !important; }
.mobile-topbar { display: flex; height: 56px; flex: 0 0 56px; align-items: center; gap: 10px; padding: 6px max(16px, calc((100vw - 1120px) / 2)); background: var(--teal); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); z-index: 10; }
.mobile-topbar-logo { width: 42px; height: 42px; padding: 2px; object-fit: contain; background: #fff; border-radius: 10px; }
.mobile-topbar strong { display: block; font-size: 15px; line-height: 17px; }.mobile-topbar small { display: block; margin-top: 2px; color: rgba(255,255,255,.68); font-size: 10px; }
.sidebar { display: none; }.app-container { display: flex; height: 100dvh; min-height: 0; flex-direction: column; background: var(--page-bg); }.content { margin: 0 auto; width: 100%; max-width: 1160px; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 24px 20px; }
.mobile-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); width: 100%; height: 62px; flex: 0 0 62px; padding: 0 max(0px, calc((100vw - 1120px) / 2)); background: var(--teal); box-shadow: 0 -2px 8px rgba(0,0,0,.12); z-index: 20; }.mobile-nav button { border: 0; min-width: 0; background: transparent; color: rgba(255,255,255,.65); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 5px 2px; font: 600 10px 'DM Sans', sans-serif; }.mobile-nav button span { height: 22px; display: flex; align-items: center; font-size: 18px; line-height: 1; }.mobile-nav button.active { color: #fff; background: rgba(0,0,0,.12); box-shadow: inset 0 3px 0 #b7e2df; }
.mobile-menu-overlay { display: none; position: fixed; inset: 0; z-index: 80; background: rgba(8,37,38,.55); align-items: flex-end; }.mobile-menu-overlay.active { display: flex; }.toast { display: block; bottom: 78px; }
@media (max-width: 768px) { .content { padding: 18px 16px; }.mobile-nav { height: 62px; flex-basis: 62px; padding: 0; background: var(--teal); }.mobile-nav button { font-size: 9px; }.mobile-nav button.active { box-shadow: inset 0 3px 0 #b7e2df; }.modal-overlay { align-items: flex-end; }.modal { width: 100%; max-width: none; border-radius: 20px 20px 0 0; } }
.mobile-nav { grid-template-columns: minmax(72px, 130px); justify-content: center; }
.mobile-nav button:not(:first-child) { display: none; }
@media (max-width: 768px) { .entrada-rapida { padding: 17px; }.busca-rapida button { padding: 0 13px; }.atalhos-inicio { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }.atalhos-inicio button { min-height: 105px; padding: 12px; }.atalhos-inicio button span { font-size: 22px; }.topbar-actions button { width: 29px; height: 29px; }.mobile-nav { grid-template-columns: 92px; }.indicadores-gestao { grid-template-columns: repeat(2, minmax(0, 1fr)); }.filas-gestao { grid-template-columns: 1fr; gap: 10px; }.painel-gestao-cabecalho { align-items: center; }.painel-gestao h2 { font-size: 18px; } }
@media (max-width: 768px) {
  .modal-overlay { align-items: flex-end; overflow: hidden; }
  .modal { max-height: calc(100dvh - 10px); overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .modal .btn-salvar { position: sticky; bottom: 0; z-index: 3; min-height: 48px; box-shadow: 0 -10px 16px rgba(255,255,255,.96); }
}
/* O mecânico conduz a OS pela busca e pela fila; adiantamento é o único atalho. */
.perfil-mecanico .atalhos-inicio > button:not([data-page="adiantamentos"]),
.perfil-mecanico .sidebar [data-page]:not([data-page="inicio"]):not([data-page="adiantamentos"]),
.perfil-mecanico .mobile-nav > button:not([data-page="inicio"]) { display: none !important; }
.perfil-mecanico .atalhos-inicio { grid-template-columns: minmax(0, 1fr); }
.perfil-mecanico .atalhos-inicio button { min-height: auto; }
.topbar-actions .btn-sair { width: auto; min-width: 44px; padding: 0 8px; font-size: 13px; }
.sidebar > .btn-sair { margin: 16px; padding: 10px 20px; border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }

/* Sugestao de instalar o app (PWA). */
.sugestao-instalar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 130; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 14px; background: var(--teal-dark, #163f3e); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.28); font-size: 13px; line-height: 1.4; }
.sugestao-instalar span { flex: 1 1 auto; }
.sugestao-instalar-acoes { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.sugestao-instalar-acoes button { border: 0; border-radius: 10px; padding: 8px 12px; font: 600 12px 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; background: rgba(255,255,255,.16); color: #fff; }
.sugestao-instalar-acoes button:first-child { background: #fff; color: var(--teal-dark, #163f3e); }
#sugestao-instalar-fechar { padding: 8px 10px; background: transparent; color: #fff; font-size: 15px; }
@media (max-width: 768px) {
  .sugestao-instalar { bottom: 78px; flex-direction: column; align-items: stretch; text-align: left; }
  .sugestao-instalar-acoes { justify-content: flex-end; }
}

/* Botoes de Tirar foto / Escolher da galeria no checklist do veiculo. */
.fotos-carro-botoes { display: flex; gap: 8px; flex-wrap: wrap; }
.fotos-carro-botoes button { flex: 1 1 140px; min-height: 42px; border: 1.5px solid var(--card-line, #c8d8da); border-radius: 10px; background: #fff; color: var(--teal, #1a5c5a); font: 600 13px 'DM Sans', sans-serif; cursor: pointer; }
.fotos-carro-botoes button:hover { background: var(--teal-soft, #e8f2f2); }
.fotos-carro-status { margin-top: 6px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--subtle, #617879); }
.fotos-carro-limpar { border: 0; background: transparent; color: var(--teal, #1a5c5a); font: 600 12px 'DM Sans', sans-serif; text-decoration: underline; cursor: pointer; padding: 0; }
