/* ============================================================
   PhillX1 OS — Design Automotivo BMW OEM Widescreen (1280x480)
   Réplica Precisa: Extended Dash com Chanfro Angular e Vidro 3D
   ============================================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #020306;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  width: 1280px;
  height: 480px;
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   TOP BAR (OEM BMW)
   ============================================================ */
#top-bar {
  height: 46px;
  background: #05070c;
  border-bottom: 1px solid #101726;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 0;
}

.logo-container {
  width: 175px;
  height: 46px;
  border-right: 1px solid #101726;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-container img {
  width: 100%;
  max-width: 154px;
  height: auto;
  max-height: 36px;
  object-fit: contain;
  display: block;
}

.btn-topbar-menu {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #090e17;
  border: 1px solid #1c2b44;
  border-radius: 4px;
  color: #f1f5f9;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  margin-left: 14px;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
  user-select: none;
}

.btn-topbar-menu:hover, .btn-topbar-menu:focus {
  background: #141f33;
  border-color: #38bdf8;
  color: #38bdf8;
  outline: none;
}

.btn-topbar-menu svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  flex-shrink: 0;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 18px;
}

.top-section-title {
  color: #e5243b;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.top-section-sub {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}

.dot.offline {
  background: #eab308;
}

.top-clock {
  color: #f8fafc;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
}

/* ============================================================
   CONTAINER DO DASHBOARD (480px - 46px = 434px)
   ============================================================ */
#dash-container {
  display: flex;
  height: 434px;
  width: 1280px;
}

/* Sidebar Esquerda */
#sidebar {
  width: 175px;
  background: #04060a;
  border-right: 1px solid #101726;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 0;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  color: #8da2bb;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  border-left: 3px solid transparent;
}

.menu-link:hover, .menu-link:focus {
  background: #0d1421;
  color: #ffffff;
  outline: none;
}

.menu-link.ativo {
  background: #111a28;
  color: #ffffff;
  border-left: 3px solid #e5243b;
}

.menu-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 10px 18px;
  border-top: 1px solid #0f1522;
  color: #475569;
  font-size: 11px;
  line-height: 1.4;
}

/* Área Central */
#content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 18px 8px 18px;
  background: #020306;
}

/* ============================================================
   GRID 3x3 DOS CARDS — FIDELIDADE À FOTO DE REFERÊNCIA
   ============================================================ */
.grade-sensores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 9px;
  height: 382px;
}

/* O Card Principal com Chanfro Inclinado na Borda Esquerda */
.sensor-card-frame {
  position: relative;
  background: linear-gradient(135deg, rgba(20, 32, 54, 0.7) 0%, rgba(9, 15, 27, 0.85) 45%, rgba(4, 7, 13, 0.95) 100%);
  border: 1px solid #17243c;
  border-top: 1px solid #2d456f;
  border-bottom: 1px solid #0c1422;
  border-radius: 6px;
  padding: 11px 16px 10px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 4px 14px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

/* Aleta Angular Esquerda: Chanfro Inclinado em ~75° (A Marca Registrada da Foto) */
.aleta-angular {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 4px;
  border-radius: 2px;
  transform: skewY(-14deg);
}

/* Cores das Aletas Angulares (Sem Glow Pesado) */
.aleta-azul {
  background: #0091ff;
}

.aleta-laranja {
  background: #ff6600;
}

.aleta-amarela {
  background: #ffcc00;
}

/* Linha Superior: Ícone + Nome do Sensor */
.sensor-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sensor-ico {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.sensor-nome {
  color: #cbd5e1;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.1px;
}

/* Linha do Valor: Número Gigante em Branco Puro + Unidade Discreta */
.sensor-data-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 3px 0 2px 0;
  padding-left: 2px;
}

.sensor-num {
  color: #ffffff;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
}

.sensor-und {
  font-size: 14px;
  color: #7a8fa8;
  font-weight: 400;
}

/* Trilho Cápsula / Tubo 3D da Barra de Progresso */
.tubo-trilho {
  width: 100%;
  height: 5px;
  background: #060a12;
  border-radius: 3px;
  border: 1px solid #131c2c;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  position: relative;
}

.tubo-barra {
  height: 100%;
  border-radius: 3px;
  transition: width 0.2s ease-out;
}

/* Cores das Barras de Progresso */
.tubo-verde {
  background: #10b981;
}

.tubo-azul {
  background: #0ea5e9;
}

.tubo-laranja {
  background: #f97316;
}

.tubo-amarelo {
  background: #eab308;
}

.tubo-vermelho {
  background: #ef4444;
}

/* Rodapé e Paginação */
.rodape-painel {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  border-top: 1px solid #0f1522;
  padding-top: 4px;
}

.info-texto {
  color: #475569;
  font-size: 11px;
  margin-right: auto;
}

.btn-pagina {
  background: #090d16;
  color: #8da2bb;
  border: 1px solid #151f30;
  padding: 5px 14px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.btn-pagina.ativo {
  background: #991322;
  border-color: #e5243b;
  color: #ffffff;
}


/* ============================================================
   TELA INICIAL: GRADE DE APLICATIVOS (PT-BR)
   ============================================================ */
.secao-titulo {
  color: #e5243b;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.grade-aplicativos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 10px;
  height: 330px;
}

.card-app {
  background: #090d14;
  border: 1px solid #141c2c;
  border-radius: 4px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.card-app:hover, .card-app:focus {
  background: #0f1828;
  border-color: #2563eb;
  outline: none;
}

.card-app.destaque {
  background: #15090f;
  border-color: #e5243b;
}

.app-svg-box {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: #111724;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.card-app.destaque .app-svg-box {
  background: rgba(229, 36, 59, 0.2);
}

.card-app svg {
  width: 24px;
  height: 24px;
  fill: #e2e8f0;
}

.card-app.destaque svg {
  fill: #ffffff;
}

.app-nome {
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.app-sub {
  color: #64748b;
  font-size: 11px;
  margin-top: 4px;
}


/* ============================================================
   TELA: DIAGNÓSTICO E FALHAS (DTC)
   ============================================================ */
.acoes-dtc {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.btn-acao {
  background: #090d14;
  border: 1px solid #1e293b;
  border-radius: 4px;
  padding: 5px 12px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-acao:hover, .btn-acao:focus {
  background: #1e293b;
  color: #ffffff;
  border-color: #3b82f6;
  outline: none;
}

.grade-ecus {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  height: 300px;
}

.card-ecu {
  background: #060910;
  border: 1px solid #141c2c;
  border-radius: 4px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-ecu:hover {
  border-color: #2563eb;
}

.nome-ecu {
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.falhas-ecu {
  color: #22c55e;
  font-size: 11px;
  font-weight: 700;
}

.falhas-ecu.com-erro {
  color: #ef4444;
}

.msg-ecu {
  font-size: 10.5px;
  font-weight: 500;
  margin-top: 1px;
}

/* ============================================================
   TELA: VIAGENS / COMPUTADOR DE BORDO
   ============================================================ */
.sensor-card {
  background: #060910;
  border: 1px solid #141c2c;
  border-radius: 4px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sensor-card:hover {
  border-color: #2563eb;
}

.sensor-rotulo {
  color: #8da2bb;
  font-size: 11.5px;
  font-weight: 600;
}

.sensor-valor {
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  margin: 4px 0 6px 0;
}

.sensor-unidade {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.trilho-barra {
  width: 100%;
  height: 4px;
  background: #111724;
  border-radius: 2px;
  overflow: hidden;
}

.progresso-barra {
  height: 100%;
  border-radius: 2px;
}

.cor-azul {
  background: #38bdf8;
}

.cor-verde {
  background: #22c55e;
}

.cor-laranja {
  background: #f97316;
}

.cor-amarela {
  background: #eab308;
}

/* ============================================================
   TELA: GARAGEM / REVISÕES
   ============================================================ */
.tabela-garagem {
  width: 100%;
  border-collapse: collapse;
  background: #060910;
  border: 1px solid #141c2c;
  border-radius: 4px;
  overflow: hidden;
  height: 335px;
}

.tabela-garagem th {
  background: #090e18;
  color: #8da2bb;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid #141c2c;
}

.tabela-garagem td {
  padding: 7px 12px;
  font-size: 12px;
  color: #cbd5e1;
  border-bottom: 1px solid #0f1624;
}

.tabela-garagem tr:hover td {
  background: #0d1422;
}

.badge-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-ok {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

/* ============================================================
   TELA: CLIMA — DASHBOARD AUTOMOTIVO BMW CIC
   ============================================================ */
.clima-dashboard {
  display: flex;
  gap: 12px;
  height: 100%;
}

/* Painel Esquerdo: Tempo Atual (Hero) */
.clima-hero-card {
  width: 355px;
  background: radial-gradient(circle at 85% 15%, rgba(56, 189, 248, 0.08) 0%, rgba(6, 10, 18, 0.98) 75%);
  border: 1px solid #16243b;
  border-radius: 6px;
  position: relative;
  padding: 16px 20px 14px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.clima-hero-card.dia {
  background: radial-gradient(circle at 85% 15%, rgba(234, 179, 8, 0.12) 0%, rgba(6, 10, 18, 0.98) 75%);
}

.clima-hero-card.noite {
  background: radial-gradient(circle at 85% 15%, rgba(148, 163, 184, 0.12) 0%, rgba(6, 10, 18, 0.98) 75%);
}

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

.clima-cidade {
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.clima-regiao {
  color: #38bdf8;
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}

.clima-badge-gps {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #22c55e;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
}

.clima-hero-corpo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0;
}

.clima-hero-temp {
  font-size: 54px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -1px;
}

.clima-hero-temp sup {
  font-size: 22px;
  color: #94a3b8;
  font-weight: 600;
  margin-left: 2px;
}

.clima-hero-condicao {
  color: #f1f5f9;
  font-size: 13.5px;
  font-weight: 700;
  margin-top: 4px;
}

.clima-hero-sensacao {
  color: #64748b;
  font-size: 11px;
  margin-top: 2px;
}

.clima-amplitude-trilho {
  background: #0d1524;
  border: 1px solid #142036;
  border-radius: 4px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #8da2bb;
  margin: 6px 0;
}

.clima-amplitude-barra {
  flex: 1;
  height: 4px;
  margin: 0 8px;
  background: linear-gradient(90deg, #38bdf8 0%, #eab308 100%);
  border-radius: 2px;
}

.clima-mini-metricas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.clima-mini-box {
  background: linear-gradient(135deg, rgba(16, 26, 44, 0.6) 0%, rgba(6, 10, 18, 0.95) 100%);
  border: 1px solid #16243d;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.clima-mini-box svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.clima-mini-rotulo {
  color: #8da2bb;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.clima-mini-valor {
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
}

/* Painel Direito: Faixas de Previsão Horária e Diária Equilibradas */
.clima-previsoes {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 12px;
}

.clima-secao-bloco {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.clima-secao-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.clima-secao-titulo {
  color: #e5243b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Grade Horária */
.clima-grid-horas {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.clima-hora-item {
  background: linear-gradient(180deg, rgba(16, 26, 46, 0.7) 0%, rgba(6, 10, 18, 0.96) 100%);
  border: 1px solid #17243c;
  border-top: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 6px;
  padding: 8px 6px 7px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.clima-hora-item:hover {
  border-color: #38bdf8;
  background: #0c1424;
}

.clima-hora-item.agora {
  border: 1px solid #38bdf8;
  background: #0d1b30;
}

.clima-hora-topo {
  width: 100%;
}

.clima-hora-txt {
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.clima-hora-txt.agora {
  color: #38bdf8;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.8px;
}

.clima-hora-corpo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.clima-hora-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.clima-hora-temp {
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}

.clima-hora-cond {
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
}

.clima-hora-chuva {
  color: #38bdf8;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Grade dos Próximos Dias */
.clima-grid-dias {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.clima-dia-item {
  background: linear-gradient(180deg, rgba(14, 22, 38, 0.6) 0%, rgba(6, 10, 18, 0.95) 100%);
  border: 1px solid #16243b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.clima-dia-item:hover {
  border-color: #eab308;
}

.clima-dia-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.clima-dia-nome {
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
}

.clima-dia-data {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

.clima-dia-cond-bloco {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
}

.clima-dia-desc {
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.clima-dia-chuva-linha {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #94a3b8;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
}

.clima-dia-chuva-linha strong {
  color: #38bdf8;
  font-weight: 700;
}

.clima-dia-barra-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

.clima-dia-tmin {
  color: #8da2bb;
  font-weight: 700;
}

.clima-dia-tmax {
  color: #ffffff;
  font-weight: 800;
}

.clima-dia-barra {
  flex: 1;
  height: 5px;
  margin: 0 8px;
  background: linear-gradient(90deg, #38bdf8 0%, #f97316 100%);
  border-radius: 3px;
}

/* ============================================================
   TELA: ASSISTENTE IA / MANUAL
   ============================================================ */
.ia-container {
  display: flex;
  gap: 12px;
  height: 335px;
}

.ia-chat-box {
  flex: 1.1;
  background: #060910;
  border: 1px solid #141c2c;
  border-radius: 4px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.chat-bubble {
  background: #0e1626;
  border-left: 3px solid #38bdf8;
  padding: 10px 12px;
  border-radius: 0 4px 4px 0;
  color: #e2e8f0;
  font-size: 12.5px;
  line-height: 1.45;
}

.ia-faq-box {
  flex: 1.9;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
}

.faq-card {
  background: #060910;
  border: 1px solid #141c2c;
  border-radius: 4px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.faq-card:hover {
  border-color: #2563eb;
}
