/* ==========================================================================
   DRE·27 — Camada Visual do Piloto Fechado (Auth, Nuvem, Feedback & Admin)
   ========================================================================== */
[hidden],
.piloto-auth-wrap[hidden],
#app-protected-root[hidden] {
  display: none !important;
}

.piloto-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: #f4f1ea;
}
.piloto-auth-card {
  width: 100%;
  max-width: 460px;
  background: #111113;
  color: #f4f4f5;
  border-top: 4px solid #d94f1e;
  padding: 2.2rem 2rem;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.22);
}
.piloto-auth-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f97316;
  margin-bottom: 0.45rem;
}
.piloto-auth-title {
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0 0 0.45rem 0;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.piloto-auth-sub {
  font-size: 0.88rem;
  color: #a1a1aa;
  line-height: 1.5;
  margin: 0 0 1.4rem 0;
}
.piloto-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
  background: #1c1c20;
  padding: 0.28rem;
}
.piloto-tab-btn {
  border: 0;
  background: transparent;
  color: #a1a1aa;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.55rem 0.6rem;
  cursor: pointer;
}
.piloto-tab-btn.active {
  background: #27272c;
  color: #ffffff;
}
.piloto-field {
  margin-bottom: 0.95rem;
}
.piloto-field label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: #d4d4d8;
  margin-bottom: 0.35rem;
}
.piloto-field input,
.piloto-modal textarea,
.piloto-modal input[type="text"] {
  width: 100%;
  padding: 0.68rem 0.8rem;
  background: #1c1c20;
  border: 1px solid #3f3f46;
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
}
.piloto-modal textarea,
.piloto-modal input[type="text"] {
  background: #ffffff;
  color: #18181b;
  border-color: #d4d4d8;
}
.piloto-auth-submit {
  width: 100%;
  padding: 0.78rem 1rem;
  background: #d94f1e;
  color: #ffffff;
  border: 0;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 0.3rem;
}
.piloto-auth-submit:hover { background: #ea580c; }
.piloto-auth-submit:disabled { opacity: 0.6; cursor: wait; }
.piloto-auth-msg {
  margin-top: 0.95rem;
  padding: 0.65rem 0.8rem;
  font-size: 0.82rem;
  line-height: 1.45;
  background: #1f2937;
  border-left: 3px solid #f97316;
  color: #f3f4f6;
}
.piloto-auth-msg.ok { border-left-color: #22c55e; background: #14291d; }
.piloto-auth-msg.err { border-left-color: #ef4444; background: #2c1517; }
.piloto-auth-foot {
  margin-top: 1.3rem;
  padding-top: 0.9rem;
  border-top: 1px solid #27272a;
  font-size: 0.75rem;
  color: #71717a;
  line-height: 1.45;
}

/* Barra superior do piloto */
.piloto-bar {
  background: #18181b;
  color: #e4e4e7;
  border-bottom: 1px solid #27272a;
  font-size: 0.76rem;
  padding: 0.42rem 1.25rem;
}
.piloto-bar-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.piloto-bar-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.piloto-badge {
  background: #d94f1e;
  color: #fff;
  font-weight: 700;
  font-size: 0.66rem;
  padding: 0.14rem 0.45rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.piloto-sync {
  color: #a1a1aa;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.71rem;
}
.piloto-sync.busy { color: #fb923c; }
.piloto-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.piloto-mini-btn {
  background: #27272a;
  color: #f4f4f5;
  border: 1px solid #3f3f46;
  padding: 0.28rem 0.65rem;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
}
.piloto-mini-btn:hover { background: #3f3f46; }
.piloto-mini-btn.accent {
  background: #d94f1e;
  border-color: #d94f1e;
  color: #ffffff;
}
.piloto-mini-btn.accent:hover { background: #ea580c; }

/* Modais do piloto */
.piloto-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 9999;
}
.piloto-modal-backdrop[hidden] { display: none !important; }
.piloto-modal {
  background: #ffffff;
  color: #18181b;
  width: 100%;
  max-width: 620px;
  max-height: 86vh;
  overflow-y: auto;
  border-top: 4px solid #d94f1e;
  padding: 1.5rem 1.6rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}
.piloto-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e4e4e7;
}
.piloto-modal-head h3 { margin: 0; font-size: 1.1rem; }
.piloto-close {
  background: transparent;
  border: 0;
  font-size: 1.35rem;
  cursor: pointer;
  color: #52525b;
}
.piloto-rating-row {
  display: flex;
  gap: 0.45rem;
  margin: 0.4rem 0 1rem 0;
}
.piloto-rate-chip {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #d4d4d8;
  background: #fafafa;
  font-weight: 700;
  cursor: pointer;
}
.piloto-rate-chip.selected {
  background: #18181b;
  color: #ffffff;
  border-color: #18181b;
}
.piloto-saved-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0 0;
}
.piloto-saved-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid #e4e4e7;
}
.piloto-saved-meta { font-size: 0.78rem; color: #52525b; }
@media print {
  .piloto-bar, .piloto-auth-wrap, .piloto-modal-backdrop { display: none !important; }
}

.piloto-forgot-link {
  margin-top: 0.45rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a1a1aa;
  font-size: 0.76rem;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  text-align: left;
}
.piloto-forgot-link:hover {
  color: #f97316;
}
