/* ============================================================
   MaxMaint · Design System Dark Industrial
   Fiel às imagens de referência: Carvão escuro e Laranja Industrial
   ============================================================ */

:root {
  --bg: #0c0d10;
  --bg2: #131519;
  --panel: #171a20;
  --panel2: #1e222a;
  --panel-hover: #242933;
  --line: #2a2f38;
  --line-soft: #20242c;
  
  --txt: #f0f2f5;
  --dim: #9aa1ab;
  --faint: #636b77;
  
  --brand: #F2941E;
  --brand-deep: #e07d0a;
  --brand-bg: rgba(242, 148, 30, 0.12);
  --brand-border: rgba(242, 148, 30, 0.35);

  --green: #46c66a;
  --green-bg: rgba(70, 198, 106, 0.14);
  --amber: #F5C518;
  --amber-bg: rgba(245, 197, 24, 0.13);
  --red: #ff5a4d;
  --red-bg: rgba(255, 90, 77, 0.14);
  --blue: #4aa3ff;
  --blue-bg: rgba(74, 163, 255, 0.12);

  --disp: 'Saira Condensed', -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', monospace;

  --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --radius-sm: 8px;
}

/* Modo claro de alto contraste para uso sob sol intenso na mina */
body.light-theme {
  --bg: #eceff2;
  --bg2: #f4f6f8;
  --panel: #ffffff;
  --panel2: #e2e6eb;
  --panel-hover: #d5dae2;
  --line: #cbd1db;
  --line-soft: #dce1e8;
  --txt: #111418;
  --dim: #454d58;
  --faint: #6c7684;
  --brand: #d97806;
  --brand-deep: #b45309;
  --brand-bg: rgba(217, 120, 6, 0.15);
  --brand-border: rgba(217, 120, 6, 0.45);
}

/* ==================== TELA DE LOGIN SPLIT-SCREEN ==================== */
.login-screen-wrapper {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  background-color: #ffffff;
  overflow-y: auto;
}

.login-left-pane {
  flex: 1;
  max-width: 540px;
  min-height: 100vh;
  padding: 44px 52px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  color: #111418;
}

.login-brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.login-brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.login-brand-title {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 800;
  color: #111418;
  letter-spacing: -0.02em;
}

.login-content {
  max-width: 410px;
  width: 100%;
  margin: 0 auto;
}

.login-title {
  font-size: 34px;
  font-weight: 800;
  color: #111418;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  font-family: var(--sans);
}

.login-subtitle {
  font-size: 15px;
  color: #636b77;
  margin-bottom: 32px;
  line-height: 1.5;
}

.login-field-group {
  margin-bottom: 20px;
}

.login-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #242933;
  margin-bottom: 8px;
}

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

.login-input-icon {
  position: absolute;
  left: 14px;
  width: 20px;
  height: 20px;
  color: #9aa1ab;
  pointer-events: none;
}

.login-input {
  width: 100%;
  height: 48px;
  padding: 10px 14px 10px 44px;
  border: 1px solid #d5dae2;
  border-radius: 10px;
  font-size: 14.5px;
  color: #111418;
  background: #ffffff;
  transition: all 0.15s ease;
  font-family: var(--sans);
}

.login-input:focus {
  outline: none;
  border-color: #ff6000;
  box-shadow: 0 0 0 3px rgba(255, 96, 0, 0.15);
}

.login-eye-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: #9aa1ab;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

.login-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 24px;
  font-size: 13.5px;
}

.login-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #242933;
  font-weight: 500;
}

.login-checkbox-label input[type="checkbox"] {
  accent-color: #ff6000;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.login-forgot-link {
  color: #ff6000;
  text-decoration: none;
  font-weight: 600;
}

.login-btn-submit {
  width: 100%;
  height: 50px;
  background: #ff6000;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 4px 14px rgba(255, 96, 0, 0.3);
}

.login-btn-submit:hover {
  background: #e65500;
}

.login-admin-help {
  text-align: center;
  font-size: 13px;
  color: #636b77;
  margin-top: 18px;
}

.login-admin-help a {
  color: #ff6000;
  font-weight: 600;
  text-decoration: none;
}

.login-footer-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #636b77;
  margin-top: 24px;
}

/* Painel da Direita (Dark Showcase) */
.login-right-pane {
  flex: 1.25;
  background: #11141a;
  position: relative;
  overflow: hidden;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.login-right-bg-mountain {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 320px;
  pointer-events: none;
  opacity: 0.95;
  z-index: 1;
}

.login-mockup-card {
  width: 100%;
  max-width: 600px;
  background: #161920;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  padding: 22px;
  z-index: 2;
  margin-bottom: 32px;
}

.login-slogan-wrap {
  text-align: center;
  z-index: 2;
  max-width: 580px;
}

.login-slogan-title {
  color: #ffffff;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.login-slogan-sub {
  color: #9aa1ab;
  font-size: 16px;
  margin-bottom: 20px;
}

.login-offline-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 30px;
  border: 1px solid rgba(255, 96, 0, 0.5);
  background: rgba(255, 96, 0, 0.12);
  color: #ff8c33;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (max-width: 960px) {
  .login-right-pane { display: none; }
  .login-left-pane { max-width: 100%; padding: 32px 24px; }
}

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

html, body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Layout Desktop com Barra Lateral e Área Principal */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Desktop */
.sidebar {
  width: 250px;
  flex: none;
  background-color: var(--bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
}

.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.sidebar-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.sidebar-title {
  font-family: var(--disp);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--txt);
  line-height: 1;
}

.sidebar-title span {
  color: var(--brand);
}

.sidebar-nav {
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--dim);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background-color: var(--panel);
  color: var(--txt);
}

.nav-item.active {
  background: linear-gradient(90deg, var(--brand), var(--brand-deep));
  color: #111;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(242, 148, 30, 0.3);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Área de Conteúdo Principal */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar Compacto */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background-color: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-left {
  display: flex;
  flex-direction: column;
}

.topbar-title {
  font-family: var(--disp);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.topbar-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.date-pill, .user-badge, .sync-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--dim);
}

.user-badge b {
  color: var(--txt);
}

.sync-status-badge {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
}

.sync-status-badge.synced {
  color: var(--green);
  border-color: rgba(70, 198, 106, 0.3);
}

.sync-status-badge.pending, .sync-status-badge.offline {
  color: var(--amber);
  border-color: rgba(245, 197, 24, 0.35);
  background: var(--amber-bg);
}

.sync-status-badge.syncing {
  color: var(--blue);
  border-color: rgba(74, 163, 255, 0.35);
}

.dot-spin {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

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

/* Botões */
.btn {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--txt);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
}

.btn:hover {
  background: var(--panel-hover);
  border-color: var(--line);
}

.btn.primary, .btn.amber {
  background: linear-gradient(145deg, #ff9b26, var(--brand-deep));
  color: #111;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(242, 148, 30, 0.3);
}

.btn.primary:hover, .btn.amber:hover {
  filter: brightness(1.08);
}

.btn.sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 12.5px;
}

.btn.ghost {
  background: transparent;
}

.btn.danger {
  color: var(--red);
  border-color: rgba(255, 90, 77, 0.3);
}

.btn.danger:hover {
  background: var(--red-bg);
}

.btn.full {
  width: 100%;
}

/* Área de Conteúdo */
.content-area {
  padding: 24px 28px 80px;
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
}

/* Cards e KPIs */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 100%;
  background: var(--accent, var(--line));
}

.kpi-card.orange { --accent: var(--brand); }
.kpi-card.red { --accent: var(--red); }
.kpi-card.green { --accent: var(--green); }
.kpi-card.amber { --accent: var(--amber); }

.kpi-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 500;
}

.kpi-head svg {
  width: 20px;
  height: 20px;
  color: var(--accent, var(--dim));
}

.kpi-val {
  font-family: var(--disp);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  margin: 12px 0 6px;
  letter-spacing: 0.02em;
}

.kpi-val small {
  font-size: 20px;
  color: var(--dim);
  font-weight: 500;
}

.kpi-sub {
  font-size: 12.5px;
  color: var(--dim);
}

/* Grid do Painel Principal */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-bottom: 24px;
}

.panel-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-title h3 {
  font-size: 16.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title h3 svg {
  color: var(--brand);
}

/* Gráfico de Barras / Colunas (Últimos 7 dias) */
.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 180px;
  padding-top: 20px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.bar-val {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}

.bar-track {
  width: 100%;
  max-width: 38px;
  background: var(--panel2);
  border-radius: 4px 4px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 130px;
  overflow: hidden;
}

.bar-fill {
  background: linear-gradient(180deg, #ff9b26, var(--brand-deep));
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 0.6s ease;
}

.bar-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  text-align: center;
}

/* Gráfico Donut de Condição */
.donut-container {
  display: flex;
  align-items: center;
  gap: 24px;
}

.donut-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(
    var(--brand) 0% var(--deg-conf, 69%),
    var(--amber) var(--deg-conf, 69%) var(--deg-atenc, 88%),
    var(--red) var(--deg-atenc, 88%) 100%
  );
  display: grid;
  place-items: center;
  position: relative;
  mask: radial-gradient(circle 46px at center, transparent 98%, #000 100%);
  -webkit-mask: radial-gradient(circle 46px at center, transparent 98%, #000 100%);
}

.donut-inner-text {
  text-align: center;
}

.donut-inner-text b {
  font-family: var(--disp);
  font-size: 28px;
  display: block;
  line-height: 1;
}

.donut-inner-text small {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
  text-transform: uppercase;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.legend-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dim);
}

.dot-color {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

/* Tabelas */
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

table.data-table th {
  padding: 12px 16px;
  background: var(--bg2);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

table.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

table.data-table tr:hover {
  background: var(--panel2);
}

.tag-badge {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--panel2);
  border: 1px solid var(--line);
  letter-spacing: 0.04em;
  display: inline-block;
}

.crit-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}

.crit-alta { color: var(--red); background: var(--red-bg); }
.crit-media { color: var(--amber); background: var(--amber-bg); }
.crit-baixa { color: var(--blue); background: var(--blue-bg); }

/* Badges de Status */
.status-pill {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.st-aberta { color: var(--red); background: var(--red-bg); border: 1px solid rgba(255, 90, 77, 0.3); }
.st-analise { color: var(--amber); background: var(--amber-bg); border: 1px solid rgba(245, 197, 24, 0.3); }
.st-programada { color: var(--blue); background: var(--blue-bg); border: 1px solid rgba(74, 163, 255, 0.3); }
.st-resolvida { color: var(--green); background: var(--green-bg); border: 1px solid rgba(70, 198, 106, 0.3); }

/* ============================================================
   INTERFACE MOBILE-FIRST DO OPERADOR EM CAMPO
   ============================================================ */
.mobile-view {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 16px 90px;
}

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

.mobile-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.mobile-card:hover {
  border-color: var(--line);
}

.turn-pill-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 12px;
}

.turn-pill-card .time-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14.5px;
}

.turn-pill-card svg {
  color: var(--brand);
}

.offline-alert-card {
  background: rgba(242, 148, 30, 0.08);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.operator-info-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.operator-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--panel2);
  display: grid;
  place-items: center;
  color: var(--dim);
}

.btn-big-action {
  width: 100%;
  min-height: 58px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #ff9b26, var(--brand-deep));
  color: #111;
  font-size: 17px;
  font-weight: 700;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(242, 148, 30, 0.28);
  cursor: pointer;
}

.btn-big-action svg {
  width: 24px;
  height: 24px;
}

/* Card do Equipamento em Uso */
.machine-in-use-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.machine-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.machine-tag-title {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
}

.badge-in-use {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(70, 198, 106, 0.3);
}

.inspection-progress-bar {
  margin: 14px 0 18px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--dim);
  margin-bottom: 6px;
}

.progress-track {
  height: 8px;
  border-radius: 4px;
  background: var(--panel2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Fluxo Guiado em Etapas (1 a 5) */
.wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.wizard-steps-indicator {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}

.step-bar {
  flex: 1;
  height: 4px;
  background: var(--panel2);
  border-radius: 2px;
}

.step-bar.active {
  background: var(--brand);
}

/* Checklist Interativo */
.checklist-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}

.checklist-section-title {
  padding: 14px 18px;
  background: var(--panel2);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checklist-item {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
}

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

.checklist-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.item-name {
  font-size: 14.5px;
  font-weight: 500;
}

.item-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.opt-btn {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--dim);
  cursor: pointer;
  min-height: 42px;
}

.opt-btn.ok.selected {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green);
}

.opt-btn.issue.selected {
  background: var(--red-bg);
  color: var(--red);
  border-color: var(--red);
}

.opt-btn.na.selected {
  background: var(--panel-hover);
  color: var(--txt);
  border-color: var(--line);
}

.issue-details-box {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.issue-details-box textarea {
  width: 100%;
  min-height: 70px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--txt);
  padding: 10px;
  font-family: var(--sans);
  font-size: 13.5px;
  margin-bottom: 10px;
  resize: vertical;
}

.photo-uploader-box {
  display: flex;
  gap: 10px;
  align-items: center;
}

.photo-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--line);
}

/* Alerta Obrigatório de Ocorrência Offline */
.offline-warning-banner {
  background: rgba(224, 125, 10, 0.12);
  border: 1px solid rgba(224, 125, 10, 0.38);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}

.offline-warning-banner h4 {
  color: var(--brand);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.offline-warning-banner p {
  font-size: 13px;
  color: var(--txt);
  line-height: 1.5;
}

/* Barra de Navegação Inferior Mobile */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg2);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 60;
}

.mob-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 16px;
}

.mob-nav-btn.active {
  color: var(--brand);
}

.mob-nav-btn svg {
  width: 22px;
  height: 22px;
}

/* Modais */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 13, 0.82);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.show {
  display: flex;
}

.modal-container {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 22px;
}

.modal-footer {
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--txt);
  font-size: 14px;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
}

/* Badge estilizado de Placa Veicular (Padrão Mercosul / Brasil / Mineração) */
.plate-badge {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  color: #111418;
  border: 1.5px solid #242933;
  border-radius: 5px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  text-transform: uppercase;
  vertical-align: middle;
  line-height: 18px;
}
.plate-badge .plate-flag {
  background: #003399;
  color: #ffffff;
  font-size: 8px;
  font-weight: 800;
  padding: 0 4px;
  border-radius: 2px;
  margin-right: 5px;
  letter-spacing: 0;
  text-transform: uppercase;
}
.plate-badge.lg {
  font-size: 14px;
  padding: 4px 12px;
  border-width: 2px;
}
.plate-badge.lg .plate-flag {
  font-size: 9.5px;
  padding: 1px 5px;
}
.plate-badge.no-plate {
  background: var(--panel2);
  color: var(--dim);
  border: 1px dashed var(--line);
  box-shadow: none;
  font-weight: 500;
  text-transform: none;
}

/* Responsividade */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .dash-grid { grid-template-columns: 1fr; }
  .topbar { padding: 12px 16px; }
  .content-area { padding: 16px 16px 80px; }
  .topbar-right .date-pill { display: none; }
}

/* Adaptação de Navegação por Perfil (Operador vs Gestor) */
body.view-operador .sidebar-nav .nav-item[data-tab="painel"],
body.view-operador .sidebar-nav .nav-item[data-tab="visao-turno"],
body.view-operador .sidebar-nav .nav-item[data-tab="ordens"],
body.view-operador .sidebar-nav .nav-item[data-tab="abastecimento"],
body.view-operador .sidebar-nav .nav-item[data-tab="relatorios"] {
  display: none !important;
}

body.view-operador .mobile-bottom-nav .mob-nav-btn[data-mobtab="mobInsp"] {
  display: none !important;
}
